PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
January 24, 2026JMIR Medical Informatics2 citationsOpen Access

Machine Learning Prediction of Pharmacogenetic Testing Uptake Among Opioid-Prescribed Patients Using Electronic Health Records: Retrospective Cohort Study

View Full Paper
MYMohammad YaselianiFlorida Museum of Natural HistoryJHJe-Won HongUniversity of FloridaJBJiang BianRegenstrief Institute

Key Points

  • The study aims to develop machine learning models to predict pharmacogenetic testing uptake among patients prescribed opioids based on various factors.
  • Utilized electronic health record data from a single health care system.
  • Developed and validated machine learning models including neural network, logistic regression, and random forest.
  • Performed 5-fold cross-validation and created an ensemble probability-based classifier.
  • Evaluated model performance using various metrics and feature importance analysis.
  • The ensemble model achieved the highest C-statistic at 79.61% for predicting test uptake.
  • XGB was the best-performing individual model with an accuracy of 67.38%.
  • The model identified age, hypertension, and household income as key factors influencing uptake.
  • Higher uptake probabilities were observed in patients ranked in the top decile compared to the lowest.

Abstract

Abstract Background Opioids are a widely prescribed class of medication for pain management. However, they have variable efficacy and adverse effects among patients, due to the complex interplay between biological and clinical factors. Pharmacogenetic testing can be used to match patients’ genetic profiles to individualize opioid therapy, improving pain relief and reducing the risk of adverse effects. Despite its potential, the pharmacogenetic testing uptake (use of pharmacogenetic testing) remains low due to a range of barriers at the patient, health care provider, infrastructure, and financial levels. Since testing typically involves a shared decision between the provider and patient, predicting the likelihood of a patient undergoing pharmacogenetic testing and understanding the factors influencing that decision can help optimize resource use and improve outcomes in pain management. Objective This study aimed to develop machine learning (ML) models, identifying patients’ likelihood of pharmacogenetic uptake based on their demographics, clinical variables, medication use, and social determinants of health. Methods We used electronic health record data from a single center health care system to identify patients prescribed opioids. We extracted patients’ demographics, clinical variables, medication use, and social determinants of health, and developed and validated ML models, including a neural network, logistic regression, random forest, extreme gradient boosting (XGB), naïve Bayes, and support vector machines for pharmacogenetic testing uptake prediction based on procedure codes. We performed 5-fold cross-validation and created an ensemble probability-based classifier using the best-performing ML models for pharmacogenetic testing uptake prediction. Various performance metrics, uptake stratification analysis, and feature importance analysis were used to evaluate the performance of the models. Results The ensemble model using XGB and support vector machine–radial basis function classifiers had the highest C -statistics at 79.61%, followed by XGB (78.94%), and neural network (78.05%). While XGB was the best-performing model, the ensemble model achieved a high accuracy (32,699/48,528, 67.38%), recall (537/702, 76.50%), specificity (32,162/47,826, 67.25%), and negative predictive value (32,162/32,327, 99.49%). The uptake stratification analysis using the ensemble model indicated that it can effectively distinguish across uptake probability deciles, where those in the higher strata are more likely to undergo pharmacogenetic testing in the real world (320/4853, 6.59% in the highest decile compared to 6/4853, 0.12% in the lowest). Furthermore, Shapley Additive Explanations value analysis using the XGB model indicated age, hypertension, and household income as the most influential factors for pharmacogenetic testing uptake prediction. Conclusions The proposed ensemble model demonstrated a high performance in pharmacogenetic testing uptake prediction among patients using opioids for pain. This model can be used as a decision support tool, assisting clinicians in identifying patients’ likelihood of pharmacogenetic testing uptake and guiding appropriate decision-making.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Yaseliani et al. (2026) studied this question.

synapsesocial.com/papers/69746149bb9d90c67120b24dhttps://doi.org/10.2196/81048
Ask AI
Helpful
Bookmark
Share
View Full Paper