Hospital Management System - TutorialsDuniya
Hospital Management System - TutorialsDuniya
Hospital Management System - TutorialsDuniya
COM
Hospital Management
System
om
B.Sc(H) Computer Science
.c
i ya
un
D
ls
Submitted by-:
ia
ACKNOWLEDGEMENT
Apart from the efforts of team, the success of any project depends largely on the
om
encouragement and guidelines of many others. We take this opportunity to express
our gratitude to the people who have been instrumental in the successful
completion of this project.
The completion of any inter-disciplinary project depends upon cooperation, co-
ordination and combined efforts of several sources of knowledge.
.c
We are eternally grateful to our Dr. Sumit Agarwal for his even willingness to
give us valuable advice and direction under whom we executed this project. His
constant guidance and willingness to share his vast knowledge made us
ya
understand this project and its manifestations in great depths and helped us to
complete the assigned tasks.
We are highly thankful to our project internal guide Mrs. Disha, and Mr. Anand
i
whose invaluable guidance helped us understands the project better.
un
Although there may be many who remain unacknowledged in this humble note of
gratitude, there are none who remain unappreciated.
D
ls
Aashish (16035500000)
ia
CERTIFICATE
om
Ankur Tyagi, Deepanshu Khatri, Himanshu Kumar and Keshav
Singh, students of BSc(H) Computer Science IV Sem, Keshav
Mahavidyalaya, University of Delhi under the supervision of Dr.Sumit
Agarwal, Mr.Anand, Mrs.Disha.
.c
This report has not been submitted to any other organisation/institution
ya
for the award any other degree/diploma.
i
un
D
ls
ia
or
ABSTRACT
om
Our project Hospital Management system includes registration of patients, storing
their details into the system, and also booking their appointments with doctors .
Our software has the facility to give a unique id for every patient and stores the
.c
details of every patient and the staff automatically. User can search availability of
a doctor and the details of a patient using the id. The Hospital Management
ya
System can be entered using a username and password. It is accessible either by an
administrator or receptionist. Only they can add data into the database. The data
can be retrieved easily. The interface is very user-friendly. The data are well
protected for personal use and makes the data processing very fast.
i
un
It is having mainly two modules. One is at Administration Level and other one is
of user I.e. of patients and doctors. The Application maintains authentication in
D
one for the patient and other for the doctors which the admin can access. The
complaints which are given by user will be referred by authorities.
ia
The user modules include checking appointments, prescription. user can also
or
om
NAME PAGE NO
2. ARCHITECTURAL DESIGN 23
.c
3. LOGIN PAGE 25
4. REGISTRATION 26
ya
5. PATIENT 27
i
un
7. DOCTOR VIEW PATIENT 31
om
.c
NAME PAGE NO
ya
1.DATA DICTIONARY 6
1.SIZE ESTIMATION 13
i
un
2.GANTT CHART 21
3.RISK ANALYSIS 24
D
ls
ia
t or
Tu
Table of Content
om
1. CHAPTER 1 SRS (Software Requirement
.c
Specification)
1.1Introduction…………………………………… 1
ya
1.1.1Purpose……………………………………… 1
i
1.1.2DocumentConventions…………………… 2
un
1.1.3Intended Audience & Reading Suggestions… 2
1.1.4Project Scope…………………………… 2
D
1.2Overall Description………….…… 2
ls
1.2.1Product Perspective………………… 2
ia
1.2.2Product Features……………………………… 2
1.2.3User Classes & Characteristics……… 3
or
1.2.4Operating Environment…………………… 3
t
1.2.6User Documentation………………………… 4
1.2.7Assumption & Dependencies………… 4
1.3DFD……………………………………… 5
1.4DD…………………………………………… 6
1.5System Features…………………………………… 6
1.6External Interface Requirements…………………………. 9
om
1.6.1User Interface………………………………………… 9
1.6.2Hardware Interface………………………………… 9
1.6.3Software Interface………………………………. 9
.c
1.6.4Communications Interface……………………….…. 10
ya
1.7Other Non-functional Requirements….…………………. 10
1.7.1Performance Requirements………………………………… 10
i
1.7.2Safety Requirements….………………………………… 10
un
1.7.3 Software Quality Attributes ……………………………. ….. 10
2.1Size Estimation…………………………………… 12
or
2.2Cost Estimation………………………………… 16
2.3.Gantt Chart………………………………..……… 20
t
Tu
CHAPTER 5 Implementation 25
om
5.1MODULE SCREENS…………………… 25
.c
ya
5.2Java File Code……………………………… 33
CHAPTER 6 Testing
i
un
D
6.1 Black Box Testing………….……….........…… 39
6.2 White Box Testing……………..…………........... 46
ls
ia
7.1Introduction…………………………………………..... 48
7.2Getting Started………………………………………......... 48
t
Tu
7.3Troubleshooting………………………………………..... 48
8. Conclusion & References…………………………….…….. 49
CHAPTER-1
om
Introduction-:
Purpose
.c
This software will help the company to be more efficient in registration of their patients and
manage appointments, records of patients. It enables doctors and admin to view and modify
ya
appointments schedules if required. The purpose of this project is to computerize all details
regarding patient details and hospital details.
Document Conventions
i
un
This document features some terminology which readers may be unfamiliar with
Front End: This stands for the JSP pages that a user will see when (s) he will access the
application through the web.
ls
DESC : Description
RAT : Rational
t
Tu
DEP : Dependency
The intended readers of this document are current and future developers working on
“HOTEL MANAGEMENT PROJECT” and the sponsors of the project.
Product Scope
om
The system will be used as the application that serves hospitals, clinic, dispensaries or other health
institutions. The intentions of the system is to increase the number of patients that can be treated and
managed properly.
If the hospital management system is file based, management of the hospital has to put much effort
.c
on securing the files. They can be easily damaged by fire, insects and natural disasters. Also could
be misplaced by losing data and information.
ya
Product Perspective
This Hospital Patient Info Management System is a self-contained system that manages activities of
the hospital.
i
un
Due to improperly managed details medical center faces quite a lot of difficulties in accessing past
data as well as managing present data. The fully functional automated hospital management system
which will be developed through this project will eliminate the disadvantages caused by the manual
system by improving the reliability, efficiency and performance. The usage of a database to store
D
patient, employee, stock details etc. will accommodate easy access, retrieval, search and
manipulation of data. The access limitations provided through access privilege levels will enhance
the security of the system. The system will facilitate concurrent access and convenient management
ls
Confirmation by doctor
Tu
Admin
om
Admin has the full access to the system which means he is able to manage any activity with regard
to the system. He is the highest privileged user who can access to the system.
Key functions:
•Access and modify patient record
•Add new doctor entry in system database
.c
Patient
ya
Patients can choose the best preferred appointments from the options provided and can also change
the appointment schedule or cancel it. Patients have access to only their records.
Key functions:
Fix appointment
i
un
Update schedule
Cancel appointment
Doctor
D
Doctors can view the patient appointment list and provide the confirmation or make changes in the
appointment list if required. Doctors have access to only records of those patients whom they are
ls
treating.
Key functions:
ia
Confirmation of appointment
Modification of appointment list
or
Operating Environment
t
Tu
Software requirements
Windows 7 or above operating system
JRE 1.8
MySQL server
Hardware Requirements
Core i5 processor
2GB Ram
om
1TB hard disk space in Server Machine
.c
System is wirelessly networked with an encryption
ya
Database is password protected.
i
un
Only administrator can access the whole system.
User Documentation
D
As a part of the system itself a user documentation is provided to the customers which gives an
overview of the system. It will include the full description about the product and complete orderly
followed steps to install the software. The users will get the opportunity to use the system without
ls
having any trouble. The user manual will include the email addresses to contact us in need. Tasks
are listed alphabetically or logically grouped often using cross referenced indexes which helps the
users to know exactly what sort of information they are looking for.
ia
Data flow diagrams (also called data flow graphs) are commonly used during problem analysis.
Data flow diagrams (DFDs) are quite general and are not limited to problem analysis for software
requirements specification. They were in use long before the software engineering discipline began.
DFDs are very useful in understanding a system and can be effectively used during analysis. A DFD
om
shows the flow of data through a system. It views a system as a function that transforms the inputs
into desired outputs. Any complex system will not perform this transformation in a "single step,"
and a data will typically undergo a series of transformations before it becomes the output. The DFD
aims to capture the transformations that take place within a system to the input data so that
eventually the output data is produced. The agent that performs the transformation of data from one
state to another is called a process (or a bubble). So, a DFD shows the movement of data through
.c
the different transformations or processes in the system. The processes are shown by named circles
and data flows are represented by named arrows entering or leaving the bubbles. A rectangle
represents a source or sink and is a net originator or consumer of data. It should be pointed out that a
ya
DFD is not a flowchart. A DFD represents the flow of data, while a flowchart shows the flow of
control. A DFD does not represent procedural informatio n.
i
un
D
ls
ia
t or
Tu
Data Dictionary
Data dictionary is a collection of data that are used as a part of the system.
It is a record of data about data.
om
Patient table
Fields Data type Size Constraints Description
UID int 2 primary key this is patient Id
name varchar 20 - Name of patient
mobile varchar 10 - mobile no of
.c
patient
sex varchar 1 - sex of patient
email varchar 20 - email of patient
disease varchar 20 - disease from
ya
which he/she is
suffering
i
un
Doctor Table
Fields Data type Size Contraints Description
DId int 2 primary key it is doctor id
Name varchar 20 - name of doctor
mobile varchar 10 - mobile no of
D
doctor
speciality varchar 10 - speciality of
doctor
ls
System Features
PATIENT
om
REGISTRATION
DESCRIPTION- The new patient can register themselves and add their details like name, age sex
etc. The patient entry will be made in the patient database.
.c
PRE -CONDITION – The patient must be a new patient.
ya
2. A registration form get displayed
3.Patient fills the required details.
EXTENTSIONS- if necessary fields left by user then prompt user to fill the necessary fields.
i
un
POST CONDITIONS- Patient record is added to patient database.
UPDATION
D
DESCRIPTION-The patient should be enabled to update his/her details and the changes should
reflect in patient database.
ls
APPOINTMENT
DESCRIPTION- It shows users a list of available doctors, timings, dates and enables patients to
select the most suitable appointment date and doctor. The patient may also the cancel the
appointment if already available.
om
POST CONDITIONS- patient details are displayed and a new appointment is fix or a existing
appointment is cancelled. The patient database is updated
.c
DOCTOR
ya
DESCRIPTION- The doctor view patient record/ update his details and add description of the
treatment given to patient.
i
un
MAIN FLOW OF EVENTS – 1.Doctor logs in to the system.
2. Doctor may select view patient.
2.1 patient record is displayed with treatment history.
D
3 Doctor add description of patient treatment.
4.Doctor update his/her details.
ls
EXTENSIONS- System does not allow the doctor to modify the qualification, hospital managed
details.
ia
ADMIN
t
Tu
DESCRIPTION- The admin add doctor, view patient record and appointments
om
.c
i ya
un
D
ls
ia
t or
Tu
This section provides a detailed description of all inputs into and outputs from the system. It also
gives a description of the hardware, software and communication interfaces and provides basic
om
prototypes of the user interface.
The protocol used shall be HTTP.
The Port number used will be 80.
.c
ya
Hardware Interfaces
Laptop/Desktop PC
Purpose of this is to give information when Patients ask information about doctors, medicine
i
available lab tests etc. To perform such Action it need very efficient computer otherwise due to that
un
reason patients have to wait for a long time to get what they ask for.
Wi-Fi router
Wi-Fi router is used to for internetwork operations inside of a
ls
Software Interfaces
or
JDK 1.8 - Java is fast, secure, and reliable. From laptops to data centers, game consoles to
scientific supercomputers, cell phones to the Internet,
Netbeans 8.1 - IDE for Java developing.
t
10
Communications Interfaces
om
TCP/IP protocol- Internet service provider to access and share information over the Internet
Ethernet Communications Interface- Ethernet is a frame-based computer network technology
for local area networks (LANs)
Ubiquitous, easy to set up and easy to use. Low cost and high data transmission rates
.c
ya
Other Nonfunctional Requirements
Performance Requirements
i
un
Response time-The system will give responses within 1 second after checking the patient
information and other information.
Safety Requirements
ia
If there is extensive damage to a wide portion of the database due to catastrophic failure, such as a
disk crash, the recovery method restores a past copy of the database that was backed upto archival
or
storage and reconstructs a more current state by reapplying or redoing the operations of committed
transactions from the backed up log, up to the time of failure. All the administrative and data entry
operators have unique logins so system can understand who is login in to system right now no
intruders allowed except system administrative nobody cannot change record and valuable data.
t
Tu
11
MAINTAINABILITY: The ability to maintain ,modify information and update fix problems of the
system
USABILITY: software can be used again and again without distortion.
ACCESSIBILITY: Administrator and many other users can access the system but the access level is
controlled for each user according to their work scope.
ACCURACY: The reliability on the information/output. Can depend/be sure of the outcome.
STABILITY:The system outcome/output won’t change time to time. Same output
Will be given always for a given input.
om
Security Requirements
.c
1.Want take the responsibility of failures due to hardware malfunctioning.
2.Warranty period of maintaining the software would be one year.
3.Additional payments will be analysed and charged for further maintenance
ya
4.If any error occur due to a user’s improper use. Warranty will not be allocated to it.
5.No money back returns for the software.
i
un
D
ls
ia
t or
Tu
12
CHAPTER-2
om
SIZE ESTIMATION
.c
Function-Based Metrics
The function point (FP) metric can be used effectively as a means for measuring the functionality
delivered by a system.4 Using historical data, the FP metric can then be used to (1) estimate the cost
ya
or effort required to design, code, and test the software; (2) predict the number of errors that will be
encountered during testing; and (3) forecast the number of components and/or the number of
projected source lines in the implemented system. Function points are derived using an empirical
relationship based on countable (direct) measures of software’s information domain and qualitative
assessments of software complexity. Information domain values are defined in the following
manner:
i
un
Number of external inputs (EIs). Each external input originates from a user or is transmitted from
another application and provides distinct application-oriented data or control information. Inputs are
often used to update internal logical files (ILFs). Inputs should be distinguished from
inquiries,which are counted separately.
Number of external outputs (EOs). Each external output is derived data within the application that
D
provides information to the user. In this context external output refers to reports, screens, error
messages, etc. Individual data items within a report are not counted separately.
Number of external inquiries (EQs). An external inquiry is defined as an online input that results
ls
in the generation of some immediate software response in the form of an online output (often
retrieved from an ILF).
Number of internal logical files (ILFs). Each internal logical file is a logical grouping of data that
resides within the application’s boundary and is maintained via external inputs.
ia
Number of external interface files (EIFs). Each external interface file is a logical grouping of data
that resides external to the application but provides information that may be of use to the
application.
or
Once these data have been collected, the table in Figure 23.1 is completed and a complexity
value is associated with each count. Organizations that use function point
methods develop criteria for determining whether a particular entry is simple, average,
or complex. Nonetheless, the determination of complexity is somewhat subjective.
t
13
om
.c
ya
SIZE ESTIMATION FOR THIS PROJECT
i
un
D
ls
EXTERNAL INPUTS
ia
1 LOGIN MODULE
or
2.REGISTRATION MODULE
Tu
2.1 NAME
2.2 DOB
2.3 SEX DATA ELEMENTS FILE TYPE REFERNCED COMPLEXITY
2.4 EMAIL 7 2 AVG
2.5 BLOOD TYPE
2.6 MOBILE NO
2.7 ADDRESS
14
3.APPOINTMENT
om
4.ADD DESCRIPTION
.c
5.ADD DOCTOR
ya
5.1 NAME
5.2 AGE DATA ELEMENTS FILE TYPE REFERENCED COMPLEXITY
5.3 SEX 6 2 AVG
5.4 DOB
5.5 DATE OF JOIN
i
un
5.6 QUALIFICATION
7 = AVG COMPLEXITY
ls
3=HIGH COMPLEXITY
ia
2=LOW COMPLEXITY
5=AVG COMPLEXITY
t or
Tu
15
EXTERNAL OUTPUTS
PATIENT
1.1 MY DETAILS
om
1.2 VIEW BOOKING
DOCTOR
2.1 APPOINTENT DETAILS
2.2 VIEW PATIENT
.c
ADMIN
3.1 VIEW DOCTOR
3.2 VIEW PATIENT
ya
3.3 VIEW APPOINTMENTS
i
TOTAL EXTERNAL OUTPUTS = 7
un
LOGICAL INTERNAL FILES
D
1. PATIENT FILE
2. DOCTOR FILE
ls
3. ADMIN FILE
4. LOGIN FILE
ia
EXTERNAL INQUIRIES
PAITENT- CHECK APPOINTMENT DETAILS
ADMIN- APPOINTMENT FOR CURRENT DATE
16
UFP=144
om
Considering all adjustment factors have average influence
CAF =0.65+0.01*14*3
CAF=1.07
.c
FP= 144*1.07
FP=154.08=155
ya
SO FUNCTION POINT COUNT=155
i
un
D
ls
ia
t or
Tu
17
Cost Estimation
The COCOMO II Model
om
In his classic book on “software engineering economics,” Barry Boehm [Boe81] introduced a
hierarchy of software estimation models bearing the name COCOMO, for Constructive Cost Model.
The original COCOMO model became one of the most widely used and discussed software cost
estimation models in the industry. It has evolved into a more comprehensive estimation model,
called COCOMOII [Boe00]. Like its predecessor, COCOMO II is actually a hierarchy of estimation
models that address the following areas:
.c
• Application composition model. Used during the early stages of software engineering, when
prototyping of user interfaces, consideration of software and system interaction, assessment of
performance, and evaluation of technology maturity are paramount.
• Early design stage model. Used once requirements have been stabilized and basic software
ya
architecture has been established.
• Post-architecture-stage model. Used during the construction of the software.
Like all estimation models for software, the COCOMO II models require sizing
i
information. Three different sizing options are available as part of the model
un
hierarchy: object points, function points, and lines of source code.
D
ls
The COCOMO II application composition model uses object points and is illustrated in the
ia
following paragraphs. It should be noted that other, more sophisticated estimation models (using FP
and KLOC) are also available as part of COCOMO II.Like function points, the object point is an
indirect software measure that is computed using counts of the number of (1) screens (at the user
or
interface), (2) reports, and (3) components likely to be required to build the application. Each object
instance (e.g., a screen or report) is classified into one of three complexity levels
(i.e.,simple,medium, or difficult) using criteria suggested by Boehm [Boe96]. In essence,complexity
is a function of the number and source of the client and server data tables that are required to
t
generate the screen or report and the number of views or sections presented as part of the screen or
report.
Tu
Once complexity is determined, the number of screens, reports, and components are weighted
according to the table illustrated in Figure . The object point count is then determined by
multiplying the original number of object instances by the weighting factor in the figure and
summing to obtain a total object point count. When component-based development or general
software reuse is to be applied, the percent of reuse (%reuse) is estimated and the object point count
is adjusted:
18
om
for different levels of developer experience and development environment maturity.Once the
productivity rate has been determined, an estimate of project effort is computed using
.c
In more advanced COCOMO II models,12 a variety of scale factors, cost drivers, and adjustment
procedures are required.
ya
PRODUCTIVITY RATE FOR OBJECT POINT COUNTS
i
un
D
ls
ia
SCREENS
1 LOGIN TYPE
2. LOGIN
t
3. REGISTRATION
Tu
4. MY DETAILS
5. UPDATE DETAILS
6.APPOINTMENT DETAILS
7. BOOK APPIOINTMENT
8. VIEW BOOKINGS
9. CANCEL BOOKING
10.APPOINTMENT FOR DOCTOR
11. VIEW PATIENT
19
om
TOTAL SCREENS= 18
REPORTS
1. REGISTERED SUCCESSFULLY
2. DETAILS SUCCCESSFULLY UPDATED
.c
3. APPOINTMENT SUCCESSFULLY MADE
4. BOOKING SUCCESSFULLY CANCELLED
5. DOCTOR ENTRY MADE
ya
TOTAL REPORTS=5
3 GL MODULES
i
un
1. NETBEANS
TOTAL 3GL MODULES =1
PRODUCTIVITY=13
EFFORT= NOP/PRODUCTIVITY
t
EFFORT= 49.7/13
Tu
EFFORT=3.8
EFFORT= 4 PERSON/MONTH
20
SCHEDULING
om
Scheduling of a software project does not differ greatly from scheduling of any multitask
engineering effort. Therefore, generalized project scheduling tools and techniques
can be applied with little modification for software projects.
Program evaluation and review technique (PERT) and the critical path method (CPM)
.c
are two project scheduling methods that can be applied to software development. Both
techniques are driven by information already developed in earlier project planning
activities: estimates of effort, a decomposition of the product function, the selection of
ya
the appropriate process model and task set, and decomposition of the tasks that are
selected.
Interdependencies among tasks may be defined using a task network. Tasks,
sometimes called the project work breakdown structure (WBS), are defined for the
i
product as a whole or for individual functions.
un
Both PERT and CPM provide quantitative tools that allow us to (1) determine the
critical path—the chain of tasks that determines the duration of the project, (2) establish
“most likely” time estimates for individual tasks by applying statistical models, and
(3) calculate “boundary times” that define a time “window” for a particular task.
D
ls
Gantt Chart
ia
When creating a software project schedule, you begin with a set of tasks (the work
breakdown structure). If automated tools are used, the work breakdown is input as
a task network or task outline. Effort, duration, and start date are then input for each
task. In addition, tasks may be assigned to specific individuals.
or
project schedule that emphasizes the concept scoping task for a word-processing
(WP) software product. All project tasks (for concept scoping) are listed in the lefthand
column. The horizontal bars indicate the duration of each task. When multiple
bars occur at the same time on the calendar, task concurrency is implied. The diamonds
indicate milestones.
An example of a gantt chart is:
21
3. Scheduling
3.1Schedule table
om
Meet with concerned members Week 1
Identify needs and project constraints Week 1
Establish problem statement Week 2
Milestone Week 2
.c
2. REQUIREMENT ANALYSIS
Detailed discussion of the project Week 3
Creating Data flow Diagram Week 4
ya
Data Dictionary Week 5
Milestone Week 5
3. PROJECT MANAGEMENT
Computing F.P. and Effort
iWeek 5
un
Schedule table Week 6
Risk table Week 7
Timeline Chart Week 8
Milestone Week 8
D
4. DESIGN ENGINEERING
ls
Milestone Week 10
5. TESTING Week 12
t or
Tu
22
om
.c
i ya
un
D
ls
ia
t or
Tu
23
CHAPTER-3
Architectural design
om
Requirements of the software should be transformed into an architecture that describes the
software's top-level structure and identifies its components. This is accomplished through
architectural design (also called system design), which acts as a preliminary 'blueprint'
from which software can be developed. IEEE defines architectural design as 'the process
of defining a collection of hardware and software components and their interfaces to
.c
establish the framework for the development of a computer system.' This framework is
established by examining the software requirements document and designing a model for
providing implementation details. These details are used to specify the components of the
ya
system along with their inputs, outputs, functions, and the interaction between them. An
architectural design performs the following functions.
It defines an abstraction level at which the designers can specify the functional and
performance behaviour of the system.
i
un
2. It acts as a guideline for enhancing the system (when ever required) by describing those
features of the system that can be modified easily without affecting the system integrity.
3. It evaluates all top-level designs.
4. It develops and documents top-level design for the external and internal interfaces.
D
integration.
ia
Though the architectural design is the responsibility of developers, some other people like
user representatives, systems engineers, hardware engineers, and operations personnel are
also involved. All these stakeholders must also be consulted while reviewing the
or
24
om
0
.c
i ya
Patient
Doctor Admin
un
D
doctor Patient
Appoint Add
t
ment Descrip.
Tu
update
detail
25
CHAPTER-4
RISK ANALYSIS
om
S.NO RISK CATEGORY PROBABI IMPACT(I) EXPOSUR RMMM
LITY(P) E PLAN
E=P*I
1 SOME TEAM TECHNICAL 20% 2 0.4 USE BACKUP
MEMBERS LEAVE RISK STAFFS WHO
.c
THE PROJECT IN KNOWS WHAT
BETWEEN WAS GOING ON
PROJECT
2 DELIEVERY PROJECT 30% 1 0.3 TEAM MAY USE
ya
DEADLINE RISK EXTRA MEMBERS
TIGHTENED TO DO JOB ON
SCHEDULED
TIME
3 LOSING OF ALL PROJECT 20% 2 O.2 CARRY OUT
PROJECT DATA RISK
i BACKUP OF
un
THIS MAY ESSENTIAL
HAPPEN DUE TO DATABASES,SOU
RCE CODE ETC.
HARD DISK
FAILURE
4 TEAM PROJECT 10% 3 0.3 WE MAKE SOME
D
26
CHAPTER-5
IMPLEMENTATION
om
Module screens
LOGIN PAGE
.c
i ya
un
D
ls
ia
t or
Tu
27
REGISTRATION PAGE
om
.c
i ya
un
D
ls
ia
t or
Tu
28
PATIENT PAGE
My Details
om
.c
i ya
un
D
ls
ia
t or
Tu
29
Update Details
om
.c
i ya
un
D
ls
ia
t or
Tu
30
Appointment
om
.c
i ya
un
D
ls
ia
t or
Tu
31
DOCTOR APPOINTMENT
om
.c
i ya
un
D
ls
ia
t or
Tu
32
om
.c
i ya
un
D
ls
ia
t or
Tu
33
om
DOCTOR ADD DESCRIPTION
.c
i ya
un
D
ls
ia
t or
Tu
34
Java Coding
Login
om
try{
String Username=jTextField1.getText();
String pass= new String(jPasswordField2.getPassword());
Class.forName("java.sql.Driver");
.c
Connection
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/Airline","root","");
Statement stmt= conn.createStatement();
ya
String query= "Select * from user where UserName='"+Username+"';";
ResultSet rs= stmt.executeQuery(query);
rs.next();
String User= rs.getString("UserName");
String P= rs.getString("Password");
i
String type= rs.getString("UserType");
un
if(pass.equals(P)){
jFrame2.setVisible(true);
this.setVisible(false);
}
else{
D
JOptionPane.showMessageDialog(null, "Enter Correct Values....");
}
rs.close();
ls
stmt.close();
conn.close();
}
ia
}
Tu
Registration
35
om
sex= jTextField3.getText();
email=jTextField4.getText();
mobileno=jTextField5.getText();
address= jTextArea1.getText();
Class.forName("java.sql.Driver");
Connection
.c
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/hospital","root","");
Statement stmt= conn.createStatement();
String query= "Insert into patient
values('"+name+"','"+dob+"','"+sex+"','"+email+"','"+mobileno+"','"+address+"');";
ya
stmt.executeUpdate(query);
stmt.close();
conn.close();
JOptionPane.showMessageDialog(null, "Patient Record has been Saved....");
jTextField1.setText("");
i
un
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
jTextArea1.setText("");
D
}
catch (Exception e){
JOptionPane.showMessageDialog(null, "Unable to Save.... "+e);
ls
}
ia
My Details
or
try
{
class.forname("java.sql.Driver");
t
Tu
String query= "update tablename set email = '"tf2.getText() + "dmobile = '" + mobiletf.getText()+",
Address = '"+Addtf.getText()+"' where name = "+nametf.getText()+";";
stmt.executeupdate(query);
36
catch (exception e)
{
om
Joptionpane.showmessageDialog(null, "error in updation!");
}
.c
Update details
ya
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
class GenerateId{
int randomId=0;
Random rand=new Random();
for(int j=0;j<10;j++){
randomId=rand.nextLong();
i
un
}
return randomId;
}
try{
Class.forName("java.sql.Driver");
D
Connection
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/Airline","root","");
Statement stmt= conn.createStatement();
ls
int randomId;
id= Integer.parseInt(jTextField7.getText());
String query= "Select * from patient where id="+randomId+";";
ResultSet rs;
ia
rs= stmt.executeQuery(query);
String name, email, mobileno, address;
rs.first();
or
name= rs.getString("Name");
email= rs.getString("email");
mobileno= rs.getString("mobileno");
address= rs.getString("Address");
t
jTextField2.setText(name);
Tu
jTextField4.setText(email);
jTextField3.setText(mobileno);
jTextField5.setText(address);
rs.close();
stmt.close();
conn.close();
}
catch (Exception e){
37
om
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
.c
Appointment
ya
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
jFrame2.setVisible(true);
i
un
private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {
}
System.exit(0);
}
ia
}
or
for(int j=0;j<10;j++){
Tu
randomId=rand.nextLong();
}
return randomId;
}
try{
int randomId;
String name, fname, phone, address;
id= Integer.parseInt(jTextField3.getText());
name= jTextField4.getText();
38
fname= jTextField5.getText();
phone= jTextField6.getText();
address= jTextArea1.getText();
Class.forName("java.sql.Driver");
Connection
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/Airline","root","");
Statement stmt= conn.createStatement();
String query= "Insert into Appointment
om
values("+randomId+",'"+cateogry+"','"+date+"','"+time+"');";
stmt.executeUpdate(query);
stmt.close();
conn.close();
JOptionPane.showMessageDialog(null, "Appointment has been done....");
.c
jTextField1.setText("");
jTextField4.setText("");
jTextField3.setText("");
ya
}
catch (Exception e){
JOptionPane.showMessageDialog(null, "Unable to Save.... "+e);
}
}
i
un
}
randomId=rand.nextLong();
}
return randomId;
try{
ia
Class.forName("java.sql.Driver");
Connection
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/Airline","root","");
or
ResultSet rs;
rs= stmt.executeQuery(query);
Tu
String cateogry,date,time;
rs.first();
cateogry=rs.getString("cateogry");
date= rs.getString("date");
time= rs.getString("time");
jTextField1.setText(id);
jTextField4.setText(date);
39
jTextField3.setText(time);
jComboBox1.setSelected(cateogry);
rs.close();
stmt.close();
conn.close();
}
catch (Exception e){
JOptionPane.showMessageDialog(null, "Unable to Search patient.... "+e);
om
}
.c
// TODO add your handling code here:
class GenerateId{
int randomId=0;
Random rand=new Random();
ya
for(int j=0;j<10;j++){
randomId=rand.nextLong();
}
return randomId;
try{
Class.forName("java.sql.Driver");
i
un
Connection conn=DriverManager.getConnection
("jdbc:mysql://localhost:3306/Hospital","root","");
Statement stmt= conn.createStatement();
int id;
id= Integer.parseInt(jTextField7.getText());
D
String query= "Select * from Appointment where ID="+randomId+";";
ResultSet rs;
rs= stmt.executeQuery(query);
ls
rs.close();
stmt.close();
conn.close();
}
ia
}
t
Tu
40
CHAPTER-6
om
TESTING
.c
WHITE BOX TESTING
ya
White-box testing, sometimes called glass-box testing, is a test-case design philosophy
that uses the control structure described as part of component-level design to
derive test cases. Using white-box testing methods, you can derive test cases that
(1) guarantee that all independent paths within a module have been exercised at
i
least once, (2) exercise all logical decisions on their true and false sides, (3) execute
un
all loops at their boundaries and within their operational bounds, and (4) exercise
internal data structures to ensure their validity.
The white box testing has another branch called basis path testing.
D
Basis path testing is a white-box testing technique first proposed by Tom McCabe
[McC76]. The basis path method enables the test-case designer to derive a logical
complexity measure of a procedural design and use this measure as a guide for defining
or
a basis set of execution paths. Test cases derived to exercise the basis set are guaranteed
to execute every statement in the program at least one time during testing.
Before we consider the basis path method, a simple notation for the representation
of control flow, called a flow graph (or program graph) must be introduced
41
om
.c
Fig.a
ya
To illustrate the use of a flow graph, consider the procedural design representation in
Above figure a. Here, a flowchart is used to depict program control structure. Figure b
maps the flowchart into a corresponding flow graph (assuming that no compound
conditions are contained in the decision diamonds of the flowchart). Referring to
Figure b, each circle, called a flow graph node, represents one or more procedural
i
statements. A sequence of process boxes and a decision diamond can map into a single
un
node. The arrows on the flow graph, called edges or links, represent flow of control
and are analogous to flowchart arrows. An edge must terminate at a node, even
if the node does not represent any procedural statements (e.g., see the flow graph
symbol for the if-then-else construct). Areas bounded by edges and nodes are called
regions. When counting regions, we include the area outside the graph as a region.4
D
ls
ia
t or
Tu
42
om
.c
ya
Fig b
i
un
D
ls
ia
or
Fig c
t
Tu
43
When compound conditions are encountered in a procedural design, the generation of a flow graph
becomes slightly more complicated. A compound condition occurs when one or more Boolean
operators (logical OR, AND, NAND, NOR) is present in a conditional statement. Referring to
Figure c, the program design language (PDL) segment translates into the flow graph shown. Note
that a separate node is created for each of the conditions a and b in the statement IF a OR b. Each
node that contains a condition is called a predicate node and is characterized by two or more
om
edges emanating from it.
.c
example, a set of independent paths for the flow graph illustrated in Figure 18.2b is
Path 1: 1-11
Path 2: 1-2-3-4-5-10-1-11
Path 3: 1-2-3-6-8-9-10-1-11
ya
Path 4: 1-2-3-6-7-9-10-1-11
Note that each new path introduces a new edge. The path
1-2-3-4-5-10-1-2-3-6-8-9-10-1-11
is not considered to be an independent path because it is simply a combination of already specified
paths and does not traverse any new edges.
i
un
Paths 1 through 4 constitute a basis set for the flow graph in Figure 18.2b. That is, if you can design
tests to force execution of these paths (a basis set), every statement in the program will have been
guaranteed to be executed at least one time and every condition will have been executed on its true
and false sides. It should be noted that the basis set is not unique. In fact, a number of different basis
sets can be derived for a given procedural design.
How do you know how many paths to look for? The computation of cyclomatic complexity
D
provides the answer. Cyclomatic complexity is a software metric that provides a quantitative
measure of the logical complexity of a program. When used in the context of the basis path testing
method, the value computed for cyclomatic complexity defines the number of independent paths in
ls
the basis set of a program and provides you with an upper bound for the number of tests that must
be conducted to ensure that all statements have been executed at least once. Cyclomatic complexity
has a foundation in graph theory and provides you with anextremely useful software metric.
ia
where E is the number of flow graph edges and N is the number of flow
graph nodes.
t
44
om
of independent paths that form the basis set and, by implication, an upper bound
on the number of tests that must be designed and executed to guarantee coverage
of all program statements.
.c
i ya
un
D
ls
ia
t or
Tu
45
2. try{
3. class.forname("java.sql.Driver);
om
4. Connection con= DriverManager.getConnection("jdbc:mysql://localhost/test","root","xyz");
.c
7. Result set rs= stmt.executeQuery(query);
8. while(rs.next()){
ya
9. string uid=rs.getstring("uid ");
11.
i
string address= rs.getstring("Address");
un
12. string mobile= rs.getstring("Mobile");
17, }
18. rs.close();
or
19. stmt.close();
20. con.close();
t
21, }
Tu
22. catch(Exception()) {
46
om
3
.c
5
ya
7
8
9
i
un
10
11
12
D
13
14
ls
15
16
ia
17
or
18
19
t
Tu
20
25 24 23 22 21
47
2)CYCLOMATIC COMPLEXITY
CYCLOMATIC COMPLEXITY=E-N+2
om
E=NO. OF EDGES IN PROGRAM FLOW GRAPH
N=NO.OF NODES IN PROGRAM FLOW GRAPH
HERE E=27
N=25
.c
SO CYCLOMATIC COMPLEXITY=4
ya
3)INDEPENDENT PATHS
PATH A: 1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-17-18-19-20-25
i
PATH B: 1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-17-8-18-19-20-25
un
PATH C: 1-2-3-4-5-6-7-8-18-19-20-25
PATH D: 1-2-22-23-24-25
D
BLACKBOX TESTING
ls
Black-box testing, also called behavioral testing, focuses on the functional requirements
of the software. That is, black-box testing techniques enable you to derive sets
of input conditions that will fully exercise all functional requirements for a program.
ia
Black-box testing attempts to find errors in the following categories: (1) incorrect
or missing functions, (2) interface errors, (3) errors in data structures or external
database access, (4) behavior or performance errors, and (5) initialization and
termination errors.
t
Unlike white-box testing, which is performed early in the testing process, blackbox
testing tends to be applied during later stages of testing . Because
Tu
48
By applying black-box techniques, you derive a set of test cases that satisfy the following criteria
[Mye79]: (1) test cases that reduce, by a count that is greater than one, the number of additional test
cases that must be designed to achieve reasonable testing, and (2) test cases that tell you something
about the presence or absence of classes of errors, rather than an error associated only with the
specific test at hand.
om
2) Orthogonal Array Analysis
3) Graph-Based Testing methods
4) Equivalence Class Testing
.c
EQUIVALENCE CLASS TESTING
ya
Equivalence class testing is a black-box testing method that divides the input domain
of a program into classes of data from which test cases can be derived. An ideal test
case single-handedly uncovers a class of errors (e.g., incorrect processing of all
character data) that might otherwise require many test cases to be executed before
the general error is observed.
i
un
Test-case design for equivalence partitioning is based on an evaluation of
equivalence classes for an input condition.if a set of objects can be linked by relationships that are
symmetric,transitive, and reflexive, an equivalence class is present [Bei95]. An equivalence
class represents a set of valid or invalid states for input conditions. Typically, an input
condition is either a specific numeric value, a range of values, a set of related values,
D
VALID-I1={ pid}
INVALID-I2={pid<0}
t
Tu
01={uid,name,email,sex,age,address,mobile}
02={Error in connectivity}
49
Chapter – 7
User Mannual
om
1.0 Introduction
The “HOSPITAL MANAGEMENT SYSTEM” application allows users a simple interface to access their
account from a mobile device to view their details and appointments.
Like the doctors can check for their appointments and prescribe a given drug to a patient.
The patients can also book their appointment with Doctors This document will provide instructions for
.c
using the application .
ya
2.0 Getting Started
Install the HOSPITAL MANAGEMENT SYSTEM” application . The application is compatible
with
i
un
Windows 7 or above operating system
.
2.x Quick Start : USER
STEP 1 : Tap the “Login” icon in your device menu. The Sign up screen will be brought up.
STEP 2 : First time users need to sign up by providing their information ( name , contact number
D
doctor
STEP 5 : In case of query or complaint use “SUBMIT REQUEST” and “REGISTER
COMPLAINT” options provided on the same page.
or
2. x System Requirements
Windows 7 or above operating system
Internet connection for first time login.
t
Tu
Troubleshooting
Missing or Incorrect Password or E-Mail
A message will be displayed in the event incorrect login information is entered. Try again with proper
credentials to access
50
Chapter -8
Conclusion
om
The entire project has been developed and deployed as per the requirements stated by
the user. It is found to be bug free as per the testing standards that are implemented.
.c
The whole system’s activities are divided into two major parts like
User and admin. For implementing the system Android studio is used.
ya
The system comprise of following features:
Display bus number
Calculation of fare
Record requests from the user
i
un
Record Complaints of the user
The estimated cost of the project is (efforts) 4 and the estimated size of the project
is (FP) 153.
D
There are also few features which can be integrated with this system
ls
Finally, we like to conclude that we put all our efforts throughout the development of
our project and tried to fulfill most of the requirements of the user.
t
REFERENCES
Tu
1.IEEE Software Engineering Standards Committee, “IEEE Std 830-1998, IEEE Recommended Practice for
Software Requirements Specifications”, October 20, 1998.
[IEEE] The applicable IEEE standards are published in “IEEE Standards Collection,” 2001 edition.
51
3.The principle source of text book material is “A Concise Introduction to Software Engineering” by Pankaj
Jalote.
om
.c
i ya
un
D
ls
ia
t or
Tu
52