SlideShare a Scribd company logo
1 of 77
PROJECT REPORT
“Hospital Management System"

SUBMITTED IN PARTIAL FULFILLMENT FOR THE
DEGREE OF
MASTER IN COMPUTER APPLICATIONS
MCA-LE (Session 2011-2013)

Under The Guidance:
Mr. SAVAAB ALI KHAN
(Sr.Lecturer)
SUBMITTED BY:
RACHIT GAUR(11403960488)

SUBMITTED TO:
KHUSHBU DOULANI
(TEAM LEADER)
IT DEPTT.-MCMIT
Preface
Information is a valuable resource to an organization. Computer software
provides an efficient means of processing information, and HOSPITAL
MANAGEMENT SYSTEM are nowadays becoming increasingly common means
by which it is possible to store and retrieve information (regarding hospital) in an
effective manner. This book provides comprehensive coverage of fundamentals of
HOSPITAL MANAGEMENT SYSTEM. This book is for those who wish a better
understanding of relational data modeling, its purpose, its nature, and the standards
used in creating relational data model. Relational databases are the most popular
database management systems in the world and are supported by a variety of
vendor implementations.
Majority of the practical tasks in industry require applying relatively not
complex algorithms to huge amounts of well-structured data. The efficiency
of the application depends on the quality of data organization. Advances in
database technology and processing offer opportunities for using information
flexibility and efficiently when data is organized and stored in relational structures.
The relational DBMS is a success in the commercial market place with
respect to business data processing and related applications. This success is
a result of cost effective application development combined with high data
consistency. The success has led to the use of relational DBMS technology in
other application environments requesting its traditional virtues, while at the
same time adding new requirements.
ACKNOWLEDGEMENT
I take this opportunity to express my sincere thanks and
deep gratitude towards Mr. SABAB ALI KHAN for his
valuable guidance and co-operation in starting this Project
successfully. Development of project like “HOSPITAL
MANAGEMENT SYSTEM” in JAVA is not a too much
difficult task but fairly a puzzle one.
This language teaches so much about database
programming and new version. This project is a part of
our MCA course. I have developed this project with the
help of Faculty members of my Institute MCMIT and as
such I am extremely grateful to all of them. I am obliged to
my project guide Mr. SABAB ALI KHAN
TABLE OF CONTENTS (with Page Numbers)
INTRODUCTION
OBJECTIVES
TYPE OF PROJECT
REQUIRMENT OF H/W & S/W
MODULES OF THE PROJECT
TESTING METHOD
ER DIAGRAM
DFD

FUTURE SCOPE AND FURTHET ENHANCEMENT OF THE PROJECT

INTRODUCTION/OBJECTIVE
 The goal of any system development is to develop and implement the system cost
effectively; user-friendly and most suited to the user’s analysis is the heart of
the process. Analysis is the study of the various operations performed by the system
and their relationship within and outside of the system. During analysis, data
collected on the files, decision points and transactions handled by the present system.
Different kinds of tools are used in analysis of which interview is common one.
The drawback of the existing system is that it is very difficult to retrieve data from
case files. It is difficult to handle the whole system manually and it is less accurate
and to keep the data in case files for future reference because it may get destroyed.
Moreover it is very difficult to retrieve data. Redundancy of data may occur and this
may lead to the inconsistency. The manual system is so time-consuming.
The proposed system is very easy to operate. Speed and accuracy are the main
advantages of proposed system. There is no redundancy of data. The data are
stored in the computer’s secondary memories like hard disk, etc. it can be easily
receive and used at any time. The proposed system will easily handle all the data
and the work done by the existing systems. The proposed systems eliminate the
drawbacks of the existing system to a great extent and it provides tight security to
data.

OBJECTIVE
Hospital Management System is powerful, flexible, and easy to use and is designed
and developed to deliver real conceivable benefits to hospitals and clinics and more
importantly it is backed by reliable and dependable of users
Hospital Management System is designed for multi specialty hospitals, to cover a wide
range of hospital administration and management processes. It is an integrated end-toend Hospital Management System that provides relevant information across the
hospital to support effective decision making for patient care, hospital administration
and critical financial accounting, in a seamless flow.
Hospital Management System is a software product suite designed to improve the
quality and management of clinical care and hospital health care management in the
areas of clinical process analysis and activity-based costing. Hospital Management
System enables you to develop your organization and improve its effectiveness and
quality of work. Managing the key processes efficiently is critical to the success of the
hospital helps you manage your processes.

TOOLS AND ENVIRONMENT USED
HARDWARE REQUIREMENT1. Pentium4 or Above
2. 256 MB RAM(MIN)
3. 1 GB RAM(MAX)
4. 20 GB Hard Disk(MIN)
5. 1.33 MHz speed(MIN)
6. 50 MB(for package itself)
7. Dot Matrix/HP Laser/HP/DeskJet/HP Inkjet Printer
8. Optical Mouse
9. 15’inch Color Monitor

Software Requirements:1.

WIN XP Operating System

2.

WIN 7 Operating System

3.

WIN Vista Operating System

4.

JDK 1.6

5.

ORACLE

JAVA
Introduction:
Java is a new and popular language created by sun Microsystems. The best
news about java is that it is object oriented architecture, interpreted, robust,
secure, portable, high performance, multithreaded & dynamic language.
With java, we can develop a single application i.e. immediately usable on multiple
platforms. Imagine the countless hours that will save by being able to develop a
single application usable on windows, UNIX & Macintosh system.
Java produces two program types’ application & Applet. Applications are
standard one & can be run directly from me command line. Applets requires on
external program to provide an interface to the user.
Java defines data as objects with methods that support the objects. Java is
purely objects. Java is purely object oriented & provides abstraction,
encapsulation, inheritance & polymorphism.

Even a very basic program has a class. Any code written is java is inside a class.
Java is tuned to the web, java programs can be built in java, that user’s resource
from any other computer.
Java is the both interpreted & compiled. The code is complied. The code is
compiled with a byte code i.e. binary & platform independent. When a program
has to execute the code is fetched into management & interpreted on the user’s
machines as on interpreted language, java has simple syntax.
When a piece of code is compiled all errors are listed together. A program is
executed only when all the errors have been rectified. An interpreter, on the other
hand, verifies the code & execution reaches the statement with an error is the
error report.
Compilation is the process of converting the code into a language that
the compiler understands machines language. When compiling a program using
a compiler, the compiler checks for syntactical (grammatical) errors. In code and
lists all the errors on the screen. The errors are rectified and the program is
recompiled to get the machine language code. Java compilers compile the code
to a byte code that is understood by the java environment.
Byte code is result of compiling a java program this code can be executed on
any platform. In other words due to the byte cod compilation processes an
interpretation by a browser, java programs can be executed on a variety of
hardware and software. The only requirement is that the system should have a
java enabled internet browser. A java compiler is written in java and the run time
environment, the interpreter is written in c. the java interpreter can execute java
code directly on any machine, on which java a interpreter has been installed.

A java program can run on any machine that has a java interpreter. The byte
code supports connection to multiple databases. Java code is portable. There
fore, other people can use programs that you write in java even if they have
different machines with different operating system.
Due to strong type checking done by java on the user’s machine any changes to
the program are tagged as errors and program will not execute, java is there
secure.
Java programs are comparable in speed to the programs written in other
compiler based languages like c and c++. Java is faster than other interpreter
based languages like basic sense it is compiled and interpreted.
Multithreading is the ability of an application to perform multiple task at same
time. For example, when you play game on your computer one task of the
program that is handle sound effects and another to handle screen display. A
single program accomplishes many tasks, simultaneously.
A java program can consists of many modules that are written by many
programmers. These modules may undergo many changes. Java makes
interconnections between modules and at the run time, which easily avoids the
problem caused by the change of the code used program. Java is thus dynamic.

A few types of java applications are listed below:
Applications that do not use graphical user interface (GUI)-they are similar
to traditional programs written in c and c++.
Applications using GUI. These applications are used in windows
environment.
Applets these programs run on a web page and require a java enabled
browser like internet explorer or Netscape navigator.
Packages-packages are collections of classes that can be shared by
applications and applets. They can similar to the libraries provided by other
language like c++. Java provides many packages like long and util.
RDBMS
ORACLE
ORACLE DATABASE:ORACLE is a database vendor that uses to design relational database.
A database management system, or DBMS, gives the user access to their data
and helps them transform the data into information. Oracle allows users to
create, update, and extract information from their databases. Compared to a
manual filing system, the biggest advantages to a computerized database
system are speed, accuracy, and accessibility. A database is a structured
collection of data. Data refers to the characteristics of people, things, and events.
Oracle stores each data item in its own field. In Oracle, the fields relating to a
particular person, thing, or event are bundled together to form a single, complete
unit of data, called a record (it can also be referred to as a row or an occurrence).
Each record is made up of a number of fields. No two fields in a record can have
the same field name.
During an Oracle database design project, the analysis of our
Business needs identifies all the fields or attributes of interest.
If your business needs change over time, you define any additional fields or
change the definition of existing fields.

ORACLE TABLE
Oracle stores records relating to each other in a table. A table is easily visualized
as a tabular arrangement of data, not unlike a spreadsheet, consisting of vertical
columns and horizontal rows. A table consists of a number of records. The field
names of each record in the table are the same, although the field values may
differ. Each field occupies one column and each record occupies one row. Each
record is a unique entry and is Independent of any other record in the table. After
the analysis of the business requirements, the database design team defines the
necessary tables. Different tables are created for the various groups of
information Related tables are grouped together to form a database.
Primary Keys
Every table in Oracle has a field or a combination of fields that uniquely identifies
each record in the table. This unique identifier is called the primary key, or simply
the key. The primary key provides the means to distinguish one record from all
the others in a table. It allows the user and the database system to identify,
locate, and refer to one particular record in the table. The database design team
determines the best candidate field for the primary key. Once a table has been
assigned a primary key, Oracle won't allow more than one record in the table with
the same value for the primary key. No two Employees can have the same ID
number.

