Hospital Management
Hospital Management
Hospital Management
CHAPTER
NO.
1.
2.
PAGE NO.
CONTENT
Hospital Management
Main report
Introduction to HOSPITAL MANAGEMENT SYSTEM
Objective and scope
Theoretical Background
Definition Of Problem
New Computerized System
Project Description
System Analysis and Design vis--vis User Requirement
Project Model
System analysis
Data And Fact Gathering Technique
System design
System Planning
Methodology Adopted
System Implementation
Detail of Hardware & software used.
System Maintenance
System Evaluation
Feasibility study & Cost Benefit analysis
Detailed life cycle of the project
o ERD
o DFD
Context level
First level
Second level
o Methodology used for testing
Test Report
Screen Snapshot
Input screen
Output screen
Coding
3.
User Manual
Installation Guideline
Operational Guideline
Security
System Failure & Recovery
Back Up
Conclusion
Limitation
Future scope
4.
97
Annexure
Data Dictionary
References
Bibliography
Web-sites
101
2
5
7
12
13
14
14
15
15
16
17
18
System
INTRODUCTION
THEORETICAL BACKGROUND
DATABASE DESIGN
Record-based logical models are used in describing data at the logical and view
levels. In contrast to object-based data models, they are used both to specify the overall
logical structure of the database and to provide a higher-level description of the
implementation. Record-based models are so named because the database structure is fixedformat of several types. The use of fixed length record simplifies the physical-level
implementation of database.
The relational model uses a collection of tables to represent both data and relationship
among those data. Each table has multiple columns and each column has a unique name. A
row in a table represent a relationship among a set of values.
WHAT IS DATABASE?
A database may be defined as a mechanized, centrally controlled collection of all
operational data about related entities of an organization where the data are physically
organized and stored in such a way that the features- shareability, availability, resolvability,
integrity, security and data independence are achieved.
In order to achieve the goals of a database it is obvious that in an enterprise with a
database system there should be some identifiable person who will bear the main
responsibility for the operational data, the person is called a Database Administrator (DBA).
WHY DATABASE?
To some extent the answer to these questions depends on whether the system in
question is single or multi-user? Here the database is so small and so simple that the
advantages might not be very obvious. The primary goal of a DBMS is to provide as
environment that is both convenient to use in retrieving and storing database information.
Database systems are designed to manage large bodies of information. The
management of data involves both the definition of structures for the storage of information
and the provision of mechanisms for the manipulation of information. In addition, the
database records are stored in various files and different application programs are written to
extract records from and to add records from and to add records to the files.
10
11
WHAT IS ODBC ?
Open Database Connectivity(ODBC) Provides a standard interface that allows
one application to access many different data sources. The source code does not have to be
recompiled for each data source. A database driver links the application to a specific source
code. Database driver is a dynamic link library that an application can invoke on demand to
gain access to a particular data source. A library of ODBC function calls that allows an
application to connect to a data source, execute SQL statement and retrieve results.
Microsofts ODBC industry standard data access interface continues to provide a way to
access relational data as part of the OLEDB specification. OLEDB includes a bridge to
ODBC to enable continued support for the broad range of ODBC relational database drivers.
The MS OLEDB provider for ODBC leverages existing ODBC drivers, ensuring fast access
to database for which an ODBC driver exists. OOLEDB is a strategic system level
programming interface to access data through out the organization. It encapsulates various
DBMS functions that enables the creation of software components implementing such
services. OLEDB components contains data provider, data consumer, service components.
12
WHAT IS OLEDB ?
WHAT IS ACTIVEX CONTROLS ?
An ActiveX control is essentially a simple OLE object that supports the IUnknown
interface. It usually supports many more interfaces in order to offer functionality, but all
additional interfaces can be viewed as optional and, as such, a container should not rely on
any additional interfaces being supported. By not specifying additional interfaces that a
control must support, a control can efficiently target a particular area of functionality without
having to support particular interfaces to qualify as a control. As always with OLE, whether
in a control or a container, it should never be assumed that an interface is available, and
standard return-checking conventions should always be followed. It is important for a control
or container to degrade gracefully and offer alternative functionality if a required interface is
not available. It is important for controls that require optional features, or features specific to
a certain container, to be clearly packaged and marketed with those requirements. Similarly,
containers that offer certain features or component categories must be marketed and packaged
as offering those levels of support when hosting ActiveX Controls. It is recommended that
controls target and test with as many containers as possible, and degrade gracefully to offer
less or alternative functionality if interfaces or methods are not available. In a situation where
a control cannot perform its designated job function without the support of a component
category, that category should be entered as a requirement in the registry to prevent the
control being inserted in an inappropriate container.
These guidelines define those interfaces and methods that a control can expect a
container to support, although as always a control should check there turn values when using
QueryInterface or other methods to obtain pointers to these interfaces. A container should not
expect a control to support anything more than the IUnknown interface. These guidelines
identify what interfaces a control can support and what the presence of a particular interface
means.
13
DEFINITION OF PROBLEM
Here I am going to discuss the problem of manual HOSPITAL
MANAGEMENT SYSTEM. The problems are as follows :
2. Billing Problem
In this system when billing procedures are to be maintained, it has often been observed
that problem arises while keeping track of patient expenses and also during updating
billing records. This problem is related with patient admission, charge, test etc and other
related thing which are required to maintain hospitals expenses.
PROPOSED SOLUTION
To find out solution to the raised problem during the current HOSPITAL
MANAGEMENT SYSTEM, different software is developed to eliminate the drawbacks of
the current system.
14
15
PROJECT MODEL:
The linear or WATERFALL CYCLE :The development of this project is done on the basis of waterfall cycle .
A brief description of the model are as follows :The linear or waterfall cycle is a development process that centers around
planned work and is best suited for projects where the requirements can be clearly
defined . The linear cycle groups development activities into a sequence of consecutive
phase as shown in the figure which depicts the major phases concepts formation
system requirements definition system design and development. It also includes
installation and post-installation activities that usually follow the completion of
development . Each phase itself is made up of more detailed activities . Testing
proceeds is parallel with the major phases . a broad test strategy is defined at the
time of system requirements are identified Detailed test design takes place during
system design and testing is apart of the development phase . Each phase is sequence
can only commence after the previous phase has been completed. Each phase
produces one or more models or product in later phases . The models become part of
a phase report which describes what has been achieved in this phase and outlines a
plan for the next phase . The report also I include any models new or expanded
user requirements design decisions and problems encountered. This information is
used at the next phase . Phase reports are also used to keep management informed of
project progress so that management can use the reports to change project direction
16
SYSTEM ANALYSIS :System Analysis focuses on the functions performed in the problem domain
and the data consumed and produced by these functions. A Data Flow Diagram
(DFD) is one of the tools for System Analysis and shows the flow of data through a
system (through procedural information is not shown ). A system basically involves a
series of input to derive a series of outputs vide some varied transformation , depicted
diagrammatically in DFDs . The process (or bubbles) in the DFDs are shown by
named Circles and Arrows entering or leaving the bubbles represented data flows . A
rectangle represents a source or sink and is a net originator or consumer of data .
DFDs are usually hierarchically organizes , which helps in progressively portioning and
analyzing large systems.
DFDs not only shown the data flow fromm the process to another in the
system but also depicts the binding of the various sub modules within the system
with due weights to the inherent checks which serve as the validation stages in
between the processes of the system . Based on the above theories , the DFDs of the
Supermarket Management System are drawn .
DATA AND FACT GATHERING TECHNIQUE :The specific method that is used for collecting data requirements is called factfinding techniques. These include interviewing , questionnaire and examining the present
report to trace its data source . More than one of these techniques is employed to
ensure an accurate and comprehensive investigation. The various tools used in the
Systems Analysis Stage to gather data: -
INTERVIEWING :-
17
RECORD REVIEW :Examining the present records and reports provide me with valuable
information about organization and operations. In record reviews, information that has
been recorded about the system and users is examined. Record inspection can be
performed at the beginning of the study , as an introduction, or later in the study as a
basis for comparing actual operations with what the records indicate should be
happening . The records can help analysts understand the existing system by
familiarizing them with what operations must be supported and with formal relations
within the organization.
SITE VISITS :Sometimes existing documents and facts collected through interview and
questionnaires do the provide information regarding some aspects of the system
which the system analyst must know for effective analysis and design be visiting the
place where the system is to be installed. The maxim Seeing is believing also
suggests this point ; because many exaggerate some facts or do not elaborate the
requisite facts , with a physical inspection of the site may reveal
SYSTEM DESIGN: The most creative and challenging phase of the system life cycle is the System
Design. The term design describes a final system and the process by which it is developed. It
refers to the technical specifications (analogous to the Engineers blue print) that will be
applied in the implementing the proposed system.
The steps involved in Systems Design phase are:
To determine how the output is to be produced and in what format.
18
User Requirements: Once our analysis is complete, it is necessary to prepare a proposal. The proposal
itself may be long and detailed or relatively short, depending on the size and importance of
the project. The proposal will include various kind of information, but it must be presented in
a form of that clearly specifies the advantages of the project to the organization and its users.
It must be clear and precise and specify the goals. It must stress the advantages it will bring to
the organization and the improvements that will be made once the new system is in place.
So in my project after considering the problem of the user that they are facing a lot
in the introspective interests in the system I am going to find out the requirements of them.
Proper maintenance of the entire database.
Proper admission system.
Accurate updating.
Proper reports printing.
All sorts of proper information can be provided.
Authoritys requirements can be fulfilled.
SYSTEM PLANNING
19
Activity
Phase
to
tm
(Hours) (Hours)
tp
(Hours)
te
(Hours)
Preceding
Activity
System Analysis
20
26
34
26.33
System Design
30
38
44
37.33
C1
Detailed Design
95
110
140
112.5
C2
Coding
130
150
165
149.11
C1
Debugging
90
100
130
103.33
C2
10
14
18
13.67
10
12
16
12.67
10
11
12
11.33
Implementation
10
11
12
11.33
Total Time
405
482
571
477.66
Where
- to is the smallest possible duration to complete the activity if everything goes well ,
- tm is the normal duration required to complete the activity.
- tp is the longest duration required to complete the activity if everything goes
wrong.
- te
is the estimated duration of the time needed calculated from the above time
estimates using the formula :
20
C1
C2
6
E
10
H
8
G
7
F
From the above network diagram it is clear that all the activities comes under critical
path. This is because there are no parallel activities expect coding and debugging .The
delay in any one of the activities will cause delay of the entire project development .
The shortest path in the network is called the critical path . Identifying the critical path
is of great importance as it determines the duration of the entire project . Every
network has a critical path . It is possible to have multiple critical paths , if there are
ties among the shortest path .
So the critical path is:START ->1->2->3->4->5->6->7->8->9->10-> END
DURATION (DAYS): 5+7+22+30+21+3+3+2+2 = 95 DAYS.
DEVELOPMENT SCHEDULE DATES DERIVED BY THE ABOVE PERT CHART:-
21
Start Date
End Date
1.
2.
3.
4.
5.
6.
7.
8.
9.
System Analysis
System
Design
Detailed Design
Coding
Debugging
Unit & Integration Testing
Validation & System
Testing
Fine Tuning
Implementation
SYSTEM IMPLEMENTATION
The implementation phase is less creative than system design . It is primarily
concerned with use training , site preparation and file conversion. During the final
testing , user acceptance is tested .
After the installation of the new system has been done , the users were given
a detailed demonstrations of the system and were trained how to handle the system
efficiently . Every screen was shown to user and was described to them .
The user also participated in a detail discussion of the project , their liking and
disliking. There were also a detail discussion about the different input types that are
to be entered and how to handle various controls.
After the completion of the training period , the users were requested to handle
the system and test the system using some data, or the data that were handled using
the previous system.
This type of system testing checks the readiness and accuracy of the system to
access , update and retrieve data from new files using old data. After successful
running the new system executes parallel with the old system.
For my project it is needed to implement a front end and a back end front
end with which a user can interact with the system and a back end i.e.
22
DATABASE REQUIREMENTS: -
Software Used -
23
24
Why database programming: Databases and database systems have become an essential component of
everyday life in modern society . In a course of a day , most of us encounter several
activities that involve some interaction with the database. For example, if we access a
computerized library catalogue to search for a bibliographic term ; if we go to the
bank to deposit or withdraw funds ; if we make a hotel or airline reservation ; or if
we order a magazine subscription from a publisher , chances are that our activities
will involve someone accessing a database .
A database is a collection of related data that can be recorded and that have implicit
meaning . A database has the following implicit properties :
A database represents some aspects of real world are reflected in the database.
A database is a logically coherent collection of data with some inherit meaning
A random assortment of data cannot be referred to as a database.
A database is designed , built and populated with data for a specific purpose . It has
an intended group of user and some preconceived applications in which these users
are interested.
A database may be generated and maintained manually or it may be computerized .
A computerized database may be created and maintained either by a group of
application programs written specifically for that task or by a database management
system.
A database management system (DBMS) is a collection of programs that
enables a user to create and maintain a database . The DBMS is hence a generalpurpose software system that facilities the process of defining , constructing and
manipulating database for various applications. Defining a database involves specifying
the data types , structures and constrains for the data to be stored in the database is
the process of sorting the data itself on some storage medium that is controlled by
the DBMS. Manipulating a database involves such functions as queering the database
to retrieve the specific data , updating the database to reflect changes in the real
world , and generating the reports from the data . It is not necessary to use generalpurpose software. We could write our own set of programs to create and maintain the
database, in effect our own general purpose DBMS software.
25
26
Data independence :
In no database approach the data in files and the applications, which
use the data , are interdependent . Thus any changes in data structure or storage
structure and access strategy will necessitate a changes in the applications even when
the purpose of the application remains unchanged. Thus programmers are to be
involved in modifications activities whenever record structures in file are expanded .
Changes in record structures, or storage structures or access strategy are inevitable
because requirements in business organization changed frequently for making
corresponding changes in applications. So it is desirable that applications should
remain immune to change in data structures, storage structures, or access strategy. In
database approach separating data from the programs that use it and thus making the
data sharable by different applications can achieved data independence.
Atomicity problems :
A computer system , like any other mechanical or electrical device , is subject
to failure . In many applications, it is critical that, if a failure occurs, the data be
restored to consistent state that existent state that existent prior to the failure.
Consider a program to transfer $50 from account A to account B. If system failure
occurs during execution of the program , it is possible that at the $50 was removed
from account A but was not credited to account B resulting an inconsistent database
state . Clearly , it is essential to database consistency that either both the credit and
the debit occur , or that neither occur. That is, the funds transfers must be atomic in
nature . It is difficult to ensure atomicity in a non-database system but it can be well
implemented through a DBMS .
EXTERNAL
VIEW
27
EXTERNAL VIEW
CONCEPTUAL LEVEL
CONCEPTUAL SCHEME
INTERNAL SCHEME
INTERNAL LEVEL
STORED DATABASE
28
when
The Log Writer writes changes to the Redo Log files when the changes
are committed .
System Global Area
Database
Buffer
Redo Buffer
Shared
Buffer Pool
Cache
Server
Process
29
Visual Basic
Application
Fig : Connecting to Oracle through a Server Process
30
31
Open Database Connectivity :Each DBMS stores data in a particular format. For example , MICROSOFT
access stores data in .MDB file while Foxpro uses the .DBF format. The means ,
traditionally , a database application is developed keeping in mind a particular type of
database. Changing from one DBMS to another means rewriting the application to
handle data in a new format. This means a lot of time and effort is spend in
recreating the application each time we want to change databases.
In the early days of computing , organizations typically used just a single
DBMS. The databases was manipulated using applications written specifically used
just a single DBMS . The database was manipulated using applications written
specifically for this type of database or the DBMSs facilities itself. For example , if
the data is stored in ORACLE then we can use these to access in ORACLE database
PL/SQL
SQL *PLUS
32
Application
Translator
Database
33
Item
Hardware Cost
Software Cost
User Training
Supply Cost
TOTAL COST
Value In Rs.
20000.00
5000.00
5000.00
1000.00
31000.00
Now we identify each benefit and then assign a monetary value to it for cost-benefit.
These benefits may be tangible or intangible, direct or indirect. The major benefits are
improving performance and minimizing the cost of processing. Minimizing costs through an
efficient system by means of error control or reduction of staff is a measure of benefits and we
consider these into the following benefit chart.
34
Sl.No. Process
Time Taken In
Manual Operation
Time Taken In
Automated Operation
25 min
10 min
02 Patient transaction
Entry form
90 min
15 min
03
Bill generation
45 min
5 min
04
40 min
5 min
Now we consider the time and effort saved after implementing this system. Therefore
we measure the time saved per transaction and from there calculate the person month saved
and finally print the same in terms of rupees.
Benefits of ER modeling :
35
SHAPE
components :-
Rectangle
PURPOSE
Used for representing
entity types.
Ellipses
Diamonds
36
Lines of Arcs
Double Ellipses
Dashed Ellipses
Double lines
participation of an entity
of an entity in relationship
type.
37
E-R Diagram
Bed
No.
Fathers
Name
Phon
e No.
Doctor
s
Name
Date Of
Admission
Patien
t
ID
Patient
Patient
Name
Fees
Deposited
Floor
No.
Allo
tted
From
Bed No.
To
To Bed
No.
Patient
ID
T
e
s
t
Under
Doctor
Test
Description
Rooms
Roo
m
e
Address
t
e
d
Beds
Phone
No.
Keeps
Recor
ds
of
Statu
s
Name
System User
(Admin)
D
e
li
v
e
Reports
r
s
A
tt
e
n
e
d Address
d
Passwor
d
38
T
r
e
a
t
Doctor
s
s
Nurse
ID
Name
Specialization
ID
Phon
e
No.
Name
39
Dataflow diagrams have the objectives of avoiding the cost of :User/developer misunderstanding of a system , resulting in a need to redo
system or in not using system .
Having to start documentation from the scratch when the physical system
changes science the logical system , what gets done often remains the same
when technology changes.
System inefficiency because a system gets computerized before It gets
systematized.
Being unable to evaluate system project boundaries or degree of Automation
resulting in a project in appropriate scope.
MEANING
Source or Destination
of DATA
Or
COMMENTS
External Entity.
Or
DATA flow
May be customer
Connected to purchase order
Data Store
Data report
EXTERNAL ENTITIES :
1.
2.
40
3.
Determine the system boundary . They are external to the system being
studied . They are often be beyond the area of influence of the developer .
4.
5.
DATA FLOWS :
1.
Are represented with a line with an arrowhead on the head on the end.
A fork in a data flows means that the same data goes to two separate
destination. The same data coming from several locations can also be
jointed .
2.
3.
4.
DATA STORE :
1.
Are generic for physical files (index cards , desk drawers, magnetic disk,
magnetic tapes , shirt pocket , human etc .
2. Are named with an appropriate name , not to include the word file
and numbered with a number proceed with a capital letter D.
3. Can be duplicated , one or more times , to avoid line crossing .
4. Can so to or more systems that share a data store ? Adding a solid strip on
the left boundary does this . This can occur in the case of some system
updating data store , while the other system access the data. For example , the
data store could be a fright rate builds and maintains , but is represented
system.
5. Are detailed in the data dictionary or with the data description
diagram.
PROCESS :
1. So data transformation or changed . Data coming into a process must be
worked on or transformed in some way . Thus, all process must
have inputs and outputs . In some case, data inputs and outputs will
only be shown at more detailed levels of the diagram . Each process is
always running and ready to accept the data.
41
CONTEXT DIAGRAM :
The Context Diagram represents the entire software element as a single bubble
with input and output data indicated by incoming and outgoing arrows , respectively .
Additional process (bubbles) and information flows paths are represented as the level
0 DFD is portioned to reveal more detail . Here , the emphasis is on the relationship
between the system and its environment. The system as a whole is represented as a
bubble , and the external entities are shown as squares from which input flows and to
which input is directed.
42
43
44
TYPE
SIZE
DESCRIPTION
Doctor_ID
Varchar
Code of doctor
Doctor_name
Varchar
20
Name of doctor
Address
Varchar
45
Address of doctor
Phone_no
varchar
15
Specialization
Varchar
18
Doctors specialization
in particular field
TYPE
SIZE
DESCRIPTION
Patient_ID
Varchar
Code of patient
Patient_name
Varchar
20
Name of patient
address
Varchar
25
Address of patient
Father-name
Varchar
20
Phone_no
Varchar
15
Admission_date
Varchar
10
Guardian name of
patient
Patients phone
number
Date of admission
Diseases
Varchar
15
Disease of patient
Under_doctor
Varchar
15
Fees
Varchar
18
Patients treatment
under doctor
Patient deposits for
admission
TYPE
SIZE
DESCRIPTION
Nurse_ID
Varchar
Code of nurse
Nurse_name
Varchar
20
Name of nurse
address
Varchar
25
Address of nurse
Phone_no
Varchar
15
Nurses phone
number
TYPE
SIZE
45
DESCRIPTION
Varchar
Code of patient
gbcha
Varchar
20
recha
Varchar
25
focha
Varchar
20
iIcuch
Varchar
15
medcn
Varchar
10
opcha
Varchar
10
TYPE
SIZE
DESCRIPTION
pcode
Varchar
vdoct
Varchar
20
pdate
Varchar
10
docre
Varchar
30
btest
Varchar
30
utest
Varchar
30
ecgre
Varchar
30
press
Varchar
20
missl
Varchar
40
TYPE
SIZE
DESCRIPTION
pcode
Varchar
ptest
Varchar
40
46
Varchar
10
prepo
Varchar
45
undoc
Varchar
25
TYPE
SIZE
DESCRIPTION
Room_ID
varchar
10
Floor_no
varchar
20
Tbnum
varchar
20
Flnum
varchar
20
Typat
varchar
45
TYPE
SIZE
DESCRIPTION
Uname
Varchar
11
Passwd
Varchar
11
Status
Varchar
Coding :
frmLogin
47
Imports System.Data.SqlClient
Public Class frmLogin
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
Dim i As Integer
i = MsgBox("really exit?", MsgBoxStyle.YesNoCancel)
If i = 6 Then
Application.Exit()
Else
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Dim login As String = "select *from login where User_Name='" & TextBox1.Text & "'and Password='" &
TextBox2.Text & "'"
Dim constr As String = "server=.;database=hospital_management;user id=;pwd=;Integrated
Security=SSPI"
Dim con As New SqlConnection(constr)
Dim dataadapt As New SqlDataAdapter(login, con)
Dim dset As New DataSet
dataadapt.Fill(dset, "Ajij")
Dim i As Integer
i = dset.Tables("Ajij").Rows.Count
If i > 0 Then
Timer1.Start()
Else
MsgBox("Invalid User Name or Password.", MsgBoxStyle.Information)
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Timer1.Tick
Timer1.Start()
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 100
Timer1.Interval = 100
ProgressBar1.Step = 5
ProgressBar1.PerformStep()
If ProgressBar1.Value = 100 Then
frmMenu.Show()
Me.Hide()
Timer1.Stop()
End If
End Sub
End Class
frmChngPwd
Imports System.Data.SqlClient
48
frmAddUser
Imports System.Data.SqlClient
Public Class frmAddUser
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Dim cmstr As String = "insert into login values('" & TextBox1.Text & "','" & TextBox2.Text & "')"
Dim constr As String= "Server=.;database=Hospital_Management;User id=;pwd=;integrated
security=SSPI"
Dim con As New SqlConnection(constr)
Dim cmd As New SqlCommand(cmstr, con)
con.Open()
cmd.Connection = con
cmd.ExecuteNonQuery()
MsgBox("1 user name and password created successfilly.")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
Dim i As Integer
i = MsgBox("Really want to exit?", MsgBoxStyle.YesNoCancel)
If i = 6 Then
Me.Close()
frmMenu.Show()
End If
End Sub
End Class
49
frmPatientAdmission
Imports System.Data.SqlClient
Public Class frmAdmission
Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdAdd.Click
Dim cmstr As String = "insert into Patient_admission values('" & txtid.Text & "','" & cmbname.Text & "','"
& txtadd.Text & "'," & txtroomno.Text & ", '" & txtbedno.Text & "', '" & cmbroomtype.Text & "'," &
txtproomno.Text & ", '" & cmbdassigned.Text & "', '" & txtpcond.Text & "', '" & DateTimePicker1.Text & "')"
Dim constr As String
constr = "Server=.;database=Hospital_Management;User id=;pwd=;integrated security=SSPI"
Dim con As New SqlConnection(constr)
Dim cmd As New SqlCommand(cmstr, con)
con.Open()
cmd.Connection = con
cmd.ExecuteNonQuery()
MsgBox("Data inserted Successfully.")
txtid.Text = ""
cmbname.Text = ""
txtadd.Text = ""
txtroomno.Text = ""
txtbedno.Text = ""
cmbroomtype.Text = ""
txtproomno.Text = ""
cmbdassigned.Text = ""
txtpcond.Text = ""
DateTimePicker1.Text = ""
End Sub
Private Sub cmdEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdEdit.Click
If txtid.Text <> "" Then
Dim str As String
str = "select*from Patient_admission where Patient_admission_id='" & Trim(txtid.Text) & "'"
Dim constr As String
constr = "Server=.;database=Hospital_Management;User id=;pwd=;integrated security=SSPI"
Dim con As New SqlConnection(constr)
Dim da As New SqlDataAdapter(str, constr)
Dim ds As New DataSet
da.Fill(ds, "Ajij")
Dim dr As DataRow
For Each dr In ds.Tables("Ajij").Rows
txtid.Text = dr("Patient_admission_id")
cmbname.Text = dr("Patient_name")
txtadd.Text = dr("address")
txtroomno.Text = dr("room_no")
txtbedno.Text = dr("bed_no")
cmbroomtype.Text = dr("room_type")
txtproomno.Text = dr("previous_room_no")
cmbdassigned.Text = dr("Doctor_assigned")
txtpcond.Text = dr("Patient_condition")
DateTimePicker1.Text = dr("Admission_date")
Next
50
51
frmpatientDischarge
Imports System.Data.Sqlclient
Public Class frmDischarge
Private Sub cmdEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdEdit.Click
If txtid.Text <> "" Then
Dim str As String
str = "select*from Patient_discharge where Patient_discharge_id='" & Trim(txtid.Text) & "'"
Dim constr As String
constr = "Server=.;database=Hospital_Management;User id=;pwd=;integrated security=SSPI"
Dim con As New SqlConnection(constr)
If con.State = ConnectionState.Closed Then con.Open()
Dim da As New SqlDataAdapter(str, constr)
Dim ds As New DataSet
da.Fill(ds, "Ajij")
Dim dr As DataRow
For Each dr In ds.Tables("Ajij").Rows
txtid.Text = dr("Patient_discharge_id")
cmbname.Text = dr("Patient_name")
DateTimePicker1.Text = dr("discharged_date")
txtfees.Text = dr("fees")
cmbdoc.Text = dr("approval_doctor")
Next
DataGrid1.DataSource = ds.Tables("Ajij")
Else
MsgBox("enter Patient_discharge_id", MsgBoxStyle.Information)
End If
End Sub
52
53
frmpatientMaster
Imports System.Data.SqlClient
Public Class frmPatient
Private Sub cmdEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdEdit.Click
If txtid.Text <> "" Then
Dim str As String
str = "select*from Patient where Patient_id='" & Trim(txtid.Text) & "'"
Dim constr As String
constr = "Server=.;database=Hospital_Management;User id=;pwd=;integrated security=SSPI"
Dim con As New SqlConnection(constr)
If con.State = ConnectionState.Closed Then con.Open()
54
55
56
frmDoctor
Imports System.Data.SqlClient
Public Class frmDoctor
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdAdd.Click
Dim cmstr As String
cmstr = "insert into Doctor values(" & txtid.Text & ", '" & Trim(cmbname.Text) & "','" &
txtdescription.Text & "' ,'" & txtadd.Text & "', '" & txtquali.Text & "', " & txtphone.Text & ",'" & txtspeci.Text &
"')"
Dim constr As String
constr = "Server=.;database=Hospital_Management;User id=;pwd=;integrated security=SSPI"
Dim con As New SqlConnection(constr)
Dim cmd As New SqlCommand(cmstr, con)
cmd.Connection = con
If con.State = ConnectionState.Closed Then con.Open()
cmd.ExecuteNonQuery()
MsgBox("data inserted")
txtid.Text = ""
cmbname.Text = ""
txtdescription.Text = ""
txtadd.Text = ""
txtphone.Text = ""
txtspeci.Text = ""
txtquali.Text = ""
End Sub
Private Sub frmDoctor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Dim str As String
str = "select * from Doctor "
Dim constr As String
constr = "Server=.;database=Hospital_Management;User id=;pwd=;integrated security=SSPI"
Dim con As New SqlConnection(constr)
If con.State = ConnectionState.Closed Then con.Open()
Dim da As New SqlDataAdapter(str, constr)
Dim ds As New DataSet
da.Fill(ds, "Ajij")
With cmbname
.DataSource = ds.Tables("Ajij")
.DisplayMember = "doctor_name"
.ValueMember = "Doctor_id"
End With
con.Close()
End Sub
Private Sub cmdEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdEdit.Click
If txtid.Text <> "" Then
Dim str As String
str = "select*from Doctor where Doctor_id=" & Trim(txtid.Text) & ""
Dim constr As String
constr = "Server=.;database=Hospital_Management;User id=;pwd=;integrated security=SSPI"
Dim con As New SqlConnection(constr)
If con.State = ConnectionState.Closed Then con.Open()
57
58
frmNurse
Imports System.Data.SqlClient
Public Class frmNurse
Private Sub cmdEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdEdit.Click
If txtid.Text <> "" Then
Dim str As String
str = "select*from Nurse where Nurse_id=" & Trim(txtid.Text) & ""
Dim constr As String
constr = "Server=.;database=Hospital_Management;User id=;pwd=;integrated security=SSPI"
Dim con As New SqlConnection(constr)
If con.State = ConnectionState.Closed Then con.Open()
Dim da As New SqlDataAdapter(str, constr)
Dim ds As New DataSet
da.Fill(ds, "Ajij")
Dim dr As DataRow
For Each dr In ds.Tables("Ajij").Rows
txtid.Text = dr("Nurse_id")
cmbname.Text = dr("Nurse_name")
txtdescription.Text = dr("Description")
txtadd.Text = dr("Nurse_address")
txtphone.Text = dr("Nurse_phone_no")
Next
DataGrid1.DataSource = ds.Tables("Ajij")
Else
MsgBox("Enter Nurse id.", MsgBoxStyle.Information)
End If
End Sub
Private Sub frmNurse_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
59
60
frmOPD
Imports System.Data.SqlClient
Public Class frmOPD
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdAdd.Click
Dim cmstr As String
cmstr = "insert into OPD values('" & txtid.Text & "', '" & cmbname.Text & "','" & cmbtype.Text & "', '" &
txtdescription.Text & "','" & cmbsname.Text & "')"
Dim constr As String
constr = "Server=.;database=Hospital_Management;User id=;pwd=;integrated security=SSPI"
Dim con As New SqlConnection(constr)
Dim cmd As New SqlCommand(cmstr, con)
cmd.Connection = con
If con.State = ConnectionState.Closed Then con.Open()
cmd.ExecuteNonQuery()
MsgBox("data inserted")
61
62
frmDiscipline
Imports System.Data.SqlClient
Public Class frmDiscipline
Private Sub cmdEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdEdit.Click
If TextBox1.Text <> "" Then
63
64
65
SYSTEM TESTING
System testing is an expensive but critical process that can takes as much as 50% of
the budget for program development. The common view of testing held by users is
that it is performed to proof that there are no errors in a program with the explicit
intention of finding errors that is, making the program fail . The tester, who may be
analyst , programmer or specialist trained in software testing , is actually trying to
make the program fail . A successful test , then , is one of the finds an error.
Analyst knows that an affective program testing does not guarantee system reliability
or quantity assurance must be design into the system .
Quality assurance is the review of software products are related documentation for
completeness , correctness , reliability and maintainability . Analyst used for four levels
of quality assurance as follows
Testing.
Verification
Validation
Certification
TESTING:These are two general strategies for testing software, such as , code testing and
specification testing.
CODE TESTING :Code testing strategy examines the logic of program . For this testing method, the
analyst develops test cases that result in executing every instruction in the programmer
module , that is every path through the program is tested .
SPECIFICATION TESTING :To perform specification testing , the analyst can determine the program specification
where in states what the program should do and how it should perform under various
66
1. USING LIVE TEST DATA :Live test data are those that are actually extracted from organizational files . This
shows that how system will perform on typical data . Although the combinations and
conditions of the system are not tested with this data .
2. USING ARTIFICIAL DATA :Artificial test data are solely for test purposes . They are to be generated to test all
combinations of formats and values . They are generated using the utility programs of
the information system . Using this type of data all logic and control parts through the
program can be tested .
SPECIAL SYSTEM TEST :These are other tests that are image special category , as they dont focus on the
normal running of the system . These are as follows :PEAK LOAD TEST :This is used to determine whether the system will handle the volume of activities
that occur when the system is at peak of its processing demands. For instance when
all terminals when activated same time. This test applies mainly for online system.
STORAGE TESTING :This test is to be carried out to determine the capacity of the system to store
translation data on a disk or in other files . Capacities here are measured in terms of
the number of records that a disk will handle or a file can contain . If this test is not
carried out then there are possibilities that during installation one may of discover
that there is not enough storage capacity for transaction and master file records.
PERFORMANCE TIME TESTING :-
67
RECOVERY TESTING :Analyst must never be sure of anything . He must always be prepare for the worst .
One should assume that the system will fail and data will be damaged or lost . Even
though plans and procedures are written to cover these situation they also must be
tested.
PROCEDURE TESTING :Documentation and run manuals telling the users how to perform certain functions are
tested quite easily by asking the users to follow them exactly through a series of
events .
HUMAN FACTORS :In case during processing , the screen goes blank , the operator may star to wonder as
to what is happening can be just about to do anything such as press the enter key a
number of times , or switch of the system and so on , but if a message displayed
saying that the processing is in progressing is in progress and asking the operator to
wait , these types of problems can be avoided.
VERIFICATION :
Verification testing runs the system in a simulated environment using simulated data .
This simulated test is primarily looking for errors and omissions regarding and end
users and design specification that were specified in the earlier phase but not fulfilled
during constructions.
VALIDATION :
Validation refers to the process of using software in a live environment in order to
find errors . The feedback from the validation phase generally products change in the
software to deal with errors and failure that are uncovered . Then a set of users sites
is selected that puts the system into use on a life basis . They are called Beta test
sites .
CERTIFICATION:-
68
69
SCREEN SHOT
70
71
To add record in
the database
To search record
From the database
To save record
in the database
To modify record
from the database
To delete record
from the database
to generate bill
72
To exit from
this form
73
USERS MANUAL : The first screen shows the splash screen and thereafter open frmLogin form of
the project and along with password security. In this project password is kaberi & user
name is kaberi. After passing the security all the menus are activated. There are twenty four
submenus under the NURSINGHOME MANAGEMENT SYSTEM, where there are eight
entry form, eight query form, eight report form. And along with every entry form there are
eight bill form.
1.
74
SECURITY :
Security is critical in system development . The amount of protection depends on the
sensitivity of the data , the reliability of the user , and the complexity of the system .
The motive behind security are to keep the organization running , protect data as an
asset , and seek management support for more installation. Here I provide a password
system for security. Only the person will be able to enter the system who is wellknown about password.
75
CONCLUSION
The software HOSPITAL MANAGEMENT SYSTEM has been developed by
me as to the best of my knowledge and capabilities . I have been amply assisted and
guided by my seniors as and when I required help. Though I have tried my level
best to make this software full proof and exhaustive . There might have been some
shortcoming and there need much to be included in this software . I have designed
this software as per availability of data , which I have collected from different
sources and I have abided by the norms and regulations as set up by the organization
. In future , I will try to make this or any type of software much enriched with
sophistication and improved in all aspects.
LIMITATION
To write down the limitations of ones developed system is one of , may be
the most embarrassing part . The said developer has to find the sort coming of the
system that he/she has developed . To begin with , likewise , any other given system, the
system that I have developed has also its share of merits and demerits. Here I am
going to elaborate some of the demerits this system suffers from . Some of them may
be lack of infrastructure , while others due to the lack of my technical ability . As
already mentioned , a system of such software volume and developing it single ability
, it is bound so suffer from some limitation .
It is not possible for any developer to point out or demarcate all limitations the
system has . But I sill try to my level best to point out limitations as I can .
There are as follows :1. The software do not support network environment . It will run only on
standalones.
2. We cannot provide the details regarding various departments, their financial
status .
3. The project is for a particular hospital and implementation for any other health
center will require some change.
4. The data type is predefined and the user will not be able to change them.
FUTURE SCOPE
76
77
DATA DICTIONARY
Data dictionary may be defined as a repository holding information
that specifies and describes that characteristic of the elements used in a system
including definitive description of process within the system .
The data dictionary is developed during the data flow analysis and
assists the analysts in determining systems requirements without ambiguity and
confusion . A DD is important to analysts for the following reason:
The details in a large system can be managed easily with the help of
DD .
A common meaning for all system elements can be communicated and
standards for naming can be enforced across application through a DD.
The features of a system become documented in a DD and
can be consulted when required .
hence it
Each word must be unique ; we cannot have two definitions of the same client
name.
3. Aliases , or synonyms , are allowed when two or more entries show the same
meaning ; a vendor number may also be called a customer number . However ,
aliases should be used only when absolutely necessary.
4. Self-defining words should not be decomposed.
78
Stand-alone .
The Integrated dictionary is related to one database management system. To the extent
the organization data is under the DBMS it is global or organization wide. However ,
very few enterprise have all their eggs in one basket , so the dictionary documentation
(metadata) can be considered as local and fragmented .
The Stand-alone dictionary is not tied to any one DBMS , although it may have
special advantages for one DBMS , such as the IBM DB-PC Data-Dictionary , which
has special features related to the IBM IMS DBMS but is still a stand-alone variety
of dictionary.
DATA DICTIONARY FUNCTION :Both these type of dictionaries can be identified by functions as either PASSIVE ,
ACTIVE or IN-LINE. Viewed either way , by type or function , the difference are
striking . Passive , active, and in-line dictionaries differ functionally as follows:Passive Data Dictionaries
The functionally passive dictionary performs documentation only. This variety of
dictionary could be maintained as a manual rather than an automated database. For
more than limited documentation use , the automated passive dictionary has clear
advantages . Form the organization view the documentation function is the most
important dictionary service with the most potential benefits , so the passive dictionary
should not be thought of negatively . It has most limited functionality but may perform
its critical function of global documentation best of all.
Active Data Dictionaries
Besides supporting documentation to one degree or another , the active data dictionary
supports program and operations development by exporting database definitions and
program data storage definitions for languages such as COBOL and Job Control
Language (JCL) for execution-time performance . The IBM DB/DC Data Dictionary
already mentioned is such a stand-alone , active data dictionary . A dictionary such as
this is not an in-line data dictionary as delivered , which is not to say that it could
not be put in-line by a determined effort of major proportion .
In-Line Data Dictionaries
79
An in-line data dictionary is active during program execution , performing such feats as
transaction validation and editing . such a dictionary would always have some
documentation value , but documentation across the organization functions and activities
and all the organization information data stores is not likely. In-Line dictionaries are
associated with DBMS products such as Cullinet Software Corporations IDMS R or
Cincom Systems TOTAL , to name just two .
BIBLIOGRAPHY
During the development of the software HOSPITAL MANAGEMENT
SYSTEM, I have used many resource sand for that I am grateful to all the people concerned.
80
81