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

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Santhibastawad Road, Machhe


Belagavi - 590018, Karnataka, India

A PROJECT REPORT
ON
“COVID-19 PATIENT MANAGEMENT
SYSTEM”
Submitted in the partial fulfilment of the requirements for the award of the degree of

BACHELOR OF ENGINEERING
IN
INFORMATION SCIENCE AND ENGINEERING
For the Academic Year 2020-2021
Submitted by

Soumya Bani 1JS18IS090


Spoorthi Kulkarni 1JS18IS091

Under the Guidance of


Dr. Sowmya K.N,
Mrs. Punitha M,
Asst. Prof, Dept. of ISE, JSSATE

DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING


JSS ACADEMY OF TECHNICAL EDUCATION
JSS Campus, Dr.Vishnuvardhan Road, Bengaluru-560060

2020-2021
JSS MAHAVIDYAPEETHA, MYSURU
JSS ACADEMY OF TECHNICAL EDUCATION
JSS Campus, Dr.Vishnuvardhan Road, Bengaluru-560060

DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING

CERTIFICATE

This is to certify that the project work entitled “Covid-19 Patient Management System”
is a bonafide work carried out by Soumya Bani [1JS18IS090], Spoorthi Kulkarni
[1JS18IS091] in partial fulfilment for the DBMS Laboratory with Mini Project
(18CSL58) of 5th Semester Bachelor of Engineering in Information Science and
Engineering of Visvesvaraya Technological University Belagavi during the year 2020-
2021. It is certified that all corrections and suggestions have been incorporated in the
report deposited in the department library.

Signature of the Guide


Signature of the HOD

Dr. Sowmya K N Dr. Dayananda P


Mrs. Punitha M
Asst. Prof. Prof. & Head
Dept. of ISE Dept. of ISE
JSSATE, Bengaluru JSSATE, Bengaluru

Signature of Examiners

1.

2.
COVID-19 Patient Management System

ACKNOWLEDGEMENT

The satisfaction and euphoria that accompany the successful completion


of any task would be incomplete without the mention of the people who made it
possible. So with gratitude, we acknowledge all those whose guidance and
encouragement crowned our efforts with success.

First and foremost, we would like to thank his Holiness Jagadguru Sri
Shivarathri Deshikendra Mahaswamiji and Dr. Mrityunjaya V Latte,
Principal, JSSATE, Bangalore for providing an opportunity to carry out the
Project Work as a part of our curriculum in the partial fulfilment of the degree
course.

We express our sincere gratitude for our beloved Head of the department, Dr.
Dayananda P, for his co-operation and encouragement at all the moments of
our approach.

It is our pleasant duty to place on record our deepest sense of gratitude to


our respected guide Dr. Sowmya K N, Assistant Professor and Mrs. Punitha
M, Assistant Professor for the constant encouragement, valuable help and
assistance in every possible way.

We would like to thank all ISE Department Teachers, non-teaching staff


and Library staff for providing us with their valuable guidance and for being
there at all stages of our work.

Soumya Bani [1JS18IS090]


Spoorthi Kulkarni [1JS18IS091]

2|Page
COVID-19 Patient Management System

ABSTRACT

Patient monitoring can be rigorously defined as “repeated or continuous observations


or measurements of the patient, his or her physiological function, and the function of
life support equipment, for the purpose of guiding management decisions, including
when to make therapeutic interventions, and assessment of those interventions”. A
patient monitor may not only alert caregivers to potentially life-threatening events;
many also provide physiologic input data used to control directly connected life
support devices.
Patient monitoring systems are capable of receiving and storing patient data and may
include a medicine dosage algorithm for using the stored patient data to generate
medicine dosage recommendations to a patient. A central data processing system is
configured to obtain patient data from each patient monitoring system and analyze
the obtained patient data to identify medical conditions of each respective patient.
The database system is organized such that the details can be sorted out in all possible
ways and the queries are executed such that the needed information at all times is
feasible. Also, the system is organized such that the patients as well as the admin can
view the patients present in the hospital, who are sorted out into symptomatic and
non-symptomatic type of COVID-19.
.

3|Page
COVID-19 Patient Management System

Table of contents

Acknowledgement 2
Abstract 3
Table of contents 4

Chapter 1 Introduction

1.1 Introduction to DBMS 6


1.1.1 History to DBMS 7
1.2 Project Introduction 8
1.3 Objectives 9

Chapter 2 literature survey

2.1 Problem statement 10


2.2 Django 10
2.3 JavaScript 11
2.4 CSS 11
2.5 Html 12
2.6 Normalization 13
2.7 Requirement specification
2.7.1 software specification 15
2.7.2 hardware specification 15
2.8 Functional requirements 15

Chapter 3 System Design

3.1 Introduction 16
3.2 Schema Diagram 17
3.3 E R Diagram 18

4|Page
COVID-19 Patient Management System

Chapter 4 Implementation

