Skip to content

Produces a feature spec that generates an integer column containing the number of records per person matching the concept set. Useful for quantifying utilisation (e.g. number of visits, number of drug dispensings).

Usage

omop.feature.count(concept_set, name = NULL)

Arguments

concept_set

Numeric vector of concept IDs, or an omop_concept_set object defining the concepts to count.

name

Character; optional custom name for the feature column. If NULL, auto-generated from the concept and table context.

Value

An omop_feature_spec object with type = "count".

Examples

if (FALSE) { # \dontrun{
spec <- omop.feature.count(c(9201, 9202, 9203))
plan <- ds.omop.plan.features(plan, "visit_counts",
  "visit_occurrence", specs = list(n_visits = spec))
} # }