annotating-variants
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators…
Generates synthetic but realistic patient records (FHIR R4 bundles, C-CDA documents, CSV) with MITRE Synthea for development, CI fixtures, demos, and leakage-gate test sets — zero real PHI. Use when you need safe, shareable test data for an OpenMed pipeline, reproducible
$ npx -y skills add maziyarpanahi/openmed --skill generating-synthea-data --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/generating-synthea-dataContext preview
The summary Claude sees to decide when to auto-load this skill.
Generates synthetic but realistic patient records (FHIR R4 bundles, C-CDA documents, CSV) with MITRE Synthea for development, CI fixtures, demos, and leakage-gate test sets — zero real PHI. Use when you need safe, shareable test data for an OpenMed pipeline, reproducible
name: generating-synthea-data description: "Generates synthetic but realistic patient records (FHIR R4 bundles, C-CDA documents, CSV) with MITRE Synthea for development, CI fixtures, demos, and leakage-gate test sets — zero real PHI. Use when you need safe, shareable test data for an OpenMed pipeline, reproducible fixtures for tests, or a held-out set for de-identification leakage gates, instead of touching real clinical data. Synthea output feeds the FHIR/C-CDA ingestion skills and openmed.eval. Trigger keywords: Synthea, synthetic data, fake patients, test fixtures, demo data, FHIR bundle generator, synthetic EHR, no PHI." license: Apache-2.0 metadata: project: OpenMed category: data-ingestion pairs: adjacent version: "1.0"
You cannot develop, test, or demo a clinical NLP pipeline on real PHI without a mountain of governance — and you shouldn't have to. **Synthea** (MITRE's Synthetic Patient Population Simulator) generates statistically realistic, fully synthetic patients: complete longitudinal records as FHIR R4 bundles, C-CDA documents, and flat CSV, with **zero real-PHI risk**. Use it for OpenMed dev fixtures, CI, demos, and — importantly — as **held-out test sets for de-identification leakage gates**, where you need known-synthetic "PHI" to measure recall.
shareable input that is safe to commit and pass around.
identifiers, so you can score whether `openmed.deidentify` removed them all.
Synthea is a Java tool. Generate a small population in multiple formats:
# Requires Java 11+. Clone and build once. git clone https://github.com/synthetichealth/synthea && cd synthea ./gradlew build -x test # Generate 50 patients in Massachusetts as FHIR R4 + C-CDA + CSV. ./run_synthea -p 50 Massachusetts \ --exporter.fhir.export=true \ --exporter.ccda.export=true \ --exporter.csv.export=true \ --exporter.baseDirectory=./output # Reproducible runs: fix the seed so fixtures are stable across CI. ./run_synthea -s 12345 -p 20 --exporter.baseDirectory=./fixtures
Output lands under `output/fhir/`, `output/ccda/`, and `output/csv/`. Feed the FHIR bundles to `parsing-... ` skills, or hand narrative straight to OpenMed:
import json, openmed
bundle = json.load(open("output/fhir/Patient_xyz.json"))
for entry in bundle.get("entry", []):
res = entry.get("resource", {})
div = (res.get("text") or {}).get("div", "") # narrative XHTML
if div.strip():
deid = openmed.deidentify(div, method="replace", policy="hipaa_safe_harbor")
result = openmed.analyze_text(deid.text, output_format="dict")Synthea data is synthetic, so de-identifying it is *exercising the pipeline*, not a privacy requirement — which is exactly what makes it a great test bed.
1. **Choose scale & geography.** `-p N` sets population; the state/location argument shapes demographics and addresses. Start small (10–50) for fixtures. 2. **Pick formats.** Enable FHIR (`exporter.fhir.export`), C-CDA (`exporter.ccda.export`), and/or CSV per your ingestion path. FHIR R4 is the default and pairs with `fetching-fhir-resources`; C-CDA pairs with `parsing-ccda-documents`. 3. **Pin a seed** (`-s`) for reproducible fixtures so test assertions are stable. 4. **Select modules** (optional). Synthea ships disease modules (`-m "diabetes*"` to filter); choose modules matching the entities your OpenMed pipeline targets. 5. **Use as a leakage-gate corpus.** Synthea emits known fake names, MRNs, addresses, and dates — inject/collect these as ground-truth PHI spans and score `openmed.deidentify` recall with `openmed.eval` (`evaluating-with-leakage-gates`). Because the "PHI" is synthetic and known, you can measure misses without exposing anyone. 6. **Commit fixtures** under your test tree (e.g. `tests/fixtures/synthea/`) — it is safe to version-control synthetic output.
→ `openmed.analyze_text`, via the `fetching-fhir-resources` and `parsing-ccda-documents` skills.
for `openmed.eval` de-identification leakage gates — the daily-release thesis gates on leakage, not F1 alone, and synthetic data lets you build that test set without governance overhead.
call OpenMed and OpenMed does not call it. Keep it in dev/CI, never as a production data source.
progression and demographics but is not a substitute for real-world distribution validation; never report clinical model accuracy *only* on synthetic data.
templates, so it is more regular than dictated notes. For NER robustness, supplement with varied real (de-identified) text where governance allows.
will churn. Always pin the seed for committed fixtures.
releases; pin the Synthea version (git tag) alongside your fixtures.
(Apache-2.0), so output is safe to redistribute — unlike MIMIC/i2b2/n2c2, which require data-use agreements and must stay user-supplied.
##
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 and browser runtimes. Apache-2.0 SDK.
Repo: maziyarpanahi/openmed
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators…
Choose the first OpenMed workflow skill for an intake, privacy, extraction, exchange, or…
Package multiple FHIR R4 resources produced from OpenMed output into a single valid…
Adversarially scan already-de-identified clinical text for residual identifiers and emit a…
Produce a signed, reproducible, no-PHI audit trail for an OpenMed de-identification run via…
Generates and verifies 21 CFR Part 11-style audit trails — who/what/when, electronic…