show_mappings: Show mappings from source vocabularies to standard

View source: R/show_mappings.R

show_mappingsR Documentation

Show mappings from source vocabularies to standard

Description

Show mappings from source vocabularies to standard

Usage

show_mappings(
  candidate_codelist,
  source_vocabularies = c("ATC", "ICD10CM", "ICD10PCS", "ICD9CM", "ICD9Proc", "LOINC",
    "OPCS4", "Read", "RxNorm", "RxNorm Extension", "SNOMED"),
  db,
  vocabulary_database_schema
)

Arguments

candidate_codelist

Dataframe

source_vocabularies

Character vector

concept

Dataframe

concept_relationship

Dataframe

Value

Dataframe

Examples

# note, Eunomia, which is used for the example below, does not include a full set of vocabularies. The full set can be downloaded from https://athena.ohdsi.org
untar(xzfile(system.file("sqlite", "cdm.tar.xz", package = "Eunomia"), open = "rb"),
       exdir =  tempdir())
db <- dbConnect(RSQLite::SQLite(), paste0(tempdir(),"\\cdm.sqlite"))
vocabulary_database_schema<-"main"
get_candidate_codes(keywords="asthma",
                   db=db,
                   vocabulary_schema = "main")
asthma_codes<-get_candidate_codes(keywords="asthma",
                   search.synonyms=TRUE,
                             fuzzy.match=TRUE,
                             exclude=NULL,
                             include.descendants=TRUE,
                             include.ancestor=FALSE,
                   db=db,
                   vocabulary_database_schema = "main")
show_mappings(candidate_codelist= asthma_codes,
                   db=db,
                   vocabulary_database_schema = "main")

edward-burn/CodelistGenerator documentation built on April 10, 2022, 11:02 a.m.