A web-based Hospital Management System (HMS) built with Flask, MongoDB, and Flask-Login. This system supports doctor-patient management, secure login, patient bookings, and trigger-like audit logs for patient records.
-
π¨ββοΈ Doctor Management
Add, view, and search doctors by department. -
π§βπΌ Patient Management
Book appointments, view patient lists, edit/delete bookings. -
π User Authentication
Login system with role-based access using Flask-Login. -
π Trigger Logging
Logs updates and deletions of patient records, mimicking database triggers. -
π Search Functionality
Search doctors by department or name.
Layer | Technology |
---|---|
Backend | Python, Flask |
Frontend | HTML, CSS, Bootstrap |
Database | MongoDB (via PyMongo) |
Auth | Flask-Login |
git clone https://github.com/yourusername/hospital-management-system.git
cd hospital-management-system
2. Set Up Virtual Environment
bash
Copy
Edit
python -m venv venv
source venv/bin/activate
nstall Dependencies
bash
Copy
Edit
pip install -r requirements.txt
Set Up MongoDB
Ensure MongoDB is running locally or connect to a remote MongoDB instance.
Update your MongoDB URI inside app.py:
python
Copy
Edit
app.config["MONGO_URI"] = "mongodb://localhost:27017/hospital"
###3.π Run the App
bash
Copy
Edit
python app.py
Visit http://127.0.0.1:5000 in your browser.