4.1 Project implementation 19


4.2 Pseudo code
4.2.1 Html code 19
4.2.2 JavaScript code 21
4.3 Source code for backend 23

4.3.1 Stored procedure 26

Chapter 5 Testing

5.1 Introduction 27
5.2 Types of testing
5.2.1 Unit Testing 27
5.2.2 Integration testing 27
5.2.3 System Testing

Chapter 6 Results

6.1 Snapshots 27

Chapter 7 Conclusion

7.1 Conclusion 30
7.2 Future Enhancement 30

Chapter 8 References

8.1 Book references 33


8.2 Web references 34

5|Page
COVID-19 Patient Management System Chapter 1- Introduction

CHAPTER 1- INTRODUCTION

1.1 Introduction to DBMS

A database management system (DBMS) refers to the technology for creating and managing
databases. DBMS is a software tool to organize (create, retrieve, update, and manage) data in a
database.
The main aim of a DBMS is to supply a way to store up and retrieve database information that is
both convenient and efficient. By data, we mean known facts that can be recorded and that have
embedded meaning. Usually, people use software such as DBASE IV or V, Microsoft ACCESS, or
EXCEL to store data in the form of a database. A datum is a unit of data. Meaningful data
combined to form information. Hence, information is interpreted data - data provided with
semantics. MS. ACCESS is one of the most common examples of database management software.

DBMS Functioning

6|Page
COVID-19 Patient Management System Chapter 1- Introduction

1.1.1 History to DBMS

Human beings began to store information very long ago. In the ancient times,
elaborate database systems were developed by government offices, libraries, hospitals, and business
organizations, and some of the basic principles of these systems are still being used today.

A Database Management System allows a person to organize, store, and retrieve data from a
computer. It is a way of communicating with a computer’s “stored memory.” In the very early years
of computers, “punch cards” were used for input, output, and data storage. Punch cards offered a
fast way to enter data, and to retrieve it. Herman Hollerith is given credit for adapting the punch
cards used for weaving looms to act as the memory for a mechanical tabulating machine, in 1890.
Much later, databases came along.

Functionalities of a DBMS

Databases (or DBs) have played a very important part in the recent evolution of computers. The
first computer programs were developed in the early 1950s, and focused almost completely on
coding languages and algorithms. At the time, computers were basically giant calculators and data
(names, phone numbers) was considered the leftovers of processing information. Computers were
just starting to become commercially available, and when business people started using them for
real-world purposes, this leftover data suddenly became important.

In 1960, Charles W. Bachman designed the Integrated Database System, the “first” DBMS. IBM,
not wanting to be left out, created a database system of their own, known as IMS. Both database
systems are described as the forerunners of navigational databases.

By the mid-1960s, as computers developed speed and flexibility, and started becoming popular,
many kinds of general use database systems became available. As a result, customers demanded a
standard be developed, in turn leading to Bachman forming the Database Task Group. This group
took responsibility for the design and standardization of a language called Common Business
Oriented Language (COBOL). The Database Task Group presented this standard in 1971, which
also came to be known as the “CODASYL approach.”

The CODASYL approach was a very complicated system and required substantial training.

7|Page
COVID-19 Patient Management System Chapter 1- Introduction

Edgar Codd worked for IBM in the development of hard disk systems, and he was not happy with
the lack of a search engine in the CODASYL approach, and the IMS model. He wrote a series of
papers, in 1970, outlining novel ways to construct databases. His ideas eventually evolved into a
paper titled, A Relational Model of Data for Large Shared Data Banks, which described new
method for storing data and processing large databases. .”

IBM had invested heavily in the IMS model, and wasn’t terribly interested in Codd’s ideas.
Fortunately, some people who didn’t work for IBM “were” interested. In 1973, Michael
Stonebraker and Eugene Wong (both then at UC Berkeley) made the decision to research relational
database systems. The project was called INGRES (Interactive Graphics and Retrieval System), and
successfully demonstrated a relational model could be efficient and practical. INGRES worked with
a query language known as QUEL, in turn, pressuring IBM to develop SQL in 1974, which was
more advanced (SQL became ANSI and OSI standards in 1986 1nd 1987). SQL quickly replaced
QUEL as the more functional query language.

RDBM Systems were an efficient way to store and process structured data. Then, processing speeds
got faster, and “unstructured” data (art, photographs, music, etc.) became much more common
place. Unstructured data is both non-relational and schema-less, and Relational Database
Management Systems simply were not designed to handle this kind of data.

1.2 Project Introduction

The coronavirus COVID-19 pandemic is the defining global health crisis of our time and the
greatest challenge we have faced since World War Two. Since its emergence in Asia late last year,
the virus has spread to every continent except Antarctica. Initially, the number of cases were few in
number but as days went on, there are lakhs of cases being reported and thousands dying. When the
cases were first reported, they were handled without complications with effective management and
treatment. However, as the situation became wild, an efficient and a feasible management system
gains its essentiality.

