hasAttributes: Whether SNOMED CT concepts have particular attributes

View source: R/hierarchy.R

hasAttributesR Documentation

Whether SNOMED CT concepts have particular attributes

Description

For each concept in the first list, whether it has the attribute in the second list. Returns a vector of Booleans.

Usage

hasAttributes(
  sourceIds,
  destinationIds,
  typeIds = bit64::as.integer64("116680003"),
  SNOMED = getSNOMED(),
  tables = c("RELATIONSHIP", "STATEDRELATIONSHIP"),
  active_only = TRUE
)

Arguments

sourceIds

character or integer64 vector of SNOMED concept IDs for children, recycled if necessary

destinationIds

character or integer64 vector of SNOMED concept IDs for parents, recycled if necessary

typeIds

character or integer64 vector of SNOMED concept IDs for renationship types, recycled if necessary. Defaults to 116680003 = 'Is a' (child/parent)

SNOMED

environment containing a SNOMED dictionary

tables

character vector of relationship tables to use

active_only

whether only active relationships should be considered, default TRUE

Value

a vector of Booleans stating whether the attribute exists

Examples

SNOMED <- sampleSNOMED()

hasAttributes(c('Heart failure', 'Acute heart failure'),
  c('Heart structure', 'Heart failure'),
  c('Finding site', 'Is a'))

anoopshah/Rdiagnosislist documentation built on April 21, 2023, 11:49 p.m.