Learn R Programming

CodelistGenerator (version 4.0.0)

getDescendants: Get descendant codes for a given concept

Description

Get descendant codes for a given concept

Usage

getDescendants(cdm, conceptId, withAncestor = FALSE)

Value

The descendants of a given concept id.

Arguments

cdm

A cdm reference to an OMOP CDM dataset. If data is held within a database, the vocabulary tables should be in the same schema as the clinical tables (person, observation period, and so on).

conceptId

concept_id to search

withAncestor

If TRUE, return column with ancestor. In case of multiple ancestors, concepts will be separated by ";".

Examples

Run this code
# \donttest{
library(CodelistGenerator)
cdm <- mockVocabRef()
getDescendants(cdm = cdm, conceptId = 1)
# }

Run the code above in your browser using DataLab