Hospital management system

150
Medi-Tracker CONTENTS Abstract 2 1. Introduction 4 1.1. Purpose of the project 5 1.2. Problem in existing system 5 1.3. Solution of these problems 6 1.4. Scope of the project 6 2. System Requirements 7 2.1. S/w Requirements 8 2.2. H/w Requirement s 8 3. Project Analysis 9 3.1UML Diagram Representation 10 3.2. E-R Diagrams 26 3.3. Data Dictionary 27 4. Literature Survey 28 4.1. About Java 29 4.2. About JSP 30 4.3. About Oracle 31 5. System Design 32 DEPT OF CSE, GPREC, KNL Page 1

description

hospital

Transcript of Hospital management system

Page 1: Hospital management system

Medi-Tracker

CONTENTS Abstract 2

1. Introduction 41.1. Purpose of the project

51.2. Problem in existing system 5

1.3. Solution of these problems61.4. Scope of the project 6

2. System Requirements 72.1. S/w Requirements 82.2. H/w Requirement s 8

3. Project Analysis 93.1UML Diagram Representation

103.2. E-R Diagrams 263.3. Data Dictionary 27

4. Literature Survey 284.1. About Java

294.2. About JSP 304.3. About Oracle 31

5. System Design 32 5.1. Introduction 33

5.2. Types of Design 335.3. Normalization Design 345.4. Database Design 34

6. Source Code 36

7. System Testing 787.1. Testing Fundamentals

797.2. White box Testing 797.3. Black Box Testing 79 7.4. Testing Strategies. 80

8. Data Entry Screens 83

9. Conclusion 106

DEPT OF CSE, GPREC, KNL Page 1

Page 2: Hospital management system

Medi-Tracker

10. Future Enhancements 108

11. Bibliography 110

ABSTRACT

DEPT OF CSE, GPREC, KNL Page 2

Page 3: Hospital management system

Medi-Tracker

ABSTRACT:

Every hospital needs an online system whereby it can accommodate the patients comfortably and avoid any confusion to the doctors regarding their work. There should be a system where the patients are categorized under insurance policy and non policy holders and the system helps the hospital management to claim the bills from concerned insurance companies. All these needs and much more are fulfilled in MediTracker.

MediTracker is useful to record patient’s details along with the compliant. It also records the inpatient details and outpatient details and arranges the appointment of doctors. MediTracker also provides the management reports like schedules, appointments of doctors, inpatients, insurances and discharges. And also used to generate bills dynamically for the discharged patients etc.

The administrative user can create new users and change their passwords. He can add the doctor’s information as well as new doctor’s details. He can add information related to inpatients, outpatients, rooms availability, billing and insurance information. The administrator can view the management reports.

The doctors can change their own passwords. He can view his own appointments and information of inpatients and outpatients for any day.

Manager is another person who manages the activities in the hospital. He can add a new doctor to the list. He can also add new room information. He can view the information of doctors, rooms and patients.

An accountant can add the information related to patient insurances and view all the reports. He can view the details of inpatients, outpatients and discharged patient’s information. He also collects the bill amount from the patient and enters it into the system. MediTracker thus ensures smooth operation of the hospital management tasks as well as offering facility to the patients.

DEPT OF CSE, GPREC, KNL Page 3

Page 4: Hospital management system

Medi-Tracker

INTRODUCTION

DEPT OF CSE, GPREC, KNL Page 4

Page 5: Hospital management system

Medi-Tracker

1. INTRODUCTION:

1.1. Purpose of the project:

MediTracker is an online software application which fulfills the requirement of a typical management of details of doctors, inpatients, outpatients and rooms in a Hospital. It provides the interface to users in a graphical way to manage the daily transactions as well as historical data. Also provides the management reports like schedules, appointments of doctors and inpatients, insurances and discharges etc.

The aim of this application is to reduce the manual effort needed to manage transactions and historical data used in a hospital. Also this application provides an interface to users to view the details like the schedules, appointments of doctors and discharge of inpatients etc.

Current system is a manual one in which users are maintaining ledgers, books etc to store the information like Inpatient’s details, outpatient’s details, appointments of doctors etc.. It is very difficult to maintain historical data.

This project is developed using Java Programming Language under Windows.

1.2. Problems in existing system:

Current system is a manual one in which users are maintaining books to store the information like Patients details, Doctors details, Available rooms and insurance facilities, as well as employee details. It is very difficult to maintain historical data. Also regular investments need to purchase stationary every year.

Disadvantages: The following are the disadvantages of current system.

1. It is difficult to maintain important information in books. 2. More manual hours need to generate required reports3. It is tedious to manage historical data which needs much space to keep all the

previous year’s ledgers, books etc4. Daily admissions of patients are to be entering into different books immediately

to avoid conflicts which are very difficult.

1.3. Solutions for these problems:

DEPT OF CSE, GPREC, KNL Page 5

Page 6: Hospital management system

Medi-Tracker

Proposed system is a software application which avoids more manual hours that need to spend in record keeping and generating reports. This application keeps the data in a centralized way which is available to all the users simultaneously. It is very easy to manage historical data in database. No specific training is required for the employees to use this application. They can easily use the tool that decreases manual hours spending for normal things and hence increases the performance. As the data is centralized it is very easy to fix an appointment of doctor with a patient immediately.

Advantages:

The following are the advantages of proposed system:1. Easy to manage all the daily admissions of patients and appointments of doctors.2. Can generate required reports easily3. Easy to manage historical data in a secure manner4. Centralized database helps in avoiding conflicts5. Easy to use GUI that does not requires specific training.

1.4. Scope of the project:

Project Scope "The work that needs to be accomplished to deliver a product,

service, or result with the specified features and functions." Product Scope "The features

and functions that characterize a product, service, or result.”

This system can be used as an application for the hospitals with a Full-featured

Web-based medical billing and hospital management software for solo or group practice.

DEPT OF CSE, GPREC, KNL Page 6

Page 7: Hospital management system

Medi-Tracker

SYSTEM REQUIREMENTS

DEPT OF CSE, GPREC, KNL Page 7

Page 8: Hospital management system

Medi-Tracker

2. SYSTEM REQUIREMENTS:

2.1 Software Requirements:

Database : ORACLE 10G

Server : Apache Tomcat 4.1

Front end : JSP/ Servlets, J2SDK1.4, HTML, JAVA SCRIPT

2.2. Hard ware Specification:

Processor : Intel P-IV based system

Processor Speed : 2.0. GHz

RAM : 256 MB to 512 MB

Hard Disk : 40GB to 80GB

Key Board : 104 keys

DEPT OF CSE, GPREC, KNL Page 8

Page 9: Hospital management system

Medi-Tracker

PROJECTANALYSIS

DEPT OF CSE, GPREC, KNL Page 9

Page 10: Hospital management system

Medi-Tracker

3. PROJECT ANALYSIS:

3.1. UML Diagrams:

Unified Modeling Language (UML) is a standardized general-purpose modeling

language in the field of software engineering. The standard is managed, and was created

by, the Object Management Group.

UML includes a set of graphic notation techniques to create visual models of software-

intensive systems:

The UML is a language foR

Visualizing

Specifying

Constructing

Documenting

These are the artifacts of a software-intensive system.

A conceptual model of UML:

The three major elements of UML are

The UML’s basic building blocks

The rules that dictate how those building blocks may be put together.

DEPT OF CSE, GPREC, KNL Page 10

Page 11: Hospital management system

Medi-Tracker

Use-case diagram for Administrator:

DEPT OF CSE, GPREC, KNL Page 11

Page 12: Hospital management system

Medi-Tracker

Use-case diagram for Doctors:

DEPT OF CSE, GPREC, KNL Page 12

Page 13: Hospital management system

Medi-Tracker

Use-case diagram for manager:

DEPT OF CSE, GPREC, KNL Page 13

Page 14: Hospital management system

Medi-Tracker

DEPT OF CSE, GPREC, KNL Page 14

Page 15: Hospital management system

Medi-Tracker

Use-case diagram for Accountant:

Class Diagram:

DEPT OF CSE, GPREC, KNL Page 15

Page 16: Hospital management system

Medi-Tracker

DEPT OF CSE, GPREC, KNL Page 16

Page 17: Hospital management system

Medi-Tracker

Sequence Diagram of Administrator:

DEPT OF CSE, GPREC, KNL Page 17

Page 18: Hospital management system

Medi-Tracker

Sequence Diagram of Doctor:

DEPT OF CSE, GPREC, KNL Page 18

Page 19: Hospital management system

Medi-Tracker

Sequence Diagram of Manager:

DEPT OF CSE, GPREC, KNL Page 19

Page 20: Hospital management system

Medi-Tracker

Sequence Diagram of Account:

DEPT OF CSE, GPREC, KNL Page 20

Page 21: Hospital management system

Medi-Tracker

Activity diagram for Administrator:

DEPT OF CSE, GPREC, KNL Page 21

Page 22: Hospital management system

Medi-Tracker

Activity diagram for Doctor:

DEPT OF CSE, GPREC, KNL Page 22

Page 23: Hospital management system

Medi-Tracker

Activity diagram for manager:

DEPT OF CSE, GPREC, KNL Page 23

Page 24: Hospital management system

Medi-Tracker

Activity diagram for Accountant:

DEPT OF CSE, GPREC, KNL Page 24

Page 25: Hospital management system

Medi-Tracker

Component Diagram:

DEPT OF CSE, GPREC, KNL Page 25

Page 26: Hospital management system

Medi-Tracker

Deployment Diagram

DEPT OF CSE, GPREC, KNL Page 26

Page 27: Hospital management system

Medi-Tracker

3.2. E-R DIAGRAMS:

In software engineering, an entity-relationship model (ERM) is an abstract and

