PathWISE: Multi-Agent Cancer Pathway Triaging Ontology Learning from Clinical Flowcharts
2026-05-25 • Computer Vision and Pattern Recognition
Computer Vision and Pattern Recognition
AI summaryⓘ
The authors created PathWISE, a system that turns clinical flowcharts—normally hard for computers to understand—into a format computers can run and check automatically. Their method uses AI agents and strict checks to convert the pictures and symbols in clinical pathways into executable code following healthcare standards. They tested this on five UK cancer care pathways and showed it accurately processes every possible patient route, finds issues, and creates error-free code while clearly marking parts that need human review. By mixing AI for understanding with math and programming tools for verification, they made sure the results are reliable and ready to use in healthcare systems.
Clinical pathwaysFlowchartsLarge language models (LLM)Deterministic depth-first searchHL7 Clinical Quality Language (CQL)FHIR CDS HooksTyped directed graphSemantic auditCode compilationTerminology codes
Authors
Sofiat Abioye, Ufaq Khan, Shazad Ashraf, Mohammed Adil Butt, Andrew D. Beggs, Adam Byfield, Anusha Jose, William Poulett, Ben Wallace, Junaid Qadir, Muhammad Bilal
Abstract
Clinical pathways are disseminated as visual flowcharts where spatial topology, arrow direction, colour coding, and font weight encode critical triage logic that remains inaccessible to computational systems. We present PathWISE, a five-phase pipeline combining four LLM-based agents with a deterministic depth-first search auditor and a Java compiler critic, transforming these non-computable artefacts into validated, executable HL7 Clinical Quality Language (CQL) libraries deployable as FHIR CDS Hooks services. Purpose-built agents extract flowchart structure into a typed directed graph, perform deterministic path enumeration, conduct a structured semantic audit of every node's computability, generate terminology-constrained CQL definitions verified by the official Java CQL-to-ELM compiler, and produce routing logic covering 100% of enumerated patient journeys. Demonstrated across five UK NHS cancer pathways (colorectal, lung, skin, upper GI, and breast), PathWISE audits up to 183 nodes (182 under the Hybrid configuration), identifies 544 structured governance findings across four issue categories, achieves 100% syntactic compilation success, with UNCOMPUTABLE nodes receiving false placeholders that preserve compilability while surfacing governance gaps for clinical review, and produces zero hallucinated terminology codes for dictionary-covered concepts. Critically, PathWISE confines non-deterministic LLM inference to knowledge extraction while deterministic graph mathematics and a standard compiler underpin every verification step.