Sunteți pe pagina 1din 72

Chetan Sadhan Institute of Science & Technonogy

(LC Code: 01569)

Project Report

On

The Project

Hospital Management System

Submitted to

The Sikkim Manipal University


In the partial fulfillment of the requirements for the degree of
Bachelor of Science (IT)

By

Diksha Singh
Registration # 581127987
Student Declaration

I hereby declare that the project report entitled Hospital


Management System is my original work and no part of this report
has been submitted for the award of any Degree, Diploma ,
Fellowship or other similar titles or prizes and that the work has
not been published in any journal or magazine.

Diksha Singh

2|Page
Examiner’s Certification

The Project Report of Diksha Singh Hospital Management System


is approved and is acceptable in quality and form

Internal Examiner(s) External Examiner(s)

3|Page
University Study Centre Certificate

This is to certify that the project report entitled Hospital


Management System submitted in partial fulfillment of the
requirements for the degree of Bachelor of Science (IT) of Sikkim
Manipal University of Health, Medical and Technological Sciences

Amitabh Rajan
Director
Chetan Sadhan Institute fo Science & Technology
LC Code: 01569

4|Page
Guide’s Certificate

This is to certify that Diksha Singh has worked under my


supervision and guidance and that no part of this report has been
submitted for the award of any Degree, Diploma , Fellowship or
other similar titles or prizes and that the work has not been
published in any journal or magazine.

Manish Kumar Mishra

5|Page
Acknowledgement

This project is an important milestone towards completing my


Bachelor’s Degree of Science (IT). In this project, right from
conceptualization to completion many people have guided and
motivated me. So, I would take opportunity to thank all of them.

Firstly, I thank Mr. Amitabh Rajan (Director fo Chetan Sadhan


Institute of Science & Technology) for providing us with all the
amenities (viz. computers, subject experts, internet connectivity) to
make sure that we do not face any shortcomings in completing our
projects. Not only that we always found him present whenever we
needed any technical or moral support.

Secondly, I express my gratitude to Mr. Manish Kumar Mishra,


our guide and mentor who shaped our raw ideas in a working
application.

Last but not the least; I thank Mr. Pankaj Kumar for keeping our
labs in top notch condition so that we can do our work hasslefree.

Diksha Singh

6|Page
Abstract

This project work titled “Hospital Management System” has been


carried out in regard to the partial fulfillment of the requirements
for the Degree of Bachelor of Science (IT), Sikkim Manipal
University. It is an integral part of the last semester of the above
mentioned course. This project was assigned to us so that we can
gain a good amount of practical expertise in the field of our
interest.

I have completed this project in a time frame of three months. I


went through all the phases of Software Development Life Cycle
viz requirement analysis, design and implementation, coding,
testing etc, about which I had only studied in books.

7|Page
Table of Contents

Acknowledgement ................................................................................. 6

Abstract.................................................................................................... 7

Introduction ............................................................................................ 9

Objective ................................................................................................ 12

Problem Statement ............................................................................... 13

Requirement Analysis ......................................................................... 15

Screenshots ............................................................................................ 25

Coding ................................................................................................... 32

Testing Procedure ................................................................................ 62

Documentation ..................................................................................... 64

Future Application............................................................................... 65

Conclusion ............................................................................................ 71

Bibliography ......................................................................................... 72

8|Page
Introduction

This project report is an approach to present and describe my


work – “Hospital Management System”. This report carries all the
details right from requirement analysis to the testing phase of the
system.

Hospital Management System is an application to designed to


manage various activities of a hospital. It has modules for
registering outdoor patients, admitting patient, prescription
management etc.

This application is developed keeping retail software in mind


which are generalized. All though I have done most of my
requirement analysis at a private city hospital but I had consulted
authorities of few more hospitals to confirm whatever information
I have collected can be used for creating a generalized school
management system. To some extent I am successful. Due to
constraint in time I could not include all the features in my
application. Details of those features are discussed in requirement
analysis section.

Health of citizen is the wealth of Nation. India has contributed the


most ancient Medical science “AYURVEDA” to the world besides
other Medical sciences. This field had witnessed a rapid
metamorphosis in all of its sections. With immensely increasing
advancement in the field of technology, ambit of medical sciences

9|Page
has enlarged making it more sophisticated, diagnosis and cure-
oriented. With the advent of 21st century, Health care has become
an industry having tremendous potential.

This century witnessed a giant leap in information technology.


Computers are not only used to diagnose the illness or for doing
surgery with one hundred percent accuracy, but also they are used
to increase the efficiency in all fields ranging from fixing the
appointment with the Doctor to keeping the record of the Patient.

Software application can provide solution and services for the


global health care industry. By using the cutting edge technologies,
Hospital Management can be improved with efficient work flow
and communication. Any time any where facilities of the
INTERNET have helped the Medical fields to integrate into a
single unit. Various Hospitals across the globe can be connected
together. They can share information and even services. Details of
the Patients, their previous visits etc. are totally not perceptible
without a computer.

Relevant Informations are always stored in the computer and are


available instantly in front of the user.

10 | P a g e
Medical Transcription, one of the latest technologies in health
world provided with Internet facilities helps patient’s interaction
with different Health Experts of the world for an astute clinical
analysis as if treatment is going on at his home and doorstep.

11 | P a g e
Objective

