Skip to contents

Obtains patient enrollment date from the person table.

Usage

get_person_enrollment_date(ds)

Arguments

ds

A PicnicHealth data set list object.

Value

A data frame, one row per person, with a column for person_id and enrollment_date, i.e. the person's enrollment date.

Details

Beyond its use in table_one(), this function may be useful to add an additional column to an existing analytic data.frame that already contains person_id using dplyr::left_join() to include enrollment_date. See examples.

Examples

if (FALSE) { # \dontrun{
# Add `enrollment_date` to an analytic data set that contains `person_id`:
analytic_dataset %>%
  left_join(get_person_enrollment_date(ds))
} # }