A reference cohort is typically a large sample (e.g. 10,000 persons) of a highly-sensitive cohort (as created using createSensitiveCohort()), reviewed by an LLM (using reviewCases()).

The reference cohort can be used to compute operating characteristics of a cohort definition for the same phenotype using computeCohortOperatingCharacteristics().

uploadReferenceCohort(
  connectionDetails = NULL,
  connection = NULL,
  tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
  referenceCohortDatabaseSchema,
  referenceCohortTableNames,
  referenceCohortDefinitionId,
  createReferenceCohortTables = FALSE,
  reviews
)

Arguments

connectionDetails

An R object of type connectionDetails created using the DatabaseConnector::createConnectionDetails() function. Not required of connection is provided.

connection

The connection to the database server created using DatabaseConnector::connect(). Not required if connectionDetails is provided.

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.

referenceCohortDatabaseSchema

The name of the database schema where the reference cohort will be stored.

referenceCohortTableNames

The table names where the reference cohort and metadata will be stored. Should be created using createReferenceCohortTableNames().

referenceCohortDefinitionId

The cohort definition ID that will be used for the reference cohort.

createReferenceCohortTables

Create the reference cohort and metadata tables? If TRUE and the tables already exists they will first be deleted.

reviews

A data frame containing reviews as generated by reviewCases().

Value

This function does not return a value. It is called for the side effect of uploading the reference cohort to the database.