Produces a derived variable that computes the number of days between
observation_period_start_date and
observation_period_end_date. Multiple non-overlapping observation
periods are handled explicitly: sum all observed spells, or select the
first, last, or longest spell.
Usage
omop_variable_obs_duration(
name = "obs_duration",
period_policy = c("total", "first", "last", "longest")
)Examples
if (FALSE) { # \dontrun{
recipe <- omop_recipe(variables = omop_variable_obs_duration(),
outputs = omop_output(type = "wide"))
} # }