Skip to contents

Get corresponding standard codes for International Classification of Diseases (ICD) 10 codes

Usage

getICD10StandardCodes(
  cdm,
  level = c("ICD10 Chapter", "ICD10 SubChapter"),
  name = NULL,
  nameStyle = "{concept_code}_{concept_name}",
  includeDescendants = TRUE,
  type = "codelist"
)

Arguments

cdm

A cdm reference via CDMConnector.

level

Can be either "ICD10 Chapter", "ICD10 SubChapter", "ICD10 Hierarchy", or "ICD10 Code".

name

Name of chapter or sub-chapter of interest. If NULL, all will be considered.

nameStyle

Name style to apply to returned list. Can be one of "{concept_code}","{concept_id}", "{concept_name}", or a combination (i.e., "{concept_code}_{concept_name}").

includeDescendants

Either TRUE or FALSE. If TRUE descendant concepts of identified concepts will be included in the candidate codelist. If FALSE only direct mappings from ICD-10 codes to standard codes will be returned.

type

Can be "codelist" or "codelist_with_details".

Value

A named list, with each element containing the corresponding standard codes (and descendants) of ICD chapters and sub-chapters.

Examples

# \donttest{
library(CodelistGenerator)
cdm <- mockVocabRef()
#> Warning: There are observation period end dates after the current date: 2025-04-11
#>  The latest max observation period end date found is 2025-12-31
getICD10StandardCodes(cdm = cdm, level = c(
  "ICD10 Chapter",
  "ICD10 SubChapter"
))
#> Getting non-standard ICD10 concepts
#> Mapping from non-standard to standard concepts
#> Getting descendant concepts
#> 
#> ── 2 codelists ─────────────────────────────────────────────────────────────────
#> 
#> - 1234_arthropathies (3 codes)
#> - 1234_diseases_of_the_musculoskeletal_system_and_connective_tissue (3 codes)
# }