Inspiration
Handoff: AI-Powered Smart Request Routing for Healthcare
During the hackathon, We started thinking about one of healthcare’s most invisible problems: how clinical requests like imaging, referrals, and lab orders actually move between facilities. We learned that hospitals lose millions every year due to misrouted or lost requests because systems still rely on inconsistent identifiers and outdated routing logic. As Biomedical Engineering students, our focus is always patient impact and outcomes. This elucidated a clear pain point often overlooked by caretakers.
We wanted to explore how AI could make this process more reliable and transparent. That’s what inspired Handoff, an intelligent backend that automatically routes clinical requests to the right facility, with human-readable explanations for every decision.
What it does
Handoff is a smart routing engine for healthcare systems. When a clinician places an order, the system:
Understands the request using an AI classifier (Claude 3.5 Haiku). Scores available facilities based on capability, proximity, and capacity. Selects the best destination automatically. Explains its decision in clear, audit-friendly language. The frontend dashboard visualizes these routing decisions in real time, showing confidence levels, reasons, and routing history.
How we built it
I built the backend using FastAPI, SQLite, and SQLAlchemy for a lightweight but powerful service layer. The AI integration uses Anthropic’s Claude 3.5 Haiku, which classifies unstructured text like “Non-contrast abdominal MRI” into standard request categories and generates clinician-readable rationales.
Architecture:
FastAPI for the API endpoints (/route, /events, /health). LLM modules for classification and explanation. SQLite for patient and facility data. Server-Sent Events for live routing updates to the frontend.
The frontend, built by my teammate Toshi, uses Next.js and TailwindCSS to display routing results, explanations, and recent events.
Challenges we ran into
The hardest challenge was getting the backend and frontend to communicate seamlessly. FastAPI needed CORS configuration, API key authentication, and a proxy layer so that the frontend could call /api/route securely without exposing keys in the browser. We also had to debug multiple Git conflicts and environment mismatches across machines.
Another major challenge was balancing determinism and AI reasoning. We wanted the AI to explain why a facility was chosen — but still rely on structured logic (distance, capacity, prior visits). Finding that balance between rule-based routing and LLM explainability took experimentation.
Above all, as biomedical engineering students, programming is not as native to us as it may be to other students. With very little coding experience, we ran into plenty of obstacles, but learned from each of them.
Accomplishments that we're proud of
Building a fully functional backend with AI integration within a short hackathon timeline. Creating clinician-readable explanations for each AI decision. Developing an end-to-end system where a simulated clinical request results in a real-time routing visualization.
Getting out of comfort zone, doing something cool, and putting in a lot of time into something.
What we learned
We learned a lot about healthcare interoperability, especially how fragmented real-world systems still are. Integrating FHIR concepts with AI reasoning gave me a better appreciation for how structured data and natural language processing can work together.
On the technical side, I learned how to design an explainable AI backend with real-time streaming and a frontend that visualizes routing events dynamically. We learned about the processes of working on a coding project together and ensuring code in team setting is structured cohesively.
What's next for Handoff
The next step is to complete and ensure integration of the backend and frontend is complete. In the futur, we hope to connect this system with real FHIR-based EHR APIs and enable routing across multiple healthcare networks. We’d also like to implement reinforcement learning to continuously improve routing accuracy as more data is collected.
Built With
- claude
- fastapi
- next.js
- react
- sqlalchemy
- tailwind
Log in or sign up for Devpost to join the conversation.