classify_pr: Classify Procedure Classes

View source: R/classify_pr.R

classify_prR Documentation

Classify Procedure Classes

Description

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

Usage

classify_pr(icd_pr)

Arguments

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.

Details

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

Value

A vector of Procedure Classes, falling into one of four categories listed in the details section

Troubleshooting

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.

Source

HCUP page for Procedure Classes with ICD-9

HCUP page for Procedure Classes Refined with ICD-10

See Also

proc_class_icd10 and proc_class_icd9 in the hcup.data package for the datasets

Examples

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)


HunterRatliff1/hcup documentation built on Aug. 6, 2023, 6:10 p.m.