By accurately predicting which patients are at highest risk for severe pain after surgery, anesthesiologists and surgeons can adjust pain relief options ahead of time, actually decreasing the need for opioids after surgery and reducing the later risk for addiction.

“The idea would be to maximize non-opioid strategies,” Mieke Soens, an anesthesiologist at Brigham and Women’s Hospital in Boston and the study’s lead researcher, told BioWorld.

Non-opioid pain treatment alternatives include, among other things, nerve blocks and epidurals. However, the use of opioid alternatives can be costly, and sometimes risky, so they need to be targeted to the patients most likely to benefit, Soens explained.

At the meeting, which was held virtually by the American Society of Anesthesiologists, researchers from Brigham and Women’s Hospital shared results of a pilot study demonstrating how they were able to successfully identify surgical patients who would most need pain medication using three algorithms that analyzed predictive information within the patients’ electronic health record.

Each of the three types of machine learning algorithms tested – logistic regression, random forest and artificial neural networks – were able to identify patients with the highest post-surgery pain needs with about 80% accuracy.

This novel tool is the first step to creating personalized pain treatments for patients undergoing surgery, according to the researchers.

Assessing model accuracy

A lot of research has already been done to help predict which patients are at risk for severe pain following surgery, but few hospitals use the extensive, validated questionnaires to help identify these patients before surgery.

“The administration of the questionnaires is cumbersome and time-consuming,” Soens said.

Soens and her colleagues decided to explore how to leverage the use of electronic health records, which contain most or all the necessary predictive data, to identify pain management needs in pre-surgical patients in a more efficient way.

They examined data from 5,944 patients undergoing surgery under general anesthesia without peripheral nerve block at Brigham and Women’s Hospital. They excluded patients who were undergoing cardiac surgery or obstetrics procedures. About 22% (1,287 patients) had taken a high dose of opioids in the first 24 hours after surgery – 90 morphine milligram equivalent (MME).

In the first part of the pilot study, the researchers used a literature search and consultation with experts to identify 163 factors that could potentially help predict severe pain after surgery. They then developed three machine learning algorithm models to narrow down the number of predictors and mine the patients’ electronic health record for that data.

The researchers found that the most predictive factors for identifying patients at high risk for severe pain were age, higher body mass index, female gender, type of surgery, pre-existing pain, and prior opioid use.

In the second part of the study, the researchers compared how the three algorithm models were able to predict the actual opioid use in the first 24 hours after surgery. The comparison was made using Area under the Receiver Operating Characteristic curve (AUROC) and F1 metrics.

All three models performed similarly, at about 80% accuracy, Soens reported. The logistic regression and random forest models performed slightly better with an accuracy of 81% for both, compared with the artificial neural networks model, which had an accuracy of 80%.

Soens said this level of accuracy is comparable to existing published predictive models that rely on questionnaire data, but that with additional work the accuracy of the machine learning models could be improved. The researchers plan to use deep learning techniques so that the algorithm can automatically discover new predictors within the electronic health record without clinicians having to pre-identify the candidate predictors.

Next steps

Over the next few months, Soens and her colleagues are planning to validate the findings at another Boston hospital. Once the accuracy of the algorithms has been validated, they plan to integrate the models into their hospital’s electronic health record system for clinical use.

The idea is that once these models are integrated with the electronic health record system, the system would simply generate a score to be shared with the anesthesiologist and the surgeon indicating whether a patient is at higher risk for requiring high doses of opioids after surgery, Soens explained.

Soens said they are ultimately looking to partner with electronic health record vendors to make this capability available across systems.

Nebojsa Nick Knezevic, who moderated the session at the Anesthesiology annual meeting, lauded the quality of the research and told BioWorld he would be “thrilled” to see it applied to clinical practice.

However, Knezevic, who is a clinical professor of anesthesiology and surgery at the University of Illinois and vice chairman for research and education at Advocate Illinois Masonic Medical Center, said there are still some questions that need to be answered before this type of machine learning would be ready for the real-world setting.

Specifically, the models need to be tested in a prospective, rather than retrospective setting, and future studies should include patients who receive regional anesthesia and nerve blocks during surgery. Finally, he questioned whether the electronic health record would have a sufficient amount of data to calculate risk for all patients.