CareFlow AI - Project Story
Inspiration Hospitals lose enormous amounts of time, money, and goodwill to a deceptively simple problem: patients who don't show up. Every empty slot is a doctor sitting idle, a waiting-list patient who could have been seen, and a queue that keeps growing. Traditional scheduling software is reactive — it records what happened. We wanted something predictive and prescriptive: a system that anticipates no-shows before they happen and instantly rebalances the day to keep the hospital running at full capacity.
The spark came from a simple observation: airlines overbook flights using probability models, but hospitals, where the stakes are far higher, still treat every appointment as equally likely to occur. CareFlow AI brings that same probabilistic thinking to healthcare scheduling, but with a humane twist: instead of overbooking, we predict, warn, and reassign.
What It Does CareFlow AI is a five-step predictive scheduling cockpit for hospitals.
Schedule - Visualizes today's appointments with per-patient no-show risk scores.
Risk Analysis - Breaks down the day's risk profile by department and risk class.
Cancellation and Outreach - Flags high-risk patients and sends personalized Gmail reminders via n8n, asking them to confirm or cancel.
Waiting List Ranking - When a slot frees up, ranks waiting patients by urgency, wait time, and proximity to the hospital.
Slot Assignment - Notifies the chosen patient with a one-click email, again powered by n8n, and updates the schedule in real time.
The result: fewer empty rooms, shorter waiting lists, and patients who actually feel like the system is working for them.
BUILT WITH n8n and Lovable! The architecture is intentionally decoupled. The React app never talks to Gmail directly. It posts a clean payload to an n8n webhook, n8n orchestrates the email, and a third workflow (planned) will listen for patient replies and call back into the app to update slot status.
What We Learned Probability is a UX problem, not just a math problem. Showing a "73% no-show risk" is useless unless the user can act on it. Every risk score in CareFlow is paired with a button that turns insight into action.
n8n proved to be a genuine accelerant for hackathon-speed integrations. What would have taken a day of SDK wiring became a ten-minute drag-and-drop workflow. Edge runtimes also punished our assumptions about Node.js: several libraries failed silently on Cloudflare Workers, and we learned to vet every dependency for Worker compatibility before adding it. Perhaps the most durable lesson was about design tokens: committing early to a semantic oklch token system meant we could redesign entire screens without touching a single component.
Challenges We Faced Twilio to Gmail pivot. Twilio required a verified business number, A2P 10DLC registration, and a paid trial upgrade, which was too much friction for a demo. We migrated both n8n workflows to the Gmail node mid-build, which forced a cleaner payload contract with fields for name, email, appointment time, and patient ID.
Workflow activation - Our first end-to-end test failed with a 404. The fix was not in the code at all. n8n production webhooks only respond when the workflow is toggled active. A small lesson in reading error messages literally.
KPI semantics - Average no-show risk does not change when you move the risk threshold slider, and that confused early testers. We had to decide whether to fix the metric or fix the explanation. We chose explanation, because the raw mean is the honest signal.
Chart label overflow -The donut chart's percentage labels rendered outside the SVG viewport. The fix was moving labels inside the slices with a custom renderer, a reminder that Recharts defaults are rarely production-ready.
State across five steps - Coordinating schedule, risk threshold, cancelled slot, waiting list, and assignment across five screens without prop-drilling required a disciplined Zustand store with derived selectors. Getting that architecture right early saved us from significant debugging later.
What's Next The immediate next step is a patient reply workflow: a dedicated endpoint that receives Gmail replies via n8n and live-updates patient status as confirmed or cancelled directly in the dashboard. Behind that sits a real ML model to replace the currently mocked no-show probabilities, and multi-hospital tenancy with role-based access.
CareFlow AI started as a scheduling tool. It is becoming a decision-support system for healthcare operations, and the five steps we built this weekend are only the beginning.
Built With
- claude
- css
- lovable
- n8n
- python
- react
- streamlit
- typescript
Log in or sign up for Devpost to join the conversation.