separate_drgs: Convert MSDRGs into a "base DRG" and complication level

View source: R/separate_drgs.R

separate_drgsR Documentation

Convert MSDRGs into a "base DRG" and complication level

Description

Convert MSDRGs into a "base DRG" and complication level

Usage

separate_drgs(drgs, remove_age = FALSE)

Arguments

drgs

character vector of MSDRG descriptions, e.g. MSDRGDSC

remove_age

logical; if TRUE will remove age descriptions

Details

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.

Value

a tibble with three columns: msdrg: the input vector, base_msdrg, and msdrg_complication

Examples

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)

healthcareai documentation built on Sept. 5, 2022, 5:12 p.m.