Skip to main content
Conference Insider

Application of Machine Learning to Organize EHR Data

May 2020

Using a case-example of opioid medication classification for use in pain medicine outcomes research, researchers demonstrated in a presentation at the American Academy of Pain Medicine’s 36th Annual Meeting, that the application of machine learning is beneficial to the organization of electronic health record (EHR) systems.

“EHR systems are often constructed for efficient billing and clinical flow, rather than research investigations. This study presents a novel approach to managing the “big-data” within the EHR, utilizing machine learning to minimize time-consuming chart-review,” explained Dean McDermott, MD, University of Pittsburgh, department of anesthesiology and perioperative medicine, and colleagues. 

The study consisted of 4,216 distinct medication entries that were obtained from the EHR of approximately 25,000 pain medicine patients, and subsequently labeled by human reviewers as either opioid or nonopioid medications.

Using a supervised machine learning classification algorithm, entries were either classified as opioids or nonopioids. The algorithm incorporated natural language processing and web-searchers but was never explicated programmed to “identify opioids”, but rather trained with multiple case-examples, thereby “learning” to classify medications appropriately, explained the researchers.

“The algorithm achieved 99.6% accuracy, 97.8% sensitivity, 94.6% positive predictive value, and 0.998 AUC of the ROC curve, for a 60% training/40% testing-set,” Dr McDermott and colleagues found. “Approximately 15 to 20 opioid examples were the minimum needed to achieve 90 to 95% accuracy and sensitivity, with AUC values above 0.95.”

This study demonstrated an algorithm with a high level of accuracy using a practical number of input examples. 

“This illustrates one possible application of machine learning to organize data in the EHR, saving researchers time performing chart-review,” concluded Dr McDermott and colleagues. “Similar approaches could have a multitude of applications in data structuring, predictive analytics, and pattern recognition, thereby advancing research and clinical care in pain medicine and beyond.  —Edan Stanley