Synthea Documentation

repository·master·Indexed 25 days ago

https://github.com/synthetichealth/synthea

Synthea is a Synthetic Patient Population Simulator that generates realistic, non-real patient data and health records in formats including HL7 FHIR, C-CDA, and CSV. The documentation covers installation via Java JDK 17+, patient generation using the run_synthea script, physiology model simulations via Gradle, and configuration of exporters and properties.

Tokens
1.7K
Snippets
9
Records
18
Agent score
85%

What's inside Synthea

  1. Install and build Synthea from source

    master

    To build Synthea locally, ensure you have Java JDK 17 or newer installed (LTS versions 17 or 25 are recommended). Clone the repository and use the Gradle wrapper to build and run the test suite.

    git clone https://github.com/synthetichealth/synthea.git
    cd synthea
    ./gradlew build check test
  2. Execute a single Synthea physiology model simulation

    master

    You can run a single execution of a Synthea physiology model using the Gradle command line interface. This allows you to manipulate the differential equation solver, step size, simulation duration, and output chart configurations.

    Note: This process is distinct from the normal Synthea patient generation execution procedure and is specifically used for the physiology Gradle command.

    ./gradlew physiology --args="config/simulations/[config name].yml"
  3. Configure Synthea exporters and properties

    master
    Synthea's default behavior is to output HL7 FHIR records. Other formats like C-CDA, CPCDS, CSV, and Bulk FHIR (ndjson) are disabled by default. To activate them, modify the src/main/resources/synthea.properties file or pass configuration overrides via the command line using the --config*=value pattern.
  4. Run Synthea via CLI

    master

    Synthea can be executed from the command line to generate synthetic patient data. The basic usage pattern is run_synthea [options] [state [city]]. You can specify a geographic location (state and optionally city) to influence the generation process.

    Precedence Rule: When using both a configuration file (-c) and command-line overrides (--config*=value), the last one specified wins. For example, if you provide a config file and then a command-line property, the command-line property takes precedence.

    run_synthea Massachusetts
    run_synthea Alaska Juneau
    run_synthea -p 1000
  5. List Synthea concepts and attributes

    master

    Use Gradle tasks to extract the underlying data definitions used by the simulator: concepts for the list of medical concepts used in records, and attributes for the variables present on each patient.

    ./gradlew concepts
    ./gradlew attributes
  6. Set a single field on a FHIR resource using setField()

    master

    The static setField method is a convenience helper for applying a single value to a specific FHIRPath on an existing resource instance.

    Parameters:

    • resource: The FHIR resource instance to modify.
    • fieldPath: The FHIRPath string representing the target field.
    • value: The object value to set at that path.
    public static <T extends Resource> void setField(T resource, String fieldPath, Object value)