conceptual representation of data. Entity-relationship modeling is a database

modeling method, used to produce a type of conceptual schema or semantic data

model of a system, often a relational database, and its requirements in a top-

down fashion. Diagrams created by this process are called entity-relationship

diagrams, ER diagrams, or ERDs.

DEPT OF CSE, GPREC, KNL Page 27

Page 28: Hospital management system

Medi-Tracker

3.3. DATA DICTIONARY:

The logical characteristics of current systems data stores, including name,

description, aliases, contents, and organization. Identifies processes where the data are

used and where immediate access to information needed. Serves as the basis for

identifying database requirements during system design.

Uses of Data Dictionary:

To manage the detail in large systems

To communicate a common meaning for all system elements

To Document the features of the system

To facilitate analysis of the details in order to evaluate characteristics and

determine where system changes should be made.

DEPT OF CSE, GPREC, KNL Page 28

Page 29: Hospital management system

Medi-Tracker

LITERATURESURVEY

DEPT OF CSE, GPREC, KNL Page 29

Page 30: Hospital management system

Medi-Tracker

4. Literature Survey:

4.1 About Java:

The Internet helped catapult Java to the forefront of programming, and Java, in

turn, has had a profound effect on the Internet. The reason for this is quite simple: Java

expands the universe of objects that can move about freely in the cyberspace. In a

network, two very broad categories of objects are transmitted between the server and our

computer passive information and dynamic, active programs.

As desirable as dynamic, networked programs are, they also present serious

problems in the areas of security and portability. Java achieves this security or protection

by confining a Java program to the Java execution environment and not allowing it to

access to other parts of the computer. Many types of the computers and operating systems

are in use throughout the world and many are connected to the Internet. For programs to

be dynamically downloaded to all the various types of platforms connected to the

Internet, some means of generating portable executable code is needed.

Java was designed to be easy for the professional programmers to learn and use

efficiently. The object model of Java is simple and easy to extend, while simple types,

such as integers are kept as high-performance non-objects.

BSNL System is implemented using the Java language so as to make the

programmers and different users at different levels can make use of this system very

affectively.

The multi-platformed environment of the web places extraordinarily demands on

a program, because the program must execute reliably in a variety of systems. Thus, the

ability to create robust programs was given a high priority in the design of Java. At the

same time, Java frees us from having to worry about many of the most common cause of

programming errors. Because Java is strictly typed language, it checks our code at the

compile time and also at run-time.

Java was designed to meet the real world requirements of creating

interactive ,Networked programs. Java supports multithreaded programming, which

allows us to write programs that do many things simultaneously. A central issue for the

DEPT OF CSE, GPREC, KNL Page 30

Page 31: Hospital management system

Medi-Tracker

Java designers was that of code longevity and portability. Their goal was “write once; run

anywhere, anytime , forever “.

Java enables the creation of the cross-platform programs by compiling into

intermediate representation called Javabytecode. This code can be interpreted on any

system that provides a java virtual machine. Java is designed for the distributed

environment of the Internet, because it handles TCP/IP protocols. In fact, accessing a

resource using a URL is not much different from accessing a file. The original version of

Java (OAK) included features for intra-address-space messaging. Java programs carry

with them substantial amounts of the run-time type information that is used to verify and

resolve accesses to objects at run-time. This makes it possible to dynamically link code in

a safe and expedient manner.

4.2 INTRODUCTION TO JDBC

JDBC (Java Database connectivity) is a front-end tool for connecting to a server to

ODBC in that respect, however JDBC can connect only java client and it uses ODBC for

the connectivity. JDBC is essentially a low-level API since any data manipulation,

storage and retrieval has to be done by the program itself. Some tools, which provide a

higher-level abstraction, are expected shortly.

The next question that needs to be answered is why we need JDBC, once we have

ODBC on hand. We can use the same ODBC to connect the entire database and ODBC is

a proven technology.

Problem for doing this is ODBC gives a ‘c’ language API, which uses pointers

extensively. Since java does not have any pointes and is object-oriented sun

Microsystems, inventor of java developed to suit its needs.

Requirements to use JDBC:

To use JDBC you need a basic knowledge of databases and SQL.A part from this

you need the jdk1.1 (Java Development Kit1.1 available javasoft’s website) or a version

of Java since jdk1.1 and above come bundled with JDBC software.

DEPT OF CSE, GPREC, KNL Page 31

Page 32: Hospital management system

Medi-Tracker

After that you need to have a back-end database engine for which a JDBC driver is

available. When JDBC drivers are not available JDBC-ODBC bridge drivers are used to

access the database through ODBC. Back-end is not needed when JDBC driver is capable

of storing and retrieving the data itself, or if JDBC-ODBC Bridge and the ODBC driver

can be used to store and retrieve the information.

4.3. About ORACLE:

The Oracle Database (commonly referred to as Oracle RDBMS or simply

as Oracle) is a relational database management system (RDBMS) produced and marketed

by Oracle Corporation. As of 2010, Oracle has been a major presence

in database computing for many years.

Larry Ellison and his friends and former co-workers Bob Miner and Ed

Oates started the consultancy Software Development Laboratories (SDL) in 1977. SDL

developed the original version of the Oracle software. The name Oracle comes from the

code-name of a CIA-funded project Ellison had worked on while previously employed

by Ampex

Users of the Oracle databases refer to the server-side memory-structure as the

SGA (System Global Area). The SGA typically holds cache information such as data-

buffers, SQL commands, and user information. In addition to storage, the database

consists of online redo logs (or logs), which hold transactional history. Processes can in

turn archive the online redo logs into archive logs (offline redo logs), which provide the

basis (if necessary) for data recovery and for some forms of data replication.

If the Oracle database administrator has implemented Oracle RAC (Real

Application Clusters), then multiple instances, usually on different servers, attach to a

central storage array. This scenario offers advantages such as better performance,

scalability and redundancy. The Oracle DBMS can store and execute stored

procedures and functions within itself. PL/SQL (Oracle Corporation's proprietary

procedural extension to SQL), or the object-oriented language Java can invoke such code

objects and/or provide the programming structures for writing them

DEPT OF CSE, GPREC, KNL Page 32

Page 33: Hospital management system

Medi-Tracker

SYSTEM DESIGN

DEPT OF CSE, GPREC, KNL Page 33

Page 34: Hospital management system

Medi-Tracker

5. System Design:

5.1. Introduction: 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. There is some overlap with the disciplines of systems analysis, systems architecture and systems engineering.

If the broader topic of product development "blends the perspective of marketing,

design, and manufacturing into a single approach to product development, then design is the act of taking the marketing information and creating the design of the product to be manufactured. Systems design is therefore the process of defining and developing  systems  to satisfy specified requirements of the user. Until the 1990s systems design had a crucial and respected role in the data processing industry. In the 1990s  standardization  of hardware and software resulted in the ability to build modular systems. The increasing importance of software running on generic platforms has enhanced the discipline of software engineering.

5.2. Types of Design:

Logical Design:

The logical design of a system pertains to an abstract representation of the data flows, inputs and outputs of the system. This is often conducted via modeling, which involves a simplistic (and sometimes graphical) representation of an actual system. In the context of systems design, modeling can undertake the following forms, including:

Data Flow Diagrams

Entity Life Histories

Entity Relationship Diagrams

Physical Design:

The physical design relates to the actual input and output processes of the system.

This is laid down in terms of how data is input into a system, how it is

verified/authenticated, how it is processed, and how it is displayed as output.

Physical design, in this context, does not refer to the tangible physical design of

an information system. To use an analogy, a personal computer's physical design

involves input via a keyboard, processing within the CPU, and output via a monitor,

DEPT OF CSE, GPREC, KNL Page 34

Page 35: Hospital management system

Medi-Tracker

printer, etc. It would not concern the actual layout of the tangible hardware, which for a

PC would be a monitor, CPU, motherboard, hard drive, modems, video/graphics cards,

USB slots, etc.

5.3. Normalization Design:

In the field of relational database design, normalization is a systematic way of

ensuring that a database structure is suitable for general-purpose querying and free of

certain undesirable characteristics—insertion, update, and deletion anomalies—that could

lead to a loss of data integrity.

Edgar F. Codd, the inventor of the relational model, introduced the concept of

normalization and what we now know as the First Normal Form (1NF) in 1970. Codd

went on to define the Second Normal Form (2NF) and Third Normal Form (3NF) in

1971, and Codd and Raymond F. Boyce defined the Boyce-Codd Normal Form (BCNF)

in 1974. Higher normal forms were defined by other theorists in subsequent years, the

most recent being the Sixth normal form (6NF) introduced by Chris Date, Hugh Darwen,

and Nikos Lorentzos in 2002.

Informally, a relational database table (the computerized representation of

a relation) is often described as "normalized" if it is in the Third Normal Form. Most 3NF

tables are free of insertion, update, and deletion anomalies, i.e. in most cases 3NF tables

adhere to BCNF, 4NF, and 5NF (but typically not 6NF).

A standard piece of database design guidance is that the designer should create a

fully normalized design; selective denormalization can subsequently be performed

for performance reasons. However, some modeling disciplines, such as the dimensional

modeling approach todata warehouse design, explicitly recommend non-normalized

designs, i.e. designs that in large part do not adhere to 3NF

5.4. Database Design:

Database design is the process of producing a detailed data model of a database.

This logical data model contains all the needed logical and physical design choices and

physical storage parameters needed to generate a design in a Data Definition Language,

which can then be used to create a database. A fully attributed data model contains

detailed attributes for each entity.

The term database design can be used to describe many different parts of the

design of an overall database system. Principally, and most correctly, it can be thought of

DEPT OF CSE, GPREC, KNL Page 35

Page 36: Hospital management system

