View source: R/separate_drgs.R
separate_drgs | R Documentation |
Convert MSDRGs into a "base DRG" and complication level
separate_drgs(drgs, remove_age = FALSE)
drgs |
character vector of MSDRG descriptions, e.g. MSDRGDSC |
remove_age |
logical; if TRUE will remove age descriptions |
This function is not robust to different codings of complication in DRG descriptions. If you have a coding other than "W CC" / "W MCC" / "W CC/MCC" / "W/O CC" / "W/O MCC", please file an issue on Github and we'll try to add support for your coding.
a tibble with three columns: msdrg: the input vector, base_msdrg, and msdrg_complication
MSDRGs <- c("ACUTE LEUKEMIA W/O MAJOR O.R. PROCEDURE W CC", "ACUTE LEUKEMIA W/O MAJOR O.R. PROCEDURE W MCC", "ACUTE LEUKEMIA W/O MAJOR O.R. PROCEDURE W/O CC/MCC", "SIMPLE PNEUMONIA & PLEURISY", "SIMPLE PNEUMONIA & PLEURISY AGE 0-17") separate_drgs(MSDRGs, remove_age = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.