Skip to contents

Evaluates concept set expressions with inclusive and exclusive lists and optional descendant expansion.

Usage

resolve_concept_set(
  con,
  include_concepts = NULL,
  exclude_concepts = NULL,
  include_descendants = TRUE,
  exclude_descendants = TRUE,
  patterns = NULL,
  ...
)

Arguments

con

Active DuckDB DBI connection.

include_concepts

Integer vector of concept IDs to include.

exclude_concepts

Optional integer vector of concept IDs to exclude.

include_descendants

Logical. If TRUE (default), expands included concepts to their descendants.

exclude_descendants

Logical. If TRUE (default), expands excluded concepts to their descendants.

patterns

Optional list of concept patterns or pattern strings. If supplied, resolves patterns.

...

Additional arguments passed to resolve_concept_patterns().

Value

Sorted integer vector of resolved standard concept IDs or data.frame of concepts.