observation_period table from data recorded in the cdm_referenceBuild observation_period table from data recorded in the cdm_reference
buildObservationPeriod(
cdm,
collapseDays = Inf,
persistenceDays = Inf,
dateRange = as.Date(c("1900-01-01", NA)),
censorAge = 120L,
recordsFrom = c("drug_exposure", "visit_occurrence"),
periodTypeConceptId = 32817L
)The cdm_reference object with a new observation_period.
A cdm_reference object.
Distance between records to be collapsed.
Number of days added at the end of an observation period as persistence window.
Range of dates to be considered. By default '1900-01-01' is
used as start date, whereas for censor date the first available of
source_release_date, cdm_release_date, and Sys.Date() will be used.
Age to censor individuals if they reach a certain age. The last day in observation of the individual will be the day prior to their birthday.
Tables to retrieve observation records from.
Choose the observation_period_type_concept_id that best represents how the period was determined. Accepted Concepts.