instantiateCohortSet: Instantiate a set of cohorts

Description Usage Arguments

View source: R/CohortConstruction.R

Description

This function instantiates a set of cohorts in the cohort table and where specified the inclusion rule statistics are computed and stored in the inclusionStatisticsFolder.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
instantiateCohortSet(
  connectionDetails = NULL,
  connection = NULL,
  numThreads = 1,
  cdmDatabaseSchema,
  tempEmulationSchema = NULL,
  cohortDatabaseSchema = cdmDatabaseSchema,
  cohortTable = "cohort",
  cohortSet = NULL,
  inclusionStatisticsFolder = NULL,
  createCohortTable = FALSE,
  incremental = FALSE,
  incrementalFolder = NULL
)

Arguments

connectionDetails

An object of type connectionDetails as created using the createConnectionDetails function in the DatabaseConnector package. Can be left NULL if connection is provided.

connection

An object of type connection as created using the connect function in the DatabaseConnector package. Can be left NULL if connectionDetails is provided, in which case a new connection will be opened at the start of the function, and closed when the function finishes.

numThreads

Specify the number of threads for cohort generation. Currently this only supports single threaded operations.

cdmDatabaseSchema

Schema name where your patient-level data in OMOP CDM format resides. Note that for SQL Server, this should include both the database and schema name, for example 'cdm_data.dbo'.

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.

cohortDatabaseSchema

Schema name where your cohort table resides. Note that for SQL Server, this should include both the database and schema name, for example 'scratch.dbo'.

cohortTable

Name of the cohort table.

cohortSet

The cohortSet argument must be a data frame with the following columns:

cohortId

The unique integer identifier of the cohort

cohortFullName

The cohort's full name

sql

The OHDSI-SQL used to instantiate the cohort

json

The json column must represent a Circe cohort definition. This field is only required when you would like to generate a cohort that includes inclusion statistics since the names of the inclusion rules are parsed from this JSON property.

inclusionStatisticsFolder

The folder where the inclusion rule statistics are stored. Can be left NULL if you do not wish to export the inclusion rule statistics

createCohortTable

Create the cohort table? If incremental = TRUE and the table already exists this will be skipped.

incremental

Create only cohorts that haven't been created before?

incrementalFolder

If incremental = TRUE, specify a folder where records are kept of which definition has been executed.


anthonysena/CohortGenerator documentation built on March 8, 2021, 12:04 a.m.