Zum Inhalt springen
Skillpedia
Tests5.8k · #14706

generating-synthea-data

Was er macht

Dieser Skill erzeugt mit MITRE Synthea realistische, aber vollständig synthetische Patientendatensätze in den Formaten FHIR, C-CDA und CSV. Er ist für Entwickler gedacht, die Testdaten für klinische Software brauchen, ohne echte Patienten zu berühren.

Wann du ihn nutzt

  • ✓Wenn du sichere, teilbare Patientendaten zum Entwickeln oder Vorführen einer klinischen Pipeline brauchst.
  • ✓Wenn Tests reproduzierbare Testdaten statt geschützter Daten brauchen.
  • ✓Wenn du synthetische Notizen mit bekannten erfundenen Kennungen zum Testen der Pseudonymisierung brauchst.

Link zum Skill

https://github.com/maziyarpanahi/openmed/blob/master/skills/generating-synthea-data/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/maziyarpanahi/openmed/blob/master/skills/generating-synthea-data/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Erzeuge 50 synthetische Patienten in Massachusetts als FHIR- und CSV-Dateien, die ich als Testdaten nutzen kann.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent richtet das Synthea-Werkzeug ein, führt es mit der gewünschten Populationsgröße und den Formaten aus und erzeugt Dateien ohne echte Patienteninformationen.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Generating Synthetic Patient Data with Synthea

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.

When to use

  • Building or demoing an OpenMed ingestion pipeline (FHIR, C-CDA) and need shareable input that is safe to commit and pass around.
  • Creating deterministic CI fixtures so tests don't depend on protected data.
  • Producing a leakage-gate test corpus: synthetic notes with known fake identifiers, so you can score whether openmed.deidentify removed them all.
  • Teaching/onboarding without a data-use agreement.

Quick start

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.

Workflow

  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.

Hand-off to / from OpenMed

  • To OpenMed (as input): Synthea FHIR/C-CDA narrative → openmed.deidentify → openmed.analyze_text, via the fetching-fhir-resources and parsing-ccda-documents skills.
  • To OpenMed eval: use Synthea's known synthetic identifiers as ground truth 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.
  • Adjacent, not in-pipeline: Synthea is a source of safe data; it does not call OpenMed and OpenMed does not call it. Keep it in dev/CI, never as a production data source.

Edge cases & gotchas

  • Synthetic ≠ statistically perfect. Synthea reproduces realistic disease progression and demographics but is not a substitute for real-world distribution validation; never report clinical model accuracy only on synthetic data.
  • Narrative is templated. FHIR text.div narrative is genera
Häufige Fragen

Braucht Synthea Java?

Ja. Das Werkzeug benötigt Java 11 oder neuer zum Bauen und Ausführen.

Sind die Daten echt?

Nein. Synthea-Ausgaben sind synthetisch und enthalten keinerlei echte Patientendaten.

Kann ich wählen, aus welcher Region die Patienten stammen?

Ja. Der Generator-Befehl nimmt einen Staatsnamen, sodass die Population für dieses Gebiet erzeugt wird.

Details

Originalbeschreibung des Autors

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.

repo: maziyarpanahi/openmed

Beliebtheit

GitHub-Sterne
5.8k
Platz im Ranking
#14706
Lizenz
Apache-2.0
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills