Sie sind auf Seite 1von 66

INTRODUCTION

INTRODUTION
The project entitled HEALTH CARE MANAGEMENT SYSTEM was developed
in the aim of secured treatment process, based on the patient health conditions.
Here the patient enter his/her blood content and some other details in the required
monitoring field and the patient himself can view what kind of problem has been occurred and
the solutions for his/her health care is also provide also they can know the kind of treatment
that should be taken.
This process can be used in all health care and fitness centers to provide the treatment
for the patients. This is user friendly process that the patients can know about their health
condition and there is no secrecy is maintained. Also the patient can consult the doctor for their
right treatment.
This project has been developed using the VisualBAsic.Net framework as the frontend and the Microsoft Access as the Back-end.

ABOUT THE PROJECT

This HEALTH CARE MANAGEMENT SYSTEM has been developed


for a secured treatment process, based on the patient health conditions.
The project contains 4 modules.
Registering
Monitoring
Treatment
Consultants and Treatment Prescription List

1.1 REGISTERING
The module is used to register the patient details and their personal information.
Register patient report will be generated.

1.1 MONITORING
In this module, the details of the patient health conditions like blood content and
some other liquid profiles are entered that help the doctor to prescribe the
corresponding treatment.

1.1 TREATMENT
This module helps the patients by directing them what diet to eat and other
health tips and the exercises that to be followed for living a healthy life. Also the doctor
appointment can also be fixed.

1.1 CONSULTANTS AND TREATMENT PRESCRIPTION LIST


In this module all specialist doctors can be viewed and the patient can fix their
appointment for their convenience. The prescriptions are all produced based on the
blood content and the patient details that have been monitored. Also some more
information that can be known about the disease, medicine, and lab test that are done if
needed.

SYSTEM SPECIFICATION

SYSTEM SPECIFICATION
HARDWARE SPECIFICATION
The hardwares used for the development of the project are,
Processor

Intel Pentium IV

Clock speed

2.8 GHz

RAM

248 MB

Mouse

Microsoft ps/2 mouse

Hard Disk

20 GB

Keyboard

104 Keys

Monitor

HCL

SOFTWARE SPECIFICATION
The softwares used for the development of the project are,
Operating System

Windows XP Professional

FRONT END

VISUAL BASIC.NET

BACK END

MS-ACCESS

About Visual Basic.Net


VB.NET is an event driven, visual programming language in which programs are
created using an Integral Development Environment (IDE).Visual Basic.NET, the Next
generation of VB, is designed to be the easiest and most productive tool for creating .NET
applications, Web Services and Web Application.
While providing the traditional case-of-use of VB development, Visual Basic .NET also
optional use of new language features, inheritance, method overloading, structured exception
handling and free threading all make VB a powerful Object Oriented Programming Language.
VB .NET fully integrates with the .NET framework and the Common Language Runtime,
which together provide language interoperability, Simplified Deployment, Enhanced Security

and improved versioning support.


Features Include
5

1. Faster Development
2. Lower Costs
3. More reliability
4. Better Interoperability and integration
5. Scalability
6.Better Performance

Features of MS-ACCES
The most significant form of data as seen by the programmers is data as stored on
the direct access storage devices. This is the difference between logical and physical data.
Database files are the key source of information into the system. It is the process of designing database
files, which are the key source of information to the system. The files should be properly
designed and planned for collection, accumulation, editing

and

retrieving the required

information. The organization of data in database aims to achieve three major objectives:
Data integration.
Data integrity.
Data independence.
The proposed system stores the information relevant for processing in the MS ACCESS
database. This database contains tables, where each table corresponds to one particular type of
information. Each piece of information in table is called a field or column. A table also contains
records, which is a set of fields. All records in a table have the same set of fields with different
information. There are primary key fields that uniquely identify are cord in a table.

SYSTEM ANALYSIS

SYSTEM ANALYSIS
This project is intended to automate the day-to-day operations of a patients
details. Using this software the hospital can manage his disease with particular
7

medicines and foods with diet control.

Existing system
Existing system is manual system. All documentation works are done manually.
In the existing system the firm faces the following problems.

Finding the details of report is difficult and time consuming.

If we need to retrieve data, it is very difficult, If we want to update a report details


it is very difficult to update data is manually.

When the data in a subsidiary book, it is damaged, then data are lost, Preparation
of report is very difficult and it takes more time and effort.

Proposed System
Proposed system is a computerized system. With this system all operations of
the report can be automated by the use of computer. It provides more efficient system.
It can be easy to maintain the medicine and patients details for the instance of time.

In the proposed system the reporting is very soon.

The reports are generated by the computer and can be maintained.

In this system the report can be identified by the user.

Its is user-friendly system.

SYSTEM DESIGN

SYSTEM DESIGN
INPUT DESIGN:
This project consist of
Registration
Monitoring
9

Treatment
Consultants and treatment prescription list

REGISTRATION
In this form the patient personal information such as, username, password,
gender, mail id.

MONITORING
In this module, the details of the patient health conditions like blood content and
some other liquid profiles are entered that help the doctor to prescribe the
corresponding treatment.

TREATMENT
This module helps the patients by directing them what should he/she and
other health tips.

CONSULTANTS AND TREATMENT PRESCRIPTION LIST


In this module all specialist doctor can be viewed and the patient can fix their
appointment for their convenience.

OUTPUT DESIGN
This project consists of four types of reports
Register
Blood profile result
Liquid profile result
Blood content result

REGISTER
The reports include username, password, gender, mobile no, email-id.
10

BLOOD PROFILE RESULT


Report shows the status of blood sugar fasting, blood sugar, blood urea,
serum creatinne.

LIQUID PROFILE RESULT


Report shows the status of total cholesterol, triglycerides, HDL cholesterol,
LDL cholesterol, VLDL cholesterol, phospholipids, chol/HDL ratio.

BLOOD CONTENT PROFILE


Report shows the status of hemoglobin, total count, hemafocirt, red cell
count, platelet count, MCH concentration, mean capsular volume, erythrocyte sedimentation
rate.

11

SYSTEM TESTING

SYSTEM TESTING
INTRODUCTION:
Testing is a set of activities that work towards the integration of entire
computer based system. A good test case is one that has a high probability of finding an as-yet undiscovered
error. A successful test is one such uncovers or finds such errors. If testing is conducted
successfully, it will uncover errors in the software. It also demonstrates that software functions
are being performed according to specifications and also behavioral and performance
requirements are satisfied.

12

UNIT TESTING:
Unit testing is carried out screen-wise; each screen being identified as an
object. Attention is diverted to individual modules, independently to one another to locate
errors. This has enabled the detection of errors in coding and logic. This is the first level of testing. In this, codes
are written such that from one module, we can move on to the next module according to the choice we enter.

SYSTEM TESTING:
In this, the entire system was tested as a whole with all forms, code, modules
and class modules. System testing is the stage of implementation, which is aimed at ensuring
that the system works accurately and efficiently before live operation commences. It is a series
of different tests that verifies that all system elements have been properly integrated and
perform allocated functions. System testing makes logical assumptions that if all parts of the
system are correct, the goal will be successfully achieved.

INTEGRATION TESTING:
This testing strategy combines all the modules involved in the system. After
the independent modules are tested, dependent modules that use the independent modules are
tested. This sequence of testing layers of dependent modules continues until the entire system is
constructed. Though each module individually; they should work after linking them together.
Data may be lost across interface and one module can have adverse effect on another

WHITE BOX TESTING:


White-box testing is concerned with testing the implementation of
the program. The intent of this testing is not to exercise all the different input or output conditions but to
exercise the different programming structures and data structures used in the program. White
box testing is also called structural testing. To test the structure of a program, structural
testing aims to achieve test cases that will force the desired coverage of different structures.
Various criteria have been proposed for this. There are three different approaches to structural
testing: control flow-based testing, data flow-based testing, and mutation testing.

BLACK BOX TESTING:


In black-box testing the structure of the program is not considered.
Test cases are decided solely on the basis of the requirements or specifications of the program
or module, and the internals of the module or the program are not considered for selection of
13

test cases. In black-box testing, the tester only knows the inputs that can be given to the system and what
output the system should give. This form of testing is also called functional or behavioral testing. The most
obvious functional testing procedure is exhaustive testing. One criterion for generating test cases is to
generate them randomly. There are no formal rules for designing test cases for functional
testing. In fact, there are no precise criteria for selecting test cases.

14

CONCLUSION

CONCLUSION
It is an integrated software product that have been developed for the
health care consultancies to provide the secure health tips to the patients regarding their health
conditions.
The benefits of using this project are:To avoid unwanted medicines
Patients can know about his/her health condition and the right treatment to be
followed.
No secrecy is maintained.
User friendly

15

16

BIBLIOGRAPHY

BIBLIOGRAPHY
Elias M. AWAD, SYSTEM ANALYSIS AND DESIGN
MC GrawHill, 5th edition.
Gary Cormell, VISUAL BBASIC 6.0, Tata McGraw Hill.
George Michael , VISUAL BASIC 6.0 The comprehensive
Guide, Galgotia Publication Private Ltd.
Richerd Fairly, SOFTWARE ENGINEERING CONCEPTS:,
Tata MC GrawHill Edition 1997.
Roger S. Presman SOFTWARE ENGINEERING
MC GrawHill, 5th Edition

17

APPENDICES
18

ENTITY RELATIONAL
DIAGRAM

19

ENTITY RELATIONAL DIAGRAM

20

21

TABLE

TABLE
TABLE NAME : REGISTRATION
PRIMARYKEY : USERID
FIELD NAME

DATATYPE
22

USERID
FIRST NAME

NUMBER
TEXT

LAST NAME

TEXT

GENDER
DOB

TEXT
TEXT

MOBILE.NO

TEXT

EMAIL.ID
USERNAME

TEXT
TEXT

PASSWORD

TEXT

CONFORM PASSWORD

TEXT

TABLE NAME : DOCTOR


PRIMARYKEY : DOCTORID
DOCTORID

TEXT

DOCTORNAME

TEXT

HOLDER
SPECILISATION

TEXT
TEXT

TIME OF WORKING
CLINIC NAME

TEXT
TEXT

MOBILE.NO
EMAIL.ID

TEXT
TEXT

ADDRESS
YEARS OF EXP

TEXT
TEXT

ID

NUMBER

TABLE NAME : MONITERING


PRIMARYKEY : USERID
FIELD NAME
USERID
NAME
GENDER
WEIGHT

DATATYPE
NUMBER
TEXT
TEXT
NUMBER
23

HEIGHT
AGE
HEMOGLOBIN (Hb)
TOTAL COUNT
ERYTHROCYTE SEDIMENTATION
RATE (ESR)
HEMATOCRIT (HCT)
RED CELL COUNT (RBC)
MEAN CORPUSCULAR VOLUME
M C H CONCENTRATION (MCHC)
BLOOD SUGAR FASTING
BLOOD SUGAR P P
BLOOD UREA
SERUM CREATING
TOTAL CHOLESTEROL
TRIGLY CERIDES
HDL CHOLESTEROL
LDL CHOLESTEROL
VLDL CHOLESTEROL
PHOSPHOLIPIDS
CHOLESTEROL / HDL RATIO

NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
TEXT

TABLE NAME : APPOINMENT


PRIMARYKEY : USERID
USER ID

TEXT

USER NAME

TEXT

DOCTOR ID

TEXT

DOCTOR NAME

TEXT

ADATE

DATE/TIME

SESSION

TEXT

24

25

DATAFLOW DIAGRAM

DATA FLOW DIAGRAM


Level 0

User/admin

Password
User name

Check
the
Validat
e User

Reject

Level 1
26

Registration
Page

User

Request for
Reporting

REGISTRATI
ON

Save the record


UPDATE

Record to be
REG
Update

Level 2
USER

Request

MONITORING

For reporting

Save the record


MON

Doctor
Level 3
27

APPOINMENT
FOR USER

Fix the date

DOCTER
APPOINMENT

If fix
Appointment ok

APPOINMENT

FIX

Level 4
DOCTERS

Request

USER

INFORMATION

For Reporting

Save the Record


Update

Record to be Updated

DOCT

Level 5
Register

Monitoring
Reporting
the details

User Detail

28

Individual
profile
monitoring

if not
CHECK
THE
DOCTE
R
DATABA
SE

29

FORM DESIGN

FORM DESIGN

30

LOGIN FORM

MENU FORM
31

REGISTRATION FORM
32

INDIVIDUAL PROFILE REPORT


33

INDIVIDUAL PROFILE REPORT

34

35

INDIVIDUAL PROFILE REPORT

36

APPOINMENT FORM

37

REPORT

38

DOCTOR FORM

39

OTHER INFORMATION

40

CODING
REGISTRATION

CODING REGISTRATION
Imports System.Data.OleDb
Public Class REGISTER
Dim userid As String
Dim firstname As String
Dim lastname As String
Dim gender As String
Dim dob As String
Dim mobileno As String
Dim emailid As String
Dim username As String
Dim password As String
Dim retypepassword As String
Private Sub SAVEHELPER()
41

userid = TextBox9.Text
firstname = TextBox1.Text
lastname = TextBox2.Text
gender = ComboBox1.Text
dob = TextBox8.Text
mobileno = TextBox6.Text
emailid = TextBox7.Text
username = TextBox3.Text
password = TextBox4.Text
retypepassword = TextBox5.Text
End Sub
Private Sub INSERTVALUES()
userid = TextBox9.Text
firstname = TextBox1.Text
lastname = TextBox2.Text
gender = ComboBox1.Text
dob = TextBox8.Text
mobileno = TextBox6.Text
emailid = TextBox7.Text
username = TextBox3.Text
password = TextBox4.Text
retypepassword = TextBox5.Text
Dim cmdinsert As Integer
If (TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or
TextBox4.Text = "" Or TextBox5.Text = "") Then
MsgBox(" Fiels Are Empty Record Cannot Be Saved ", MsgBoxStyle.Critical)
Else
Try
connect()
cmd=NewOleDbCommand("insert

into

reg

values('"+userid

"','"+firstname+"','"+lastname+"','"+gender+'"+dob+"','"+mobileno+"','"+emailed+"',
'"+username+"','"+password+'",'"+retypepassword+"')", con)
cmdinsert = cmd.ExecuteNonQuery()
disconnect()
42

Catch ex As Exception
MsgBox(ex.Message)
End Try
If cmdinsert > 0 Then
MsgBox(TextBox1.Text & " Record Successfully Saved", vbInformation)
Button1.Enabled = False
clear()
End If
End If
End Sub
Private Sub clear()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
ComboBox1.Text = ""
End Sub
Private Sub Button1_Click
(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
clear()
MsgBox(" Create New Record ", MsgBoxStyle.Information)
Try
query = "Select max(USERID) from reg "
connectwithreader()
reader.Read()
If reader.HasRows = True Then
If Not reader.Item(0).ToString() = "" Then
Me.TextBox9.Text = CType(reader.Item(0), Integer) + 1
43

Else
Me.TextBox9.Text = 101
End If
End If
disconnect()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
INSERTVALUES()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button6.Click
Dim ret As DialogResult
ret

MessageBox.Show("Are

you

sure

MessageBoxButtons.YesNo,

to

delete

record!",

"Delete".ToUpper(),

MessageBoxIcon.Information,

MessageBoxDefaultButton.Button1)
If (ret = DialogResult.Yes) Then
Try
query = "delete from reg where USERID=" & (TextBox9.Text) & ""
connect()
Dim deleted As String = cmd.ExecuteNonQuery
If deleted > 0 Then
MsgBox("RECORD DELTED")
clear()
End If
disconnect()
Catch ex As Exception
MsgBox("enter valid fields")
End Try
Else
MsgBox("Delete Operation Abort by User ")
44

End If
End Sub
Private

Sub

PictureBox3_Click(ByVal

sender

As

System.Object,

ByVal

As

(USERID="

&

System.EventArgs) Handles PictureBox3.Click


Try
connect()
cmd

New

OleDbCommand("Select

from

reg

where

Trim(Me.TextBox9.Text) & ")", con)


reader = cmd.ExecuteReader
If reader.HasRows Then
While reader.Read
Me.TextBox9.Text = reader.Item(0)
Me.TextBox1.Text = reader.Item(1)
Me.TextBox2.Text = reader.Item(2)
Me.ComboBox1.Text = reader.Item(3)
Me.TextBox8.Text = reader.Item(4)
Me.TextBox3.Text = reader.Item(7)
Me.TextBox4.Text = reader.Item(8)
Me.TextBox5.Text = reader.Item(9)
Me.TextBox6.Text = reader.Item(5)
Me.TextBox7.Text = reader.Item(6)
End While
Else
MsgBox("Record Not Found")
clear()
End If
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
Dim updated As Integer
45

Try
connect()
cmd = New OleDbCommand("update reg set [FIRSTNAME]='" & TextBox1.Text & "',
[LASTNAME]='" & TextBox2.Text & "', [GENDER]='" & ComboBox1.Text & "', [DOB]='"
& TextBox8.Text & "', [MOBILENO]='" & TextBox6.Text & "',[EMAILID]='" &
TextBox7.Text & "', [USERNAME]='" & TextBox3.Text & "',[PASSWORD]='" &
TextBox4.Text & "',[CONFIRMPASSWORD]='" & TextBox5.Text & "' where (USERID=" &
Trim(Me.TextBox9.Text) & ")", con)
updated = cmd.ExecuteNonQuery()
disconnect()
Catch ex As Exception
MsgBox(ex.Message)
End Try
If updated > 0 Then
MsgBox(TextBox9.Text & " Record Successfully Updated", vbInformation)
clear()
End If
End Sub
End Class
MONITERING:
Imports System.Data.OleDb
Public Class MONITERING
Dim userid As String
Dim Name As String
Dim gender As String
Dim weight As String
Dim Height As String
Dim age As String
Dim hemoglobin As String
Dim totalcount As String
Dim erythrocytesedimentationrate As String
Dim hematocrit As String
Dim redcellcount As String
46

Dim plateletcount As String


Dim meancorpscluarvolume As String
Dim meancorpscluarhemoglobin As String
Dim mchconcentrartion As String
Dim bloodsugarfasting As String
Dim bloodsugarpp As String
Dim bloodurea As String
Dim serumcreatinne As String
Dim totalcholestrol As String
Dim triglycerides As String
Dim hdlcholestrol As String
Dim ldlcholestrol As String
Dim vldlcholestrol As String
Dim phospholipids As String
Dim cholhdlratio As String
Private Sub SAVEHELPER()
userid = TextBox1.Text
Name = TextBox2.Text
gender = ComboBox1.Text
weight = TextBox3.Text
Height = TextBox4.Text
age = TextBox5.Text
hemoglobin = TextBox23.Text
totalcount = TextBox22.Text
erythrocytesedimentationrate = TextBox21.Text
hematocrit = TextBox20.Text
redcellcount = TextBox25.Text
plateletcount = TextBox24.Text
meancorpscluarvolume = TextBox27.Text
meancorpscluarhemoglobin = TextBox26.Text
mchconcentrartion = TextBox28.Text
bloodsugarfasting = TextBox9.Text
bloodsugarpp = TextBox10.Text
47

bloodurea = TextBox11.Text
serumcreatinne = TextBox12.Text
totalcholestrol = TextBox13.Text
triglycerides = TextBox14.Text
hdlcholestrol = TextBox15.Text
ldlcholestrol = TextBox16.Text
vldlcholestrol = TextBox18.Text
phospholipids = TextBox17.Text
cholhdlratio = TextBox19.Text
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
INSERTVALUES()
End Sub

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


HOME.Show()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
clear()
MsgBox("Creating new record")
End Sub
Private Sub clear()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
48

TextBox13.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
TextBox16.Text = ""
TextBox17.Text = ""
TextBox18.Text = ""
TextBox19.Text = ""
TextBox20.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
TextBox25.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
TextBox28.Text = ""
ComboBox1.Text = ""
End Sub
Private

Sub

MONITERING_Load(ByVal

sender

As

System.Object,

ByVal

As

System.EventArgs) Handles MyBase.Load


End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
Me.Close()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
If (TextBox1.Text = "") Then
MsgBox("Field Is Empty Please Enter an user Id no ", MsgBoxStyle.Information)
Else
49

Dim ret As DialogResult


ret

MessageBox.Show("Are

you

sure

to

delete

record!",

MessageBoxButtons.YesNo,

"Delete".ToUpper(),

MessageBoxIcon.Information,

MessageBoxDefaultButton.Button1)
If (ret = DialogResult.Yes) Then
Try
query = "delete from mon where USERID=" & (TextBox1.Text) & ""
connect()
Dim deleted As String = cmd.ExecuteNonQuery
If deleted > 0 Then
MsgBox("RECORD DELTED")
clear()
End If
disconnect()
Catch ex As Exception
MsgBox("Enter valid fields")
End Try
Else
MsgBox("RECORD")
End If
End If
End Sub
Private

Sub

PictureBox3_Click_1(ByVal

sender

As

System.Object,

ByVal

As

="

&

System.EventArgs) Handles PictureBox3.Click


If (Me.TextBox1.Text = "") Then
MsgBox("Field Is Empty , Please Enter an Valid Id No", vbInformation)
Else
Try
connect()
cmd

New

OleDbCommand("Select

Trim(Me.TextBox1.Text) & ")", con)


reader = cmd.ExecuteReader
If reader.HasRows Then
50

from

mon

where

(USERID

While reader.Read
Me.TextBox1.Text = reader.Item(0)
Me.TextBox2.Text = reader.Item(1)
Me.ComboBox1.Text = reader.Item(2)
Me.TextBox3.Text = reader.Item(3)
Me.TextBox4.Text = reader.Item(4)
Me.TextBox5.Text = reader.Item(5)
Me.TextBox23.Text = reader.Item(6)
Me.TextBox22.Text = reader.Item(7)
Me.TextBox21.Text = reader.Item(8)
Me.TextBox20.Text = reader.Item(9)
Me.TextBox25.Text = reader.Item(10)
Me.TextBox24.Text = reader.Item(11)
Me.TextBox27.Text = reader.Item(12)
Me.TextBox26.Text = reader.Item(13)
Me.TextBox28.Text = reader.Item(14)
Me.TextBox9.Text = reader.Item(15)
Me.TextBox10.Text = reader.Item(16)
Me.TextBox11.Text = reader.Item(17)
Me.TextBox12.Text = reader.Item(18)
Me.TextBox13.Text = reader.Item(19)
Me.TextBox14.Text = reader.Item(20)
Me.TextBox15.Text = reader.Item(21)
Me.TextBox16.Text = reader.Item(22)
Me.TextBox18.Text = reader.Item(23)
Me.TextBox17.Text = reader.Item(24)
Me.TextBox19.Text = reader.Item(25)
End While
' MsgBox("Record Found")
Else
MsgBox("Record Not Found")
clear()
End If
51

con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub
Private Sub INSERTVALUES()
userid = TextBox1.Text
Name = TextBox2.Text
gender = ComboBox1.Text
weight = TextBox3.Text
Height = TextBox4.Text
age = TextBox5.Text
hemoglobin = TextBox23.Text
totalcount = TextBox22.Text
erythrocytesedimentationrate = TextBox21.Text
hematocrit = TextBox20.Text
redcellcount = TextBox25.Text
plateletcount = TextBox24.Text
meancorpscluarvolume = TextBox27.Text
meancorpscluarhemoglobin = TextBox26.Text
mchconcentrartion = TextBox28.Text
bloodsugarfasting = TextBox9.Text
bloodsugarpp = TextBox10.Text
bloodurea = TextBox11.Text
serumcreatinne = TextBox12.Text
totalcholestrol = TextBox13.Text
triglycerides = TextBox14.Text
hdlcholestrol = TextBox15.Text
ldlcholestrol = TextBox16.Text
vldlcholestrol = TextBox18.Text
phospholipids = TextBox17.Text
cholhdlratio = TextBox19.Text
52

Dim cmdinsert As Integer


If (TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = ""
Or TextBox5.Text = "") Then
MsgBox(" Fiels Are Empty Record Cannot Be Saved ", MsgBoxStyle.Critical)
Else
Try
connect()
cmd = New OleDbCommand("insert into mon values('" + userid +"','" + Name +
"','" + gender +"','" + weight +,'" + Height +"','" + age +"','" + hemoglobin +"','"+ totalcount +
"','" + erythrocytesedimentationrate + "','" +hematocrit +"','" + redcellcount +"','"+eletcount +
"','" + meancorpscluarvolume +"','" + meancorpscluarhemoglobin +"','" + mchconcentrartion +
"','" + bloodsugarfasting + "','" + bloodsugarpp +"','" + bloodurea + "','" + serumcreatinne +
"','" + totalcholestrol +"','" + triglycerides +"','" + hdlcholestrol +"','" + ldlcholestrol + "','" +
vldlcholestrol +"','" + phospholipids +"','" + cholhdlratio + "')", con)
cmdinsert = cmd.ExecuteNonQuery()
disconnect()
Catch ex As Exception
MsgBox(ex.Message)
End Try
If cmdinsert > 0 Then
MsgBox(TextBox1.Text & " Record Successfully Saved", vbInformation)
Button1.Enabled = False
clear()
End If
End If
End Sub
Private Sub Button5_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button5.Click
Try
connect()
cmd

New

OleDbCommand("Select

Trim(Me.TextBox1.Text) & ")", con)


reader = cmd.ExecuteReader
If reader.HasRows Then
53

from

reg

where

(USERID="

&

While reader.Read
Me.TextBox2.Text = reader.Item(1)
Me.ComboBox1.Text = reader.Item(3)
End While
' MsgBox("Record Found")
Else
MsgBox("Record Not Found")
clear()
End If
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class

DOCTOR:
Imports System.Data.OleDb
Public Class DOCTER
Dim doctorid As String
Dim clenicname As String
Dim doctorname As String
Dim holder As String
Dim specialization As String
Dim yearsexp As String
Dim visitinghours As String
Dim contactno As String
Dim emailid As String
Dim address As String
Dim id As String
Private Sub clear()
TextBox1.Text = ""
TextBox2.Text = ""
54

TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
End Sub
Private Sub SAVEHELPER()
doctorid = TextBox1.Text
doctorname = TextBox2.Text
holder = TextBox3.Text
specialization = TextBox4.Text
visitinghours = TextBox5.Text
clenicname = TextBox6.Text
contactno = TextBox7.Text
emailid = TextBox8.Text
address = TextBox9.Text
yearsexp = TextBox10.Text
id = TextBox11.Text
End Sub

Private

Sub

PictureBox3_Click(ByVal

sender

As

System.Object,

ByVal

As

System.EventArgs) Handles PictureBox3.Click


If (TextBox1.Text = "") Then
MsgBox(" ID Field Empty ", MsgBoxStyle.Information)
Else
Try
connect()
cmd = New OleDbCommand("Select * from doc where (DOCTERID='" + TextBox1.Text +
55

"')", con)
reader = cmd.ExecuteReader
If reader.HasRows Then
While reader.Read
Me.TextBox1.Text = reader.Item(0)
Me.TextBox2.Text = reader.Item(1)
Me.TextBox3.Text = reader.Item(2)
Me.TextBox4.Text = reader.Item(3)
Me.TextBox5.Text = reader.Item(4)
Me.TextBox6.Text = reader.Item(5)
Me.TextBox7.Text = reader.Item(6)
Me.TextBox8.Text = reader.Item(7)
Me.TextBox9.Text = reader.Item(8)
Me.TextBox10.Text = reader.Item(9)
Me.TextBox11.Text = reader.Item(10)
End While
Button5.Enabled = False
Button5.Visible = False
Button1.Enabled = True
Button1.Visible = True
Button2.Enabled = False
Button6.Enabled = True
' MsgBox("Record Found")
Else
MsgBox("Record Not Found")
clear()
End If
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub
56

Private Sub INSERTVALUES()


doctorid = TextBox1.Text
doctorname = TextBox2.Text
holder = TextBox3.Text
specialization = TextBox4.Text
visitinghours = TextBox5.Text
clenicname = TextBox6.Text
contactno = TextBox7.Text
emailid = TextBox8.Text
address = TextBox9.Text
yearsexp = TextBox10.Text
id = TextBox11.Text
Dim cmdinsert As Integer
If (TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = ""
Or TextBox5.Text = "") Then
MsgBox(" Fiels Are Empty Record Cannot Be Saved ", MsgBoxStyle.Critical)
Else
Try
connect()
cmd = New OleDbCommand("insert into doc values('" + doctorid +"','" +clenicname +"','" +
contactno +"','" + emailid +"','" + address +"','" + doctorname
+"','" + holder +"','" + visitinghours +"','" + yearsexp +"','" + specialization + "',
'" + id +"')", con)
cmdinsert = cmd.ExecuteNonQuery()
disconnect()
Catch ex As Exception
MsgBox(ex.Message)
End Try
If cmdinsert > 0 Then
MsgBox(TextBox1.Text & " Record Successfully Saved", vbInformation)
'Button1.Enabled = False
clear()
End If
57

End If
End Sub
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
INSERTVALUES()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
clear()
Try
query = "Select max(ID) from doc "
connectwithreader()
reader.Read()
Dim str As String
Dim c As String
Dim b As String
Dim a As String
Dim doid As String
b = "DOC"
c = Convert.ToString(System.DateTime.Today.Month)
If reader.HasRows = True Then
If Not reader.Item(0).ToString = "" Then
str = reader.Item(0).ToString
doid = Convert.ToInt32(str) + 1
TextBox1.Text = b + c + doid.ToString
Me.TextBox11.Text = CType(reader.Item(0), Integer) + 1
a = reader.Item(0)
Else
Me.TextBox11.Text = 101
a = b + c + TextBox11.Text
Me.TextBox1.Text = a
End If
58

End If
Button5.Enabled = False
Button5.Visible = True
Button6.Enabled = False
' Button1.Visible = False
Button2.Enabled = True
disconnect()
Catch ex As Exception
MsgBox(ex.Message)
End Try
' idpart()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button6.Click
Dim ret As DialogResult
Dim deleted As String
ret

MessageBox.Show("Are

you

sure

MessageBoxButtons.YesNo,

to

delete

record!",

"Delete".ToUpper(),

MessageBoxIcon.Information,

MessageBoxDefaultButton.Button1)
If (ret = DialogResult.Yes) Then
Try
con.Open()
cmd = New OleDbCommand("delete from doc where DOCTERID='" + TextBox1.Text + "'",
con)
deleted = cmd.ExecuteNonQuery()
If deleted > 0 Then
MsgBox("RECORD DELTED")
clear()
End If
disconnect()
Catch ex As Exception
MsgBox("enter valid fields")
End Try
59

Else
MsgBox("Delete Operation Abort by User ")
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Dim updated As Integer
Try
connect()
query = "update doc set [DOCTERNAME]='" + TextBox2.Text +"',[HOLDER]='" +
TextBox3.Text +"',[SPECILISATION]='" + TextBox4.Text + "',[TIMEOFWORKING]='" +
TextBox5.Text+"',[CLINICNAME]='"+TextBox6.Text+"',[MOBILENO]='"+TextBox7.Text
+"',[EMAILID]='"+TextBox8.Text+"',[ADDRESS]='"+TextBox9.Text+"',[YEARSOFEXP]='"
+ TextBox10.Text +"' where DOCTERID='" + TextBox1.Text + "'"
cmd = New OleDbCommand(query, con)
updated = cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message)
End Try
If updated > 0 Then
MsgBox(TextBox1.Text & " Record Successfully Updated", vbInformation)
clear()
Button5.Enabled = True
Button5.Visible = True
Button1.Enabled = False
Button1.Visible = False
Button2.Enabled = True
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button5.Click
If (TextBox1.Text = "") Then
60

MsgBox(" ID Field Empty ", MsgBoxStyle.Information)


Else
Button5.Enabled = False
Button5.Visible = False
Button1.Enabled = True
Button1.Visible = True
Button2.Enabled = False
End If
End Sub
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button12.Click
Me.Close()
End Sub
Private Sub DOCTER_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
End Sub
End Class

TREATMENT:
Imports System.Data.OleDb
Public Class TREATMENT
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
Me.Close()
End Sub
Private

Sub

TREATMENT_Load(ByVal

sender

System.EventArgs) Handles MyBase.Load


Me.DocTableAdapter.Fill(Me.Database1DataSet5.doc)
61

As

System.Object,

ByVal

As

End Sub
Private

Sub

PictureBox1_Click(ByVal

sender

As

System.Object,

ByVal

As

(USERID="

&

System.EventArgs) Handles PictureBox1.Click


If (Me.TextBox1.Text = "") Then
MsgBox("Field Is Empty , Please Enter an Valid Id No", vbInformation)
clear()
Else
Try
connect()
cmd

New

OleDbCommand("Select

from

reg

where

Trim(Me.TextBox1.Text) & ")", con)


reader = cmd.ExecuteReader
If reader.HasRows Then
While reader.Read
Me.TextBox1.Text = reader.Item(0)
Me.TextBox2.Text = reader.Item(1)
End While
'GroupBox1.Visible = True
Else
MsgBox("Record Not Found")
End If
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub
Dim cmdinsert As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
If (TextBox1.Text = "" Or DateTimePicker1.Text = "" Or TextBox3.Text = "" Or
TextBox2.Text = "" Or ComboBox2.Text = "") Then
62

MsgBox(" Fiels Are Empty Record Cannot Be Saved ", MsgBoxStyle.Critical)


Else
Try
connect()
cmd = New OleDbCommand("insert into appoint values('" + TextBox1.Text +
"','" + TextBox2.Text +
"','" + ComboBox1.Text +
"','" + TextBox3.Text +
"','" + DateTimePicker1.Text +
"','" + ComboBox2.Text +
"')", con)
cmdinsert = cmd.ExecuteNonQuery()
disconnect()
Catch ex As Exception
MsgBox(ex.Message)
End Try
If cmdinsert > 0 Then
MsgBox(TextBox2.Text & " Fixed an Appintment with " & TextBox3.Text & "on" &
DateTimePicker1.Text & " Successfull ", vbInformation)
'Button1.Enabled = False
clear()
End If
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
'PictureBox2.Enabled = True
'PictureBox2.Visible = True
If (TextBox1.Text = "" Or DateTimePicker1.Text = "" Or TextBox2.Text = "" Or
ComboBox2.Text = "") Then
MsgBox(" Fiels Are Empty ", MsgBoxStyle.Critical)
clear()
63

Else
Dim ret As DialogResult
Dim deleted As String
ret = MessageBox.Show("Are you sure to cancel ur appointment !", "sure".ToUpper(),
MessageBoxButtons.YesNo,

MessageBoxIcon.Information,

MessageBoxDefaultButton.Button1)
If (ret = DialogResult.Yes) Then
Try
connect()

cmd = New OleDbCommand("delete from appoint where userid='" +


TextBox1.Text + "'", con)
deleted = cmd.ExecuteNonQuery()
If deleted > 0 Then
MsgBox(" ur appointment canceled")
clear()
End If
disconnect()
Catch ex As Exception
MsgBox("enter valid fields")
End Try
Else
MsgBox("Cancel Operation Abort by User ")
End If
End If
End Sub
Private

Sub

PictureBox2_Click(ByVal

sender

As

System.Object,

System.EventArgs) Handles PictureBox2.Click


If (Me.TextBox1.Text = "") Then
MsgBox("Field Is Empty , Please Enter an Valid Id No", vbInformation)
64

ByVal

As

clear()
Else
Try
connect()
cmd = New OleDbCommand("Select * from appoint where userid='" + TextBox1.Text + "'",
con)
reader = cmd.ExecuteReader
If reader.HasRows Then
While reader.Read
Me.TextBox1.Text = reader.Item(0)
Me.TextBox2.Text = reader.Item(1)
Me.DateTimePicker1.Value = reader.Item(4)
Me.ComboBox2.Text = reader.Item(5)
End While
Else
MsgBox("Record Not Found")
End If
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub
Private Sub clear()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
65

TextBox9.Text = ""
TextBox10.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
DateTimePicker1.Text = ""
End Sub
End Class
CONNECTION:
Imports System
Imports System.Data
Imports System.Data.OleDb
Module healthcare
Public con As OleDbConnection
Public cmd As OleDbCommand
Public da As OleDbDataAdapter
Public query As String
Public reader As OleDbDataReader
Sub connect()
con

New

OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data

Source=D:\mini\mini\Database1.mdb;Persist Security Info=True")


cmd = New OleDbCommand(query, con)
con.Open()
End Sub
Sub connectwithreader()
connect()
reader = cmd.ExecuteReader()
End Sub
Sub disconnect()
con.Close()
End Sub
End Module

66

Das könnte Ihnen auch gefallen