You are on page 1of 23

12th CBSE INVESTIGATORY PROJECT

TOPIC – Hospital Management system


NAME – Kalpataru sahoo
CLASS – 12
STREAM – SCIENCE
BOARD ROLL NO –
certificate

• This is to certify that the project work


entitled “hospital management system”
submitted by kalpataru sahoo of class 12
in partial fulfilment of the credit computer
project evaluated from study work of the
student done under the guidance and
supervision of “Mr Lakshmikant
parida”, computer teacher, during session
2023-24 as a project report.

• Internal examiner external examiner principal


ACKNOWLEDGEMENT
• I would like to express my profound
gratitude to” Mr. lakshmikant parida” and
“Mrs. lipsita Mohanty” (principal) of
“Bhubaneswar model public school” for
their contributions to the completion of my
project titled “Hospital management
system”.

• I would like to express my special thanks to


my friends, parents, mentor for his/her time
and efforts he/she provided throughout the
year. Your useful advice and suggestions
were really helpful to me during the project’s
completion. In this aspect, I am eternally
grateful to you.

• I would like to acknowledge that this project


was completed entirely by me and not by
someone else.

• Signature
content
•Introduction and
objective............

•Input and output


requirements......

•The Existing
system.......................

•The proposed
system…….............

•Future scope of the


project............

•Source
code……………………...
Introduction
This Software is used to maintain the records of the Doctors,
details of patients with their history of medication and other staffs
working in the hospital.

Objective
The objective of this project is to let the students apply the
programming knowledge into a real-world situation/problem and
exposed the students how programming skills helps in developing
a good software.
input and output requirements

Hardware requirements Software requirements

• Operating system- windows 10 • windows OS


or above • Python Programming language
• Processor- Pentium(Any) or • MySQL Database management
AMD Athlon system
• (3800+ - 4200 + dual core)
• RAM- 512+
• HARD DISK- SATA 40GB or
Above
• Motherboard- 1.845 or 915.995
for Pentium or MSI kgMM-V
VIA K8M800+8237R plus
chipset for AMD Athlon
The Existing
 System
The present software are obsolete, sluggish, unorganised and are
only accessible by either the staffs or the customers.
 Most of the work is done manually which increases the chances of human
error.

The Proposed System


 It’s an age of computers and automating of such an organisation gives the
better look.
 The work becomes fully automated and any information regarding the
organisation can be obtained by clicking the button.

Similar Softwares
Some of the pre-existing similar software are
shown below
Future Scope of
the Project
Our project has a large scope in the future as it is easy to use it, understand it
and modify it.
 In this age of evolving technologies, our software aims to modernize Data
Storing which were not able to stand the test of time, either because of
superior competition or due to heavy storing of data in the system.
 Our software helps the management department to manage and maintain
the records of doctors, patients and the other staff workers of the hospital
much easier and effective method from virtually anywhere in the world.
 Our software is a paperless software which makes it easy to sustain and aids
the environment.
 Our software increases the precision and efficiently by eliminating the human
chance of error.
 Our software is laidback and can be accessed by employees and users.