The objective of my project is to develop a system which will help a


hospital to manage it operations. Main features of my application
includes,

1. Register Outdoor Patients

2. Record Patient Appointments

3. Maintain a list of available doctors

4. Prepare Prescriptions

5. Maintain various hospital’s pharmacy related records

6. Maintain various hospital’s laboratory related records

Along with the above several non-functional features viz.


login/user account management has been incorporated.

12 | P a g e
Problem Statement

I had observed during my many visits to hospitals the operation of


the hospitals viz. what information they take while registering an
outdoor patient, admitting a patient for treatment, pharmacy
record etc. But those were only vague ideas, so, in order to get a
better insight, I went to many hospitals and conducted my analysis
work. This problem statement is the outcome of the same.

Usually Patient’s record maintenance process in a hospital starts


with registering the patient in the Outdoor Patient Department
(OPD), where following information is generally collected:

1. Patient Name
2. Address
3. Contact Details
4. Date of Birth
5. Gender
6. Husband’s/Father’s Details
7. Marital Status
8. Religion etc.

Each registration is identified by a unique number, they call it


registration number. I was suggested in most cases to generate
registration number through our application. There should be
module to display an existing registration.

13 | P a g e
Next important process is the Doctor appointment booking
process which has to be computerized. This process includes
making a booking entry as per patient’s request and giving a
printed transcript as confirmation.

Admitting a patient and maintaining their treatment record is next


important aspect that a typical hospital management system has to
maintain.

14 | P a g e
Requirement Analysis

The goal for the Management is to increase efficiency of


registration process and powerful search facilities and capable of
matching Hospitals with Patients. And increase the productivity
and Management requirements are discussed in the Scope
section, with the following additional detail:
 Improve the search facility and all the users of Hospital
Management System should get all the information in a
second.
 The application should support the capability to use multi
user environment.
 Manager should able to generate all type of letters as and
when required by the organization.
 System should store all the transaction like phone call to
client, generate offer letter and can be produced whenever is
required

Take Care has followings modules:


- Outdoor Patient Management
- Indoor Patient Management
- Booking Appointments
- Keep available doctors records
- Maintain hospital’s pharmacy’s records
- Print various reports

15 | P a g e
SOFTWARE LIFE CYCLE:

There are five phases in software life cycle. Software life cycle is

the long term in the view of software a view that comprises the

activities that occur before development begins and after software

goes into active views. The phases are as follows: -

1. Requirements analysis and specifications

2. Design and specification

3. Coding and module testing

4. Integration and system testing

5. Delivery and maintenance

1. Requirements analysis and specification:

Requirements analysis is usually the first phase of a software

development project. It is undertaken after a feasibility study has

been performed to define the precise costs and benefits of a

software system. The purpose of this phase is to identify and

document the exact requirements for the system. In cases where

the requirements are not clear, much interaction is required

between the user and the developer. Various software

methodologies advocate that this phase must also produce users

16 | P a g e
manuals and system test plans. In this project the requirements

analysis is done with the help of the manager and staffs after

considering the needs of the worker. After going through the

entire requirement we have come to the next phase of the SLC

(software life cycle).

2. Design and specification: -

Once the requirements for a system have been documented.

Software engineers design a software system to meet them. This

phase is sometime split into two sub phase’s architectural or high

level design and detailed design. Separating the requirements

analysis phase from the design is an instance of a fundamental

what/how dichotomy that we encounter quite often in Computer

science. The general principle involves making a clear distinction

between what the problem is and how to solve the problem. In this

case the requirement phase attempts to specify what the problem.

There are usually many ways that the many be met, including

some solutions that do not involve the use of computers at all. The

purpose of design phase is to specify a particular software system

17 | P a g e
that will meet the stated requirements. In the coding phase that

follows the design phase, a particular is coded to meet the design

specification.

3. Coding and module testing:

This is the phase that produces the actual code that will

be delivered to the customer as the running system. The other

phases of the life cycle may also develop code, such as prototypes.

Tests, and test derives, but these are for use by the developer.

Individual modules developed in this phase are also tested before

being delivered to the next phase. In this project the first step what

i have done is develop the modular structure, interfaces are

defined and data structure is established the overall software is

divided in some modules and further these modules are divided

into sub-modules. The second stage is development phase i.e.

CODING the generation of program with the use of appropriate

programming language i.e.VB, HTML, DHTML, ASP

Integration and system testing: -

All the modules that have been developed before and tested

individually are put together integrated in this phase and tested as

18 | P a g e
a whole system... After doing this in the project the project will be

almost ready to be delivered.

4. Delivery and maintenance: -

Once the system passes all the tests, it is delivered to the

customer and enters the maintenance phase. Any modification

made to the system after initial deliveries are usually attributed to

this phase. Basically in this phase the software will be maintained

and this is done prior to release of software and I have reviewed

the software and assured that all the documentation is available.

Logical DFD (Data flow diagram)

A data-flow diagram (DFD) is a graphical representation of the


"flow" of data through an information system. DFDs show the flow
of data from external entities into the system, showed how the
data moved from one process to another, as well as its logical
storage. There are only four symbols:

1. Squares representing external entities, which are sources or


destinations of data.
2. Rounded rectangles representing processes, which take data
as input, do something to it, and output it.
3. Arrows representing the data flows, which can either, be
electronic data or physical items.

