find omop concept ancestors of one passed
super short name func to find ancestors
Usage
omop_ancestors(
c_id = NULL,
c_ids = NULL,
d_ids = NULL,
v_ids = NULL,
cc_ids = NULL,
standard = NULL,
separation = NULL,
itself = FALSE,
messages = TRUE
)
oance(
c_id = NULL,
c_ids = NULL,
d_ids = NULL,
v_ids = NULL,
cc_ids = NULL,
standard = NULL,
separation = NULL,
itself = FALSE,
messages = TRUE
)
Arguments
- c_id
single omop concept_id or exact concept_name to get ancestors of, default NULL returns all
- 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
- separation
levels of separation to filter by, default NULL for all
- itself
whether to include passed concept in returned table (min_levels_of_separation==0), default=FALSE
- messages
whether to print info messages, default=TRUE
Examples
omop_ancestors(1633308)
#> querying concept ancestors of: AJCC/UICC Stage 4 - may take a few seconds
#> Warning: downloading a subset of omop vocab files, pre-processed.
#> If you want to make sure you have the vocabs you need, download from Athena, save locally & call `omop_vocabs_preprocess()`
#> downloading concept_ancestor file, may take a few minutes, this only needs to be repeated if the package is re-installed
#> returning 2 concepts
#> # A tibble: 2 × 14
#> concept_id descendant_concept_id descendant_concept_n…¹ min_levels_of_separa…²
#> <int> <int> <chr> <int>
#> 1 734320 1633308 AJCC/UICC Stage 4 1
#> 2 1633987 1633308 AJCC/UICC Stage 4 1
#> # ℹ abbreviated names: ¹descendant_concept_name, ²min_levels_of_separation
#> # ℹ 10 more variables: max_levels_of_separation <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>
#omop_ancestors("Non-invasive blood pressure")
#omop_ancestors("Non-invasive blood pressure",separation=c(1,2))
#epoch_ance <- omop_ancestors("EPOCH, dose-escalated")
#no filtering by ancestors
#cman <- omop_ancestors(v_ids="Cancer Modifier")
# because of R argument matching, you can just use the first unique letters of
# arguments e.g. v for v_ids, cc for cc_ids
chemodrugs <- odesc("Cytotoxic chemotherapeutic", v="HemOnc", d="Regimen")
#> querying concept descendants of: Cytotoxic chemotherapeutic - may take a few seconds
#> returning 357 concepts