string search of concept_code in omop concepts table
super short name func to search concepts by concept_code
Usage
omop_codes(
findstring,
ignore_case = TRUE,
exact = TRUE,
fixed = FALSE,
c_ids = NULL,
d_ids = NULL,
v_ids = NULL,
cc_ids = NULL,
standard = NULL,
messages = TRUE
)
ocodes(
findstring,
ignore_case = TRUE,
exact = TRUE,
fixed = FALSE,
c_ids = NULL,
d_ids = NULL,
v_ids = NULL,
cc_ids = NULL,
standard = NULL,
messages = TRUE
)
Arguments
- findstring
string to search for or regex
- ignore_case
ignore case in string comparison, default TRUE
- exact
TRUE for exact string search, "start" for exact start, "end" for exact end, default=TRUE because user likely to look for whole code
- fixed
default FALSE allows regex,TRUE uses grepl exact matching
- c_ids
one or more concept_id to filter by, default NULL for all
- d_ids
one or more domain_id to filter by, default NULL for all
- v_ids
one or more vocabulary_id to filter by, default NULL for all
- cc_ids
one or more concept_class_id to filter by, default NULL for all
- standard
one or more standard_concept to filter by, default NULL for all, S,C
- messages
whether to print info messages, default=TRUE
Examples
omop_codes("81752-8")
#> returning 1 concepts
#> # A tibble: 1 × 10
#> concept_id concept_name domain_id vocabulary_id concept_class_id
#> <int> <chr> <chr> <chr> <chr>
#> 1 21494134 Chromosome region 1q21 du… Measurem… LOINC Lab Test
#> # ℹ 5 more variables: standard_concept <chr>, concept_code <chr>,
#> # valid_start_date <date>, valid_end_date <date>, invalid_reason <chr>
omop_codes("AJCC/UICC-Stage",exact=FALSE)
#> returning 720 concepts
#> # A tibble: 720 × 10
#> concept_id concept_name domain_id vocabulary_id concept_class_id
#> <int> <chr> <chr> <chr> <chr>
#> 1 1635658 AJCC/UICC 6th Stage 0 Measurement Cancer Modif… Staging/Grading
#> 2 1633642 AJCC/UICC 6th Stage 0a Measurement Cancer Modif… Staging/Grading
#> 3 1635189 AJCC/UICC 6th Stage 0is Measurement Cancer Modif… Staging/Grading
#> 4 1634888 AJCC/UICC 6th Stage 1 Measurement Cancer Modif… Staging/Grading
#> 5 1634027 AJCC/UICC 6th Stage 1A Measurement Cancer Modif… Staging/Grading
#> 6 1633734 AJCC/UICC 6th Stage 1A1 Measurement Cancer Modif… Staging/Grading
#> 7 1634553 AJCC/UICC 6th Stage 1A2 Measurement Cancer Modif… Staging/Grading
#> 8 1634171 AJCC/UICC 6th Stage 1A3 Measurement Cancer Modif… Staging/Grading
#> 9 1634604 AJCC/UICC 6th Stage 1B Measurement Cancer Modif… Staging/Grading
#> 10 1635608 AJCC/UICC 6th Stage 1B1 Measurement Cancer Modif… Staging/Grading
#> # ℹ 710 more rows
#> # ℹ 5 more variables: standard_concept <chr>, concept_code <chr>,
#> # valid_start_date <date>, valid_end_date <date>, invalid_reason <chr>
ocodes("AJCC/UICC-Stage")
#> returning 0 concepts
#> # A tibble: 0 × 10
#> # ℹ 10 variables: concept_id <int>, concept_name <chr>, domain_id <chr>,
#> # vocabulary_id <chr>, concept_class_id <chr>, standard_concept <chr>,
#> # concept_code <chr>, valid_start_date <date>, valid_end_date <date>,
#> # invalid_reason <chr>