IDEAS home Printed from https://ideas.repec.org/a/plo/pdig00/0001190.html

Development and evaluation of machine learning algorithms for the prediction of opioid-related deaths among UK patients with non-cancer pain

Author

Listed:
  • Jose Benitez-Aurioles
  • Carlos Raul Ramirez Medina
  • David Jenkins
  • Niels Peek
  • Meghna Jani

Abstract

The global rise in prescription opioid use has contributed to an opioid epidemic, associated harms, and unintentional deaths in several western countries. Opioids however continue to be regularly prescribed for acute pain and in the chronic pain context due to limited treatment options. Currently there are no accurate tools that help predict which patients prescribed opioids may be at risk of death, which depends on the cultural context and varies across countries. Existing models do not account for statistical considerations such as censoring and competing risks. Using nationally representative data from the United Kingdom from 1,026,139 patients newly prescribed an opioid, we developed three competing risk time-to-event models: a regression model, a random forest, and a deep neural network to predict opioid-related deaths using UK primary care records. The models were externally validated in an external cohort of 337,015 patients. The models exhibited good discrimination and positive predictive value during internal validation (C-statistic for the regression model, random forest, and neural network: 84.3%, 84.4% and 82.1% respectively), and external validation (C-statistic for the regression model, random forest, and neural network: 81.8%, 81.5% and 81.5% respectively). Prior substance abuse, lung and liver comorbidities, morphine, fentanyl, or oxycodone at initiation and co-prescription of gabapentinoids were some of candidate predictors associated with a higher risk of opioid-related mortality within the models. These results demonstrate how routinely collected data from a nationally representative dataset may be used to develop and validate opioids risk algorithms to better help clinicians and patients predict risk to this serious adverse outcome.Author summary: The rising use of prescription opioids has led to serious health concerns, including a growing number of preventable deaths. Yet, opioids remain a common treatment for pain, leaving doctors and patients with a difficult balance between benefits and risks. There are no accurate tools to identify which patients prescribed opioids for non-cancer pain may face a higher risk of dying from them. Using electronic health records from over one million people in the United Kingdom who were newly prescribed an opioid, we created and tested three different prediction models, including different types of machine learning. We were able to accurately define opioid-associated deaths from information presented on death certificates. These models used information such as medical history, other medications taken at the same time, and the type/ dose of opioid prescribed to estimate an individual’s risk of opioid-related death. We found that all three models performed well, both when tested on the original data and when tested on a separate group of patients. We developed and validated risk prediction tools to predict the most serious adverse event to opioids for the first time using nationally representative data. These could help guide safer prescribing decisions and support conversations between patients and healthcare professionals about opioid use.

Suggested Citation

  • Jose Benitez-Aurioles & Carlos Raul Ramirez Medina & David Jenkins & Niels Peek & Meghna Jani, 2026. "Development and evaluation of machine learning algorithms for the prediction of opioid-related deaths among UK patients with non-cancer pain," PLOS Digital Health, Public Library of Science, vol. 5(1), pages 1-20, January.
  • Handle: RePEc:plo:pdig00:0001190
    DOI: 10.1371/journal.pdig.0001190
    as

    Download full text from publisher

    File URL: https://journals.plos.org/digitalhealth/article?id=10.1371/journal.pdig.0001190
    Download Restriction: no

    File URL: https://journals.plos.org/digitalhealth/article/file?id=10.1371/journal.pdig.0001190&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pdig.0001190?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pdig00:0001190. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: digitalhealth (email available below). General contact details of provider: https://journals.plos.org/digitalhealth .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.