richardyoung's picture
Upload README.md with huggingface_hub
523e7a8 verified
metadata
license: mit
task_categories:
  - text-generation
  - tabular-classification
  - tabular-regression
language:
  - en
tags:
  - healthcare
  - synthetic-data
  - medical
  - clinical
  - ehr
  - electronic-health-records
  - synthea
  - deepneuro
size_categories:
  - 100K<n<1M

Synthea Synthetic Patient Records (575K Patients)

A comprehensive synthetic healthcare dataset containing 575,415 patients with complete medical histories, generated using Synthea - an open-source synthetic patient generator.

Dataset Curator: Richard Young | DeepNeuro.AI

Dataset Description

This dataset provides realistic but entirely synthetic patient records suitable for:

  • Machine learning model training and evaluation
  • Healthcare analytics research
  • Clinical NLP development
  • Medical AI/ML experimentation
  • Educational purposes

All data is 100% synthetic - no real patient information is included.

Dataset Statistics

Table Records Description
patients 575,415 Core patient demographics
encounters ~93M Healthcare visits/encounters
observations ~470M Clinical observations (vitals, labs)
conditions ~56M Diagnosed conditions
medications ~54M Prescribed medications
procedures ~140M Medical procedures
claims ~30M Insurance claims
claims_transactions ~1.9B Detailed claim transactions
immunizations ~17M Vaccination records
careplans ~6M Care plan records
allergies ~230K Patient allergies
devices ~16M Medical devices
imaging_studies ~32M Imaging study records
supplies ~11M Medical supplies
payers 10 Insurance payers
payer_transitions ~12M Insurance changes
providers ~24K Healthcare providers
organizations ~24K Healthcare organizations

Total Size: 134GB (Parquet), 977GB (CSV source)

Data Processing Pipeline

Generation Process