Medi-Tracker

as the logical design of the base data structures used to store the data. In the relational

model these are the tables and views. In an object database the entities and relationships

map directly to object classes and named relationships. However, the term database

design could also be used to apply to the overall process of designing, not just the base

data structures, but also the forms and queries used as part of the overall database

application within the database management system (DBMS).

The process of doing database design generally consists of a number of steps which

will be carried out by the database designer. Usually, the designer must:

Determine the relationships between the different data elements.

Superimpose a logical structure upon the data on the basis of these relationships.

DEPT OF CSE, GPREC, KNL Page 36

Page 37: Hospital management system

Medi-Tracker

SOURCE CODE

DEPT OF CSE, GPREC, KNL Page 37

Page 38: Hospital management system

Medi-Tracker

6. Source Code:

Login.jsp:

<HTML>

<%@ page language="java" %><%@ page session="true" %><%@ page import="java.util.*" %><head><SCRIPT LANGUAGE="JavaScript"><!--history.go(+1);

//--></SCRIPT>

<LINK href="styles.css" type="text/css" rel="stylesheet">

</head><BODY CLASS=SC onload="document.LOGIN.uid.focus();"><center><BR><BR><FONT FACE="Century Gothic">

<!--Declaration of varaibles-->

<%! String errormsg ;%><%! String disluserid ;%><%! String dislpwd ;%>

<% /*Retreiving user id and password*/ disluserid = request.getParameter("uid"); if(disluserid == null) disluserid = ""; dislpwd = request.getParameter("pwd"); if(dislpwd == null) dislpwd = "";%>

DEPT OF CSE, GPREC, KNL Page 38

Page 39: Hospital management system

Medi-Tracker

<!--Retrieve the error from request and display on screen-->

<% errormsg = request.getParameter("error") ; //System.out.println("errormsg = "+errormsg); if (errormsg == null) { //System.out.println("Error messages was null so clearing it.."); errormsg = " "; } if(errormsg.equals("blankfields")) { %> <FONT COLOR="Red"> Both the fields are Mandatory.Please fill up both fields.<BR><BR> <% } if(errormsg.equals("invalid")) { %> <FONT COLOR="Red"> Invalid Username and/or Password. Please re-enter. <BR><BR> <% } %>

<%-- ***** LOGIN SCREEN ***** --%><FORM NAME="LOGIN" ACTION="Validate.jsp" METHOD="POST" ><FONT COLOR="black">Enter your UserID and password to login<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;Userid &nbsp:&nbsp;<input TYPE=text id = "usr" name=uid size="8" maxlength="8"> <BR><BR>Password : <input TYPE=password name=pwd size="8" maxlength="8"<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<BR><INPUT TYPE=submit name=submit value="Sign-in"><INPUT TYPE=reset name=resett value="Reset" >

</center>

</FORM></BODY></HTML>

ViewPatients.jsp

DEPT OF CSE, GPREC, KNL Page 39

Page 40: Hospital management system

Medi-Tracker

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD>

<LINK href="styles.css" type="text/css" rel="stylesheet">

<title>Patients List</title><SCRIPT LANGUAGE="JavaScript"><!--history.go(+1);

//--></SCRIPT></HEAD><jsp:include page="MultiLevelmenu.htm"/><br><br><br>

<body class="SC"><%

Integer IAuth =(Integer)session.getAttribute("auth");int auth= IAuth.intValue();System.out.println("===Authentication=="+auth);

if(auth<0){%><H3 align=center><IMG SRC="images/error.gif" WIDTH="17"

HEIGHT="13" BORDER=0 ALT="">You are not authorized to access this page</H3><%}else{%><P align=right><a class=title onclick="javascipt:window.print()" onmouseover="this.style.cursor='hand'" ><img src="images/printer1.jpg" width="37" height="38" border=0 alt=""></a></P><h2 align=Center>Patients List</h2><form name=cons><table width="20%" align=Left>

<%/*Declaration of variables*/

Connection con=null;Statement stmt=null;

DEPT OF CSE, GPREC, KNL Page 40

Page 41: Hospital management system

Medi-Tracker

ResultSet rs=null;

String orderby="NameOfPatient";String NameOfPatient,Age,Sex,Occupation,ContactNumbers,Natureofillness;String AdmissionAs,MediAssist,GaurdianName,RelationWithPatient,ReferedByDoctor;Date DateOfAdmission;int PatientID,RoomID;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "NameOfPatient":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/

con=(Connection)session.getAttribute("connection");stmt = con.createStatement();String Query = "SELECT * FROM PatientsMaster order by "+orderby;

System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

//System.out.println("Exception"+e);%><%=e%><%

}

%>

<%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table width="60%" align=right><tr class=row_title>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=NameOfPatient">NameOfPatient</a></th>

DEPT OF CSE, GPREC, KNL Page 41

Page 42: Hospital management system

Medi-Tracker

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=PatientID">PatientID</a></th> <th class=row_title><a class=title href="ViewPatients.jsp?orderby=Age">Age</a></th> <th class=row_title><a class=title href="ViewPatients.jsp?orderby=Sex">Sex</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=Occupation">Occupation</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=ContactNumbers">ContactNumbers</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=Natureofillness">Natureofillness</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=DateOfAdmission">DateOfAdmission</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=AdmissionAs">AdmissionAs</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=Insurance">Insurance</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=GaurdianName">GaurdianName</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=RelationWithPatient">RelationWithPatient</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=ReferedByDoctor">ReferedByDoctor</a></th>

<th class=row_title><a class=title href="ViewPatients.jsp?orderby=RoomID">RoomID</a></th><%int DisRow=0;

/*Getting the values from the database*/

while(rs.next()){ NameOfPatient=rs.getString(1); PatientID=rs.getInt(2); Age=rs.getString(3);

Sex=rs.getString(4); Occupation=rs.getString(5);

ContactNumbers=rs.getString(6); Natureofillness=rs.getString(7); DateOfAdmission=rs.getDate(8); AdmissionAs=rs.getString(9); MediAssist=rs.getString(10); GaurdianName=rs.getString(11);

RelationWithPatient=rs.getString(12); ReferedByDoctor=rs.getString(13); RoomID=rs.getInt(14);

DEPT OF CSE, GPREC, KNL Page 42

Page 43: Hospital management system

Medi-Tracker

DisRow++;%><tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>>

<td align=center><%= NameOfPatient%></td><td align=center><%= PatientID%></td><td align=center><%= Age%></td><td align=center><%= Sex%></td><td align=center><%= Occupation%></td><td align=center><%= ContactNumbers%></td><td align=center><%= Natureofillness%></td><td align=center><%= DateOfAdmission%></td><td align=center><%= AdmissionAs%></td><td align=center><%= MediAssist%></td><td align=center><%= GaurdianName%></td><td align=center><%= RelationWithPatient%></td><td align=center><%= ReferedByDoctor%></td><td align=center><%= RoomID%></td>

<%}

rs.close();

if(DisRow==0){

/*To write to the server if the resultset is null*/%>

<CENTER><tr><th colspan=6>No Records found</th></tr>

</CENTER><%

}

}%>

</table></form></BODY></HTML><% } %>

ViewInsurance

DEPT OF CSE, GPREC, KNL Page 43

Page 44: Hospital management system

Medi-Tracker

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD>

<LINK href="styles.css" type="text/css" rel="stylesheet">

<title>Insurance Details</title><SCRIPT LANGUAGE="JavaScript"><!--//--></SCRIPT></HEAD><jsp:include page="MultiLevelmenu.htm"/><br><br><br>

<body class="SC"><%

Integer IAuth =(Integer)session.getAttribute("auth");int auth= IAuth.intValue();System.out.println("===Authentication=="+auth);

if((auth==1)){%><H3 align=center><IMG SRC="images/error.gif" WIDTH="17"

HEIGHT="13" BORDER=0 ALT="">You are not authorized to access this page</H3><%}else{%>

<P align=right><a class=title onclick="javascipt:window.print()" onmouseover="this.style.cursor='hand'" ><img src="images/printer1.jpg" width="37" height="38" border=0 alt=""></a></P><h2 align=Center>Insurance Details</h2><form name=cons><table width="20%" align=Left>

<%/*Declaration of variables*/

Connection con=null;Statement stmt=null;ResultSet rs=null;

DEPT OF CSE, GPREC, KNL Page 44

Page 45: Hospital management system

Medi-Tracker

String orderby="InsuranceID";String NameOfApplicant,WorkingAtCompany,EmployeeID,NameOfPatient,Natureofillness;String PeriodofStayinHospital,Place,PolicyNumber,ClaimNumber,RelationWithPatient;float AmountClaimed;int PatientID,InsuranceID;Date DateOfAdmission,DateOfDischarge;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "NameOfApplicant":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/ con=(Connection)session.getAttribute("connection");

stmt = con.createStatement();String Query = "SELECT * FROM InsuranceMaster order by "+orderby;

System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

//System.out.println("Exception"+e);%><%=e%><%

}

%>

<%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table width="60%" align=right><tr class=row_title>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=InsuranceID">InsuranceID</a></th>

DEPT OF CSE, GPREC, KNL Page 45

Page 46: Hospital management system

Medi-Tracker

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=NameOfPatient">Name of Patient</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=NameOfApplicant">Name of Applicant</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=WorkingAtCompany">Working At Company</a></th> <th class=row_title><a class=title href="ViewInsurances.jsp?orderby=EmployeeID">EmployeeID</a></th> <th class=row_title><a class=title href="ViewInsurances.jsp?orderby=RelationWithPatient">Relation With Patient</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=Natureofillness">Nature of illness</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=DateOfAdmission">Date Of Admission</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=DateOfDischarge">Date Of Discharge</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=PeriodofStayinHospital">Period of Stay in Hospital</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=AmountClaimed">Amount Claimed</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=Place">Place</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=PolicyNumber">Policy Number</a></th>