19 | P a g e
Open-ended rectangles representing data stores, including
electronic stores such as databases or XML files and physical stores
such as or filing cabinets or stacks of paper.

20 | P a g e
Data Dictionary

A data dictionary is simply a repository for information about


the database- data definitions and characteristic such as usage,
physical representations, ownership, authorization, and security.

The data dictionary is also useful to programmers and system


analysts.

1. A programmer can copy a definition directly from the data


dictionary for use in an applications program. This
guarantees greater accuracy with less work from the
programmer.
2. If a data description is changed, the data dictionary can be
consulted to determine all affected applications programs.
3. A data dictionary is a list of features to map.
4. Serves as a guide to surveyors in the field. Data dictionaries
consist of features and their attributes.

Data Tables

tblOutdoorPatient
Field Name Data Type
RegistrationNumber Text
RegistrationDate Date/Time
PatientName Text
Address Text
ContactNumber Text
DateOfBirth Date/Time
Gender Text
MaritalStatus Text

21 | P a g e
Religion Text
FatherHusbandName Text

tblStockItem
Field Name Data Type
ItemID Text
ItemName Text
Category Text
Manufacturer Text
MfgDate Date/Time
ExpDate Date/Time
Batch Text
Quantity Number
Rate Number

tblDoctor
Field Name Data Type
DoctorID Text
DoctorName Text
Gender Text
DateofBirth Date/Time
Qualification Text
Specialization Text
Department Text
Shift Text
Address Text
ContactNumber Text
Emailid Text

tblAppointments
Field Name Data Type
AppointmentNo Text
RegistrationNumber Text
VisitDate Date/Time
VisitingDoctor Text
Department Text

tblPrescriptions

22 | P a g e
Field Name Data Type
PrescriptionNo Text
RegistrationNo Text
Medicines Text
Tests Text
Remarks Text
tblIndoorPatient
Field Name Data Type
RegistrationNumber Text
RegistrationDate Date/Time
PatientName Text
Address Text
ContactNumber Text
DateOfBirth Date/Time
Gender Text
MaritalStatus Text
Religion Text
FatherHusbandName Text

tblDepartment
Field Name Data Type
DepartmentID Text
DepartmentName Text

23 | P a g e
Structure Chart
A structure chart is a top-down modular design tool, constructed
of squares representing the different modules in the system, and
lines that connect them. The lines represent the connection and or
ownership between activities and sub activities as they are used in
organization charts.

24 | P a g e
Screenshots

frmSplashScreen.vb

25 | P a g e
frmMain.vb

frmOutDoorPatientRegistration.vb

26 | P a g e
frmAppointmentBooking.vb

27 | P a g e
frmPrescriptionEntry

28 | P a g e
frmStockItems

frmDoctors

29 | P a g e
frmAdmitPatient

frmStockArrival

30 | P a g e
frmAboutBox

31 | P a g e
Coding

frmSplashScreen.vb

Public NotInheritable Class frmSplashScreen

'TODO: This form can easily be set as the splash screen for the application by
going to the "Application" tab
' of the Project Designer ("Properties" under the "Project" menu).

Private Sub frmSplashScreen_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
'Set up the dialog text at runtime according to the application's assembly
information.

'TODO: Customize the application's assembly information in the "Application"


pane of the project
' properties dialog (under the "Project" menu).

'Application title
If My.Application.Info.Title <> "" Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'If the application title is missing, use the application name, without the
extension
ApplicationTitle.Text =
System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName
)
End If

32 | P a g e
'Format the version information using the text set into the Version control at
design time as the
' formatting string. This allows for effective localization if desired.
' Build and revision information could be included by using the following code
and changing the
' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something
similar. See
' String.Format() in Help for more information.
'
' Version.Text = System.String.Format(Version.Text,
My.Application.Info.Version.Major, My.Application.Info.Version.Minor,
My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

Version.Text = System.String.Format(Version.Text,
My.Application.Info.Version.Major, My.Application.Info.Version.Minor)

'Copyright info
Copyright.Text = My.Application.Info.Copyright
End Sub
Public NotInheritable Class frmSplashScreen

'TODO: This form can easily be set as the splash screen for the application by
going to the "Application" tab
' of the Project Designer ("Properties" under the "Project" menu).

Private Sub frmSplashScreen_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
'Set up the dialog text at runtime according to the application's assembly
information.

'TODO: Customize the application's assembly information in the "Application"


pane of the project

33 | P a g e
' properties dialog (under the "Project" menu).

'Application title
If My.Application.Info.Title <> "" Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'If the application title is missing, use the application name, without the
extension
ApplicationTitle.Text =
System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName
)
End If

'Format the version information using the text set into the Version control at
design time as the
' formatting string. This allows for effective localization if desired.
' Build and revision information could be included by using the following code
and changing the
' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something
similar. See
' String.Format() in Help for more information.
'
' Version.Text = System.String.Format(Version.Text,
My.Application.Info.Version.Major, My.Application.Info.Version.Minor,
My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

Version.Text = System.String.Format(Version.Text,
My.Application.Info.Version.Major, My.Application.Info.Version.Minor)

'Copyright info
Copyright.Text = My.Application.Info.Copyright
End Sub

End Class

34 | P a g e
End Class

35 | P a g e
frmMain.vb

