Student or educator? Sign up with your school email and get 6 months of Pro free.
CoChat

The DOI matches its Crossref record; 37 of the 37 references it cites were found in a registry or an index; 13 of the 15 sources its claims cite were checked for support.

Foresight-a generative pretrained transformer for modelling of patient timelines using electronic health records: a retrospective modelling study

Open access

Abstract

BACKGROUND: An electronic health record (EHR) holds detailed longitudinal information about a patient's health status and general clinical history, a large portion of which is stored as unstructured, free text. Existing approaches to model a patient's trajectory focus mostly on structured data and a subset of single-domain outcomes. This study aims to evaluate the effectiveness of Foresight, a generative transformer in temporal modelling of patient data, integrating both free text and structured formats, to predict a diverse array of future medical outcomes, such as disorders, substances (eg, to do with medicines, allergies, or poisonings), procedures, and findings (eg, relating to observations, judgements, or assessments). METHODS: Foresight is a novel transformer-based pipeline that uses named entity recognition and linking tools to convert EHR document text into structured, coded concepts, followed by providing probabilistic forecasts for future medical events, such as disorders, substances, procedures, and findings. The Foresight pipeline has four main components: (1) CogStack (data retrieval and preprocessing); (2) the Medical Concept Annotation Toolkit (structuring of the free-text information from EHRs); (3) Foresight Core (deep-learning model for biomedical concept modelling); and (4) the Foresight web application. We processed the entire free-text portion from three different hospital datasets (King's College Hospital [KCH], South London and Maudsley [SLaM], and the US Medical Information Mart for Intensive Care III [MIMIC-III]), resulting in information from 811 336 patients and covering both physical and mental health institutions. We measured the performance of models using custom metrics derived from precision and recall. FINDINGS: Foresight achieved a precision@10 (ie, of 10 forecasted candidates, at least one is correct) of 0·68 (SD 0·0027) for the KCH dataset, 0·76 (0·0032) for the SLaM dataset, and 0·88 (0·0018) for the MIMIC-III dataset, for forecasting the next new disorder in a patient timeline. Foresight also achieved a precision@10 value of 0·80 (0·0013) for the KCH dataset, 0·81 (0·0026) for the SLaM dataset, and 0·91 (0·0011) for the MIMIC-III dataset, for forecasting the next new biomedical concept. In addition, Foresight was validated on 34 synthetic patient timelines by five clinicians and achieved a relevancy of 33 (97% [95% CI 91-100]) of 34 for the top forecasted candidate disorder. As a generative model, Foresight can forecast follow-on biomedical concepts for as many steps as required. INTERPRETATION: Foresight is a general-purpose model for biomedical concept modelling that can be used for real-world risk forecasting, virtual trials, and clinical research to study the progression of disorders, to simulate interventions and counterfactuals, and for educational purposes. FUNDING: National Health Service Artificial Intelligence Laboratory, National Institute for Health and Care Research Biomedical Research Centre, and Health Data Research UK.

Overview

CoChat Summary

TL;DR

Foresight is a GPT-2-based generative transformer that converts EHR free text into SNOMED concepts and forecasts future biomedical concepts across three hospital datasets. It achieved high precision@10 for next new disorders and concepts and clinician-rated relevancy on synthetic timelines, but the authors caution it reflects historical practice and is not ready for clinical decision support.

Key findings

  • For forecasting the next new disorder, Foresight achieved precision@10 of 0.68 (SD 0.0027) for KCH, 0.76 (0.0032) for SLaM, and 0.88 (0.0018) for MIMIC-III; for the next new biomedical concept, precision@10 was 0.80 (0.0013), 0.81 (0.0026), and 0.91 (0.0011), respectively.
  • In clinician validation on 34 synthetic patient timelines, the top forecasted candidate disorder was rated relevant in 33 of 34 cases (97% [95% CI 91–100]); overall interannotator agreement was 86%.
  • Forecasting recurring concepts worked better than forecasting new concepts, and an LSTM-based approach performed 40% worse than the GPT-based model on next-concept prediction on the KCH dataset.
  • MedCAT named entity recognition and linking achieved precision 0.9549 (95% CI 0.9519–0.9579), recall 0.8077 (0.8017–0.8137), and F1 0.8752 (0.8702–0.8802) with precision bias; without precision bias, precision was 0.9314 (0.9274–0.9354), recall 0.8959 (0.8909–0.9009), and F1 0.9133 (0.9093–0.9173).

Methods

  • Retrospective modelling study using three EHR datasets: King’s College Hospital (KCH), South London and Maudsley (SLaM), and MIMIC-III; after preprocessing, the study covered 811,336 patients.
  • The Foresight pipeline used CogStack for retrieval/preprocessing, MedCAT for named entity recognition and linking of free text to SNOMED concepts, Foresight Core (a GPT-2-based transformer for causal language modelling over biomedical concept tokens plus structured age, ethnicity, and sex), and a web application. Datasets were split randomly into 95% training and 5% test sets.
  • Performance was measured with precision@N and recall@N (N=1, 5, or 10), where a forecast was considered correct if the concept appeared in a future time range of 30 days, 1 year, or infinity; outputs were filtered to match ground-truth concept type and new versus recurring status. Five clinicians generated 34 synthetic timelines and scored relevancy of forecasted disorders.

Limitations

  • The authors state Foresight is derived from historical common practice, may not match contemporary recommended guidelines, and should not be used for clinical decision support; it prioritises probability over urgency and impact, rare diseases were removed for privacy, hallucinations are possible especially in long simulations, and the dataset does not fully encompass patient history and is weighted toward secondary/tertiary care.
  • The authors state that considerably more tests are needed to validate long simulations forecasting many steps into the future.
  • Evident from the text: evaluation is limited to three datasets—two UK NHS trusts and one US critical care dataset—so generalisability to other settings and populations is not established.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

Crossref · 10.1016/s2589-7500(24)00025-6

Cites

37 of 37 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Figures

Figure 1 The Foresight pipeline EHR=electronic health record. MedCAT=Medical Concept Annotation Toolkit. NER+L=Named Entity Recognition and Linking.
Figure 1 The Foresight pipeline EHR=electronic health record. MedCAT=Medical Concept Annotation Toolkit. NER+L=Named Entity Recognition and Linking.CC BY · PubMed Central
Figure 2 An example of Foresight being used on a patient timeline to forecast diseases, symptoms, and medications The left portion (blue) of the timeline represents the existing historical data for a patient and the right portion (red) are forecasts from Foresight for different biomedical concept types.
Figure 2 An example of Foresight being used on a patient timeline to forecast diseases, symptoms, and medications The left portion (blue) of the timeline represents the existing historical data for a patient and the right portion (red) are forecasts from Foresight for different biomedical concept types.CC BY · PubMed Central
Figure 3 An example of a patient timeline with forecasted disorders Saliency (weight) is shown for the first candidate—normal pressure hydrocephalus. The right side of the timelines (red) was forecasted by Foresight for the input (blue). Irrelevant forecasts are shown in grey.
Figure 3 An example of a patient timeline with forecasted disorders Saliency (weight) is shown for the first candidate—normal pressure hydrocephalus. The right side of the timelines (red) was forecasted by Foresight for the input (blue). Irrelevant forecasts are shown in grey.CC BY · PubMed Central
Figure 4 Generated synthetic timeline examples Generated synthetic timeline examples are shown for the input: Black female aged 43 years (top: KCH model, middle: SLaM model, bottom: MIMIC-III model). The right side of the timelines (in red) was forecasted by Foresight to simulate the medical future of a Black female aged 43 years according to the three different models. The distances in the figures do not represent real temporal distances; only the order of concepts in the timelines is important. KCH=King's College Hospital. MIMIC-III=Medical Information Mart for Intensive Care III. SLaM=South London and Maudsley.
Figure 4 Generated synthetic timeline examples Generated synthetic timeline examples are shown for the input: Black female aged 43 years (top: KCH model, middle: SLaM model, bottom: MIMIC-III model). The right side of the timelines (in red) was forecasted by Foresight to simulate the medical future of a Black female aged 43 years according to the three different models. The distances in the figures do not represent real temporal distances; only the order of concepts in the timelines is important. KCH=King's College Hospital. MIMIC-III=Medical Information Mart for Intensive Care III. SLaM=South London and Maudsley.CC BY · PubMed Central

Verification

Claims the paper makes

11 Valid · 0 Not valid · 1 Not checked · 51 Own results and interpretations

8 more claims

Create a free account to see all 63 claims and every source verdict.

See all claims — free account
  • Probably not a substantial claim. 18
  • It may state two separate claims as one. 43

Create a free account to see these claims.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

1 of 1

Citations

Cites

Show all 28 references

Cited by

See all 169

Metadata

Authors
Kraljevic, Z., Bean, D., Shek, A., Bendayan, R., Hemingway, H., Yeung, J. A., Deng, A., Balston, A., Ross, J., Idowu, E., Teo, J. T., & Dobson, R. J. B.
Affiliations
  • National Health Service (GB)
  • King's College London (GB)
  • University College London Hospitals NHS Foundation Trust (GB)
  • Guy's and St Thomas' NHS Foundation Trust (GB)
Corresponding author
Dobson, Richard J B
Venue
The Lancet Digital Health
Publisher
Elsevier BV
Published
2024-04
Volume
6
Issue
4
Pages
e281-e290
ISSN
2589-7500 (ISSN-L)
OpenAlex
W4393021028
Cited by
169
References
28
Citations by year
2026: 74 · 2025: 58 · 2024: 27
FWCI
17.13
Type
journal article
Language
en
Update notices
erratum (2024-10-01)
Open access
Licence
Locations
  • The Lancet Digital Health (publishedVersion, cc-by)
  • PubMed Central (publishedVersion, cc-by)
  • PubMed (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • UCL Discovery (University College London) (submittedVersion, cc-by)
  • Research Portal (King's College London) (submittedVersion, cc-by)
  • arXiv (Cornell University) (cc-by)
Funders
  • UKRI
  • NIHR Maudsley BRC
  • Health Data Research UK
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Machine Learning in Healthcare
  • Health Sciences › Health Professions › Health Information Management › Medical Coding and Health Information
  • Health Sciences › Medicine › Health Informatics › Artificial Intelligence in Healthcare and Education
Keywords
forecasting, generative pre-trained transformer, electronic health records, named entity recognition, named entity linking, clinical text, temporal modeling, disorder prediction, MIMIC-III, King's College Hospital
MeSH terms
Artificial Intelligence, Humans, Mental Health, Retrospective Studies, State Medicine, Electronic Health Records

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

The claim verdicts this report counts are experimental: their accuracy is not yet measured.

A language model drew the claims from the paper on 2026-10-27, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-10-27 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Cited sources are checked with a language model’s help (gpt-6-sol).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: Foresight-a generative pretrained transformer for modelling of patient timelines using electronic health records: a retrospective modelling study. https://app.cochat.ai/papers/10.1016/s2589-7500(24)00025-6
The paper
Kraljevic, Z., Bean, D., Shek, A., Bendayan, R., Hemingway, H., Yeung, J. A., Deng, A., Balston, A., Ross, J., Idowu, E., Teo, J. T., & Dobson, R. J. B. (2024). Foresight-a generative pretrained transformer for modelling of patient timelines using electronic health records: a retrospective modelling study. The Lancet Digital Health. https://doi.org/10.1016/s2589-7500(24)00025-6

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.