You are on page 1of 61


The project aims at providing corporate information and hospital statistics can be viewed in a web on the Internet. This Information is to be integrated into the existing web page of the company but the access to it would be restricted to the Administrator and Directors or anybody who has been authorized or register users. According patients needs the hospital management introduce Health Card Schemes like one year health card, two year health card and lifelong Health Cards? First Patient chooses the health card according to the patient requirement, depending on Health card patient get the discount on medical bill. Every person who is willing to take the health cards, depending on card value, first they pay Card Value to Organization. This information is shared to all the branches of the Hospital group so that they can maintain global information of the group. The system developed and installed will be good benefit to the organization. The system will be developed and operated in the existing hardware and software infrastructure. So there is no need of additional hardware and software for the system This system can be implemented in the organization because there is adequate support from management and users. Being developed in Java so that the necessary operations are carried out automatically. If the subscriber of the Health Card is suffering with ill health they will be given initial treatment without any consultancy charges.


The existing system is manual and the manual system works in the following way: In the existing system the patient or the user has to go the hospital with his total prescriptions and everything. It is also very economic if you went to multispecialty hospitals and also when you transfer or migrate from one location to another location.


To overcome all the difficulties of the existing system the management has proposed automated the whole system and the development of the new automated system contains the following activities, which try to automate the entire process keeping in view of the database integration approach. In the proposed system no need to take all the prescription with us because it stored in the database it is also economically good because they will provide the concisions for the patients who are registered with that organization. Based on the health card selected by the patient he will get the discount

A feasibility study is a high-level capsule version of the entire System analysis and Design Process. The study begins by classifying the problem definition. Feasibility is to determine if its worth doing. Once an acceptance problem definition has been generated, the analyst develops a logical model of the system. A search for alternatives is analyzed carefully. There are 3 parts in feasibility study. 1. Operational 2. Technical 3. Economical

2.1.1 Operational Feasibility

Question that going to be asked are Will the system be used if it developed and implemented. If there was sufficient support for the project from the management and from the users. Have the users been involved in planning and development of the Project. Will the system produce poorer result in any respect or area?

This system can be implemented in the organization because there is adequate support from management and users. Being developed in Java so that the necessary operations are carried out automatically.

2.1.2 Technical Feasibility

Does the necessary technology exist to do what is been suggested Does the proposed equipment have the technical capacity for using the new system? Are there technical guarantees of accuracy, reliability and data security? 3

The project is developed on Pentium III with 128 MB RAM. The environment required in the development of system is any windows platform. The observer pattern along with factory pattern will update the results eventually. The language used in the development is JAVA J2SDK1.4.0, Servlets, JDBC, Tomcat Server and database as Oracle 8i.

2.1.3 Economical Feasibility

The system developed and installed will be good benefit to the organization. The system will be developed and operated in the existing hardware and software infrastructure. So there is no need of additional hardware and software for the system. The System developed can reduce the cost overheads of the organization in providing the internet services for establishing the communication channel between the organization staff in conducting the organizational works in smoother and time effective manner.


Create a New Branch Assign a Branch Manager Generate a new Type of Health Card Assigning of Health Card Specifications

2.2.2 Branch Head Module

Taking Enquiry Details From Customers Register The New Customers And Also Register The Customer Relation Details Modify The Customer Details(If Required)


The system should be able to interface with the existing system The system should be accurate The system should be better than the existing system


Processor RAM Capacity : : Pentium IV 1GB


Technology Web-Technologies Web Server : : : J2SE and J2EE HTML, JavaScript , CSS Tomcat 6.0


A data flow diagram is graphical tool used to describe and analyze movement of data through a system. These are the central tool and the basis from which the other components are developed. The transformation of data from input to output, through processed, may be described logically and independently of physical components associated with the system. These are known as the logical data flow diagrams. The physical data flow diagrams show the actual implements and The movement of data between people, departments and workstations.

