generating-synthea-data
Fungsinya
Skill ini membuat catatan pasien sintetis yang realistis dengan MITRE Synthea, dalam format FHIR, C-CDA, dan CSV. Skill ini untuk pengembang yang membutuhkan data uji untuk perangkat lunak klinis tanpa menyentuh pasien sungguhan.
Kapan dipakai
- βSaat Anda membutuhkan data pasien yang aman dibagikan untuk mengembangkan atau mendemokan pipeline klinis.
- βSaat pengujian membutuhkan fixture yang bisa direproduksi, bukan data yang dilindungi.
- βSaat Anda membutuhkan catatan sintetis dengan pengenal palsu yang diketahui untuk menguji penghapusan identitas.
Link skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/generating-synthea-data/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBuat 50 pasien sintetis di Massachusetts dalam file FHIR dan CSV yang bisa saya pakai sebagai data uji.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent menyiapkan alat Synthea, menjalankannya dengan ukuran populasi dan format yang Anda pilih, lalu menghasilkan file yang tidak berisi informasi pasien sungguhan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah Synthea membutuhkan Java?
Ya. Alat ini membutuhkan Java 11 atau yang lebih baru untuk dibangun dan dijalankan.
Apakah datanya nyata?
Tidak. Keluaran Synthea bersifat sintetis dan tidak mengandung data pasien sungguhan.
Bisakah saya memilih wilayah asal pasien?
Bisa. Perintah generator menerima nama negara bagian, sehingga populasinya diatur untuk wilayah itu.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 5.8k
- Peringkat
- #14706
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
annotating-variants
5.8kMembantu agent Anda memperkirakan apa yang dilakukan varian genetik, mengubah nama HGVS menjadi posisi genom, dan menambahkan frekuensi populasi, dengan memakai anotator publik yang gratis.
ask-openmed
5.8kMembantu agent Anda memilih alur kerja OpenMed yang tepat untuk permintaan teks klinis, dimulai dengan pemeriksaan privasi setiap kali data pasien mungkin ada.
assembling-fhir-bundles
5.8kMengemas beberapa rekam kesehatan FHIR menjadi satu Bundle transaksi yang siap dikirim ke EHR, dengan referensi internal yang terhubung dengan benar.
auditing-deid-leakage
5.8kMemindai teks klinis yang sudah dihapus identitasnya untuk mencari pengenal yang tertinggal, seperti nomor SSN, nomor kartu, email, dan tanggal, dan memblokir rilis jika masih ada.
Skill serupa
test-driven-development
311kMengajari agent Anda menulis tes yang gagal dulu, melihatnya gagal, lalu menulis kode terkecil yang lulus, sebelum membangun fitur atau perbaikan apa pun.
verification-before-completion
311kMengajari agent Anda menjalankan pemeriksaan nyata dan membaca keluarannya sebelum menyatakan tugas, perbaikan, atau build sudah selesai atau lulus.
migrate-to-shoehorn
310kMengganti type cast berisiko di file tes Anda dengan pustaka shoehorn, sehingga tes bisa memakai data parsial dan tetap lulus pemeriksaan tipe.