The proposed study will include 3 large diverse healthcare systems and randomize a minimum of 30 clinics equally within each system to receive the OUD-CDS intervention or UC. In intervention and UC clinics, the OUD-CDS will identify study-eligible patients, those who are at high risk for OUD or diagnosed with OUD; and will use data stored in the EHR to assemble treatment recommendations tailored to the needs of each study-eligible patient. In intervention clinics, these treatment recommendations will be displayed via the OUD-CDS user interface. Finally, data from all targeted visits in all randomized clinics will be stored in a data repository for analysis and reporting needs. The targeted visits for each study-eligible patient in all randomized clinics will be the index visit, the first visit at which the OUD-CDS identifies that the patient is study eligible, and all post-index visits through the end of the intervention period, regardless of continued eligibility. This pragmatic cluster-randomized design is the optimal design to effectively and efficiently implement this tool in primary care clinics while protecting against study contamination and allowing for collection of process and outcome data at UC clinics.

Mixed Methods Approach: Virtually every evidence-based intervention in medicine has turned out to be difficult to implement and maintain in real life practice and to fall far short of fidelity to the process used in randomized trials. As a result, a whole new field of dissemination and implementation research has been developing over the last 20 years. These studies have now gone well beyond the previous paradigm of focusing on changing the attitudes and behaviors of individual physicians to a growing awareness that the need instead is to alter the environment in which physicians work so that it is easier to do the desired evidence-based thing than to stick with old established habit patterns. That means focusing change efforts on organizational factors and practice systems. The Solberg conceptual framework has proven to be particularly helpful in clarifying this new approach.

Simultaneously, there has been increasing interest in transitioning effectiveness clinical trials from traditionally highly selective and controlled circumstances to pragmatic trials that make use of normal care delivery processes and patients.\[35\] The measurement of such trials has been facilitated by the development of a conceptual framework called RE-AIM, an acronym for 5 key facets of such studies - Reach, Effectiveness, Adoption, Implementation, and Maintenance. Recently, the developers of RE-AIM have recognized the need for more flexible use of this framework, greater use of qualitative methods to understand why interventions are not used consistently, and making adaptations in the implementation approach based on such understandings. The investigators propose to use the RE-AIM framework to guide (1) a monitoring system for intervention problems, (2) a mixed methods evaluation of the reasons for those problems, and (3) modification of the intervention to reduce those problems. These steps will be reiterated in a cyclic fashion, resulting in a more sophisticated approach to the long-standing quality improvement emphasis on Plan-Do-Study-Act rapid cycle tests of change. Furthermore, the team will take advantage of the staggered implementation of the study through three different care systems to ensure that the solutions for intervention problems in Site 1 are not assumed to be the same as the approach in subsequent sites without further RE-AIM monitoring and evaluation.