get_all_children: Get all of the children of a given source item.

Description Usage Arguments Value Examples

Description

Get all of the children of a given source item.

Usage

1

Arguments

source

The source vocabulary.

id

The internal source ID.

Value

A data.tree which contains the tree of children.

Examples

1
2
3
4
5
# Get all the CPT codes that are children of the CUI \code{C0519273}.
conceptAtoms <- get_concept_atoms("C0519273")
cptCodes <- conceptAtoms %>% list.filter(rootSource == 'CPT') %>% list.select(code) %>% list.apply(function(x) rev(str_split(x, "/")[[1]])[[1]])
cptKids <- cptCodes %>% list.apply(function(x) get_all_children("CPT", x))
cptLeaves <- cptKids %>% list.apply(function(x) x$Get('desc', filterFun = isLeaf)) %>% list.apply(function(x) data.frame(proc_code = names(x), desc = x )) %>% bind_rows()

mpancia/rUMLS documentation built on May 23, 2019, 6:26 a.m.