<th class=row_title><a class=title href="ViewInsurances.jsp?orderby=ClaimNumber">Claim Number</a></th>

<%int DisRow=0;

/*Getting the values from the database*/

while(rs.next()){ InsuranceID=rs.getInt(1); NameOfPatient=rs.getString(2); NameOfApplicant=rs.getString(3); WorkingAtCompany=rs.getString(4); EmployeeID=rs.getString(5);

RelationWithPatient=rs.getString(6); Natureofillness=rs.getString(7); DateOfAdmission=rs.getDate(8); DateOfDischarge=rs.getDate(9); PeriodofStayinHospital=rs.getString(10); AmountClaimed=rs.getFloat(11); Place=rs.getString(12); PolicyNumber=rs.getString(13);

DEPT OF CSE, GPREC, KNL Page 46

Page 47: Hospital management system

Medi-Tracker

ClaimNumber=rs.getString(14);DisRow++;%><tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>>

<td align=center><%= InsuranceID%></td><td align=center><%= NameOfPatient%></td><td align=center><%= NameOfApplicant%></td><td align=center><%= WorkingAtCompany%></td><td align=center><%= EmployeeID%></td><td align=center><%= RelationWithPatient%></td><td align=center><%= Natureofillness%></td><td align=center><%= DateOfAdmission%></td><td align=center><%= DateOfDischarge%></td><td align=center><%= PeriodofStayinHospital%></td><td align=center><%= AmountClaimed%></td><td align=center><%= Place%></td><td align=center><%= PolicyNumber%></td><td align=center><%= ClaimNumber%></td>

<%}

rs.close();

if(DisRow==0){

/*To write to the server if the resultset is null*/%>

<CENTER><tr><th colspan=6>No Records found</th></tr>

</CENTER><%

}}%>

</table></form></BODY></HTML><% } %>

ViewDoctor.jsp

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

DEPT OF CSE, GPREC, KNL Page 47

Page 48: Hospital management system

Medi-Tracker

<HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD><LINK href="styles.css" type="text/css" rel="stylesheet">

<title>Doctors List</title><SCRIPT LANGUAGE="JavaScript"><!--history.go(+1);

//--></SCRIPT></HEAD><jsp:include page="MultiLevelmenu.htm"/><br><br><br><body class="SC"><%

Integer IAuth =(Integer)session.getAttribute("auth");int auth= IAuth.intValue();System.out.println("===Authentication=="+auth);

if(auth==3){%><H3 align=center><IMG SRC="images/error.gif" WIDTH="17"

HEIGHT="13" BORDER=0 ALT="">You are not authorized to access this page</H3><%}else{%>

<P align=right><a class=title onclick="javascipt:window.print()" onmouseover="this.style.cursor='hand'" ><img src="images/printer1.jpg" width="37" height="38" border=0 alt=""></a></P><h2 align=Center>Doctors List</h2><form name=cons><table width="20%" align=Left>

<%/*Declaration of variables*/

Connection con=null;Statement stmt=null;ResultSet rs=null; String orderby="DoctorName";String DoctorName,Designation,PhoneNumber;

DEPT OF CSE, GPREC, KNL Page 48

Page 49: Hospital management system

Medi-Tracker

String HolidayinWeek,WorkingHours;Date DateOfJoin;float ChargesPerHour;int DoctorID,Experience;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "DoctorName":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/ con=(Connection)session.getAttribute("connection");

stmt = con.createStatement();String Query = "SELECT * FROM DoctorsMaster order by "+orderby;

System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

//System.out.println("Exception"+e);%><%=e%><%

}%>

<%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table width="60%" align=right><tr class=row_title>

<th class=row_title><a class=title href="ViewDoctors.jsp?orderby=DoctorName">DoctorName</a></th>

<th class=row_title><a class=title href="ViewDoctors.jsp?orderby=DoctorID">DoctorID</a></th>

<th class=row_title><a class=title href="ViewDoctors.jsp?orderby=DateOfJoin">DateOfJoin</a></th>

<th class=row_title><a class=title href="ViewDoctors.jsp?orderby=Designation">Designation</a></th>

DEPT OF CSE, GPREC, KNL Page 49

Page 50: Hospital management system

Medi-Tracker

<th class=row_title><a class=title href="ViewDoctors.jsp?orderby=PhoneNumber">PhoneNumber</a></th>

<th class=row_title><a class=title href="ViewDoctors.jsp?orderby=Experience">Experience</a></th>

<th class=row_title><a class=title href="ViewDoctors.jsp?orderby=HolidayinWeek">HolidayinWeek</a></th>

<th class=row_title><a class=title href="ViewDoctors.jsp?orderby=WorkingHours">WorkingHours</a></th>

<th class=row_title><a class=title href="ViewDoctors.jsp?orderby=ChargesPerHour">ChargesPerHour</a></th>

<%int DisRow=0;

/*Getting the values from the database*/

while(rs.next()){ DoctorName=rs.getString(1); DoctorID=rs.getInt(2); DateOfJoin=rs.getDate(3);

Designation=rs.getString(4); PhoneNumber=rs.getString(5); Experience=rs.getInt(6); HolidayinWeek=rs.getString(7); WorkingHours=rs.getString(8); ChargesPerHour=rs.getFloat(9);

DisRow++;%><tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>>

<td align=center><%= DoctorName%></td><td align=center><%= DoctorID%></td><td align=center><%= DateOfJoin%></td><td align=center><%= Designation%></td><td align=center><%= PhoneNumber%></td><td align=center><%= Experience%></td><td align=center><%= HolidayinWeek%></td><td align=center><%= WorkingHours%></td><td align=center><%= ChargesPerHour%></td>

<%}

rs.close();if(DisRow==0){

/*To write to the server if the resultset is null*/

DEPT OF CSE, GPREC, KNL Page 50

Page 51: Hospital management system

Medi-Tracker

%><CENTER>

<tr><th colspan=6>No Records found</th></tr>

</CENTER><%

}}%>

</table></form></BODY></HTML><% } %>

ViewDischarges:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD><LINK href="styles.css" type="text/css" rel="stylesheet">

<title>Discharges List</title><SCRIPT LANGUAGE="JavaScript"><!--history.go(+1);

//--></SCRIPT></HEAD><jsp:include page="MultiLevelmenu.htm"/><br><br><br>

<body class="SC"><%

Integer IAuth =(Integer)session.getAttribute("auth");int auth= IAuth.intValue();System.out.println("===Authentication=="+auth);

if((auth<0)){

DEPT OF CSE, GPREC, KNL Page 51

Page 52: Hospital management system

Medi-Tracker

%><H3 align=center><IMG SRC="images/error.gif" WIDTH="17" HEIGHT="13" BORDER=0 ALT="">You are not authorized to access this page</H3><%}else{%><P align=right><a class=title onclick="javascipt:window.print()" onmouseover="this.style.cursor='hand'" ><img src="images/printer1.jpg" width="37" height="38" border=0 alt=""></a></P><h2 align=Center>Discharges List</h2><form name=cons><table width="20%" align=Left>

<%/*Declaration of variables*/

Connection con=null;Statement stmt=null;ResultSet rs=null;

String orderby="NameOfPatient";String NameOfPatient,Sex,Occupation,Natureofillness;String ConsultantDoctor,ReferedByDoctor,Insurance;Date DateOfAdmission,DateOfDischarge;int RoomID,PatientID,Age;float BillAmount;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "NameOfPatient":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/

con=(Connection)session.getAttribute("connection");stmt = con.createStatement();String Query = "SELECT * FROM DischargesMaster order by "+orderby;

System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

//System.out.println("Exception"+e);%><%=e%><%

DEPT OF CSE, GPREC, KNL Page 52

Page 53: Hospital management system

Medi-Tracker

}

%>

<%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table width="60%" align=right><tr class=row_title>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=NameOfPatient">NameOfPatient</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=PatientID">PatientID</a></th> <th class=row_title><a class=title href="ViewDischarges.jsp?orderby=Age">Age</a></th> <th class=row_title><a class=title href="ViewDischarges.jsp?orderby=Sex">Sex</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=Occupation">Occupation</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=Natureofillness">Natureofillness</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=DateOfAdmission">DateOfAdmission</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=DateOfDischarge">DateOfDischarge</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=Insurance">RoomID</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=ConsultantDoctor">ConsultantDoctor</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=ReferedByDoctor">ReferedByDoctor</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=Insurance">Insurance</a></th>

<th class=row_title><a class=title href="ViewDischarges.jsp?orderby=BillAmount">BillAmount</a></th>

<%int DisRow=0;

DEPT OF CSE, GPREC, KNL Page 53

Page 54: Hospital management system

Medi-Tracker

/*Getting the values from the database*/

while(rs.next()){ NameOfPatient=rs.getString(1); PatientID=rs.getInt(2); Age=rs.getInt(3);

Sex=rs.getString(4); Occupation=rs.getString(5);

Natureofillness=rs.getString(6); DateOfAdmission=rs.getDate(7); DateOfDischarge=rs.getDate(8); RoomID=rs.getInt(9);

ConsultantDoctor=rs.getString(10); ReferedByDoctor=rs.getString(11); Insurance=rs.getString(12);

BillAmount=rs.getFloat(13);DisRow++;%><tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>>

<td align=center><%= NameOfPatient%></td><td align=center><%= PatientID%></td><td align=center><%= Age%></td><td align=center><%= Sex%></td><td align=center><%= Occupation%></td><td align=center><%= Natureofillness%></td><td align=center><%= DateOfAdmission%></td><td align=center><%= DateOfDischarge%></td><td align=center><%= RoomID%></td><td align=center><%= ConsultantDoctor%></td><td align=center><%= ReferedByDoctor%></td><td align=center><%= Insurance%></td><td align=center><%= BillAmount%></td>

<%}

