The Future Role of Artificial Intelligence in Predicting Opioid Use

Feb 1, 2021, 01:05 AM by Rodney A. Gabriel, MD, MAS

The United States is in the midst of an opioid epidemic with the volume of opioid-related deaths having risen six-fold over the last 20 years.1 In 2015, opioid prescribing was three times higher than in 1999, and approximately 2 million Americans suffered from an opioid use disorder related to prescription opioids.2 With the recent interest in implementing artificial intelligence into clinical decision making, newer solutions to reduce postoperative opioid use have expanded. The presence of “big data” within the electronic medical record system allows the potential to optimize machine learning applications to this space.


Predictive analytics may be intelligently applied to hospital data.


But why apply artificial intelligence to aid in predicting which patients will require higher doses of postoperative opioids? We first should decide if there would be additional interventions that may be uniquely applied to patients who are considered high risk. Such interventions could include automatic postoperative pain consultations in both the inpatient and outpatient setting, additional regional anesthesia modalities (e.g., cryoanalgesia, peripheral nerve stimulation, perineural continuous catheters), tailored multimodal opioid-sparing analgesia plans (including ketamine or lidocaine infusions), or additional patient education programs. As it is not always possible to provide these resources to all patients, it may be more efficient and impactful if such interventions were personalized to higher-risk patients.

The next question is, how we can identify patients who are high risk? A simple answer is to choose those patients who are already opioid-tolerant; however, this is only a small portion of surgical patients. This is where machine-learning-driven algorithms can really shine and furthermore be integrated into an electronic medical record system. Predictive analytics may be intelligently applied to hospital data.

Patients undergoing total joint arthroplasty (TJA) represent a surgical population that would benefit in the application of artificial intelligence for predicting long-term opioid use. It is one of the most common surgical procedures performed in the United States.4 In this population, opioids have been the primary mode of postoperative pain management.4,5 This means that more individuals will be exposed to opioids and at risk of chronic use as the volume of TJAs increase annually. Several studies have investigated risk factors for persistent opioid use following TJA. Preoperative opioid use is consistently found to increase the risk of postoperative chronic use.6-9 Other factors associated with postoperative chronic opioid use include history of depression, higher baseline pain scores, younger age, and female gender.6-9 Additional research is needed to better understand these risk factors and develop tools to systematically predict this outcome. Currently, limited research exists that has investigated the utility of machine-learning algorithms in predicting chronic opioid use. By using machine-learning algorithms to create a predictive tool capable of identifying at-risk patients, these individuals can be targeted more accurately for early and personalized intervention.

Additional research is needed to guide integration of predictive models into clinical practice and understand which perioperative strategies are most effective in reducing risk in vulnerable populations.

Dr. Rodney Gabriel


Rodney A. Gabriel, MD, MAS, is the chief of the Division of Regional Anesthesia and Acute Pain Medicine, medical director of Koman Outpatient Pavilion Ambulatory Surgery Center, associate professor of Anesthesiology, and associate adjunct professor of Biomedical Informatics at the University of California, San Diego.



  1. Centers for Disease Control and Prevention, National Center for Health Statistics. Wide-ranging online data for epidemiologic research (WONDER). 2020. Atlanta, GA.
  2. Guy GP, Jr., Zhang K, Bohm MK, et al. Vital signs: changes in opioid prescribing in the United States, 2006-2015. MMWR Morb Mortal Wkly Rep. 2017;66:697-704.
  3. Wilson N, Kariisa M, Seth P, Smith Ht, Davis NL. Drug and opioid-involved overdose deaths - United States, 2017-2018. MMWR Morb Mortal Wkly Rep. 2020;69:290-7.
  4. Maradit Kremers H, Larson DR, Crowson CS, et al. Prevalence of total hip and knee replacement in the United States. J Bone Joint Surg Am. 2015;97:1386-97.
  5. Kurtz S, Ong K, Lau E, Mowat F, Halpern M. Projections of primary and revision hip and knee arthroplasty in the United States from 2005 to 2030. J Bone Joint Surg Am. 2007;89:780-5.
  6. Goesling J, Moser SE, Zaidi B, et al. Trends and predictors of opioid use after total knee and total hip arthroplasty. Pain. 2016;157(6):125901265.
  7. Inacio MC, Hansen C, Pratt NL, Graves SE, Roughead EE. Risk factors for persistent and new chronic opioid use in patients undergoing total hip arthroplasty: a retrospective cohort study. BMJ Open. 2016;6(4):e010664.
  8. Bedard NA, Pugely AJ, Dowdle SB, Duchman KR, Glass NA, Callaghan JJ. Opioid use following total hip arthroplasty: trends and risk factors for prolonged use. J Arthroplasty. 2017;32:3675–9.
  9. Bedard NA, Pugely AJ, Westermann RW, Duchman KR, Glass NA, Callaghan JJ. Opioid use after total knee arthroplasty: trends and risk factors for prolonged use. J Arthroplasty. 2017;32:2390–94.


Load more comments
New code
Comment by from
Close Nav