Hospital Management System
Hospital Management System
Hospital Management System
C SBV
Jhilmil
Colony Delhi
-110095
HOSPITAL MANAGEMENT SYSTEM…
NAME-Shantanu Sharma
CLASS- XII-B
SUBJECT-COMPUTER SCIENCE
ROLL NO-12213
2022-2023
CERTIFICATE….
This is to certify that Mr. Shantanu Sharma of
class XII B has successfully completed the Computer Science
project on the
topic Hospital Managementunder the
guidance of Mr.Shashi during the academic year 2021-
2022.
DATE- ____________
INTERNAL EXAMINER-______________
EXTERNAL EXAMINER-______________
PRINCIPAL-_______________
ACKNOWLEGMENT
1. EASY TO USE.
2. INTEPRETED LANGUAGE
3. CROSS PLATFORM LANGUAGE
4. EXPRESSIVE LANGUAGE
5. COMPLETENESS
6. FREE & OPEN SOURCE
#SHORTCOMINGS OF
PYTHON
1.LESSER LIBRARIES
2.SLOW LANGUAGE
3.WEAK ON TYPE BINDING
About MySQL……
MySQL is currently the most popular open source database
software. It is a multi-user, multi threated database management
system. MySQL is espically popular on the web. It is one of the
parts of the very popular LAMP platform. Linux , Apache ,
MySQL and PHP or WIMP platform Windows. All was
founded by Michoel W ide (Monty).David Axmark and Allan
Larsson in Sweden in year 1995.
#FEATURES OF MySQL
Open source& Free of Cost:
1.Portability: Small enough in size to install and run
it in any types of Hardware and OS like Linux, MS Windows,
etc.
2.Security: Its Databases are secured & protected with
password.
3.Connectivity:Various APIs are developed to
connect it with many programming languages.
Requirements…….
HARDWARE REQUIRENENTS
1.Computer: for coding and typing the required documents of
the project.
2.Printer: to print the required documents of the project.
3.Compact drive
4.Processor: Pentium quadcore
5.RAM:64mb
6.Hard disk:20gb
SOFTWARE REQUIREMENTS
1.Opening system: Windows 10
2.Python3: for execution of program
3.MySQL: for starting data in the database
4.Python-MySQL connector: for database connectivity
5.Microsoft word: for presentation of output.
About The Project…..
My project on “HOSPITAL MANAGEMENT SYSTEM”
give idea about the management in hospital. The package
gives all the information regarding the details Doctors,
,patient and other worker details medical facilities.
CODING:
from sys import exit
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',passwd='1234',d
atabase='HMScodes')
if conn.is_connected():
print('successfully connected')
c1=conn.cursor()
print('---------------------------------------------')
print("HOSPITAL MANAGEMENT SYSTEM")
print('---------------------------------------------')
print('"GOD WISHES YOU"')
print("1.LOGIN")
print("2.EXIT")
choice=int(input("ENTER YOUR CHOICE:"))
if choice==1:
u1=input("enter user name:")
pwd1=input("enter the password:")
while u1=='ARUSH'and pwd1=='ARUSH2004':
print('connected')
print("WELCOME TO HOSPITAL")
print("successfully connected")
print('1.RegisteringPatient details')
print('2.RegisteringDoctor details')
print('3.RegisteringWorker details')
print("4.total patient details")
print("5.total doctor details")
print("6.total worker details")
print('7.Patient detail')
print('8.Doctor detail')
print('9.Worker detail')
print('10.Exit')
choice=int(input('ENTER YOUR CHOICE:'))
if choice==1:
p_name=input('Enter Patient Name:')
p_age=int(input('Enter Age:'))
p_problems=input('Enter the Problem/Disease:')
p_phono=int(input('Enter Phone number:'))
sql_insert="insert into patient_details
values(""'"+p_name+"',"+str(p_age)+",'"+p_problems+"',"+str(p
_phono)+")"
c1.execute(sql_insert)
print('SUCCESSFULLY REGISTERED')
conn.commit()
elif choice==2:
d_name=input('Enter Doctor Name:')
d_age=int(input('Enter Age:'))
d_department=input('Enter the Department:')
d_phono=int(input('Enter Phone number:'))
sql_insert="insert into doctor_details
values(""'"+d_name+"',"+str(d_age)+",'"+d_department+"',"+str
(d_phono)+")"
c1.execute(sql_insert)
print('successfully registered')
conn.commit()
elif choice==3:
w_name=input('Enter Worker Name:')
w_age=int(input('Enter Age:'))
w_workname=input('Enter type of work:')
w_phono=int(input('Enter Phone number:'))
sql_insert="insert into worker_details
values(""'"+w_name+"',"+str(w_age)+",'"+w_workname+"',"+str(
w_phono)+")"
c1.execute(sql_insert)
print('successfully registered')
conn.commit()
elif choice==4:
sql_w='select*from patient_details '
c1.execute(sql_w)
r = c1.fetchall()
for i in r :
print(i)
elif choice==5:
sql_x="select*from doctor_details"
c1.execute(sql_x)
s=c1.fetchall()
for i in s:
print(i)
elif choice==6:
sql_y="select*from worker_details"
c1.execute(sql_y)
t=c1.fetchall()
for i in t:
print(i)
elif choice==7:
h=input("Enter the name:")
sql_w='select*from patient_details where
p_name=("{}")'.format(h)
c1.execute(sql_w)
u = c1.fetchall()
for i in u:
print(i)
elif choice==8:
d=input("Enter the name:")
sql_d='select*from doctor_details where
p_name=("{}")'.format(d)
c1.execute(sql_d)
v=c1.fetchall()
for i in v:
print(i)
elif choice==9:
f=input("Enter the name:")
sql_f='select*from worker_details where
p_name=("{}")'.format(f)
c1.execute(sql_f)
w=c1.fetchall()
for i in w:
print(i)
elif choice==10:
exit()
break
else:
print('wrong username&password')
if choice==2:
exit()
OUTPUT
TABLE STRUCTURE
BIBLIOGRAPHY
#TO DEVELOP THIS PROJECT MANY
REFERENCES WERE USED:
1.COMPUTER SCIENCE TEXTBOOK
CLASS12: SUMITA ARORA
2.WWW.GOOGLE.COM
3.WWW.PYTHON.ORG.IN
4.WWW.MYSQL.ORG.IN#