compose {Rdiagnosislist} | R 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
Usage
compose(
conceptId,
CDB,
composeLookup,
attributes_conceptIds = bit64::integer64(0),
due_to_conceptIds = bit64::integer64(0),
without_conceptIds = bit64::integer64(0),
with_conceptIds = bit64::integer64(0),
SNOMED = getSNOMED(),
show_all_matches = FALSE
)
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 |
composeLookup |
lookup table created by createComposeLookup |
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 |
show_all_matches |
whether to stop if an exact match is found, or continue to search for all potential matches |
Value
a refined SNOMED concept Id
See Also
decompose, batchDecompose, createComposeLookup
Examples
SNOMED <- sampleSNOMED()
miniCDB <- createCDB(SNOMED)
D <- decompose('Cor pulmonale', CDB = miniCDB)
print(D)
# --------------------------------------------------------
# 83291003 | Cor pulmonale (disorder)
# --------------------------------------------------------
# Root : 128404006 | Right heart failure (disorder)
# - Due to : 19829001 | Disorder of lung (disorder)
#
# --------------------------------------------------------
# 83291003 | Cor pulmonale (disorder)
# --------------------------------------------------------
# Root : 367363000 | Right ventricular failure (disorder)
# - Due to : 19829001 | Disorder of lung (disorder)
# Compile decompositions into a lookup table
CL <- createComposeLookup(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)"