//System.out.println(DisRow);

rs.close();

if(DisRow==0){

/*To write to the server if the resultset is null*/%>

<CENTER><tr><th colspan=6>No Records found</th></tr>

DEPT OF CSE, GPREC, KNL Page 54

Page 55: Hospital management system

Medi-Tracker

</CENTER><%

}

}%>

</table></form></BODY></HTML><% } %>

ViewBill.jsp:

<%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%> <% String NameOfPatient = request.getParameter("NameOfPatient");%>

<HEAD>

<LINK href="styles.css" type="text/css" rel="stylesheet">

<script LANGUAGE="Javascript" SRC="images/validate.js"></script>

</HEAD> <jsp:include page="MultiLevelmenu.htm"/><br><br><BODY class=SC><P align=right><a class=title onclick="javascipt:window.print()" onmouseover="this.style.cursor='hand'" ><img src="images/printer1.jpg" width="37" height="38" border=0 alt=""></a></P><h2 align=center>Bill Details</h2>

<%Connection con;

String orderby="BillID";String ReferedByDoctor;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "BillID":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

DEPT OF CSE, GPREC, KNL Page 55

Page 56: Hospital management system

Medi-Tracker

String Condition = (String)request.getParameter("NameOfPatient");int BillID,PeriodofStayinHospital,RoomID;float AdmissionFee,RoomRent,DoctorFee,TotalCharge;

ResultSet rs=null,rs1=null;Statement stmt=null,stmt1=null;try{

con=(Connection)session.getAttribute("connection");stmt = con.createStatement();stmt1 = con.createStatement();String Query1 = "select max(BillID) from billingmaster ";rs1 = stmt1.executeQuery(Query1);if(rs1==null){

BillID = 0;}if(rs1.next()){

BillID = rs1.getInt(1);}else{

BillID = 0;}System.out.println(BillID);String Query = "select * from billingmaster where

BillID="+BillID;rs = stmt.executeQuery(Query);

}catch(Exception e){

//System.out.println("Exception"+e);%><%=e%><%

}%><%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<%int DisRow=0;

/*Getting the values from the database*/

while(rs.next())

DEPT OF CSE, GPREC, KNL Page 56

Page 57: Hospital management system

Medi-Tracker

{ BillID=rs.getInt(1);NameOfPatient=rs.getString(2);AdmissionFee=rs.getFloat(3);PeriodofStayinHospital=rs.getInt(4);RoomID=rs.getInt(5);

RoomRent=rs.getFloat(6);ReferedByDoctor=rs.getString(7);DoctorFee=rs.getFloat(8);TotalCharge=rs.getFloat(9);DisRow++;

%><table width="40%" align=center>

<tr><td class=row_title><b>BillID</b></a></td><td class=row_title><b><%=BillID%></b></td></tr>

<tr><td class=row_title><b>NameOfPatient</b></a></td><td class=row_title><b><%=NameOfPatient%></b></td></tr>

<tr><td class=row_title><b>AdmissionFee</b></a></td><td class=row_title><b>Rs.<%=AdmissionFee%></b></td></tr>

<tr><td class=row_title><b>PeriodofStayinHospital</b></a></td><td class=row_title><b><%=PeriodofStayinHospital%> days</b></td></tr>

<tr><td class=row_title><b>RoomID</b></a></td><td class=row_title><b><%=RoomID%></b></td></tr>

<tr><td class=row_title><b>RoomRent Perday</b></a></td><td class=row_title><b>Rs.<%=RoomRent%></b></td></tr>

<tr><td class=row_title><b>ReferedByDoctor</b></a></td><td class=row_title><b><%=ReferedByDoctor%></b></td></tr>

<tr><td class=row_title><b>DoctorFee Perday</b></a></td><td class=row_title><b>Rs.<%=DoctorFee%></b></td></tr>

<tr class=row_odd><td><b><U>Total Charge</U></b></a></td><td class=row_odd><font color="red"><b><U>Rs.<%=TotalCharge%></U></b></td></tr>

</table><%}

rs.close();

if(DisRow>0){ %><center><br>

<h3 align=center><th colspan=10><A href="NewDischarges0.jsp"> Discharge another Patient</A><br>

DEPT OF CSE, GPREC, KNL Page 57

Page 58: Hospital management system

Medi-Tracker

<h3 align=center><A href="Report.jsp"> Back</A></center><%

/*To write to the server if the resultset is null*/

}}%>

</table></form></BODY></HTML>

ViewAppointments:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD><LINK href="styles.css" type="text/css" rel="stylesheet">

<title>Appointments List</title><SCRIPT LANGUAGE="JavaScript"><!--history.go(+1);//--></SCRIPT></HEAD><jsp:include page="MultiLevelmenu.htm"/><br><br><br>

<body class="SC"><%

Integer IAuth =(Integer)session.getAttribute("auth");int auth= IAuth.intValue();System.out.println("===Authentication=="+auth);

if(auth==3){%><H3 align=center><IMG SRC="images/error.gif" WIDTH="17"

HEIGHT="13" BORDER=0 ALT="">You are not authorized to access this page</H3><%}else{%>

DEPT OF CSE, GPREC, KNL Page 58

Page 59: Hospital management system

Medi-Tracker

<P align=right><a class=title onclick="javascipt:window.print()" onmouseover="this.style.cursor='hand'" ><img src="images/printer1.jpg" width="37" height="38" border=0 alt=""></a></P><h2 align=Center>Appointments List</h2><form name=cons><table width="20%" align=Left>

<%/*Declaration of variables*/

Connection con=null;Statement stmt=null;ResultSet rs=null; String orderby="AppointmentID";String DoctorName,Designation,AppointmentGivento,NameOfPatient,NameOfCharity;String HolidayinWeek,WorkingHours;int DoctorID,PatientID,AppointmentID;Date DateOfAppointment;float ChargesPerHour;int NoOfHours,Experience;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "AppointmentID":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/

con=(Connection)session.getAttribute("connection");stmt = con.createStatement();String Query = "SELECT * FROM AppointmentsMaster order by "+orderby;

System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

//System.out.println("Exception"+e);%><%=e%><%

}

%>

<%

DEPT OF CSE, GPREC, KNL Page 59

Page 60: Hospital management system

Medi-Tracker

if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table width="60%" align=right><tr class=row_title>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=AppointmentID">AppointmentID</a></th>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=DoctorName">DoctorName</a></th>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=DoctorID">DoctorID</a></th>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=Designation">Designation</a></th>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=AppointmentGivento">AppointmentGivento</a></th>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=PatientID">PatientID</a></th>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=NameOfPatient">NameOfPatient</a></th>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=NameOfCharity">NameOfCharity</a></th>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=DateOfAppointment">DateOfAppointment</a></th>

<th class=row_title><a class=title href="ViewAppointments.jsp?orderby=NoOfHours">NoOfHours</a></th><%int DisRow=0;

/*Getting the values from the database*/

while(rs.next()){ AppointmentID=rs.getInt(1); DoctorName=rs.getString(2); DoctorID=rs.getInt(3); Designation=rs.getString(4); AppointmentGivento=rs.getString(5); PatientID=rs.getInt(6); NameOfPatient=rs.getString(7); NameOfCharity=rs.getString(8); DateOfAppointment=rs.getDate(9);

DEPT OF CSE, GPREC, KNL Page 60

Page 61: Hospital management system

Medi-Tracker

NoOfHours=rs.getInt(10);

DisRow++;%><tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>>

<td align=center><%= AppointmentID%></td><td align=center><%= DoctorName%></td><td align=center><%= DoctorID%></td><td align=center><%= Designation%></td><td align=center><%= AppointmentGivento%></td><td align=center><%= PatientID%></td><td align=center><%= NameOfPatient%></td><td align=center><%= NameOfCharity%></td><td align=center><%= DateOfAppointment%></td><td align=center><%= NoOfHours%></td>

<%}

rs.close();

if(DisRow==0){

/*To write to the server if the resultset is null*/%>

<CENTER><tr><th colspan=6>No Records found</th></tr>

</CENTER><%

}}%>

</table></form></BODY></HTML><% } %>

Validate.jsp:

<!-- File : Validate.jsp

DEPT OF CSE, GPREC, KNL Page 61

Page 62: Hospital management system

Medi-Tracker

--><HTML><%@ page language="java" %><%@ page import="java.sql.*" %><%@ page import="java.lang.*" %><%@ page session="true" %><head>

<LINK href="styles.css" type="text/css" rel="stylesheet"><head><jsp:include page="MultiLevelmenu.htm"/><br><br><br><body Class=SC><%@ include file = "Header.html" %><BR><BR><BR><FONT FACE="Century Gothic">

<%! String user_id; %><%! String pass_word; %><%! int flag=0; %>

<%/*Declaration of variables*/

Connection con=null;Statement stmt=null;ResultSet rs=null;%>

<%-- Retrieve parameters from Session --%><% user_id = request.getParameter("uid").trim(); pass_word = request.getParameter("pwd"); System.out.println("user_id = "+user_id+" "+"pass_word = "+pass_word);%>

<%/*Checking for userid and password*/

if(pass_word.equals("") || user_id.equals("")){

//System.out.println("Redirecting to login to fill all credentials..");%>

<jsp:forward page="Login.jsp"><jsp:param name="error" value="blankfields" />

</jsp:forward><%}

DEPT OF CSE, GPREC, KNL Page 62

Page 63: Hospital management system

Medi-Tracker

%>

