Skip to content

πŸ₯ A hospital management web app for managing appointments, patient records, and doctor schedules. Built with Flask, Vue.js, SQLite, Redis and Celery.

License

Notifications You must be signed in to change notification settings

aloktripathi1/Medihub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ MediHub - Hospital Management System

A modern, professional web application for comprehensive hospital management with intelligent scheduling, secure medical records, and real-time notifications.

Python Flask Vue.js Bootstrap License

What is this project?

This is a hospital management system I built for managing appointments between doctors and patients. It has three types of users:

  • Admin - Manages doctors and patients
  • Doctors - View appointments and update treatment records
  • Patients - Book appointments and view medical history

Why I made this

Most hospitals still use paper registers or complicated software. I wanted to make something simple that:

  • Lets patients book appointments online
  • Helps doctors see their schedule easily
  • Gives admins control over everything
  • Keeps all medical records in one place

Features

For Patients

  • Register and login
  • Book appointments (choose doctor, date, time slot)
  • View appointment history
  • See treatment records (diagnosis, medicines prescribed)
  • Cancel appointments

For Doctors

  • View today's appointments
  • See assigned patients
  • Update treatment details (diagnosis, prescription, notes)
  • Mark appointments as completed
  • Set availability (morning/evening slots for next 7 days)

For Admin

  • Add/edit/blacklist doctors
  • Edit/blacklist patients
  • View all appointments
  • Reschedule or cancel any appointment
  • See appointment history for any doctor or patient
  • Dashboard with statistics

Tech Stack

Frontend:

  • HTML, CSS, JavaScript
  • Vue.js 3 (loaded from CDN)
  • Bootstrap 5 for styling
  • Professional dark theme (#0f172a)

Backend:

  • Python Flask
  • SQLite database
  • SQLAlchemy (ORM)
  • JWT for authentication

Background Jobs:

  • Celery (for sending emails)
  • Redis (message broker)

Project Structure

hospital-management-system/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ models/              # Database tables
β”‚   β”œβ”€β”€ routes/              # API endpoints
β”‚   β”‚   β”œβ”€β”€ auth.py         # Login/Register
β”‚   β”‚   β”œβ”€β”€ admin.py        # Admin features
β”‚   β”‚   β”œβ”€β”€ doctor.py       # Doctor features
β”‚   β”‚   └── patient.py      # Patient features
β”‚   β”œβ”€β”€ celery_tasks/       # Email sending tasks
β”‚   β”œβ”€β”€ app.py              # Main Flask app
β”‚   β”œβ”€β”€ database.py         # Database setup
β”‚   └── seed_db.py          # Create sample data
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ app.js          # Main Vue app
β”‚   β”‚   β”œβ”€β”€ admin.js        # Admin dashboard
β”‚   β”‚   β”œβ”€β”€ doctor.js       # Doctor dashboard
β”‚   β”‚   β”œβ”€β”€ patient.js      # Patient dashboard
β”‚   β”‚   └── api.js          # API calls
β”‚   β”œβ”€β”€ custom.css          # Styling
β”‚   └── index.html          # Main page
└── docs/                    # Documentation

πŸš€ Getting Started

For detailed installation and setup instructions, please refer to docs/setup.md.

Quick Start:

# Clone and setup
git clone https://github.com/aloktripathi1/hospital-management-system.git
cd hospital-management-system/backend

# Install and run
pip install -r requirements.txt
python seed_db.py
python app.py

# Visit http://localhost:5000

Default Login:

  • Admin: admin / admin
  • Doctor: ajay / ajay.kumar123
  • Patient: rahul / rahul123

Database Tables

  • users - Login credentials for all users
  • doctors - Doctor profiles (name, specialization, experience, fees)
  • patients - Patient info (name, age, gender, medical history)
  • appointments - Booking records (date, time, status)
  • treatments - Treatment records (diagnosis, prescription, notes)
  • doctor_availability - Doctor schedule slots (morning/evening)

Screenshots

Homepage

Modern hero section with professional dark theme

Homepage

Login/Register

Clean branded login page with stats

Login Register

Admin Dashboard

Manage doctors, patients, and appointments

Admin Dashboard

Doctor Dashboard

View appointments and update treatments

Doctor Dashboard

Patient Dashboard

Book appointments and view history

Patient Dashboard

What I Learned

  • Building REST APIs with Flask
  • User authentication with JWT
  • Frontend development with Vue.js
  • Database design and relationships
  • Background job processing with Celery
  • UI/UX design principles

Future Improvements

  • Payment integration for consultation fees
  • Video consultation feature
  • Prescription PDF download

Documentation

Check the docs/ folder for more details:

  • setup.md - Detailed setup instructions
  • architecture.md - How everything works together
  • bg_jobs.md - Email system explanation

Contributing

Feel free to fork this project and make improvements! Some ideas:

  • Add more specializations
  • Improve UI design
  • Add more features (lab reports, pharmacy, etc.)

License

MIT License

About

πŸ₯ A hospital management web app for managing appointments, patient records, and doctor schedules. Built with Flask, Vue.js, SQLite, Redis and Celery.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •