Skip to content

Produces a feature spec that generates a boolean column indicating whether the person has any records matching the concept set. When used in a plan or recipe, the resulting column will contain TRUE (at least one matching record) or FALSE (no matching records).

Usage

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

Arguments

concept_set

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

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 = "boolean".

Examples

if (FALSE) { # \dontrun{
spec <- omop.feature.boolean(c(201826))
plan <- ds.omop.plan.features(plan, "has_diabetes",
  "condition_occurrence", specs = list(diabetes = spec))
} # }