data.table::setDTthreads(threads = 1) # for CRAN testing
SNOMED <- sampleSNOMED() # use sample SNOMED for testing
my_concepts <- SNOMEDconcept('Acute heart failure')
my_codelist <- SNOMEDcodelist(data.frame(conceptId = my_concepts,
include_desc = TRUE))
my_codelist <- getMaps(my_codelist, to = 'icd10')
htmlCodelistHierarchy(my_codelist, file = paste0(tempdir(),
'/codelist.html'), extracols = 'icd10_code')
# The codelist.html file can now be viewed in a web browser
# Clean up temporary file
file.remove(paste0(tempdir(), '/codelist.html'))
Run the code above in your browser using DataLab