Synthea synthetic patient data
The examples in this hand book are based on a synthetic patient dataset that was generated using the synthea patient generator. With this generator, it is possible to generate a patient population and associated health records in FHIR format for a specific group op patients. For this handbook, we generated a dataset that includes mothers and the health records for their pregnancy journey.
Synthea Set Up
Download Java 11 or newer
The synthea patient generator requires Java JDK 11 or newer, which can be downloaded here.Place synthea generator in local directory
Download the synthea jar file and place it in a local directory.Change properties
The synthea generator has many properties, which are described in the common-configuration. Some examples are the FHIR version to export, whether you want to export in bulk format, and which resources to include or exclude in the export. In the same folder where you placed the synthea jar file, also add a file called ‘synthea.properties’. In this file you can add the properties that you want to be different from the standard settings. In this example we canged only two properties:
#change directory where to output the generated patient data
= './data/synthea/'
exporter.baseDirectory #create a json file per resource instead of per patient
= TRUE exported.fhir.bulk_data
Usage
Now the synthea patient generator is ready for use, one can create the desired dataset by adjusting the properties and options. The synthea generator has a number of build in modules that simulate certain conditions, amongst which pregnancy. These modules can be selected by adding the option -m [module name]
, when you run the generator. A list with all modules can be found here.
The standard options for running the patient generator are described here.
To run the synthea generator:
- open a terminal tab and navigate to the folder where the synthea jar file is stored. Alternatively, One can right click this folder and chose ‘open new terminal window with folder’.
- To create a patient dataset for pregancy run the following command:
-jar synthea-with-dependencies.jar -c synthea.properties -p 1000 -g F -m Pregnancy java
where -p 1000 indicates a population of 1000 patients, -g F: that are female, -m: with pregnancy module.
After running the synthea patient generator, the fhir resources can be found in the data/synthea/fhir
folder.