Internal tooling · local CLI

Sim

The PDHC synthetic clinical-data generator — reproducible, FHIR-coded cohorts, attributed to real PlanDefinitions and organisations, landed straight into the platform's CDRs.

Sim produces synthetic longitudinal patient data (never real patients) and pushes it where the platform needs it — patient identities into ips.pdhc, observations into a CDR. Every value is tagged synthetic and coded against a plan.pdhc Concept, so downstream services treat it exactly like production data. It runs as a local operator CLI (python -m sim …); there is no public endpoint.

The four things it does

Generate from a PlanDefinition

Drive MITRE Synthea straight from a plan.pdhc PlanDefinition: a cohort whose observations are exactly that plan's concepts, on its cadence, over a chosen time window.

sim generate-from-plandef --plandef <guid> \
    --clinic <guid> --patients 20 --seed 42 \
    --start 2020-01-01 --end 2024-12-31 \
    --push-observations --target cdr_6
Move a cohort between CDRs

Generate into the cdr_6 sink, then move the complete content into any of cdr1–5. Copy by default; --purge-source completes the move (only after a verified-complete copy).

sim cdr-transfer --from cdr_6 --to cdr2 \
    --sim-run-id <run> --dry-run      # preview
sim cdr-transfer --from cdr_6 --to cdr2 \
    --sim-run-id <run> --purge-source  # move
Import Synthea bundles

Consume pre-generated Synthea FHIR bundles — Shape C lands Patients in ips.pdhc; --push-observations adds Shape B (mapped Observations into a CDR).

sim import-synthea --source DIR --clinic <guid> \
    --push-observations --target cdr_6
Build a cohort from a roster

Plandef + an ips.pdhc clinic roster + a params YAML → longitudinal rows (drift, loss, distribution families), optionally pushed to a CDR.

sim cohort-build --plandef <guid> \
    --clinic <guid> --params params.yaml \
    --out ./out --push --target cdr_6

How the pieces fit

plan.pdhc PlanDefinition
      │  concepts + cadence + reference ranges
      ▼
   sim  ──►  Synthea (time-pinned, seeded)  ──►  patients ─► ips.pdhc
      │                                          observations ─► cdr_6
      │
      └─ cdr-transfer ──►  move complete content  ──►  cdr1 … cdr5

Good to know

Documentation

User manual  ·  Technical manual  ·  All PDHC services


Planned Data in Healthcare · pdhc.se — Sim generates synthetic data only.