Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

A PROJECT REPORT

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

2. Objective & Scope of the Project 6


2.1 Justification and need of the project
2.2 Advantages of hospital management system

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

The health system is one of essential socio-economic activities;


therefore, it requires rational and effective management. For
this, it is necessary to have a tool that allows adequate control
of the information generated in health institutions.

Hospitals, as the main actors of the health system, generate an


essential volume of information, but in most cases, it is
dispersed or not available in the necessary time and manner.

In recent years, health information systems have helped


improve the quality of life of people in all sectors of our society,
so it is inevitable to adhere to this dizzying technological career.
Currently, clinical and administrative management of hospitals
and health centers is possible through a single platform, with
the support of cutting-edge technology, developed to optimize
the processes that allow the operation of organizations
dedicated to treating patients in any branch of the medicine.

5
OBJECTIVE & SCOPE OF THE PROJECT

Hospital management systems allows us the ability to


optimize and digitize all the processes within the institution,
which will help to improve customer service, reduce process
costs, streamline the search of medical records, bills, patients,
doctors, etc.; thus, having a database of each module
implemented.

A hospital management system is a web system developed for


companies that wish to manage their processes, implementing
modules for each of the required areas. It is essential to
mention that the information is controlled by trained
personnel. Computer technology is only a tool that allows us to
perfect the inveterate use of paper records (notebooks, index
cards, diaries, bibliographies, record books), or more recently,
cassettes or video cassettes. A PC only collects and processes
data; it is the individual that acquires information.

6
Justification and Need
8 Reasons Why You Need To Think About Hospital
Management System For Your Healthcare Facility:

1.Track Financials Better

Having a hospital management system in place will


significantly benefit the Finance department of the
hospital. They can track revenues, outflows, debts and
receivables better with an HMS. The financial reports
that an HMS can generate would give the hospital
administration a very accurate picture of the health of a
hospital.

2.Secure Your Data

HMS makes it impossible for unauthorized personnel


from accessing sensitive and private information,
especially concerning patient records. It considerably
reduces the possibility of data theft.

3.Eradicate Errors

The older, manual method of hospital management is


highly prone to human error. With automation of
processes using an HMS, there is little or no room for
error in any of the hospital workflows.

4.Make Diagnosis and Treatment Easier

With the useful dashboards and reports provided by an


HMS, doctors and other caregivers have easy and quick
access to patient records and test results, thus
increasing clinical competency all around.

7
5.Increase Patient Satisfaction

HMS considerably reduces the time taken for processes


and procedures at every stage of patient interaction,
such as registration, billing and discharge, thus making
your customers happy.

6.Improve Hospital Quality Ratings

Implementation of an HMS provided by Healthcare IT


solution providers has become a vital index of the
quality of a hospital or healthcare facility. Thus, HMS
significantly improves your standing with insurance
companies and quality circles.

7.Paperless Operation

A happy outcome of the advent of HMS is the


increasing use of electronic records over physical files.
There might come a day when hospitals become
completely paperless with further advances in hospital
management systems.

8.Run Your Hospital Efficiently

The amount of time and effort you will save by setting


up an HMS for your hospital can be astounding. These
invaluable savings make for the efficient and smooth
operation of your hospital.

Now that you know the incredible hospital


management services offered by the full-scale
implementation of an HMS, do not spend any more
time thinking! Do your research, consult with a
reputable HMS vendor and make your hospital ready for
the future!

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

HOSPITAL MANAGEMENT SYSTEM FUNCTIONS

The hospital management system organizes the stable functioning of


daily tasks and interactions. This is a special tool to support the
smooth operating of the software components that are vital for the
clinic administration. The hospital records management software
keeps a track of all the operations, stores the users’ data, performs its
analysis and generates the reports. The medical institution is given the
opportunity to collect its information in one place. It includes the
patient and doctors’ records as well as the data concerning financial
affairs, supply management, etc. Furthermore, it is only processed,
classified and accessible for authorized users. The hospital database
management system provides users with data security due to all
regulations. Implementation of different functions empowers smooth
and clear functionality.

