A revolutionary healthcare platform that combines cutting-edge AI, blockchain security, and modern web technologies to transform outpatient department management.
- 🌟 What Makes This Special?
- 🎯 Core Modules
- 🛠️ Tech Stack
- 📁 Database Schema
- 🚀 Getting Started
- 🎨 Features Showcase
- 📱 Progressive Web App
- 🎯 Development Roadmap
- 🏆 What Sets This Apart
- 🚀 Deployment
- 🤝 Contributing
- 👨💻 Developers
While most hospital management systems are just glorified CRUD applications, we've built something that actually pushes boundaries. This isn't your typical college project - it's a production-ready healthcare platform with 45+ unique features that solve real-world problems.
🤖 AI Medical Chatbot
24/7 intelligent assistant powered by OpenAI GPT-4 that helps patients with symptom assessment, appointment scheduling, and general health queries. It's like having a medical receptionist who never sleeps.
🎙️ Voice-to-Text Prescriptions
Doctors can dictate prescriptions naturally - "Give paracetamol 500mg twice daily for 5 days" - and watch it automatically format into a proper prescription with drug interaction warnings. Revolutionary? We think so.
🔐 Blockchain Medical Records
Your medical history isn't stored in some hackable database. It's secured on blockchain with smart contracts, giving patients full control over who accesses their data. HIPAA compliance meets Web3.
📹 WebRTC Video Consultations
Crystal-clear telemedicine built right in. No third-party apps, no security concerns - just seamless doctor-patient video calls with screen sharing and session recording.
📱 Progressive Web App
Install it like a native app, use it offline, get push notifications even when the browser is closed. It's 2025, and your healthcare system should work everywhere.
⚡ Real-time Everything
Socket.io powers live appointment updates, instant chat, emergency alerts, and real-time doctor availability. Because waiting for page refreshes is so 2015.
• Comprehensive medical history tracking • Emergency contact management • Secure document storage with encryption • Multi-device access with offline sync
• Detailed profiles with specializations and qualifications • Dynamic availability scheduling • Conflict resolution for double bookings • Smart break-time management
• ML-powered slot optimization • No-show prediction algorithms • Automated reminders via SMS, Email, WhatsApp • Dynamic rescheduling suggestions
• Medical terminology recognition • Real-time drug interaction warnings • Allergy alerts integrated with patient history • Digital prescription generation
• Comprehensive test catalog • Automated ordering workflows • Result management with AI analysis • PDF report generation
• Transparent invoice generation • Multiple payment gateways • Immutable transaction records • Advanced financial reporting
• Doctor-patient messaging • Multi-channel notifications (Web Push, SMS, Email, WhatsApp) • Emergency broadcast system • In-app toast notifications
• Patient flow forecasting • Resource utilization insights • Early warning systems for overcrowding • Performance metrics visualization
javascript Next.js 14 // Server-side rendering & blazing performance React 18 // Component architecture TailwindCSS // Beautiful, responsive design Socket.io Client // Real-time communication React Query // State management & caching Framer Motion // Smooth animations React Hook Form // Efficient form handling React Speech Kit // Voice recognition
Node.js + Express // RESTful API server
Prisma ORM // Type-safe database queries
MySQL // Reliable data storage
Socket.io // WebSocket server
OpenAI API // GPT-4 integration
Web Push // Notification service
Twilio // SMS & WhatsApp
JWT // Secure authentication
Bcrypt // Password encryption
Helmet // Security headers javascript Blockchain // Solidity smart contracts for medical records WebRTC // Peer-to-peer video consultations Docker // Containerization & microservices Web3.js // Blockchain integration
prisma model User { id Int @id @default(autoincrement()) email String @unique password String role UserRole createdAt DateTime @default(now()) patient Patient? doctor Doctor? }
model Appointment { id Int @id @default(autoincrement()) patientId Int doctorId Int scheduledAt DateTime status AppointmentStatus @default(SCHEDULED) aiInsights Json? // ML predictions & recommendations bookingMethod String // voice, web, chatbot, etc. patient Patient @relation(fields: [patientId], references: [id]) doctor Doctor @relation(fields: [doctorId], references: [id]) }
bash Node.js 18+ MySQL 8.0+ Docker (optional but recommended)
1. Clone the repository bash git clone https://github.com/Aashish-Jha-11/Hospital-OPD.git cd Hospital-OPD-
2. Install dependencies bash
cd frontend npm install
cd ../backend npm install
- Environment setup
# Backend .env
DATABASE_URL="mysql://user:password@localhost:3306/hospital_opd"
JWT_SECRET="your-secret-key"
OPENAI_API_KEY="your-openai-key"
VAPID_PUBLIC_KEY="your-vapid-public"
VAPID_PRIVATE_KEY="your-vapid-private"
TWILIO_ACCOUNT_SID="your-twilio-sid"
TWILIO_AUTH_TOKEN="your-twilio-token"
# Frontend .env.local
NEXT_PUBLIC_API_URL="http://localhost:3001"
NEXT_PUBLIC_VAPID_KEY="your-vapid-public"4. Database setup bash cd backend npx prisma migrate dev npx prisma db seed
5. Run the application bash
docker-compose up
cd backend && nodemon server.js
cd frontend && npm run dev
- Access the application
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:3001 - API Documentation:
http://localhost:3001/api-docs
Web Push Notifications (works even when browser is closed) javascript // Appointment reminders, emergency alerts, test results ✅ Background notifications ✅ Action buttons (Confirm, Reschedule) ✅ Custom vibration patterns ✅ Auto-sync across devices
Real-time Socket.io Updates javascript // Live updates as they happen ⚡ New appointment bookings ⚡ Doctor availability changes ⚡ Emergency broadcasts ⚡ Chat messages
PWA Badge Notifications javascript // Visual indicators on app icon 🔴 Unread message count 🔴 Pending appointment count
In-Browser Toast Notifications javascript // Elegant, non-intrusive alerts 💬 Success confirmations 💬 Warning messages 💬 Info updates
Medical Chatbot Capabilities: • Symptom assessment with preliminary insights • Appointment scheduling assistance • General health information • Medication queries • Always recommends professional consultation
Voice Recognition Features: • Medical terminology processing • Real-time transcription • Context-aware interpretation • Drug interaction checking • Automatic dosage formatting
Predictive Analytics: • Patient flow prediction • Resource utilization forecasting • No-show probability • Early warning systems • Treatment recommendation support
HIPAA Compliant Features: • ✅ AES-256-GCM encryption for patient data • ✅ Role-based access control (RBAC) • ✅ Audit logging for all data access • ✅ Secure file storage and transmission • ✅ Automatic session timeout • ✅ Two-factor authentication ready
Blockchain Security: • Immutable medical record storage • Patient-controlled access management • Transparent audit trails • Smart contract validation • Decentralized architecture
javascript ✨ Install to home screen (iOS, Android, Desktop) ✨ Offline functionality with service workers ✨ Background sync for delayed actions ✨ Push notifications even when app is closed ✨ Automatic updates ✨ Native app-like experience
New: The PWA dashboard now ships with a Notification Health Monitor (frontend/src/components/pwa/push-diagnostics.jsx) so developers and power users can inspect browser support, verify service workers, re-subscribe devices, and dispatch custom test payloads without leaving the app.
• ✅ Project architecture setup • ✅ Authentication system • ✅ Database design with Prisma • ✅ Core API development
• ✅ Patient management system • ✅ Doctor management & scheduling • ✅ Appointment booking logic • ✅ Prescription & lab request systems • ✅ Billing foundation
• ✅ Authentication UI • ✅ Role-based dashboards • ✅ Appointment booking interface • ✅ Medical records display • ✅ Responsive mobile design
• ✅ Socket.io integration • ✅ Web Push notifications • ✅ PWA implementation • ✅ Communication APIs (Twilio, Email) • ✅ File management system
• ✅ OpenAI medical chatbot • ✅ Voice recognition system • ✅ Smart scheduling algorithms • ✅ Predictive analytics • ✅ AI-enhanced medical features
• ✅ Blockchain medical records • ✅ WebRTC video consultations • ✅ Microservices architecture • ✅ Docker containerization • ✅ Production deployment • ✅ Comprehensive documentation
• Basic CRUD operations • Simple HTML forms • Manual appointment booking • No real-time features • Basic authentication only • Security as an afterthought
• AI-First Approach: GPT-4 medical chatbot, voice prescriptions, predictive analytics • Blockchain Security: Industry-leading data protection • Real-time Everything: Socket.io for instant updates • Professional Architecture: Microservices, Docker, scalable design • Modern Web Standards: PWA, offline mode, push notifications • Production Ready: HIPAA compliant, secure, optimized
• Role-based authentication • Patient/doctor management • Appointment booking • Prescription management • Responsive web interface • Real-time notifications
• AI chatbot integration • Voice-to-text functionality • PWA with offline capabilities • Video consultation system • Advanced analytics dashboard • Multi-channel notifications
• Blockchain medical records • Machine learning predictions • Microservices architecture • Advanced security compliance • WebRTC telemedicine • Smart contract integration
bash
docker-compose up -d
docker-compose logs -f
docker-compose down
bash
cd backend npm run build npm start
cd frontend npm run build npm start
• Frontend: Vercel, Netlify • Backend: AWS EC2, DigitalOcean, Heroku • Database: AWS RDS, PlanetScale • Blockchain: Ethereum Testnet (Sepolia, Goerli)
Weeks 1-2: Next.js docs, Prisma tutorials, JWT authentication, MySQL design
Weeks 3-4: Express.js best practices, RESTful API design, healthcare data modeling
Weeks 5-6: React hooks, TailwindCSS, form validation, component architecture
Weeks 7-8: Socket.io communication, Web Push API, PWA development, service workers
Weeks 9-10: OpenAI API integration, Web Speech API, ML basics, healthcare AI
Weeks 11-12: Blockchain smart contracts, WebRTC, Docker, production deployment
- Problem Statement (30s): Healthcare inefficiencies and patient data security concerns
- AI Chatbot Demo (90s): Live medical queries with GPT-4 integration
- Voice Prescription (60s): Doctor dictation in action with drug interaction warnings
- Video Consultation (90s): WebRTC telemedicine showcase with screen sharing
- Security Features (30s): Blockchain implementation highlights
- 🎯 Microservices scalability for enterprise-level deployment
- 🤖 AI integration with OpenAI GPT-4 for intelligent healthcare assistance
- 🔐 Blockchain security implementation for immutable medical records
- 📱 PWA offline healthcare access with service worker caching
- ⚡ Real-time communication protocols using Socket.io
- 🏭 Solving actual healthcare problems with modern technology
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow the existing code style and conventions
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
This project is licensed under the MIT License - see the LICENSE file for details.
Aashish Jha
GitHub: @Aashish-Jha-11
Subham Sangwan
GitHub: @Subham-KRLX
Harikrushn
GitHub: @Harikrushn9118
Abhey Dua
GitHub: @abhey8
- OpenAI for GPT-4 API
- Web3 Foundation for blockchain resources
- The amazing open-source community
- Healthcare professionals who provided domain insights
Having issues? Found a bug? Have suggestions?
- 🐛 Open an issue
- 💬 Start a discussion
- 📧 Email: contact@hospital-opd.com