Skip to main content

clinosim

Clinically Realistic Hospital Data Simulator — generate FHIR R4 EHR data from a virtual hospital.

CI Docs PyPI Python License FHIR

Developed at InterSystems · Not an official InterSystems product (details)

📚 Documentation site | 🇯🇵 README.ja.md

⚠️ Synthetic data only — fully synthetic output. Not for clinical use. clinosim does not ingest, reference, or reproduce any real patient data / PHI / PII.

What is clinosim?

clinosim generates synthetic EHR data through forward simulation from a population. Every patient carries a hidden 14-variable physiological state (clinosim/types/clinical.py::PhysiologicalState), and every observation (labs, vitals, medications, diagnoses) is derived from that state — so the data is clinically coherent by construction.

Primary use cases:

  • Training data for medical AI / ML models
  • EHR system testing and QA
  • Clinical-research method development
  • Educational case datasets

Install

Requires Python 3.11 or newer.

pip install clinosim

Development install from a clone:

git clone https://github.com/TomoOkuyama/clinosim.git
cd clinosim
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

Quick start

Generate a small US cohort and inspect its FHIR output:

clinosim simulate --country US --population 100 --seed 42 \
  --output ./out --format fhir-r4
ls ./out/fhir_r4/          # Patient.ndjson, Encounter.ndjson, ...

For the JP cohort, named-preset datasets, hospital-config override, and the full CLI reference, see docs/getting-started/configuration.md.

See it in action

For a JP warfarin-anticoagulated patient, clinosim's physiology engine places the patient in the therapeutic PT-INR band and emits a lab value (e.g. 2.7) inside that range — not by sampling a "PT-INR normal range", but because the hidden state chose it. Remove the warfarin and next run's INR drops back to ~1.0.

Full JSON walkthrough → docs/getting-started/first-cohort.md

Why clinosim?

Most synthetic-EHR tools produce records by sampling from disease distributions. clinosim runs the disease — the CKD patient's ED creatinine is elevated even when presenting for something unrelated; the sepsis patient shows the WBC / CRP / lactate cascade.

  • Clinical coherence by construction — physiology model makes incoherent labs impossible.
  • JP + US natively — JP Core profile compliance for 16 primary FHIR resource types, JLAC10 / MHLW YJ codes, JP names / addresses / insurance out of the box.
  • YAML-driven extension — 32 inpatient diseases + 46 ED / outpatient conditions are all data files, not code.
  • Longitudinal service lines — oncology (10 cancer sites incl. male breast, chemo regimen cycles, radiation therapy Procedure, tumor-marker labs) + obstetrics (pregnancy modelled as a time-boxed TemporalStatePeriod lifecycle — annual conception, prenatal visits at gestational weeks 12/24/36, mother-side delivery Encounter with Z37.0 discharge dx + delivery Procedure + newborn Patient chain, postpartum visits at 7 d / 28 d) emit at correct temporal cadence, not as flat annotations. See docs/reference/oncology-obstetric-service-lines.md.

Prior-art comparison (Synthea): docs/synthea-comparison.md.

Learn more

Topic Where
Full documentation site https://tomookuyama.github.io/clinosim/
Architecture reference docs/architecture/
Module index (33 modules) clinosim/modules/
Data quality & evaluation docs/eval.md
JP-CLINS profile support docs/jp-clins.md
Contributing CONTRIBUTING.md
AI-agent conventions AGENTS.md
Changelog CHANGELOG.md

Community

Affiliation

clinosim is developed by an engineer at InterSystems and released under the MIT License as an open-source contribution to the healthcare AI developer community.

It is not an official InterSystems product. It is not part of InterSystems IRIS for Health or any other commercial offering, and it carries no InterSystems support, warranty, or roadmap commitment. Issues and pull requests are handled here on GitHub, not through InterSystems support channels.

License

MIT — see LICENSE. Bundled code-system data follows each upstream registry's licence; details in clinosim/codes/README.md.


Note: the top-level clinosim/ Python package has no dedicated README by design. Module-level documentation lives under clinosim/modules/, and framework docs sit alongside each subsystem — audit/, eval/, codes/, benchmarks/.

Metadata

Release files for clinosim 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clinosim 0.6.4
File Size Uploaded
clinosim-0.6.4.tar.gz 3.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for clinosim 0.6.4
File Interpreter ABI Platform
clinosim-0.6.4-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 MB

Release files / clinosim-0.6.4.tar.gz

Download URL clinosim-0.6.4.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
f68adbf5051e115e93143a9625d894bd593b309d610d657ee995841b00053ef9
BLAKE2b-256 checksum
How to use checksums
e4461078d54ca3e3d7a9fab48cb36eb4f07ad7f3f1e80916e15ef2e8104541bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release files / clinosim-0.6.4-py3-none-any.whl

Download URL clinosim-0.6.4-py3-none-any.whl
Size 3.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d1f982a02a7f1b4cc32fad90c20f4c5eaac2beed78d55ec2721511c53e8a2d41
BLAKE2b-256 checksum
How to use checksums
ac19c8d9fedbe8f3d712eaf10afb372b0e246d6527eba7362676450d72f781fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release history Release notifications | RSS feed

0.6.5

2 release files

This release

0.6.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page