
MediFlow
MediFlow- Smart Patient Flow Management System
Submitted
May 14, 2026, 3:41 PM
Last Updated
May 22, 2026, 6:47 AM
Project Links
Problem Statement
Government hospitals in India commonly endure overcrowding, long waiting times, and inefficient patient management due to manual and paper-based operations. Patients are normally handled on a first-come-first-serve basis, meaning critically ill patients may wait alongside non-urgent cases. Hospitals also struggle with fragmented patient records, lack of real-time queue visibility, and delayed emergency response. By digitizing patient registration, triage evaluation, queue management, and emergency escalation, MediFlow resolves these problems. The approach helps hospitals shorten wait times, enhance emergency management, and improve overall patient flow by prioritizing patients based on medical urgency rather than arrival time.
Solution & AI Usage
AI-powered triage and intelligent queue management are combined in MediFlow, a Django-based hospital administration system. The system automatically assigns a triage priority score from 1 to 5 after nurses enter the patient's vitals and symptoms. Emergency situations are automatically escalated, and patients with serious conditions are placed at the front of the line. The project generates clinical urgency scores with reasoning by analyzing symptoms and vital signs along using Google Gemini 2.5 Flash and the Google-Genai SDK. Fast response times, robust natural language comprehension, and effective structured JSON output generation are the reasons Gemini was selected. To guarantee that the system functions even in the event that the AI API is not accessible, a rule-based fallback engine was also put in place. The backend was built using Django and Django REST Framework, while the frontend uses HTML, Tailwind CSS, and JavaScript.
Full Description
MediFlow – Smart Patient Flow Management System
- Project Overview
MediFlow is an AI-powered hospital management and patient flow optimization system designed to improve healthcare operations in overcrowded government hospitals. The system reduces patient waiting times, improves emergency handling, and digitizes manual hospital workflows using smart queue management and AI-assisted triage assessment.
It replaces paper-based processes with a centralized digital platform where staff can register patients, assess medical urgency, manage queues, track emergencies, and maintain medical records in real time.
- Key Features
-> AI-Powered Triage Assessment
Nurses enter patient vitals such as blood pressure, pulse, SpO2, temperature, pain scale, and symptoms. The AI engine analyzes the data and assigns a triage score from 1–5 based on urgency.
- Score 1 → Critical
- Score 2 → Emergency
- Score 3 → Urgent
- Score 4 → Semi-Urgent
- Score 5 → Non-Urgent
The system uses Google Gemini 2.5 Flash for intelligent symptom analysis and reasoning.
-> Smart Queue Management
Instead of first-come-first-serve, MediFlow prioritizes patients based on severity and arrival time.
Features:
- Department-wise token generation
- Priority-based queue ordering
- Live waiting queue management
- Patient calling and consultation completion
- Emergency case highlighting
Emergency Escalation
Critical patients are automatically escalated to emergency priority. Staff can also manually raise emergency alerts if a patient’s condition worsens while waiting.
-> Patient & Medical Record Management
The system maintains:
- Patient demographics
- Allergy information
- Visit history
- Prescriptions
- Doctor notes
- Follow-up records
All records are searchable and linked across visits.
- Technology Stack
Backend: Django 4.2 API Layer: Django REST Framework AI Integration: Google Gemini 2.5 Flash Database: SQLite / PostgreSQL / Supabase Frontend: HTML, Tailwind CSS, JavaScript Authentication: Django Session Authentication
- System Architecture
MediFlow follows the Django MVT architecture with REST APIs.
Frontend (HTML + CSS + JS) ↓ Django Views / Django REST Framework APIs ↓ Logic Layer ↓ Database Models
The AI triage engine works as a separate module that processes symptoms and vitals before generating urgency scores.
- Challenges Faced
- Designing accurate triage logic for multiple medical conditions
- Handling AI failures and API limits
- Creating a reliable fallback rule-based engine
- Managing queue priority dynamically
- Maintaining data consistency between triage, emergency, and queue systems
- Learnings & Outcomes
I learned how to develop full-stack Django applications, create REST APIs, integrate AI using Gemini APIs, design databases, automate healthcare workflows, optimize queues, and create secure authentication systems with MediFlow.


.png)
