Related Experiment Video
Updated: Oct 3, 2025

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Efficiently identifying individuals at high risk for treatment resistance in major depressive disorder using
Isaac Lage1, Thomas H McCoy2, Roy H Perlis2
1Harvard John A. Paulson School of Engineering and Applied Sciences, Harvard University, 29 Oxford Street, 1 Oxford St, Science Center, 316.04, Cambridge, MA 02138, USA.
Background:
With the emergence of evidence-based treatments for treatment-resistant depression, strategies to identify individuals at greater risk for treatment resistance early in the course of illness could have clinical utility. We sought to develop and validate a model to predict treatment resistance in major depressive disorder using coded clinical data from the electronic health record.
Methods:
We identified individuals from a large health system with a diagnosis of major depressive disorder receiving an index antidepressant prescription, and used a tree-based machine learning classifier to build a risk stratification model to identify those likely to experience treatment resistance. The resulting model was validated in a second health system.
Results:
In the second health system, the extra trees model yielded an AUC of 0.652 (95% CI: 0.623-0.682); with sensitivity constrained at 0.80, specificity was 0.358 (95% CI: 0.300-0.413). Lift in the top quintile was 1.99 (95% CI: 1.76-2.22). Including additional data for the 4 weeks following treatment initiation did not meaningfully improve model performance.
Limitations:
The extent to which these models generalize across additional health systems will require further investigation.
Conclusion:
Electronic health records facilitated stratification of risk for treatment-resistant depression and demonstrated generalizability to a second health system. Efforts to improve upon such models using additional measures, and to understand their performance in real-world clinical settings, are warranted.
Related Concept Videos
Methods of Documentation VII: EMR
Antidepressant Drugs: MAOIs and Other Agents
Electroconvulsive Therapy