development of DFDS is done in several levels. Each process in lower level diagrams can be broken down into a more detailed DFD in the next level. The loplevel diagram is often called context diagram. It consists a single process bit, which plays vital role in studying the current system. The process in the context level diagram is exploded into other process at the first level DFD. DFD Symbols In the DFD, there are four symbols 1. A square defines a source(originator) or destination of system data 2. An arrow identifies data flow. It is the pipeline through which the information flows 3. A circle or a bubble represents a process that transforms incoming data flow into outgoing data flows. 4. An open rectangle is a data store, data at rest or a temporary repository of data

Process that transforms data flow.

Source or Destination of data Data flow Data Store

Admin Dfd

Fig:2.6.1. Admin Dfd

3.1 UML DIAGRAMS(Unified Modeling Language)
UML is a notation that resulted from the Unification of Object Modeling Technique and Object Oriented Software Technology .UML has been designed for broad range of application. Hence, it provides constructs for a broad range of systems and activities. USE CASE DIAGRAMS To model a system the most important aspect is to capture the dynamic behaviour. To clarify a bit in details, dynamic behaviour means the behaviour of the system when it is running, operating. Purpose The purpose of use case diagram is to capture the dynamic aspect of a system. But this definition is too generic to describe the purpose. Because other four diagrams (activity, sequence, collaboration and Statechart) are also having the same purpose. So we will look into some specific purpose which will distinguish it from other four diagrams. Use case diagrams are used to gather the requirements of a system including internal and external influences. These requirements are mostly design requirements. So when a system is analyzed to gather its functionalities use cases are prepared and actors are identified. Now when the initial task is complete use case diagrams are modelled to present the outside view. So in brief, the purposes of use case diagrams can be as follows:

Used to gather requirements of a system. Used to get an outside view of a system. Identify external and internal factors influencing the system. 10

3.1.1 Class Diagram

Fig Class Diagram


3.1.2 Usecase Diagram

Add Branch Head


Add Card type


Fig Usecase Diagram


3.1.3 Sequence Diagrams

Sequence Diagram For Admin

Administrator login details


Add New Branch Head verify

Add New Card


Branch Details Branch created

Add New Type of Card

Card Created

Request for Reports Reports Generated

Fig Sequence Diagram For Admin


Sequence Diagram For Branch Head

: BranchHead login Details






verify login Succed Enter Enquiry stoted enquiry details

Request for Registration Registration Successful

Requst ing for Reports Generate reports

Reques for Logout

Logout Success

Fig Sequence Diagram For Branch Head


3.1.4 Collaboration Diagram

Collaboration Diagram For Admin

Fig Collaboration Diagram For Admin


3.1.5 Activity Diagram


Fig Activity Diagram

3.1.6 Deployment Digram


Fig Deployment Digram

3.2 E-R Diagram


Fig 3.2.1 E-R Diagram



Field Name
username password

Data Type
Varchar2(20) Varchar2(20)

not null not null


Branchhead Field Name

name username password phone jdate mobile email address branch city pin state state varchar2(20) varchar2(20) varchar2(20) number(20) Date varchar2(20) varchar2(20) varchar2(20) varchar2(20) varchar2(20) number(6) varchar2(20) number(10) Table:3.3.2

Data Type


primary key

Card Field Name

cno cname capacity validity discount

Data Type
number(5) varchar2(10) number varchar2(10) Number 20

primary key


Number Table 3.3.3

Enquiry Field name

name age sex district designation qualification state address phone nsize branch bdate

data type
varchar2(20) number varchar2(10) varchar2(20) varchar2(20) varchar2(20) varchar2(20) varchar2(20) number(20) number(5) varchar2(20) date Table 3.3.4


Registration Field Name

cno cname capacity validity discount amount regno hname designation sex phone branch qualification address pin state

Data Type
number(5) varchar2(20) number(4) varchar2(20) number(4) number(5) number(5) varchar2(20) varchar2(20) varchar2(10) number(10) varchar2(20) varchar2(20) varchar2(20) number(10) varchar2(20) 21

foreign key

primary key

jdate district

date varchar2(20) Table: 3.3.5

Reg Desc Field Name

regno name1 sex1 age1 relation

Data Type
number varchar2(20) varchar2(7) number varchar2(20) Table:3.3.6

foeign key

