SmartCare
Link to open source: https://github.com/KomalLaddha-dev/DevOcs_HackNagpur
Link to Live Project: https://smartcare-frontend-jnmg.onrender.com/
SmartCare – Complete Project Documentation
AI-Powered Patient Queue and Triage Optimization System
Built for HackNagpur Hackathon 2026
Table of Contents
-
Project Overview
-
How It Works
-
System Features
-
Technical Architecture
-
AI / ML Components
-
User Roles and Credentials
-
API Endpoints
-
Installation Guide
-
Deployment Guide
-
Demo Walkthrough
1. Project Overview
Problem Statement
Traditional healthcare facilities face several operational challenges:
-
Long patient wait times, especially in emergency departments
-
First-come-first-served queues that ignore medical urgency
-
Overloaded doctors and uneven workload distribution
-
Manual triage processes that delay critical care
Proposed Solution
SmartCare is an intelligent healthcare management system that uses AI-assisted triage to prioritize patients based on medical urgency rather than arrival time.
Flow:
Patient Check-in → AI Symptom Analysis → Priority Score (1–10) → Smart Queue → Doctor Assignment
Key Benefits
-
Up to 40 percent reduction in average waiting time
-
60 percent faster response for critical cases
-
Balanced doctor workload
-
Improved patient satisfaction and safety
2. How It Works
System Workflow
-
Patient Check-in
Patients enter symptoms, age, and basic medical details through a web interface. -
AI Triage Engine
The system analyzes symptoms using rule-based NLP, detects red-flag conditions, considers age and risk factors, and generates a severity score from 1 to 10 with an explanation. -
Priority Queue Insertion
Patients are inserted into a dynamic priority queue based on severity rather than arrival time. Estimated wait time is calculated dynamically. -
Smart Doctor Allocation
Patients are matched to doctors based on department, availability, and workload. A spare doctor pool handles overflow situations. -
Consultation
Doctors consult patients, can override or escalate priority if needed, and mark consultations as completed.
3. System Features
Patient Features
-
Simple symptom-based check-in
-
Fair priority assignment based on urgency
-
Real-time queue position updates
-
Mobile-friendly interface
Doctor Features
-
Dashboard displaying assigned patients
-
Emergency priority override option
-
Access to patient triage details
-
Easy consultation completion workflow
Administrator Features
-
Real-time analytics and queue monitoring
-
Doctor pool management
-
System configuration controls
-
Department-wise statistics
4. Technical Architecture
Technology Stack
Frontend:
-
React 18
-
TypeScript
-
Vite
-
Tailwind CSS
Backend:
-
FastAPI (Python 3.11)
AI / ML:
-
Rule-based NLP
-
Priority scoring algorithms
Database:
-
In-memory storage for demo
-
PostgreSQL for production
Deployment:
-
Docker
-
Railway or Render
5. AI / ML Components
Triage Engine
The triage engine evaluates symptoms using predefined medical keywords and risk factors.
Critical keyword examples:
-
chest pain
-
stroke
-
unconscious
-
severe bleeding
Urgent keyword examples:
-
difficulty breathing
-
high fever
-
severe pain
Additional factors:
-
Age (children under 5 and adults over 65 get higher priority)
-
Duration of symptoms
-
Pre-existing conditions
Sample output:
-
Severity score
-
Severity level
-
Recommended department
-
Explanation
Priority Queue System
A max-heap based priority queue ensures the highest priority patient is always served first.
Priority formula:
(severity × 10) + age factor + wait time bonus
This prevents starvation and ensures fairness.
Doctor Allocation Engine
Doctor assignment considers:
-
Department matching
-
Current workload
-
Availability
-
Spare doctor pool for overflow
6. User Roles and Credentials
Default Credentials
Admin
Email: admin@smartcare.com
Password: admin123
Doctor
Email: doctor@smartcare.com
Password: doctor123
Patients
patient@smartcare.com patient123
Role Permissions
Patients:
-
Check-in
-
View queue
Doctors:
-
View queue
-
Access dashboard
-
Emergency override
Admins:
-
Full system access
-
Analytics
-
Doctor management
7. API Endpoints
Base URL:
http://localhost:8000/api/v1
API Documentation:
http://localhost:8000/docs
Authentication
POST /auth/login
POST /auth/register
GET /auth/me
Smart Queue
POST /smartqueue/checkin
GET /smartqueue/list
GET /smartqueue/status
GET /smartqueue/stats
POST /smartqueue/call-next
POST /smartqueue/complete/{id}
POST /smartqueue/emergency/escalate
Doctors
GET /doctors
GET /doctors/available
POST /doctors
8. Installation Guide
Prerequisites
-
Docker and Docker Compose
-
Node.js 18 or higher
-
Python 3.11 or higher
Docker Setup
Frontend:
http://localhost:3000
Backend:
http://localhost:8000
Manual Setup
Backend:
Frontend:
9. Deployment Guide
Backend and frontend can be deployed separately using Railway or Render.
Environment variables:
Backend:
SECRET_KEY
DEBUG
CORS_ALLOW_ALL
Frontend:
VITE_API_URL
10. Demo Walkthrough
Scenario:
A busy hospital morning with multiple patient arrivals.
-
A low-priority patient with mild symptoms is placed lower in the queue.
-
A critical patient with chest pain arrives later but is immediately prioritized.
-
Doctors always receive the most urgent patient first.
-
Emergency override allows doctors to escalate worsening cases.
Project Repository
GitHub:
https://github.com/KomalLaddha-Dev/DevOcs_HackNagpur
Built for HackNagpur Hackathon 2026
This build was uploaded as a hackathon project