Skip to content

Getting Started

Roberto Cruz edited this page May 15, 2026 · 2 revisions

Getting Started

This guide walks you through installing Synthea and generating your first synthetic patients.

Prerequisites

  • Python 3.8 or higher
  • UV — fast Python package manager

Installing UV

# macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# Or via pip
pip install uv

Installation

# Clone the repository
git clone https://github.com/TIET-AI/tietai-synthea.git
cd tietai-synthea

# Create virtual environment and install
uv venv
source .venv/bin/activate       # Windows: .venv\Scripts\activate
uv pip install -e .

# Optional: install dev dependencies
uv pip install -e ".[dev]"

# Optional: physics and visualization extras
uv pip install -e ".[physiology,visualization]"

Generate Your First Patients

# Generate 10 patients (no activation needed with uv run)
uv run synthea -p 10

# Generate 100 patients in Massachusetts
uv run synthea -p 100 --state Massachusetts

# Generate with a fixed seed (reproducible output)
uv run synthea -p 50 -s 12345

# Generate only female patients aged 25–40
uv run synthea -p 20 -g F -a 25-40

# Output to a specific directory
uv run synthea -p 100 -o ./output --state California --city "San Francisco"

Output files are written to ./output/ by default. With FHIR export enabled (the default), you will find one JSON bundle per patient under output/fhir/.

Verify the Installation

# List all available disease modules
uv run synthea --list-modules

# Show version
uv run synthea --version

# Run the test suite
uv run pytest -v

What's Generated

Each run produces a structured output directory:

output/
├── fhir/
│   ├── hospitalInformation*.json   # Facility bundle
│   ├── practitionerInformation*.json
│   └── <PatientName>_*.json        # One bundle per patient
├── csv/                            # CSV tables (if enabled)
└── metadata/
    └── simulation.json             # Run statistics

Next Steps

Clone this wiki locally