classify_pr | R Documentation |
Converts a vector of ICD procedure codes into a vector of Procedure Classes (for ICD-9) or Procedure Classes Refined (for ICD-10) using the HCUP's software
classify_pr(icd_pr)
icd_pr |
A vector of ICD-9-CM or ICD-10-PCS codes for procedures. You do not need to specify if the codes are ICD-9 or ICD-10. |
The HCUP classifies procedures into the following four categories:
Minor Diagnostic: Nonoperating room procedures that are diagnostic
Minor Therapeutic: Nonoperating room procedures that are therapeutic
Major Diagnostic: Procedures that are considered operating room procedures that are performed for diagnostic reasons
Major Therapeutic: Procedures that are considered operating room procedures that are performed for therapeutic reasons
A vector of Procedure Classes, falling into one of four categories listed in the details section
This has not been tested extensively with ICD-9 codes in
practice, so users experiencing difficulty may want to implement their own
solutions. Please see ?hcup.data::proc_class_icd9
for the data used here, and use
data(proc_class_icd9)
to adjust to your needs.
HCUP page for Procedure Classes with ICD-9
HCUP page for Procedure Classes Refined with ICD-10
proc_class_icd10
and
proc_class_icd9
in the
hcup.data
package for the datasets
classify_pr("00993ZX")
classify_pr("0015")
# Using the dplyr workflow
library(dplyr)
pt_data <- tibble(
Patients = c("A", "B", "C"),
ICD_10 = c("0PS443Z", "3E05305", "F13ZHZZ")
)
pt_data %>%
mutate(pr_class = classify_pr(ICD_10))
## Not run:
# Set of wrapper functions can be helpful for filtering
is_diagnostic_pr("F13ZHZZ")
is_major_pr("0PS443Z")
pt_data %>% filter(is_therapeutic_pr(ICD_10))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.