Public Class frmMain

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Me.Text = Application.ProductName

Dim ctl As Control


Dim ctlMDI As MdiClient

' Loop through all of the form's controls looking


' for the control of type MdiClient.
For Each ctl In Me.Controls
Try
' Attempt to cast the control to type MdiClient.
ctlMDI = CType(ctl, MdiClient)

' Set the BackColor of the MdiClient control.


ctlMDI.BackColor = Me.BackColor

Catch exc As InvalidCastException


' Catch and ignore the error if casting failed.
End Try
Next

End Sub

Private Sub OutdoorPatientRegistrationToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
OutdoorPatientRegistrationToolStripMenuItem.Click
frmOutdoorPatientRegistration.Show()

End Sub

36 | P a g e
Private Sub BookAppointmentToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BookAppointmentToolStripMenuItem.Click
frmBookAppointment.Show()

End Sub

Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles AboutToolStripMenuItem.Click
frmAboutBox.Show()

End Sub

Private Sub PrescriptionEntryToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles PrescriptionEntryToolStripMenuItem.Click
frmPrescriptionEntry.Show()

End Sub

Private Sub AdmitPatientToolStripMenuItem_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles AdmitPatientToolStripMenuItem.Click
frmAdmitPatient.Show()

End Sub

Private Sub DischargePatientToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles DischargePatientToolStripMenuItem.Click
frmDischargePatient.Show()

End Sub

Private Sub DoctorsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles DoctorsToolStripMenuItem.Click
frmDoctors.Show()

End Sub

37 | P a g e
Private Sub DepartmentsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles DepartmentsToolStripMenuItem.Click
frmDepartments.Show()

End Sub

Private Sub StockItemsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles StockItemsToolStripMenuItem.Click
frmStockItems.Show()

End Sub

Private Sub StockInHandToolStripMenuItem_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles StockInHandToolStripMenuItem.Click
frmStockInHand.Show()

End Sub

Private Sub RoomsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles RoomsToolStripMenuItem.Click
frmRooms.Show()

End Sub

Private Sub BedsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BedsToolStripMenuItem.Click
frmBeds.Show()

End Sub

Private Sub StockArrivalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles StockArrivalToolStripMenuItem.Click
frmStockArrival.Show()

End Sub

38 | P a g e
Private Sub IssueGoodsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles IssueGoodsToolStripMenuItem.Click
frmIssueGoods.Show()

End Sub

Private Sub DoctorsListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles DoctorsListToolStripMenuItem.Click
frmDoctorList.Show()

End Sub

Private Sub PurchaseSummaryToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles PurchaseSummaryToolStripMenuItem.Click
frmPurchaseSummary.Show()

End Sub

Private Sub SalesSummaryToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles SalesSummaryToolStripMenuItem.Click
frmSalesSummary.Show()

End Sub
End Class

39 | P a g e
frmFirstLoginCheck.vb

Public Class frmFirstUseCheck

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer1.Tick
oCon.Open()
oCom.Connection = oCon
oCom.CommandType = CommandType.Text
oCom.CommandText = "Select * from tblUsers"
oDA.SelectCommand = oCom
oDA.Fill(DS, "tblUsers")
If DS.Tables("tblUsers").Rows.Count > 0 Then
frmLogin.Show()
'Me.Close()
Else
'Me.Close()
frmFirstLogin.Show()

End If
oCon.Close()
Me.Close()
End Sub

Private Sub frmFirstUseCheck_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

End Sub
End Class

40 | P a g e
frmFirstLogin.vb

Public Class frmFirstLogin

Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnSubmit.Click
Dim adoCon As New ADODB.Connection
Dim adoRS As New ADODB.Recordset

adoCon.Open("PROVIDER=Microsoft.Jet.OLEDB.4.0; Data Source=" &


Application.StartupPath & "\dbManageSchool.mdb")
adoRS.Open("Select * from tblUsers", adoCon,
ADODB.CursorTypeEnum.adOpenDynamic,
ADODB.LockTypeEnum.adLockOptimistic)
adoRS.AddNew()
adoRS.Fields("UserID").Value = txtUserID.Text
adoRS.Fields("Password").Value = txtPassword.Text
adoRS.Update()
adoRS.Close()
adoCon.Close()

Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
PictureBox2.Visible = True
PictureBox1.Visible = False
lblUserCreated.Visible = True
txtUserID.Visible = False
txtPassword.Visible = False

41 | P a g e
btnSubmit.Visible = False
btnReset.Visible = False
Timer1.Enabled = True
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer1.Tick
frmLogin.Show()
Me.Close()
End Sub

End Class

42 | P a g e
frmLogin.vb

Public Class frmLogin

' TODO: Insert code to perform custom authentication using the provided username and
password
' (See http://go.microsoft.com/fwlink/?LinkId=35339).
' The custom principal can then be attached to the current thread's principal as follows:
' My.User.CurrentPrincipal = CustomPrincipal
' where CustomPrincipal is the IPrincipal implementation used to perform authentication.
' Subsequently, My.User will return identity information encapsulated in the
CustomPrincipal object
' such as the username, display name, etc.

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles OK.Click
oCon.Open()
oCom.Connection = oCon
oCom.CommandType = CommandType.Text
oCom.CommandText = "Select * from tblUsers where UserID='" &
UsernameTextBox.Text & "'"
oDA.SelectCommand = oCom
'DS.Tables("tblUsers").Clear()
oDA.Fill(DS, "tblUsers")
If DS.Tables("tblUsers").Rows.Count > 0 Then
If DS.Tables("tblUsers").Rows(0).Item("Password") = PasswordTextBox.Text Then
frmMain.Show()
Me.Close()
Else
MsgBox("Invalid UserID or Password, Please Re-Enter")
ResetMe()
End If
Else
MsgBox("Invalid UserID or Password, Please Re-Enter")

