Professional Documents
Culture Documents
Project Report (HMS)
Project Report (HMS)
ON
HOSPITAL MANAGEMENT
SYSTEM
FOR CBSE 2021-22 EXAMINATION
[AS A PART OF THE INFORMATICS
PRACTICES COURSE (065)]
SUBMITTEDBY:-
NAME:- Rohit Gupta,Prabhat
ROLL NO:-
CLASS:- XII-A
1
CERTIFICATE
This to certify that the project / Dissertation entitled
HOSPITAL MANAGEMENT SYSTEM is a bonafide
Work done by Rohit Gupta, Prabhat of class XII-A 2021-
22 in partial fulfilment of CBSE’s AISSCE Examination
2022 and has been carried out under my direct
supervision and guidance. This report or a similar
report on the topic has not been submitted for any
other examination and does not form a part of any
other course undergone by the candidate.
2
ACKNOWLEDGEMENT
I undertook this project work, as the part of my XII-
informatics Practices course (065).I had tried to apply
my best of knowledge and experience gained during
the study and class work experience. However,
developing software system is generally quite complex
and time-consuming process. It requires a systematic
study, insight vision and professional approach during
the design and development. Moreover, the developer
always feels the need, the help and good wishes of the
people near you, who have considerable experience
and idea.
3
CONTENTS
S.NO PARTICULAR PAGE NO. T.SIGN
1. INTRODUCTION 5
3. System Implementation 12
3.1 The Hardware used
3.2 The Software used
4 Theoretical Background 14
4.1 What is Database?
4.2 What is MySQL?
4.3 What is python?
5 CODE 15
6 OUTPUT 21
7 User Manual 26
8 References 27
4
Title of the Project: Hospital Management System
INTRODUCTION
5
OBJECTIVE & SCOPE OF THE PROJECT
6
Justification and Need
8 Reasons Why You Need To Think About Hospital
Management System For Your Healthcare Facility:
3.Eradicate Errors
7
5.Increase Patient Satisfaction
7.Paperless Operation
8
Advantages of Hospital Management System:
1. Revenue management:
A medical center or hospital serves humanity. Apart from that, profit
is more important as it also considered to be a business. Revenue
management is one of the significant elements as it needs the fortune
to manage a hospital. Also, it's not possible to track the identical thing
with the help of the old-age manual system. An Automated
HMS which is catered as per the needs of the business can help in
solving the purpose efficiently.
It provides accurate and rapid management and transactional reports,
which offer a clear view of how your business is performing. What
are the debts and interests, pending invoices, and outstanding
amounts?
Apart from that, there is also a decrease in the operating cost because
of actual operational effectiveness. When processes and systems are
automated, there is no need for higher resources to manage the
operations. It means the faster break-even point and improved ROI
can be achieved easily.
2.Enhanced decision-making in clinics:
An accurate Hospital Management System ensures that decision
making in clinics is made precise, fast, and useful. With a single view
and easy availability of data points, medical support staff and doctors
get facilitated.
3.Obtain the best quality ratings:
When your clinics or hospital needs to be the top-rated and top
preferred ones by insurance companies, then you must implement a
Hospital Management Systems in your hospital. Insurance companies
and medicare companies depend on digital data only when there is an
automated system in the hospital.
If your clinic is capable of sending and receiving the information of
the patients, their medical records digitally, then it means your
hospital is going to be the highest preference among the patients. An
accurate and rapid Hospital Management System stands out the top
9
among other nursing homes, medical centers, and other hospital
competitors. It adds significant value to your hospital and also
provides a reputation in the market.
4. Nullify every error and track complete details:
Managing a hospital is not much easy, and there are chances for some
mistakes to occur. A manual system can ensure 100% accurate
processing and foolproof. There are higher chances for mistakes and
errors in this case. To eradicate this, the best decision is to install an
automation hospital management system that highly nullifies every
mistake and also you can avoid lawsuits and compliance issues, which
is considered to be the two most significant drawbacks of hospitals
and medical centers.
Apart from this, tracking the accurate details of staff availability,
operational information, and room occupancy can also be readily
available at your fingerprints by using the automated Hospital
Information System.
5. Enhanced data security:
The experts have reinforced and highlighted the fact that the hospitals,
medical centers, and clinics depend on the manual system. It can lead
to higher data leakage and theft when compared to automated ones.
Installing a complete and automated HMS indicated that your pieces
of the information stay safe and protected from any unauthorized
sources and accesses.
Significantly, you make use of the state-of-the-art system with
centralized controls. Make sure you are not implementing a
standalone home-grown one. There are no chances for errors when an
access-controlled system manages everything as the information
availability relies on user rights. It's also one crucial reason why
hospitals, rehabilitation centers, clinics, trauma centers, and nursing
homes make use of the high quality and automated Hospital
Management System.
6.Bottom Line: The Information Technology advancements in the
last few years are high, and there is a revolutionary change, especially
in the management and automation system of hospitals. They provide
intelligent and accurate management information systems apart from
10
handling the mundane operational staff that is developed by hospital
information systems.
Hospital Management System offers a better-concerted atmosphere
between doctors, patients, hospital staff, groups, and managing
workflows. The portal solutions are capable of unifying the legal
objects, applications from other portals and also manages multitudes
of user requests, which results in reckless information flow between
patients, doctors, and staff.
Eager to know more benefits of implementing a Hospital
Management System for your hospitals, clinics, nursing homes or
medical centers? Contact us today!
11
SYSTEM IMPLEMENTATION
12
When the written form is required, printing will take only a few
minutes for the clinic staff.
Another function is connected with managing finances. The hospital
accounting software estimates the patients’ payments. It might remind
the bank account where you can check performed operations and the
billing status of each customer.
13
THEORETICAL BACKGROUND
WHAT IS DATABASE?
DBMS is a software to store and maintain data in the form of tables. We
can easily create, modify, delete and view data from database. Examples:
WHAT IS MySQL?
WHAT IS PYTHON?
Python is a high level language. It is a free and open source language. It is an interpreted language, as
14
CODE
import getpass
import pymysql
pymysql.install_as_MySQLdb()
connection = pymysql.connect(
host='localhost',
user='root',
password = "12345"
)
cursor = connection.cursor()
cursor.execute("CREATE DATABASE IF NOT EXISTS hospital")
cursor.execute("CREATE DATABASE IF NOT EXISTS hospital_backup")
cursor.execute("USE hospital")
error = 1
from os import system, name
def screen_clear():
if name == 'nt':
_ = system('cls')
else:
_ = system('clear')
15
dname VARCHAR(20) primary key,
vname VARCHAR(20),
treatment VARCHAR(50),
symptoms varchar(50) not null);""")
cursor.execute("""CREATE TABLE IF NOT EXISTS bacteria (
p_id int not null,
dname VARCHAR(20) primary key,
bname VARCHAR(20),
treatment VARCHAR(50),
symptoms varchar(50) not null);""")
cursor.execute("""CREATE TABLE IF NOT EXISTS injury (
p_id int not null,
iname VARCHAR(20) primary key,
idiagnosis VARCHAR(50),
type varchar(50) not null);""")
cursor.execute(
"""insert into patient
values(101,'Mohit','Nayak','Bangalore','15-March-2001',18,'08-March-
2020',9078435952)""")
cursor.execute(
"""insert into patient
values(102,'Anikiat','Saraf','Kolkata','22-Dec-2000','19','15-Feb-
2020',9674825476)""")
cursor.execute(
"""insert into patient
values(103,'Rishank','Pratik','Orissa','22-Dec-2001','18','19-Nov-
2015',9117854569)""")
cursor.execute(
"""insert into patient values(104,'Risav','Jana','Nepal','06-
Jan-2001',18,'25-Oct-2010',7854963284)""")
cursor.execute(
"""insert into patient values(105,'Wilson','Vidyut','Mumbai','23-
Nov-2001',18,'23-Nov-2005',7854129645)""")
cursor.execute(
"""insert into patient
values(106,'Dinesh','Sharma','Rajasthan','23-Feb-2000',20,'23-Feb-
2000',8476423858)""")
cursor.execute(
"""insert into virus values(103,'Ebola','Ebov','Oxygen Therapy, IV
Fluids','Muscle Pain, Fever, Bleeding')""")
cursor.execute("""insert into virus
values(105,'Measles','Paramyxo','Vitamin A','Cough, Skin Rash')""")
cursor.execute("""insert into bacteria
values(101,'TB','Mycobacterium','Antibiotics','Cough and Sneezes')""")
cursor.execute(
"""insert into bacteria values(106,'Cholera','Vibrio','IV Fluids,
Antibiotics','Seizures, Diarrhoea')""")
cursor.execute("""insert into injury values(102,'Hair line
Fracture','Plaster, Pain Killer','Toe Fracture')""")
cursor.execute("""insert into injury values(104,'bullet wound','Removal
of Bullet','Wound')""")
print("Databse created successfully")
else:
e = 1
while e != 0:
e = int(input("1. Sign In\n2. Create a New Doctor Account\n"))
if e == 2:
did = int(input('\nEnter id - '))
dnf = input('Enter first name - ')
16
dnl = input('Enter last name - ')
pas = input('Enter password - ')
spec = input('Enter speciality - ')
shf = input('Enter working shift - ')
ph = (input('Enter phone number - '))
cursor.execute("insert into doctor
values('%d','%s','%s','%s','%s','%s','%s')" % (did, dnf, dnl, pas, spec,
shf, ph))
connection.commit()
screen_clear()
e = 1
elif e == 1:
while error == 1:
i = int(input("\nEnter your ID - "))
p = input("Enter your Password - ")
cursor.execute("""select count(d_id) from doctor where
d_id=(%d)""" % (i,))
if cursor.fetchone()[0] == 1:
cursor.execute("""select count(password) from doctor
where password='%s'""" % (p,))
if cursor.fetchone()[0] == 1:
print("\nSign in successful!")
screen_clear()
error = 0
e = 0
r = 1
cursor.execute(
"""select
d_id,dnamedfirst,dnamedlast,speciality,shift,phone from doctor where
d_id=(%d)""" %
(i,))
for row in cursor.fetchall():
print("ID -", row[0], " Name -", row[1],
row[2], " Speciality -", row[3], "\nShift -",
row[4], " Phone Number -", row[5])
while r != 0:
print("\n1. View Patient details\n2. Add a New
Patient\n3. Delete Patient Details\n0. Exit")
r = int(input())
if r == 1:
access = int(input("\nEnter Patient ID:-
"))
cursor.execute("""select count(*) from
patient where p_id=(%d)""" % (access,))
if cursor.fetchone()[0] != 0:
cursor.execute("""select * from patient
where p_id=(%d)"""% (access,))
print("\nPatient Details - ")
for row in cursor.fetchall():
print("Id: ", row[0])
print("First Name: ", row[1])
print("Last Name: ", row[2])
print("City: ", row[3])
print("Date of Birth: ", row[4])
print("Age: ", row[5])
print("Date of Admission: ",
row[6])
print("\nDiagnosis Report - ")
cursor.execute("""select count(*) from
virus where p_id=(%d)""" %(access,))
if cursor.fetchone()[0] != 0:
17
cursor.execute("""select * from
virus where p_id=(%d)""" % (access,))
for row in cursor.fetchall():
print("Id: ", row[0])
print("Disease Name: ", row[1])
print("Virus Name: ", row[2])
print("Treatment: ", row[3])
print("Symptoms: ", row[4])
print("\n")
cursor.execute("""select count(*) from
bacteria where p_id=(%d)"""% (access,))
if cursor.fetchone()[0] != 0:
cursor.execute("""select * from
bacteria where p_id=(%d)""" % (access,))
for row in cursor.fetchall():
print("Id: ", row[0])
print("Disease Name: ", row[1])
print("Bacteria Name: ",
row[2])
print("Treatment: ", row[3])
print("Symptoms: ", row[4])
print("\n")
cursor.execute("""select count(*) from
injury where p_id=(%d)""" % (access,))
if cursor.fetchone()[0] != 0:
cursor.execute("""select * from
injury where p_id=(%d)"""% (access,))
for row in cursor.fetchall():
print("Id: ", row[0])
print("Injury Name: ", row[1])
print("Diagnosis Name: ",
row[2])
print("Type: ", row[3])
print("\n")
else:
print("Incorrect Patient id")
elif r == 2:
pid = int(input('\nEnter id - '))
pnf = input('Enter first name - ')
pnl = input('Enter last name - ')
pcity = input('Enter city - ')
pdob = input('Enter date of birth - ')
page = int(input('Enter age - '))
pdoa = input('Enter date of admission - ')
pnum = input('Enter phone number - ')
cursor.execute("""insert into patient
values('%d','%s','%s','%s','%s','%d','%s','%s')""" %
(pid, pnf, pnl, pcity, pdob,
page, pdoa, pnum))
print("\n1. Virus\n2. Bacteria\n3. Injury")
m = int(input())
if m == 1:
dname = input("\nEnter disease name -
")
bname = input("Enter virus name - ")
treatment = input("Enter treatment - ")
symptoms = input("Enter symptoms - ")
cursor.execute("""insert into virus
values('%d','%s','%s','%s','%s')""" %
(pid, dname, bname,
treatment, symptoms))
18
elif m == 2:
dname = input("\nEnter disease name -
")
bname = input("Enter bacteria name - ")
treatment = input("Enter treatment - ")
symptoms = input("Enter symptoms - ")
cursor.execute("""insert into bacteria
values('%d','%s','%s','%s','%s')""" %
(pid, dname, bname,
treatment, symptoms))
elif m == 3:
iname = input("\nEnter injury name - ")
idiag = input("Enter diagnosis - ")
itype = input("Enter injury type - ")
cursor.execute("""insert into injury
values('%d','%s','%s','%s')""" % (pid, iname, idiag, itype))
print("\nPatient Added")
connection.commit()
elif r == 3:
access = input("\nEnter Patient ID:- ")
cursor.execute("""select count(*) from
patient where p_id=(%d)""" % (access,))
if cursor.fetchone()[0] != 0:
cursor.execute("""delete from patient
where p_id=(?)""", (access,))
cursor.execute("""select count(*) from
virus where p_id=(%d)""" % (access,))
if cursor.fetchone()[0] != 0:
cursor.execute("""delete from virus
where p_id=(?)""", (access,))
cursor.execute("""select count(*) from
bacteria where p_id=(%d)""" %(access,))
if cursor.fetchone()[0] != 0:
cursor.execute("""delete from
bacteria where p_id=(?)""", (access,))
cursor.execute("""select count(*) from
injury where p_id=(%d)"""% (access,))
if cursor.fetchone()[0] != 0:
cursor.execute("""delete from
injury where p_id=(%d)"""% (access,))
else:
print("Incorrect Patient id Patient
does not exist")
print("\nPatient Deleted")
connection.commit()
elif r == 0:
break
else:
print("Incorrect passoword. Please retry ")
else:
print("Incorrect User ID. Please retry ")
break
elif e == 2212:
cursor.execute("""select * from doctor""")
print(cursor.fetchall())
cursor.execute("""select * from virus""")
print(cursor.fetchall())
cursor.execute("""select * from bacteria""")
print(cursor.fetchall())
cursor.execute("""select * from injury""")
print(cursor.fetchall())
19
break
connection.commit()
connection.close()
print("")
20
OUTPUT
21
22
23
24
25
USER MANUAL
How to Install Software
Hardware Requirement-
Software Requirement-
26
REFERENCES
In order to work on this project titled- HOSPITAL
MANAGEMENT SYSTEM, the following books and literature
are referred by me during the various phases of development
(1) The complete Reference Python 3.7
(2) MySQL Black Book
(3) Understanding SQL
(4) http://www.mysql.org/
(5) http://www.python.org/
(6) On-line Help of python
(7) Informatics Practices for class XII
-by Sumita Arora
27
28