Create covariate settings
createCovariateSettings(
useDemographicsGender = FALSE,
useDemographicsAge = FALSE,
useDemographicsAgeGroup = FALSE,
useDemographicsRace = FALSE,
useDemographicsEthnicity = FALSE,
useDemographicsIndexYear = FALSE,
useDemographicsIndexMonth = FALSE,
useDemographicsPriorObservationTime = FALSE,
useDemographicsPostObservationTime = FALSE,
useDemographicsTimeInCohort = FALSE,
useDemographicsIndexYearMonth = FALSE,
useCareSiteId = FALSE,
useConditionOccurrenceAnyTimePrior = FALSE,
useConditionOccurrenceLongTerm = FALSE,
useConditionOccurrenceMediumTerm = FALSE,
useConditionOccurrenceShortTerm = FALSE,
useConditionOccurrencePrimaryInpatientAnyTimePrior = FALSE,
useConditionOccurrencePrimaryInpatientLongTerm = FALSE,
useConditionOccurrencePrimaryInpatientMediumTerm = FALSE,
useConditionOccurrencePrimaryInpatientShortTerm = FALSE,
useConditionEraAnyTimePrior = FALSE,
useConditionEraLongTerm = FALSE,
useConditionEraMediumTerm = FALSE,
useConditionEraShortTerm = FALSE,
useConditionEraOverlapping = FALSE,
useConditionEraStartLongTerm = FALSE,
useConditionEraStartMediumTerm = FALSE,
useConditionEraStartShortTerm = FALSE,
useConditionGroupEraAnyTimePrior = FALSE,
useConditionGroupEraLongTerm = FALSE,
useConditionGroupEraMediumTerm = FALSE,
useConditionGroupEraShortTerm = FALSE,
useConditionGroupEraOverlapping = FALSE,
useConditionGroupEraStartLongTerm = FALSE,
useConditionGroupEraStartMediumTerm = FALSE,
useConditionGroupEraStartShortTerm = FALSE,
useDrugExposureAnyTimePrior = FALSE,
useDrugExposureLongTerm = FALSE,
useDrugExposureMediumTerm = FALSE,
useDrugExposureShortTerm = FALSE,
useDrugEraAnyTimePrior = FALSE,
useDrugEraLongTerm = FALSE,
useDrugEraMediumTerm = FALSE,
useDrugEraShortTerm = FALSE,
useDrugEraOverlapping = FALSE,
useDrugEraStartLongTerm = FALSE,
useDrugEraStartMediumTerm = FALSE,
useDrugEraStartShortTerm = FALSE,
useDrugGroupEraAnyTimePrior = FALSE,
useDrugGroupEraLongTerm = FALSE,
useDrugGroupEraMediumTerm = FALSE,
useDrugGroupEraShortTerm = FALSE,
useDrugGroupEraOverlapping = FALSE,
useDrugGroupEraStartLongTerm = FALSE,
useDrugGroupEraStartMediumTerm = FALSE,
useDrugGroupEraStartShortTerm = FALSE,
useProcedureOccurrenceAnyTimePrior = FALSE,
useProcedureOccurrenceLongTerm = FALSE,
useProcedureOccurrenceMediumTerm = FALSE,
useProcedureOccurrenceShortTerm = FALSE,
useDeviceExposureAnyTimePrior = FALSE,
useDeviceExposureLongTerm = FALSE,
useDeviceExposureMediumTerm = FALSE,
useDeviceExposureShortTerm = FALSE,
useMeasurementAnyTimePrior = FALSE,
useMeasurementLongTerm = FALSE,
useMeasurementMediumTerm = FALSE,
useMeasurementShortTerm = FALSE,
useMeasurementValueAnyTimePrior = FALSE,
useMeasurementValueLongTerm = FALSE,
useMeasurementValueMediumTerm = FALSE,
useMeasurementValueShortTerm = FALSE,
useMeasurementRangeGroupAnyTimePrior = FALSE,
useMeasurementRangeGroupLongTerm = FALSE,
useMeasurementRangeGroupMediumTerm = FALSE,
useMeasurementRangeGroupShortTerm = FALSE,
useMeasurementValueAsConceptAnyTimePrior = FALSE,
useMeasurementValueAsConceptLongTerm = FALSE,
useMeasurementValueAsConceptMediumTerm = FALSE,
useMeasurementValueAsConceptShortTerm = FALSE,
useObservationAnyTimePrior = FALSE,
useObservationLongTerm = FALSE,
useObservationMediumTerm = FALSE,
useObservationShortTerm = FALSE,
useObservationValueAsConceptAnyTimePrior = FALSE,
useObservationValueAsConceptLongTerm = FALSE,
useObservationValueAsConceptMediumTerm = FALSE,
useObservationValueAsConceptShortTerm = FALSE,
useCharlsonIndex = FALSE,
useDcsi = FALSE,
useChads2 = FALSE,
useChads2Vasc = FALSE,
useHfrs = FALSE,
useDistinctConditionCountLongTerm = FALSE,
useDistinctConditionCountMediumTerm = FALSE,
useDistinctConditionCountShortTerm = FALSE,
useDistinctIngredientCountLongTerm = FALSE,
useDistinctIngredientCountMediumTerm = FALSE,
useDistinctIngredientCountShortTerm = FALSE,
useDistinctProcedureCountLongTerm = FALSE,
useDistinctProcedureCountMediumTerm = FALSE,
useDistinctProcedureCountShortTerm = FALSE,
useDistinctMeasurementCountLongTerm = FALSE,
useDistinctMeasurementCountMediumTerm = FALSE,
useDistinctMeasurementCountShortTerm = FALSE,
useDistinctObservationCountLongTerm = FALSE,
useDistinctObservationCountMediumTerm = FALSE,
useDistinctObservationCountShortTerm = FALSE,
useVisitCountLongTerm = FALSE,
useVisitCountMediumTerm = FALSE,
useVisitCountShortTerm = FALSE,
useVisitConceptCountLongTerm = FALSE,
useVisitConceptCountMediumTerm = FALSE,
useVisitConceptCountShortTerm = FALSE,
longTermStartDays = -365,
mediumTermStartDays = -180,
shortTermStartDays = -30,
endDays = 0,
includedCovariateConceptIds = c(),
addDescendantsToInclude = FALSE,
excludedCovariateConceptIds = c(),
addDescendantsToExclude = FALSE,
includedCovariateIds = c()
)
Gender of the subject. (analysis ID 1)
Age of the subject on the index date (in years). (analysis ID 2)
Age of the subject on the index date (in 5 year age groups) (analysis ID 3)
Race of the subject. (analysis ID 4)
Ethnicity of the subject. (analysis ID 5)
Year of the index date. (analysis ID 6)
Month of the index date. (analysis ID 7)
Number of continuous days of observation time preceding the index date. (analysis ID 8)
Number of continuous days of observation time following the index date. (analysis ID 9)
Number of days of observation time during cohort period. (analysis ID 10)
Both calendar year and month of the index date in a single variable. (analysis ID 11)
Care site associated with the cohort start, pulled from the visit_detail, visit_occurrence, or person table, in that order. (analysis ID 12)
One covariate per condition in the condition_occurrence table starting any time prior to index. (analysis ID 101)
One covariate per condition in the condition_occurrence table starting in the long term window. (analysis ID 102)
One covariate per condition in the condition_occurrence table starting in the medium term window. (analysis ID 103)
One covariate per condition in the condition_occurrence table starting in the short term window. (analysis ID 104)
One covariate per condition observed as a primary diagnosis in an inpatient setting in the condition_occurrence table starting any time prior to index. (analysis ID 105)
One covariate per condition observed as a primary diagnosis in an inpatient setting in the condition_occurrence table starting in the long term window. (analysis ID 106)
One covariate per condition observed as a primary diagnosis in an inpatient setting in the condition_occurrence table starting in the medium term window. (analysis ID 107)
One covariate per condition observed as a primary diagnosis in an inpatient setting in the condition_occurrence table starting in the short term window. (analysis ID 108)
One covariate per condition in the condition_era table overlapping with any time prior to index. (analysis ID 201)
One covariate per condition in the condition_era table overlapping with any part of the long term window. (analysis ID 202)
One covariate per condition in the condition_era table overlapping with any part of the medium term window. (analysis ID 203)
One covariate per condition in the condition_era table overlapping with any part of the short term window. (analysis ID 204)
One covariate per condition in the condition_era table overlapping with the end of the risk window. (analysis ID 205)
One covariate per condition in the condition_era table starting in the long term window. (analysis ID 206)
One covariate per condition in the condition_era table starting in the medium term window. (analysis ID 207)
One covariate per condition in the condition_era table starting in the short term window. (analysis ID 208)
One covariate per condition era rolled up to groups in the condition_era table overlapping with any time prior to index. (analysis ID 209)
One covariate per condition era rolled up to groups in the condition_era table overlapping with any part of the long term window. (analysis ID 210)
One covariate per condition era rolled up to groups in the condition_era table overlapping with any part of the medium term window. (analysis ID 211)
One covariate per condition era rolled up to groups in the condition_era table overlapping with any part of the short term window. (analysis ID 212)
One covariate per condition era rolled up to groups in the condition_era table overlapping with the end of the risk window. (analysis ID 213)
One covariate per condition era rolled up to groups in the condition_era table starting in the long term window. (analysis ID 214)
One covariate per condition era rolled up to groups in the condition_era table starting in the medium term window. (analysis ID 215)
One covariate per condition era rolled up to groups in the condition_era table starting in the short term window. (analysis ID 216)
One covariate per drug in the drug_exposure table starting any time prior to index. (analysis ID 301)
One covariate per drug in the drug_exposure table starting in the long term window. (analysis ID 302)
One covariate per drug in the drug_exposure table starting in the medium term window. (analysis ID 303)
One covariate per drug in the drug_exposure table starting in the short term window. (analysis ID 304)
One covariate per drug in the drug_era table overlapping with any time prior to index. (analysis ID 401)
One covariate per drug in the drug_era table overlapping with any part of the long term window. (analysis ID 402)
One covariate per drug in the drug_era table overlapping with any part of the medium term window. (analysis ID 403)
One covariate per drug in the drug_era table overlapping with any part of the short term window. (analysis ID 404)
One covariate per drug in the drug_era table overlapping with the end of the risk window. (analysis ID 405)
One covariate per drug in the drug_era table starting in the long term window. (analysis ID 406)
One covariate per drug in the drug_era table starting in the medium term window. (analysis ID 407)
One covariate per drug in the drug_era table starting in the short term window. (analysis ID 408)
One covariate per drug rolled up to ATC groups in the drug_era table overlapping with any time prior to index. (analysis ID 409)
One covariate per drug rolled up to ATC groups in the drug_era table overlapping with any part of the long term window. (analysis ID 410)
One covariate per drug rolled up to ATC groups in the drug_era table overlapping with any part of the medium term window. (analysis ID 411)
One covariate per drug rolled up to ATC groups in the drug_era table overlapping with any part of the short term window. (analysis ID 412)
One covariate per drug rolled up to ATC groups in the drug_era table overlapping with the end of the risk window. (analysis ID 413)
One covariate per drug rolled up to ATC groups in the drug_era table starting in the long term window. (analysis ID 414)
One covariate per drug rolled up to ATC groups in the drug_era table starting in the medium term window. (analysis ID 415)
One covariate per drug rolled up to ATC groups in the drug_era table starting in the short term window. (analysis ID 416)
One covariate per procedure in the procedure_occurrence table any time prior to index. (analysis ID 501)
One covariate per procedure in the procedure_occurrence table in the long term window. (analysis ID 502)
One covariate per procedure in the procedure_occurrence table in the medium term window. (analysis ID 503)
One covariate per procedure in the procedure_occurrence table in the short term window. (analysis ID 504)
One covariate per device in the device exposure table starting any time prior to index. (analysis ID 601)
One covariate per device in the device exposure table starting in the long term window. (analysis ID 602)
One covariate per device in the device exposure table starting in the medium term window. (analysis ID 603)
One covariate per device in the device exposure table starting in the short term window. (analysis ID 604)
One covariate per measurement in the measurement table any time prior to index. (analysis ID 701)
One covariate per measurement in the measurement table in the long term window. (analysis ID 702)
One covariate per measurement in the measurement table in the medium term window. (analysis ID 703)
One covariate per measurement in the measurement table in the short term window. (analysis ID 704)
One covariate containing the value per measurement-unit combination any time prior to index. (analysis ID 705)
One covariate containing the value per measurement-unit combination in the long term window. (analysis ID 706)
One covariate containing the value per measurement-unit combination in the medium term window. (analysis ID 707)
One covariate containing the value per measurement-unit combination in the short term window. (analysis ID 708)
Covariates indicating whether measurements are below, within, or above normal range any time prior to index. (analysis ID 709)
Covariates indicating whether measurements are below, within, or above normal range in the long term window. (analysis ID 710)
Covariates indicating whether measurements are below, within, or above normal range in the medium term window. (analysis ID 711)
Covariates indicating whether measurements are below, within, or above normal range in the short term window. (analysis ID 712)
One covariate per measurement-value concept combination any time prior to index. (analysis ID 713)
One covariate per measurement-value concept combination in the long term window. (analysis ID 714)
One covariate per measurement-value concept combination in the medium term window. (analysis ID 715)
One covariate per measurement-value concept combination in the short term window. (analysis ID 716)
One covariate per observation in the observation table any time prior to index. (analysis ID 801)
One covariate per observation in the observation table in the long term window. (analysis ID 802)
One covariate per observation in the observation table in the medium term window. (analysis ID 803)
One covariate per observation in the observation table in the short term window. (analysis ID 804)
One covariate per observation-value concept combination any time prior to index. (analysis ID 805)
One covariate per observation-value concept combination in the long term window. (analysis ID 806)
One covariate per observation-value concept combination in the medium term window. (analysis ID 807)
One covariate per observation-value concept combination in the short term window. (analysis ID 808)
The Charlson comorbidity index (Romano adaptation) using all conditions prior to the window end. (analysis ID 901)
The Diabetes Comorbidity Severity Index (DCSI) using all conditions prior to the window end. (analysis ID 902)
The CHADS2 score using all conditions prior to the window end. (analysis ID 903)
The CHADS2VASc score using all conditions prior to the window end. (analysis ID 904)
The Hospital Frailty Risk Score score using all conditions prior to the window end. (analysis ID 926)
The number of distinct condition concepts observed in the long term window. (analysis ID 905)
The number of distinct condition concepts observed in the medium term window. (analysis ID 906)
The number of distinct condition concepts observed in the short term window. (analysis ID 907)
The number of distinct ingredients observed in the long term window. (analysis ID 908)
The number of distinct ingredients observed in the medium term window. (analysis ID 909)
The number of distinct ingredients observed in the short term window. (analysis ID 910)
The number of distinct procedures observed in the long term window. (analysis ID 911)
The number of distinct procedures observed in the medium term window. (analysis ID 912)
The number of distinct procedures observed in the short term window. (analysis ID 913)
The number of distinct measurements observed in the long term window. (analysis ID 914)
The number of distinct measurements observed in the medium term window. (analysis ID 915)
The number of distinct measurements observed in the short term window. (analysis ID 916)
The number of distinct observations observed in the long term window. (analysis ID 917)
The number of distinct observations observed in the medium term window. (analysis ID 918)
The number of distinct observations observed in the short term window. (analysis ID 919)
The number of visits observed in the long term window. (analysis ID 920)
The number of visits observed in the medium term window. (analysis ID 921)
The number of visits observed in the short term window. (analysis ID 922)
The number of visits observed in the long term window, stratified by visit concept ID. (analysis ID 923)
The number of visits observed in the medium term window, stratified by visit concept ID. (analysis ID 924)
The number of visits observed in the short term window, stratified by visit concept ID. (analysis ID 925)
What is the start day (relative to the index date) of the long-term window?
What is the start day (relative to the index date) of the medium-term window?
What is the start day (relative to the index date) of the short-term window?
What is the end day (relative to the index date) of the window?
A list of concept IDs that should be used to construct covariates.
Should descendant concept IDs be added to the list of concepts to include?
A list of concept IDs that should NOT be used to construct covariates.
Should descendant concept IDs be added to the list of concepts to exclude?
A list of covariate IDs that should be restricted to.
An object of type covariateSettings
, to be used in other functions.
creates an object specifying how covariates should be constructed from data in the CDM model.
settings <- createCovariateSettings(
useDemographicsGender = TRUE,
useDemographicsAge = FALSE,
useDemographicsAgeGroup = TRUE,
useDemographicsRace = TRUE,
useDemographicsEthnicity = TRUE,
useDemographicsIndexYear = TRUE,
useDemographicsIndexMonth = TRUE,
useDemographicsPriorObservationTime = FALSE,
useDemographicsPostObservationTime = FALSE,
useDemographicsTimeInCohort = FALSE,
useDemographicsIndexYearMonth = FALSE,
useCareSiteId = FALSE,
useConditionOccurrenceAnyTimePrior = FALSE,
useConditionOccurrenceLongTerm = FALSE,
useConditionOccurrenceMediumTerm = FALSE,
useConditionOccurrenceShortTerm = FALSE,
useConditionOccurrencePrimaryInpatientAnyTimePrior = FALSE,
useConditionOccurrencePrimaryInpatientLongTerm = FALSE,
useConditionOccurrencePrimaryInpatientMediumTerm = FALSE,
useConditionOccurrencePrimaryInpatientShortTerm = FALSE,
useConditionEraAnyTimePrior = FALSE,
useConditionEraLongTerm = FALSE,
useConditionEraMediumTerm = FALSE,
useConditionEraShortTerm = FALSE,
useConditionEraOverlapping = FALSE,
useConditionEraStartLongTerm = FALSE,
useConditionEraStartMediumTerm = FALSE,
useConditionEraStartShortTerm = FALSE,
useConditionGroupEraAnyTimePrior = FALSE,
useConditionGroupEraLongTerm = TRUE,
useConditionGroupEraMediumTerm = FALSE,
useConditionGroupEraShortTerm = TRUE,
useConditionGroupEraOverlapping = FALSE,
useConditionGroupEraStartLongTerm = FALSE,
useConditionGroupEraStartMediumTerm = FALSE,
useConditionGroupEraStartShortTerm = FALSE,
useDrugExposureAnyTimePrior = FALSE,
useDrugExposureLongTerm = FALSE,
useDrugExposureMediumTerm = FALSE,
useDrugExposureShortTerm = FALSE,
useDrugEraAnyTimePrior = FALSE,
useDrugEraLongTerm = FALSE,
useDrugEraMediumTerm = FALSE,
useDrugEraShortTerm = FALSE,
useDrugEraOverlapping = FALSE,
useDrugEraStartLongTerm = FALSE,
useDrugEraStartMediumTerm = FALSE,
useDrugEraStartShortTerm = FALSE,
useDrugGroupEraAnyTimePrior = FALSE,
useDrugGroupEraLongTerm = TRUE,
useDrugGroupEraMediumTerm = FALSE,
useDrugGroupEraShortTerm = TRUE,
useDrugGroupEraOverlapping = TRUE,
useDrugGroupEraStartLongTerm = FALSE,
useDrugGroupEraStartMediumTerm = FALSE,
useDrugGroupEraStartShortTerm = FALSE,
useProcedureOccurrenceAnyTimePrior = FALSE,
useProcedureOccurrenceLongTerm = TRUE,
useProcedureOccurrenceMediumTerm = FALSE,
useProcedureOccurrenceShortTerm = TRUE,
useDeviceExposureAnyTimePrior = FALSE,
useDeviceExposureLongTerm = TRUE,
useDeviceExposureMediumTerm = FALSE,
useDeviceExposureShortTerm = TRUE,
useMeasurementAnyTimePrior = FALSE,
useMeasurementLongTerm = TRUE,
useMeasurementMediumTerm = FALSE,
useMeasurementShortTerm = TRUE,
useMeasurementValueAnyTimePrior = FALSE,
useMeasurementValueLongTerm = FALSE,
useMeasurementValueMediumTerm = FALSE,
useMeasurementValueShortTerm = FALSE,
useMeasurementRangeGroupAnyTimePrior = FALSE,
useMeasurementRangeGroupLongTerm = TRUE,
useMeasurementRangeGroupMediumTerm = FALSE,
useMeasurementRangeGroupShortTerm = TRUE,
useMeasurementValueAsConceptAnyTimePrior = FALSE,
useMeasurementValueAsConceptLongTerm = TRUE,
useMeasurementValueAsConceptMediumTerm = FALSE,
useMeasurementValueAsConceptShortTerm = TRUE,
useObservationAnyTimePrior = FALSE,
useObservationLongTerm = TRUE,
useObservationMediumTerm = FALSE,
useObservationShortTerm = TRUE,
useObservationValueAsConceptAnyTimePrior = FALSE,
useObservationValueAsConceptLongTerm = TRUE,
useObservationValueAsConceptMediumTerm = FALSE,
useObservationValueAsConceptShortTerm = TRUE,
useCharlsonIndex = TRUE,
useDcsi = TRUE,
useChads2 = TRUE,
useChads2Vasc = TRUE,
useHfrs = FALSE,
useDistinctConditionCountLongTerm = FALSE,
useDistinctConditionCountMediumTerm = FALSE,
useDistinctConditionCountShortTerm = FALSE,
useDistinctIngredientCountLongTerm = FALSE,
useDistinctIngredientCountMediumTerm = FALSE,
useDistinctIngredientCountShortTerm = FALSE,
useDistinctProcedureCountLongTerm = FALSE,
useDistinctProcedureCountMediumTerm = FALSE,
useDistinctProcedureCountShortTerm = FALSE,
useDistinctMeasurementCountLongTerm = FALSE,
useDistinctMeasurementCountMediumTerm = FALSE,
useDistinctMeasurementCountShortTerm = FALSE,
useDistinctObservationCountLongTerm = FALSE,
useDistinctObservationCountMediumTerm = FALSE,
useDistinctObservationCountShortTerm = FALSE,
useVisitCountLongTerm = FALSE,
useVisitCountMediumTerm = FALSE,
useVisitCountShortTerm = FALSE,
useVisitConceptCountLongTerm = FALSE,
useVisitConceptCountMediumTerm = FALSE,
useVisitConceptCountShortTerm = FALSE,
longTermStartDays = -365,
mediumTermStartDays = -180,
shortTermStartDays = -30,
endDays = 0,
includedCovariateConceptIds = c(),
addDescendantsToInclude = FALSE,
excludedCovariateConceptIds = c(),
addDescendantsToExclude = FALSE,
includedCovariateIds = c()
)