<%try{

/*Connection to MS Acess database is made with JDBC class one driver*/System.out.println("ok");String us="";String pas="";Class.forName("com.mysql.jdbc.Driver");//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");con =

DriverManager.getConnection("jdbc:mysql://localhost:3306/meditracker","root","");

//con = DriverManager.getConnection("jdbc:odbc:medi","root","");stmt = con.createStatement();

/*Retrives data from the database*/rs = stmt.executeQuery("SELECT * from Login ");System.out.println(rs);

while(rs.next()){

String s1=rs.getString(1);String s2=rs.getString(2);

System.out.println("database "+s1+ " "+s2 ); if(user_id.equals(s1) && pass_word.equals(s2)) {

System.out.println("User has successfully logged in...");/*Puts the username and connection variable to session*/session.setAttribute("userr",user_id);session.setAttribute("connection",con);int value = rs.getInt(3);if(!(value < 0 )) session.setAttribute("auth",new

Integer(value)); flag=1;

}}

}

catch(Exception e){

System.out.println("Exception"+e);

DEPT OF CSE, GPREC, KNL Page 63

Page 64: Hospital management system

Medi-Tracker

}%>

<%/*If username and password is validated, then the user is redirected to

homepage*/if(flag==1){flag=0;

%> <jsp:forward page="Home.html"/>

<%}else{/*If username and password is not valid, then the user is redirected back to

Loginpage*/%>

<jsp:forward page="Login.jsp"><jsp:param name="error" value="invalid" />

</jsp:forward><%

}%></BODY></HTML>

ShowRooms.jsp:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD><LINK href="styles.css" type="text/css" rel="stylesheet">

<title>ConsolidatedReport</title><SCRIPT LANGUAGE="JavaScript"><!--function sendInfo(txtVal,txt1Val,txt2Val,txt3Val,txt4Val){

var txt = window.opener.document.forms(0).RoomID;

DEPT OF CSE, GPREC, KNL Page 64

Page 65: Hospital management system

Medi-Tracker

txt.value = txtVal;var txt1 = window.opener.document.forms(0).Category;txt1.value = txt1Val;var txt2 = window.opener.document.forms(0).ChargesPerDay;txt2.value = txt2Val;var txt3 = window.opener.document.forms(0).VisitorsAllowed;txt3.value = txt3Val;var txt4 = window.opener.document.forms(0).visitingHours;txt4.value=txt4Val;window.close();

}

//--></SCRIPT></HEAD>

<body class="SC">

<h2 align=center>Rooms List</h2><form name=cons><center><input type=button value=close onclick="window.close()"></center>

<%/*Declaration of variables*/

Connection con=null;Statement stmt=null;ResultSet rs=null;

String orderby="RoomID";String RoomID,Category,NoOfBeds,VisitorsAllowed,VisitingHours,Status;float ChargesPerDay;

System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "RoomID":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/

con=(Connection)session.getAttribute("connection");stmt = con.createStatement();String Query = "SELECT * FROM RoomsMaster Where Status =\'Empty\'";

DEPT OF CSE, GPREC, KNL Page 65

Page 66: Hospital management system

Medi-Tracker

System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

System.out.println("Exception"+e);%><%=e%><%

}%>

<%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table class=notebook align=center><tr class=row_title>

<th class=row_title><a class=title href="ShowRooms.jsp?orderby=RoomID">RoomID</a></th>

<th class=row_title><a class=title href="ShowRooms.jsp?orderby=Category">Category</a></th>

<th class=row_title><a class=title href="ShowRooms.jsp?orderby=NoOfBeds">NoOfBeds</a></th>

<th class=row_title><a class=title href="ShowRooms.jsp?orderby=ChargesPerDay">ChargesPerDay</a></th><%int DisRow=0;

/*Getting the values from the database*/

while(rs.next()){

RoomID=rs.getString(1); Category=rs.getString(2); NoOfBeds=rs.getString(3);

ChargesPerDay=rs.getFloat(4); VisitorsAllowed=rs.getString(5); VisitingHours=rs.getString(6);

DisRow++;%>

DEPT OF CSE, GPREC, KNL Page 66

Page 67: Hospital management system

Medi-Tracker

<tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>><td><a href="#" onclick="sendInfo('<%=RoomID%>','<%=Category

%>','<%=ChargesPerDay%>','<%=VisitorsAllowed%>','<%=VisitingHours%>')"><%=RoomID%></a></td>

<td><%=Category%></td><td><%=NoOfBeds%></td><td><%=ChargesPerDay%></td>

<%}

rs.close();

if(DisRow==0){

/*To write to the server if the resultset is null*/%>

<CENTER><tr><th colspan=6>No Records found</th></tr>

<input type=button value=close onclick="window.close()"></CENTER>

<%}}%>

</table></form></BODY></HTML>

ShowRoomDetails:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%> <% String RoomID = request.getParameter("RoomID");%>

<HEAD><LINK href="styles.css" type="text/css" rel="stylesheet">

<title>ShowRoom Details</title><SCRIPT LANGUAGE="JavaScript"><!--function sendInfo(txtVal)

DEPT OF CSE, GPREC, KNL Page 67

Page 68: Hospital management system

Medi-Tracker

{var txt = window.opener.document.forms(0).RoomRent;txt.value = txtVal;window.close();

}//--></SCRIPT></HEAD>

<body class="SC"><h2 align=center>ShowRoom Details</h2><form name=cons><center><input type=button value=close onclick="window.close()"></center>

<% /*Declaration of variables*/

Connection con=null;Statement stmt=null;ResultSet rs=null;

String orderby="RoomID";float ChargesPerDay,RoomRent;String Category;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "RoomID":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/

con=(Connection)session.getAttribute("connection");stmt = con.createStatement();String Query = "SELECT * FROM roomsmaster where RoomID="+RoomID;

System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

//System.out.println("Exception"+e);%><%=e%><%

}

DEPT OF CSE, GPREC, KNL Page 68

Page 69: Hospital management system

Medi-Tracker

%>

<%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table class=notebook align=center><tr class=row_title>

<th class=row_title><a class=title href="ShowRoomDetails.jsp?orderby=RoomID">RoomID</a></th>

<th class=row_title><a class=title href="ShowRoomDetails.jsp?orderby=Category">Category</a></th>

<th class=row_title><a class=title href="ShowRoomDetails.jsp?orderby=ChargesPerDay">ChargesPerDay</a></th>

<%int DisRow=0;

/*Getting the values from the database*/

while(rs.next()){ RoomID=rs.getString(1); Category=rs.getString(2); ChargesPerDay=rs.getFloat(4); DisRow++;%><tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>>

<td><a href="#" onclick="sendInfo('<%=ChargesPerDay%>')"><%=RoomID%></a></td>

<td><%=Category%></td><td><%=ChargesPerDay%></td>

<%}

rs.close();

if(DisRow==0){

/*To write to the server if the resultset is null*/

DEPT OF CSE, GPREC, KNL Page 69

Page 70: Hospital management system

Medi-Tracker

%><CENTER>

<tr><th colspan=6>No Records found</th></tr></CENTER>

<%}}%></table></form></BODY></HTML>

ShowPatients.jsp:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD><LINK href="styles.css" type="text/css" rel="stylesheet">

<title>ConsolidatedReport</title><SCRIPT LANGUAGE="JavaScript"><!--function sendInfo(txtVal,txt1Val,txt2Val,txt3Val,txt4Val,txt5Val,txt6Val,txt7Val,txt8Val,txt9Val){

var txt = window.opener.document.forms(0).NameOfPatient;txt.value = txtVal;var txt1 = window.opener.document.forms(0).PatientID;txt1.value = txt1Val;var txt2 = window.opener.document.forms(0).Age;txt2.value=txt2Val;var txt3 = window.opener.document.forms(0).Sex;txt3.value = txt3Val;var txt4 = window.opener.document.forms(0).Occupation;txt4.value = txt4Val;var txt5 = window.opener.document.forms(0).Natureofillness;txt5.value=txt5Val;var txt6 = window.opener.document.forms(0).DateOfAdmission;txt6.value=txt6Val;var txt7 = window.opener.document.forms(0).Insurance;txt7.value=txt7Val;

DEPT OF CSE, GPREC, KNL Page 70

Page 71: Hospital management system

Medi-Tracker

var txt8 = window.opener.document.forms(0).RoomID;txt8.value=txt8Val;var txt9 = window.opener.document.forms(0).ReferedByDoctor;txt9.value=txt9Val;window.close();

}//--></SCRIPT></HEAD>

<body class="SC"><h2 align=center>InPatients List</h2><form name=cons><center><input type=button value=close onclick="window.close()"></center><%/*Declaration of variables*/

Connection con=null;Statement stmt=null;ResultSet rs=null;

String orderby="NameOfPatient";String NameOfPatient,Natureofillness,Sex,Occupation,Insurance,ReferedByDoctor;int PatientID,Age,RoomID;Date DateOfAdmission;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "NameOfPatient":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/

con=(Connection)session.getAttribute("connection");stmt = con.createStatement();//String Query = "SELECT * FROM PatientsMaster Where AdmissionAs

=\'"InPatient"\' order by "+orderby;String Query = "SELECT * FROM PatientsMaster Where AdmissionAs

=\'InPatient\'";System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

System.out.println("Exception"+e);

DEPT OF CSE, GPREC, KNL Page 71

Page 72: Hospital management system

Medi-Tracker

%><%=e%><%}%>

<%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header--><br>

<!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table class=notebook align=center><tr class=row_title>

<th class=row_title><a class=title href="ShowPatients.jsp?orderby=NameOfPatient">NameOfPatient</a></th>

<th class=row_title><a class=title href="ShowPatients.jsp?orderby=PatientID">PatientID</a></th>

