A wrapper function for the api_refset_members() function to query Map Reference Sets, in particular the map to the World Health Organisation International Classification of Diseases 10th Revision (ICD-10).

concept_map(
  concept_ids = NULL,
  target_code = NULL,
  map_refset_id = "447562003",
  active = TRUE,
  encoding = "UTF-8",
  silent = FALSE,
  limit = snomedizer_options_get("limit"),
  ...
)

Arguments

concept_ids

an optional character vector of one or more SNOMED CT concept identifiers to be mapped

target_code

an optional character code designated the concept code in the other terminology or code system

map_refset_id

character identifier of a SNOMED CT Map Reference Set. The default is "447562003" for the ICD-10 Map Reference Set.

active

whether to restrict results to active concepts. Default is TRUE.

encoding

HTTP charset parameter to use (default is "UTF-8")

silent

whether to hide progress bar. Default is FALSE

limit

a positive integer for the maximum number of results to return. See snomedizer_options. The maximum limit on public endpoints is 10,000.

...

other optional arguments listed in api_operations, such as endpoint, branch or limit

Value

a data frame of SNOMED CT concepts mapped to another code system

See also

World Health Organisation International Classification of Diseases 10th Revision

SNOMED International Map Reference Sets

SNOMED International ICD-10 Mapping Technical Guide

Examples

# find SNOMED CT codes corresponding to ICD-10 code N39.0 urinary tract infections
uti_concepts <- concept_map(target_code = "N39.0")
str(dplyr::select(uti_concepts,
                  referencedComponentId,
                  referencedComponent.pt.term,
                  additionalFields.mapTarget,
                  additionalFields.mapAdvice))
#> 'data.frame':	29 obs. of  4 variables:
#>  $ referencedComponentId      : chr  "16916631000119104" "1148925003" "197927001" "721104000" ...
#>  $ referencedComponent.pt.term: chr  "Urinary tract infection caused by Streptococcus agalactiae" "Idiopathic pyuria" "Recurrent urinary tract infection" "Sepsis due to urinary tract infection" ...
#>  $ additionalFields.mapTarget : chr  "N39.0" "N39.0" "N39.0" "N39.0" ...
#>  $ additionalFields.mapAdvice : chr  "ALWAYS N39.0" "ALWAYS N39.0" "ALWAYS N39.0 | POSSIBLE REQUIREMENT FOR CAUSATIVE AGENT CODE" "ALWAYS N39.0 | POSSIBLE REQUIREMENT FOR CAUSATIVE AGENT CODE" ...

# map SNOMED CT codes to ICD-10
map_icd10 <- concept_map(concept_ids = c("431308006", "312124009", "53084003"))
dplyr::select(map_icd10,
              referencedComponentId,
              referencedComponent.pt.term,
              additionalFields.mapTarget,
              additionalFields.mapAdvice)
#>   referencedComponentId         referencedComponent.pt.term
#> 1              53084003                 Bacterial pneumonia
#> 2             312124009         Bacterial urinary infection
#> 3             312124009         Bacterial urinary infection
#> 4             431308006 Acute upper urinary tract infection
#>   additionalFields.mapTarget
#> 1                      J15.9
#> 2                      B96.8
#> 3                      N39.0
#> 4                      N39.0
#>                                     additionalFields.mapAdvice
#> 1                                                 ALWAYS J15.9
#> 2                                                 ALWAYS B96.8
#> 3                                                 ALWAYS N39.0
#> 4 ALWAYS N39.0 | POSSIBLE REQUIREMENT FOR CAUSATIVE AGENT CODE