CS Project - Copy
CS Project - Copy
CS Project - Copy
Mohd Mehfooz
12 A1
Board roll no.:
INDEX
S No Topic Pg No
1 HARDWARE AND SOFTWARE 1
2 INTRODUCTION 2
3 HOSPITAL 3
4 NEED OF HMS 4
5 FUTURE SCOPE 5
6 EXISTING SYSTEM 6-7
9 LIMITATIONS OF HMS 32
1 CONCLUSION 33
0
1 BIBLIOGRAPHY 34
1
HARDWARE AND SOFTWARE
REQUIRED
HARDWARE
Process : 11th Gen Intel(R) Core(TM) i3-1115G4 @
3.00GHz 3.00 GHz
Installed RAM : 8.00 GB (7.79 GB usable)
SOFTWARE
PYTHON (3.13 bugfix 2024-10-07 2029-10 PEP 719)
2
HOSPITAL
A hospital is a health care institution providing patient treatment
with specialized staff and equipment. Hospital are usually funded
by public sector by health organizations (for profit or non-
profit), by health insurance companies, or by departments (e.g.,
surgery, and urgent care etc)
HOSPITAL
MANAGEMENT SYSTEM
A hospital management system is an information system that
manages the aspects of a hospital. This may include the
administrative, financial, and medical processing. It is an
integrated end-to-end Hospital Management System that provides
relevant information across the hospital to support effective
decision making for patient care, hospital administration and
critical financial accounting, In a seamless flow. This program
can look after Inpatients, OPD patients, records, treatment, status
illness, etc
3
NEED OF HMS
1. Minimized documentation and no duplication of
records.
2. Reduce paper work.
3. Improved patient care.
4. Better administration control.
5. Smart revenue management.
6. Exact stock information.
4
FUTURE SCOPE
Data-driven
Using analytics to help with strategic planning, healthcare
administrators can monitor performance and make timely
decisions.
Web-based
Moving data from paperless records to the web in a structured
way can reduce costs and increase convenience.
Streamlined processes
HMS can automate and streamline administrative and clinical
processes, reducing manual effort and healthcare staff workload.
Inventory management
HMS can help with traceability, availability, and security of
inventory, and can also help with expiry date management.
User-friendly
HMS should be easy to use and navigate for both staff and
patients. 5
EXISTING SYSTEM
ADVANTAGE
In today's world if someone wants to book a Doctor's
Appointment we need to call in clinic or personally go to that
place and book the appointment.
6
DISADVANTAGE OF EXISTING
SYSTEM
Lack of privacy
Risk in the management of the data
Less security
Less user friendly
Accuracy nor guaranteed
Not in reach of distinct users
There is no storage and automation if users have some enquiry
8
SOURCE CODE
(PYTHON)
9
import os
import hashlib
import re
from datetime import datetime
# Utility Functions
def hash_password(password):
"""Hash a password for secure storage."""
return hashlib.sha256(password.encode()).hexdigest()
# Intializing files.
def initialize_files():
"""Ensure required files exist."""
for file in [USER_FILE, PATIENT_FILE,
SPECIALISTS_FILE]:
if not os.path.exists(file):
with open(file, "w") as f:
pass
# Registering User.
def register_user():
"""Register a new user."""
print("\n--- Register ---")
username = input("Enter a username: ")
password = input("Enter a password: ")
with open(USER_FILE, "r") as f:
for line in f: 10
stored_username, _ = line.strip().split(",")
if stored_username == username:
print("Username already exists. Please try a different
one.")
return False
# Logging in User.
def login_user():
"""Login an existing user."""
print("\n--- Login ---")
username = input("Enter your username: ")
password = input("Enter your password: ")
hashed_password = hash_password(password)
found = False
with open(PATIENT_FILE, "r") as f:
for line in f:
fields = line.strip().split(",")
if fields[0] == search_id:
print("\nPatient Found:")
print(f"ID: {fields[0]}")
print(f"Registrations Date: {fields[1]}")
print(f"Name: {fields[2]}")
print(f"Age: {fields[3]}")
print(f"Diagnosis: {fields[4]}")
print(f"Doctor: {fields[5]}")
print(f"Appointment: {fields[6]}") 15
print(f"Address: {fields[7]}")
print(f"Pincode: {fields[8]}")
found = True
break
if not found:
print("Patient not found.")
# Deleting Patient
def delete_patient():
"""Delete a patient record by ID."""
print("\n--- Delete Patient ---")
delete_id = input("Enter Patient ID to delete: ")
records = []
found = False
if found:
print("Patient record deleted successfully!")
else:
print("Patient ID not found.")
def update_patient():
"""Update an existing patient's record."""
print("\n--- Update Patient ---")
16
update_id = input("Enter Patient ID to update: ")
updated_records = []
found = False
17
with open(PATIENT_FILE, "w") as f:
f.writelines(record + "\n" for record in updated_records)
if found:
print("Patient record updated successfully!")
else:
print("Patient ID not found.")
# Filtering Patient
def filter_patients():
"""Filter patients by diagnosis or doctor."""
print("\n--- Filter Patients ---")
print("1. Filter by Diagnosis")
print("2. Filter by Doctor")
choice = input("Enter your choice: ")
# Main Menu
def main_menu():
"""Display the main menu."""
while True:
print("\n--- Hospital Management System ---")
print("1. Add Patient")
print("2. View Patients")
19
print("3. Search Patient")
print("4. Update Patient")
print("5. Delete Patient")
print("6. Filter Patient")
print("7. Add Specialist")
print("8. View Specialists")
print("9. Generate Summary")
print("10. Logout")
choice = input("Enter your choice: ")
if choice == "1":
add_patient()
elif choice == "2":
view_patients()
elif choice == "3":
search_patient()
elif choice == "4":
update_patient()
elif choice == "5":
delete_patient()
elif choice == "6":
filter_patients()
elif choice == "7":
add_specialist()
elif choice == "8":
view_specialists()
elif choice == "9":
generate_summary()
elif choice == "10":
print("Logging out....")
break
else:
print("Invalid choice. Please try again.")
20
# Entry Point
if __name__ == "__main__":
initialize_files()
print("--- Welcome to the Hospital Management System
---")
while True:
print("\n1. Login")
print("2. Register")
print("3. Exit")
user_choice = input("Enter your choice: ")
if user_choice == "1":
if login_user():
main_menu()
elif user_choice == "2":
register_user()
elif user_choice == "3":
print("Exiting the system. Goodbye!")
break
else:
print("Invalid choice. Please try again.")
21
SCREENSHOTS
2
22
1. MAIN MENU
2. REGISTRATION
23
3.Logging
24
4.Adding Specialist Details
25
6.Viewing Specialist Details
29
Patients Record After Deleting
12.Filtering Patient Records
Filtering By Diagnosis
30
Filtering By Doctor
11.Generating Summary
31
12. Logging Out
13. EXITING
32
LIMITATION OF HMS
Hospital management system (HMS) projects can face
several limitations, including:
Time and effort: Many studies show that HMS requires more
effort, time, and work.
33
CONCLUSION
Hospital Management System (HMS) is essential to the delivery of
modern healthcare. It can boost patient outcomes, lower medical
errors, and improve the overall quality of care. It enables hospitals
with a centralized platform to manage their operations, automate
mundane processes, and enhance communication.
59% of millennials are willing to switch doctors for better online
access. An HMS will improve communication between patients and
hospitals by allowing patients to access their medical records, book
appointments, receive reminders, and communicate online with their
doctors and nurses. You will have improved patient engagement, a
reduction in waiting times, and increased patient satisfaction
34
BIBLIOGRAPHY
www.wikipedia.org
www.w3resouce.com
35