43 | P a g e
ResetMe()
End If
oCon.Close()
End Sub

Private Sub ResetMe()


UsernameTextBox.Clear()
PasswordTextBox.Clear()
UsernameTextBox.Focus()
End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Cancel.Click
Me.Close()
End Sub

End Class

44 | P a g e
frmUserAccount.vb

Public Class frmUserAccount

Private Sub cboUserType_SelectedIndexChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles cboUserType.SelectedIndexChanged
If cboUserType.Text = "New User" Then
ResetForm()
Else
btnSearch.Visible = True
txtPassword.ReadOnly = True
txtFullName.ReadOnly = True
End If
End Sub

Private Sub ResetForm()


txtUserID.Clear()
txtPassword.Clear()
txtFullName.Clear()
cboUserType.Text = "----------"
btnSearch.Visible = False
txtUserID.ReadOnly = False
txtPassword.ReadOnly = False
txtFullName.ReadOnly = False
cboUserType.Text = "New User"
txtUserID.Focus()
End Sub

Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnSubmit.Click
If cboUserType.Text = "New User" Then
Dim adoCon As New ADODB.Connection

45 | P a g e
Dim adoRS As New ADODB.Recordset
adoCon.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Application.StartupPath & "\dbManageSchool.mdb")
adoRS.Open("Select * from tblUsers", adoCon,
ADODB.CursorTypeEnum.adOpenDynamic,
ADODB.LockTypeEnum.adLockOptimistic)
adoRS.AddNew()
adoRS.Fields("UserID").Value = txtUserID.Text
adoRS.Fields("Password").Value = txtPassword.Text
adoRS.Fields("FullName").Value = txtFullName.Text
adoRS.Fields("Role").Value = cboRole.Text
adoRS.Update()
adoRS.Close()
oCon.Close()
MsgBox("New User Created Successfully")
ResetForm()
Else
oCon.Open()
oCom.Connection = oCon
oCom.CommandType = CommandType.Text
oCom.CommandText = "Select * from tblUsers where UserID='" &
txtUserID.Text & "'"
oDA.SelectCommand = oCom
oDA.Fill(DS, "tblUsers")
DR = DS.Tables("tblUsers").Rows(0)
DR("Password") = txtPassword.Text
DR("FullName") = txtFullName.Text
DR("Role") = cboRole.Text
CB = New OleDb.OleDbCommandBuilder(oDA)
oDA.Fill(DS, "tblUsers")
oDA.Update(DS, "tblUsers")
oCon.Close()
MsgBox("User Records Updated Successfully")
ResetForm()

46 | P a g e
End If
End Sub

Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnReset.Click
ResetForm()
End Sub

Private Sub frmUserAccount_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Me.MdiParent = frmMain

txtUserID.Focus()
End Sub

Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnEdit.Click
txtUserID.ReadOnly = False
txtPassword.ReadOnly = False
txtFullName.ReadOnly = False
End Sub

Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnSearch.Click
oCon.Open()
oCom.Connection = oCon
oCom.CommandType = CommandType.Text
oCom.CommandText = "Select * from tblUsers where UserID='" &
txtUserID.Text & "'"
oDA.SelectCommand = oCom
oDA.Fill(DS, "tblUsers")
DR = DS.Tables("tblUsers").Rows(0)
txtPassword.Text = DR("Password").ToString

47 | P a g e
txtFullName.Text = DR("FullName").ToString
cboRole.Text = DR("Role").ToString
oCon.Close()
End Sub
End Class

48 | P a g e
frmAbout.vb

Public NotInheritable Class frmAbout

Private Sub frmAbout_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

Me.MdiParent = frmMain

' Set the title of the form.


Dim ApplicationTitle As String
If My.Application.Info.Title <> "" Then
ApplicationTitle = My.Application.Info.Title
Else
ApplicationTitle =
System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName
)
End If
Me.Text = String.Format("About {0}", ApplicationTitle)
' Initialize all of the text displayed on the About Box.
' TODO: Customize the application's assembly information in the "Application"
pane of the project
' properties dialog (under the "Project" menu).
Me.LabelProductName.Text = My.Application.Info.ProductName
Me.LabelVersion.Text = String.Format("Version {0}",
My.Application.Info.Version.ToString)
Me.LabelCopyright.Text = My.Application.Info.Copyright
Me.LabelCompanyName.Text = My.Application.Info.CompanyName
Me.TextBoxDescription.Text = My.Application.Info.Description
End Sub

Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles OKButton.Click
Me.Close()

49 | P a g e
End Sub

End Class

modMain.vb

Imports System.Data.OleDb

Module ModMain
Public strApplicationName As String = "ManageSchool"
Public strConnectionString As String = "PROVIDER=Microsoft.Jet.OLEDB.4.0;
Data Source=" & Application.StartupPath & "\dbManageSchool.mdb"

