Dynamic Decision Support Tools for Precision Treatment-Resistant Depression Care - Depressed patients who fail to respond to >2 antidepressants are burdened by treatment-resistant depression (TRD) and endure lengthy trial-and-error attempts on multiple treatment regimes while at risk for poor outcomes. Clinicians lack decision support tools to select initial or subsequent TRD treatments in part because predictors of treatment response are considered static (time-fixed), despite varying over time. Clinical decision support systems (CDSS) called for in MH-25-190 need dynamic treatment regimes (DTRs): sequences of rules that dynamically update response predictions as information accumulates. We will achieve this with: 1. Electronic Health, Patient-Reported Outcome, and Digital Biomarker Data on >10,000 TRD Patients Annually; 2. Advanced Causal Inference and Target Trial Emulation to Control for Time-Varying Confounding; and a 3. Sequential Multiple Assignment Randomized Trial (SMART) to Optimize Dynamic Decision Support Rules in: Aim 1. Pipeline to Identify Dynamic Treatment Regimes (DTRs) for Clinical Decision Support Systems TRD regimes received by >10,000 TRD outpatients in >85,000 visits annually, will include: medication management (e.g., combining, switching, or augmenting antidepressants); rTMS; psychotherapies; and esketamine or ketamine. We will create a pipeline to: a) generate features from electronic health, patient-reported outcome, and raw digital biomarker data; b) filter features; c) control for time-varying confounding with advanced causal inference; d) evaluate dynamic prediction rules to classify patients according to treatments they are likely to benefit from; and e) empirically design a CDSS with optimal DTRs for TRD. Aim 2. Target Trial Emulation (TTE) of the Clinical Decision Support System (CDSS) for TRD Although milestones (e.g., AUROC> .8) will be used to analytically validate models in Aim 1, they cannot estimate clinical benefits of using a CDSS to select treatments v. usual trial-and-error care. Before committing to a randomized trial, target trial emulation (TTE) is a gold standard way to first use observational data to evaluate comparative effectiveness. We will employ TTE to compare using DTRs in a CDSS to select TRD treatments v. usual trial-and-error care; milestones from our TTE (e.g., Cohen’s d for CDSS-informed care >.5) will determine if we proceed with user-centered design of a CDSS and testing in the randomized effectiveness trial in Aim 3. Aim 3. Effectiveness Trial of Clinical Decision Support System (CDSS)-Informed vs. Usual TRD Care We will conduct an effectiveness trial in which 1,000 TRD patients are randomized to a CDSS with optimal DTRs from a SMART v. usual trial-and-error care. On-line (live and in real-time) reinforcement learning models will use past and current tailoring variables to predict an individual’s response to treatments in the next interval, and also adapt based upon prior participants’ responses. We will compare both arms on distal outcomes (i.e., ER visits or hospitalizations for depression; all-cause and suicide deaths), and work with NIMH/FDA to ensure the trial serves as a “Real-World Performance” review for FDA Software as a Medical Device designation.