0% found this document useful (0 votes)
4 views

??????? ???????? ????????? ????

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

??????? ???????? ????????? ????

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Maharaj a Agrasen

public school
Sec. 8, JankipuramExtension, Lucknow

SESSION: 2024- 2025


TOPIC: HOSPITAL MANAGEMENT SYSTEM

SUBMITTED BY: SUBMITTED TO:


Mr. Sumit Arora
CLASS: XII -
ROLL NO.:
CERTIFICATE
This is to cer tify that of Class:
XII Science of Maharaja Agrasen Public
School has done his project on HOSPITAL
MANAGEMENT SYSTEM under my
supervision. She has taken interest and has
shown at most sincerity in completion of this
project.
I cer tify this project up to my expectation &
as per guidelines issued by CBSE, NEW DELHI.

Internal Examiner External Examiner


Principal
Maharaja Agrasen
public school
Sec. 8, Jankipuram Extension, Lucknow

SESSION: 2023-2024
TOPIC: HOSPITAL MANAGEMENT SYSTEM
SUBMITTED BY: SUBMITTED TO:
Mr. Sumit Arora
CLASS: XII
ROLL NO.:
CERTIFICATE
This is to certify that of class: XII
of Maharaja Agrasen Public School has done
his project on HOSPITAL MANAGEMENT
SYSTEM under my supervision. He has taken
interest and has shown at most sincerity in
completion of this project.
I certify this project up to my expectation &
as per guidelines issued by CBSE, NEW DELHI.

Internal Examiner External Examiner Principal


ACKNOWLEDGMENT
It is with pleasure that I acknowledge my
sincere gratitude to our teacher, Mr. Sumit
Arora who taught and undertook the
responsibility of teaching the subject
computer science. I have been greatly
benefited from his classes.
I am especially indebted to our Principal
Mrs. Bhawna Singh who has always been a
source of encouragement and support and
without whose inspiration this project would
not have been a successful I would like to
place on record heartfelt thanks to him.
Finally, I would like to express my sincere
appreciation for all the other students for
my batch their friendship & the fine time
that we all shared together.
TABLE OF CONTENTS

1 Project Title
2 Certificate
3 Acknowledgement
4 Hardware and Software Required
Hospital & Hospital Management
5
System
Need of Hospital Management
6
System
7 Introduction
8 Existing System
Advantages of Hospital
9
Management System
10 Module List
11 Python Program Code
12 Output Screens
HARDWARE AND SOFTWARE REQUIRED

HARDWARE
1. X86 64-bit Intel/AMD CPU
2. 2 GB RAM
3. 5 GB free disk space

SOFTWARE
• Python 3.8.x or above
• MySQL Server
• Python Connector
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, database treatment, status illness, billing etc. it also
maintains their hospital info such as ward id, Doctor in charge,
Department administering etc.
NEED OF HOSPITAL MANAGEMENT SYSTEM
1. Minimized documentation and no duplication of records.
2. Reduced paper work.
3. Improved patient care
4. Better Administration Control
5. Faster information flow between various departments
6. Smart Revenue Management
7. Effective billing of various services
8. Exact stock information
INTRODUCATION
The project Hospital Management System includes
registration of patients, storing their details into the system.
The software has the facility to give a unique id for every
patient and stores the details of every patient and the staff
automatically. It includes a search facility to know the
current status of each room. User can search availability of
a doctor and the details of a patient using the id. The
Hospital Management System can be entered using a
username and password. It is accessible either by an
administrator or receptionist. Only they can add data into
the database. The data can be retrieved easily. The
interface is very user-friendly. The data are well protected
for personal use and makes the data processing very fast.
The purpose of the project entitled as “HOSPITAL
MANAGEMENT SYSTEM” is to computerize the Front Office
Management of Hospital to develop software which is user
friendly, simple, fast, and cost-effective. It deals with the
collection of patient’s information, diagnosis details, etc.,
and also to manipulate these details meaningfully System
input contains patient details, diagnosis details; while
system output is to get these details on to the screen.
EXISTING SYSTEM