Public oCon As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;


Data Source=" & Application.StartupPath & "\dbManageSchool.mdb")
Public oDA As New OleDbDataAdapter()
Public oCom As New OleDbCommand()
Public DS As New DataSet
Public DR As DataRow
Public CB As OleDbCommandBuilder

End Module

frmStockItems

Public Class frmCreateStockItem

Private Sub frmCreateStockItem_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

'Setting Me's MDI Parent


'****************************************************

50 | P a g e
Me.MdiParent = frmMain

'Generating ItemID
'*****************************************************

Dim strAccountNumber As String


oCon.Open()
oCom.Connection = oCon
oCom.CommandType = CommandType.Text
oCom.CommandText = "Select * from tblStockItem where ItemCreationDate=#"
& Today & "#"
oDA.SelectCommand = oCom
oDA.Fill(DS, "tblStockItem")
If DS.Tables("tblStockItem").Rows.Count > 0 Then
strAccountNumber =
DS.Tables("tblStockItem").Rows(DS.Tables("tblStockItem").Rows.Count -
1).Item("ItemID").ToString
strAccountNumber += 1
strAccountNumber = "1" & strAccountNumber
txtItemID.Text = strAccountNumber
Else
strAccountNumber = "1" & Today.Year
If Today.Month > 9 Then
strAccountNumber = strAccountNumber & Today.Month
Else
strAccountNumber = strAccountNumber & "0" & Today.Month
End If
If Today.Day > 9 Then
strAccountNumber = strAccountNumber & Today.Day & "01"
Else
strAccountNumber = strAccountNumber & "0" & Today.Day & "01"

51 | P a g e
End If
txtItemID.Text = strAccountNumber
End If
oCon.Close()
End Sub

Private Sub btnCreate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnCreate.Click
oCon.Open()
oCom.Connection = oCon
oCom.CommandText = "Select * from tblStockItem"
oCom.CommandType = CommandType.Text
oDA.SelectCommand = oCom
oDA.Fill(DS, "tblStockItem")
DR = DS.Tables("tblStockItem").NewRow

End Sub
End Class

frmIssueGoods.vb

Public Class frmStockOut

Private Sub frmStockOut_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

'Setting Me's MDI Parent


'****************************************************
Me.MdiParent = frmMain

52 | P a g e
'Generating ItemID
'*****************************************************

Dim strAccountNumber As String


oCon.Open()

If DS.Tables("tblStockTransaction").Rows.Count > 0 Then


strAccountNumber =
DS.Tables("tblStockTransaction").Rows(DS.Tables("tblStockTransaction").Rows.Coun
t - 1).Item("TransactionID").ToString
strAccountNumber += 1
strAccountNumber = "1" & strAccountNumber
txtTransactionID.Text = strAccountNumber
Else
strAccountNumber = "1" & Today.Year
If Today.Month > 9 Then
strAccountNumber = strAccountNumber & Today.Month
Else
strAccountNumber = strAccountNumber & "0" & Today.Month
End If
If Today.Day > 9 Then
strAccountNumber = strAccountNumber & Today.Day & "01"
Else
strAccountNumber = strAccountNumber & "0" & Today.Day & "01"
End If
txtTransactionID.Text = strAccountNumber
End If

oCom.Connection = oCon
oCom.CommandType = CommandType.Text
oCom.CommandText = "Select * from tblStockItem"
oDA.SelectCommand = oCom
oDA.Fill(DS, "tblStockItem")

53 | P a g e
For intCount As Integer = 0 To DS.Tables("tblStockItem").Rows.Count - 1

ItemName.Items.Add(DS.Tables("tblStockItem").Rows(intCount).Item("ItemName"))
Next
oCon.Close()
End Sub
End Class

frmStockArrival.vb

Public Class frmStockArrival

Private Sub frmStockArrival_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

'Setting Me's MDI Parent


'****************************************************
Me.MdiParent = frmMain

'Generating ItemID
'*****************************************************

Dim strAccountNumber As String


oCon.Open()

If DS.Tables("tblStockTransaction").Rows.Count > 0 Then


strAccountNumber =
DS.Tables("tblStockTransaction").Rows(DS.Tables("tblStockTransaction").Rows.Coun
t - 1).Item("TransactionID").ToString

54 | P a g e
strAccountNumber += 1
strAccountNumber = "1" & strAccountNumber
txtTransactionID.Text = strAccountNumber
Else
strAccountNumber = "1" & Today.Year
If Today.Month > 9 Then
strAccountNumber = strAccountNumber & Today.Month
Else
strAccountNumber = strAccountNumber & "0" & Today.Month
End If
If Today.Day > 9 Then
strAccountNumber = strAccountNumber & Today.Day & "01"
Else
strAccountNumber = strAccountNumber & "0" & Today.Day & "01"
End If
txtTransactionID.Text = strAccountNumber
End If

oCom.Connection = oCon
oCom.CommandType = CommandType.Text
oCom.CommandText = "Select * from tblStockItem"
oDA.SelectCommand = oCom
oDA.Fill(DS, "tblStockItem")
For intCount As Integer = 0 To DS.Tables("tblStockItem").Rows.Count - 1

ItemName.Items.Add(DS.Tables("tblStockItem").Rows(intCount).Item("ItemName"))
Next
oCon.Close()
End Sub
End Class

55 | P a g e
frmDoctors.vb

Public Class frmDoctors

Private Sub frmDoctors_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
'Setting Me's MDI Parent
'****************************************************
Me.MdiParent = frmMain

'Generating Doctor Id
'*****************************************************

Dim strAccountNumber As String


oCon.Open()
oCom.Connection = oCon
oCom.CommandType = CommandType.Text
oCom.CommandText = "Select * from tblDoctor where DoctorJoiningDate=#" &
Today & "#"
oDA.SelectCommand = oCom
oDA.Fill(DS, "tblDoctor")
If DS.Tables("tblDoctor").Rows.Count > 0 Then
strAccountNumber =
DS.Tables("tblDoctor").Rows(DS.Tables("tblDoctor").Rows.Count -
1).Item("DoctorID").ToString
strAccountNumber += 1
strAccountNumber = "1" & strAccountNumber
txtDoctorID.Text = strAccountNumber
Else
strAccountNumber = "1" & Today.Year

56 | P a g e
If Today.Month > 9 Then
strAccountNumber = strAccountNumber & Today.Month
Else
strAccountNumber = strAccountNumber & "1" & Today.Month
End If
If Today.Day > 9 Then
strAccountNumber = strAccountNumber & Today.Day & "01"
Else
strAccountNumber = strAccountNumber & "1" & Today.Day & "01"
End If
txtDoctorID.Text = strAccountNumber
End If
oCon.Close()
End Sub
End Class

frmIndex.vb

Public Class frmIndex

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Me.Text = Application.ProductName

Dim ctl As Control


Dim ctlMDI As MdiClient

' Loop through all of the form's controls looking


' for the control of type MdiClient.
For Each ctl In Me.Controls
Try
' Attempt to cast the control to type MdiClient.

57 | P a g e
ctlMDI = CType(ctl, MdiClient)

' Set the BackColor of the MdiClient control.


ctlMDI.BackColor = Me.BackColor

Catch exc As InvalidCastException


' Catch and ignore the error if casting failed.
End Try
Next

End Sub

Private Sub OutdoorPatientRegistrationToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
OutdoorPatientRegistrationToolStripMenuItem.Click
frmOutdoorPatientRegistration.Show()

End Sub

Private Sub BookAppointmentToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles BookAppointmentToolStripMenuItem.Click
frmBookAppointment.Show()

End Sub

Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles AboutToolStripMenuItem.Click
frmAboutBox.Show()

End Sub

Private Sub PrescriptionEntryToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles PrescriptionEntryToolStripMenuItem.Click
frmPrescriptionEntry.Show()

End Sub

58 | P a g e
Private Sub AdmitPatientToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles AdmitPatientToolStripMenuItem.Click
frmAdmitPatient.Show()

End Sub

Private Sub DischargePatientToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles DischargePatientToolStripMenuItem.Click
frmDischargePatient.Show()

End Sub

Private Sub DoctorsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles DoctorsToolStripMenuItem.Click
frmDoctors.Show()

End Sub

Private Sub DepartmentsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles DepartmentsToolStripMenuItem.Click
frmDepartments.Show()

End Sub

Private Sub StockItemsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles StockItemsToolStripMenuItem.Click
frmStockItems.Show()

End Sub

Private Sub StockInHandToolStripMenuItem_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles StockInHandToolStripMenuItem.Click
frmStockInHand.Show()

End Sub

59 | P a g e
Private Sub RoomsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles RoomsToolStripMenuItem.Click
frmRooms.Show()

End Sub

Private Sub BedsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BedsToolStripMenuItem.Click
frmBeds.Show()

End Sub

Private Sub StockArrivalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles StockArrivalToolStripMenuItem.Click
frmStockArrival.Show()

End Sub

Private Sub IssueGoodsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles IssueGoodsToolStripMenuItem.Click
frmIssueGoods.Show()

End Sub

Private Sub DoctorsListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles DoctorsListToolStripMenuItem.Click
frmDoctorList.Show()

End Sub

Private Sub PurchaseSummaryToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles PurchaseSummaryToolStripMenuItem.Click
frmPurchaseSummary.Show()

End Sub

60 | P a g e
Private Sub SalesSummaryToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles SalesSummaryToolStripMenuItem.Click
frmSalesSummary.Show()

End Sub
End Class

61 | P a g e
Testing Procedures

Different types of testing, such as unit, integration, and system


testing, are carried out during the development process.
Regardless of the type of testing, each task involved is organized
and documented. The purpose of test plan is to describe the
scope of the testing. Standard test plans using the information
collected from the subject matter experts. Our test plans identify
the testable items, testable features, the testing tasks that are
performed, the personnel responsible for each task, and the risks
associated with the plan.

Our test plans specify the approach that will ensure the
designated features are adequately tested. Our plans also
specify the major activities, techniques and tools used to test the
features. We describe the approach to a detail such that the
major testing tasks and the time required to complete each task
is identified. The plans also describe the techniques used to
specify requirements traceability. Testing constraints such as
testing environment or resource availability are specified.

About Testing :Testing is a process of executing a program with


the intent of finding an error.Testing area is concerned with
verifying that a correct solution to the problem , embodied in the
statement of the requirements , has been developed .

