compose: Select more specific SNOMED CT concepts based on attributes

View source: R/compose.R

composeR Documentation

Select more specific SNOMED CT concepts based on attributes

Description

Finds the most specific SNOMED CT concepts that matches the combination of a root concept and attributes. Based on a composeLookup table in the CDB.

Usage

compose(
  conceptId,
  CDB,
  attributes_conceptIds = bit64::integer64(0),
  due_to_conceptIds = bit64::integer64(0),
  without_conceptIds = bit64::integer64(0),
  with_conceptIds = bit64::integer64(0),
  SNOMED = getSNOMED()
)

Arguments

conceptId

SNOMED CT concept to refine

CDB

SNOMED CT concept database, as created by createCDB. An environment containing the following data tables: FINDINGS, QUAL, CAUSES, BODY, FINDINGS, OTHERSUB, OVERLAP, TRANSITIVE. Must also contain a COMPOSELOOKUP table created by addComposeLookupToCDB

attributes_conceptIds

SNOMED concept Ids of attributes of concept e.g. laterality, severity, acuteness

due_to_conceptIds

SNOMED concept Ids of cause

without_conceptIds

SNOMED concept Ids of conditions stated to be absent

with_conceptIds

SNOMED concept Ids of conditions also present

SNOMED

environment containing SNOMED CT tables

Value

a refined SNOMED concept Id

See Also

decompose, batchDecompose, addComposeLookupToCDB

Examples

## Not run: 
SNOMED <- sampleSNOMED()
miniCDB <- createCDB(SNOMED)

D <- decompose('Cor pulmonale', CDB = miniCDB)
print(D)

# --------------------------------------------------------
# 83291003 | Cor pulmonale (disorder)
# --------------------------------------------------------
# Root : 367363000 | Right ventricular failure (disorder)
# - Due to : 19829001 | Disorder of lung (disorder)

# Compile decompositions into a lookup table
miniCDB <- addComposeLookupToCDB(D, CDB = miniCDB))

compose(as.SNOMEDconcept('Right heart failure'),
  due_to_conceptIds = as.SNOMEDconcept('Disorder of lung'),
  CDB = miniCDB, composeLookup = CL)
# [1] "83291003 | Cor pulmonale (disorder)"

## End(Not run)

anoopshah/Rdiagnosislist documentation built on March 29, 2025, 10:46 a.m.