prev_terms
to a cohort dataset.
The dataset has a single row for each patient and includes only patients in the numerator or
denominator for whichever cohort type is chosen. Columns are added for start and end dates and
for start and end times as integer differences from the cohort start date. A binary column is
added for membership of the case group. All patients
with start date > end date are removed from the dataset.prev_terms
to a cohort dataset.
The dataset has a single row for each patient and includes only patients in the numerator or
denominator for whichever cohort type is chosen. Columns are added for start and end dates and
for start and end times as integer differences from the cohort start date. A binary column is
added for membership of the case group. All patients
with start date > end date are removed from the dataset.
build_cohort(dat, cohort_type = c("incid", "prev"), cohort_start, cohort_end, diagnosis_start = "eventdate")
prev_terms