MAD1 Project
Hospital Management System (HMS) — Flask Web Application
A full-stack web application built using Flask, SQLite, SQLAlchemy ORM, Jinja2, and HTML/CSS that manages hospital operations such as doctor availability, patient appointments, treatment recording, billing, and admin-level control.
This system provides three separate user roles — Admin, Doctor, and Patient — each with dedicated dashboards and functionality. The project handles real-world hospital workflows such as scheduling, booking, cancellations, consultations, treatment documentation, and generating bills.
Project Description
The Hospital Management System (HMS) is a role-based web application designed to digitize and automate core hospital operations. It focuses on providing a clean, simple, and effective interface for three types of users:
Admin
The Admin manages the overall hospital setup. They can:
Add & update doctors
Add & update patients
Create hospital departments
View all appointments
Search and filter users
Blacklist misusing doctors or patients
View medical history of a patient
Doctor
The Doctor manages their schedule and visits. They can:
Set and update availability (automatically shown to patients)
View upcoming appointments for next 7 days
Complete visits by adding diagnosis, prescription, and notes
Generate patient bills
View complete medical history of a patient
Cancel appointments
Patient
The Patient interacts with the healthcare system. They can:
Register & login securely
Search doctors by specialization or name
View real-time available appointment slots
Book or cancel appointments
View previous treatments and prescriptions
Update personal profile information
Key Features
Role-Based Access System (Admin, Doctor, Patient)
Secure Authentication using hashed passwords (pbkdf2:sha256)
Appointment Booking System with time-slot handling and conflict detection
Doctor Availability Scheduler with automatic filtering of expired slots
Treatment & Billing Workflow (visit completion → treatment → auto-bill generation)
Blacklist System for Admin to block misusing users
Full CRUD Operations for doctors, patients, departments
SQLite Database with SQLAlchemy ORM
Flash Messages for user-friendly feedback
Clean Template System using Jinja2 + HTML/CSS
Project Structure (Short Overview) HMS_MAD1/ │── app.py # Main Flask Application (All Routes) │── models.py # SQLAlchemy ORM Models (Admin, Doctor, Patient, Appointment, etc.) │── config.py # DB + App Configuration │── instance/hms.db # SQLite Database │── templates/ # All HTML Templates │── HMS_repport # Report for the project │── README.md # Project Documentation
5.Installation Instructions Step 1 — Clone the Repository git clone https://github.com/Anijesh/Hospital_Management_System.git cd Hospital_Management_System
Step 2 — Create Virtual Environment python3 -m venv venv source venv/bin/activate # Linux & macOS
Step 3 — Install Dependencies pip install flask flask_sqlalchemy
(Your project only requires Flask + SQLAlchemy + Werkzeug, all installed automatically.)
- How to Run the Application Step 1 — Ensure database folder exists
Flask automatically creates the SQLite DB inside /instance/hms.db.
Step 2 — Start the Flask Server python app.py
Step 3 — Open Browser
Visit: