powered by
`r lifecycle::badge("experimental")` Same as `addPriorObservation()`, except query is not computed to a table.
addPriorObservationQuery( x, indexDate = "cohort_start_date", priorObservationName = "prior_observation", priorObservationType = "days" )
cohort table with added column containing prior observation of the individuals.
Table with individuals in the cdm.
Variable in x that contains the date to compute the prior observation.
name of the new column to be added.
Whether to return a "date" or the number of "days".
# \donttest{ cdm <- mockPatientProfiles() cdm$cohort1 |> addPriorObservationQuery() mockDisconnect(cdm = cdm) # }
Run the code above in your browser using DataLab