getDescendants: Get descendant codes for a given concept

View source: R/getDescendants.R

getDescendantsR Documentation

Get descendant codes for a given concept

Description

Get descendant codes for a given concept

Usage

getDescendants(cdm, conceptId, withAncestor = FALSE)

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 ";".

Value

The descendants of a given concept id.

Examples


library(CodelistGenerator)
cdm <- mockVocabRef()
getDescendants(cdm = cdm, conceptId = 1)


CodelistGenerator documentation built on Dec. 17, 2025, 5:06 p.m.