Source
Code
##hospital management software
##PRINTING WELCOME NOTE
while(True):
print("""

==============================
======================
=============================

WELCOME TO SP HOSPITALS PVT.


LTD.

==============================
======================
=============================
""")
##creating database connectivity import
mysql.connector
passwd=str(input("ENTER THE DATABASE
PASSWORD;"))

mysql=mysql.connector.connect(host="localhost",user=
"root",passwd="ADMINISTRATOR12345")
mycursor=mysql.cursor()
#creating database
mycursor.execute("create database if not exists
SP_hospitals")
mycursor.execute("use SP_hospitals")
#creating the tables we need
mycursor.execute("create table if not exists
patient_details(name varchar(30) primary key,
age int(3),address varchar(50),doctor_recommended
varchar(30))")
mycursor.execute("create table if not
exists
doctor_details(name varchar(30) primary
key,specialisation varchar(40),age int(2),address
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))")
#login or signup option
#creating table for storing the username and
password of the user
mycursor.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
(PASSWORD SHOULD BE STRONG!!!:")
#ENTERING THE ENTERED VALUE TO THE
USER_DATA TABLE
mycursor.execute("inse
rt into user_data
values('"+u+"','"+p+"')")
mysql.commit()

print("""

==================================
==================
=============================

!!!!!!!!!!!!!!!!!!!!!!!!!!!
REGISTERED
SUCCESSFULLY!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!

==================================
==================
=============================

""")
x=input("enter any key to continue:")
#IF USER WANTS TO LOGIN
elif r==1:

#PRINTING THE SINGIN OPTION AGAIN TO THE


USER AFTER REGISTRATION

print("""

========================================
============
=============================
====================================================
=============================

""")
un=input("ENTER THE USERNAME!!:")
ps=input("ENTER THE PASSWORD!!:")

mycursor.execute("select password
from user_data where username='"+un+"'")
row=myc
ursor.fetchall() for i
in row:
a=l
ist(i)
if a[0]==str(ps):
while(True):
##displaying
the task
you can perform
print("""

1. ADMINISTRATION

2. PATIENT (ADMISSION AND DISCHARGE


PROCESS)

3. SIGN OUT

""")

##asking
for the
task
from user
a=int(inp
ut("ENTER
YOUR
CHOICE:"))
#if user
wants to
3. DELETE EXISTING ONE

4.EX

IT """)
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:

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)
#if user wants
to see the details of nurses
elif
c==2:

mycursor.execute("select * from

nurse_details") row=mycursor.fetchall()
f
or i in
row:

v=list(i)

k=["NAME","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:

mycursor.execute("selec
t * from
other_workers_details")

row=mycursor.fetchall()
f
o
r

i
n
row:

v=list(i)
print("""

1. DOCTOR DETAILS

2. NURSE DETAILS

3.OTHER

WORKERS """)

c=int(input("ENT
ER YOUR
CHOICE:"))
#
F
O
R

E
N
T
E
R
I
N
G
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:")
#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:"))
#
I
N
S
E
R
T
I
N
G
VALUES ENTERED TO THE TABLE

mycursor.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:")


mycursor.execute("insert into other_workers_details
values('"+name+"','"+age+"','"+add+"','"+cont+"','"+
ms+"')")
mysql.commit()

print("SUCCESSFULLY ADDED")
#if unser wants to
delete data
elif b==3:
print("""

1. DOCTOR DETAILS

2. NURSE DETAILS

3.OTHER

WORKERS """)

c=int(input("ENT
ER YOUR
CHOICE:"))
#
d
e
l
e
t
i
n
g
doctor's details
i
f

c
=
=
1
:

name=input("ENTE
R DOCTOR'S
print("SUCCESSFULLY DELETED!!")
else:

print("NOT DELETED")

#deleting nurse
details
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!!")
e
l
s
e
:

print("NOT DELETED")
#
d
e
l
e
t
i
n
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!!")
e
l
s
e
:

print("NOT DELETED")
e
l
i
f

b
=
=
4
:
b
r
e
a
k

#en
ter
ing
the
pat
ien
t
details table
eli
f
row=mycursor.fetchall()
for i in row:
b=0
v=list(i)

k=["NAME","GENDER","AGE","ADDRESS","CONTACT"]

d=dict(zip(k,v))
print(d)

#adding new patient


elif b==2:

name=str(input("ENTER NAME: "))

age=str(input("ENTER AGE: "))

address=str(input("ADDRESS: "))

doc_r=str(input("iSSUE OF THE PATIENT: "))


mycursor.execute
("insert into patient_details
values('"+name+"','"+age+"','"+address+"','"+doc_r+"
')")

ysql.commit()

mycursor.execute
("select * from patient_details")

or i in
mycursor:

=list(i)

k=['NAME','AGE',
'ADDRESS','ISSUE OF THE PATIENT']

print(dict(zip(k
,v)))

rint("""
!!!!!!!!!!!!!!!!!!!!!!!!!!!REGISTERED
SUCCESSFULLY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

====================================================
=============================

""")
#dischare process
elif b==3:

name=input("ENTER THE PATIENT NAME:")

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()
#if user wants to
exit
elif b==4:
break
###SIGN OUT
elif
a==3:
b
reak

#IF THE USERNAME AND PASSWORD IS


NOT IN THE DATABASE
else:
print("The Entered Username and Password does
not match with the accounts stored in the Database")
break
Outpu
t

You might also like