CS Ip
CS Ip
IIT CHENNAI
SIGN OF PRINCIPAL
DATE:
ACKNOWLEDGEMENT
I sincerely thank each and every one who supported me and helped
me with their valuable suggestions and guidance.
INDEX
S.NO TOPICS PG.NO
TOPICS
1
8
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.
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 “HOSPITALMANAGEMENT
SYSTEM” is to computerize the Front Office Management of
Hospital to develop software which is user friendly, simple, fast,
and cost-effective.
HARDWARE
• PC
• MOBILE PHONE
SOFTWARE
• PYTHON (latest version)
• MYSQL
• PYTHON CONNECTOR
HOSPITAL MANAGEMENT SYSTEM
NEED OF HMS :
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
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.
3. Less security
4. Less user-friendly
ADVANTAGES OF HMS
1.Less paperwork
2.Costs Reduction
PATIENT
• BOOK APPOINTMENT
• FIND DOCTOR
• VIEW DOCTOR PROFILE
DOCTER
• LOGIN
• APPLY JOB
• VIEW APPOINTMENT
PROGRAM
##PRINTING WELCOME NOTE
while(True):
print("""
================================
WELCOME TO MYHOSPITAL
================================
""")
import mysql.connector
mysql=mysql.connector.connect(host="localhost",user="root",passw
d="admin")
mycursor=mysql.cursor()
#creating database
mycursor.execute("use my_hospitals")
#creating table for storing the username and password of the user
#printing option
while(True):
print("""
1. SIGN IN (LOGIN)
2. SIGN UP (REGISTER)
""")
r=int(input("enter your choice:"))
if r==2:
print("""
=======================================
=======================================
""")
mysql.commit()
print("""
=======================================
!!!!!!!!REGISTERED SUCCESSFULLY!!!!!!!!
=======================================
""")
elif r==1:
print("""
==================================
==================================
""")
for i in row:
a=list(i)
if a[0]==str(ps):
while(True):
print("""
1.ADMINISTRATION
3.SIGN OUT
""")
if a==1:
print("""
1. SHOW DETAILS
4. EXIT
""")
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",
"MONTHLY_SALARY"]
d=dict(zip(k,v))
print(d)
elif c==2:
mycursor.execute("select * from
nurse_details")
row=mycursor.fetchall()
for i in row:
v=list(i)
k=["NAME","SPECIALISATION","AGE","ADDRESS","CONTACT","MONT
HLY_SALARY"]
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","MONT
HLY_SALARY"]
d=dict(zip(k,v))
print(d)
elif b==2:
print("""
1. DOCTOR DETAILS
2. NURSE DETAILS
3. OTHER WORKERS
""")
if c==1:
spe=input("ENTER SPECIALISATION:")
age=input("ENTER AGE:")
add=input("ENTER ADDRESS:")
fees=input("ENTER FEES:")
ms=input("ENTER MONTHLY_SALARY:")
mysql.commit()
print("SUCCESSFULLY ADDED")
elif c==2:
age=input("ENTER AGE:")
add=input("ENTER ADDRESS:")
ms=int(input("ENTER MONTHLY_SALARY:"))
mysql.commit()
print("SUCCESSFULLY ADDED")
elif c==3:
age=input("ENTER AGE:")
add=input("ENTER ADDRESS:")
ms=input("ENTER MONTHLY_SALARY:")
mycursor.execute("insert into
other_workers_details
values('"+name+"','"+age+"','"+add+"','"+cont+"','"+ms+"')")
mysql.commit()
print("SUCCESSFULLY ADDED")
elif b==3:
print("""
1. DOCTOR DETAILS
2. NURSE DETAILS
3. OTHER WORKERS
""")
if c==1:
row=mycursor.fetchall()
print(row)
if p=="y":
mycursor.execute("delete from
doctor_details where name='"+name+"'")
mysql.commit()
print("SUCCESSFULLY DELETED!!")
else:
print("NOT DELETED")
#deleting nurse details
elif c==2:
mycursor.execute("select * nurse_details
where name=='"+name+"'")
row=mycursor.fetchall()
print(row)
if p=="y":
mysql.commit()
print("SUCCESSFULLY DELETED!!")
else:
print("NOT DELETED")
elif c==3:
mycursor.execute("select * from
workers_details where name=='"+name+"'")
row=mycursor.fetchall()
print(row)
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("""
3. DISCHARGE PATIENT
4. EXIT
""")
b=int(input("ENTER YOUR CHOICE:"))
if b==1:
mycursor.execute("select * from
patient_details")
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:
address=str(input("ADDRESS: "))
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:
row=mycursor.fetchall()
print(row)
bill=input("HAS HE PAID ALL THE BILLS ? (y/n):")
if bill=="y":
mysql.commit()
elif b==4:
break
###SIGN OUT
elif a==3:
break
else:
break