<th class=row_title><a class=title href="ShowPatients.jsp?orderby=Natureofillness">Natureofillness</a></th><%int DisRow=0;

/*Getting the values from the database*/

while(rs.next()){ NameOfPatient=rs.getString(1); PatientID=rs.getInt(2); Age=rs.getInt(3); Sex=rs.getString(4); Occupation=rs.getString(5); Natureofillness=rs.getString(7); DateOfAdmission=rs.getDate(8); Insurance=rs.getString(10); ReferedByDoctor=rs.getString(13); RoomID=rs.getInt(14); DisRow++;%><tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>>

<td><a href="#" onclick="sendInfo('<%=NameOfPatient%>','<%=PatientID%>','<%=Age%>','<%=Sex%>','<%=Occupation%>','<%=Natureofillness%>','<%=DateOfAdmission%>','<%=Insurance%>','<%=RoomID%>','<%=ReferedByDoctor%>')"><%=NameOfPatient%></a></td>

<td><%=PatientID%></td><td><%=Natureofillness%></td>

DEPT OF CSE, GPREC, KNL Page 72

Page 73: Hospital management system

Medi-Tracker

<%}

rs.close();if(DisRow==0)

{/*To write to the server if the resultset is null*/%>

<CENTER><tr><th colspan=6>No Records found</th></tr>

</CENTER><%

}}%>

</table></form></BODY></HTML>

ShowInPatients:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD><LINK href="styles.css" type="text/css" rel="stylesheet">

<title>ConsolidatedReport</title><SCRIPT LANGUAGE="JavaScript"><!--function sendInfo(txtVal,txt1Val,txt2Val){

var txt = window.opener.document.forms(0).NameOfPatient;txt.value = txtVal;var txt1 = window.opener.document.forms(0).Natureofillness;txt1.value=txt1Val;var txt2 = window.opener.document.forms(0).DateOfAdmission;txt2.value=txt2Val;

window.close();

DEPT OF CSE, GPREC, KNL Page 73

Page 74: Hospital management system

Medi-Tracker

}

//--></SCRIPT></HEAD><body class="SC"><h2 align=center>InPatients List</h2><form name=cons><center><input type=button value=close onclick="window.close()"></center><%/*Declaration of variables*/

Connection con=null;Statement stmt=null;ResultSet rs=null;

String orderby="NameOfPatient";String NameOfPatient,Natureofillness,Sex,Occupation,MediAssist,ReferedByDoctor;int PatientID,Age,RoomID;Date DateOfAdmission;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "NameOfPatient":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/

con=(Connection)session.getAttribute("connection");stmt = con.createStatement();//String Query = "SELECT * FROM PatientsMaster Where AdmissionAs

=\'"InPatient"\' order by "+orderby;String Query = "SELECT * FROM PatientsMaster Where AdmissionAs

=\'InPatient\' and Insurance=\'No\'";

System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

System.out.println("Exception"+e);%><%=e%><%

}

%>

DEPT OF CSE, GPREC, KNL Page 74

Page 75: Hospital management system

Medi-Tracker

<%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table class=notebook align=center><tr class=row_title>

<th class=row_title><a class=title href="ShowPatients.jsp?orderby=NameOfPatient">NameOfPatient</a></th>

<th class=row_title><a class=title href="ShowPatients.jsp?orderby=Natureofillness">Natureofillness</a></th><%int DisRow=0;

/*Getting the values from the database*/

while(rs.next()){ NameOfPatient=rs.getString(1); Natureofillness=rs.getString(7); DateOfAdmission=rs.getDate(8); DisRow++;%><tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>>

<td><a href="#" onclick="sendInfo('<%=NameOfPatient%>','<%=Natureofillness%>','<%=DateOfAdmission%>')"><%=NameOfPatient%></a></td>

<td><%=Natureofillness%></td>

<%}

rs.close();if(DisRow==0)

{/*To write to the server if the resultset is null*/%>

<CENTER><tr><th colspan=6>No Records found</th></tr>

</CENTER><%

DEPT OF CSE, GPREC, KNL Page 75

Page 76: Hospital management system

Medi-Tracker

}}%>

</table></form></BODY></HTML>

ShowDoctors:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><%@ page language="java" %><%@ page session="true" %><%@ page import="java.sql.*,java.io.*,java.util.Random"%><HEAD>

<LINK href="styles.css" type="text/css" rel="stylesheet">

<title>ConsolidatedReport</title><SCRIPT LANGUAGE="JavaScript"><!--function sendInfo(txtVal,txt1Val,txt2Val){

var txt = window.opener.document.forms(0).DoctorName;txt.value = txtVal;var txt1 = window.opener.document.forms(0).DoctorID;txt1.value = txt1Val;var txt2 = window.opener.document.forms(0).Designation;txt2.value=txt2Val;window.close();

}

//--></SCRIPT></HEAD>

<body class="SC"><h2 align=center>Doctors List</h2><form name=cons><center><input type=button value=close onclick="window.close()"></center>

<%/*Declaration of variables*/

Connection con=null;

DEPT OF CSE, GPREC, KNL Page 76

Page 77: Hospital management system

Medi-Tracker

Statement stmt=null;ResultSet rs=null;

String orderby="DoctorName";String DoctorName,Designation;int DoctorID;System.out.println("--1---");orderby=((String)request.getParameter("orderby")==null) ? "DoctorName":(String)request.getParameter("orderby");System.out.println("--2--"+orderby);

try{

/*Getting the connection variable from session*/

con=(Connection)session.getAttribute("connection");stmt = con.createStatement();//String Query = "SELECT * FROM PatientsMaster Where AdmissionAs

=\'"InPatient"\' order by "+orderby;String Query = "SELECT * FROM DoctorsMaster order by "+orderby;

System.out.println("--1--"+Query);rs = stmt.executeQuery(Query);

}catch(Exception e){

System.out.println("Exception"+e);%><%=e%><%

}%>

<%if(rs!=null){//System.out.println("Resultset is not null");%>

<!--Displaying the table header-->

<br><!-- <DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

<table class=notebook align=center><tr class=row_title>

<th class=row_title><a class=title href="ShowDoctors.jsp?orderby=DoctorName">DoctorName</a></th>

DEPT OF CSE, GPREC, KNL Page 77

Page 78: Hospital management system

Medi-Tracker

<th class=row_title><a class=title href="ShowDoctors.jsp?orderby=PatientID">DoctorID</a></th>

<th class=row_title><a class=title href="ShowDoctors.jsp?orderby=Natureofillness">Designation</a></th><%int DisRow=0;

/*Getting the values from the database*/

while(rs.next()){ DoctorName=rs.getString(1);

DoctorID=rs.getInt(2); Designation=rs.getString(4); DisRow++;%><tr class= <%=(DisRow%2!=0)? "row_even" : "row_odd"%>>

<td><a href="#" onclick="sendInfo('<%=DoctorName%>','<%=DoctorID%>','<%=Designation%>')"><%=DoctorName%></a></td>

<td><%=DoctorID%></td><td><%=Designation%></td>

<%}

rs.close();

if(DisRow==0){

/*To write to the server if the resultset is null*/%>

<CENTER><tr><th colspan=6>No Records found</th></tr>

<input type=button value=close onclick="window.close()">

</CENTER><%

}}%>

</table></form></BODY></HTML>

DEPT OF CSE, GPREC, KNL Page 78

Page 79: Hospital management system

Medi-Tracker

SYSTEM TESTING

DEPT OF CSE, GPREC, KNL Page 79

Page 80: Hospital management system

Medi-Tracker

7. System Testing

7.1. Testing Fundamentals:

Testing is a process of executing a program with the intent of finding an error A good test case is one that has a probability of finding an as yet undiscovered errorA successful test is one that uncovers an undiscovered error.

7.2. White box Testing:

White-box testing (a.k.a. clear box testing, glass box testing, transparent box testing, or

structural testing) is a method of testing software that tests internal structures or workings

of an application as opposed to its functionality (black-box testing). An internal

perspective of the system, as well as programming skills, are required and used to design

test cases. The tester chooses inputs to exercise paths through the code and determine the

appropriate outputs. It is analogous to testing nodes in a circuit, e.g. in-circuit

testing (ICT).

While white-box testing can be applied at the unit, integration and system levels of

the software testing process, it is usually done at the unit level. It can test paths within a

unit, paths between units during integration, and between subsystems during a system

level test. Though this method of test design can uncover many errors or problems, it

might not detect unimplemented parts of the specification or missing requirements.

White-box test design techniques include:

Control flow testing

Data flow testing

Branch testing

Path testing

7.3. Black Box Testing:

Black-box testing is a method of testing software that tests the functionality of an

application as opposed to its internal structures or workings (see white-box testing).

DEPT OF CSE, GPREC, KNL Page 80

Page 81: Hospital management system

Medi-Tracker

Specific knowledge of the application's code/internal structure and programming

knowledge in general is not required. Test cases are built around specifications and

requirements, i.e., what the application is supposed to do. It uses external descriptions of

the software, including specifications, requirements, and design to derive test cases.

These tests can be functional or non-functional, though usually functional. The test

designer selects valid and invalid inputs and determines the correct output. There is no

knowledge of the test object's internal structure.

This method of test can be applied to all levels of software

testing: unit, integration, functional, system and acceptance. It typically comprises most if

not all testing at higher levels, but can also dominate unit testing as well

Test Design Techniques

Typical black-box test design techniques include:

Decision table testing

All-pairs testing

State transition tables

Equivalence partitioning

Boundary value analysis

Testing strategy:

A test strategy is an outline that describes the testing portion of the software

development cycle. It is created to inform project managers, testers, and

developers about some key issues of the testing process. This includes the testing

objective, methods of testing new functions, total time and resources required for