The dataset was generated using a batched approach to handle the scale:

  • 20 batches of 25,000 patients each
  • 40GB Java heap allocation per batch
  • 32 CPU cores for parallel generation
  • Custom batch merging to preserve CSV headers (avoiding Synthea's append_mode bug)

Compression & Optimization

The raw CSV output (977GB) was converted to Parquet format achieving 86% compression:

Format Size Compression
CSV (raw) 977 GB -
Parquet 134 GB 86% reduction

Conversion method: Memory-efficient streaming using Polars scan_csv() + sink_parquet():

  • Processes files in chunks without loading entire files into memory
  • Handles 30GB+ CSV files without OOM errors
  • Schema overrides for mixed-type columns (claims, procedures, observations)
  • 8 parallel workers for optimal throughput

Data Verification

Data integrity was verified through:

  1. Header Validation: All 19 CSV files confirmed to have correct headers
  2. Row Count Verification: Patient counts validated at each batch merge
  3. Parquet Integrity: All 18 Parquet files successfully written and readable
  4. Foreign Key Validation: Patient IDs verified across related tables
  5. Schema Consistency: Column types verified during Parquet conversion

Data Schema

patients.parquet

  • Id - Unique patient identifier (UUID)
  • BIRTHDATE - Date of birth
  • DEATHDATE - Date of death (if applicable)
  • SSN - Social Security Number (synthetic)
  • DRIVERS - Driver's license number (synthetic)
  • PASSPORT - Passport number (synthetic)
  • PREFIX - Name prefix (Mr., Mrs., etc.)
  • FIRST - First name
  • MIDDLE - Middle name
  • LAST - Last name
  • SUFFIX - Name suffix
  • MAIDEN - Maiden name
  • MARITAL - Marital status
  • RACE - Race
  • ETHNICITY - Ethnicity
  • GENDER - Gender (M/F)
  • BIRTHPLACE - Place of birth
  • ADDRESS - Street address
  • CITY - City
  • STATE - State
  • COUNTY - County
  • FIPS - FIPS code
  • ZIP - ZIP code
  • LAT - Latitude
  • LON - Longitude
  • HEALTHCARE_EXPENSES - Total healthcare expenses
  • HEALTHCARE_COVERAGE - Insurance coverage amount
  • INCOME - Annual income

encounters.parquet

  • Id - Encounter ID
  • START - Start datetime
  • STOP - End datetime
  • PATIENT - Patient ID (FK)
  • ORGANIZATION - Organization ID (FK)
  • PROVIDER - Provider ID (FK)
  • PAYER - Payer ID (FK)
  • ENCOUNTERCLASS - Type (ambulatory, emergency, inpatient, etc.)
  • CODE - SNOMED-CT code
  • DESCRIPTION - Encounter description
  • BASE_ENCOUNTER_COST - Base cost
  • TOTAL_CLAIM_COST - Total claim cost
  • PAYER_COVERAGE - Amount covered by payer
  • REASONCODE - Reason code (SNOMED-CT)
  • REASONDESCRIPTION - Reason description

conditions.parquet

  • START - Condition onset date
  • STOP - Condition resolution date
  • PATIENT - Patient ID (FK)
  • ENCOUNTER - Encounter ID (FK)
  • SYSTEM - Coding system (SNOMED-CT)
  • CODE - Condition code
  • DESCRIPTION - Condition description

medications.parquet

  • START - Prescription start date
  • STOP - Prescription end date
  • PATIENT - Patient ID (FK)
  • PAYER - Payer ID (FK)
  • ENCOUNTER - Encounter ID (FK)
  • CODE - RxNorm code
  • DESCRIPTION - Medication description
  • BASE_COST - Base cost
  • PAYER_COVERAGE - Payer coverage amount
  • DISPENSES - Number of dispenses
  • TOTALCOST - Total cost
  • REASONCODE - Reason code
  • REASONDESCRIPTION - Reason description

observations.parquet

  • DATE - Observation date
  • PATIENT - Patient ID (FK)
  • ENCOUNTER - Encounter ID (FK)
  • CATEGORY - Category (vital-signs, laboratory, etc.)
  • CODE - LOINC code
  • DESCRIPTION - Observation description
  • VALUE - Observation value
  • UNITS - Units of measurement
  • TYPE - Data type

procedures.parquet

  • START - Procedure start datetime
  • STOP - Procedure end datetime
  • PATIENT - Patient ID (FK)
  • ENCOUNTER - Encounter ID (FK)
  • SYSTEM - Coding system (SNOMED-CT)
  • CODE - Procedure code
  • DESCRIPTION - Procedure description
  • BASE_COST - Base cost
  • REASONCODE - Reason code
  • REASONDESCRIPTION - Reason description

Usage

import polars as pl

# Load a single table
patients = pl.read_parquet("hf://datasets/richardyoung/synthea-575k-patients/data/patients.parquet")

# Load and join tables
encounters = pl.read_parquet("hf://datasets/richardyoung/synthea-575k-patients/data/encounters.parquet")
conditions = pl.read_parquet("hf://datasets/richardyoung/synthea-575k-patients/data/conditions.parquet")

# Example: Get all conditions for a patient
patient_conditions = conditions.filter(pl.col("PATIENT") == "some-uuid")
# Using pandas
import pandas as pd

patients = pd.read_parquet("hf://datasets/richardyoung/synthea-575k-patients/data/patients.parquet")
# Using datasets library
from datasets import load_dataset

dataset = load_dataset("richardyoung/synthea-575k-patients", data_files="data/patients.parquet")

Demographics Summary

Based on 575,415 synthetic patients:

  • Gender Distribution: ~50% Female, ~50% Male
  • Race Distribution: ~83% White, ~8% Black, ~6% Asian, ~3% Other
  • Ethnicity: ~90% Non-Hispanic, ~10% Hispanic
  • Age Range: 0-111 years
  • Geographic Coverage: Massachusetts, USA

Generation Details

  • Generator: Synthea v3.x
  • Generation Date: November 2025
  • Configuration: Full clinical documentation enabled
  • Modules: 89 disease modules, 157 submodules
  • Seed Range: 3000-22000 (20 batches of 25K patients)
  • Hardware: 62GB RAM, 32 CPU cores, 40GB Java heap

Limitations

  1. Synthetic Data: All records are computationally generated and may not perfectly reflect real-world distributions
  2. Geographic Bias: Patients are generated for Massachusetts only
  3. Temporal Coverage: Records span multiple decades but follow Synthea's simulation model
  4. Clinical Realism: While based on medical literature, some edge cases may not be realistic

Citation

If you use this dataset, please cite both the dataset and Synthea:

@misc{young2025synthea575k,
  title={Synthea Synthetic Patient Records (575K Patients)},
  author={Young, Richard},
  year={2025},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/datasets/richardyoung/synthea-575k-patients}},
  note={Generated using Synthea. Curated by DeepNeuro.AI}
}

@article{walonoski2018synthea,
  title={Synthea: An approach, method, and software mechanism for generating synthetic patients and the synthetic electronic health care record},
  author={Walonoski, Jason and Kramer, Mark and Nichols, Joseph and Quina, Andre and Moesel, Chris and Hall, Dylan and Duffett, Carlton and Dube, Kudakwashe and Gallagher, Thomas and McLachlan, Scott},
  journal={Journal of the American Medical Informatics Association},
  volume={25},
  number={3},
  pages={230--238},
  year={2018},
  publisher={Oxford University Press},
  doi={10.1093/jamia/ocx079}
}

License

This dataset is released under the MIT License, consistent with Synthea's licensing.

Acknowledgments

Contact

For questions or issues with this dataset, please contact: