Produces a feature spec that sums a numeric column across all records
matching the concept set for each person. Useful for computing total
days supply, total quantity, etc.
Usage
omop.feature.sum_value(concept_set, value_column = "days_supply", name = NULL)
Arguments
- concept_set
Numeric vector of concept IDs, or an
omop_concept_set object.
- value_column
Character; name of the numeric column to sum
(default "days_supply").
- name
Character; optional custom name for the feature column.
Value
An omop_feature_spec object with
type = "sum_value".
Examples
if (FALSE) { # \dontrun{
spec <- omop.feature.sum_value(c(1124300),
value_column = "days_supply")
} # }