getDbDuringCovariateData: Extracts covariates that occur during a cohort

View source: R/CustomCovariates.R

getDbDuringCovariateDataR Documentation

Extracts covariates that occur during a cohort

Description

Extracts covariates that occur during a cohort

Usage

getDbDuringCovariateData(
  connection,
  oracleTempSchema = NULL,
  cdmDatabaseSchema,
  cdmVersion = "5",
  cohortTable = "#cohort_person",
  rowIdField = "subject_id",
  aggregated = TRUE,
  cohortIds = c(-1),
  covariateSettings,
  minCharacterizationMean = 0,
  tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
  ...
)

Arguments

connection

The database connection

oracleTempSchema

The temp schema if using oracle

cdmDatabaseSchema

The schema of the OMOP CDM data

cdmVersion

version of the OMOP CDM data

cohortTable

the table name that contains the target population cohort

rowIdField

string representing the unique identifier in the target population cohort

aggregated

whether the covariate should be aggregated

cohortIds

cohort id for the target cohort

covariateSettings

settings for the covariate cohorts and time periods

minCharacterizationMean

the minimum value for a covariate to be extracted

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

...

additional arguments from FeatureExtraction

Details

The user specifies a what during covariates they want and this executes them using FE

Value

A 'FeatureExtraction' covariateData object containing the during covariates based on user settings

See Also

Other CovariateSetting: createDuringCovariateSettings()

Examples


conDet <- exampleOmopConnectionDetails()
connection <- DatabaseConnector::connect(conDet)

settings <- createDuringCovariateSettings(
  useConditionOccurrenceDuring = TRUE,
  useConditionOccurrencePrimaryInpatientDuring = FALSE,
  useConditionEraDuring = FALSE,
  useConditionGroupEraDuring = FALSE
)

duringData <- getDbDuringCovariateData(
  connection <- connection,
  cdmDatabaseSchema = 'main',
  cohortIds = 1,
  covariateSettings = settings,
  cohortTable = 'cohort'
)


Characterization documentation built on April 4, 2025, 2:02 a.m.