Define a Concept Pattern Specification
Usage
concept_pattern(
vocabulary_id = NULL,
code_pattern = NULL,
name_pattern = NULL,
domain_id = NULL,
regex = FALSE,
expand = NULL,
target_vocabulary = NULL,
include_retired = FALSE,
standard_only = FALSE
)Arguments
- vocabulary_id
Optional vocabulary identifier (e.g. 'ATC', 'RxNorm', 'ICD10CM', 'CPT4').
- code_pattern
Pattern for
concept_code(supports SQL LIKE/ILIKE wildcards or regex).- name_pattern
Pattern for
concept_name(supports SQL LIKE/ILIKE wildcards or regex).- domain_id
Optional domain filter (e.g. 'Drug', 'Condition', 'Measurement', 'Procedure').
- regex
Logical. If
TRUE, evaluates pattern as a regular expression.- expand
Direction of hierarchy expansion ('descendants' | 'ancestors' | NULL).
- target_vocabulary
Target vocabulary ID for expanded descendants (e.g. 'RxNorm').
- include_retired
Logical. If
TRUE, queries backward 'Maps to' relationships for deprecated codes.- standard_only
Logical. If
TRUE, restricts to standard concepts ('S').