Implementation is the stage of the project when the theoretical design is turned out into a working system. Thus it can be considered to be the most critical stage in achieving a successful new system and in giving the user, confidence that the new system will work and be effective. The implementation stage involves careful planning, investigation of the existing system and its constraints on implementation, designing of methods to achieve changeover and evaluation of changeover methods.

Technologies Used About J2EE

The J2EE platform uses a multitier distributed application model. Application logic is divided into components according to function, and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multitier J2EE environment to which the application component belongs. Although a J2EE application can consist of the three or four tiers shown in Figure


J2EE multitier applications are generally considered to be three-tiered applications because they are distributed over three different locations: client machines, the J2EE server machine, and the database or legacy machines at the back end.

Fig 4.1.1 Multitier Applications

J2EE Components
A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files. The J2EE specification defines the following J2EE components:
Application clients and applets are components that run on the client. Java Servlet and Java Server Pages components that run on the server. Enterprise JavaBeans (EJB ) components (enterprise beans) are business (JSP ) technology components are Web

components that run on the server.

J2EE components are written in the Java programming language and are compiled in the same way as any program in the language.

J2ee Clients
A J2EE client can be a Web client or an application client.

J2EE Server Communications

Figure 4.1.2 shows the various elements that can make up the client tier. The client communicates with the business tier running on the J2EE server either directly or, 23

as in the case of a client running in a browser, by going through JSP pages or Servlets running in the Web tiers

Fig 4.1.2 .Server Communications

Web Components
J2EE Web components can be either Servlets or JSP pages. Servlets are Java programming language classes that dynamically process requests and construct responses. JSP pages are text-based documents that execute as Servlets but allow a more natural approach to creating static content. Like the client tier and as shown in Figure 7-c, the Web tier might include a JavaBeans component to manage the user input and send that input to enterprise beans running in the business tier for processing.

Fig 4.1.3 .Web Tier and J2EE Application


Business Components
Business code, which is logic that solves or meets the needs of a particular business domain such as banking, retail, or finance, is handled by enterprise beans running in the business tier. Figure 7-d shows how an enterprise bean receives data from client programs, processes it (if necessary), and sends it to the enterprise information system tier for storage. An enterprise bean also retrieves data from storage, processes it (if necessary), and sends it back to the client program.

Fig 4.1.4 Business and EIS Tiers JDBC API 2.0 The JDBC API lets you invoke SQL commands from Java programming language methods. You use the JDBC API in an enterprise bean when you override the default container-managed persistence or have a session bean access the database. The JDBC API has two parts: an application-level interface used by the application components to access a database, and a service provider interface to attach a JDBC driver to the J2EE platform.

Introduction To Jsp


The goal of the java server page specification is to simplify the creation and management of dynamic web page by separating content and presentation JSP as basically files that combine html and new scripting tags. the JSP there look somewhat like HTML but they get translated into java Servlet the first time are invoked by a client. The resulting Servlet is a combination of the html from the JSP file and embedded dynamic content specified by the new tag. The first time JSP is loaded by the JSP container. The Servlet code necessary to fulfill the JSP tags is automatically generated compiled and loaded into the Servlet container. From then on as long as the JSP source for the page is not modified. This compiled Servlet processes browser request for the JSP page. If you modify the JSP source code, it is automatically recompiled and relocated the next time that page is request

The Nuts And Bolts

DIRECTIVES these affect the overall structure of the Servlet that result from translation Scripting elements these let you insert java code into the JSP page. Action these are special tags available JSP. You can also write your own tags as we shall.

Some general rule of JSP page: JSP tags are case sensitive. Directive and scripting element have a syntax which is not based on xml alternative page. Tags Based On Html Syntax Are Also Available.


The HTTP Protocol

In distributed application development, the application level or wire level communication protocol determines the nature of client and servers. The complexity of feature possible in your web browser and on the web server(say the on line store you frequent) depends on the underlying protocol that is the HYPER TEXT TRANSFER PROTOCOL(HTTP).

HTTP Request
As an application level protocol, HTTP defines types of request that clients can send to server HTTP specifies three type of request method GET,POST and HEAD has addition request meet most of the common application development needs.

