Get the gapEra used to create a cohort
Examples
# \donttest{
library(CDMConnector)
library(DrugUtilisation)
library(dplyr)
cdm <- mockDrugUtilisation()
druglist <- CodelistGenerator::getDrugIngredientCodes(
cdm, c("acetaminophen", "metformin")
)
cdm <- generateDrugUtilisationCohortSet(
cdm = cdm,
name = "drug_cohorts",
conceptSet = druglist,
gapEra = 100
)
#> ℹ Subsetting drug_exposure table
#> ℹ Checking whether any record needs to be dropped.
#> ℹ Collapsing overlaping records.
#> ℹ Collapsing records with gapEra = 100 days.
cohortGapEra(cdm$drug_cohorts)
#> [1] 100 100
# }