Computer Science Project File (HMS)
Computer Science Project File (HMS)
MANAGEMENT
SYSTEM
IN-
COMPUTER SCIENCE
2023-24 (XII-B)
BY-
1. DHRUV KUMAR MISHRA
2. ADITYA SINGH
3. ANSHUMAN AHIRWAR
4. ADHIRAJ YADAV
UNDERTAKING
We declare that the work presented in this project titled
submitted the same work for the award of any other examination.
January, 2024
Place : PM SHRI KENDRIYA VIDYALAYA O F KHAMARIA
REPORT TITLE 2
CERTIFICATE
And that this work has not been submitted elsewhere for Any
Certificate.
REPORT TITLE 3
ACKNOWLEDGEMENT
6. CONCLUSION
7. REFERENCES
REPORT TITLE 5
INTRODUCTION TO
THE PROJECT
We the students of CLASS XII B of PM KENDRIYA VIDYALAYA O
F KHAMARIA have been assigned for the work of HOSPITAL
MANAGEMENT SYSTEM.
To perform this task the students were divided into the group of
four students named as ADITYA, DHRUV, ANSHUMAN, ADHIRAJ.
REPORT TITLE 6
We are so glad that this work have been assigned to us, yet we
our subject teacher have also helped us a lot to complete this project.
We feel so blessed that we have learnt all this work with the help
of our sir, we are also thankful to our respected principal SH. AMIT
future.
We are also thankful to our group mates for cooperating with each
other while performing this task we have also polished the skills of
group activity.
REPORT TITLE 7
PROCESS
FIRSTLY, we have done the planning in a paper work regarding what
SYSTEM.
OPPORTUNITY~
REPORT TITLE 8
SYSTEM REQUIREMENTS OF THE
PROJECT
Recommended System Requirements
REPORT TITLE 9
PYTHON PROGRAMS LISTING
print("""
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| WELCOME TO MY HOSPITAL |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
""")
import mysql.connector
passwd=str(input("ENTER THE DATABASE PASSWORD:"))
mysql=mysql.connector.connect(host="localhost",user="root",passwd="dark@
knight23")
mycursor=mysql.cursor()
# creating database #
REPORT TITLE 10
mycursor.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))")
mycursor.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))")
# creating table for storing the username and password of the user #
# printing options #
while(True):
print("""
+======================+
| 1. SIGN IN (LOGIN) |
| 2. SIGN UP (REGISTER)|
| 3. CLOSE (DATABASE)|
+======================+
""")
if r==2:
print("""
=========================================
|!!!!!! PLEASE REGISTER YOURSELF !!!!!!!|
=========================================
REPORT TITLE 11
""")
print("""
=========================================
|!!!!!!! REGISTERED SUCCESSFULLY !!!!!!!|
=========================================
""")
x=input("enter any key to continue:")
elif r==1:
print("""
====================================
|!!!!!!!! SIGN IN !!!!!!!!!!|
====================================
""")
REPORT TITLE 12
un=input("ENTER THE USERNAME!!:")
ps=input("ENTER THE PASSWORD!!:")
print("""
+============================================+
| 1.ADMINISTRATION |
| 2.PATIENT (ADMISSION AND DISCHARGE PROCESS)|
| 3.SIGN OUT |
+============================================+
""")
if a==1:
print("""
+=======================+
| 1. SHOW DETAILS |
| 2. ADD NEW MEMBER |
| 3. DELETE EXISTING ONE|
| 4. EXIT |
+=======================+ """)
REPORT TITLE 13
b=int(input("ENTER YOUR CHOICE:"))
if b==1:
print("""
+==================+
| 1. DOCTOR DETAILS|
| 2. NURSE DETAILS |
| 3. OTHER WORKERS |
+==================+ """)
if c==1:
mycursor.execute("select * from doctor_details")
row=mycursor.fetchall()
for i in row:
b=0
v=list(i)
k=["NAME","SPECIALISATION","AGE","ADDRESS","CONTACT","FEES","MONTH
LY_SALARY"]
d=dict(zip(k,v))
print(d)
elif c==2:
mycursor.execute("select * from nurse_details")
row=mycursor.fetchall()
REPORT TITLE 14
for i in row:
v=list(i)
k=["NAME","SPECIALISATION","AGE","ADDRESS","CONTACT","MONTHLY_SAL
ARY"]
d=dict(zip(k,v))
print(d)
elif c==3:
mycursor.execute("select * from other_workers_details")
row=mycursor.fetchall()
for i in row:
v=list(i)
k=["NAME","SPECIALISATION","AGE","ADDRESS","CONTACT","MONTHLY_SAL
ARY"]
d=dict(zip(k,v))
print(d)
elif b==2:
print("""
+==================+
| 1. DOCTOR DETAILS|
| 2. NURSE DETAILS |
| 3. OTHER WORKERS |
+==================+ """)
if c==1:
REPORT TITLE 15
# ASKING THE DETAILS #
elif c==2:
REPORT TITLE 16
mysql.commit()
print("SUCCESSFULLY ADDED")
elif c==3:
elif b==3:
print("""
+==================+
| 1. DOCTOR DETAILS|
| 2. NURSE DETAILS |
| 3. OTHER WORKERS |
+==================+
""")
c=int(input("ENTER YOUR CHOICE:"))
REPORT TITLE 17
if c==1:
name=input("ENTER DOCTOR'S NAME:")
mycursor.execute("select * from doctor_details where
name=='"+name+"'")
row=mycursor.fetchall()
print(row)
p=input("you really wanna delete this data? (y/n):")
if p=="y":
mycursor.execute("delete from doctor_details where
name='"+name+"'")
mysql.commit()
print("SUCCESSFULLY DELETED!!")
else:
print("NOT DELETED")
elif c==2:
name=input("ENTER NURSE NAME:")
mycursor.execute("select * nurse_details where
name=='"+name+"'")
row=mycursor.fetchall()
print(row)
p=input("you really wanna delete this data? (y/n):")
if p=="y":
mycursor.execute("delete from nurse_details where
name='"+name+"'")
mysql.commit()
print("SUCCESSFULLY DELETED!!")
else:
print("NOT DELETED")
elif c==3:
REPORT TITLE 18
name=input("ENTER THE WORKER NAME:")
mycursor.execute("select * from workers_details where
name=='"+name+"'")
row=mycursor.fetchall()
print(row)
p=input("you really wanna delete this data? (y/n):")
if p=="y":
mycursor.execute("delete from other_workers_details
where name='"+name+"'")
mysql.commit()
print("SUCCESSFULLY DELETED!!")
else:
print("NOT DELETED")
elif b==4:
break
elif a==2:
print("""
+=======================+
| 1. SHOW DETAILS |
| 2. ADD NEW MEMBER |
| 3. DELETE EXISTING ONE|
| 4. EXIT |
+=======================+
""")
b=int(input("ENTER YOUR CHOICE:"))
if b==1:
mycursor.execute("select * from patient_details")
REPORT TITLE 19
row=mycursor.fetchall()
for i in row:
b=0
v=list(i)
k=["NAME","SEX","AGE","ADDRESS","CONTACT"]
d=dict(zip(k,v))
print(d)
elif b==2:
name=str(input("ENTER NAME: "))
sex=str(input("ENTER SEX: "))
age=str(input("ENTER AGE: "))
address=str(input("ADDRESS: "))
contact=str(input("CONTACT NUMBER: "))
mycursor.execute ("insert into patient_details
values('"+str(name)+"','"+str(sex)+"','"+str(age)+"','"+str(address)+"','"+str(co
ntact)+"')")
mysql.commit()
mycursor.execute("select * from patient_details")
for i in mycursor:
v=list(i)
k=['NAME','SEX','AGE','ADDRESS','CONTACT']
print(dict(zip(k,v)))
print("""
+=====================================+
|!!!!!! REGISTERED SUCCESSFULLY !!!!!!|
+=====================================+
""")
# dischare process #
elif b==3:
name=input("ENTER THE PATIENT NAME:")
REPORT TITLE 20
mycursor.execute("select * from patient_details where
name='"+name+"'")
row=mycursor.fetchall()
print(row)
bill=input("HAS HE PAID ALL THE BILLS ? (y/n):")
if bill=="y":
mycursor.execute("delete from patient_details where
name='"+name+"'")
mysql.commit()
elif b==4:
break
elif a==3:
break
elif r==3:
print("""
+====================+
| DATABASE IS CLOSED |
+====================+
""")
print("""
+=====================+
| THANKS FOR VISITING |
+=====================+
""")
break
REPORT TITLE 21
OUTPUT OF THE PYTHON CODE
REPORT TITLE 22
USER LOGIN-IN
REPORT TITLE 23
DOCTOR DETAILS
REPORT TITLE 24
NURSE DETAILS
REPORT TITLE 25
OTHER WORKERS DETAILS
REPORT TITLE 26
ENTER DOCTOR DETAILS
REPORT TITLE 27
ENTER NURSE DETAILS
REPORT TITLE 28
ENTER OTHER WORKERS
DETAILS
REPORT TITLE 29
PATIENT DETAILS
REPORT TITLE 30
LOGOUT & DATABASE CLOSING
REPORT TITLE 31
SQL TABLES USED AND BACKEND
STORED DATA
DATABASE
TABLES
REPORT TITLE 32
TABLE STRUCTURE 1 AND 2
REPORT TITLE 33
TABLE STRUCTURE 5
REPORT TITLE 34
BACKEND DATA GENERATED
THROUGH SOFTWARE
REPORT TITLE 35
CONCLUSION
It has all basic elements which are used for managing a small
REPORT TITLE 36
REFERENCES
1. python.org
2. cbsepython.com
3. tutorialsPoint.com
4. PythonChallenge.com
5. Google.com
6. LearnPython.org
REPORT TITLE 37
REPORT TITLE 39