the project, and the testing environment.

The test strategy describes how the product risks of the stakeholders are mitigated

at the test-level, which types of test are to be performed, and which entry and exit

criteria apply.

The test strategy is created based on development design documents. The system

design document is the main one used and occasionally, the conceptual design

document can be referred to. The design documents describe the functionalities of

the software to be enabled in the upcoming release. For every set of development

design, a corresponding test strategy should be created to test the new feature sets.

DEPT OF CSE, GPREC, KNL Page 81

Page 82: Hospital management system

Medi-Tracker

7.4. TESTING STRATEGIES

A Strategy for software testing integrates software test cases into a series of well planned steps that result in the successful construction of software. Software testing is a broader topic for what is referred to as Verification and Validation. Verification refers to the set of activities that ensure that the software correctly implements a specific function. Validation refers he set of activities that ensure that the software that has been built is traceable to customer’s requirements

Unit Testing:

Unit testing focuses verification effort on the smallest unit of software design that is the module. Using procedural design description as a guide, important control paths are tested to uncover errors within the boundaries of the module. The unit test is normally white box testing oriented and the step can be conducted in parallel for multiple modules.

Integration Testing:

Integration testing is a systematic technique for constructing the program structure, while conducting test to uncover errors associated with the interface. The objective is to take unit tested methods and build a program structure that has been dictated by design.

Top-down Integration:

Top down integrations is an incremental approach for construction of program structure. Modules are integrated by moving downward through the control hierarchy, beginning with the main control program. Modules subordinate to the main program are incorporated in the structure either in the breath-first or depth-first manner.

Bottom-up Integration:

This method as the name suggests, begins construction and testing with atomic modules i.e., modules at the lowest level. Because the modules are integrated in the bottom up manner the processing required for the modules subordinate to a given level is always available and the need for stubs is eliminated.

Validation Testing:At the end of integration testing software is completely assembled as a package. Validation testing is the next stage, which can be defined as successful when the software functions in the manner reasonably expected by the customer. Reasonable expectations are those defined in the software requirements

DEPT OF CSE, GPREC, KNL Page 82

Page 83: Hospital management system

Medi-Tracker

specifications. Information contained in those sections form a basis for validation testing approach.

System Testing:System testing is actually a series of different tests whose primary purpose is to fully exercise the computer-based system. Although each test has a different purpose, all work to verify that all system elements have been properly integrated to perform allocated functions.

Security Testing:Attempts to verify the protection mechanisms built into the system.

Performance Testing:This method is designed to test runtime performance of software within the context of an integrated system.

DEPT OF CSE, GPREC, KNL Page 83

Page 84: Hospital management system

Medi-Tracker

DATA ENTRY SCREENS

DEPT OF CSE, GPREC, KNL Page 84

Page 85: Hospital management system

Medi-Tracker

8. DATA ENTRY SCREENS

The above screen is for admin login.

DEPT OF CSE, GPREC, KNL Page 85

Page 86: Hospital management system

Medi-Tracker

This is the welcome screen for the admin

In the above screen shows the doctors module. In doctors module, it will display two features. 1) view Doctors 2) New Doctor

DEPT OF CSE, GPREC, KNL Page 86

Page 87: Hospital management system

Medi-Tracker

The above screen shows the Doctors list

The above form shows the new doctor’s entry form.

DEPT OF CSE, GPREC, KNL Page 87

Page 88: Hospital management system

Medi-Tracker

The above screen shows the patients module.

The above screen shows the patients information.

DEPT OF CSE, GPREC, KNL Page 88

Page 89: Hospital management system

Medi-Tracker

The above screen shows the admission form for the new patient.

The above screen shows the information about the appointments module.

DEPT OF CSE, GPREC, KNL Page 89

Page 90: Hospital management system

Medi-Tracker

The above screen shows the full information of all the doctors appointments.

The above screen shows the new appointment form for doctor.

DEPT OF CSE, GPREC, KNL Page 90

Page 91: Hospital management system

Medi-Tracker

The above screen shows the information about the Rooms module.

The above screen shows the information about all the rooms available in hospital.

DEPT OF CSE, GPREC, KNL Page 91

Page 92: Hospital management system

Medi-Tracker

The above screen shows the new room form for the new Inpatient.

The above screen shows the information about the Discharges module.

DEPT OF CSE, GPREC, KNL Page 92

Page 93: Hospital management system

Medi-Tracker

The above screen shows the New Discharge form for the patient.

The above screen shows the information about the Insurance Module.

DEPT OF CSE, GPREC, KNL Page 93

Page 94: Hospital management system

Medi-Tracker

The above screen shows the New Insurance form for the new client.

The above screen shows the information about the Reports module.

DEPT OF CSE, GPREC, KNL Page 94

Page 95: Hospital management system

Medi-Tracker

The above screen shows the information about one particular Doctor’s schedule Report.

DEPT OF CSE, GPREC, KNL Page 95

Page 96: Hospital management system

Medi-Tracker

The above screen shows the full information about one particular doctor’s schedule report.

The above screen shows the administrator’s functionalities.

The above screen shows the information about users.

DEPT OF CSE, GPREC, KNL Page 96

Page 97: Hospital management system

Medi-Tracker

The above screen shows the information about to delete one particular user.

The above screen is the welcome screen for Doctor.

DEPT OF CSE, GPREC, KNL Page 97

Page 98: Hospital management system

Medi-Tracker

The above screen shows the information about the patients module.

The above screen shows the information about the patients.

DEPT OF CSE, GPREC, KNL Page 98

Page 99: Hospital management system

Medi-Tracker

The above screen shows the Reports module.

The above screen shows appointment’s report in between two dates for the particular one doctor.

DEPT OF CSE, GPREC, KNL Page 99

Page 100: Hospital management system

Medi-Tracker

The above screen shows one doctor’s appointment report.

The above screen shows welcome screen for the manager.

DEPT OF CSE, GPREC, KNL Page 100

Page 101: Hospital management system

Medi-Tracker

The above screen shows the information about the module Reports.

The above screen shows the information about the Discharges Report between two particular dates.

DEPT OF CSE, GPREC, KNL Page 101

Page 102: Hospital management system

Medi-Tracker

The above screen shows the information about the Discharges Report between two particular dates.

The above screen shows the information about the inpatient’s report between two particular dates.

DEPT OF CSE, GPREC, KNL Page 102

Page 103: Hospital management system

Medi-Tracker

The above screen shows the information about the Inpatients Report between two particular dates.

The above screen shows the welcome screen for the Accounts User.

DEPT OF CSE, GPREC, KNL Page 103

Page 104: Hospital management system

Medi-Tracker

The above screen shows the information about Reports module.

The above screen shows the information about Bill Details one particular patient.

DEPT OF CSE, GPREC, KNL Page 104

Page 105: Hospital management system

Medi-Tracker

The above screen shows the information about the one particular patient.

The above screen shows the information about the Insurance Report between two particular dates.

DEPT OF CSE, GPREC, KNL Page 105

Page 106: Hospital management system

Medi-Tracker

The above screen shows the information about the Insurance Report between two particular dates.

The above screen shows the information about the user logout function.

DEPT OF CSE, GPREC, KNL Page 106

Page 107: Hospital management system

Medi-Tracker

CONCLUSION

DEPT OF CSE, GPREC, KNL Page 107

Page 108: Hospital management system

Medi-Tracker

9. CONCLUSION:

The Administration of Super Specialty Hospital Activities is a web-based

application for primarily providing training to the employees who provide customized

solutions to meet organizational needs.

This application software has been computed successfully and was also tested

successfully by taking “test cases”. It is user friendly, and has required options,

which can be utilized by the user to perform the desired operations.

The software is developed using Java as front end and Oracle as back end in

Windows environment. The goals that are achieved by the software are:

Instant access.

Improved productivity.

Optimum utilization of resources.

DEPT OF CSE, GPREC, KNL Page 108

Page 109: Hospital management system

Medi-Tracker

Efficient management of records.

Less processing time and getting required information.

User friendly.

Portable and flexible for further enhancement.

FUTUREENHANCEMETS

DEPT OF CSE, GPREC, KNL Page 109

Page 110: Hospital management system

Medi-Tracker

10. FUTURE ENHANCEMENTS:

It is not possible to develop a system that makes all the requirements of the user. User

requirements keep changing as the system is being used. Some of the future

enhancements that can be done to this system are:

As the technology emerges, it is possible to upgrade the system and can be

adaptable to desired environment.

Because it is based on object-oriented design, any further changes can be easily

adaptable.

Based on the future security issues, security can be improved using emerging

technologies.

Attendance module can be added

sub admin module can be added

DEPT OF CSE, GPREC, KNL Page 110

Page 111: Hospital management system

Medi-Tracker

BIBLIOGRAPHYDEPT OF CSE, GPREC, KNL Page 111

Page 112: Hospital management system

Medi-Tracker

11. BIBLIOGRAPHY:

References for the Project Development were taken from the following Books and Web Sites.

Oracle:PL/SQL Programming by Scott UrmanSQL complete reference by Livion

JAVA Technologies:JAVA Complete ReferenceJava Script Programming by Yehuda ShiranMastering JAVA SecurityJAVA2 Networking by PistoriaJAVA Security by Scotl oaksHead First EJB Sierra BatesJ2EE Professional by Shadab siddiquiJAVA server pages by Larne PekowsleyJAVA Server pages by Nick Todd

DEPT OF CSE, GPREC, KNL Page 112

Page 113: Hospital management system

Medi-Tracker

HTML:HTML Black Book by Holzner

JDBC:Java Database Programming with JDBC by Patel moss.Software Engineering by Roger Pressman

DEPT OF CSE, GPREC, KNL Page 113