← Latest papers
📄 medicine

Identifying antipsychotic treatment episodes using natural language processing and change-point detection

This study presents and validates a scalable framework combining natural language processing and change-point detection to reconstruct longitudinal antipsychotic treatment episodes from unstructured electronic health records, demonstrating clinical validity and revealing significant associations between treatment complexity and healthcare utilization.

Original authors: Tao Wang, Hamilton Morrin, Ninoslav Majkic, David Codling, Risha Govind, Matthew Broadbent, Cecilia Casetta, Giouliana Kadra-Scalzo, Rashmi Patel, Angus Roberts, Richard Dobson, Robert Stewart, Sameer
Published 2026-09-10
📖 4 min read☕ Coffee break read

Original authors: Tao Wang, Hamilton Morrin, Ninoslav Majkic, David Codling, Risha Govind, Matthew Broadbent, Cecilia Casetta, Giouliana Kadra-Scalzo, Rashmi Patel, Angus Roberts, Richard Dobson, Robert Stewart, Sameer Jauhar, James MacCabe

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the world of mental health care, the story of a patient's treatment is often written in the margins. For decades, doctors have recorded their decisions about medication in free-flowing notes, describing why a drug was started, how a patient responded, or when a switch was made. While these narratives hold the true history of a patient's journey, they are locked away in unstructured text, invisible to the computers that manage hospital data. This creates a blind spot for researchers trying to understand how treatments work over time. They cannot easily see the full picture of who is taking which medicine, for how long, and when the pattern changes. Without this clarity, it is difficult to know if current practices are helping patients or if they are leading to unnecessary hospital stays. The challenge has been to find a way to read these thousands of handwritten notes and turn them into a clear, chronological timeline that a computer can understand and analyze.

A team of researchers at King's College London and the South London and Maudsley NHS Foundation Trust has developed a new method to solve this problem. They created a system that combines two powerful tools: a digital reader that understands human language and a mathematical detector that spots when a pattern changes. The digital reader, known as natural language processing, scans the unstructured clinical notes to find every mention of antipsychotic medication, the drugs used to treat schizophrenia and related conditions. It pulls out the name of the drug, the dose, and the date it was written down. However, simply listing these mentions is not enough, because doctors often write about a medication they stopped years ago or one they are considering for the future. To find the actual periods when a patient was actively taking a specific drug, the team used a change-point detection algorithm. This tool looks at the stream of medication mentions and identifies the exact moments where the pattern shifts, signaling that one treatment has ended and another has begun.

The researchers tested this system on the electronic health records of 12,530 patients diagnosed with schizophrenia-spectrum disorders between 2007 and 2017. They compared the computer's timeline against 113 treatment episodes that had been carefully marked by human experts. The system performed with high accuracy, correctly identifying the start and stop dates of treatment periods in the vast majority of cases. Once validated, the team applied the method to the entire group of patients. They discovered 24,648 distinct treatment episodes, revealing a detailed map of how these patients were treated over a decade. The analysis showed that while many patients stayed on a single medication for a long time, a significant portion experienced complex patterns. In nearly one-third of all treatment episodes, patients were prescribed more than one antipsychotic at the same time. This included both short overlaps, where doctors temporarily gave two drugs while switching from one to another, and longer periods where multiple drugs were used together intentionally.

The study also uncovered how these treatment patterns relate to the patients' need for hospital care. The data showed that patients who were prescribed multiple antipsychotics at the same time, or who went through many different treatment attempts before starting a specific drug called clozapine, were more likely to be admitted to the hospital and stay there for longer periods. Conversely, patients who received long-acting injectable versions of their medication, which are given as a shot rather than a daily pill, tended to use fewer hospital services. The researchers found that the specific type of diagnosis and the patient's background also played a role, with certain groups showing higher rates of hospital use. The ability to automatically reconstruct these long-term treatment histories from messy text offers a new way to monitor the quality of care. It allows health systems to see, in real time, when prescribing habits drift away from guidelines and to identify patients who might benefit from a change in their treatment plan, all without requiring a team of people to read through every single medical note by hand.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →