Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MediCare HMS Logo

MediCare — Hospital Management System

A desktop Hospital Management System built with Python, Tkinter (ttkbootstrap), and SQLite.
Built as a final-year B.Tech Computer Science project.


📋 Project Overview

MediCare is a full-featured desktop application for managing day-to-day hospital operations — patients, doctors, appointments, billing, and medicine inventory — all from a single, modern interface. It was built to demonstrate practical, real-world software engineering skills: database design, object-oriented Python, input validation, and a polished UI, all without relying on any web framework or external API.

The application ships with sample data so it can be explored immediately after installation, and supports both light and dark themes that persist across restarts.


✨ Features

Authentication

  • Secure admin login with SHA-256 password hashing
  • Show/Hide password toggle
  • Logout with confirmation

Dashboard

  • Live stat cards: total patients, doctors, today's appointments, revenue, medicine stock
  • Revenue trend chart (Matplotlib) for the last 6 months
  • Recent activity feed
  • Current date & time display

Patient Management

  • Add / edit / delete / search patients
  • Auto-generated Patient IDs (e.g. PAT0001)
  • Optional patient photo upload

Doctor Management

  • Add / edit / delete / search doctors
  • Auto-generated Doctor IDs (e.g. DOC001)

Appointment Management

  • Book / update / cancel / search appointments
  • Patient and doctor selection via dropdowns
  • Date and time-slot validation (no past-dated bookings)

Billing

  • Consultation fee + medicine charges → automatic total calculation
  • One-click professional PDF bill generation (ReportLab)

Medicine Inventory

  • Add / update stock / delete / search medicines
  • Automatic low-stock warning banner

Settings

  • Light/Dark theme toggle with saved preference
  • Database backup & restore
  • CSV export for patients, doctors, and medicines

Reliability

  • Input validation on every form (empty fields, phone numbers, ages, dates, numbers)
  • Friendly error dialogs instead of crashes
  • SQLite database with foreign keys, auto-created on first run with demo data

🛠 Technologies Used

Purpose Technology
Language Python 3.12+
GUI Framework Tkinter + ttkbootstrap
Database SQLite3
Charts Matplotlib
PDF Generation ReportLab
Image Handling Pillow

No Flask, Django, or web technologies are used — this is a native desktop application.


📁 Folder Structure

Hospital-Management-System/
├── assets/
│   ├── icons/
│   ├── images/
│   └── logo.png
│
├── database/
│   ├── schema.sql          # Table definitions
│   └── db.py                # Connection manager + auto-seeding
│
├── models/                  # Data-access classes (Patient, Doctor, etc.)
├── views/                   # All Tkinter/ttkbootstrap screens
├── controllers/             # Navigation between views
├── utils/                    # Validators, PDF generator, theme manager, helpers
├── reports/                  # Generated PDF bills land here
├── screenshots/               # App screenshots for this README
│
├── requirements.txt
├── README.md
├── LICENSE
└── main.py                   # Application entry point

Note on architecture: to keep the codebase beginner-friendly and easy to explain in an interview, each views/*.py file combines its own UI and control logic (a common simplification for student-scale desktop apps), while controllers/app_controller.py handles the higher-level job of switching between screens.


⚙️ Installation

Prerequisites: Python 3.12 or newer.

# 1. Clone the repository
git clone https://github.com/anujjakhotiya/Hospital-Management-System.git
cd Hospital-Management-System

# 2. (Optional but recommended) create a virtual environment
python -m venv venv
source venv/bin/activate      # On Windows: venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Run the application
python main.py

The SQLite database is created automatically on first launch, along with sample doctors, patients, appointments, medicines, and a demo bill.

Default login:

Username: admin
Password: admin123

🚀 Usage

  1. Launch the app with python main.py.
  2. Log in using the default credentials above.
  3. Use the sidebar to navigate between Dashboard, Patients, Doctors, Appointments, Billing, Medicine Inventory, and Settings.
  4. Generate a PDF bill from the Billing screen — it's saved to the reports/ folder.
  5. Toggle Light/Dark mode any time from Settings; your choice is remembered the next time you open the app.

📸 Screenshots

🔐 Login

Login


📊 Dashboard

Dashboard


👤 Patient Management

Patients


👨‍⚕️ Doctor Management

Doctors


📅 Appointment Management

Appointments


💳 Billing

Billing


💊 Medicine Inventory

Medicine Inventory


⚙️ Settings

Settings


🔮 Future Improvements

  • Role-based access (doctor/receptionist logins in addition to admin)
  • Appointment reminders via desktop notifications
  • Ward and bed management module
  • Multi-branch / multi-hospital support
  • Data visualizations for patient demographics and department load

📄 License

This project is licensed under the MIT License.


Built by Anuj Jakhotiya — B.Tech CSE, SR University, Warangal

About

A Python-based Hospital Management System with secure login, patient records, appointments, billing, medicine inventory, PDF reports, and dark/light themes.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages