generateCohort: Generates a cohort

Description Usage Arguments

View source: R/CohortConstruction.R

Description

This function is used by instantiateCohortSet to generate a cohort against the CDM.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
generateCohort(
  cohortId = NULL,
  cohortSet,
  connection = NULL,
  connectionDetails = NULL,
  cdmDatabaseSchema,
  tempEmulationSchema,
  cohortDatabaseSchema,
  cohortTable,
  inclusionStatisticsFolder,
  incremental,
  recordKeepingFile
)

Arguments

cohortId

The cohortId in the list of cohortSet

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.

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.

connectionDetails

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

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.

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

incremental

Create only cohorts that haven't been created before?

recordKeepingFile

If incremental = TRUE, this file will contain information on cohorts already generated


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