| Literature DB >> 32735604 |
Akira A Nair1, Mihir A Velagapudi2, Jonathan A Lang3, Lakshmana Behara4, Ravitheja Venigandla4, Nishant Velagapudi4, Christine T Fong5, Mayumi Horibe6, John D Lang5, Bala G Nair5.
Abstract
Opioids play a critical role in acute postoperative pain management. Our objective was to develop machine learning models to predict postoperative opioid requirements in patients undergoing ambulatory surgery. To develop the models, we used a perioperative dataset of 13,700 patients (≥ 18 years) undergoing ambulatory surgery between the years 2016-2018. The data, comprising of patient, procedure and provider factors that could influence postoperative pain and opioid requirements, was randomly split into training (80%) and validation (20%) datasets. Machine learning models of different classes were developed to predict categorized levels of postoperative opioid requirements using the training dataset and then evaluated on the validation dataset. Prediction accuracy was used to differentiate model performances. The five types of models that were developed returned the following accuracies at two different stages of surgery: 1) Prior to surgery-Multinomial Logistic Regression: 71%, Naïve Bayes: 67%, Neural Network: 30%, Random Forest: 72%, Extreme Gradient Boost: 71% and 2) End of surgery-Multinomial Logistic Regression: 71%, Naïve Bayes: 63%, Neural Network: 32%, Random Forest: 72%, Extreme Gradient Boost: 70%. Analyzing the sensitivities of the best performing Random Forest model showed that the lower opioid requirements are predicted with better accuracy (89%) as compared with higher opioid requirements (43%). Feature importance (% relative importance) of model predictions showed that the type of procedure (15.4%), medical history (12.9%) and procedure duration (12.0%) were the top three features contributing to model predictions. Overall, the contribution of patient and procedure features towards model predictions were 65% and 35% respectively. Machine learning models could be used to predict postoperative opioid requirements in ambulatory surgery patients and could potentially assist in better management of their postoperative acute pain.Entities:
Mesh:
Substances:
Year: 2020 PMID: 32735604 PMCID: PMC7394436 DOI: 10.1371/journal.pone.0236833
Source DB: PubMed Journal: PLoS One ISSN: 1932-6203 Impact factor: 3.240
Fig 1Inclusion and exclusion criteria used to select the cohort for the study are shown.
The total count of patients, the number of exclusions and the final count of patients are shown.
Parameters used in prediction models.
The parameters marked in green were used for postoperative opioid requirements prediction prior to surgery and parameters marked in blue were added to the prediction models to perform a postoperative opioid requirements prediction at the end of surgery.
| Patient specific parameters | Procedure specific parameters |
|---|---|
| Age | Surgical specialty |
| Gender | Procedure type (scheduled) |
| Body Mass index (BMI) | Procedure duration (estimated) |
| Race | Preoperative holding area opioids |
| ASA physical status | Preoperative holding area other drugs (Acetaminophen, Gabapentin, Celecoxib) |
| Medical history or anomalies | Preoperative pain levels |
| • Cardiac | Anesthesia method |
| • Pulmonary | • Endotracheal general anesthesia |
| • Renal | • Laryngeal mask airway |
| • Endocrine (diabetes) | • Total intravenous anesthesia |
| • Musculoskeletal | Inhalation agents (type and duration) |
| • Hepatic | Intraoperative opioids (MME) |
| • Neurological | Other intraoperative meds |
| • Cancer | • Acetaminophen |
| • Sleep apnea (Diagnosed or at risk) | • Ketamine |
| • Chronic pain | • Ketorolac |
| Social history | • Naloxone |
| • Smoking status | • Esmolol infusion |
| • Alcohol abuse | • Lidocaine infusion |
| • Drug abuse | • Propofol infusion |
| Psychiatric/Neurological issues | Patient position |
| • Anxiety | Local infiltration |
| • Depression | Input fluids (Crystalloids, colloids, blood) |
| • Post-traumatic stress disorder (PTSD) | Output fluids (Urine, blood loss, gastric output) |
| • Spinal cord injury | |
| Home medications | Providers |
| • On opioids | • Surgeon |
| • On non-opioid pain medications | • Anesthesiologist |
Mean postoperative MME requirements for different peak pain levels in PACU.
| Peak Pain in PACU | Mean Postoperative MME | MME ranges for opioid requirement categories |
|---|---|---|
| No pain (Pain score = 0) | 1 | None/very low: 0–3 |
| Mild (Pain score 1–3) | 5 | Low: 3–11 |
| Moderate (Pain score 4–6) | 17 | Medium: 11–25 |
| Severe (Pain score 7–10) | 34 | High: > 25 |
Fig 2The concept of using aggregate model prediction for model validation is shown.
The models predicted probabilities of postoperative opioid requirements in four buckets None/very low, Low, Medium and High. For model validation, the ability to predict within two adjacent buckets (None + Low, Low + Medium, Medium + High) was considered. The aggregate prediction bucket that had the highest combined prediction probability was considered as the model prediction. The predicted aggregate bucket was compared against the bucket corresponding to the actual opioid requirement for estimating the model accuracy.
Primary patient and procedure characteristics observed in the overall (N = 13,700), training (N = 10,960) and testing (N = 2740) datasets.
Proportions are presented for categorical variables while mean ± standard deviation (SD) are shown for continuous variables. The comparison of characteristics between the training and testing datasets is also presented.
| Overall (N = 13,700) | Train (N = 10,960) | Test (N = 2740) | diff | |||||
|---|---|---|---|---|---|---|---|---|
| Characteristics | Counts | Proportions /Mean ± SD | Counts | Proportions /Mean ± SD | Counts | Proportions /Mean ± SD | p-value | |
| Age (years) | 51 ± 17 | 52 ± 17 | 51 ± 17 | 0.43 | ||||
| • Geriatric (Age≥65y) | 3,352 | 24% | 2,683 | 24% | 669 | 24% | ||
| Sex: | ||||||||
| • Male | 5,699 | 42% | 4,556 | 42% | 1,143 | 42% | ||
| • Female | 8,001 | 58% | 6,404 | 58% | 1,597 | 58% | 0.91 | |
| Race: | ||||||||
| • White | 11,355 | 83% | 9,062 | 83% | 2,293 | 84% | 0.22 | |
| • African American | 640 | 5% | 527 | 5% | 113 | 4% | 0.14 | |
| • Asian | 1,040 | 7% | 845 | 8% | 195 | 7% | 0.31 | |
| • Other | 665 | 5% | 526 | 5% | 139 | 5% | 0.58 | |
| BMI (kg/m2) | 28.4 ± 7.2 | 28.4 ± 7.2 | 28.5 ± 7.2 | 0.67 | ||||
| • Obese (BMI>30) | 4,094 | 30% | 3,259 | 30% | 835 | 30% | ||
| ASA physical status | ||||||||
| • ASA ≥ 3 | 4,740 | 35% | 3,791 | 35% | 949 | 35% | 0.98 | |
| Medical history or anomalies | ||||||||
| • Cardiac | 5487 | 40% | 4,393 | 40% | 1094 | 40% | 0.90 | |
| • Pulmonary | 3,647 | 27% | 2,907 | 27% | 740 | 27% | 0.63 | |
| • Renal | 1,978 | 14% | 1,609 | 15% | 369 | 13% | 0.11 | |
| • Endocrine (diabetes) | 1,624 | 12% | 1,313 | 12% | 311 | 11% | 0.38 | |
| • Musculoskeletal | 6,874 | 50% | 5,536 | 51% | 1,338 | 49% | 0.12 | |
| • Hepatic | 647 | 5% | 511 | 5% | 136 | 5% | 0.54 | |
| • Neurological | 6,088 | 44% | 4,872 | 44% | 1,216 | 44% | 0.96 | |
| • Cancer | 4,902 | 36% | 3,898 | 36% | 1,004 | 37% | 0.30 | |
| • Sleep apnea (diagnosed or at risk) | 6,470 | 47% | 5,198 | 47% | 1,272 | 46% | 0.36 | |
| • Chronic pain | 516 | 4% | 409 | 4% | 107 | 4% | 0.71 | |
| Social history | ||||||||
| • Smoking status | 1,303 | 10% | 1,038 | 9% | 265 | 10% | 0.78 | |
| • Alcohol abuse | 1,692 | 12% | 1,355 | 12% | 337 | 12% | 0.95 | |
| • Drug abuse | 1,310 | 10% | 1,023 | 9% | 287 | 10% | 0.08 | |
| Psychiatric/Neurological issues | ||||||||
| • Anxiety | 3,521 | 26% | 2,781 | 25% | 740 | 27% | 0.08 | |
| • Depression | 3,342 | 24% | 2,642 | 24% | 700 | 26% | 0.12 | |
| • Post-traumatic stress disorder (PTSD) | 326 | 2.4% | 253 | 2.3% | 73 | 2.7% | 0.31 | |
| • Spinal cord injury | 255 | 1.9% | 204 | 1.9% | 51 | 1.9% | 1.00 | |
| Home medications | ||||||||
| • On opioids | 3,107 | 23% | 2,463 | 22% | 644 | 24% | 0.26 | |
| • On non-opioid pain medications | 7,116 | 52% | 5,682 | 52% | 1,434 | 52% | 0.66 | |
| Surgical specialty | ||||||||
| • General | 2,955 | 22% | 2,352 | 21% | 603 | 22% | 0.55 | |
| • Neurological | 676 | 5% | 544 | 5% | 132 | 5% | 0.79 | |
| • Orthopedic | 1,091 | 8% | 872 | 8% | 219 | 8% | 0.98 | |
| • Gynecology | 1,436 | 10% | 1,147 | 10% | 289 | 11% | 0.93 | |
| • ENT | 2,511 | 18% | 2,016 | 18% | 495 | 18% | 0.71 | |
| • Urology | 1,999 | 15% | 1,606 | 15% | 393 | 14% | 0.70 | |
| • Thoracic | 504 | 4% | 408 | 4% | 96 | 4% | 0.63 | |
| • Vascular | 167 | 1% | 140 | 1% | 27 | 1% | 0.25 | |
| • Plastic | 1,619 | 12% | 1,302 | 12% | 317 | 12% | 0.68 | |
| • Oral | 400 | 3% | 306 | 3% | 94 | 3% | 0.09 | |
| Surgery duration (min) | 75 ± 56 | 75 ± 56 | 75 ± 55 | 0.86 | ||||
BMI–Body Mass Index, ASA–American Society of Anesthesiologists, ENT–Ear Nose Throat.
Fig 3Bivariate relationships between preoperative features and postoperative MME opioid requirements are shown.
Only statistically significant (p < 0.05) relations are shown with standard estimate (Std Estimate) representing the strength of the relationship. The positive and negative relations are show in green and red colors respectively.
Prediction accuracies of different models prior to surgery and at the end of surgery are presented.
The models utilized preoperative factors for predictions prior to surgery while the end of surgery predictions used both preoperative and intraoperative factors.
| Validation Data Set: N = 2740 | ||||
|---|---|---|---|---|
| Observed Opioid Requirements in Validation Data Set | ||||
| None | Low | Medium | High | |
| 1,290 (47%) | 409 (15%) | 536 (20%) | 505 (18%) | |
| Model | ||||
| Multinomial Logistic Regression | ||||
| Naïve Bayes | ||||
| Neural Network | ||||
| Random Forest | ||||
| Extreme Gradient Boost | ||||
Detailed prediction accuracies of random forest model for different categories of surgeries and aggregate opioid requirements.
Prediction accuracies prior to and after surgery are shown.
| Surgical Specialty | Mean opioid requirement (MME) | Accuracy | |
|---|---|---|---|
| Beginning of surgery | End of surgery | ||
| 12.1 ± 17.8 | |||
| 11.0 ± 17.2 | |||
| 12.6 ± 25.1 | |||
| 7.7 ± 17.1 | |||
| 19.7 ± 21.2 | |||
| 11.3 ± 25.4 | |||
| 20.0 ± 23.4 | |||
| 2.9 ± 8.4 | |||
| 6.8 ± 14.4 | |||
| 16.2 ± 25.2 | |||
| 12.2 ± 20.7 | |||
Recall and precision of random forest model predicting aggregate opioid requirements.
Prediction results prior to surgery are shown.
| Recall | Precision | ||||
|---|---|---|---|---|---|
| None + Low | Low + Medium | Medium + High | None + Low | Low + Medium | Medium + High |
| (N = 945) | (N = 1041) | (N = 1699) | (N = 945) | (N = 1041) | |
Confusion matrix for each category of opioid requirement with true positive, true negative, false positive and false negative counts are shown.
Also, presented are the True Positive Rate (TPR), False Negative Rate (FNR), False Positive Rate (FPR) and True Negative Rate (TNR). Positive Predictive Value (PPV), False Omission Rate (FOR), False Discovery Rate (FDR) and Negative Predictive Value (NPV) are also presented.
| 1500 | 199 | 1699 | TPR | 88% | FNR | 12% | ||
| 572 | 469 | 1041 | FPR | 55% | TNR | 45% | ||
| 2072 | 668 | 2740 | ||||||
| PPV | FOR | |||||||
| 72% | 30% | |||||||
| FDR | NPV | |||||||
| 28% | 70% | |||||||
| 43 | 902 | 945 | TPR | 5% | FNR | 95% | ||
| 43 | 1752 | 1795 | FPR | 2% | TNR | 98% | ||
| 86 | 2654 | 2740 | ||||||
| PPV | FOR | |||||||
| 50% | 34% | |||||||
| FDR | NPV | |||||||
| 50% | 66% | |||||||
| 423 | 618 | 1041 | TPR | 41% | FNR | 59% | ||
| 159 | 1540 | 1699 | FPR | 9% | TNR | 91% | ||
| 582 | 2158 | 2740 | ||||||
| PPV | FOR | |||||||
| 73% | 29% | |||||||
| FDR | NPV | |||||||
| 27% | 71% | |||||||
Feature importance of Random Forest Model explaining the relative importance of various features contributing to predictions of opioid requirements.
Similar features are consolidated.
| Features | Relative importance |
|---|---|
| Procedure type | |
| Medical History (Cardiac/Pulmonary/Neurological/Hepatic/Endocrine/Musculoskeletal/Renal/Cancer) | |
| Procedure Duration | |
| Age | |
| Surgical specialty | |
| Body Mass Index | |
| Home and preoperative pain medications (Opioid/Non opioid) | |
| Preoperative Pain Levels | |
| ASA Physical Status | |
| Race | |
| Social History (Tobacco/Alcohol/Recreational Drug Use) | |
| Psychiatric/Neurological issues (Anxiety/Depression/PTSD/Spinal Cord Injury) | |
| History or risk for sleep apnea | |
| Gender | |
| History of Chronic Pain |