createCohorts: Generate cohort

Description Usage Arguments Details Value

View source: R/createCohorts.r

Description

Generate cohort

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
createCohorts(
  connection,
  cdmDatabaseSchema,
  oracleTempSchema = NULL,
  vocabularyDatabaseSchema = cdmDatabaseSchema,
  cohortDatabaseSchema,
  targetCohortTable,
  createTargetCohortTable = TRUE,
  conditionConceptIds,
  measurementConceptId,
  observationWindowBefore,
  observationWindowAfter,
  drugWindow,
  targetCohortId
)

Arguments

connection

Connection to the database. An object of class connect as created by the connect function in the DatabaseConnector package.

cdmDatabaseSchema

A schema where OMOP CDM data are stored.

oracleTempSchema

A schema that can be used to create temp tables in when using Oracle.

vocabularyDatabaseSchema

A schema where vocabulary is stored

cohortDatabaseSchema

A schema where the cohort is stored

targetCohortTable

A string corresponds to the name of cohort table

createTargetCohortTable

A boolean that indicates whether the targetCohortTable will be created. Default TRUE.

conditionConceptIds

A list of condition concept IDs that correspond to the disease of interest.

measurementConceptId

A numeric of measurement concept ID

observationWindowBefore

An integer indicates the number of pre-treatment days used to look for pre-treatment measurement.

observationWindowAfter

An integer indicates the number of post-treatment days used to look for post-treatment measurement.

drugWindow

An integer indicates the number of post-treatment days during which drug exposure are also considered. Default is 0

targetCohortId

An integer of the cohort ID.

Details

This function generates cohort for the medical deconfounder (single outcome)

Value

Returns a string containing the rendered SQL.


zhangly811/MvDeconfounder documentation built on Jan. 21, 2021, 12:11 p.m.