explain_ccsr | R Documentation |
Look up CCSR category descriptions
explain_ccsr(ccsr, detailed = FALSE)
ccsr |
Vector of CCSR codes to be explained. Can be a mix of diagnosis and/or procedure CCSR groups. |
detailed |
Single logical value which indicates if more details should
be returned. The default is |
# Explain the CCSR for diagnosis categories
explain_ccsr("SKN003")
# The same function works for procedures
explain_ccsr("LYM007")
# Vectorized using `mutate()`
library(dplyr)
dplyr::tibble(
CCSR = c("NVS011", "DIG021", "MBD028", "URN001", "RES010", "CAR004"),
Type = c("DX", "DX", "DX", "PR", "PR", "PR")) %>%
mutate(explained = explain_ccsr(CCSR))
## Examples using the detailed option
detailed <- tibble(CCSR_PR = c("URN001", "RES010", "CAR004")) %>%
mutate(Explained = explain_ccsr(CCSR_PR),
details = explain_ccsr(CCSR_PR, detailed = TRUE))
library(purrr) # use purrr to extract one option
detailed %>%
mutate(domain = map_chr(details, "clinical_domain"))
library(tidyr) ## use unnest_wider to see all details
detailed %>%
unnest_wider(details)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.