Skip to contents

Show mappings from non-standard vocabularies to standard

Usage

getMappings(
  candidateCodelist,
  cdm = NULL,
  nonStandardVocabularies = c("ATC", "ICD10CM", "ICD10PCS", "ICD9CM", "ICD9Proc",
    "LOINC", "OPCS4", "Read", "RxNorm", "RxNorm Extension", "SNOMED")
)

Arguments

candidateCodelist

Dataframe

cdm

cdm_reference via CDMConnector::cdmFromCon()

nonStandardVocabularies

Character vector

Value

tibble

Examples

# \donttest{
cdm <- CodelistGenerator::mockVocabRef()
#> Warning: There are observation period end dates after the current date: 2025-03-27
#>  The latest max observation period end date found is 2025-12-31
codes <- CodelistGenerator::getCandidateCodes(
  cdm = cdm,
  keywords = "osteoarthritis"
)
#> Limiting to domains of interest
#> Getting concepts to include
#> Adding descendants
#> Search completed. Finishing up.
#>  2 candidate concepts identified
#> Time taken: 0 minutes and 0 seconds
CodelistGenerator::getMappings(
  cdm = cdm,
  candidateCodelist = codes,
  nonStandardVocabularies = "READ"
)
#> # A tibble: 1 × 7
#>   standard_concept_id standard_concept_name  standard_vocabulary_id
#>                 <int> <chr>                  <chr>                 
#> 1                   4 Osteoarthritis of knee SNOMED                
#> # ℹ 4 more variables: non_standard_concept_id <int>,
#> #   non_standard_concept_name <chr>, non_standard_concept_code <chr>,
#> #   non_standard_vocabulary_id <chr>
# }