powered by
Add the ordinal number of the observation period associated that a given date is in.
addObservationPeriodId( x, indexDate = "cohort_start_date", nameObservationPeriodId = "observation_period_id", name = NULL )
Table with the current observation period id added.
Table with individuals in the cdm.
Variable in x that contains the date to compute the observation flag.
Name of the new column.
Name of the new table, if NULL a temporary table is returned.
# \donttest{ library(PatientProfiles) cdm <- mockPatientProfiles(source = "duckdb") cdm$cohort1 |> addObservationPeriodId() # }
Run the code above in your browser using DataLab