Machines
Mapping Treatment Sequences Across Separated Pharmacy And Procedure Streams
Automated algorithms that sort cancer insurance claims into treatment histories often mistake drug side effects for disease progression.


What changes in this design
Prescription histories and hospital care records are typically kept in different digital systems that do not talk to each other. Someone trying to follow a patient's care journey would normally have to inspect and line up those separate logs by hand.
A specialized computing setup takes in both the medication logs and medical procedure files directly. It automatically sifts through both streams to pull out events matching a single health condition, then connects them into defined stages of therapy.
Understanding how different treatments unfold over time requires seeing the entire picture of care. Bringing drugstore receipts and clinic procedures into a single chronological path makes it possible to view an entire course of therapy without missing key interventions.
The sixty-one percent problem
In a validation trial evaluating an open-source algorithm against five hundred cancer patients, software attempted to reconstruct care histories using pharmacy transactions and medical procedure codes. When patients stayed on a single, uncomplicated regimen, the algorithm matched blinded oncologist chart reviews between 89 and 93 percent of the time. But the moment care grew complex with multiple therapy lines, the match rate fell to 61 percent. Rigid rules that assumed a 120-day gap in billing meant a new line of treatment had begun, alongside rules that misread dropped drugs in combination cocktails, repeatedly broke the calculation.
When I looked into how these billing feeds operate, the central flaw became obvious quickly. A commercial insurance claim is an accounting document designed to settle financial balances between clinics, pharmacies, and payers. It captures the date money changed hands for an infusion, an injection, or an oral refill. It does not capture why an oncologist paused a regimen for three weeks to let a patient recover from severe neuropathy. In claims databases, an intentional treatment pause looks identical to cancer progression.
Reconstructing care from insurance claims
A recent patent application, published as US20260260720A1 under the title "Computer Architecture For Identifying Lines Of Therapy," sets out a systematic computational framework to automate this translation. The architecture accesses two primary data streams: a pharmacy transaction dataset and a medical procedure transaction dataset. It filters both streams for records relevant to a specific biological condition, and then identifies sequential lines of therapy directly from the filtered records.
In our view, turning billing timestamps into clinical history is where the difficulty begins. In cancer medicine, a line of therapy is not just a sequence of purchases. First-line therapy represents the initial treatment plan, while advancing to a second or third line signifies that the initial therapy failed and the tumor progressed. By relying on filtered transaction tables, automated architectures must deduce clinical milestones from administrative proxy events, such as when a patient stops filling a prescription or switches to a different billing code.
Toxicity is not progression
The resulting distortion has shown up repeatedly across clinical validation studies. When researchers evaluated claims-based algorithms against 294 abstracted medical charts of women with ovarian cancer in a large health research database, agreement deteriorated with every stage of care. The software achieved a weighted kappa of only 0.65 for active therapy and 0.62 for maintenance. While drug regimen matching reached 82 to 88 percent during first-line care, it dropped to 50 percent by the fifth line. For patients undergoing extended treatment, half the algorithmic records were inaccurate.
I find the drop in accuracy striking. In early 2026, the European Society for Medical Oncology addressed this exact vulnerability by publishing the EnLiST consensus framework. The international consensus established that designating a new line of therapy strictly requires documented disease progression. The authors specifically noted that claims-based algorithms create an illusion of disease progression whenever they advance therapy lines because of toxicity-induced drug switches, dose modifications, or temporary treatment holidays.
The regulatory bar for real-world records
Health data firms have recognized that billing claims alone cannot carry the weight of oncology research. Flatiron Health curates longitudinal records from 3.4 million cancer patients, refreshing structured electronic health record data on a 24-hour cadence and unstructured clinical notes on a 30-day cadence. That continuous text review provides human-curated reference standards to benchmark automated and machine-learned algorithms. Without qualitative oncologist notes, algorithms cannot distinguish clinical intent from billing patterns.
We can see why drug regulators have taken a cautious stance. A systematic review of FDA oncology approvals between 2015 and 2020 found that out of 133 original and 573 supplemental approvals, only 11 original applications and 2 supplemental approvals successfully used real-world evidence to support efficacy. Every successful case post-dated 2017, and almost all served as external control arms for single-arm trials. To prevent flawed data from entering regulatory pipelines, the agency finalized guidance in July 2024 under the 21st Century Cures Act, requiring sponsors to rigorously validate algorithmic definitions, treatment exposure windows, and data linkage methods.
What would have to be true
What caught my eye in these validation studies was the wide gulf between administrative convenience and clinical truth. For an automated claims engine to correctly identify lines of therapy without human review, billing records would need to encode the medical reasoning behind every prescription change. A transaction feed would have to specify whether a drug was discontinued because a patient could not tolerate kidney toxicity or because scans showed new metastases.
Alternatively, automated pipelines would need to ingest and parse unstructured clinical notes with sufficient precision to confirm disease progression before advancing a line. Until transaction datasets can reflect clinical intent rather than just financial transactions, I suspect rule-based claims algorithms will continue to mistake side effects for failing treatments.
Sources
Reporting for this piece drew on the published filing and the references below.
- Computer Architecture For Identifying Lines Of Therapy
- An Automated Line-of-Therapy Algorithm for Adults With Metastatic Non-Small Cell Lung Cancer: Validation Study Using Blinded Manual Chart Review
- Validation of an Administrative Claims-based Line of Therapy Algorithm for Women with Ovarian Cancer Using Medical Chart Review
- Raising the Bar for Real-World Data in Oncology: Approaches to Quality Across Multiple Dimensions
- Real-World Data: Assessing Electronic Health Records and Medical Claims Data To Support Regulatory Decision-Making for Drug and Biological Products
- Real-World Evidence in Support of Oncology Product Registration: A Systematic Review of New Drug Application and Biologics License Application Approvals from 2015-2020
- ESMO adaptation of Lines of Systemic Therapy (EnLiST): a consensus framework for standardising the designation of lines of therapy in solid tumours
The record, briefly. US20260260720A1, “Computer Architecture For Identifying Lines Of Therapy” A computing machine accesses a pharmacy transaction data set and a medical procedure transaction data set, filters transactions relevant to a biological condition from each data set, and identifies one or more lines of therapy from the filtered transaction data sets.
More angles on this
- Tracking Wireless Monitoring With Reduced Data Loss Questions the Default ArrangementAnother reading from the same G16H classification family, healthcare informatics.
- When Context Changes Hands in Healthcare InformationAnother reading from the same G16H classification family, healthcare informatics.
- CPC G16H: Healthcare informaticsThe official classification family this record was filed into, published in the USPTO Cooperative Patent Classification scheme.
- Methods For Evaluating Clonal Tumor Mutational Burden Marks a Pause Worth NoticingAnother reading from the neighbouring G16B classification family, bioinformatics.
- Simulating Ship Painting on Real Steel Without the Solvent CloudAnother reading from the wider G09B classification family, educational or demonstration appliances.
Read around this one:Public patent recordUSPTO published figure