FloMatrix
FlōMatrix (formerly FlowMatrix) is a web application that allows a nurse to select a patient's IV infusions and available vascular access points to algorithmically determine the most efficient medication groupings and lumen assignments based on clinical compatibility constraints. In other words, FlōMatrix is a clinical decision support tool that automates the complex mental task of organizing multiple intravenous medications into safe, compatible groupings across a patient's available catheter lumens. The system transforms a manual constraint satisfaction problem into an automated process that accounts for both rigid drug compatibility and physical access limitations. The app is a combination of two projects I have completed: IVICAC and DripMap2.
The core of the application integrates a structured JSON compatibility database with the nuanced reasoning of a large language model. The database uses a numeric system to categorize compatibility as full, variable, or incompatible. The language model interprets these values alongside patient-specific priorities, such as the critical nature of vasoactive medications or the need for reliable access in hypotensive patients.
Optimization occurs through a multi-stage algorithmic approach that first isolates medications requiring dedicated lines such as TPN or methylene blue. The system then distinguishes between primary continuous infusions and secondary intermittent medications. It enforces physical constraints by limiting each lumen to a maximum of three medications and organizes compatible primaries into optimal groups. Secondaries are then assigned to these groups based on sequential compatibility and the requirement for primary carrier bags.
The system delivers results through a dual-interface consisting of a technical text summary and an interactive D3.js tree diagram. This visual representation maps the hierarchy from the patient to specific vascular access devices and individual lumens. Built on a Python Flask backend with an HTML and JavaScript frontend, FlōMatrix provides a locally hosted solution that offers clinical justifications for its grouping decisions. It merges algorithmic precision with reasoning to optimize nursing workflows and enhance patient safety.