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 19-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 profiles on all 21 FHIR resource types that have one in JP output, JLAC10 / MHLW YJ codes, JP names / addresses / insurance out of the box.
  • YAML-driven extension — 36 inpatient diseases + 52 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 (39 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.7.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.7.4
File Size Uploaded Provenance Actions
clinosim-0.7.4.tar.gz 6.1 MB With provenance Details for clinosim-0.7.4.tar.gz

Built distribution (wheel)

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

Total release size: 10.9 MB

Release files / clinosim-0.7.4.tar.gz

Download URL clinosim-0.7.4.tar.gz
Size 6.1 MB
Tags Source
SHA-256 checksum
How to use checksums
47df4090393e04ceda28b82d644a8c6410131c890d2e7f67693b6c4c24d3fb6e
BLAKE2b-256 checksum
How to use checksums
793378a28d82b18a6a7bbe35e12e317eaacb253d5e624d1f6d3a6db8a41889ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

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

Download URL clinosim-0.7.4-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a19317e0b8cc14c7410a3796da491d275be9a9dc0358d2ec8190bfe1d476fb60
BLAKE2b-256 checksum
How to use checksums
b47cf2021a48ad559aa85d23acff59d3ba8e40697e74293d75a3c9ed1563de21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Security for clinosim 0.7.4

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for clinosim-0.7.4.tar.gz

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 Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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