Relational Databases
Sometimes all the information of interest to a business operation can be stored in
one table. Oracle makes it very easy to link the data in multiple tables. This is a
key feature of a relational database management system, or RDBMS. They store
data in two or more tables and enable us to define relationships between the
tables.
The link between the tables is based on one or more field values common to both
tables.
Foreign Key
Remember that every table in ORACLE has a primary key a field or fields making
each record unique. When a field in one table matches the primary key of
another table, the field is referred to as a foreign key. A foreign key is a field or a
group of fields in one table whose values match those of the primary key of
another table. You can think of a foreign key as the primary key of a foreign
table.

MODULES

DOCTOR
(INSERT, SELECT, UPDATE, DELETE)
PAITEINT
(INSERT, SELECT, UPDATE, DELETE)
STAFF
(INSERT, SELECT, UPDATE, DELETE)
BILLING
ROOM
GENERATING REPORTS
TESTING

INTRODUCTION
Testing is the most important aspect of any project. A web application becomes more
crucial since the information is to be viewed by thousands of users. It is essential for
developer to make sure that the web presentation work well from technical and well as
usability side.
We have performed the module level testing and content verification before going for
integrity and usability testing.

WHITE BOX TESTING
White box testing called glass box testing, is a test case design method that uses the
control structure to derive test cases. Using white box testing methods the software
engineer can derive test cases that
Guarantee that all independent paths within a module have been exercised
Exercise all logical decisions on their true and false sides
Execute all loops at their operational bounds
Exercise internal data structure to ensure their validity

A reasonable question might be imposed at this juncture: “why spend time and energy
worrying about (and testing) logical minutiae when we might better expend effort
ensuring that program requirements have been met?
Stated another way, why don’t we spend all of our energy on black box tests?
The answer lies in nature of software defects.
Logical errors and incorrect assumptions are inversely proportional to the probability
that a program path will be executed.
Errors tend to creep into our work when we design and implement
Function, conditions, or control that is out of mainstream. Everyday
Processing tends to be well understood while “special case” processing tends to fall into
cracks.
We often believe that a logical path is not likely to be executed when, infect it may be
executed on regular basis.
The logical flow of a program is sometimes counterintuitive, meaning that our
unconscious assumptions about flow of control and data may lead us to make design
errors that are uncovered only once path testing commences.
Typographical errors are random.
When a program is translated into programming language source code, it is likely that
some typing errors will occur. Many will be uncovered by syntax and type checking
mechanisms, but others may go undetected until testing begins. It is as likely that a typo
will exist on mainstream path.
Each of these provides an argument for conducting white box tests. Black box testing is
far more likely to uncover them.

BLACK BOX TESTING
Black box testing also called “behavioral testing”, focuses on the functional requirements
for a program. Black box testing is not an alternative to white box techniques. Rather it is
a complimentary approach that is likely to uncover a different class of errors than white
box methods.
Black box testing attempts to find errors in the following categories:
Incorrect or missing functions.
Interface Error
Errors in data stream or external database access.
Behavioral or performance errors
Initializations or termination errors
Unlike white box testing, which is performed early in the testing process, black box
testing tends to be applied during later stages of testing. Black box testing purposely
disregards control structure; attention is focused on the information domain. Test are
designed to answer the following questionsHow is functional validity tested?
How is system behavior and performance tested?
What classes of input will make good test cases?
Is the system particularly sensitive to certain input values?

By applying black box techniques we derive a set of test cases that satisfy the following
criteriaTest cases that reduce by a count that is greater than one, the number of additional test
cases that must be designed to achieve reasonable testing and
Test cases that tell us something about the presence or absence of classes of errors,
rather than an error associated only with the specific test at hand.
ER DIAGRAM
About E-R Diagram:
The entity –relationship (E-R) data model is
based on a perception of real world which consist of basic objects called entities
and relationship among these objects. The E-R model was introduced by P.P.
Chen. Chen introduced not only E-R model but also a corresponding
diagramming technique.
E-R diagram is used to represent the entities and their relationship to other
entities. It uses some symbols to represent the objects of E-R diagram.

Entity:
Entity is an object which has its own existence and can be distinguish
from other objects. Entity is represented by a set of attributes. An entity is any
object, place, person, concept or activity about which an enterprise records data.
While diagramming entity is named and represented by a rectangle.
Attribute:
Attributes are descriptive properties processed by each member of
an entity. Attributes are represented through ellipses, labeled with the name of
the property. The key attribute are underlined.

Relationship:
A relationship is an association among several entities. A
relationship defines the association of entity type relationship instance is an
association of entity instances. There are three types of relationship:

One to One relationship
One to Many relationships
Many to Many relationship

E-R Diagram Symbols
Entity

Relationship

Weak relationship
Attribute

Composite attribute

Key attribute
Partial key

Derived attribute

MODULE DETAILS
DATA DICTIONARY
CLASS DIAGRAM
DATA FLOW DIAGRAM

DFD (Data Flow Diagram):
Data Flow Diagram (abbreviated as DFD) was introduced by De
Marco(1978) and Gane and Sarson(1979),and is important tool used by
system analysts. A DFD models a system by using external entities from
which data flows to process which transform data and creates output data
flow which go to other process or external entities or data stores. Stored
data may also flow to processes as inputs.
The main merit of DFD is that it can provide an overview of
what data a system would processes, what transformations of data are
done, what data are stored and which stored data is used, and where the
result is flow.

Symbols Used In DFDs:
Four symbols are used in drawing DFDs. A circle is used to
depict a process. Process are numbered and given a name. The term
bubble is also sometimes used instead of circle.
Data flows are represented by a line with an arrow. Arrow shows the
direction of flow of data. The name of the data appears next to the line.

External entities are represented by rectangles, and are outside the system.
Entities supplying data are known as sources and those that consume data
are called sinks.
Data store is depicted by two lines. Data store stores data. If an arrow points
to the store, it indicates operation of writing in the store. If it points away from
the store, it indicates operation of reading from the store.
Data flow can take place between processes, from
A data store to a process,
A process to a data store
An external entity to a process, or
From a process to an external entity.

Data flow can’t take place between to a data stores or between two external
entities.
DFD SYMBOLS
Represents Process

Represents Data Flow
Represents External Entity

Represents Data Store

0 LEVEL
MODULE DETAILS
1 LEVEL

2 LEVEL
CODING
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.*;
import java.awt.font.*;
import com.sun.java.swing.plaf.motif.*;
import com.sun.java.swing.plaf.windows.*;

