Produces a feature variable that computes the duration of drug exposures
(drug_exposure_end_date - drug_exposure_start_date) and aggregates
per person using the specified function.
Usage
omop_variable_drug_duration(
concept_id,
concept_name = NULL,
name = NULL,
agg = c("mean", "sum", "max")
)Examples
if (FALSE) { # \dontrun{
recipe <- omop_recipe(
variables = omop_variable_drug_duration(1124300, concept_name = "Metformin"),
outputs = omop_output(type = "wide"))
} # }