The Get Request Method

The GET request is the simplest and most frequently used Method for accessing static resource such as HTML document image etc. Get Request can also be used to retrieve dynamic information, by using additional query parameter in the request URL.

The Post Request Method

The post method is commonly used for accessing dynamic resource. Typically, POST request are meant to transmit information that is request dependent, and are 27

used when you need to send large amount of complex information to the server. . For example you can use POST REQUEST TO UPLOAD TEXT OR BINARY FILES.

Http Response
In responses to a HTTP request, the server responds with the status of the responses, all these are part of the response header.

Features Of HTTP
HTTP is very simple and lightweight protocol. In the protocol the client always initiate request the server can never make a callback connection to the client. The HTTP requires the client to establish connection prior to each request and the server to close the connection after sending the response this guarantees that the client cannot hold on to a connection even after receiving the request.

JSP provider certain implicit object based on the Servlet API. These objects are accessed using standard variable and are automatically available for use in your JSP without writing any extra code. The impact objects available in a JSP page are: Request Response page context session application out config 28


The request object represents the request that the server invocation. It is the http servlet request that provides access to the incoming HTTP header request type and request parameter. The object implements specific subclass of javax.Servlet.ServletRequest.

THE RESPONSE OBJECT The response object is the http servlet response instance that response instance that the server to the request. It is legal to set HTTP status code and header in the JSP page onceoutput has been sent to the client, javax.servlet.ServletResponse. THE SESSION OBJECT The object represent the session creates for the request client. THE APPLICATION OBJECT The application object represents the servlet context obtained from the servlet configuration object. It is of type javax.Servlet context and has application scope. THE OUT OBJECT The out object is the write into the output stream to the client. To make the represent useful this is a buffered version of the class of type the buffer size can be adjusted via the buffer attribute of the page directive. THE CONFIG OBJECT The config object is the servlet config for this JSP and has page scope. It is of type javax.Servlet.servlet config.


Tomcat Server
Tomcat is a web server which can be used to execute the J2EE components. Tomcat provides many new and changed features, including the following: Dynamic reloading and compilation - You can configure Tomcat to dynamically recompile and reload servlet, servlet helper classes, and Java Server Page (JSP) helper classes when a servlet or JSP is called. Dynamic creation of database tables for entity beans - When you deploy an entity bean and its required database tables do not yet exist, Tomcat generates tables for you if you configured the appropriate settings in the Tomcat deployment descriptor. JRun Management Console (JMC) - The redesigned, JMX-enabled JMC provides an easy-to-use, intuitive graphical user interface for managing your local and remote JRun servers.

Java Database Connectivity (JDBC)

JDBC AND ODBC IN JAVA Most popular and widely accepted database connectivity called Open Database Connectivity (ODBC) is used to access the relational databases. It offers the ability to connect to almost all the databases on almost all platforms. Java applications can also use this ODBC to communicate with a database. Then we need JDBC why? There are several reasons: ODBC API was completely written in C language and it makes an extensive use of pointers. Calls from Java to native C code have a number of drawbacks in the security, implementation, robustness and automatic portability of applications. ODBC is hard to learn. It mixes simple and advanced features together, and it has complex options even for simple queries.


Architecture of JDBC
JDBC Architecture contains three layers: JDBC Application JDBC Drivers JDBC Drivers Fig 4.1.5 Architecture of JDBC When a request received by the application, the JDBC driver passes the request to the ODBC driver, the ODBC driver communicates with the database and sends the request and gets the results. The results will be passed to the JDBC driver and in turn to the application. So, the JDBC driver has no knowledge about the actual database, it knows how to pass the application request o the ODBC and get the results from the ODBC. Within the file, divide your data into separate storage containers called tables; view, add, and update table data by using online forms; find and retrieve just the data you want by using queries; and analyze or print data in a specific layout by using reports. To store your data, create one table for each type of information that you track. To bring the data from multiple tables together in a query, form, report, or data access page, define relationships between the tables. To find and retrieve just the data that meets conditions that you specify. A query can also update or delete multiple records at the same time, and perform predefined or custom calculations on your data. To easily view, enter, and change data directly in a table, create a form. When you open a form, Microsoft Access retrieves the data from one or more tables, and displays it on the screen with the layout you choose in the Form Wizard, or a layout that you create from scratch


