R/COMPLIC.R

Defines functions complic

Documented in complic

#' Occurances and Complications (pg. 122-125)
#'
#' @param col A column in PTOS data that typically starts with compr_.
#'
#' @return It translations of the code into human friendly values.
#' @export
complic <- function(col) {
  col_value <-  case.(col == 1 , 'None' ,
                      col == 10 , 'Burn Graft Loss (of any percentage)' ,
                      col == 11 , 'Burn Wound Infection Post Excision' ,
                      col == 12 , 'Burn Wound Sepsis' ,
                      col == 13 , 'Burn Wound Cellulitis' ,
                      col == 14 , 'Delay in Donor Site Healing' ,
                      col == 15 , 'Hypovolemia' ,
                      col == 20 , 'Adult Respiratory Distress Syndrome (ARDS)' ,
                      col == 201 , 'Drug or Alcohol Withdrawal Syndrome' ,
                      col == 202 , 'Unplanned Intubation' ,
                      col == 203 , 'Unplanned Return to the OR' ,
                      col == 204 , 'Unplanned Admission to the ICU' ,
                      col == 205 , 'Stroke/CVA' ,
                      col == 206 , 'Cardiac Arrest with Resuscitative Efforts by Healthcare Provider' ,
                      col == 21 , 'Acute Respiratory Failure' ,
                      col == 22 , 'Aspiration/Aspiration Pneumonia' ,
                      col == 23 , 'Atelectasis' ,
                      col == 24 , 'Fat Embolus Syndrome' ,
                      col == 25 , 'Hemothorax' ,
                      col == 26 , 'Pneumonia' ,
                      col == 27 , 'Iatrogenic Pneumothorax' ,
                      col == 28 , 'Pulmonary Embolus (PE)' ,
                      col == 29 , 'Pulmonary Arrest' ,
                      col == 30 , 'Acute Arterial Occlusion (not present on admission)' ,
                      col == 31 , 'Cardiac Arrest' ,
                      col == 32 , 'Extremity Compartment Syndrome (not present on admission)' ,
                      col == 33 , 'Deep Vein Thrombosis (DVT)' ,
                      col == 34 , 'Major Dysrhythmia' ,
                      col == 35 , 'Myocardial Infarction (MI)' ,
                      col == 36 , 'Acute Arterial Embolus' ,
                      col == 37 , 'Acute Arterial Occlusion' ,
                      col == 38 , 'Acute Arterial Thrombosis' ,
                      col == 39 , 'Arrythmia' ,
                      col == 40 , 'Blood Transfusion Reaction' ,
                      col == 41 , 'Coagulopathy' ,
                      col == 42 , 'Congestive Heart Failure' ,
                      col == 43 , 'Acute Tracheobronchitis' ,
                      col == 44 , 'Pleural Effusion' ,
                      col == 45 , 'Pulmonary Edema' ,
                      col == 46 , 'Hypothermia' ,
                      col == 47 , 'Post-Operative Hemorrhage' ,
                      col == 48 , 'Cardiopulmonary Arrest (unexpected, not resulting in death)' ,
                      col == 49 , 'Adverse Drug Reaction' ,
                      col == 50 , 'Acute Kidney Injury' ,
                      col == 51 , 'Syndrome Inappropriate Antidiuretic Hormone (SIADH)' ,
                      col == 60 , 'Cholecystitis' ,
                      col == 61 , 'Hepatitis' ,
                      col == 62 , 'Hyperbilirubinemia' ,
                      col == 63 , 'Liver Failure' ,
                      col == 64 , 'CNS Infection' ,
                      col == 65 , 'Dehiscence/Evisceration' ,
                      col == 66 , 'Progression of Original Neurologic Insult' ,
                      col == 68 , 'Delirium Tremens (DTs)' ,
                      col == 69 , 'Unrecognized Mainstem Bronchus Intubation' ,
                      col == 70 , 'Empyema' ,
                      col == 71 , 'Fungal Sepsis' ,
                      col == 72 , 'Intra-abdominal Abscess' ,
                      col == 73 , 'Meningitis' ,
                      col == 74 , 'Osteomyelitis' ,
                      col == 75 , 'Other Abscess' ,
                      col == 76 , 'Sepsis' ,
                      col == 77 , 'Septicemia' ,
                      col == 78 , 'Acute Sinusitis' ,
                      col == 79 , 'Soft Tissue Infection' ,
                      col == 80 , 'Esophageal Intubation (inhouse-only)' ,
                      col == 81 , 'Fistula, Enterocutaneous' ,
                      col == 82 , 'Fistula, Enteroenteric' ,
                      col == 83 , 'GI Bleeding' ,
                      col == 84 , 'Pancreatitis' ,
                      col == 85 , 'Pseudomembranous Colitis/C. Difficle' ,
                      col == 86 , 'Small Bowel Obstruction (SBO) (excluding ileus)' ,
                      col == 87 , 'Anoxic Encephalopathy' ,
                      col == 88 , 'Diabetes Insipidus' ,
                      col == 89 , 'Cerebral Infarct/Stroke' ,
                      col == 90 , 'Other Neurologic Sequelae' ,
                      col == 91 , 'Iatrogenic Organ, Nerve, Vessel' ,
                      col == 92 , 'Dehiscence' ,
                      col == 93 , 'Non-Traumatic Evisceration' ,
                      col == 94 , 'Decubitus' ,
                      col == 95 , 'Other not listed' ,
                      col == 96 , 'Seizures' ,
                      col == 97 , 'Urinary Tract Infection (UTI) (not present on admission)' ,
                      col == 98 , 'Ventriculitis' ,
                      col == 99 , 'Wound Infection (traumatic or incisional)')
  return(col_value)
}
ultramattyice/traumaR documentation built on June 11, 2020, 2:22 p.m.