Inspiration
In healthcare, bottlenecks can affect every aspect of operations, creating critical delays that can end lives. However, these bottlenecks are often not managed proactively or efficiently, resulting in critical delays that can result in care not being received properly. In addition, administrative management of hospitals is a retroactive process with little to no proactive technological aids, so we decided to design an agent that could assist this and allow for bottleneck diagnosis and management proactively. Additionally, this was partially inspired by the concept of a digital twin, which models an industrial process virtually and analyzes and optimizes said process using AI. By learning about the many benefits that LLM implementation and similar optimization methods could bring to hospital management and resulting in saving lives.
What it does
PulseFlow AI works as a digital command center for hospital administration. It features a Command Center as a homepage, with alerts, live statuses of resource distribution, throughputs, critical bottlenecks, and an overview of the overall situation at the hospital. Additionally, it visualizes patient flow, queue depths, and department capacities live. It runs a background SimPy engine that can predict and analyze patient flow and resource availability in order to optimize predicted bottlenecks before they happen, and reduce predicted waiting times and unused resources. In addition, administrators can test predicted solutions and different cases through our simulation sandbox, and with detailed information about patients and processes occurring, conduct their own observations and conclusions to supplement the analyses given by the program.
The AI system is powered by Google-OR tools that mathematically find the most efficient allocation of resources, rather than guessing and testing efficiency in outcomes. PulseFlow as a system is also optimized to be a program that can assist hospital administration all through one cohesive system, and with the ability for the hospitals to add custom constraints and specialist availability, administration can use this system to provide an accurate reading of the situation at the hospital. Finally, a fully local Ollama LLM turns complex matrices into a cohesive analysis with suggestions that are easy to understand, verify, and test. Working to integrate all the different complex processes in a hospital and optimizing resource flow allows for PulseFlow AI to become the effective management tool that the healthcare system currently needs.
How we built it
PulseFlow AI is built on a real-time, three-layer architecture. The main feature is a Python-based SimPy discrete-event simulation running at 60× real time, which models patient arrivals, triage, lab processing, specialist availability, and discharges. The simulation operates independently from an asynchronous FastAPI backend, which streams live hospital data through WebSockets every 800 milliseconds.
Above the simulation sits our analytics and AI layer. We use Holt-Winters forecasting to predict patient demand, Google OR-Tools linear programming to optimize staffing allocations, and a local Ollama LLM to translate optimization results into clear, actionable recommendations. A care coordination engine also manages specialist scheduling and operational constraints throughout the system.
The frontend is built with Next.js 14, React Flow, and Framer Motion. Every dashboard connects to the same WebSocket stream, allowing the hospital floor plan, digital twin network, patient dashboard, and AI copilot to be in sync without additional API requests slowing everything down. This three-layer architecture helps make PulseFlow AI a responsive and scalable hospital operations platform.
Challenges we ran into
One of the biggest challenges was getting the simulation and backend to work together. Our hospital simulation runs continuously in SimPy, while the backend uses FastAPI's async, so they operate very differently. We had to figure out how to share the data between them without causing synchronization issues or slowing down the system. We spent a lot of time making sure everything was working properly and in real-time.
Another challenge was making the platform feel realistic from the moment it starts. If the simulation began with an empty hospital, it doesn't look believable and it makes it hard to show PulseFlow’s capabilities. We ended up creating a warm-start system by creating a few patients at different care levels, so the simulation would look and feel like a hospital from the start. We also learned that just because an optimization algorithm produces the mathematically best answer doesn't mean it produces the most practical one. Early versions would give recommendations that were technically optimal but didn't make sense for a hospital. We had to tune constraints, priorities, and objective weights until the recommendations were both efficient and realistic for hospital administrators to trust.
Accomplishments that we're proud of
PulseFlow AI is the only working hospital digital twin, which replaces reactive hospital management with proactive one. We developed a working discrete simulation model that predicts patient flow, department capacity, and staffing, while streaming live floor updates to a floor plan visualizer showing an admin how the hospital is working in real time. We combined Google OR-Tools linear programming to provide dynamic staffing and resources allocation, along with an Ollama-powered AI Copilot that gives clear explanations to inefficiencies and what an admin could do to avoid it. With our Simulation Sandbox, the operator can create realistic crisis scenarios, such as a flu pandemic or a CT scanner breaking down, and see how things progress, to make sure that nothing will be a surprise. Our software works completely in-memory with no infrastructures needed, and comes out of the box with shift reporting, ambulance tracking, patient risk evaluation, and care coordination.
What we learned
Creating PulseFlow AI gave us much insight into the realities of hospital management and their operational complexity. Every new patient needs coordinations from different departments, personnel, equipment, and specialists, and hospitals have to manage all of this without a single clear view. While looking more into the problem, we realised that most problems aren't addressed, turning into a major healthcare crisis. In just the US, healthcare costs approximately $4 trillion a year, and the largest part of this amount is spent because of poor coordination. Creating a product that solves this problem showed us that it was not enough to simply write good code, as the product should also correspond to existing workflows. We also learned how to use new modeling technologies like OR-tools and SciPy to help hospitals predict future demand and optimal resource allocation as well as how to use in-memory and local LLMs to keep hospital and patient data safe.
What's next for PulseFlow AI
Our goal with PulseFlow AI is to turn it from a simulated twin and a crisis display into a real-time healthcare operations platform. We aim to do this by adding inter-hospital communication and ambulance schedules, as well as patient recommendations and the integration of staffing and shift-schedule integration. In addition, with a focus on clinical risk modeling and patient degradation, we can focus on directly impacting patient outcomes, preventing mistakes in the decision-making process. We also aim to enhance the various AI features, especially the AI Copilot, to be more explanatory and transparent, as well as more conversational. With all these changes, we aim to turn PulseFlow into the ideal realistic management system for hospitals and other types of healthcare services around the world.


Log in or sign up for Devpost to join the conversation.