Skip to contents

Extract the exposure cohorts from the exposure table. The function creates a new table where the combined exposure cohorts will be stored.

Usage

extractCohorts(
  connectionDetails,
  firstExposureOnly = TRUE,
  exposureTable,
  exposureIds,
  cohortTable = "combined_target",
  resultDatabaseSchema,
  exposureDatabaseSchema = resultDatabaseSchema,
  cdmDatabaseSchema
)

Arguments

connectionDetails

The connection details to the database. Should be an object of type createConnectionDetails.

firstExposureOnly

If a patient appears in more than one exposure cohort, only keep the earliest exposure, censoring at the start of later exposure.

exposureTable

The table where the exposure cohorts are stored.

exposureIds

The cohort definition ids of the exposure cohorts.

cohortTable

The table where the combined exposure cohorts will be stored.

resultDatabaseSchema

The database schema where the table with the combined cohorts will be stored. Needs write permission.

exposureDatabaseSchema

The database schema where table with the exposure cohorts are stored.

cdmDatabaseSchema

The database schema where the cdm database is stored.