Health

AI models find why patients stop diabetes and cholesterol drugs

University of Tartu researchers used language models to turn doctors’ notes into data on medication discontinuation in Estonia.

Tom Brennan

By Tom Brennan · Health & Medicine Correspondent

3 min read

AI models find why patients stop diabetes and cholesterol drugs
Photo: Medical Xpress

Large language models can help researchers identify why patients stop taking some common long-term medicines, according to a University of Tartu study. The work matters because prescription records can show when a drug is no longer bought, while the reason often sits in doctors’ notes that are hard to study at scale.

The research, conducted by the Health Informatics Research Group at the university’s Institute of Computer Science, examined antidiabetic medicines and statins. The findings were published in the Journal of Medical Internet Research.

The team linked prescription records from a 10% representative sample of Estonia’s population between 2012 and 2019 with electronic clinical notes. Researchers first found patients who had gone at least a year without buying a medication, then used language models to search doctors’ notes for evidence that treatment had been stopped.

Where the notes allowed it, the models also classified whether the decision to discontinue the drug appeared to come from the patient or the physician, according to the University of Tartu. The aim was to extract information that is usually trapped in free-text clinical records rather than stored in structured fields such as diagnoses, lab results or prescription histories.

Hendrik Šuvalov, a junior research fellow in health informatics at the University of Tartu and an author of the study, said prescription data can show that a medicine was not purchased again, but often cannot explain why. He said reviewing medical records by hand has limited the use of that information because it takes so much time.

Most of the work used the Llama 3.1-70B model on a secure local university system, according to the study report. The researchers also compared results with GPT-4o, but only on manually checked text that had been stripped of sensitive information.

Medical experts assessed the system’s performance, the University of Tartu said. The local model reached 93% to 98% accuracy when extracting phrases about discontinuation and 95% to 96% accuracy when extracting reasons.

The study found adverse reactions were the most common documented reason patients stopped treatment. Among statins, adverse reactions made up about 70% of recorded discontinuation reasons; among antidiabetic medicines, they accounted for nearly 45%.

The researchers also found differences between the two drug groups. Compared with statins, antidiabetic medications were more often stopped because of insufficient treatment effect or contraindications, according to the University of Tartu.

Šuvalov said clinical notes can reveal how treatment develops in routine care, including patients’ experiences, side effects and reasons for changing therapy. He said those details often appear in doctors’ notes but are missed by conventional data analyses.

The University of Tartu said the main value of the work is methodological: using language models to convert clinical free text into data that researchers can analyze. The approach could help study treatment paths and inform health policy decisions, according to the research team.

The paper is titled “Extracting and Classifying Drug Discontinuations From Estonian Electronic Health Records: Development and Validation Study.” Its authors include Hendrik Šuvalov and colleagues, and the DOI is 10.2196/86183.

This story draws on original reporting from Medical Xpress.