The AHRQ has categorized each of the ICD-10-PCS (Procedure Codes) into one of
four groups: minor diagnostic, minor therapeutic, major diagnostic or major
therapeutic. This mapping can be used to get the type(s) of procedure(s)
performed on a patient from a data.frame
of patients and associated
procedure codes in 'long' format. See the ICD-10 vignette for an example.
https://www.hcup-us.ahrq.gov/toolssoftware/procedureicd10/procedure_icd10.jsp