Cookies on this website

We use cookies to ensure that we give you the best experience on our website. If you click 'Accept all cookies' we'll assume that you are happy to receive all cookies and you won't see this message again. If you click 'Reject all non-essential cookies' only necessary cookies providing core functionality such as security, network management, and accessibility will be enabled. Click 'Find out more' for information on how to change your cookie settings.

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.

More information Original publication

DOI

10.1038/s41746-026-02709-z

Type

Journal article

Publication Date

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