Inspiration:Hospitals operate under intense pressure where miscommunication, delayed handovers, and unmanaged task overload can directly impact patient safety. We wanted to build a system that brings structure, accountability, and intelligent monitoring to hospital shift workflows without interfering with medical decision-making.

What it does:MediStream is an AI-powered shift management and risk monitoring system for hospitals. It manages hierarchical medical teams across Morning, Afternoon, and Night shifts, structures task lifecycles (TODO → IN_PROGRESS → BLOCKED → DONE), tracks priority levels, and computes real-time operational risk. When risk exceeds safe thresholds, the system automatically flags or closes shifts to prevent overload.

How we built it: We built MediStream using:

FastAPI for backend logic

Supabase (PostgreSQL) for a trigger-driven, risk-aware database engine

React + Tailwind CSS for a responsive role-based frontend

Fine-tuned DistilBERT models for intent and priority detection

A deterministic risk engine combining task priority and alert weights

An agentic monitoring layer that evaluates shift risk continuously

All core enforcement logic lives in the database to ensure system integrity.

Challenges we ran into: Designing strict task state transitions without breaking flexibility

Calibrating risk scoring to avoid false positives

Managing hierarchical permissions across multiple roles

Debugging database triggers and foreign key constraints

Preventing AI integration from corrupting deterministic system logic

Accomplishments that we're proud of: Built a database-enforced risk engine with automatic shift closure

Designed a clean hierarchical hospital workflow model

Integrated transformer-based NLP without sacrificing control

Implemented structured priority management with override governance

Created a scalable architecture separating core logic, AI, and UI

What we learned: Deterministic systems must remain authoritative even when AI is integrated

Risk scoring requires careful calibration, not arbitrary thresholds

Backend-first architecture prevents frontend and AI chaos

Database triggers can enforce business logic more safely than application code

Clean separation of concerns is critical for scalable AI systems

What's next for MediStream: Full authentication and role-based access control

Real-time WebSocket updates for live shift monitoring

Advanced agentic escalation suggestions

Predictive risk forecasting using historical shift data

Deployment as a scalable cloud-based hospital operations platform

Built With

Share this project:

Updates