Search papers, labs, and topics across Lattice.
PathWISE is introduced, a five-phase pipeline leveraging LLMs to transform visual clinical flowcharts into executable HL7 Clinical Quality Language (CQL) libraries. The system uses LLM agents for flowchart structure extraction, path enumeration, and semantic auditing, while a Java compiler ensures syntactic correctness. PathWISE achieves 100% syntactic compilation success across five UK NHS cancer pathways, identifying governance findings and surfacing uncomputable nodes for clinical review, demonstrating a novel approach to making clinical pathways computationally accessible.
Unlock the hidden logic of clinical flowcharts: PathWISE transforms visual diagrams into executable code, bridging the gap between clinical guidelines and computational systems.
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.