This function populates all Synthea tables.

LoadSyntheaTables(
  connectionDetails,
  syntheaSchema,
  syntheaFileLoc,
  bulkLoad = FALSE
)

Arguments

connectionDetails

An R object of type
connectionDetails created using the function createConnectionDetails in the DatabaseConnector package.

syntheaSchema

The name of the database schema that will contain the Synthea instance. Requires read and write permissions to this database. On SQL Server, this should specifiy both the database and the schema, so for example 'cdm_instance.dbo'.

syntheaFileLoc

The location of the Synthea csv files created by running the executable run_synthea.

bulkLoad

Boolean flag indicating whether or not to use bulk loading (if possible). Default is FALSE.

Details

This function assumes
createSyntheaTables() has already been run. Additionally, this function assumes the data files used to populate the tables are csv files generated by running the basic setup (creating a database with 1000 people):
git clone https://github.com/synthetichealth/synthea.git
cd synthea
./gradlew build check test
./run_synthea -p 1000

You can enable csv records in src/main/resources/synthea.properties by setting exporter.csv.export = true. As of the time of this writing the csv files can be found at synthea/output/csv. For more details: Synthea Basic Setup