๐ฅ MediScanAI
AI-Powered Hospital Management System โ Complete Edition
Live Queue ยท Prescriptions ยท AI Triage ยท Email Notifications ยท Doctor Fees ยท Emergency Reordering
๐ New Features
| Feature | Details |
|---|---|
| ๐ด Live Queue | Real-time queue page for all roles โ updates via WebSocket |
| ๐ Prescriptions | Doctor issues prescriptions with AI drug suggestions + allergy warnings |
| ๐ฐ Doctor Fees | Consultation/follow-up/emergency fees shown during booking |
| ๐ Status Lifecycle | 9 appointment statuses with counters in admin dashboard |
| ๐จ Emergency Reordering | AI shifts all patients when emergency arrives, emails everyone |
| โฐ 5 Cron Jobs | Reminders(1h), No-show(30m), Queue(5m), Fatigue(9pm), Reset(midnight) |
| ๐ง 12 Email Templates | Including prescription email, no-show notice |
| ๐ค AI Drug Suggestions | Rule-based AI suggests medicines, warns about patient allergies |
| ๐ Status History Audit | Every status change logged with role + reason |
๐ Quick Start
unzip mediscanai-v7-final.zip && cd mediscanai-v7
# Backend
cd backend
cp .env.example .env
# Edit .env: add MONGODB_URI and JWT_SECRET
npm install
node seed.js # Creates demo accounts
node server.js
# Frontend (new terminal)
cd frontend
npm install
npm run dev
Open: https://mediqueue-ai.vercel.app/login
๐ Demo Accounts
| Role | Password | Fee | |
|---|---|---|---|
| Admin | [email protected] | Admin@12345 | โ |
| Dr. Sarah (Cardiology) | [email protected] | Doctor@123 | $150 consult |
| Dr. Raj (General) | [email protected] | Doctor@123 | $100 consult |
| Dr. Priya (Pediatrics) | [email protected] | Doctor@123 | $120 consult |
| Patient (John) | [email protected] | Patient@123 | โ |
| Patient (Mary) | [email protected] | Patient@123 | โ |
๐ What's New in V7
backend/
โโโ routes/
โ โโโ prescriptions.js โ NEW: issue/get prescriptions, AI drug suggestions
โ โโโ queue.js โ NEW: live queue endpoints (hospital/doctor/patient)
โโโ services/
โ โโโ queueManager.js โ UPDATED: emergency reorder + hospital broadcast
โโโ models/
โ โโโ Appointment.js โ UPDATED: prescription schema, consultationFee, statusHistory
โ โโโ User.js โ UPDATED: consultationFee, followUpFee, emergencyFee, bio
โโโ templates/emails/
โ โโโ prescription.js โ NEW: prescription email with medicine table
โ โโโ noShow.js โ NEW: no-show notice email
โโโ server.js โ UPDATED: 5 cron jobs, new socket rooms, new routes
frontend/
โโโ pages/
โ โโโ LiveQueue.jsx โ NEW: real-time queue for all roles
โ โโโ DoctorPrescriptions.jsx โ NEW: doctor issues prescriptions w/ AI
โ โโโ Prescriptions.jsx โ NEW: patient views/prints their prescriptions
โ โโโ BookAppointment.jsx โ UPDATED: shows doctor fee during booking
โ โโโ AdminDashboard.jsx โ UPDATED: status lifecycle counters + fee column
โ โโโ EditProfile.jsx โ UPDATED: fee fields for doctors
โ โโโ DoctorAppointments.jsx โ UPDATED: prescription link after completion
โโโ components/
โ โโโ Sidebar.jsx โ UPDATED: Live Queue ๐ด and Prescriptions links
โโโ App.jsx โ UPDATED: all new routes registered
๐ค AI Triage: 14/14 Test Cases Pass
| Input | Result |
|---|---|
| "cant able to breath from 2 hour" | ๐จ EMERGENCY |
| "chest pain sweating" | ๐จ EMERGENCY |
| "seizure convulsions" | ๐จ EMERGENCY |
| "fever 103 degrees" | โ ๏ธ HIGH |
| "mild headache tiredness" | โ LOW |
๐ง Email Notifications Sent For
Booking ยท Acceptance ยท Rejection ยท Cancellation (patient/doctor) ยท Rescheduling (doctor/AI) ยท Reminder (1hr before) ยท No-show ยท Prescription ยท Doctor Approved/Rejected
๐ Key API Endpoints
GET /api/queue/hospital โ Full hospital live queue
GET /api/queue/doctor/:id โ Single doctor queue
GET /api/queue/patient/my โ Patient's queue position
GET /api/queue/stats โ Status lifecycle counters
POST /api/prescriptions/:apptId โ Issue prescription (doctor)
GET /api/prescriptions/:apptId โ Get prescription
GET /api/prescriptions/patient/all โ Patient's all prescriptions
GET /api/doctors โ List doctors WITH fee info
GET /api/doctors/fees/:id โ Get single doctor fees
Built With
- batchfile
- css
- html
- javascript
- shell
Log in or sign up for Devpost to join the conversation.