View source: R/CustomCovariates.R
getDbDuringCovariateData | R Documentation |
Extracts covariates that occur during a cohort
getDbDuringCovariateData(
connection,
oracleTempSchema = NULL,
cdmDatabaseSchema,
cdmVersion = "5",
cohortTable = "#cohort_person",
rowIdField = "subject_id",
aggregated = TRUE,
cohortIds = c(-1),
covariateSettings,
minCharacterizationMean = 0,
tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
...
)
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 |
The user specifies a what during covariates they want and this executes them using FE
A 'FeatureExtraction' covariateData object containing the during covariates based on user settings
Other CovariateSetting:
createDuringCovariateSettings()
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'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.