Patients management is an integral component in the modern day healthcare management system. If
proper records are kept in secure and safe place within the hospital helps healthcare professionals
compare and contrast certain illnesses based on certain features. It can also be used for research
purposes if guaranteed of security and privacy issues. A database taking records of the covid
patients' information, their recovery timeline, their prescriptions would be undoubtedly useful. The
database that is designed would smartly monitor the patient's health status by storing and updating
the details of patients and their admit information, the symptoms, remedies, medications, treatment,
and the discharge information. This system helps doctors to access the details, treat the patient very
effectively and comes in handy to be one of the most efficient management tools.

8|Page
COVID-19 Patient Management System Chapter 1- Introduction

1.3 Objectives of COVID-19 Patient Management System

• The main objective of the designed COVID Patient Management System is to manage the
details of Patient, Doctor, Test, Medicine and Prescriptions.

• The user (patient / doctor) can himself update the database if he/she has been given the
particular medication.

• Contains information about the physician /doctor allotted to the particular patient and where
the patient is admitted.

• Retrieves information about patient admission and patient discharge and its ward details
easily.

9|Page
COVID-19 Patient Management System Chapter 2- Literature Survey

CHAPTER 2- LITERATURE SURVEY

2.1 Problem Statement

In December 2019, a novel coronavirus called SARS-CoV-2 has resulted in the outbreak of a
respiratory illness known as COVID-19. A COVID-19 Patient Management System has to be
designed so that the details of patients, doctors, their ward details, their admit and discharge info
could be maintained easily and the required data is retrieved. In this voracious pandemic, a patient
management system which could monitor the huge data having essential details gains its
essentiality. Therefore a patient management system has been designed to meet all the essential
requirements.

2.2 Django
Django is a Python-based free and open-source web framework that follows the model-template-
views (MTV) architectural pattern. It is maintained by the Django Software Foundation (DSF), an
American independent organization established as a 501(c)(3) non-profit.

Django's primary goal is to ease the creation of complex, database-driven websites. The framework
emphasizes reusability and "pluggability" of components, less code, low coupling, rapid
development, and the principle of don't repeat yourself.[11] Python is used throughout, even for
settings, files, and data models. Django also provides an optional administrative create, read, update
and delete interface that is generated dynamically through introspection and configured via admin
models.

Some well known sites that use Django include PBS, Instagram, Mozilla, The Washington Times,
Disqus, Bitbucket, and Nextdoor.

Django Home Page

10 | P a g e
COVID-19 Patient Management System Chapter 2- Literature Survey

2.3 JavaScript
JavaScript abbreviated as JS, is a programming language that conforms to the ECMAScript
specification. JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has
curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.
Alongside HTML and CSS, JavaScript is one of the core technologies of the World Wide Web.
JavaScript enables interactive web pages and is an essential part of web applications. The vast
majority of websites use it for client-side page behavior, and all major web browsers have a
dedicated JavaScript engine to execute it.
As a multi-paradigm language, JavaScript supports event-driven, functional, and imperative
programming styles. It has application programming interfaces (APIs) for working with text, dates,
regular expressions, standard data structures, and the Document Object Model (DOM).
JavaScript engines were originally used only in web browsers, but they are now embedded in some
servers, usually via Node.js. They are also embedded in a variety of applications created with
frameworks such as Electron and Cordova.

JavaScript Icon
2.4 CSS (Cascading Style Sheets)

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a
document written in a markup language such as HTML.CSS is a cornerstone technology of the
World Wide Web, alongside HTML and JavaScript.
CSS is designed to enable the separation of presentation and content, including layout, colors, and
fonts. This separation can improve content accessibility, provide more flexibility and control in the
specification of presentation characteristics, enable multiple web pages to share formatting by
specifying the relevant CSS in a separate .css file which reduces complexity and repetition in the
structural content as well as enabling the .css file to be cached to improve the page load speed
between the pages that share the file and its formatting.
The name cascading comes from the specified priority scheme to determine which style rule applies
if more than one rule matches a particular element. This cascading priority scheme is predictable.

CSS Icon
11 | P a g e
COVID-19 Patient Management System Chapter 2- Literature Survey

2.5 HTML (Hyper Text Markup Language)

Hypertext Markup Language (HTML) is the standard markup language for documents designed to
be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets
(CSS) and scripting languages such as JavaScript.

Web browsers receive HTML documents from a web server or from local storage and render the
documents into multimedia web pages. HTML describes the structure of a web page semantically
and originally included cues for the appearance of the document.

HTML elements are the building blocks of HTML pages. With HTML constructs, images and other
objects such as interactive forms may be embedded into the rendered page. HTML provides a
means to create structured documents by denoting structural semantics for text such as headings,
paragraphs, lists, links, quotes and other items. HTML elements are delineated by tags, written
using angle brackets. Tags such as <img /> and <input /> directly introduce content into the page.
Other tags such as <p> surround and provide information about document text and may include
other tags as sub-elements. Browsers do not display the HTML tags, but use them to interpret the
content of the page.

HTML can embed programs written in a scripting language such as JavaScript, which affects the
behavior and content of web pages. Inclusion of CSS defines the look and layout of content. The
World Wide Web Consortium (W3C), former maintainer of the HTML and current maintainer of
the CSS standards, has encouraged the use of CSS over explicit presentational HTML since 1997.

HTML Icon

12 | P a g e
COVID-19 Patient Management System Chapter 2- Literature Survey

2.6 Normalization

Normalization is the process of minimizing redundancy from a relation or set of relations.


Redundancy in relation may cause insertion, deletion and updation anomalies. So, it helps to
minimize the redundancy in relations. Normal forms are used to eliminate or reduce redundancy in
database tables.

1. First Normal Form –

If a relation contains composite or multi-valued attribute, it violates first normal form or a relation
is in first normal form if it does not contain any composite or multi-valued attribute. A relation is in
first normal form if every attribute in that relation is singled valued attribute.

Example – Relation STUDENT in table 1 is not in 1NF because of multi-valued attribute


STUD_PHONE. Its decomposition into 1NF has been shown in table 2.

2. Second Normal Form –

To be in second normal form, a relation must be in first normal form and relation must not contain
any partial dependency. A relation is in 2NF if it has No Partial Dependency, i.e., no non-prime
attribute (attributes which are not part of any candidate key) is dependent on any proper subset of
any candidate key of the table.

Partial Dependency – If the proper subset of candidate key determines non-prime attribute, it is
called partial dependency.

Example – Consider table-3 as following below.

13 | P a g e
COVID-19 Patient Management System Chapter 2- Literature Survey

Here,
COURSE_FEE cannot alone decide the value of COURSE_NO or STUD_NO;
COURSE_FEE together with STUD_NO cannot decide the value of COURSE_NO;
COURSE_FEE together with COURSE_NO cannot decide the value of STUD_NO;
Hence,
COURSE_FEE would be a non-prime attribute, as it does not belong to the one only candidate key
{STUD_NO, COURSE_NO} ;
But, COURSE_NO -> COURSE_FEE , i.e., COURSE_FEE is dependent on COURSE_NO, which
is a proper subset of the candidate key. Non-prime attribute COURSE_FEE is dependent on a
proper subset of the candidate key, which is a partial dependency and so this relation is not in 2NF.

To convert the above relation to 2NF,


we need to split the table into two tables such as :
Table 1: STUD_NO, COURSE_NO
Table 2: COURSE_NO, COURSE_FEE

3. Third Normal Form –

A relation is in third normal form, if there is no transitive dependency for non-prime attributes as
well as it is in second normal form.
A relation is in 3NF if at least one of the following conditions hold in every non-trivial function
dependency X –> Y.
1. X is a super key.
2. Y is a prime attribute (each element of Y is part of some candidate key).

14 | P a g e
COVID-19 Patient Management System Chapter 2- Literature Survey

4. Boyce-Codd Normal Form (BCNF) –

A relation R is in BCNF if R is in Third Normal Form and for every FD, LHS is super key. A
relation is in BCNF iff in every non-trivial functional dependency X –> Y, X is a super key.

Example –
Find the highest normal form of a relation R(A,B,C,D,E) with FD set as {BC->D, AC->BE, B->E}

Step 1. As we can see, (AC)+ ={A,C,B,E,D} but none of its subset can determine all attribute of
relation, So AC will be candidate key. A or C can’t be derived from any other attribute of the
relation, so there will be only 1 candidate key {AC}.
Step 2. Prime attributes are those attribute which are part of candidate key {A, C} in this example
and others will be non-prime {B, D, E} in this example.
Step 3. The relation R is in 1st normal form as a relational DBMS does not allow multi-valued or
composite attribute.
The relation is in 2nd normal form because BC->D is in 2nd normal form (BC is not a proper subset
of candidate key AC) and AC->BE is in 2nd normal form (AC is candidate key) and B->E is in 2nd
normal form (B is not a proper subset of candidate key AC).
The relation is not in 3rd normal form because in BC->D (neither BC is a super key nor D is a
prime attribute) and in B->E (neither B is a super key nor E is a prime attribute) but to satisfy 3rd
normal for, either LHS of an FD should be super key or RHS should be prime attribute.
So the highest normal form of relation will be 2nd Normal form.

2.7 Requirement Specification

2.7.1 Software Specification

• Windows 10 Operation System


• A visual compiler [Preferably Visual Studio Code]
• Front-end- Django
• Python
• Rear-end- ORACLE D B 18C Express Edition

2.7.2 Hardware Specification

• Processor : i5 Core Processor


• Clock speed : 2.5GHz
• Monitor : 1024 * 768 Resolution Color
• Keyboard : QWERTY
• RAM : 1 GB
• Input Output Console for interaction

