Hms Report
Hms Report
SYNOPSIS
The Hospital Management System (HMS) project aims to enhance the efficiency
and effectiveness of hospital operations by integrating various functions into a
single, comprehensive software solution. This project addresses the critical need
for improved management practices in healthcare institutions, driven by increasing
patient volumes, complex administrative processes, and the demand for high-
quality care.
This report provides a detailed analysis of the HMS project, including the
objectives, system requirements, design, implementation, testing, and deployment.
The system architecture is developed with an emphasis on scalability, user-
friendliness, and robust security measures to protect sensitive patient data. The
implementation process is described with specific attention to the development
tools and technologies used.
INTRODUCTION
Overview:
In this report, we will present a detailed analysis of the requirements for the
Hospital Management System, followed by a description of the system design
and architecture. We will discuss the implementation process, including the tools
and technologies used, and the testing strategies employed to ensure the system's
reliability and performance. Additionally, we will explore the deployment
process, security considerations, and the maintenance and support plan for the
system. Through a case study, we will illustrate the real-world application and
Dept of BCA Page 2
The Hospital Management System
benefits of the HMS. Finally, we will conclude with a summary of the project's
achievements and potential future enhancements.
• Admin module
• User module
• Doctor module
1. Admin module:
Dashboard: In this section, admin can view the Patients, Doctors, Appointments
and New queries.
Doctors: In this section, admin can add doctor’s specialization and mange
doctors (Add/Update).
Users: In this section, admin can view users detail(who take online appointment)
and also have right to delete irrelevant user.
Patient Search: In this section, admin can search patient with the help of patient
name or mobile number.
Admin can also change his/her own password.
Dashboard: In this section, patients can view the his/her profile, Appointments
and
Appointment History: In this section, Patients can see his/her own appointment
history.
Prescription: In this section, Patients can see his/her own prescription history.
3. Doctor module:
Dashboard: In this section, doctor can view his/her own profile and online
appointments.
Search: In this section, doctor can search patient with the help of patient name
and mobile number.
SYSTEM ANALYSIS
Preliminary Investigation:
First in the system development process is preliminary Investigation.
Preliminary Investigation is conducted in the following phases.
• Project clarification
• Feasibility study
• Project appraisal
Project clarification is the process of selecting a project request for further study.
When a system development or modification request is made, the first systems
activity, the preliminary investigation, begins the activity has three parts: Request
clarification, feasibility study and project appraisal. Many requests from
employees and users in organization are not clearly stated.
Therefore before any systems investigation can be considered, the project request
must be examined to determine preciously what the originator wants. This is
called Request clarification.
As important outcome of the preliminary investigation is the determination that
the system request in feasible.
Feasibility Study:
The feasibility study is performed to determine whether the proposed system is
viable considering the Technical, Operational and Economical factors. After
going through feasibility study we can have a clear-cut view of the system’s
benefits and drawbacks.
Technical Feasibility:
The proposed system is developed using Active Server Page, VB Script and
Dept of BCA Page 6
The Hospital Management System
HTML as front-end tool and Oracle 8 as the back end. The proposed system
needs a Personal Web Server to serve the requests submitted by the users. The
Web browser is used to view the web page that is available within the Windows
operating system itself. The proposed system will run under Win9x, NT, and
win2000 environment. As Windows is very user friendly and GUI OS it is very
easy to use. All the required hardware and software are readily available in the
market. Hence the system is technically feasible.
Operational Feasibility:
The proposed system is operationally feasible because of the following reasons.
• The customer is benefited more as most of his time is saved. The customer
is serviced at his place of work.
• The cost of the proposed system is almost negligible when compared to the
benefits gained.
Economical Feasibility:
As the necessary hardware and software are available in the market at a low cost,
the initial investment is the only cost incurred and does not need any further
enhancements. Hence it is economically feasible.
The system is feasible in all respects and hence it encourages taking up the
system design.
Gathering Information:
The analysis through collection of data plays the wider role in the analysis of the
system. So the data is collected at different levels of management to keep track
of full information of the system.
The collection of data is done from
• Top Level Management
• Middle Level Management
• Low Level Management
Dept of BCA Page 7
The Hospital Management System
Interviews:
Interviews were conducted to collect the information. The interviews were
conducted at two levels.
• Formal Group Interviews: the interviews conducted for formal groups i.e.,
the hierarchical (official) groups in the firm.
• Informal Group Interviews: the interviews were conducted for informal
groups i.e., the groups formed out side the company.
Observation:
The data is also collected by observation of the firm. The data is collected by
observing on the site at different timings and at different situations like when the
firm is busy and when the firm hasn’t much work to do.
Record Review:
To collect the data and to get a clear idea of the firm some of the data is also
collected from the past records of the firm. This information helps very much to
get a clear idea of the firm i.e., the different problems occurred in different
seasons and some exception conditions. This very much gives a clear idea of
exceptional conditions.
• PHP
HTML:
The extended reach of information and services to customers that the Internet has
enabled, has created a new challenge for the developer. The developer should
develop a user interface that is distributable, available on multiple platforms and
supports a wide range of client environments from handheld wireless devices to
high-end workstations. So to maintain a broad reach to client environments and
to achieve greatest compatibility with all browsers, this system uses standard
HTML.
Hyper Text Markup Language is the standard language for creating documents
for the World Wide Web. An HTML document is a text file, which contains the
elements, in the form of tags that a web browser uses to display text, multimedia
objects, and hyperlinks using HTML; we can format a document for display and
add hyperlinks to other documents.The user interface has been designed in
HTML hence can be browsed in any web browser.
Cascading Style Sheets:
These have been used to separate data form presentation. By using these style
sheets throughout the project, a uniform look and feel can be maintained for all
the HTML elements and tags that have been used in the project. If there is any
revamp the way the content has been presented in the website, the changes can be
made to the appropriate style sheet, which will be reflected across all the style
Dept of BCA Page 9
The Hospital Management System
sheets.
JavaScript:
JavaScript Examples
The JavaScript example is the easiest to code. The reason being there are three
places where the code can be placed
Here are the three places where the JavaScript can be saved.
One is within the existing body tag, it can be saved in the head tag and last but
not the least it can be saved in the external JavaScript file.
The script tag present in the JavaScript file mentions that we are using the
JavaScript.
Next the text or the actual script used this is the content which will provide
information to the browser for the data. The document.Write() is the function
which is used in order to display the dynamic content using the JavaScript.
There are three main places where the JavaScript code can be embedded are
mentioned below:
Between the tag of the body of the text
Between the head tag
In the .js file
Dept of BCA Page 10
The Hospital Management System
XAMPP:
PHP:
What is PHP?
PHP is a server scripting language, and a powerful tool for making dynamic and
interactive Web pages.
Syntax :
<!DOCTYPE html>
<html>
<body>
<?php
echo "My first PHP script!";
?>
</body>
</html>
• PHP files can contain text, HTML, CSS, JavaScript, and PHP code
• PHP code are executed on the server, and the result is returned to the browser
as plain HTML
• PHP files have extension ".php"
With PHP you are not limited to output HTML. You can output images, PDF files,
and even Flash movies. You can also output any text, such as XHTML and XML.
Why PHP?
MYSQL:
MySQL is a popular database management system. It has a free and open source
version. With its rich features, it has been the choice for many database driven PHP
applications.
MySQL History
MySQL was founded by Michael Widenius and David Axmark in 1994. It was
then developed under the company MySQL AB where the company provided
both open source and commercial licenses. In January 2008, Sun Microsystems
acquired MySQL AB and in January 2010, Oracle acquired Sun Microsystems
making MySQL owned by Oracle.Since Oracle is primarily a proprietary
software company, concerns have been raised about the future of MySQL.
MySQL forks like MariaDB and alternatives like PostgreSQL have gained more
attention with these concerns. However still MySQL is used by many open
source software and large scale websites.
REQUIREMENTS
SOFTWARES REQUIREMENT:
HARDWARE REGUIREMENT:
SYSTEM DESIGN
System design is the process of planning a new system or to replace the existing
system. Simply, system design is like the blueprint for building, it specifies all
the features that are to be in the finished product.
System design phase follows system analysis phase. Design is concerned with
identifying functions, data streams among those functions, maintaining a record
of the design decisions and providing a blueprint the implementation phase.
Design is the bridge between system analysis and system implementation. Some
of the essential fundamental concepts involved in the design of application
software are:
• Abstraction
• Modularity
• Verification
Abstraction is used to construct solutions to problem without having to take
account of the intricate details of the various component sub problems.
Abstraction allows system designer to make step-wise refinement, which at each
stage of the design may hide, unnecessary details associated with representation
or implementation from the surrounding environment.
Reliability:
The software should behave strictly according to the original specification and
should function smoothly under normal conditions.
Extensibility:
The software should be capable of adapting easily to changes in the specification.
Reusability:
The software should be developed using a modular approach, which permits
modules to be reused by other application, if possible.
The System Design briefly describes the concept of system design and it contains
four sections. The first section briefly describes the features that the system is
going to provide to the user and the outputs that the proposed system is going to
offer.
The second section namely Logical Design describes the Data Flow Diagrams,
which show clearly the data movements, the processes and the data sources, and
sinks, E-R diagrams which represent the overall logical design of the database,
and high-level process structure of the system.
The process of design involves “conceiving and planning out in the mind” and
making a drawing pattern, or sketch of the system. In software design there are
two types of major activities, Conceptual Design and Detailed Design.
Conceptual or logical or external design of software involves conceiving,
planning out, and specifying the externally observable characteristics of a
Details or internal design involves conceiving, planning out, and specifying the
internal structure and processing details of the software product. The goal of
internal design is to specify internal structure, processing details, blueprint of
implementation, testing, and maintenance activities.
One of the important fundamental concepts of software design is modularity. A
modularity system consists interfaces among the units. Modularity enhances
design clarity, which in turn eases implementation, debugging, testing,
documentation, and maintenance of the software product.
The other fundamental concepts of software design include abstraction, structure,
information hiding, concurrency and verification. The use of structuring permits
decomposition of a large system into smaller, more manageable units with well-
defined relationships to the other units. The system design is verifiable if it can
be demonstrated that the design will result in an implementation that satisfies the
customer’s requirements.
Preliminary Design:
Preliminary design is basically concerned with deriving an overall picture of the
system. Deriving entire system into modules and sub-modules while keeping
Cohesion and Coupling factors in mind. Tools, which assist in preliminary design
process, are Data Flow Diagrams.
Code design:
The purpose of code is to facilitate the identification and retrieval for items of
information. A code is an ordered collection of symbols designed to provide
unique identification of an entity or attribute. To achieve unique identification
there must be only one place where the identified entity or the attribute can be
Dept of BCA Page 19
The Hospital Management System
entered in the code; conversely there must be a place in the code for everything
that is to be identified. This mutually exclusive feature must be built into any
coding system.
The codes for this system are designed with two features in mind. Optimum
human oriented use and machine efficiency. Length of the code range from
length of one to length of five characteristics:
• The code structure is unique; ensuring that only one value of the
code with a single meaning may be correctly applied to a given
entity or attributes.
• The code structure is expansible allowing for growth of its set of
entities and attributes.
• The code is concise and brief for recording, communication,
transmission and storage efficiencies.
• They have a uniform size and format.
• The codes are simple so that the user can easily understand it.
• The codes are also versatile i.e., it is easy to modify to reflect
necessary changes in condition, chart eristic and relationships of
the encode entities.
• The codes are also easily storable for producing reports in a
predetermined order of format.
• The codes are also stable and do not require being frequently
updated thereby promoting user efficiency.
• The codes are also meaningful.
• They are also operable i.e., they are adequate for present and
anticipate data processing both for machine and human use.
Input Design:
Input design is a part of overall system design, which requires very careful
attention. The main objectives of input design are:
• To produce a cost-effective method of input.
• To achieve the highest possible level of accuracy.
• To ensure that the input is acceptable to and understood by the
user staff.
Dept of BCA Page 20
The Hospital Management System
In this system input screens are designed very carefully so that no inaccurate
data will enter the database. The data is made as easy as possible. For
simplifying the data entry many facilities are given.
Each and every screen in this system is facilitated by many pushbuttons so that
the user can easily work with this system.
Output Design:
Outputs from computer systems are required primarily to communicate the
results of processing to users. They are also to provide a permanent hard copy
of these results for later consultation.
The various types of outputs are required by this system are given below:
▪ External outputs, whose destination is outside the concern and
which require special attention because they, project the image of
the concern.
▪ Internal outputs, whose destination is within the concern and
which require careful design because they are the user’s main
interface within the computer.
▪ Operation outputs, whose use is purely within the computer
department, E.g., program listings, usage statistics etc,
▪ Interactive outputs, which involves the user in communicating
directly with the computers.
PATEINT DOCTOR
ADMIN
MODULE MODULE
MODULE
Level – DFD:
PATIENT
HOME
PAGE
ADMIN
ABOUT
US
HMS
CONTACT
US
DOCTOR
UML Diagram
ADMIN LOGIN
VIEW DOCTORS
LIST
Admin Panel:
VIEW PATIENT
LIST
VIEW APPOINTMENT
DETAILS
VIEW PRESCRIPTION
LIST
MANAGE DOCTERS
Add/delete
VIEW
QUIRES/FEEDBACK
LOGOUT
LOGIN
Doctor panel:
VIEW
APPOINTMENT
LIST
VIEW
PRESCRIPTION
LIST
SEARCH
PATIENT(by ph.no)
LOGOUT
REGISTRATION
Patient panel:
LOGIN
BOOK
APPOINTMENT
VIEW
APPOINTMENT
HISTORY
VIEW
PRESCRIPTION
LIST
LOGOUT
E-R DIAGRAM
DATABASE DESIGN
Data Dictionary:
The efficiency of an application developed using RDBMS mainly depend upon
the database tables, the fields in each table and the way the tables are opened
using the contents in them to retrieve the necessary information. Hence a careful
selection of tables and their fields are imperative.
The database tables used in this system are created keeping the above points in
mind. The tables used are given below.
• Hospital Management System in php and mysql. This system has a ‘Home’
page from where the patient, doctor & administrator can login into their
accounts by toggling the tabs accordingly. Fig shows the ‘Home’ page of
our project.
• ‘About Us' page allows us to get some more information about the quality
and the services of the hospital.
Dept of BCA Page 30
The Hospital Management System
1. Patient Module
2. Doctor Module
3. Admin Module
Dept of BCA Page 31
The Hospital Management System
1.Patient Module:
This module allows patients to create their account, book an appointment to see a
doctor and see their appointment history. The registration page(in the home page
itself) asks patients to enter their First Name, Last Name, Email ID, Contact
Number, Password and radio buttons to select their gender.
2.Doctor Module:
The doctors can login into their account which can be done by toggling the tab
Dept of BCA Page 34
The Hospital Management System
from ‘Patient’ to ‘Doctor’. Fig shows the login form for a doctor. Registration of
a doctor account can be done only by admin. We will discuss more about this in
Admin Module.
3.Admin Module:
This module is the heart of our project where an admin can see the list of all
patients. Doctors and appointments and the feedback/queries received from the
‘Contact’ page. Also admin can add doctor too.
Login into admin account can be done by toggling into admin tab of the
Home page. Fig shows the login page for admin.
SOURCE CODE
• Registration form:
<html>
<head>
<title>HMS</title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" />
<link rel="stylesheet" type="text/css" href="style1.css">
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans&display=swap" rel="stylesheet">
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu"
crossorigin="anonymous"> -->
<style >
.form-control {
border-radius: 0.75rem;
}
</style>
<script>
var check = function() {
if (document.getElementById('password').value ==
document.getElementById('cpassword').value) {
document.getElementById('message').style.color = '#5dd05d';
document.getElementById('message').innerHTML = 'Matched';
} else {
document.getElementById('message').style.color = '#f55252';
document.getElementById('message').innerHTML = 'Not Matching';
}
}
function alphaOnly(event) {
var key = event.keyCode;
return ((key >= 65 && key <= 90) || key == 8 || key == 32);
};
function checklen()
{
var pass1 = document.getElementById("password");
if(pass1.value.length<6){
alert("Password must be at least 6 characters long. Try again!");
return false;
Dept of BCA Page 41
The Hospital Management System
}
}
</script>
</head>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="contact.html" style="color: white;font-family: 'IBM Plex Sans',
sans-serif;"><h6>CONTACT</h6></a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container register" style="font-family: 'IBM Plex Sans', sans-serif;">
<div class="row">
<div class="col-md-3 register-left" style="margin-top: 10%;right: 5%">
<img src="https://image.ibb.co/n7oTvU/logo_white.png" alt=""/>
<h3>Welcome!!</h3>
</div>
<div class="col-md-9 register-right" style="margin-top: 40px;left: 80px;">
<ul class="nav nav-tabs nav-justified" id="myTab" role="tablist" style="width: 40%;">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home"
aria-selected="true">Patient</a>
</li>
<li class="nav-item">
Dept of BCA Page 42
The Hospital Management System
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile"
aria-selected="false">Doctor</a>
</li>
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#admin" role="tab" aria-controls="admin"
aria-selected="false">Admin</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<h3 class="register-heading">Register as Patient</h3>
<form method="post" action="func2.php">
<div class="row register-form">
<div class="col-md-6">
<div class="form-group">
<input type="text" class="form-control" placeholder="First Name *" name="fname" onkeydown="return
alphaOnly(event);" required/>
</div>
<div class="form-group">
<input type="email" class="form-control" placeholder="Your Email *" name="email" />
</div>
<div class="form-group">
<input type="password" class="form-control" placeholder="Password *" id="password" name="password"
onkeyup='check();' required/>
</div>
<div class="form-group">
<div class="maxl">
<label class="radio inline">
<input type="radio" name="gender" value="Male" checked>
<span> Male </span>
</label>
<label class="radio inline">
<input type="radio" name="gender" value="Female">
<span>Female </span>
</la</div>
<a href="index1.php">Already have an account?</a>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="text" class="form-control" placeholder="Last Name *" name="lname" onkeydown="return
alphaOnly(event);" required/>
</div>
<div class="form-group">
<input type="tel" minlength="10" maxlength="10" name="contact" class="form-control"
placeholder="Your Phone *" />
</div>
<div class="form-group">
<input type="password" class="form-control" id="cpassword" placeholder="Confirm Password *"
name="cpassword" onkeyup='check();' required/><span id='message'></span>
</div>
<input type="submit" class="btnRegister" name="patsub1" onclick="return checklen();" value="Register"/>
Dept of BCA Page 43
The Hospital Management System
</div>
</div>
</form>
</div>
<div class="tab-pane fade show" id="profile" role="tabpanel" aria-labelledby="profile-tab">
<h3 class="register-heading">Login as Doctor</h3>
<form method="post" action="func1.php">
<div class="row register-form">
<div class="col-md-6">
<div class="form-group">
<input type="text" class="form-control" placeholder="User Name *" name="username3"
onkeydown="return alphaOnly(event);" required/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="password" class="form-control" placeholder="Password *" name="password3" required/>
</div>
<input type="submit" class="btnRegister" name="docsub1" value="Login"/>
</div>
</div>
</form>
</div>
<div class="tab-pane fade show" id="admin" role="tabpanel" aria-labelledby="profile-tab">
<h3 class="register-heading">Login as Admin</h3>
<form method="post" action="func3.php">
<div class="row register-form">
<div class="col-md-6">
<div class="form-group">
<input type="text" class="form-control" placeholder="User Name *" name="username1"
onkeydown="return alphaOnly(event);" required/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="password" class="form-control" placeholder="Password *" name="password2"
required/></div>
<input type="submit" class="btnRegister" name="adsub" value="Login"/>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384- "
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384- "
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-
" crossorigin="anonymous"></script>
Dept of BCA Page 44
The Hospital Management System
</html>
• Login Page:
<?php
include("header.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS --><link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<link rel="stylesheet" href="vendor/fontawesome/css/font-awesome.min.css">
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="style2.css">
</head>
<style type="text/css">
#inputbtn:hover{cursor:pointer;}
.card{
background: #f8f9fa;
border-top-left-radius: 5% 5%;
border-bottom-left-radius: 5% 5%;
border-top-right-radius: 5% 5%;
border-bottom-right-radius: 5% 5%;
}
</style>
<body style="background: -webkit-linear-gradient(left, #3931af, #00c6ff); background-size: cover;">
<nav class="navbar navbar-expand-lg navbar-dark fixed-top" id="mainNav" >
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="index.php" style="margin-top: 10px;margin-left:-65px;font-family: 'IBM Plex
Sans', sans-serif;"><h4><i class="fa fa-user-plus" aria-hidden="true"></i>  KR HOSPITAL</h4></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-
controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item" style="margin-right: 40px;">
<a class="nav-link js-scroll-trigger" href="index.php" style="color: white;font-family: 'IBM Plex Sans', sans-
serif;"><h6>HOME</h6></a>
</li>
<li class="nav-item" style="margin-right: 40px;">
<a class="nav-link js-scroll-trigger" href="services.html" style="color: white;font-family: 'IBM Plex Sans', sans-
serif;"><h6>ABOUT US</h6></a>
</li>
<li class="nav-item">
• Admin panel:
<!DOCTYPE html>
if(isset($_POST['app-submit']))
{
$pid = $_SESSION['pid'];
$username = $_SESSION['username'];
$email = $_SESSION['email'];
$fname = $_SESSION['fname'];
$lname = $_SESSION['lname'];
$gender = $_SESSION['gender'];
$contact = $_SESSION['contact'];
$doctor=$_POST['doctor'];
$email=$_SESSION['email'];
# $fees=$_POST['fees'];
$docFees=$_POST['docFees'];
$appdate=$_POST['appdate'];
$apptime=$_POST['apptime'];
$cur_date = date("Y-m-d");
date_default_timezone_set('Asia/Kolkata');
$cur_time = date("H:i:s");
$apptime1 = strtotime($apptime);
$appdate1 = strtotime($appdate);
if(date("Y-m-d",$appdate1)>=$cur_date){
if((date("Y-m-d",$appdate1)==$cur_date and date("H:i:s",$apptime1)>$cur_time) or date("Y-m-d",$appdate1)>$cur_date) {
$check_query = mysqli_query($con,"select apptime from appointmenttb where doctor='$doctor' and appdate='$appdate'
and apptime='$apptime'");
if(mysqli_num_rows($check_query)==0){
$query=mysqli_query($con,"insert into
appointmenttb(pid,fname,lname,gender,email,contact,doctor,docFees,appdate,apptime,userStatus,doctorStatus)
values($pid,'$fname','$lname','$gender','$email','$contact','$doctor','$docFees','$appdate','$apptime','1','1')");
if($query)
{
echo "<script>alert('Your appointment successfully booked');</script>";
}
else{
echo "<script>alert('Unable to process your request. Please try again!');</script>";
}
}
else{
echo "<script>alert('We are sorry to inform that the doctor is not available in this time or date. Please choose different time
or date!');</script>";
}
}
if(isset($_GET['cancel']))
{
$query=mysqli_query($con,"update appointmenttb set userStatus='0' where ID = '".$_GET['ID']."'");
if($query)
{
echo "<script>alert('Your appointment successfully cancelled');</script>";
}
}
function generate_bill(){
$con=mysqli_connect("localhost","root","","myhmsdb");
$pid = $_SESSION['pid'];
$output='';
$query=mysqli_query($con,"select
p.pid,p.ID,p.fname,p.lname,p.doctor,p.appdate,p.apptime,p.disease,p.allergy,p.prescription,a.docFees from prestb p inner join
appointmenttb a on p.ID=a.ID and p.pid = '$pid' and p.ID = '".$_GET['ID']."'");
while($row = mysqli_fetch_array($query)){
$output .= '
<label> Patient ID : </label>'.$row["pid"].'<br/><br/>
<label> Appointment ID : </label>'.$row["ID"].'<br/><br/>
<label> Patient Name : </label>'.$row["fname"].' '.$row["lname"].'<br/><br/>
<label> Doctor Name : </label>'.$row["doctor"].'<br/><br/>
<label> Appointment Date : </label>'.$row["appdate"].'<br/><br/>
<label> Appointment Time : </label>'.$row["apptime"].'<br/><br/>
<label> Disease : </label>'.$row["disease"].'<br/><br/>
<label> Allergies : </label>'.$row["allergy"].'<br/><br/>
<label> Prescription : </label>'.$row["prescription"].'<br/><br/>
<label> Fees Paid : </label>'.$row["docFees"].'<br/>';
}
return $output;
}
• Doctor Panel:
<!DOCTYPE html>
<?php
include('func1.php');
$con=mysqli_connect("localhost","root","","myhmsdb");
$doctor = $_SESSION['dname'];
if(isset($_GET['cancel']))
{
$query=mysqli_query($con,"update appointmenttb set doctorStatus='0' where ID =
'".$_GET['ID']."'");
if($query)
{
<style >
.btn-outline-light:hover{
color: #25bef7;
background-color: #f8f9fa;
border-color: #f8f9fa;
}
</style>
<style >
.bg-primary {
background: -webkit-linear-gradient(left, #3931af, #00c6ff);
}
.list-group-item.active {
z-index: 2;
color: #fff;
background-color: #342ac1;
border-color: #007bff;
}
.text-primary {
color: #342ac1!important;
}
</tr>
</thead>
<tbody>
<?php
$con=mysqli_connect("localhost","root","","myhmsdb");
global $con;
$dname = $_SESSION['dname'];
$query = "select
pid,ID,fname,lname,gender,email,contact,appdate,apptime,userStatus,doctorStatus from
$result = mysqli_query($con,$query);
if(!$result){
echo mysqli_error($con);
}
</body>
</html>
• Patient Panel:
<!DOCTYPE html>
<?php #include("func.php");?>
<html>
<head>
<title>Patient Details</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
crossorigin="anonymous">
</head>
<body>
<?php
include("newfunc.php");
if(isset($_POST['patient_search_submit']))
{
$contact=$_POST['patient_contact'];
$query = "select * from patreg where contact= '$contact'";
$result = mysqli_query($con,$query);
$row=mysqli_fetch_array($result);
if($row['lname']=="" & $row['email']=="" & $row['contact']=="" & $row['password']==""){
echo "<script> alert('No entries found! Please enter valid details');
window.location.href = 'admin-panel1.php#list-doc';</script>";
}
else {
echo "<div class='container-fluid' style='margin-top:50px;'>
<div class='card'>
<div class='card-body' style='background-color:#342ac1;color:#ffffff;'>
$fname = $row['fname'];
$lname = $row['lname'];
$email = $row['email'];
$contact = $row['contact'];
$password = $row['password'];
echo "<tr>
<td>$fname</td>
<td>$lname</td>
<td>$email</td>
<td>$contact</td>
<td>$password</td>
</tr>";
?>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-
KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-
b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"
integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
</body>
</html
SYSTEM TESTING
System testing is the stage before system implementation where the system is made
error free and all the needed modifications are made. The system was tested with
test data and necessary corrections to the system were carried out. All the reports
were checked by the user and approved. The system was very user friendly with
online help to assist the user wherever necessary.
Test Plan:
A test plan is a general document for the entire project, which defines the scope,
approach to be taken, and schedule of testing, as well as identifying the test item
for the entire testing process, and the personal responsible for the different
activities of testing. This document describes the plan for testing, the knowledge
management tool.
❑ Test units
❑ Features to be tested
❑ Test deliverables
❑ Schedule
❑ Personal allocation
Test units:
Test Case specification is major activity in the testing process. In this project, I
have performed two levels of testing.
❑ Unit testing
❑ System testing
▪ Exception handling
This was done at the developer’s site by a customer. The software is used in a
natural setting with the developer “looking over the shoulder” of the user and
recording errors and usage problems. Alpha tests are conducted in a controlled
environment.
Beta Testing:
This was conducted at one or more customer sites by the end-user of the software.
Unlike alpha testing, the developer is generally not present. Therefore, the beta
test is a “live” application of the software in an environment that cannot be
controlled by the developer. The customer records all problems that are
encountered during beta testing and reports these to the developer at regular
intervals. As a result of problems reported during beta tests, software engineers
make modifications and then prepare for release of the software product to the
entire customer base.
Test deliverables:
The following documents are required besides the test plan
▪ Error report
The test case specification for system testing has to be submitted for review before
During the software-testing phase each module of software is thoroughly tested for
bugs and for accuracy of output. The system developed is very user-friendly and
the detailed documentation is also given to the user as online help wherever
necessary. The implementation phase normally ends with the formal test involving
all the components.
The entire system was developed using the PHP, HTML, JavaScript, Personal Web
Server, and MYSQL as back end. The HTML is used to design the web page. The
Personal Web Server is used to understand the client’s request and to send response
to them. The JAVASCRIPT are used for client-side validations so that the user can
enter only appropriate input in the input fields. The MYSQL is the back end tool
where the database resides.
Hence the design of the entire system is user-friendly and simple the
implementation has been quite easy.
Dept of BCA Page 58
The Hospital Management System
FUTURE ENHANCEMENT
CONCLUSION
This project has given me an ample opportunity to design, code, and test and
implements an application. This has helped in putting into practice of various
Software Engineering principles and Database Management concepts like
maintaining integrity and consistency of data. Further, this has helped me to learn
more about MYSQL, PHP, HTML, JAVASCRIPT, Adobe Photoshop 7.0 and
Personal Web Server.
BIBLIOGRAPHY
Books
1. Kumar, S., & Gupta, P. (2013). Health Information Systems: Concepts and
Technology in Healthcare. I.K. International Publishing House.
2. Pandey, C. M., Singh, U., & Srivastava, R. K. (2015). Essentials of Medical
Informatics. Jaypee Brothers Medical Publishers.
Articles
1. Patel, V., Araya, R., Chatterjee, S., et al. (2007). "Treatment and prevention
of mental disorders in low-income and middle-income countries." The
Lancet, 370(9591), 991-1005.
Dept of BCA Page 61
The Hospital Management System
www.php.net
www.tutorialpoints.com
www.w3school.com
www.youtube.com
www.htmlseekers.net
www.webhacks.net