SurvivEHR: a competing risks, time-to-event foundation model for multiple long-term conditions from primary care electronic health records.

Gadd C., Gokhale K., Acharya A., Cooper J., Crowe F., Fitzsimmons L., Jackson T., Nirantharakumar K., Yau C., OPTIMAL Consortium .

Multiple long-term conditions (MLTCs), or multimorbidity-the co-occurrence of multiple chronic conditions-present a growing challenge for primary care. Existing predictive models typically focus on single outcomes and often fail to capture the temporal and competing-risk structure inherent in longitudinal electronic health records (EHRs). Here, we present SurvivEHR, a generative transformer-based foundation model trained on over 7.6 billion coded events from 23 million patients in UK primary care. SurvivEHR is pre-trained using a competing-risk, time-to-next-event objective, enabling calibrated risk stratification across a broad range of diagnoses, investigations, medications, and mortality events. We show that this pre-training objective yields strong next-event discrimination and learns clinically meaningful patient trajectories. When adapted through fine-tuning, SurvivEHR achieves improved performance on downstream prognostic tasks, including longer-horizon risk prediction, with particular benefits in low-resource settings. By learning longitudinal patient representations directly from routine primary care records, SurvivEHR provides a scalable foundation for developing generalisable clinical risk models that reflect the complexity of MLTCs in primary care.

DOI

10.1038/s41746-026-02709-z

Type

Journal article

Publication Date

2026-05-09T00:00:00+00:00

Permalink More information Close