❖ 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.
❖ This consumes precious time of the patient. Also
if the doctor cancels his /her schedule, the
patient does not come to know about it unless
he/she goes to the clinic.

DISADVANTAGES OF EXISTING SYSTEM

1. Lack of privacy
2. Risk in the management of the data.
3. Less security
4. Less user-friendly
5. Accuracy nor guaranteed
6. Not in reach of distant users.
7. There is no storage and automation if users
have some enquiry.
ADVANTAGES OF HMS
➢ Less paperwork
➢ Costs Reduction
➢ Improves patient’s experience
➢ Improve data security
➢ Better collaboration & Communication
➢ Analytic anytime anywhere
MODULE LIST
➢ ADMINISTRATION

• SHOW DETAILS
1. DOCTOR DETAILS
2. NURSE DETAILS
3. OTHER WORKERS
• ADD NEW MEMBER
1. DOCTOR DETAILS
2. NURSE DETAILS
3. OTHER WORKERS
• DELETE EXISTING ONE
1. DOCTOR DETAILS
2. PATIENT DETAILS
3. OTHER WORKERS
• EXIT

➢ PATIENT (ADMISSION AND DISCHARGE PROCESS)

• SHOW PATIENT DETAILS


• ADD NEW PATIENT
1. PATIENT ID
2. NAME
3. AGE
4. SEX
5. ADDRESS
6. DOCTOR RECOMMENDED
• DISCHARGE PATIENT
➢ SIGN OUT
PYTHON PROGRAM CODE
# Hospital Management System
while True:
print("""
================================
WELCOME TO MY HOSPITAL
================================
""")
# Creating Database Connectivity
import mysql.connector

uname = str(input("Enter the Database Username: "))


passwd = str(input("Enter the Database Password: "))

mysql = mysql.connector.connect(host="localhost", user=uname,


password=passwd)
my_cursor = mysql.cursor()
# creating database
my_cursor.execute("create database if not exists my_hospital")
my_cursor.execute("use my_hospital")
# creating the tables we need
my_cursor.execute(
"create table if not exists patient_details(puid int(10) primary key,name
varchar(30) not null,age int(3),"
"address varchar(50),doctor_recommended varchar(30))")
my_cursor.execute(
"create table if not exists doctor_details(name varchar(30) primary
key,specialisation varchar(40),age int(2),"
"address varchar(30),contact varchar(15),fees int(10),monthly_salary
int(10))")
my_cursor.execute(
"create table if not exists nurse_details(name varchar(30) primary key,age
int(2),address varchar(30),"
"contact varchar(15),monthly_salary int(10))")
my_cursor.execute(
"create table if not exists other_workers_details(name varchar(30) primary
key,age int(2),address varchar(30),"
"contact varchar(15),monthly_salary int(10))")
# login or signup option
# creating table for storing the username and password of the user
my_cursor.execute(
"create table if not exists user_data(username varchar(30) primary
key,password varchar(30) default'000')")
# printing option
while True:
print("""
1. SIGN IN (LOGIN)
2. SIGN UP (REGISTER)
""")

r = int(input("Enter your Choice: "))

# IF USER WANTS TO REGISTER


if r == 2:
print("""

=======================================
!!!!!!!PLEASE REGISTER YOURSELF!!!!!!!!
=======================================
""")
u = input("Enter your preferred Username: ")
p = input("Enter your preferred Password: ")
# ENTERING THE ENTERED VALUE TO THE USER_DATA TABLE
my_cursor.execute("insert into user_data values('" + u + "','" + p + "')")
mysql.commit()

print("""
=======================================
!!!!!!!!REGISTERED SUCCESSFULLY!!!!!!!!
=======================================
""")
x = input("Enter any key to Continue: ")
# IF USER WANTS TO LOG-IN
elif r == 1:

# PRINTING THE SING-IN OPTION AGAIN TO THE USER AFTER REGISTRATION