OFFERED SYSTEM The existing system is the harder one to bid the product. The blue-collar (manual) system is prone to blunder. It is time consuming. It is very intricate for a person to turn out the testimony. There are odds for changing the scheme testimony and do malpractice. This system engages a lot of blue-collar entries with the appliance to achieve the preferred task. This existing system is intricate to be aware of. And other shortcomings in blue-collar system are as follows: Increased disbursement for papers shuffle and storage. Less control of Amounts. Personnel who are sited in poles apart of the world cannot transact resourcefully. ANTICIPATED SYSTEM The anticipated system is premeditated to eradicate the negative aspect of the offered system. The primary aim of the new system is to accelerate business dealings. The testimony is primed for the schemes and put into practice under the regulation of the concerned bureaucrat. This anticipated System is used to trim down the difficulties. Anticipated system is very constructive and is trouble-free. Dozens of companies are in the race to convince auction and bidding that a pot of auction product awaits those who conduct their business on the Internet. In this fast battle of commerce and moneymaking, no country, no corporation and no creature would like to descend back. One and all want to lead the group. Now, no more individual aspires at the local market is also just a click of button away. Hence, everyone is trying to make the best use of Internet; our anticipated system also meets up the desires of the patron who can bid all the way through online.



<%@ page import="java.sql.*" errorPage="" %> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#006600"> <% System.out.println("enter into the relationsmodify1.jsp"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:smartcard","smartcard","smartcard"); Statement stmt=con.createStatement(); ResultSet rs=stmt.executeQuery("select branch,sum(amount),count(cname) fromreggroup by branch"); %> <table width="314" border="2" align="center" cellpadding="2" cellspacing="2" bordercolor="#CC66FF"> <tr> <th width="153" bgcolor="#FF66CC"><font color="#333333">Branch</font></th> <th width="80" bgcolor="#FF66CC">Amount</th> <th width="51" bgcolor="#FF66CC">Count</th> </tr> <%while({%> <tr> <td><%=rs.getString(1)%></td> <td><%=rs.getString(2)%></td> <td><%=rs.getString(3)%></td> </tr> <%}%> 33

</table> <p>&nbsp;</p> <p></p> </body> </html> <%@ page import="java.sql.*" errorPage="" %> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#009966"> <form name="form1" method="post" action="./chairmansuccess.jsp"> <CENTER><marquee behavior="alternate"> <table width="601" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="55" > <div align="center"><font color="#FFFF00" size="4" face="Monotype Corsiva">WELCOME TO SMART CARD ADMINISTRATOR</font></div></td> </tr> </table></marquee><p>&nbsp;</p></CENTER> <table width="274" border="0" align="center" cellpadding="2" cellspacing="4"><tr> <td width="101" height="10" bgcolor="white"><font color="#0000FF" face="Monotype Corsiva">User Name</font></td> <td width="159"><font color="#FF9900"><input name="username" type="text" id="username"></font></td> </tr> <tr> <td height="10" bgcolor="white"><font color="#0000FF" face="Monotype Corsiva">Pass Word</font></td> <td> <font color="#FF9900"><input name="password" type="password" id="password"></font></td> 34

</tr> <tr> <td><center> <font color="#00FF66"><input name="Submit" type="submit" id="Submit" value="Login"></font> </center></td> <td><center> <input type="reset" name="Submit2" value="Reset"> </center></td> </tr> </table> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> </form> </body> </html>


Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design and coding. In fact, testing is the one step in the software engineering process that could be viewed as destructive rather than constructive. A strategy for software testing integrates software test case design methods into a well-planned series of steps that result in the successful construction of software. Testing is the set of activities that can be planned in advance and conducted systematically. The underlying motivation of program testing is to affirm software quality with methods that can economically and effectively apply to both strategic to both large and small-scale systems.