62 | P a g e
It is a multistage process that consists of activities for validating
the s/w product. . from the most primitive elements up to the fully
integrated system. This area includes activities such as Unit
Testing ,Integration testing ,System testing ,Performannce testing
and acceptance testing.

There are basically two terms used in testing named Verification


and Validation

Verification refers to the process of providing that the developed


code can be derived formally (i.e mathematically ) from the
specification. Validation is the process of demonstrating to the
client that the s/w performs the process required by the client. In
Boehm’s word , “ Verification is building the product right , and
validation is building the right product . “

Testing Strategies used

The testing strategies is a concise statement of how to meet the


objective of testing .It views the test event at high level and
concentrates on the objective of the testing event , the technique to
be used , the resource required and so on . It is also concerned with
the prerequisite and overview to this testing design .

I am using the Black Box ( i.e Functional testing ) Testing which


focuses on testing a program’s functionality against its
specification .

63 | P a g e
Specially , Black Box testing consists of introducing combinations
of inputs to determine whether they produce the expected outputs
.

It gives an outside view of the system .

The main goal of using black box testing is to demonstrate that


the s/w being tested does not adhere to it’s external
specifications .

64 | P a g e
Documentations

I have provided a help file which contains information on each


and every module of my application. I can be accessed through the
help menu of the application.

65 | P a g e
Future Application

While I was doing my requirement analysis I was constantly


reminded by my guide that whenever we create software we must
we must keep future in mind.

My application being a software of a domain (school) which will


carry on and on. My idea of developing a generalized software
adds on to the future application of my software. Only from time
to time if I upgrade my application with latest features viz. web
integration, email, sms features etc., my application will live for a
long time.

My project has been developed in Window based programmig


language and made of modules, so that in future any type of
following important scheme may easily be changed according to
the requirements.

Enhancement in Payment Mode :

In the future payment section can be enhanced in the form of cash


as well as cheque where Bank issues will be covered .

For this purpose Bank , Cash / Cheque topics will be considered.

66 | P a g e
Enhancement in Information Mode :

Information mode can be enhanced for Brokers / Share Holders


in the form of Multiple Phone no. , E-mail address ,Fax no.etc
which will be categorized as Office , Residence and Mobile.

Enhancement in Interface Design :

The interface will be based on Microsoft GUI based interface in the


future .having toolbar logic,with different modes as No Mode,
View Mode,and Insert Mode , Update mode Depending on the
mode of operation Toolbar will be enabled and disabled .

Enhancement in Dot Net World :

Since I have developed my s/w in VB , there will be a great


advantages of using it , I will be able to modify my s/w in the dot
net world easily .

67 | P a g e
Because the Microsoft Dot Net frame work is based of previous
version of Visual studio.

People says that developing s/w in VB has major limitations , I


also accept it ,but the important thing is that how much and how
efficiently one is utilizing the resourses of the exisiting platform
My project is fully different in the sense of advance features as
discussed above ,Besides all these , following Network facilities
will be provided in the future

 Dial Up Facility
 E-mail sending Facility
 Browsing Information from your own Application using
any Web Browser.
 On line features using ASP ( Active Server Pages )

Enhancement in Dialing to Individuals :

It is one of the exciting area of s/w which will be enhanced


efficiently . However the s/w contains this facility to dial phones
to the individuals automatically if the individual is connected to
the phones .

68 | P a g e
Enhancement in E- Mail sending features :

Like Dialing facility it is also one of the exciting feature of the


s/w. where using Microsoft Exchange Server one can enhance the
communication facility by sending e-mails through the s/w.If a
connection to the internet is available then the SMS can be sent to
the mobiles Phones via a number of Websites . E- mail can be
dispatched to anyone via any of the E-mail clients available today.
Also, application will provide to all E –mail address of current
contact. as the user selects an e-mail id automatically assigned as
the address.

Browsing Information from your Application :

This is one of the most exciting feature of the s/w which will be
enhanced more in the future . It will allow users to browse
informations as Special announcements on the WWW, local files
of Active X Documents all from your applications

Enhancements in On Line Features as On line Numbering (


Advance Numbering ) :

69 | P a g e
Today most of the applications are built around On – Line
services, I am also giving the provision of On line services.

Enhancement in Multimedia World :

Multimedia is an important tool for Today’s market . If one has to


stay in the s/w field besides the s/w satisfactory work , one need
to give multimedia features .I am providing on the powerful MS
Agents Merlin as a Office Assistant which will guide the clients
during any Bug, error and mishandling Since the s/w is in the
beginning stage , so I have given the least feature of Agent , but in
the future versions I will give a complete menu to handle the
Office Asssistant.

70 | P a g e
Conclusion

My project is a result of hard work and my dedication in last three


months. I got a good amount of practical experience through this
assignment, which will help me a lot in my career.

Few months back we were thoughtful whether we will be able to


come up with anything working. With the help of all involved new
I have an application which functions quite well.

Due to constraint of time I was not able to include some features


that I wanted to have in my system. Some of them I have
mentioned in the future applications section of this document.

Overall this project was a good learning experience. It has at least


given us a hint what professional software development is.

71 | P a g e
Bibliography

1. Visual Basic.Net – Black Book by

2. SMU study materials

3. Microsoft Developers Network Help resources

4. www.codeguru.com

72 | P a g e

S-ar putea să vă placă și