# Foresight -- Deep Generative Modelling of Patient Timelines using Electronic Health Records

**Authors:** Zeljko Kraljevic, Dan Bean, Anthony Shek, Rebecca Bendayan, Joshua Au Yeung, Alexander Deng, Alfie Baston, Jack Ross, Esther Idowu, James T Teo, Richard J Dobson  
**arXiv:** [2212.08072](https://arxiv.org/abs/2212.08072)  
**Date:** 2022-12-13  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2212.08072v1/

## Key points

- Electronic Health Records (EHRs) store detailed longitudinal information about patients' health status and clinical history.
- Temporal modelling of medical histories is a powerful tool for forecasting future events, estimating risks, suggesting alternative diagnoses, and predicting complications.
- Foresight is a groundbreaking solution that processes the entire free-text section of EHRs for longitudinal modelling using NER+L tools like MedCAT.
- Foresight provides probabilistic forecasts for future medical events such as disorders, medications, symptoms, and interventions with impressive precision rates.
- Foresight offers a granular view of patients by analyzing textual data while introducing minimal additional noise.
- The model has been rigorously tested at prominent healthcare institutions and demonstrated high relevancy in predicting candidate disorders.
- Foresight is easy to train and deploy locally as it only requires free-text data at a minimum.
- It can simulate follow-on disorders, medications, and interventions over multiple steps as needed, making it versatile for various biomedical concept modelling scenarios.
- Funding from prestigious organizations like the NHS AI Lab, National Institutes of Health Research, and Health Data Research UK supported the development of Foresight.
- The availability of the user-friendly Foresight web app with interactive features is set to revolutionize healthcare analytics and decision-making processes worldwide.

## Summary

In the realm of healthcare, Electronic Health Records (EHRs) play a crucial role in storing detailed longitudinal information about patients' health status and clinical history. A significant portion of this data is often captured within unstructured text, making it challenging to extract valuable insights. To address this issue, temporal modelling of medical histories has emerged as a powerful tool for forecasting future events, estimating risks, suggesting alternative diagnoses, and predicting complications. Traditionally, prediction approaches have relied on structured data or limited single-domain forecasts and outcomes. However, a groundbreaking solution called Foresight has been developed to process the entire free-text section of EHRs for longitudinal modelling. This innovative GPT3-based pipeline leverages NER+L tools like MedCAT to convert document text into structured, coded concepts. By doing so, Foresight can provide probabilistic forecasts for future medical events such as disorders, medications, symptoms, and interventions. The beauty of Foresight lies in its ability to offer a granular and detailed view of patients by analyzing textual data while introducing minimal additional noise. Through rigorous testing at prominent healthcare institutions like King's College Hospital in South London and Maudsley as well as the US MIMIC-III dataset, Foresight has demonstrated impressive precision rates for forecasting biomedical concepts. Furthermore, validation on synthetic patient timelines by clinicians showcased the model's high relevancy in predicting candidate disorders. One of the key advantages of Foresight is its ease of training and deployment locally since it only requires free-text data at a minimum. As a generative model, it can simulate follow-on disorders, medications,and interventions over multiple steps as needed. This versatility positions Foresight as a general-purpose tool for biomedical concept modelling that can be applied across various scenarios such as risk estimation in real-world settings, conducting virtual trials for clinical research purposes, studying disease progression dynamics through simulations of interventions and counterfactuals. The development of Foresight was made possible through funding from prestigious organizations like the NHS AI Lab, National Institutes of Health Research, and Health Data Research UK. Additionally, infrastructure support from King's College London and other research centers played a pivotal role in bringing this cutting-edge technology to fruition. With the availability of the user-friendly Foresight web app offering interactive features for evaluating model outputs and understanding forecasted concepts in depth using gradient-based saliency methods; this groundbreaking tool is poised to revolutionize healthcare analytics and decision-making processes worldwide.