2.7.3 Functional Requirements

Two modules are used in this project namely Admin and User.
• Admin – can insert, analyse the tables, add/ delete/ update information
• User – can register their information

15 | P a g e
COVID-19 Patient Management System Chapter 3- System Design

CHAPTER 3 – SYSTEM DESIGN

3.1 Introduction

System is a collection of an interrelated components that works together to achieve a


purpose. System analysis is referred to the systematic examination or detailed study of a system
in order to identify problems of the system, and using the information gathered in the analysis
stage to recommend improvements or solution to the system.

System design is an abstract representation of a system component and their relationship and
which describe the aggregated functionality and performance of the system. System design is
also the overall plan or blueprint for how to obtain answer to the question being asked. The
design specifies which of the various type of approach.

Systems design is the process or art of defining the architecture, components modules,
interfaces, and data for a system to satisfy specified requirements. One could see it as the
application of systems theory to product development.

Database Design is a collection of processes that facilitate the designing, development,


implementation and maintenance of enterprise data management systems. Properly designed
database are easy to maintain, improves data consistency and are cost effective in terms of disk
storage space. The database designer decides how the data elements correlate and what data must be
stored.

The main objectives of database designing are to produce logical and physical designs models of
the proposed database system.

3.2 Schema Diagram (Relational View)

A database schema is the skeleton structure that represents the logical view of the entire database.
A database schema defines its entities and the relationship among them. It contains a descriptive
detail of the database, which can be depicted by means of schema diagrams.

A schema diagram contains entities and the attributes that will define that schema. It only shows
us the database design. It does not show the actual data of the database. Schema can be a single
table or it can have more than one table which is related.

The designed COVID-19 Patient Management System has 6 tables or entities and their attributes
have been listed respectively as follows:

16 | P a g e
COVID-19 Patient Management System Chapter 3- System Design

COVID-19 Patient Management System Schema Diagram

3.3 ER Diagram

An Entity–relationship model (ER model) describes the structure of a database with the help of a
diagram, which is known as Entity Relationship Diagram (ER Diagram). An ER model is a
design or blueprint of a database that can later be implemented as a database. The main components
of E-R model are: entity set and relationship set.

The ER diagram shows the relationship among entity sets. An entity set is a group of similar entities
and these entities can have attributes. In terms of DBMS, an entity is a table or attribute of a table in
database, so by showing relationship among tables and their attributes, ER diagram shows the
complete logical structure of a database.
Here are the geometric shapes and their meaning in an E-R Diagram.

Rectangle: Represents Entity sets.


Ellipses: Attributes
Diamonds: Relationship Set
Lines: They link attributes to Entity Sets and Entity sets to Relationship Set
Double Ellipses: Multivalued Attributes
Dashed Ellipses: Derived Attributes
Double Rectangles: Weak Entity Sets
Double Lines: Total participation of an entity in a relationship set

17 | P a g e
COVID-19 Patient Management System Chapter 3- System Design

COVID-19 Patient Management System E-R Diagram

18 | P a g e
COVID-19 Patient Management System Chapter 4- Implementation

CHAPTER 4 – IMPLEMENTATION

4.1 Project Implementation

Implementation is the stage where the theoretical design is turned into a working system. The
most crucial stage in achieving a new successful system and in giving confidence on the new
system for the users that it will work effectively.
The system can be implemented only after thorough testing is done and if it is found to
work according to the specification. It involves careful planning, investigating of the current
system and its constraints on implementation, design of methods to achieve the change over
and an evaluation of change over methods a part from planning. Two major tasks of preparing
the implementation are education and training of the users and testing of the system.

The following codes will ensure the complete implementation of our design and the project.

4.2 Pseudo Code

4.2.1 HTML Code

HOME PAGE

<!DOCTYPE html>
<html lang="en">
{% load static %}

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>COVID-19 PATIENT MANAGEMENT SYSTEM</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script>
<link href="style.css" rel="stylesheet">
</head>

<body>

<!-- Navigation -->


<nav class="navbar navbar-expand-md navbar-light bg-light sticky-top">
<div class="container-fluid">
<a href="#" class="navbar-brand">
<img src="{% static 'covidimage.jpg' %}" >
</a>
<!--<button class="navbar-toggler" type="button" data-toggle="collapse" data-
target="#navbarResponsive">

19 | P a g e
COVID-19 Patient Management System Chapter 4- Implementation

<span class="navbar-toggler-icon"></span>
</button>-->
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link active">Home</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">About</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Service</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Team</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Connect</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
</div>

<!--- Jumbotron -->


<div class="alert alert-success">
<!--<div class="row jumbotron">-->
<marquee behavior="scroll" direction="right">

<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9 col-xl-10">


