Create cohorts used in a reference set.

createReferenceSetCohorts(
  connectionDetails,
  oracleTempSchema = NULL,
  tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
  cdmDatabaseSchema,
  exposureDatabaseSchema = cdmDatabaseSchema,
  exposureTable = "exposures",
  outcomeDatabaseSchema = cdmDatabaseSchema,
  outcomeTable = "outcomes",
  nestingDatabaseSchema = cdmDatabaseSchema,
  nestingTable = "nesting",
  referenceSet = "ohdsiMethodsBenchmark",
  workFolder
)

Arguments

connectionDetails

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

oracleTempSchema

DEPRECATED: use `tempEmulationSchema` instead.

tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

cdmDatabaseSchema

A database schema containing health care data in the OMOP Commond Data Model. Note that for SQL Server, botth the database and schema should be specified, e.g. 'cdm_schema.dbo'.

exposureDatabaseSchema

The name of the database schema where the exposure cohorts will be created. Only needed if referenceSet = 'ohdsiDevelopment'. Note that for SQL Server, both the database and schema should be specified, e.g. 'cdm_schema.dbo'.

exposureTable

The name of the table that will be created to store the exposure cohorts. Only needed if referenceSet = 'ohdsiDevelopment'.

outcomeDatabaseSchema

The database schema where the target outcome table is located. Note that for SQL Server, both the database and schema should be specified, e.g. 'cdm_schema.dbo'

outcomeTable

The name of the table where the outcomes will be stored.

nestingDatabaseSchema

(For the OHDSI Methods Benchmark and OHDSI Development Set only) The database schema where the nesting outcome table is located. Note that for SQL Server, both the database and schema should be specified, e.g. 'cdm_schema.dbo'.

nestingTable

(For the OHDSI Methods Benchmark and OHDSI Development Set only) The name of the table where the nesting cohorts will be stored.

referenceSet

The name of the reference set for which outcomes need to be created. Currently supported are "omopReferenceSet", "euadrReferenceSet", "ohdsiMethodsBenchmark", and "ohdsiDevelopment".

workFolder

Name of local folder to place intermediary results; make sure to use forward slashes (/). Do not use a folder on a network drive since this greatly impacts performance.

Details

This function will create the outcomes of interest and nesting cohorts referenced in the various reference sets. The outcomes of interest are derives using information like diagnoses, procedures, and drug prescriptions. The outcomes are stored in a table on the database server.

For the 'ohdsiMethodsBenchmark' reference set, the exposures are taken from the drug_era table, and are therefore not generated as separate cohorts, and an exposure cohort table therefore needn't be supplied. For the 'ohdsiDevelopment' reference set, exposure cohorts will be generated.