public class desk extends JFrame implements ActionListener
{

Container con;
JMenuBar menubar;

JMenu patient,doctor,emp,hospital_record,report,quit;

JMenuItem regi,edit1;

JMenuItem new_doc,edit2;
JMenuItem new_emp,edit3;

JMenuItem dio,admit,dis;

JMenuItem report1;

JMenuItem exit;

Dimension sd;
JDesktopPane d1;

public desk(String currentuser)
{

super(currentuser);

d1=new JDesktopPane();
setContentPane(d1);;
con=getContentPane();
con.setLayout(null);
con.setBackground(new Color(79,75,63));
sd=Toolkit.getDefaultToolkit().getScreenSize();
MotifLookAndFeel mlf=new MotifLookAndFeel();

menuCreation();
}

public static void main(String args[])
{
desk d=new desk("

CENTRALI

S E D H O S P I T A L M A N A G E M E N T S Y S T E M ");
Dimension sd=Toolkit.getDefaultToolkit().getScreenSize();
d.setSize(sd.width,sd.height);
d.show();
}

public void menuCreation()
{

//-------------------//'menubar' creation
//-------------------Dimension sd=Toolkit.getDefaultToolkit().getScreenSize();
menubar=new JMenuBar();
menubar.setBounds(0,0,sd.width+2,25);
//menubar.setBorder(new BevelBorder(BevelBorder.RAISED));
con.add(menubar);

patient=new JMenu("PATIENT

");
menubar.add(patient);
patient.setFont(new Font("Arial",Font.BOLD,13));

doctor=new JMenu("DOCTOR

");

menubar.add(doctor);
doctor.setFont(new Font("Arial",Font.BOLD,13));

emp=new JMenu("EMPLOYEE

");

menubar.add(emp);
emp.setFont(new Font("Arial",Font.BOLD,13));

hospital_record=new JMenu("HOSPITAL RECORD
menubar.add(hospital_record);
hospital_record.setFont(new Font("Arial",Font.BOLD,13));

report=new JMenu("REPORT

");

menubar.add(report);
report.setFont(new Font("Arial",Font.BOLD,13));

quit=new JMenu("QUIT

");

menubar.add(quit);
quit.setFont(new Font("Arial",Font.BOLD,13));

//PATIENT
//-------

");
regi = new JMenuItem("New Patient Registration");
edit1 = new JMenuItem("Edit Patient detail");
exit= new JMenuItem("Exit ");

//doctor

new_doc = new JMenuItem("New Doctor Entry ");
edit2 = new JMenuItem("Edit Doctor Detail ");

//emp

new_emp = new JMenuItem("New Employee Entry ");
edit3 = new JMenuItem("Edit Employee Detail ");

//hospital
dio = new JMenuItem("Diagnosis ");
admit = new JMenuItem("Admission ");
dis = new JMenuItem("Discharge ");

//report

report1 = new JMenuItem("Show Bill Detail ");

patient.add(regi);
patient.add(edit1);
doctor.add(new_doc);
doctor.add(edit2);

emp.add(new_emp);
emp.add(edit3);

hospital_record.add(dio);
hospital_record.add(admit);
hospital_record.add(dis);

report.add(report1);

quit.add(exit);

regi.setFont(new Font("Arial",Font.PLAIN,13));
edit1.setFont(new Font("Arial",Font.PLAIN,13));

new_doc.setFont(new Font("Arial",Font.PLAIN,13));
edit2.setFont(new Font("Arial",Font.PLAIN,13));

new_emp.setFont(new Font("Arial",Font.PLAIN,13));
edit3.setFont(new Font("Arial",Font.PLAIN,13));
dio.setFont(new Font("Arial",Font.PLAIN,13));
admit.setFont(new Font("Arial",Font.PLAIN,13));
dis.setFont(new Font("Arial",Font.PLAIN,13));

report1.setFont(new Font("Arial",Font.PLAIN,13));

exit.setFont(new Font("Arial",Font.PLAIN,13));

new_doc.addActionListener(this);
new_emp.addActionListener(this);
regi.addActionListener(this);
report1.addActionListener(this);
dio.addActionListener(this);
dis.addActionListener(this);
admit.addActionListener(this);
exit.addActionListener(this);

menubar.requestFocus();
}

public void actionPerformed(ActionEvent event)
{
if(event.getSource()==new_doc)
{
doctor obj=new doctor(d1);
}
else if(event.getSource()==new_emp)
{
staff obj=new staff(d1);
}
else if(event.getSource()==regi)
{
patient obj=new patient(d1);
}

else if(event.getSource()==admit)
{
admit obj=new admit(d1);
}
else if(event.getSource()==report1)
{
report_1 obj=new report_1(d1);
}
else if(event.getSource()==dio)
{
Diagnosis obj=new Diagnosis(d1);
}
else if(event.getSource()==dis)
{
bill obj=new bill(d1);
}
else if(event.getSource()==exit)
{
System.exit(0);
}

}

}

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import java.sql.*;
import java.text.*;
import java.awt.font.*;
import java.util.*;

public class admit extends JFrame implements ActionListener
{

Container c;
JInternalFrame frame;
JDesktopPane d;

JTextField ipdid,date,pid,did,sid,test,dis,treat,ward,room,bed;
JComboBox opdid;

JButton save,reset,close;

public admit(JDesktopPane d)
{
try
{

frame=new JInternalFrame("A D M I S S I O N E N T E R Y F O R
M ",false,true,false,true);
c=frame.getContentPane();
d.add(frame);
c.setLayout(null);

//Memory Allocation
//----------------JLabel lab1=new JLabel("OPD No.");
JLabel lab2=new JLabel("Admit Date");
JLabel lab3=new JLabel("OPD No.");
JLabel lab4=new JLabel("Patient ID");
JLabel lab5=new JLabel("Doctor ID");
JLabel lab6=new JLabel("Satff ID");
JLabel lab7=new JLabel("Test Name");
JLabel lab8=new JLabel("Disease Name");
JLabel lab9=new JLabel("Treatment");
JLabel lab10=new JLabel("Ward No.");
JLabel lab11=new JLabel("Room No.");
JLabel lab12=new JLabel("Bed No.");

opdid=new JComboBox();

ipdid=new JTextField(10);
date=new JTextField(10);
pid=new JTextField(10);
did=new JTextField(10);
sid=new JTextField(10);
test=new JTextField(10);
dis=new JTextField(10);
treat=new JTextField(10);
ward=new JTextField(10);
room=new JTextField(10);
bed=new JTextField(10);

save=new JButton("Save",new ImageIcon("save.gif"));
reset=new JButton("Reset",new ImageIcon("reset.gif"));
close=new JButton("Close",new ImageIcon("close.gif"));

lab1.setBounds(10,10,200,20); ipdid.setBounds(150,10,240,20);
lab2.setBounds(10,40,200,20); date.setBounds(150,40,240,20);
lab3.setBounds(10,70,200,20);opdid.setBounds(150,70,240,20);
lab4.setBounds(10,100,200,20); pid.setBounds(150,100,240,20);
lab5.setBounds(10,130,200,20);did.setBounds(150,130,240,20);
lab6.setBounds(10,160,200,20);sid.setBounds(150,160,240,20);
lab7.setBounds(10,190,200,20);test.setBounds(150,190,240,20);
lab8.setBounds(10,220,200,20);dis.setBounds(150,220,240,20);
lab9.setBounds(10,250,200,20);treat.setBounds(150,250,240,20);
lab10.setBounds(10,280,200,20);ward.setBounds(150,280,240,20);
lab11.setBounds(10,310,200,20);room.setBounds(150,310,240,20);
lab12.setBounds(10,340,200,20);bed.setBounds(150,340,240,20);

save.setBounds(50,400,100,35); reset.setBounds(175,400,100,35);
close.setBounds(300,400,100,35);

c.add(lab1);
c.add(lab2);
c.add(lab3);
c.add(lab4);
c.add(lab5);
c.add(lab6);
c.add(lab7);
c.add(lab8);
c.add(lab9);
c.add(lab10);
c.add(lab11);
c.add(lab12);

c.add(opdid);
c.add(date);
c.add(ipdid);
c.add(pid);
c.add(did);
c.add(sid);
c.add(test);
c.add(dis);
c.add(treat);
c.add(ward);
c.add(room);
c.add(bed);

c.add(save);
c.add(reset);
c.add(close);
frame.show();
frame.setSize(500,500);

save.addActionListener(this);
reset.addActionListener(this);
close.addActionListener(this);
opdid.addActionListener(this);

get_opdid();

}
catch(Exception x)
{
System.out.println("error..."+x);
}

}
void get_opdid()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:hospital");

Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from opd");
opdid.removeAllItems();

while(rs.next())
{
opdid.addItem(rs.getString(1));
}
con.close();
}
catch(Exception x)
{
System.out.println("Connection error..."+x);
}
}
public void actionPerformed(ActionEvent event)
{
if(event.getSource()==opdid)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("jdbc:odbc:hospital");

PreparedStatement st;
st=con.prepareStatement("select * from opd where opd_id=?");
ResultSet rs;
String str=opdid.getSelectedItem().toString().trim();
st.setString(1,str);
rs=st.executeQuery();

if(rs.next())
{
pid.setText(rs.getString(2));
did.setText(rs.getString(3));
sid.setText(rs.getString(4));
test.setText(rs.getString(5));
dis.setText(rs.getString(6));
treat.setText(rs.getString(7));
}
con.close();

}
catch(Exception x)
{
JOptionPane.showMessageDialog(null,"Sorry!"+"n"+"OPD
Information Not Found","Information",JOptionPane.INFORMATION_MESSAGE);
System.out.println("Connection error..."+x);
}

}

else if(event.getSource()==save)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:hospital");
Statement st=con.createStatement();

st.executeUpdate("insert into ipd
values('"+ipdid.getText()+"','"+date.getText()+"','"+opdid.getSelectedItem()+"','"+pid.get
Text()+"','"+did.getText()+"','"+sid.getText()+"','"+test.getText()+"','"+dis.getText()+"','"
+treat.getText()+"','"+ward.getText()+"','"+room.getText()+"','"+bed.getText()+"')");

PreparedStatement st2;

String str=opdid.getSelectedItem().toString().trim();

st2=con.prepareStatement("delete * from opd where
opd_id=?");

st2.setString(1,str);
st2.executeUpdate();

ipdid.setText(" ");
date.setText(" ");
pid.setText(" ");
did.setText(" ");
sid.setText(" ");
test.setText(" ");
dis.setText(" ");
treat.setText(" ");
ward.setText(" ");
room.setText(" ");
bed.setText(" ");

JOptionPane.showMessageDialog(null,"Hi!"+"n"+" New IPD
Information Saved ","Information",JOptionPane.INFORMATION_MESSAGE);

}
catch(Exception x)
{
JOptionPane.showMessageDialog(null,"Sorry!"+"n"+"Entered
'IPD ID' allready exist.","Information",JOptionPane.INFORMATION_MESSAGE);
System.out.println("Connection error..."+x);
}

}

else if(event.getSource()==reset)
{
ipdid.setText(" ");
date.setText(" ");
pid.setText(" ");
did.setText(" ");
sid.setText(" ");
test.setText(" ");
dis.setText(" ");
treat.setText(" ");
ward.setText(" ");
room.setText(" ");
bed.setText(" ");

}
else if(event.getSource()==close)
{
frame.dispose();
}
}
}

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import java.sql.*;
import java.text.*;
import java.awt.font.*;
import java.util.*;
public class doctor extends JFrame implements ActionListener
{

Container c;
JInternalFrame frame;
JDesktopPane d;

JTextField id,name,add,city,phone,qualify,dept,doj ;

JButton save,reset,close;

public doctor(JDesktopPane d)
{
try
{

frame=new JInternalFrame("N E W D O C T O R E N T E R Y F O
R M ",false,true,false,true);
c=frame.getContentPane();
d.add(frame);
c.setLayout(null);

//Memory Allocation
//-----------------
JLabel lab1=new JLabel("Doctor ID");
JLabel lab2=new JLabel("Name");
JLabel lab3=new JLabel("Address");
JLabel lab4=new JLabel("City ");
JLabel lab5=new JLabel("Phone");
JLabel lab6=new JLabel("Qualification");
JLabel lab7=new JLabel("Department");
JLabel lab8=new JLabel("Date Of Joining");

id=new JTextField(10);
name=new JTextField(10);
add=new JTextField(20);
city=new JTextField(20);
phone=new JTextField(10);
qualify=new JTextField(10);
dept=new JTextField(10);
doj=new JTextField(10);

save=new JButton("Save",new ImageIcon("save.gif"));
reset=new JButton("Reset",new ImageIcon("reset.gif"));
close=new JButton("Close",new ImageIcon("close.gif"));

lab1.setBounds(10,10,200,20); id.setBounds(150,10,240,20);
lab2.setBounds(10,40,200,20); name.setBounds(150,40,240,20);
lab3.setBounds(10,70,200,20); add.setBounds(150,70,240,20);
lab4.setBounds(10,100,200,20);city.setBounds(150,100,240,20);
lab5.setBounds(10,130,200,20);phone.setBounds(150,130,240,20);
lab6.setBounds(10,160,200,20);qualify.setBounds(150,160,240,20);
lab7.setBounds(10,190,200,20);dept.setBounds(150,190,240,20);
lab8.setBounds(10,220,200,20);doj.setBounds(150,220,240,20);

save.setBounds(50,350,100,35); reset.setBounds(175,350,100,35);
close.setBounds(300,350,100,35);

c.add(lab1);
c.add(lab2);
c.add(lab3);
c.add(lab4);
c.add(lab5);
c.add(lab6);
c.add(lab7);
c.add(lab8);

c.add(id);
c.add(name);
c.add(add);
c.add(city);
c.add(qualify);
c.add(phone);
c.add(dept);
c.add(doj);

c.add(save);
c.add(reset);
c.add(close);

frame.show();
frame.setSize(500,500);

save.addActionListener(this);
reset.addActionListener(this);
close.addActionListener(this);

}
catch(Exception x)
{
System.out.println("error..."+x);
}

}
public void actionPerformed(ActionEvent event)
{
if(event.getSource()==save)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:hospital");
Statement st=con.createStatement();

st.executeUpdate("insert into doctor
values('"+id.getText()+"','"+name.getText()+"','"+add.getText()+"','"+city.getText()+"','"
+phone.getText()+"','"+qualify.getText()+"','"+dept.getText()+"','"+doj.getText()+"')");

id.setText("");
name.setText("");
add.setText("");
city.setText("");
phone.setText("");
qualify.setText("");
dept.setText("");
doj.setText(" ");

JOptionPane.showMessageDialog(null,"Hi!"+"n"+" New
Doctor Information Saved ","Information",JOptionPane.INFORMATION_MESSAGE);

}
catch(Exception x)
{
JOptionPane.showMessageDialog(null,"Sorry!"+"n"+"Entered
'Doctor ID' allready exist.","Information",JOptionPane.INFORMATION_MESSAGE);
System.out.println("Connection error..."+x);
}

}

else if(event.getSource()==reset)
{
id.setText("");
name.setText("");
add.setText("");
city.setText("");
phone.setText("");
qualify.setText("");
dept.setText("");
doj.setText(" ");

}
else if(event.getSource()==close)
{
frame.dispose();
}
}
}
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import java.sql.*;
import java.text.*;
import java.awt.font.*;
import java.util.*;

public class patient extends JFrame implements ActionListener
{

Container c;
JInternalFrame frame;
JDesktopPane d;
JTextField id,name,add,sex,age,date ;
JComboBox cb;

JButton save,reset,close;

public patient(JDesktopPane d)
{
try
{

frame=new JInternalFrame("N E W P A T I E N T E N T E R Y F O
R M ",false,true,false,true);
c=frame.getContentPane();
d.add(frame);
c.setLayout(null);

//Memory Allocation
//----------------JLabel lab1=new JLabel("Patient ID");
JLabel lab2=new JLabel("Name");
JLabel lab3=new JLabel("Sex");
JLabel lab4=new JLabel("Age");
JLabel lab5=new JLabel("Address ");
JLabel lab6=new JLabel("Date");
cb=new JComboBox();
cb.addItem("Male");
cb.addItem("Female");

id=new JTextField(10);
name=new JTextField(10);
add=new JTextField(20);
age=new JTextField(20);
date=new JTextField(10);

save=new JButton("Save",new ImageIcon("save.gif"));
reset=new JButton("Reset",new ImageIcon("reset.gif"));
close=new JButton("Close",new ImageIcon("close.gif"));

lab1.setBounds(10,10,200,20); id.setBounds(150,10,240,20);
lab2.setBounds(10,40,200,20); name.setBounds(150,40,240,20);
lab3.setBounds(10,70,200,20);cb.setBounds(150,70,240,20);
lab4.setBounds(10,100,200,20); age.setBounds(150,100,240,20);
lab5.setBounds(10,130,200,20);add.setBounds(150,130,240,20);
lab6.setBounds(10,160,200,20);date.setBounds(150,160,240,20);
save.setBounds(50,350,100,35); reset.setBounds(175,350,100,35);
close.setBounds(300,350,100,35);

c.add(lab1);
c.add(lab2);
c.add(lab3);
c.add(lab4);
c.add(lab5);
c.add(lab6);

c.add(id);
c.add(name);
c.add(add);
c.add(age);
c.add(cb);
c.add(date);

c.add(save);
c.add(reset);
c.add(close);

frame.show();
frame.setSize(500,500);

save.addActionListener(this);
reset.addActionListener(this);
close.addActionListener(this);

}
catch(Exception x)
{
System.out.println("error..."+x);
}

}
public void actionPerformed(ActionEvent event)
{
if(event.getSource()==save)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:hospital");
Statement st=con.createStatement();

st.executeUpdate("insert into patient
values('"+id.getText()+"','"+name.getText()+"','"+cb.getSelectedItem()+"','"+age.getText(
)+"','"+add.getText()+"','"+date.getText()+"')");

id.setText("");
name.setText("");
add.setText("");
age.setText("");
date.setText("");

JOptionPane.showMessageDialog(null,"Hi!"+"n"+" New
Patient Information Saved ","Information",JOptionPane.INFORMATION_MESSAGE);

}
catch(Exception x)
{
JOptionPane.showMessageDialog(null,"Sorry!"+"n"+"Entered
'Patient ID' allready exist.","Information",JOptionPane.INFORMATION_MESSAGE);
System.out.println("Connection error..."+x);
}

}

else if(event.getSource()==reset)
{
id.setText("");
name.setText("");
add.setText("");
age.setText("");
date.setText("");

}
else if(event.getSource()==close)
{
frame.dispose();
}
}
}

USER INTERFACE DESIGN
(SCREEN SNAPSHOT)
FUTURE SCOPE & ENHANCEMENT OF
PROJECT
Due to the limited amount of resources and time, we are planning to restrict our
project to demo for now, but later on it can be extended to the whole as live project.
It’s a fact that the maintenance costs generally exceed the development costs. Clearly, if
we want to reduce the overall cost of software or achieve “global” optimality in terms of
cost rather than “local” optimality in terms of development cost only, the goal of
development should be reduce the maintenance effort. That is, one of the important
objectives of the development project should be to produce software that is easy to
maintain. And the process should be such that it ensures this maintainability.

BIBILIOGRAPHY
software engineering: A practioner’s Approach BY Roger S. Pressman
Java

-E.Balagurusamy

System Analysis and Design: Elias M. AWAD

An introduction to data base system :

BIPIN C. DESAI

More Related Content

What's hot

44478167 hospital-management-system
44478167 hospital-management-system44478167 hospital-management-system
44478167 hospital-management-systemAkshay Iliger
 
Hospital Management Record System Proposal
Hospital Management Record System ProposalHospital Management Record System Proposal
Hospital Management Record System ProposalBishal Bista
 
Synopsis of hms(Hospital Management System)
Synopsis of hms(Hospital Management System)Synopsis of hms(Hospital Management System)
Synopsis of hms(Hospital Management System)Farooq Stanikzai
 
Design and Implementation of Hospital Management System Using Java
Design and Implementation of Hospital Management System Using JavaDesign and Implementation of Hospital Management System Using Java
Design and Implementation of Hospital Management System Using JavaIOSR Journals
 
Hospital management system
Hospital management systemHospital management system
Hospital management systemPawan Ghewande
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management SystemSaurabh Tripathi
 
HOSPITAL MANAGEMENT SYSTEM ppt
HOSPITAL MANAGEMENT SYSTEM pptHOSPITAL MANAGEMENT SYSTEM ppt
HOSPITAL MANAGEMENT SYSTEM pptPurbita Sen
 
hospital management system
hospital management systemhospital management system
hospital management systemAnmol Purohit
 
Pharmacy Management System
Pharmacy Management SystemPharmacy Management System
Pharmacy Management SystemAI Publications
 
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4NICHOLAS RATEMO
 
Hostpital management system(srs)
Hostpital management system(srs)Hostpital management system(srs)
Hostpital management system(srs)maamir farooq
 
Hospital management synopsis
Hospital management synopsisHospital management synopsis
Hospital management synopsisYogeshDhamke2
 
Pharmacy management system fyp documentation
Pharmacy management system fyp documentationPharmacy management system fyp documentation
Pharmacy management system fyp documentationAbubakr Cheema
 
Hospital management system project
Hospital management system projectHospital management system project
Hospital management system projectHimani Chopra
 
Pharmacy management system by Asiqul Islam
Pharmacy management system by Asiqul IslamPharmacy management system by Asiqul Islam
Pharmacy management system by Asiqul IslamAshiQulIslam34
 
Complete project on hospital maangement system
Complete project on hospital maangement systemComplete project on hospital maangement system
Complete project on hospital maangement systemRahul Kumar
 
Design and implementation of a hospital management system
Design and implementation of a hospital management systemDesign and implementation of a hospital management system
Design and implementation of a hospital management systemOvercomer Michael
 

What's hot (20)

44478167 hospital-management-system
44478167 hospital-management-system44478167 hospital-management-system
44478167 hospital-management-system
 
Hosptal management system
Hosptal management systemHosptal management system
Hosptal management system
 
Hospital Management Record System Proposal
Hospital Management Record System ProposalHospital Management Record System Proposal
Hospital Management Record System Proposal
 
Synopsis of hms(Hospital Management System)
Synopsis of hms(Hospital Management System)Synopsis of hms(Hospital Management System)
Synopsis of hms(Hospital Management System)
 
Design and Implementation of Hospital Management System Using Java
Design and Implementation of Hospital Management System Using JavaDesign and Implementation of Hospital Management System Using Java
Design and Implementation of Hospital Management System Using Java
 
Hospital management system
Hospital management systemHospital management system
Hospital management system
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management System
 
HOSPITAL MANAGEMENT SYSTEM ppt
HOSPITAL MANAGEMENT SYSTEM pptHOSPITAL MANAGEMENT SYSTEM ppt
HOSPITAL MANAGEMENT SYSTEM ppt
 
hospital management system
hospital management systemhospital management system
hospital management system
 
Pharmacy Management System
Pharmacy Management SystemPharmacy Management System
Pharmacy Management System
 
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
 
Hostpital management system(srs)
Hostpital management system(srs)Hostpital management system(srs)
Hostpital management system(srs)
 
Hospital management synopsis
Hospital management synopsisHospital management synopsis
Hospital management synopsis
 
HOSPITAL MANAGEMENT SYSTEM PROJECT
HOSPITAL MANAGEMENT SYSTEM PROJECTHOSPITAL MANAGEMENT SYSTEM PROJECT
HOSPITAL MANAGEMENT SYSTEM PROJECT
 
Pharmacy management system fyp documentation
Pharmacy management system fyp documentationPharmacy management system fyp documentation
Pharmacy management system fyp documentation
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management System
 
Hospital management system project
Hospital management system projectHospital management system project
Hospital management system project
 
Pharmacy management system by Asiqul Islam
Pharmacy management system by Asiqul IslamPharmacy management system by Asiqul Islam
Pharmacy management system by Asiqul Islam
 
Complete project on hospital maangement system
Complete project on hospital maangement systemComplete project on hospital maangement system
Complete project on hospital maangement system
 
Design and implementation of a hospital management system
Design and implementation of a hospital management systemDesign and implementation of a hospital management system
Design and implementation of a hospital management system
 

Similar to Report hospital

198970820 p-oooooooooo
198970820 p-oooooooooo198970820 p-oooooooooo
198970820 p-oooooooooohomeworkping4
 
software development and programming languages
software development and programming languages software development and programming languages
software development and programming languages PraShant Kumar
 
Online Attendance Management System
Online Attendance Management SystemOnline Attendance Management System
Online Attendance Management SystemRIDDHICHOUHAN2
 
Java remote control for laboratory monitoring
Java remote control for laboratory monitoringJava remote control for laboratory monitoring
Java remote control for laboratory monitoringIAEME Publication
 
Software Evaluation
Software EvaluationSoftware Evaluation
Software EvaluationLori Gilbert
 
IRJET - Code Compiler Shell
IRJET -  	  Code Compiler ShellIRJET -  	  Code Compiler Shell
IRJET - Code Compiler ShellIRJET Journal
 
SAP Development Object Testing
SAP Development Object TestingSAP Development Object Testing
SAP Development Object TestingShivani Thakur
 
Hostel Management system Report
Hostel Management system ReportHostel Management system Report
Hostel Management system ReportPrasoon Rawat
 
TOLL MANAGEMENT SYSTEM
TOLL MANAGEMENT SYSTEMTOLL MANAGEMENT SYSTEM
TOLL MANAGEMENT SYSTEMvishnuRajan20
 
Toll management system (1) (1)
Toll management system (1) (1)Toll management system (1) (1)
Toll management system (1) (1)vishnuRajan20
 
1. introducción a la Ingeniería de Software (UTM 2071)
1. introducción a la Ingeniería de Software (UTM 2071)1. introducción a la Ingeniería de Software (UTM 2071)
1. introducción a la Ingeniería de Software (UTM 2071)Mario A Moreno Rocha
 

Similar to Report hospital (20)

198970820 p-oooooooooo
198970820 p-oooooooooo198970820 p-oooooooooo
198970820 p-oooooooooo
 
GMR PROJECT PPT
GMR PROJECT PPTGMR PROJECT PPT
GMR PROJECT PPT
 
ITFT - Software
ITFT -  SoftwareITFT -  Software
ITFT - Software
 
Bright copy
Bright   copyBright   copy
Bright copy
 
E farming
E farmingE farming
E farming
 
Bright
BrightBright
Bright
 
Minor
MinorMinor
Minor
 
Software ppt
Software pptSoftware ppt
Software ppt
 
software development and programming languages
software development and programming languages software development and programming languages
software development and programming languages
 
Online Attendance Management System
Online Attendance Management SystemOnline Attendance Management System
Online Attendance Management System
 
Teamwork Presentation
Teamwork PresentationTeamwork Presentation
Teamwork Presentation
 
Java remote control for laboratory monitoring
Java remote control for laboratory monitoringJava remote control for laboratory monitoring
Java remote control for laboratory monitoring
 
HR OPERATION MANAGER
HR OPERATION MANAGERHR OPERATION MANAGER
HR OPERATION MANAGER
 
Software Evaluation
Software EvaluationSoftware Evaluation
Software Evaluation
 
IRJET - Code Compiler Shell
IRJET -  	  Code Compiler ShellIRJET -  	  Code Compiler Shell
IRJET - Code Compiler Shell
 
SAP Development Object Testing
SAP Development Object TestingSAP Development Object Testing
SAP Development Object Testing
 
Hostel Management system Report
Hostel Management system ReportHostel Management system Report
Hostel Management system Report
 
TOLL MANAGEMENT SYSTEM
TOLL MANAGEMENT SYSTEMTOLL MANAGEMENT SYSTEM
TOLL MANAGEMENT SYSTEM
 
Toll management system (1) (1)
Toll management system (1) (1)Toll management system (1) (1)
Toll management system (1) (1)
 
1. introducción a la Ingeniería de Software (UTM 2071)
1. introducción a la Ingeniería de Software (UTM 2071)1. introducción a la Ingeniería de Software (UTM 2071)
1. introducción a la Ingeniería de Software (UTM 2071)
 

More from Rachit Gaur

Download presentation
Download presentationDownload presentation
Download presentationRachit Gaur
 
Androidappdevelopmentpresentation
AndroidappdevelopmentpresentationAndroidappdevelopmentpresentation
AndroidappdevelopmentpresentationRachit Gaur
 
Wanna develop personality60 s
Wanna develop personality60 sWanna develop personality60 s
Wanna develop personality60 sRachit Gaur
 
Yellow belt training 68 s
Yellow belt training 68 sYellow belt training 68 s
Yellow belt training 68 sRachit Gaur
 
Guide to project management 60 s
Guide to project management 60 sGuide to project management 60 s
Guide to project management 60 sRachit Gaur
 

More from Rachit Gaur (7)

Download presentation
Download presentationDownload presentation
Download presentation
 
Androidappdevelopmentpresentation
AndroidappdevelopmentpresentationAndroidappdevelopmentpresentation
Androidappdevelopmentpresentation
 
Poems to Love
Poems to LovePoems to Love
Poems to Love
 
Wanna develop personality60 s
Wanna develop personality60 sWanna develop personality60 s
Wanna develop personality60 s
 
Yellow belt training 68 s
Yellow belt training 68 sYellow belt training 68 s
Yellow belt training 68 s
 
Preface
PrefacePreface
Preface
 
Guide to project management 60 s
Guide to project management 60 sGuide to project management 60 s
Guide to project management 60 s
 

Recently uploaded

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

Report hospital

  • 1. PROJECT REPORT “Hospital Management System" SUBMITTED IN PARTIAL FULFILLMENT FOR THE DEGREE OF MASTER IN COMPUTER APPLICATIONS MCA-LE (Session 2011-2013) Under The Guidance: Mr. SAVAAB ALI KHAN (Sr.Lecturer) SUBMITTED BY: RACHIT GAUR(11403960488) SUBMITTED TO: KHUSHBU DOULANI (TEAM LEADER) IT DEPTT.-MCMIT
  • 2. Preface Information is a valuable resource to an organization. Computer software provides an efficient means of processing information, and HOSPITAL MANAGEMENT SYSTEM are nowadays becoming increasingly common means by which it is possible to store and retrieve information (regarding hospital) in an effective manner. This book provides comprehensive coverage of fundamentals of HOSPITAL MANAGEMENT SYSTEM. This book is for those who wish a better understanding of relational data modeling, its purpose, its nature, and the standards used in creating relational data model. Relational databases are the most popular database management systems in the world and are supported by a variety of vendor implementations. Majority of the practical tasks in industry require applying relatively not complex algorithms to huge amounts of well-structured data. The efficiency of the application depends on the quality of data organization. Advances in database technology and processing offer opportunities for using information flexibility and efficiently when data is organized and stored in relational structures. The relational DBMS is a success in the commercial market place with respect to business data processing and related applications. This success is a result of cost effective application development combined with high data consistency. The success has led to the use of relational DBMS technology in other application environments requesting its traditional virtues, while at the same time adding new requirements.
  • 3. ACKNOWLEDGEMENT I take this opportunity to express my sincere thanks and deep gratitude towards Mr. SABAB ALI KHAN for his valuable guidance and co-operation in starting this Project successfully. Development of project like “HOSPITAL MANAGEMENT SYSTEM” in JAVA is not a too much difficult task but fairly a puzzle one. This language teaches so much about database programming and new version. This project is a part of our MCA course. I have developed this project with the help of Faculty members of my Institute MCMIT and as such I am extremely grateful to all of them. I am obliged to my project guide Mr. SABAB ALI KHAN
  • 4. TABLE OF CONTENTS (with Page Numbers) INTRODUCTION OBJECTIVES TYPE OF PROJECT REQUIRMENT OF H/W & S/W MODULES OF THE PROJECT TESTING METHOD ER DIAGRAM DFD FUTURE SCOPE AND FURTHET ENHANCEMENT OF THE PROJECT INTRODUCTION/OBJECTIVE  The goal of any system development is to develop and implement the system cost effectively; user-friendly and most suited to the user’s analysis is the heart of
  • 5. the process. Analysis is the study of the various operations performed by the system and their relationship within and outside of the system. During analysis, data collected on the files, decision points and transactions handled by the present system. Different kinds of tools are used in analysis of which interview is common one. The drawback of the existing system is that it is very difficult to retrieve data from case files. It is difficult to handle the whole system manually and it is less accurate and to keep the data in case files for future reference because it may get destroyed. Moreover it is very difficult to retrieve data. Redundancy of data may occur and this may lead to the inconsistency. The manual system is so time-consuming. The proposed system is very easy to operate. Speed and accuracy are the main advantages of proposed system. There is no redundancy of data. The data are stored in the computer’s secondary memories like hard disk, etc. it can be easily receive and used at any time. The proposed system will easily handle all the data and the work done by the existing systems. The proposed systems eliminate the drawbacks of the existing system to a great extent and it provides tight security to data. OBJECTIVE
  • 6. Hospital Management System is powerful, flexible, and easy to use and is designed and developed to deliver real conceivable benefits to hospitals and clinics and more importantly it is backed by reliable and dependable of users Hospital Management System is designed for multi specialty hospitals, to cover a wide range of hospital administration and management processes. It is an integrated end-toend Hospital Management System that provides relevant information across the hospital to support effective decision making for patient care, hospital administration and critical financial accounting, in a seamless flow. Hospital Management System is a software product suite designed to improve the quality and management of clinical care and hospital health care management in the areas of clinical process analysis and activity-based costing. Hospital Management System enables you to develop your organization and improve its effectiveness and quality of work. Managing the key processes efficiently is critical to the success of the hospital helps you manage your processes. TOOLS AND ENVIRONMENT USED HARDWARE REQUIREMENT1. Pentium4 or Above 2. 256 MB RAM(MIN)
  • 7. 3. 1 GB RAM(MAX) 4. 20 GB Hard Disk(MIN) 5. 1.33 MHz speed(MIN) 6. 50 MB(for package itself) 7. Dot Matrix/HP Laser/HP/DeskJet/HP Inkjet Printer 8. Optical Mouse 9. 15’inch Color Monitor Software Requirements:1. WIN XP Operating System 2. WIN 7 Operating System 3. WIN Vista Operating System 4. JDK 1.6 5. ORACLE JAVA Introduction:
  • 8. Java is a new and popular language created by sun Microsystems. The best news about java is that it is object oriented architecture, interpreted, robust, secure, portable, high performance, multithreaded & dynamic language. With java, we can develop a single application i.e. immediately usable on multiple platforms. Imagine the countless hours that will save by being able to develop a single application usable on windows, UNIX & Macintosh system. Java produces two program types’ application & Applet. Applications are standard one & can be run directly from me command line. Applets requires on external program to provide an interface to the user. Java defines data as objects with methods that support the objects. Java is purely objects. Java is purely object oriented & provides abstraction, encapsulation, inheritance & polymorphism. Even a very basic program has a class. Any code written is java is inside a class. Java is tuned to the web, java programs can be built in java, that user’s resource from any other computer. Java is the both interpreted & compiled. The code is complied. The code is compiled with a byte code i.e. binary & platform independent. When a program has to execute the code is fetched into management & interpreted on the user’s machines as on interpreted language, java has simple syntax. When a piece of code is compiled all errors are listed together. A program is executed only when all the errors have been rectified. An interpreter, on the other hand, verifies the code & execution reaches the statement with an error is the error report.
  • 9. Compilation is the process of converting the code into a language that the compiler understands machines language. When compiling a program using a compiler, the compiler checks for syntactical (grammatical) errors. In code and lists all the errors on the screen. The errors are rectified and the program is recompiled to get the machine language code. Java compilers compile the code to a byte code that is understood by the java environment. Byte code is result of compiling a java program this code can be executed on any platform. In other words due to the byte cod compilation processes an interpretation by a browser, java programs can be executed on a variety of hardware and software. The only requirement is that the system should have a java enabled internet browser. A java compiler is written in java and the run time environment, the interpreter is written in c. the java interpreter can execute java code directly on any machine, on which java a interpreter has been installed. A java program can run on any machine that has a java interpreter. The byte code supports connection to multiple databases. Java code is portable. There fore, other people can use programs that you write in java even if they have different machines with different operating system. Due to strong type checking done by java on the user’s machine any changes to the program are tagged as errors and program will not execute, java is there secure. Java programs are comparable in speed to the programs written in other compiler based languages like c and c++. Java is faster than other interpreter based languages like basic sense it is compiled and interpreted.
  • 10. Multithreading is the ability of an application to perform multiple task at same time. For example, when you play game on your computer one task of the program that is handle sound effects and another to handle screen display. A single program accomplishes many tasks, simultaneously. A java program can consists of many modules that are written by many programmers. These modules may undergo many changes. Java makes interconnections between modules and at the run time, which easily avoids the problem caused by the change of the code used program. Java is thus dynamic. A few types of java applications are listed below: Applications that do not use graphical user interface (GUI)-they are similar to traditional programs written in c and c++. Applications using GUI. These applications are used in windows environment. Applets these programs run on a web page and require a java enabled browser like internet explorer or Netscape navigator. Packages-packages are collections of classes that can be shared by applications and applets. They can similar to the libraries provided by other language like c++. Java provides many packages like long and util.
  • 11. RDBMS ORACLE ORACLE DATABASE:ORACLE is a database vendor that uses to design relational database. A database management system, or DBMS, gives the user access to their data and helps them transform the data into information. Oracle allows users to create, update, and extract information from their databases. Compared to a manual filing system, the biggest advantages to a computerized database system are speed, accuracy, and accessibility. A database is a structured collection of data. Data refers to the characteristics of people, things, and events.
  • 12. Oracle stores each data item in its own field. In Oracle, the fields relating to a particular person, thing, or event are bundled together to form a single, complete unit of data, called a record (it can also be referred to as a row or an occurrence). Each record is made up of a number of fields. No two fields in a record can have the same field name. During an Oracle database design project, the analysis of our Business needs identifies all the fields or attributes of interest. If your business needs change over time, you define any additional fields or change the definition of existing fields. ORACLE TABLE Oracle stores records relating to each other in a table. A table is easily visualized as a tabular arrangement of data, not unlike a spreadsheet, consisting of vertical columns and horizontal rows. A table consists of a number of records. The field names of each record in the table are the same, although the field values may differ. Each field occupies one column and each record occupies one row. Each record is a unique entry and is Independent of any other record in the table. After the analysis of the business requirements, the database design team defines the necessary tables. Different tables are created for the various groups of information Related tables are grouped together to form a database.
  • 13. Primary Keys Every table in Oracle has a field or a combination of fields that uniquely identifies each record in the table. This unique identifier is called the primary key, or simply the key. The primary key provides the means to distinguish one record from all the others in a table. It allows the user and the database system to identify, locate, and refer to one particular record in the table. The database design team determines the best candidate field for the primary key. Once a table has been assigned a primary key, Oracle won't allow more than one record in the table with the same value for the primary key. No two Employees can have the same ID number. Relational Databases Sometimes all the information of interest to a business operation can be stored in one table. Oracle makes it very easy to link the data in multiple tables. This is a key feature of a relational database management system, or RDBMS. They store data in two or more tables and enable us to define relationships between the tables. The link between the tables is based on one or more field values common to both tables.
  • 14. Foreign Key Remember that every table in ORACLE has a primary key a field or fields making each record unique. When a field in one table matches the primary key of another table, the field is referred to as a foreign key. A foreign key is a field or a group of fields in one table whose values match those of the primary key of another table. You can think of a foreign key as the primary key of a foreign table. MODULES DOCTOR (INSERT, SELECT, UPDATE, DELETE) PAITEINT (INSERT, SELECT, UPDATE, DELETE) STAFF (INSERT, SELECT, UPDATE, DELETE) BILLING
  • 16. TESTING INTRODUCTION Testing is the most important aspect of any project. A web application becomes more crucial since the information is to be viewed by thousands of users. It is essential for developer to make sure that the web presentation work well from technical and well as usability side. We have performed the module level testing and content verification before going for integrity and usability testing. WHITE BOX TESTING
  • 17. White box testing called glass box testing, is a test case design method that uses the control structure to derive test cases. Using white box testing methods the software engineer can derive test cases that Guarantee that all independent paths within a module have been exercised Exercise all logical decisions on their true and false sides Execute all loops at their operational bounds Exercise internal data structure to ensure their validity A reasonable question might be imposed at this juncture: “why spend time and energy worrying about (and testing) logical minutiae when we might better expend effort ensuring that program requirements have been met? Stated another way, why don’t we spend all of our energy on black box tests? The answer lies in nature of software defects. Logical errors and incorrect assumptions are inversely proportional to the probability that a program path will be executed. Errors tend to creep into our work when we design and implement Function, conditions, or control that is out of mainstream. Everyday Processing tends to be well understood while “special case” processing tends to fall into cracks. We often believe that a logical path is not likely to be executed when, infect it may be executed on regular basis.
  • 18. The logical flow of a program is sometimes counterintuitive, meaning that our unconscious assumptions about flow of control and data may lead us to make design errors that are uncovered only once path testing commences. Typographical errors are random. When a program is translated into programming language source code, it is likely that some typing errors will occur. Many will be uncovered by syntax and type checking mechanisms, but others may go undetected until testing begins. It is as likely that a typo will exist on mainstream path. Each of these provides an argument for conducting white box tests. Black box testing is far more likely to uncover them. BLACK BOX TESTING Black box testing also called “behavioral testing”, focuses on the functional requirements for a program. Black box testing is not an alternative to white box techniques. Rather it is a complimentary approach that is likely to uncover a different class of errors than white box methods. Black box testing attempts to find errors in the following categories: Incorrect or missing functions. Interface Error Errors in data stream or external database access. Behavioral or performance errors Initializations or termination errors
  • 19. Unlike white box testing, which is performed early in the testing process, black box testing tends to be applied during later stages of testing. Black box testing purposely disregards control structure; attention is focused on the information domain. Test are designed to answer the following questionsHow is functional validity tested? How is system behavior and performance tested? What classes of input will make good test cases? Is the system particularly sensitive to certain input values? By applying black box techniques we derive a set of test cases that satisfy the following criteriaTest cases that reduce by a count that is greater than one, the number of additional test cases that must be designed to achieve reasonable testing and Test cases that tell us something about the presence or absence of classes of errors, rather than an error associated only with the specific test at hand.
  • 21. About E-R Diagram: The entity –relationship (E-R) data model is based on a perception of real world which consist of basic objects called entities and relationship among these objects. The E-R model was introduced by P.P. Chen. Chen introduced not only E-R model but also a corresponding diagramming technique. E-R diagram is used to represent the entities and their relationship to other entities. It uses some symbols to represent the objects of E-R diagram. Entity: Entity is an object which has its own existence and can be distinguish from other objects. Entity is represented by a set of attributes. An entity is any object, place, person, concept or activity about which an enterprise records data. While diagramming entity is named and represented by a rectangle.
  • 22. Attribute: Attributes are descriptive properties processed by each member of an entity. Attributes are represented through ellipses, labeled with the name of the property. The key attribute are underlined. Relationship: A relationship is an association among several entities. A relationship defines the association of entity type relationship instance is an association of entity instances. There are three types of relationship: One to One relationship One to Many relationships Many to Many relationship E-R Diagram Symbols
  • 27.
  • 28.
  • 29.
  • 31.
  • 32. DATA FLOW DIAGRAM DFD (Data Flow Diagram): Data Flow Diagram (abbreviated as DFD) was introduced by De Marco(1978) and Gane and Sarson(1979),and is important tool used by system analysts. A DFD models a system by using external entities from which data flows to process which transform data and creates output data flow which go to other process or external entities or data stores. Stored data may also flow to processes as inputs. The main merit of DFD is that it can provide an overview of what data a system would processes, what transformations of data are done, what data are stored and which stored data is used, and where the result is flow. Symbols Used In DFDs:
  • 33. Four symbols are used in drawing DFDs. A circle is used to depict a process. Process are numbered and given a name. The term bubble is also sometimes used instead of circle. Data flows are represented by a line with an arrow. Arrow shows the direction of flow of data. The name of the data appears next to the line. External entities are represented by rectangles, and are outside the system. Entities supplying data are known as sources and those that consume data are called sinks. Data store is depicted by two lines. Data store stores data. If an arrow points to the store, it indicates operation of writing in the store. If it points away from the store, it indicates operation of reading from the store. Data flow can take place between processes, from A data store to a process, A process to a data store An external entity to a process, or From a process to an external entity. Data flow can’t take place between to a data stores or between two external entities.
  • 38.
  • 39. CODING import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import java.awt.font.*; import com.sun.java.swing.plaf.motif.*; import com.sun.java.swing.plaf.windows.*; public class desk extends JFrame implements ActionListener { Container con; JMenuBar menubar; JMenu patient,doctor,emp,hospital_record,report,quit; JMenuItem regi,edit1; JMenuItem new_doc,edit2;
  • 40. JMenuItem new_emp,edit3; JMenuItem dio,admit,dis; JMenuItem report1; JMenuItem exit; Dimension sd; JDesktopPane d1; public desk(String currentuser) { super(currentuser); d1=new JDesktopPane(); setContentPane(d1);; con=getContentPane(); con.setLayout(null); con.setBackground(new Color(79,75,63)); sd=Toolkit.getDefaultToolkit().getScreenSize();
  • 41. MotifLookAndFeel mlf=new MotifLookAndFeel(); menuCreation(); } public static void main(String args[]) { desk d=new desk(" CENTRALI S E D H O S P I T A L M A N A G E M E N T S Y S T E M "); Dimension sd=Toolkit.getDefaultToolkit().getScreenSize(); d.setSize(sd.width,sd.height); d.show(); } public void menuCreation() { //-------------------//'menubar' creation //-------------------Dimension sd=Toolkit.getDefaultToolkit().getScreenSize(); menubar=new JMenuBar(); menubar.setBounds(0,0,sd.width+2,25); //menubar.setBorder(new BevelBorder(BevelBorder.RAISED)); con.add(menubar); patient=new JMenu("PATIENT ");
  • 42. menubar.add(patient); patient.setFont(new Font("Arial",Font.BOLD,13)); doctor=new JMenu("DOCTOR "); menubar.add(doctor); doctor.setFont(new Font("Arial",Font.BOLD,13)); emp=new JMenu("EMPLOYEE "); menubar.add(emp); emp.setFont(new Font("Arial",Font.BOLD,13)); hospital_record=new JMenu("HOSPITAL RECORD menubar.add(hospital_record); hospital_record.setFont(new Font("Arial",Font.BOLD,13)); report=new JMenu("REPORT "); menubar.add(report); report.setFont(new Font("Arial",Font.BOLD,13)); quit=new JMenu("QUIT "); menubar.add(quit); quit.setFont(new Font("Arial",Font.BOLD,13)); //PATIENT //------- ");
  • 43. regi = new JMenuItem("New Patient Registration"); edit1 = new JMenuItem("Edit Patient detail"); exit= new JMenuItem("Exit "); //doctor new_doc = new JMenuItem("New Doctor Entry "); edit2 = new JMenuItem("Edit Doctor Detail "); //emp new_emp = new JMenuItem("New Employee Entry "); edit3 = new JMenuItem("Edit Employee Detail "); //hospital dio = new JMenuItem("Diagnosis "); admit = new JMenuItem("Admission "); dis = new JMenuItem("Discharge "); //report report1 = new JMenuItem("Show Bill Detail "); patient.add(regi); patient.add(edit1);
  • 45. dio.setFont(new Font("Arial",Font.PLAIN,13)); admit.setFont(new Font("Arial",Font.PLAIN,13)); dis.setFont(new Font("Arial",Font.PLAIN,13)); report1.setFont(new Font("Arial",Font.PLAIN,13)); exit.setFont(new Font("Arial",Font.PLAIN,13)); new_doc.addActionListener(this); new_emp.addActionListener(this); regi.addActionListener(this); report1.addActionListener(this); dio.addActionListener(this); dis.addActionListener(this); admit.addActionListener(this); exit.addActionListener(this); menubar.requestFocus(); } public void actionPerformed(ActionEvent event) { if(event.getSource()==new_doc) {
  • 46. doctor obj=new doctor(d1); } else if(event.getSource()==new_emp) { staff obj=new staff(d1); } else if(event.getSource()==regi) { patient obj=new patient(d1); } else if(event.getSource()==admit) { admit obj=new admit(d1); } else if(event.getSource()==report1) { report_1 obj=new report_1(d1); } else if(event.getSource()==dio) { Diagnosis obj=new Diagnosis(d1); } else if(event.getSource()==dis) { bill obj=new bill(d1); }
  • 47. else if(event.getSource()==exit) { System.exit(0); } } } import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.border.*; import java.sql.*; import java.text.*; import java.awt.font.*; import java.util.*; public class admit extends JFrame implements ActionListener
  • 48. { Container c; JInternalFrame frame; JDesktopPane d; JTextField ipdid,date,pid,did,sid,test,dis,treat,ward,room,bed; JComboBox opdid; JButton save,reset,close; public admit(JDesktopPane d) { try { frame=new JInternalFrame("A D M I S S I O N E N T E R Y F O R M ",false,true,false,true); c=frame.getContentPane(); d.add(frame); c.setLayout(null); //Memory Allocation
  • 49. //----------------JLabel lab1=new JLabel("OPD No."); JLabel lab2=new JLabel("Admit Date"); JLabel lab3=new JLabel("OPD No."); JLabel lab4=new JLabel("Patient ID"); JLabel lab5=new JLabel("Doctor ID"); JLabel lab6=new JLabel("Satff ID"); JLabel lab7=new JLabel("Test Name"); JLabel lab8=new JLabel("Disease Name"); JLabel lab9=new JLabel("Treatment"); JLabel lab10=new JLabel("Ward No."); JLabel lab11=new JLabel("Room No."); JLabel lab12=new JLabel("Bed No."); opdid=new JComboBox(); ipdid=new JTextField(10); date=new JTextField(10); pid=new JTextField(10); did=new JTextField(10); sid=new JTextField(10); test=new JTextField(10); dis=new JTextField(10); treat=new JTextField(10); ward=new JTextField(10); room=new JTextField(10);
  • 50. bed=new JTextField(10); save=new JButton("Save",new ImageIcon("save.gif")); reset=new JButton("Reset",new ImageIcon("reset.gif")); close=new JButton("Close",new ImageIcon("close.gif")); lab1.setBounds(10,10,200,20); ipdid.setBounds(150,10,240,20); lab2.setBounds(10,40,200,20); date.setBounds(150,40,240,20); lab3.setBounds(10,70,200,20);opdid.setBounds(150,70,240,20); lab4.setBounds(10,100,200,20); pid.setBounds(150,100,240,20); lab5.setBounds(10,130,200,20);did.setBounds(150,130,240,20); lab6.setBounds(10,160,200,20);sid.setBounds(150,160,240,20); lab7.setBounds(10,190,200,20);test.setBounds(150,190,240,20); lab8.setBounds(10,220,200,20);dis.setBounds(150,220,240,20); lab9.setBounds(10,250,200,20);treat.setBounds(150,250,240,20); lab10.setBounds(10,280,200,20);ward.setBounds(150,280,240,20); lab11.setBounds(10,310,200,20);room.setBounds(150,310,240,20); lab12.setBounds(10,340,200,20);bed.setBounds(150,340,240,20); save.setBounds(50,400,100,35); reset.setBounds(175,400,100,35); close.setBounds(300,400,100,35); c.add(lab1); c.add(lab2); c.add(lab3);
  • 53. ResultSet rs=st.executeQuery("select * from opd"); opdid.removeAllItems(); while(rs.next()) { opdid.addItem(rs.getString(1)); } con.close(); } catch(Exception x) { System.out.println("Connection error..."+x); } } public void actionPerformed(ActionEvent event) { if(event.getSource()==opdid) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:hospital"); PreparedStatement st; st=con.prepareStatement("select * from opd where opd_id=?");
  • 55. { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:hospital"); Statement st=con.createStatement(); st.executeUpdate("insert into ipd values('"+ipdid.getText()+"','"+date.getText()+"','"+opdid.getSelectedItem()+"','"+pid.get Text()+"','"+did.getText()+"','"+sid.getText()+"','"+test.getText()+"','"+dis.getText()+"','" +treat.getText()+"','"+ward.getText()+"','"+room.getText()+"','"+bed.getText()+"')"); PreparedStatement st2; String str=opdid.getSelectedItem().toString().trim(); st2=con.prepareStatement("delete * from opd where opd_id=?"); st2.setString(1,str); st2.executeUpdate(); ipdid.setText(" "); date.setText(" "); pid.setText(" "); did.setText(" "); sid.setText(" ");
  • 56. test.setText(" "); dis.setText(" "); treat.setText(" "); ward.setText(" "); room.setText(" "); bed.setText(" "); JOptionPane.showMessageDialog(null,"Hi!"+"n"+" New IPD Information Saved ","Information",JOptionPane.INFORMATION_MESSAGE); } catch(Exception x) { JOptionPane.showMessageDialog(null,"Sorry!"+"n"+"Entered 'IPD ID' allready exist.","Information",JOptionPane.INFORMATION_MESSAGE); System.out.println("Connection error..."+x); } } else if(event.getSource()==reset) { ipdid.setText(" "); date.setText(" "); pid.setText(" "); did.setText(" "); sid.setText(" ");
  • 57. test.setText(" "); dis.setText(" "); treat.setText(" "); ward.setText(" "); room.setText(" "); bed.setText(" "); } else if(event.getSource()==close) { frame.dispose(); } } } import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.border.*; import java.sql.*; import java.text.*; import java.awt.font.*; import java.util.*;
  • 58. public class doctor extends JFrame implements ActionListener { Container c; JInternalFrame frame; JDesktopPane d; JTextField id,name,add,city,phone,qualify,dept,doj ; JButton save,reset,close; public doctor(JDesktopPane d) { try { frame=new JInternalFrame("N E W D O C T O R E N T E R Y F O R M ",false,true,false,true); c=frame.getContentPane(); d.add(frame); c.setLayout(null); //Memory Allocation //-----------------
  • 59. JLabel lab1=new JLabel("Doctor ID"); JLabel lab2=new JLabel("Name"); JLabel lab3=new JLabel("Address"); JLabel lab4=new JLabel("City "); JLabel lab5=new JLabel("Phone"); JLabel lab6=new JLabel("Qualification"); JLabel lab7=new JLabel("Department"); JLabel lab8=new JLabel("Date Of Joining"); id=new JTextField(10); name=new JTextField(10); add=new JTextField(20); city=new JTextField(20); phone=new JTextField(10); qualify=new JTextField(10); dept=new JTextField(10); doj=new JTextField(10); save=new JButton("Save",new ImageIcon("save.gif")); reset=new JButton("Reset",new ImageIcon("reset.gif")); close=new JButton("Close",new ImageIcon("close.gif")); lab1.setBounds(10,10,200,20); id.setBounds(150,10,240,20); lab2.setBounds(10,40,200,20); name.setBounds(150,40,240,20);
  • 62. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:hospital"); Statement st=con.createStatement(); st.executeUpdate("insert into doctor values('"+id.getText()+"','"+name.getText()+"','"+add.getText()+"','"+city.getText()+"','" +phone.getText()+"','"+qualify.getText()+"','"+dept.getText()+"','"+doj.getText()+"')"); id.setText(""); name.setText(""); add.setText(""); city.setText(""); phone.setText(""); qualify.setText(""); dept.setText(""); doj.setText(" "); JOptionPane.showMessageDialog(null,"Hi!"+"n"+" New Doctor Information Saved ","Information",JOptionPane.INFORMATION_MESSAGE); } catch(Exception x) { JOptionPane.showMessageDialog(null,"Sorry!"+"n"+"Entered 'Doctor ID' allready exist.","Information",JOptionPane.INFORMATION_MESSAGE);
  • 64. import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.border.*; import java.sql.*; import java.text.*; import java.awt.font.*; import java.util.*; public class patient extends JFrame implements ActionListener { Container c; JInternalFrame frame; JDesktopPane d;
  • 65. JTextField id,name,add,sex,age,date ; JComboBox cb; JButton save,reset,close; public patient(JDesktopPane d) { try { frame=new JInternalFrame("N E W P A T I E N T E N T E R Y F O R M ",false,true,false,true); c=frame.getContentPane(); d.add(frame); c.setLayout(null); //Memory Allocation //----------------JLabel lab1=new JLabel("Patient ID"); JLabel lab2=new JLabel("Name"); JLabel lab3=new JLabel("Sex"); JLabel lab4=new JLabel("Age"); JLabel lab5=new JLabel("Address "); JLabel lab6=new JLabel("Date");
  • 66. cb=new JComboBox(); cb.addItem("Male"); cb.addItem("Female"); id=new JTextField(10); name=new JTextField(10); add=new JTextField(20); age=new JTextField(20); date=new JTextField(10); save=new JButton("Save",new ImageIcon("save.gif")); reset=new JButton("Reset",new ImageIcon("reset.gif")); close=new JButton("Close",new ImageIcon("close.gif")); lab1.setBounds(10,10,200,20); id.setBounds(150,10,240,20); lab2.setBounds(10,40,200,20); name.setBounds(150,40,240,20); lab3.setBounds(10,70,200,20);cb.setBounds(150,70,240,20); lab4.setBounds(10,100,200,20); age.setBounds(150,100,240,20); lab5.setBounds(10,130,200,20);add.setBounds(150,130,240,20); lab6.setBounds(10,160,200,20);date.setBounds(150,160,240,20);
  • 68. close.addActionListener(this); } catch(Exception x) { System.out.println("error..."+x); } } public void actionPerformed(ActionEvent event) { if(event.getSource()==save) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:hospital"); Statement st=con.createStatement(); st.executeUpdate("insert into patient values('"+id.getText()+"','"+name.getText()+"','"+cb.getSelectedItem()+"','"+age.getText( )+"','"+add.getText()+"','"+date.getText()+"')"); id.setText(""); name.setText(""); add.setText("");
  • 69. age.setText(""); date.setText(""); JOptionPane.showMessageDialog(null,"Hi!"+"n"+" New Patient Information Saved ","Information",JOptionPane.INFORMATION_MESSAGE); } catch(Exception x) { JOptionPane.showMessageDialog(null,"Sorry!"+"n"+"Entered 'Patient ID' allready exist.","Information",JOptionPane.INFORMATION_MESSAGE); System.out.println("Connection error..."+x); } } else if(event.getSource()==reset) { id.setText(""); name.setText(""); add.setText(""); age.setText(""); date.setText(""); }
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76. FUTURE SCOPE & ENHANCEMENT OF PROJECT Due to the limited amount of resources and time, we are planning to restrict our project to demo for now, but later on it can be extended to the whole as live project. It’s a fact that the maintenance costs generally exceed the development costs. Clearly, if we want to reduce the overall cost of software or achieve “global” optimality in terms of cost rather than “local” optimality in terms of development cost only, the goal of development should be reduce the maintenance effort. That is, one of the important objectives of the development project should be to produce software that is easy to maintain. And the process should be such that it ensures this maintainability. BIBILIOGRAPHY
  • 77. software engineering: A practioner’s Approach BY Roger S. Pressman Java -E.Balagurusamy System Analysis and Design: Elias M. AWAD An introduction to data base system : BIPIN C. DESAI