<p class="lead">Wear a face cover.
Wash your hands.
Keep a safe distance.</p>
</div>
</marquee>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3 col-xl-2">
<a href="#">
<button class="btn btn-outline-secondary btn-lg">More info</button>
</a>
</div>
</div>
</div>

<!--- Welcome Section -->


<div class="container-fluid padding">
<div class="row welcome text-center">
<div class="col-12">
<h1 class="display-4">COVID-19 PATIENT MANAGEMENT SYSTEM</h1>
<hr>
20 | P a g e
COVID-19 Patient Management System Chapter 4- Implementation

</div>
</div>
</div>

<!--- Three Column Section -->


<div class="conatiner-fluid padding">
<div class="row text-center padding">
<div class="col-xs-12 col-sm-3 col-md-3">

<h3>Patient</h3>
<a href="{% url 'patient_details' %}" class="btn btn-outline-secondary">Patient details</a>
<br>

</div>
<div class="col-xs-12 col-sm-3 col-md-3">

<h3>Doctor</h3>
<a href="{% url 'doctor_details' %}" class="btn btn-outline-secondary">Doctor details</a>
<br>
</div>
<div class="col-sm-12 col-md-3">

<h3>Ward</h3>
<a href="{% url 'ward_details' %}" class="btn btn-outline-secondary">Ward details</a>
</div>

<div class="col-sm-12 col-md-3">

<h3>Staff</h3>
<a href="{% url 'staff_details' %}" class="btn btn-outline-secondary">Staff details</a>
</div>

</div>
<hr class="my-4">
</div>
</body>

</html>

4.2.2 JavaScript Code

<!-- =============== VENDOR SCRIPTS ===============-->


<!-- MODERNIZR-->
<script src="vendor/modernizr/modernizr.custom.js"></script>
<!-- JQUERY-->
<script src="vendor/jquery/dist/jquery.js"></script>
<!-- BOOTSTRAP-->
<script src="vendor/bootstrap/dist/js/bootstrap.js"></script>
<script src="vendor/datatables/media/js/jquery.dataTables.min.js"></script>

21 | P a g e
COVID-19 Patient Management System Chapter 4- Implementation

<script src="vendor/datatables-colvis/js/dataTables.colVis.js"></script>
<script src="vendor/datatables/media/js/dataTables.bootstrap.js"></script>
<script src="vendor/serialize/jquery.serializejson.js"></script>
<!-- STORAGE API-->
<script src="vendor/jQuery-Storage-API/jquery.storageapi.js"></script>
<!-- JQUERY EASING-->
<script src="vendor/jquery.easing/js/jquery.easing.js"></script>
<!-- ANIMO-->
<script src="vendor/animo.js/animo.js"></script>
<script src="vendor/parsley/parsley.min.js"></script>
<script src="vendor/sweetalert/dist/sweetalert.min.js"></script>
<!-- LOCALIZE-->
<script src="vendor/jquery-localize-i18n/dist/jquery.localize.js"></script>
<!-- =============== PAGE VENDOR SCRIPTS ===============-->
<!-- =============== APP SCRIPTS ===============-->
<script src="app/js/app.js"></script>
<script src="js/patient.js"></script>
</body>

</html>

Code to establish connection between frontend and Database

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.oracle',
'NAME': 'localhost:1521/XE',
'USER': 'system',
'PASSWORD': '',
#'HOST': '',
#'PORT': '',

}
}

22 | P a g e
COVID-19 Patient Management System Chapter 4- Implementation

4.3 Source code for backend

Code for Table Creation

CREATE TABLE PATIENT (

PATIENT_ID INTEGER NOT NULL,

PATIENT_NAME VARCHAR(25) NOT NULL,

AGE INTEGER,

GENDER CHAR(2) NOT NULL,

ADDRESS VARCHAR(25) NOT NULL,

PRIMARY KEY(PATIENT_ID)

);

CREATE TABLE WARD(

WARD_NO INTEGER NOT NULL,

NO_OF_PATIENTS INTEGER NOT NULL,

WARD_PHONE INTEGER,

PRIMARY KEY(WARD_NO)

);

CREATE TABLE DOCTOR(

DOC_ID INTEGER NOT NULL,

DOC_NAME VARCHAR(15) NOT NULL,

WARD_NO INTEGER,

PATIENT_ID INTEGER,

FOREIGN KEY(WARD_NO) REFERENCES WARD (WARD_NO) ON DELETE CASCADE,

FOREIGN KEY(PATIENT_ID) REFERENCES PATIENT(PATIENT_ID) ON DELETE CASCADE,

PRIMARY KEY(DOC_ID)

);

23 | P a g e
COVID-19 Patient Management System Chapter 4- Implementation

CREATE TABLE ADMIT_INFO(

PATIENT_ID INTEGER NOT NULL,

ADMIT_DATE DATE,

COVID_STATUS VARCHAR(25),

ADMIT_TEMP INTEGER,

ADMIT_SYMPTOMS VARCHAR(25),

FOREIGN KEY(PATIENT_ID) REFERENCES PATIENT(PATIENT_ID) ON DELETE CASCADE

);

CREATE TABLE DISCHARGE_INFO(

DISCHARGE_DATE DATE,

PATIENT_ID INTEGER NOT NULL,

COVID_STATUS2 VARCHAR(10),

DISCHARGE_TEMP INTEGER,

DISCHARGE_SYMPTOMS VARCHAR(25),

FOREIGN KEY(PATIENT_ID) REFERENCES PATIENT(PATIENT_ID) ON DELETE CASCADE

);

CREATE TABLE STAFF(

STAFF_ID INTEGER NOT NULL,

STAFF_NAME VARCHAR(15) NOT NULL,

WARD_NO INTEGER NOT NULL,

PATIENT_ID INTEGER NOT NULL,

FOREIGN KEY(WARD_NO) REFERENCES WARD (WARD_NO) ON DELETE CASCADE,

FOREIGN KEY(PATIENT_ID) REFERENCES PATIENT(PATIENT_ID) ON DELETE CASCADE,

PRIMARY KEY(STAFF_ID)

);

24 | P a g e
COVID-19 Patient Management System Chapter 4- Implementation

QUERIES

There were some queries that were run on the basis of essential requirements:

Query 1
To retrieve the details of all patients—Patient id , Patient name, Address, Admit date,
Discharge date.

SELECT P.PATIENT_ID,P.PATIENT_NAME,P.ADDRESS,
A.ADMIT_DATE,D.DISCHARGE_DATE FROM
PATIENT P,ADMIT_INFO A,DISCHARGE_INFO D
WHERE P.PATIENT_ID=A.PATIENT_ID
AND A.PATIENT_ID=D.PATIENT_ID;

Query 2
To count the no of patients having COVID-19 positive on basis of symptomatic and
asymptomatic.

SELECT COVID_STATUS,COUNT(DISTINCT PATIENT_ID) FROM


ADMIT_INFO GROUP BY COVID_STATUS HAVING COUNT(*)>1 ;

Query 3
To create a view of all doctors who are in-charge of ward with patients more than 15.

CREATE VIEW DOCTR_WARD AS SELECT


T.DOC_ID,T.DOC_NAME,W.WARD_NO
FROM PATIENT P,DOCTOR T ,WARD W
WHERE P.PATIENT_ID=T.PATIENT_ID AND
W.WARD_NO=T.WARD_NO AND W.NO_OF_PATIENTS>=15;

Query 4
Retrieve the data of ward and staff in-charge using join operation.

SELECT W.WARD_NO,W.NO_OF_PATIENTS,S.STAFF_ID,S.STAFF_NAME
FROM WARD W INNER JOIN STAFF S
ON W.WARD_NO=S.WARD_NO;

Query 5
Retrieve data of patient id ,the respective doctor ,staff in charge and ward no using full outer
join.

SELECT P.PATIENT_ID,D.DOC_ID,S.STAFF_ID,W.WARD_NO FROM PATIENT P


FULL JOIN DOCTOR D ON P.PATIENT_ID=D.PATIENT_ID
FULL JOIN STAFF S ON P.PATIENT_ID=S.PATIENT_ID
FULL JOIN WARD W ON W.WARD_NO=S.WARD_NO;

25 | P a g e
COVID-19 Patient Management System Chapter 4- Implementation

4.3.1 Stored Procedure

CREATE OR REPLACE PROCEDURE patinfo(P_GENDER IN VARCHAR2,


P_ID OUT INT,
P_NAME OUT VARCHAR2,
P_AGE OUT INT,
P_ADDRESS OUT VARCHAR2)
AS
BEGIN
FOR C IN (SELECT PATIENT_ID,PATIENT_NAME, AGE,ADDRESS INTO
P_ID,P_NAME,P_AGE,
P_ADDRESS
FROM COVIDPROJECT_PATIENT
WHERE COVIDPROJECT_PATIENT.GENDER = patinfo.P_GENDER)
LOOP
P_ID := C.PATIENT_ID;
P_NAME := C.PATIENT_NAME;
P_AGE := C.AGE;
P_ADDRESS := C.ADDRESS;
END LOOP;
END;

SET SERVEROUT ON
DECLARE
PATID INT(10);
PATNAME VARCHAR2(20);
PATAGE INT(10);
PATADD VARCHAR2(20);
BEGIN
PATINFO('M',PATID,PATNAME,PATAGE,PATADD);
DBMS_OUTPUT.ENABLE (buffer_size => NULL);
END;

26 | P a g e
COVID-19 Patient Management System Chapter 5- Testing

CHAPTER 5- TESTING
5.1 Introduction

