This repo is a working example of embedding Synthea.
Here's how to reproduce a working embedded application:
- clone this repo (it will land in synthea-tools)
- cd synthea-tools
- clone the synthea repo (it will land in synthea-tools/synthea)
- cd synthea
- ./gradlew build check test
- ./gradelw publishToMavenLocal
- cd ../synthea-file
- mvn clean package
- java -jar .\target\synthea-file-1.0-SNAPSHOT-jar-with-dependencies.jar
- cd ../synthea-json
- mvn clean package
- java -jar .\target\synthea-json-1.0.SNAPSHOT-jar-with-dependencies.jar
- Note: Building synthea and installing it locally ensures you are using the same version/level of java for both synthea and synthea-file, this will likely not be required in the future but works around a reported issue for synthea (synthetichealth/synthea#658)