View source: R/mapCodesToPhecodes.R
mapCodesToPhecodes | R Documentation |
This function takes a data frame with codes and maps them to phecodes. It can support aribitrary maps of codes to phecodes and phecode rollup maps. The included mappings are from ICD9CM and ICD10CM.
mapCodesToPhecodes(input,
vocabulary.map=PheWAS::phecode_map,
rollup.map=PheWAS:::phecode_rollup_map,
make.distinct=TRUE)
input |
Data frame containing |
vocabulary.map |
Data frame with columns |
rollup.map |
Data frame with columns |
make.distinct |
Boolean value. Should duplicate rows be removed during mapping? Default is |
A data frame containing the columns in input
, except the origial code
and vocabulary_id
columns have been replaced with phecode
now containing the phecode as character.
Robert Carroll Laura Wiley
diabetes_billing=data.frame(id=1:3,vocabulary_id=c("ICD9CM","ICD9CM","ICD10CM"),code=c("250.00","250.01","E11.00"))
phecodes=mapCodesToPhecodes(diabetes_billing)
phecodes
addPhecodeInfo(phecodes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.