Testing plays a vital role in the success of the system. System testing makes a logical
assumption that if all parts of the system are correct, the goal will be successfully achieved.
Once program code has been developed, testing begins. The testing process focuses on the
logical internals of the software, ensuring that all statements have been tested, and on the
functional externals, that is conducted tests to uncover errors and ensure that defined input will
produce actual results that agree with required results. Broadly speaking, there are at least three
levels of testing: unit testing, integration testing, and system testing

5.2 Types of Testing

5.2.1 Unit testing

Unit testing refers to tests that verify the functionality of a specific section of code,
usually at the function level. In an object-oriented environment, this is usually at the class level,
and the minimal unit tests include the constructors and destructors.
These types of tests are usually written by developers as they work on code (white-box
style), to ensure that the specific function is working as expected. One function might have
multiple tests, to catch corner cases or other branches in the code. Unit testing alone cannot
verify the functionality of a piece of software, but rather is used to ensure that the building
blocks of the software work independently from each other.
Unit testing is a software development process that involves a synchronized application
of a broad spectrum of defect prevention and detection strategies in order to reduce software
development risks, time, and costs. It is performed by the software developer or engineer
during the construction phase of the software development lifecycle. Unit testing aims to
eliminate construction errors before code is promoted to additional testing; this strategy is
intended to increase the quality of the resulting software as well as the efficiency of the overall
development process.

5.2.2 Integration Testing

Integration testing is any type of software testing that seeks to verify the interfaces
between components against a software design. Software components may be integrated in an
iterative way or all together ("big bang"). Normally the former is considered a better practice
since it allows interface issues to be located more quickly and fixed.
Integration testing works to expose defects in the interfaces and interaction between
integrated components (modules). Progressively larger groups of tested software components
corresponding to elements of the architectural design are integrated and tested until the
software works as a system.

5.2.3 System Testing

System testing tests a completely integrated system to verify that the system meets its
requirements .For example, a system test might involve testing a logon interface, then creating
and editing an entry, plus sending or printing results, followed by summary processing or
deletion (or archiving) of entries, then logoff.

27 | P a g e
COVID-19 Patient Management System Chapter 6- Results

CHAPTER 6 - RESULTS

LOGIN PAGE

HOME PAGE

28 | P a g e
COVID-19 Patient Management System Chapter 6- Results

THE PATIENT DETAILS PAGE

ADMIT PATIENT / ADD PATIENT PAGE

29 | P a g e
COVID-19 Patient Management System Chapter 6- Results

THE ADMIT-INFO PAGE

THE DISCHARGE-INFO PAGE

30 | P a g e
COVID-19 Patient Management System Chapter 6- Results

THE DOCTOR-INFO PAGE

THE WARD DETAILS PAGE

31 | P a g e
COVID-19 Patient Management System Chapter 6- Results

THE STAFF DETAILS PAGE

32 | P a g e
COVID-19 Patient Management System Chapter 7- Conclusion

CHAPTER 7- CONCLUSION
7.1 – Conclusion

This is a small prototype of a COVID-19 Patient Management System web application for
easy ongoing of hospital management. The application is built efficiently being user friendly
such that data can be added, subtracted and updated as quick as possible.

Such an application, if built with professional expertise, can be highly useful for the
emerging COVID-19 pandemic where management for many patients’ data is essential. The
prepared system proves its essentiality completely as data can be sorted out on the basis of
several parameters.
The usage of this system can fasten the work and make it easier for the user as well as
hospital admins to manage data.

A legal implementation of this application can be if the government decides to provide a


WMS and makes it easier for the officials and users to manage data and make sure the
attention is drawn towards treating the patients rather than stakeholders’ details’
management. At this time where health and sanitation should be given the highest priority,
systems such that COVID-19 Patient Management Systems should be used efficiently so
that everything becomes easier.

7.2 Future Advancements

• The data on the patients’ prescriptions and the medicines can be added so that the
doctors can monitor the patients even after discharge for the certain period of time.

• The ongoing treatment of the patient can be recorded so that the next procedures can
be planned and hospital assets can be efficiently monitored.

• Many post-discharge sophistications can be added so that patients have better health
and communication with the doctor.

• The platform can be hosted on online servers to make it accessible worldwide.

• Implement the backup mechanism for taking backup of codebase and database on
regular basis on different servers.

• Distribute the loads of the system.

33 | P a g e
COVID-19 Patient Management System Chapter 8- References

CHAPTER 8 – REFERENCES

8.1 Book References

• Database systems Models, Languages, Design and Application Programming,


Ramez Elmasri and Shamkant B. Navathe, 7th Edition, 2017, Pearson.
• An Introduction to Database Systems” by Bipin Desai.
• Database System Concepts” by Abraham Silberschatz and S Sudarshan.
• “ Database Management Systems” by Raghu Ramakrishnan.

8.2 Web References

• W3schools
• https://stackoverflow.com/questions
• www.mysqltutorial.org/mysql-storedprocedure.aspx
• www.wikipedia.com
• www.tutorialspoint.com
• www.javatpoint.com
• www.coursera.org

34 | P a g e

You might also like