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.5

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.5
File Size Uploaded
clinosim-0.6.5.tar.gz 3.7 MB Details

Built distribution (wheel)

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

Total release size: 6.8 MB

Release files / clinosim-0.6.5.tar.gz

Download URL clinosim-0.6.5.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
973d6af7917805c0404a9648c499a585da2973117d4fe2c030c4580becc54f9a
BLAKE2b-256 checksum
How to use checksums
7c2586eac3eebf8f7a4f785b9539228c46059e7bca1d6996a2a7cdd5486b2b13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

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

Download URL clinosim-0.6.5-py3-none-any.whl
Size 3.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e4fccbeba38a1ed93bd5c1ab3cb1a8e63fe6928760c9005a4c68613ecb5364e7
BLAKE2b-256 checksum
How to use checksums
a898c08caf6e180e5d0324b95d5be519f196441f95944332f34a23deabdf44af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.5 This release

2 release files

0.6.4

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