Summary

Researchers report a framework that combines language-model extraction from clinical notes with structured EHR data to build computable patient trajectories. In a GLP-1 receptor agonist analysis, it tracked weight, HbA1c and note-derived outcomes over time.

A study published in Nature Medicine describes a framework for turning both coded electronic health-record (EHR) fields and free-text clinical notes into a longitudinal, computable record of each patient’s care. The system uses large pre-trained language models to extract clinical information from notes, then combines it with structured EHR data for analysis.

The researchers validated the extraction process through physician adjudication against a blinded expert reference standard and reported high accuracy and strong agreement between reviewing physicians. They then used the framework to analyse treatment responses among people starting glucagon-like peptide-1 receptor agonists (GLP-1 RAs), tracking changes in weight and hemoglobin A1c (HbA1c) as well as outcomes recorded only in clinical notes.

Why clinical notes matter

EHR analysis often relies on structured fields such as diagnosis codes, procedure codes and laboratory values. These fields are useful for identifying standardised events, but they do not capture every detail recorded during a clinical encounter.

Notes can contain symptom descriptions, adverse effects, reasons for changing treatment, difficulties with adherence and family-history information. They may also describe how a patient responded between formal measurements. The paper’s approach is designed to bring those details into the same analytical environment as coded data.

This matters for longitudinal research because a patient’s experience is not limited to isolated measurements at fixed visits. A sequence of symptoms, treatment decisions, laboratory results and clinician observations can show how care and outcomes develop over time.

How the framework builds a patient journey

The system first extracts clinical entities and relationships from unstructured EHR text. Those extracted data are integrated with structured records and mapped using medical ontologies, which provide standardised concepts and relationships for clinical information.

The combined data are organised into a knowledge graph. In this setting, a knowledge graph represents connections among patients, conditions, treatments, measurements, events and time points, allowing investigators to query relationships for an individual patient or across a large dataset.

The framework also includes a programmatic interface intended to make large-scale knowledge-graph analysis faster and easier to explore. The authors describe the environment as compatible with agentic workflows, but keep study design, analytical decisions and interpretation under investigator control. That distinction makes the system an aid for working through clinical data rather than an autonomous clinical decision-maker.

The paper describes the framework as disease-agnostic and scalable across clinical conditions. Its validation focused on whether information could be extracted accurately from source notes, with physician reviewers comparing the extracted statements against an expert reference standard.

GLP-1 treatment analysis as a demonstration

To show how the system could support real-world evidence research, the researchers identified people initiating GLP-1 RA therapy and reconstructed patient-level treatment trajectories. They modelled longitudinal changes in body weight and HbA1c after treatment initiation and examined the association between these measures and response to therapy.

The analysis also captured outcomes that appeared only in unstructured notes. In addition to examining fixed measurements, the researchers used time-to-event outcomes, a method that evaluates when an event occurs rather than checking only whether it was present at one predetermined time point. This can provide a more detailed view of treatment response as documented in routine care.

The GLP-1 RA example is a longitudinal EHR analysis reporting associations in people who began therapy. It is therefore an illustration of how the data framework can organise and analyse real-world treatment histories, rather than a randomised clinical trial of treatment efficacy.

The supplied article text reports high extraction accuracy but does not provide the cohort size or numerical effect estimates for the GLP-1 RA analysis. It also identifies the paper as an early peer-reviewed, accepted version that will be replaced by a final Version of Record after further edits.

Sources