Skip to contents

find omop concept descendants of one passed

super short name func to find descendants

Usage

omop_descendants(
  c_id = NULL,
  c_ids = NULL,
  d_ids = NULL,
  v_ids = NULL,
  cc_ids = NULL,
  standard = NULL,
  separation = NULL,
  itself = FALSE,
  messages = TRUE
)

odesc(
  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 descendants 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

Value

a dataframe of concepts and attributes

Examples

omop_descendants(1633308)
#> querying concept descendants of: AJCC/UICC Stage 4 - may take a few seconds
#> returning 119 concepts
#> # A tibble: 119 × 14
#>    ancestor_concept_id ancestor_name     concept_id min_levels_of_separation
#>                  <int> <chr>                  <int>                    <int>
#>  1             1633308 AJCC/UICC Stage 4    1634451                        3
#>  2             1633308 AJCC/UICC Stage 4    1635450                        2
#>  3             1633308 AJCC/UICC Stage 4    1634487                        3
#>  4             1633308 AJCC/UICC Stage 4    1634688                        1
#>  5             1633308 AJCC/UICC Stage 4    1633523                        3
#>  6             1633308 AJCC/UICC Stage 4    1633985                        3
#>  7             1633308 AJCC/UICC Stage 4    1635246                        3
#>  8             1633308 AJCC/UICC Stage 4    1633786                        4
#>  9             1633308 AJCC/UICC Stage 4    1634447                        1
#> 10             1633308 AJCC/UICC Stage 4    1634005                        3
#> # ℹ 109 more rows
#> # ℹ 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_descendants("lenalidomide")
#omop_descendants("Non-invasive blood pressure")
#omop_descendants("Non-invasive blood pressure",separation=c(1,2))
#chemodrugs <- omop_descendants("Cytotoxic chemotherapeutic",v_ids="HemOnc",d_ids="Regimen")
#no filtering by descendants
#(expect to be same as omop_ancestors())
#v slight difference 19409 v 19411 concepts, not sure why, prob not important
#cmde <- omop_descendants(v_ids="Cancer Modifier")
#cmde1 <- omop_descendants(v_ids="Cancer Modifier", separation=1)
# 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