The addictive potential and increasing use of prescription opioids have made it necessary to promote strategies to prevent prescription opioid use disorder (POUD). The heterogeneity of cases makes the use of sophisticated techniques essential for early detection. Objective: To develop, using artificial intelligence techniques, a predictive model for POUD risk in chronic non‑cancer pain (CNCP), and to evaluate its implementation within the National Health System.
Methods: National collaborative project (6 Autonomous Communities) structured in 3 phases.
Phase 1. Accessibility of the Web/App Model Using Shiny and ShinyMobile
Development and deployment of an accessible digital platform (web and mobile) implementing the predictive model.
Phase 2. Evaluation of Clinical Implementation
Design: Randomized, double‑blind, controlled trial (DCNO; n = 210; assessments at baseline and 3 months). Intervention: Opioid dose selection and/or adjustment guided by the predictive model vs. standard clinical practice. Additional Components:
Integration of biomolecular markers
Analysis of sex/gender interaction effects
Communication and dissemination of results
Training and educational activities
Analyses:
Predictive performance of the model
Improvements using supervised machine‑learning techniques
Cost‑effectiveness evaluation from the perspective of the National Health System (SNS)
Expected Clinical Impact
The clinical translation of the model will support a more efficient use of prescription opioids, increasing safety, efficacy, adherence, and patient quality of life, while contributing to the sustainability of the SNS

