concept_ancestors: Fetch active ancestors/descendants of one or more concepts

View source: R/wrapper.R

concept_ancestorsR Documentation

Fetch active ancestors/descendants of one or more concepts

Description

Wrapper functions of api_concepts that fetch ancestors or descendants of one or several concept identifiers using full SNOMED CT inference.

Note: these functions can only fetch active concepts.

Usage

concept_ancestors(
  conceptIds,
  include_self = FALSE,
  encoding = "UTF-8",
  silent = FALSE,
  ...
)

concept_descendants(
  conceptIds,
  include_self = FALSE,
  encoding = "UTF-8",
  silent = FALSE,
  ...
)

Arguments

conceptIds

a character vector of concept identifiers

include_self

a logical vector indicating whether the conceptIds should be included in the results. The default is TRUE. If a single value is provided, it will be recycled.

encoding

HTTP charset parameter to use (default is "UTF-8")

silent

whether to hide progress bar. Default is FALSE

...

other valid arguments to function api_concepts, for instance endpoint, branch or limit.

Value

a named list of data frames

Disclaimer

In order to use SNOMED CT, a licence is required which depends both on the country you are based in, and the purpose of your work. See details on snomedizer.

See Also

Other wrapper: concept_descriptions(), concept_find(), release_version()

Examples

pneumonia_ancestors <- concept_ancestors(conceptIds = "233604007")
# This will trigger a warning using the default limit set by snomedizer_options_get("limit")
pneumonia_concepts <- concept_descendants(conceptIds = "233604007")
# Raising the limit
pneumonia_concepts <- concept_descendants(conceptIds = "233604007", limit = 300)
head(pneumonia_concepts$`233604007`)

ramses-antibiotics/snomedizer documentation built on July 12, 2022, 12:42 a.m.