Unit testing focuses verification effort on the smallest unit of software design, the module. The unit testing we have is white box oriented and some modules the steps are conducted in parallel.

White Box Testing

This type of testing ensures that All independent paths have been exercised at least once All logical decisions have been exercised on their true and false sides All loops are executed at their boundaries and within their operational bounds All internal data structures have been exercised to assure their validity. To follow the concept of white box testing we have tested each form .we have created independently to verify that Data flow is correct, All conditions are exercised to check their validity, All loops are executed on their boundaries.


Basic Path Testing

Established technique of flow graph with Cyclometer complexity was used to derive test cases for all the functions. The main steps in deriving test cases were: Use the design of the code and draw correspondent flow graph. Determine the Cyclomatic complexity of resultant flow graph, using formula: V(G)=E-N+2 or V(G)=P+1 or V(G)=Number Of Regions Where V(G) is Cyclomatic complexity, E is the number of edges, N is the number of flow graph nodes, P is the number of predicate nodes. Determine the basis of set of linearly independent paths.

Conditional Testing
In this part of the testing each of the conditions were tested to both true and false aspects. And all the resulting paths were tested. So that each path that may be generate on particular condition is traced to uncover any possible errors.

Data Flow Testing

This type of testing selects the path of the program according to the location of definition and use of variables. This kind of testing was used only when some local variable were declared. 37

The definition-use chain method was used in this type of testing. These were particularly useful in nested statements.

Loop Testing
In this type of testing all the loops are tested to all the limits possible. The following exercise was adopted for all loops: All the loops were tested at their limits, just above them and just below them. All the loops were skipped at least once. For nested loops test the inner most loop first and then work outwards. For concatenated loops the values of dependent loops were set with the help of connected loop. Unstructured loops were resolved into nested loops or concatenated loops and tested as above. Each unit has been separately tested by the development team itself and all the input have been validated.


Test Case ID Testcase name TestCase descrption Expecting Output Actual output Result

Enter user id 1 Enter 2 password Login 3 operation

Userid lowercase. password lowercase.

is Accepting user id

Accepting user id Accepting password Pass Pass

focused.should be is Accepting password

focused.should be Enter and Verify It userid submit on will display

a It

will Pass

and welcome page

display welcome page



Home Screen

Fig6.1 Home Screen


Admin Screen

Fig 6.2 Admin Screen


New Branch head

Fig 6.3 New Branch head


Modify Branch head

Fig 6.4 Modify Branch head


Delete Branch head Details

Fig 6.5 Delete Branch head Details


Add New Card

Fig 6.6 Add New Card


Modification Of Table

Fig 6.7

Modification Of Table


Modification of card

Fig 6.8 Modification of card


Branchhead login

Fig 6.9 Branchhead login


Enquiry form

Fig 6.10 Enquiry form


New Registration

Fig 6.11 Enquiry form



Fig 6.12 RelationTable



Fig 6.13 Modifyregistration



Fig 6.14 Registration


Relation Modify

Fig 6.15 Relation Modify


Relation Modify

Fig 6.16 Relation Modify


Check Number

Fig 6.17 Check Number



Fig 6.18 Details


Cardwise Amount

Fig 6.19 Cardwise Amount


Branchwise Details

Fig 6.20 Branchwise Details



The main objective of the project is to automate the "smartcard". By using ORACLE as back-end and Java as front-end under WINDOWs environment.This project "Health Card" is very useful and helpful because the effiency will improve with better way of communication among Administrator-Manager, Manager- Customer. Reliable and accurate reports could be available with in a very short time, which is not possible if done manually. The future work of project is for increasing the Business World wide we may globalize the site. Addition of some more new categories may takes place. site Updating module may be added. For existing


1. H.M.DIETEL.P.J.DIETEL, Java How to Program, PhL, Second Edition 2. Gray Cornett, Horstmann, CorelJava, Sunsoft Press, 1996. 3. Patrick Naughton & Herbert Schildt, Java : The Complete Reference, Tata McGraw-Hill, Macrch 1997. 4. Grady Booch, Object Oriented Analysis and Design with Applications, the Benjimin/Cummings, 1994.