SQL On Fhir
aehrc/pathling
Expert guidance for implementing SQL on FHIR v2 ViewDefinitions and operations to create portable, tabular projections of FHIR data.
Kick off and harvest a FHIR Bulk Data $export (system-, group-, or patient-level) and stream the resulting NDJSON into a batch OpenMed de-identification + NER pipeline at cohort scale.
$ npx skills add maziyarpanahi/openmed --skill exporting-bulk-fhir -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install maziyarpanahi/openmed exporting-bulk-fhir --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/exporting-bulk-fhir .claude/skills/exporting-bulk-fhir && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "exporting-bulk-fhir" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/exporting-bulk-fhir into .claude/skills/exporting-bulk-fhir/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "exporting-bulk-fhir", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/maziyarpanahi/openmed/tree/master/skills/exporting-bulk-fhirType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add maziyarpanahi/openmed --skill exporting-bulk-fhir -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install maziyarpanahi/openmed exporting-bulk-fhir --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/exporting-bulk-fhir .agents/skills/exporting-bulk-fhir && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "exporting-bulk-fhir" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/exporting-bulk-fhir into .agents/skills/exporting-bulk-fhir/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "exporting-bulk-fhir", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add maziyarpanahi/openmed --skill exporting-bulk-fhir -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install maziyarpanahi/openmed exporting-bulk-fhir --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/exporting-bulk-fhir .cursor/skills/exporting-bulk-fhir && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "exporting-bulk-fhir" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/exporting-bulk-fhir into .cursor/skills/exporting-bulk-fhir/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "exporting-bulk-fhir", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/maziyarpanahi/openmed.git --path skills/exporting-bulk-fhir--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add maziyarpanahi/openmed --skill exporting-bulk-fhir -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install maziyarpanahi/openmed exporting-bulk-fhir --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/exporting-bulk-fhir .gemini/skills/exporting-bulk-fhir && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "exporting-bulk-fhir" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/exporting-bulk-fhir into .gemini/skills/exporting-bulk-fhir/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "exporting-bulk-fhir", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install maziyarpanahi/openmed exporting-bulk-fhirInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add maziyarpanahi/openmed --skill exporting-bulk-fhir -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/exporting-bulk-fhir .github/skills/exporting-bulk-fhir && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "exporting-bulk-fhir" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/exporting-bulk-fhir into .github/skills/exporting-bulk-fhir/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "exporting-bulk-fhir", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add maziyarpanahi/openmed --skill exporting-bulk-fhir -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install maziyarpanahi/openmed exporting-bulk-fhir --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/exporting-bulk-fhir .opencode/skills/exporting-bulk-fhir && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "exporting-bulk-fhir" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/exporting-bulk-fhir into .opencode/skills/exporting-bulk-fhir/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "exporting-bulk-fhir", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
exporting-bulk-fhirKick off and harvest a FHIR Bulk Data $export (system-, group-, or patient-level) and stream the resulting NDJSON into a batch OpenMed de-identification + NER pipeline at cohort scale.
Exporting Bulk Fhir is an agent skill from maziyarpanahi/openmed. Kick off and harvest a FHIR Bulk Data $export (system-, group-, or patient-level) and stream the resulting NDJSON into a batch OpenMed de-identification + NER pipeline at cohort scale. Covers the async kickoff (Prefer respond-async) - poll Content-Location - download NDJSON flow, the Bulk Data Access IG, type/since filters, and feeding DocumentReference/DiagnosticReport notes into openmed.deidentify in batch. Use when the user needs population-scale note extraction from an EHR or data warehouse to feed OpenMed…
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Research & Science, covering Clinical and healthcare research. The repository describes itself as: Local-first healthcare AI: clinical NER and HIPAA PII de-identification on hardware you control. 2,200+ medical models, 35 model-backed PII languages, and Python, MLX, Android… The licence is Apache-2.0.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 34d7b8c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
curlFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
hl7.orggithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Exporting Bulk Fhir loads about 1.9k tokens when it runs. Until then it costs about 166 tokens; SKILL.md has 567 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from maziyarpanahi/openmed at commit 34d7b8c, republished under its Apache-2.0 licence (© maziyarpanahi). 567 words, ~1,895 tokens.
.claude/skills/exporting-bulk-fhir/SKILL.md (or your agent's skills folder).When you need cohort-scale clinical text — not one patient in a UI — you use
the FHIR Bulk Data Access ($export) operation: an async job that emits
NDJSON files of resources you then stream into OpenMed for batch
de-identification and NER. This skill sits before the OpenMed pipeline: it is
how the notes arrive.
Reach for it when the source is an EHR or FHIR data warehouse and the volume is
a population/group (thousands of patients), the workload is headless (no
clinician UI), and the goal is to batch-feed openmed.deidentify /
openmed.analyze_text. Triggers: "bulk export", "$export", "NDJSON", "Flat
FHIR", "cohort de-identification", "export all notes". For a single in-chart
patient with a UI, use scaffolding-smart-on-fhir instead.
GET [base]/$export — everything the client is authorized for.GET [base]/Group/[id]/$export — a defined cohort (most common).GET [base]/Patient/$export — all patients in scope.Bulk export uses SMART Backend Services auth (a system/*.read-scoped
client-credentials token via a signed JWT assertion), not an interactive launch.
# 1) Kickoff (async). Ask for clinical-note-bearing resource types.
curl -s -X GET \
'https://ehr.example/fhir/Group/cohort-42/$export?_type=DocumentReference,DiagnosticReport&_since=2024-01-01T00:00:00Z' \
-H 'Authorization: Bearer <backend-services-token>' \
-H 'Accept: application/fhir+json' \
-H 'Prefer: respond-async' -D -
# -> 202 Accepted
# Content-Location: https://ehr.example/fhir/bulkstatus/JOB123
# 2) Poll the status URL until complete
curl -s 'https://ehr.example/fhir/bulkstatus/JOB123' \
-H 'Authorization: Bearer <token>'
# 202 + X-Progress while running; 200 + a manifest JSON when done:
# { "transactionTime": "...", "request": "...", "requiresAccessToken": true,
# "output": [
# { "type": "DocumentReference",
# "url": "https://ehr.example/fhir/bulkfiles/dr-1.ndjson" },
# { "type": "DiagnosticReport",
# "url": "https://ehr.example/fhir/bulkfiles/dx-1.ndjson" } ] }
# 3) Download each NDJSON file (one FHIR resource per line)
curl -s 'https://ehr.example/fhir/bulkfiles/dr-1.ndjson' \
-H 'Authorization: Bearer <token>' -o dr-1.ndjsonKey headers/params: Prefer: respond-async (required to start the job),
Content-Location (the status/polling URL), _type (limit resource types),
_since (incremental export), _typeFilter (server-side resource filtering).
Delete the job when done: DELETE <status-url>.
NDJSON is one resource per line — stream it; do not load the whole file. Pull the
note text out of each DocumentReference/DiagnosticReport and run OpenMed
on-device, in batch:
import base64, json, openmed
def note_text(resource: dict) -> str | None:
# DocumentReference.content[].attachment.data (base64) or .url -> Binary
for content in resource.get("content", []):
att = content.get("attachment", {})
if att.get("data"):
return base64.b64decode(att["data"]).decode("utf-8", "replace")
# DiagnosticReport.presentedForm[].data
for form in resource.get("presentedForm", []):
if form.get("data"):
return base64.b64decode(form["data"]).decode("utf-8", "replace")
return None
with open("dr-1.ndjson", "r", encoding="utf-8") as fh:
for line in fh: # streaming, line by line
resource = json.loads(line)
text = note_text(resource)
if not text:
continue
# De-identify every note before anything downstream sees it
deid = openmed.deidentify(text, method="replace", policy="hipaa_safe_harbor")
# Then NER on the de-identified text
entities = openmed.analyze_text(
deid.text, model_name="disease_detection_superclinical")
# ... persist de-identified text + spans; never persist raw PHIFor large cohorts, parallelise across files (each NDJSON file is independent) and reuse a single OpenMed model loader across notes to avoid reloading weights.
system/DocumentReference.read, etc.).$export at the right level with _type (and _since for
incrementals) + Prefer: respond-async.Content-Location until 200; read the manifest output[].requiresAccessToken).openmed.deidentify →
openmed.analyze_text.exporting-to-fhir,
assembling-fhir-bundles).DELETE the bulk job to free server storage.openmed.deidentify is the primary hand-off. De-identify first; treat
every exported note as PHI until it has been through the de-id pass.analyze_text → exporting-to-fhir →
to_bundle; write back only if your governance allows.Content-Location is
success; poll with backoff and honour Retry-After/X-Progress.json.load a whole
file. Parallelise per file, not per line.requiresAccessToken. If the manifest says so, send the bearer token when
downloading the NDJSON files too.openmed.eval
leakage gates (evaluating-with-leakage-gates), not F1 alone.Binary
reference, or RTF/HTML in presentedForm. Normalise to plain text before
OpenMed; for scanned PDFs use OpenMed's document/OCR intake.DELETE the
status URL when finished.$export operation: https://hl7.org/fhir/uv/bulkdata/export.html© maziyarpanahi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/exporting-bulk-fhir of maziyarpanahi/openmed.
Open the folder on GitHubat commit 34d7b8c
Exporting Bulk Fhir next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Exporting Bulk Fhir this skillmaziyarpanahi/openmed | 5.5k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| SQL On Fhiraehrc/pathling | 137 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Pathling Pythonaehrc/pathling | 137 | — | ~4k | Automated safety check: Pass | Apache-2.0 | |
| Medical Vector Searchaipoch/medical-research-skills | 1.9k | — | ~2k | Automated safety check: Pass | MIT | |
| Clinical Trials Databasegoogle-deepmind/science-skills | 3.2k | 2 repos | ~3.2k | Automated safety check: Pass | Apache-2.0 | |
| CHARLS Paper Reproduction Guidexjtulyc/MedgeClaw | 617 | 1 repos | ~1.8k | Automated safety check: Pass | None |
aehrc/pathling
Expert guidance for implementing SQL on FHIR v2 ViewDefinitions and operations to create portable, tabular projections of FHIR data.
aehrc/pathling
Comprehensive cheat sheet for using the Pathling Python API.
aipoch/medical-research-skills
Vector database retrieval and evidence-based answering for medical research topics.
google-deepmind/science-skills
Query ClinicalTrials.gov via APIv2. An agent skill from google-deepmind/science-skills.
xjtulyc/MedgeClaw
Guides an agent through reproducing papers built on the CHARLS health and retirement survey, from variable mapping to cognition, depression and isolation scores.
xjtulyc/MedgeClaw
Routes bioinformatics, drug discovery, clinical and multi-omics tasks from a chat interface to Claude Code sessions running K-Dense scientific skills, with a live dashboard per task.
maziyarpanahi/openmed
Checks OpenMed de-identified clinical text against the 18 HIPAA Safe Harbor identifier categories and reports gaps and residual re-identification risk.
maziyarpanahi/openmed
Fills in a model card for an OpenMed clinical NER or de-identification model from its evaluation reports: intended use, metrics, subgroups and limitations.
maziyarpanahi/openmed
Walks a data pipeline against the HIPAA Privacy and Security Rule checklist and produces a gap report before it processes patient data.
maziyarpanahi/openmed
Suggests candidate ICD-10-CM diagnosis and ICD-10-PCS procedure codes for clinical text extracted by OpenMed, with rationale for a certified coder to review.
maziyarpanahi/openmed
Maps OpenMed-extracted, terminology-coded conditions, drugs and measurements into OMOP CDM v5.4 tables for OHDSI and ATLAS analytics.
maziyarpanahi/openmed
Finds social risks such as housing instability or food insecurity in clinical notes and proposes matching ICD-10-CM Z-codes for a coder to confirm.
Categories
Kick off and harvest a FHIR Bulk Data $export (system-, group-, or patient-level) and stream the resulting NDJSON into a batch OpenMed de-identification + NER pipeline at cohort scale. Exporting Bulk Fhir is an agent skill from maziyarpanahi/openmed. Kick off and harvest a FHIR Bulk Data $export (system-, group-, or patient-level) and stream the resulting NDJSON into a batch OpenMed de-identification + NER pipeline at cohort scale.
Exporting Bulk Fhir fits situations like: the user needs population-scale note extraction from an EHR; data warehouse to feed OpenMed; mentions bulk export; cohort de-identification.
Run `npx skills add maziyarpanahi/openmed --skill exporting-bulk-fhir -a claude-code`. Or copy the skill folder (skills/exporting-bulk-fhir in maziyarpanahi/openmed) into .claude/skills/exporting-bulk-fhir in your project. Claude Code loads it when a task matches its description.
Run `npx skills add maziyarpanahi/openmed --skill exporting-bulk-fhir -a codex`. Or copy the skill folder (skills/exporting-bulk-fhir in maziyarpanahi/openmed) into .agents/skills/exporting-bulk-fhir in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add maziyarpanahi/openmed --skill exporting-bulk-fhir -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/exporting-bulk-fhir, .gemini/skills/exporting-bulk-fhir, .github/skills/exporting-bulk-fhir and .opencode/skills/exporting-bulk-fhir in your project.
Going by SKILL.md and its folder, Exporting Bulk Fhir needs the command-line tools its instructions call (curl). Our summary lists: Python 3.
SKILL.md names 2 domains. As links in the text: hl7.org and github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Exporting Bulk Fhir is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Exporting Bulk Fhir: SQL On Fhir (aehrc/pathling, 137 stars), Pathling Python (aehrc/pathling, 137 stars), Medical Vector Search (aipoch/medical-research-skills, 1.9k stars) and Clinical Trials Database (google-deepmind/science-skills, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
maziyarpanahi (a GitHub user) maintains it in maziyarpanahi/openmed, which has 5,506 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on October 11, 2026.
Source: maziyarpanahi/openmed on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.