print("""
==================================
!!!!!!!!!!!!!!SIGN IN!!!!!!!!!!!!!
==================================
""")
un = input("Enter your Username: ")
ps = input("Enter your Password: ")

my_cursor.execute("select password from user_data where username='" +


un + "'")
row = my_cursor.fetchall()
for i in row:
a = list(i)
if a[0] == str(ps):
while True:
# Displaying the task you can perform
print("""
1.ADMINISTRATION
2.PATIENT (ADMISSION OR DISCHARGE PROCESS)
3.SIGN OUT

""")

# Asking for the task from user


a = int(input("Enter your Choice: "))
# if user wants to enter administration option
if a == 1:
print("""
1. SHOW DETAILS
2. ADD NEW MEMBER
3. DELETE EXISTING ONE
4. EXIT
""")
b = int(input("Enter your Choice: "))
# showing the existing details
if b == 1:
print("""
1. DOCTOR DETAILS
2. NURSE DETAILS
3. OTHER WORKERS
""")

# ASKING USER'S CHOICE


c = int(input("Enter your Choice: "))
# if user wants to see the details of doctors
if c == 1:
my_cursor.execute("select * from doctor_details")
row = my_cursor.fetchall()
for i1 in row:
b=0
v = list(i1)
k = ["NAME", "SPECIALISATION", "AGE", "ADDRESS",
"CONTACT", "FEES",
"MONTHLY_SALARY"]
d = dict(zip(k, v))
print(d)
# if user wants to see the details of nurses
elif c == 2:
my_cursor.execute("select * from nurse_details")
row = my_cursor.fetchall()
for i2 in row:
v = list(i2)
k = ["NAME", "SPECIALISATION", "AGE", "ADDRESS",
"CONTACT", "MONTHLY_SALARY"]
d = dict(zip(k, v))
print(d)
# if user wants to see the details of other_workers
elif c == 3:
my_cursor.execute("select * from other_workers_details")
row = my_cursor.fetchall()
for i3 in row:
v = list(i3)
k = ["NAME", "SPECIALISATION", "AGE", "ADDRESS",
"CONTACT", "MONTHLY_SALARY"]
d = dict(zip(k, v))
print(d)
# IF USER WANTS TO ENTER DETAILS
elif b == 2:
print("""

1. DOCTOR DETAILS
2. NURSE DETAILS
3. OTHER WORKERS
""")
c = int(input("Enter your Choice: "))
# FOR ENTERING DETAILS OF DOCTORS
if c == 1:
# ASKING THE DETAILS
name = input("ENTER DR. NAME:")
spe = input("ENTER SPECIALISATION:")
age = input("ENTER AGE:")
add = input("ENTER ADDRESS:")
cont = input("ENTER CONTACT NO.:")
fees = input("ENTER FEES:")
ms = input("ENTER MONTHLY SALARY:")
# INSERTING VALUES ENTERED INTO THE DOCTORS_TABLE
my_cursor.execute(
"insert into doctor_details values('" + name + "','" + spe +
"','" + age "'" + add + "','" + cont + "','" + fees + "','" + ms + "')")
mysql.commit()
print("SUCCESSFULLY ADDED")
# for entering nurse details
elif c == 2:
# ASKING THE DETAILS
name = input("ENTER NURSE NAME:")
age = input("ENTER AGE:")
add = input("ENTER ADDRESS:")
cont = input("ENTER CONTACT NO.:")
ms = int(input("ENTER MONTHLY SALARY:"))
# INSERTING VALUES ENTERED TO THE TABLE
my_cursor.execute(
"insert into nurse_details values('" + name + "','" + age + "','"
+ add + "','"
+ cont + "','" + str(ms) + "')")
mysql.commit()
print("SUCCESSFULLY ADDED")
# for entering workers details
elif c == 3:
# ASKING THE DETAILS
name = input("ENTER WORKER NAME:")
age = input("ENTER AGE:")
add = input("ENTER ADDRESS:")
cont = input("ENTER CONTACT NO.:")
ms = input("ENTER MONTHLY SALARY:")
# INSERTING VALUES ENTERED TO THE TABLE
my_cursor.execute(
"insert into other_workers_details values('" + name + "','" +
age + "','" + add + "','" + cont + "','" + ms + "')")
mysql.commit()
print("SUCCESSFULLY ADDED")
# If user wants to delete data
elif b == 3:
print("""
1. DOCTOR DETAILS
2. NURSE DETAILS
3. OTHER WORKERS
""")
c = int(input("ENTER YOUR CHOICE:"))
# deleting doctor's details
if c == 1:
name = input("ENTER DOCTOR'S NAME:")
my_cursor.execute("select * from doctor_details where
name=='" + name + "'")
row = my_cursor.fetchall()
print(row)
p = input("you really wanna delete this data? (y/n):")
if p == "y":
my_cursor.execute("delete from doctor_details where
name='" + name + "'")
mysql.commit()
print("SUCCESSFULLY DELETED!!")
else:
print("NOT DELETED")
# Deleting nurse details
elif c == 2:
name = input("ENTER NURSE NAME: ")
my_cursor.execute("select * nurse_details where name=='" +
name + "'")
row = my_cursor.fetchall()
print(row)
p = input("D you really wanna delete this data? (Y/N): ")
if p == "y" or p == "Y":
my_cursor.execute("delete from nurse_details where
name='" + name + "'")
mysql.commit()
print("SUCCESSFULLY DELETED!!")
else:
print("NOT DELETED")
# deleting other_workers details
elif c == 3:
name = input("ENTER THE WORKER NAME: ")
my_cursor.execute("select * from workers_details where
name=='" + name + "'")
row = my_cursor.fetchall()
print(row)
p = input("Do you really wanna delete this data? (Y/N): ")
if p == "y" or p == "Y":
my_cursor.execute("delete from other_workers_details
where name='" + name + "'")
mysql.commit()
print("SUCCESSFULLY DELETED!!")
else:
print("NOT DELETED")
elif b == 4:
break

# Entering the patient details table


elif a == 2:

print("""
1. SHOW PATIENT DETAILS
2. ADD NEW PATIENT
3. DISCHARGE PATIENT
4. EXIT
""")
b = int(input("ENTER YOUR CHOICE:"))
# Showing the existing details
# if user wants to see the details of PATIENT
if b == 1:
my_cursor.execute("select * from patient_details")
row = my_cursor.fetchall()
for i4 in row:
b=0
v = list(i4)
k = ["PATIENT ID", "NAME", "AGE", "ADDRESS", "DOCTOR
RECOMMENDED"]
d = dict(zip(k, v))
print(d)

# adding new patient


elif b == 2:
puid = input("PATIENT ID: ")
name = input("PATIENT NAME: ")
age = input("AGE: ")
address = input("ADDRESS: ")
doctor_recommended = input("DOCTOR RECOMMENDED: ")
my_cursor.execute(
"insert into patient_details values('" + puid + "','" + name + "','"
+ age + "','"+ address + "','" + doctor_recommended + "')")
mysql.commit()
my_cursor.execute("select * from patient_details")
for i5 in my_cursor:
v = list(i5)
k = ["PATIENT ID", "NAME", "AGE", "ADDRESS", "DOCTOR
RECOMMENDED"]
print(dict(zip(k, v)))
print("""
====================================
!!!!!!!REGISTERED SUCCESSFULLY!!!!!!
====================================
""")
# Discharge Process
elif b == 3:
name = input("ENTER THE PATIENT NAME:")
my_cursor.execute("select * from patient_details where
name='" + name + "'")
row = my_cursor.fetchall()
print(row)
bill = input("HAS HE PAID ALL THE BILLS ? (Y/N):")
if bill == "y" or bill == "Y":
my_cursor.execute("delete from patient_details where
name='" + name + "'")
mysql.commit()
# if user wants to exit
elif b == 4:
break
# SIGN-OUT
elif a == 3:
break
# IF THE USERNAME AND PASSWORD IS NOT IN THE DATABASE
else:
break
OUTPUT SCREENS

You might also like