reverse_ccsr | R Documentation |
Provided with a vector of CCSR categories, this will identify the ICD-10
codes that match that category. It returns a named list of ICD-10 codes
that can be used with the icd package
to
reverse_ccsr(CCSR_codes)
CCSR_codes |
A vector of CCSR codes |
A named list with a depth of one and the same length as CCSR_codes
, with
names corresponding to the provided CCSR_codes
. Each element of the list is a
character vector of ICD-10 codes corresponding to the CCSR_code. Invalid or missing
CCSR_codes
are set to NA
reverse_ccsr("DIG001")
reverse_ccsr("CAR009")
reverse_ccsr(c("DIG001", "CAR009"))
## Not run:
library(icd)
library(dplyr)
# Example data from ICD package
df <- icd::uranium_pathology %>%
mutate(icd10 = decimal_to_short(icd10),
icd10 = as.character(icd10)))
# Categories of interest
CCSR_categories <- c("RSP008", "CIR009", "DIG019", "NEO070")
explain_ccsr(CCSR_categories)
# Create mapping
CCSR_map <- reverse_ccsr(CCSR_categories)
# Map comorbidities
result <- icd::comorbid(df, CCSR_map, return_df = T)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.