generating-synthea-data
Qué hace
Esta skill genera historias de pacientes realistas pero totalmente sintéticas con MITRE Synthea, en formatos FHIR, C-CDA y CSV. Es para desarrolladores que necesitan datos de prueba para software clínico sin tocar pacientes reales.
Cuándo usarla
- ✓Cuando necesitas datos de pacientes seguros y compartibles para desarrollar o hacer demostraciones de una canalización clínica.
- ✓Cuando las pruebas necesitan datos de referencia reproducibles en lugar de datos protegidos.
- ✓Cuando necesitas notas sintéticas con identificadores ficticios conocidos para probar la desidentificación.
Link de la skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/generating-synthea-data/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Genera 50 pacientes sintéticos de Massachusetts en archivos FHIR y CSV que pueda usar como datos de prueba.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente prepara la herramienta Synthea, la ejecuta con el tamaño de población y los formatos que elijas, y produce archivos que no contienen información real de pacientes.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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.deidentifyremoved 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
- Choose scale & geography.
-p Nsets population; the state/location argument shapes demographics and addresses. Start small (10–50) for fixtures. - 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 withfetching-fhir-resources; C-CDA pairs withparsing-ccda-documents. - Pin a seed (
-s) for reproducible fixtures so test assertions are stable. - Select modules (optional). Synthea ships disease modules
(
-m "diabetes*"to filter); choose modules matching the entities your OpenMed pipeline targets. - 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.deidentifyrecall withopenmed.eval(evaluating-with-leakage-gates). Because the "PHI" is synthetic and known, you can measure misses without exposing anyone. - 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 thefetching-fhir-resourcesandparsing-ccda-documentsskills. - To OpenMed eval: use Synthea's known synthetic identifiers as ground truth
for
openmed.evalde-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.divnarrative is genera
Preguntas frecuentes
¿Synthea necesita Java?
Sí. La herramienta necesita Java 11 o posterior para compilarse y ejecutarse.
¿Los datos son reales?
No. Los resultados de Synthea son sintéticos y no contienen datos reales de pacientes.
¿Puedo elegir la zona de procedencia de los pacientes?
Sí. El comando del generador acepta el nombre de un estado, así que la población se fija a esa zona.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 5,8 mil
- Posición en el ranking
- #14706
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
annotating-variants
5,8 milAyuda a tu agente a predecir qué hace una variante genética, convertir nombres HGVS en posiciones del genoma y añadir frecuencias poblacionales, usando anotadores públicos gratuitos.
ask-openmed
5,8 milAyuda a tu agente a elegir el flujo de trabajo de OpenMed adecuado para una petición de texto clínico, empezando siempre por una comprobación de privacidad si puede haber datos de pacientes.
assembling-fhir-bundles
5,8 milEmpaqueta varios registros de salud FHIR en un único Bundle de transacción listo para enviar a un EHR, con las referencias internas enlazadas correctamente.
auditing-deid-leakage
5,8 milBusca en texto clínico desidentificado restos de identificadores, como números de la seguridad social, de tarjeta, correos y fechas, y bloquea la publicación si queda alguno.
Skills parecidas
test-driven-development
311 milEnseña a tu agente a escribir primero una prueba que falle, verla fallar y después escribir el código más pequeño que la hace pasar, antes de construir cualquier función o corrección.
verification-before-completion
311 milEnseña a tu agente a ejecutar comprobaciones reales y leer su resultado antes de afirmar que una tarea, una corrección o una compilación está completa o en buen estado.
migrate-to-shoehorn
310 milSustituye los casts de tipo arriesgados de tus archivos de prueba por la librería shoehorn, para que las pruebas usen datos parciales y sigan pasando las comprobaciones de tipos.