The hospital records management software tracks the number of


available doctors and their working hours. This allows to have the
accurate schedule of each employee, manage your facility abilities
and the supply chain in order to meet all the needs of the patients. It
helps to arrange the appointments for both the staff and patients’
convenience.
Any clinic should store medical histories, test results, prescribed
treatments, etc. The good hospital database management system will
do it for you. All the details are securely stored for the access of the
doctor and can be provided to the patients by their requests. They can
receive the test results or medical reports by email or the user account.

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.

Moreover, the hospital record management system is capable of


generating regular reports of the tracked data including healthcare,
staff efficiency, finances, inventory, and facility utilization, etc. This
greatly helps the clinic authorities in making reasonable policy
decisions. Therefore, any of these functions are designed to make the
clinic management system easy to use, comprehensive, powerful and
reliable.

THE HARDWARE USED:-

• Intel Pentium/Celeron or similar processor based PC at


Client/Server end.
• 128 MB RAM and 4GB HDD space (for Database) is desirable.
• Standard 1/0 devices like keyboard and Mouse etc.
• Printer is needed for hard-copy reports.
• Local Area Network(LAN) is required for Client- Server
Installation.

THE SOFTWARE USED:-

• Windows 2000/XP OS is desirable.


• NetBeans Ver 5.1 or higher should be installed with JDK and
JVM.
• MySQL Ver 6.1 with Library Database must be present at
machine.

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:

Ms-Access, MySQL, SQLite, Microsoft SQL Server, Oracle etc.

WHAT IS MySQL?

In order to access data within the Oracle database, all

programs and users must use, Structured Query Language

(SQL). SQL is the set of commands that is recognised by

nearly all RDBMDs.

WHAT IS PYTHON?

Python is a high level language. It is a free and open source language. It is an interpreted language, as

Python programs are executed by an interpreter.

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')

# cursor.execute("""select count(name) from sqlite_master where


type='table' and name='doctor'""")
cursor.execute("""
SELECT COUNT(*)
FROM information_schema.tables
WHERE table_name = '{0}'
""".format("doctor"))
if cursor.fetchone()[0] == 0:
cursor.execute("""CREATE TABLE IF NOT EXISTS doctor (
d_id int primary key,
dnamedfirst VARCHAR(20),
dnamedlast VARCHAR(30),
password varchar(20) not null,
speciality varchar(40) not null,
shift varchar(10) not null,
phone varchar(10) not null);""")
# cursor.execute("""select count(name) from sqlite_master where
type='table' and name='patient'""")

cursor.execute("""CREATE TABLE IF NOT EXISTS patient (


p_id int primary key,
pfirst VARCHAR(20),
pdlast VARCHAR(30),
City varchar(20) not null,
DOB date not null,
age int not null,
DOA date not null,
number varchar(10) not null);""")
cursor.execute("""CREATE TABLE IF NOT EXISTS virus (
p_id int not null,

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("")

def progress(status, remaining, total):


print(f'Copied {total - remaining} of {total} pages...')

20
OUTPUT

21
22
23
24
25
USER MANUAL
How to Install Software
Hardware Requirement-

• Intel Pentium/Celeron or similar processor based PC at


Client/Server end.
• 128 MB RAM and 4GB HDD space (for Database) is desirable.
• Standard 1/0 devices like keyboard and Mouse etc.
• Printer is needed for hard-copy reports.
• Local Area Network (LAN) is required for Client- Server
Installation.

Software Requirement-

• Windows 2000/XP OS is desirable.


• NetBeans Ver 5.1 or higher should be installed with JDK and
JVM.
• MySQL Ver 6.1 with Library Database must be present at
machine.
Database Installation-
The software project is distributed with a backup copy of a database
named LIBRARY with required tables. Some dummy records are
present in the tables for testing purposes, which can be deleted before
inserting real data.

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

(8) Various Websites of Discussion Forum and software development activities

Other than the above-mentioned books, the suggestions and supervision of my


teacher and my classmates also helped me to develop this software project.

27
28

You might also like