This function creates tables ALL_VISITS, ASSIGN_ALL_VISIT_IDS, and FINAL_VISIT_IDS.

CreateVisitRollupTables(
  connectionDetails,
  cdmSchema,
  syntheaSchema,
  cdmVersion,
  sqlOnly = FALSE
)

Arguments

connectionDetails

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

cdmSchema

The name of the database schema that will contain the different VISIT tables. 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'.

syntheaSchema

The name of the database schema that 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 'synthea_instance.dbo'.

cdmVersion

The version of your CDM. Currently "5.3" and "5.4" are supported.

sqlOnly

A boolean that determines whether or not to perform the load or generate SQL scripts. Default is FALSE.

Details

This function assumes
createCDMTables(),
createSyntheaTables(),
LoadSyntheaTables(), have all been run and the Vocabulary has been loaded.