Synthetic patient journey datasets for longitudinal analysis
Project description
tanat-synthea
Synthetic patient journey datasets for longitudinal analysis.
Built on Synthea and designed for use with TanaT and FedBioMed. Supports US, French, and UK cohorts out of the box.
Freely reproducible. No registration, no data access agreement.
Installation
pip install tanat-synthea
Single site
from tanat_synthea import PatientJourney
pj = PatientJourney(
"data/single_site/",
name="CHU de Lyon",
country_code="fr",
state="Auvergne-Rhone-Alpes",
population=100,
seed=42,
age_range="20-80",
)
pj.generate()
# Demographics (one row per patient)
pj.static_data()
# Clinical records (one row per record)
pj.temporal_data(record_types=["encounter", "condition"])
# Raw reference file
pj.load_file("organizations.csv")
Data is generated automatically on first access if it does not exist yet.
Multi-center (federated)
Quickstart - build on demo preset:
from tanat_synthea import FedPatientJourney
# Preset: 3 centers (US / FR / GB), 50 patients each
fpj = FedPatientJourney.demo()
fpj.generate() # trigger Synthea for all centers
# Per-center access: isolated FL node
for pj in fpj.iter_centers():
local = pj.temporal_data(record_types=["encounter", "condition"])
Configure each center manually:
fpj = FedPatientJourney([
# Center 0
PatientJourney("data/center_0/", name="CHU de Lyon",
country_code="fr", state="Auvergne-Rhone-Alpes",
population=100, seed=42, age_range="20-80"),
# Center 1
PatientJourney("data/center_1/", name="St Thomas' London",
country_code="gb", state="Greater London",
population=100, seed=123, age_range="40-85"),
# Center 2
PatientJourney("data/center_2/", name="Mass General",
country_code="us", state="Massachusetts",
population=100, seed=777, age_range="20-60"),
])
Or drive the federation from a YAML config:
fpj = FedPatientJourney.from_yaml("configs/demo.yaml")
CLI
# Generate all centers defined in a config file
tanat-synthea --config configs/demo.yaml
# Single center only
tanat-synthea --config configs/demo.yaml --center 0
# Preview Synthea commands without running them
tanat-synthea --config configs/demo.yaml --dry-run
The Synthea JAR (~190 MB) is downloaded automatically on first run if missing.
See configs/demo.yaml for full documentation of available options.
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tanat_synthea-0.1.0.tar.gz.
File metadata
- Download URL: tanat_synthea-0.1.0.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c30dcfdd75c94da2a05761800c44e2bc3bcc224cc8f3edaa0bb1dd8f5dcb1842
|
|
| MD5 |
220da0f69f2c5188e912a36136f12be7
|
|
| BLAKE2b-256 |
14c9f9e64f4c0196ba6691a6a64a257f3d54c862b629ff4708a7d84053cce3a2
|
File details
Details for the file tanat_synthea-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tanat_synthea-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e24a3194de8fe5b6f73188dba1f69387d1a5fe1587e488316bec66c8c835706
|
|
| MD5 |
8768490255b90d4cf6b3d983d52ee49a
|
|
| BLAKE2b-256 |
48257f5371424d1483fc6811689e9362469caceeb8a8ef70e38e4b100d502ea0
|