Description Usage Arguments Value Examples
Merges a dataframe containing ICD-9-CM diagostic codes with a dataframe containing ICD-9 procedure codes Diagnostic codes are prefixed with 'D', while procedure codes are prefixed with 'P'
1 2 3 4 5 6 | merge_icd9_dx_and_procs(
dx_df,
proc_df,
icd9dxvar = "icd9cm",
icd9pvar = "icd9cm"
)
|
dx_df |
a data frame with at least two columns, specified as |
proc_df |
a data frame with at least two columns, specified as |
icd9dxvar |
name of icd9 diagnostic code column, default "icd9cm" |
icd9pvar |
name of icd9 procedure code column, default "icd9cm" |
a merged dataframe with common columns and "icd9cm"
1 2 3 4 5 6 7 | cases <- data.frame(id=c(1,2),
icd9dxlist=c('162.4,070.30,155.0,401.9','996.52,E878.8,V45.86'),
icd9plist=c('38.16','38.42'),
stringsAsFactors=TRUE)
dx_df <- melt_icd9list(cases, "id", "icd9dxlist")
proc_df <- melt_icd9list(cases, "id", "icd9plist")
merge_icd9_dx_and_procs(dx_df, proc_df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.