0% found this document useful (0 votes)
7 views42 pages

HOSPITAL REPORT

The document is a project report on a Hospital Management System developed by students at The National College, Bengaluru, as part of their Bachelor of Science program. It details the project's objectives, design, and implementation using VB.NET and SQL Server, aiming to improve the management of doctor and patient records, appointments, and overall hospital efficiency. The report includes acknowledgments, a declaration of originality, and a structured outline of the project's components and requirements.

Uploaded by

shashi vamshi pv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views42 pages

HOSPITAL REPORT

The document is a project report on a Hospital Management System developed by students at The National College, Bengaluru, as part of their Bachelor of Science program. It details the project's objectives, design, and implementation using VB.NET and SQL Server, aiming to improve the management of doctor and patient records, appointments, and overall hospital efficiency. The report includes acknowledgments, a declaration of originality, and a structured outline of the project's components and requirements.

Uploaded by

shashi vamshi pv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 42

HOSPITAL MANAGEMENT SYSTEM

PROJECT REPORT ON

“HOSPITAL MANAGEMENT SYSTEM”

SUBMITTED IN THE PARTIAL FULLFILLMENT OF THE REQUIREMENTS


FOR THE AWARDED OF THE SIXTH SEMESTER BACHELOR OF SCIENCE,

UNDER THE GUIDENCE OF


PROF. SATISH KUMAR G
Department of computer science THE NATIONAL COLLEGE AUTONOMOUS
BASAVANAGUDI, BENGALURU-04

DURING THE ACADEMIC YEAR 2022-2023

SUBMITTED BY
ANIRUDH MURTHY 20NCBS4039
CHARAN RAJ NM 20NCBS4004
SHASHI VAMSHI PV 20NCBS4037

Department of computer science, The National College Basavanagudi-04 Page 1


HOSPITAL MANAGEMENT SYSTEM

THE NATIONAL
COLLEGE AUTONOMOUS
BASAVANAGUDI, BENGALURU-560004

Certificate
This is to certify that the PROJECT REPORT entitled “HOSPITAL MANAGEMENT SYSTEM”
is a work carried out by ANIRUDH MURTHY (20NCBS4039), CHARAN RAJ NM
(20NCBS4004), SHASHI VAMSHI PV (20NCBS4037) in the partial fulfilment of Sixth Semester BSc
in The
National college during the year 2022-2023.

SIGNATURE OF THE HOD SIGNATURE OF THE GUIDE


PROF. Ravi Hegde AMIE, MSc, MTech, M.Phil. PROF. SATISH KUMAR G MCA

Department of computer science Department of computer science

Name and signature of the Examiner with date

1.
2.

Department of computer science, The National College Basavanagudi-04 Page 2


HOSPITAL MANAGEMENT SYSTEM

ACKNOWLEDGEMENT

We consider it our privilege to express our gratitude and thanks to all people who have supported us directly
and indirectly with their co-operation, encouragement and intellectual influence during the course of the
project

We consider ourselves proud to be the part of The National College, the institution that our way in all
endeavor.

We are grateful to prof. RAVIHEGDE Head of the Department of the computer science, national college
and our project guide for their valuable guidance.

We are sincerely regard our thanks to Prof. S project in charge, Department of Computer Science of his
suggestions, encouragement and valuable internal guidance throughout the entire period.

We would like to thank all the teacher and staff members who have support us during the project.

We would also like to thank our friends for all their insights and moral support.

Department of computer science, The National College Basavanagudi-04 Page 3


HOSPITAL MANAGEMENT SYSTEM

DECLARATION

We ANIRUDH MURTHY, CHARAN RAJ NM And SHASHI VAMSHI PV do hereby declare that project
entitled “HOSPITAL MANAGEMNET SYSTEM” is a benefited work carried out by us under the guidance
of Prof Satish Kumar G

This project, as presented in this report, is our original work and has not been presented for any other
university award. This project has been submitted as fulfillment of requirements for the Degree of
Bachelor of Science of Bangalore University.

Place: Bangalore

Department of computer science, The National College Basavanagudi-04 Page 4


HOSPITAL MANAGEMENT SYSTEM

ABSTRACT

The hospital management system project allows hospital to manage and maintain doctors and patients
records like doctor name, patient address, appointment details, appointment status.

hospital offers people wide range of treatments and services.

The system should allow the bank to:

1. Login
2. home
3. doctor
 Doctor name
 Experience
 Contact number
 Email address
 Specialization
 Qualification
 Salary
 Gender
4. Patient
 Patient name
 Address
 Contact number
 Age
 Gender
5. Appointment
 Booking appointments
 Closing appointments
 Viewing appointment status

Department of computer science, The National College Basavanagudi-04 Page 5


HOSPITAL MANAGEMENT SYSTEM

CONTENTS

1. Introduction to project
a. Introduction to vb.net
b. Introduction to SQL server

2. Existing System and Proposed System.

3. Requirements and Specifications. (Your project SRS)

4. Design

5. Coding

6. Testing (Regarding your project)


a. unit testing
b. integration testing
c. system testing
d. sample test case
7. Future Enhancement and conclusion

8. Bibliography

9. Appendix

a. Screenshots
b. Source code

Department of computer science, The National College Basavanagudi-04 Page 6


HOSPITAL MANAGEMENT SYSTEM

INTRODUCTION

 INTRODUCTION TO PROJECT:
This project of “Hospital Management system” has been designed using vb.net as frontend and SQL
server as backend. This software comprises of modules dealing with hospital, doctor and patient details
and appointment details of module products.

The software hospital management system has been developed on the vb.net and SQL server. The main
aim for developing the project is to maintain doctor and patient details, appointment details like status and
booking of appointment. The main objective of this project is to provide the better work efficiency, security,
accuracy, reliability and feasibility

Department of computer science, The National College Basavanagudi-04 Page 7


HOSPITAL MANAGEMENT SYSTEM

1.1. VISUAL BASIC.NET


(Microsoft Visual Studio)

VB.Net is an integrated development environment (IDE) from Microsoft. It is used to develop software as
well as website, web applications and web services. VB.NET makes use of graphical interface for the
creation of Train and powerful applications. VB includes code editor supporting IntelliSense as well as code
refactoring other built-in tools includes form designer for building GUI applications, class designer and
database schema designer. The visual studio code editor also supports setting bookmarks in code of quick
navigation. Visual studio features background compilation (also called incremental compilation). There are
many tools that Visual studio provides such as Windows form designer. WPF designer, Web development,
Class designer, Data designer etc... The important feature of visual studio 2019 is its DATA EXPLORER. It
is used to manage database on MICROSOFT SQL SERVER instances which, is the backend software
package of our project. It allows creation and alternation of Database unique to other languages. Also coding
in GUI environment is quite through linear paths of execution. The number of options that are open to the
user and developer features such as easier to comprehension, user friendliness, faster access and many such
other features make it an interesting tool to work with. In the newer version that is in VB.NET 2019 we
make things much easier than before like a design the project in the updated version as UX design (user
experience design) which acquire lesser memory than others.

Active X technologies allows the user to use functions provide by other applications such as MICROSOFT
WORD, WORD PROCESSOR, and others windows applications.

Internet capabilities make it easy to provide access to documents and applications across the internet or
intranet from within your applications.

Our finished applications are true .exe files that use a VISUAL STUDIO VIRTUAL MACHINE that we can
freely distribute.

Hence, VISUAL STUDIO 2019 is much compatible and a very user-friendly secured programming
languages.

Department of computer science, The National College Basavanagudi-04 Page 8


HOSPITAL MANAGEMENT SYSTEM

1.2. MICROSOFT SQL SERVER

MICROSOFT SQL Server is a relational database management system developed by Microsoft. It is a


software product whose primary function is to store and retrieve data as requested by other software
applications (VB.NET in this case), be it those on the same system or those running on other. SQL Server
2008 Data Centre is designed for high levels of applications support and scalability. It supports 256 logic
processors and virtually unlimited memory. This is also a very powerful multi user and Data
Management System. It can store and manipulation. By using such as access, we can develop easy to use
Data input forms. We can process our data and create meaningful reports.

Data in SQL is organized in the form of tables. Within a table, records are arranged according to common
references value known as primary key or a key field. The value in the key field is different for every record
and thus helps in uniquely identifying records. A combination is also two or more fields can also be used as
primary key. Such as combination is also composite key. Also, storage space is allocated to a database
which is divided into sequentially numbered pages, each almost 8kb in size. A SQL server database can
obtain a maximum of 231 objects. New features in Microsoft SQL server offers many new improved
features to help us to create powerful Database applications.

Department of computer science, The National College Basavanagudi-04 Page 9


HOSPITAL MANAGEMENT SYSTEM

Existing System and Proposed System.

EXISTING SYSTEM

The existing system refer to the system that is being followed till now. The existing system
requires more computational time, manual calculations, and the involved in selection of features is
high, the other disadvantages are lack of security of data, the consuming etc.

Draw Backs of Existing system:

 In the Existing system user will not have user friendly feelings.

 There is no updated destination

 Problem regarding online money transaction.

PROPOSED SYSTEM

The aim of proposed system is to develop a system of improved facilities. The proposed system can
overcome all the limitation of the existing system. The system provides proper security and reduces the
manual work. The existing system has several disadvantages and many more difficulties to work well. The
proposed system tries to eliminate or reduce these difficulties up to some extent. The proposed system will
help the user reduce the workload and mental conflict.

ADVANTAGES
 Very user friendly
 Very fast in response
 Update details
 Better service
 Minimum time required.

Department of computer science, The National College Basavanagudi-04 Page 10


HOSPITAL MANAGEMENT SYSTEM

1. SOFTWARE REQUREMENTS AND SPECIFICATIONS

INTRODUCTION
Software Requirements Specifications (SRS) is the beginning point of the software project development
activity. This document identifies the problem and specifies the requirements of the clients. The detailed
requirements specification provides the performance description. information description and functionality
description of the client's product.

PURPOSE
The requirement of the documentation is to obtain dependable, secure, extensible product which meet the
objective of this software project. The SRS document completely describes the external behavior of the
proposed software project by analyzing the client’s requirements through communication.

The SRS document for the currently undertaken project specifies the different operations involves in this
project. The project offers menu driven command user interface that forms the user interface that forms the
user-friendly interface for the clients. It also provides the precise communication interface that describes the
intercommunication between different modules. The current project must comprise of two kinds of users,
admin and public user. Here, the definite integral constraints are offered by providing the required field
validation, regular, expression validation data type and size for each of the data field involved in the
process. It provides a moderate way to validate the actual requirement of a client with the SRS prepared for
the project.

The current project must also possess few features. Since the project deals with the below mentioned
features:

 Authorized user login


 Record creation
 Search for particulars patient and doctor details
 Delete or modify of appointment details
 Modify records
 Update the database

It provides feedback to the customer SRS is the customer's assurance that the development of organization
understands the issues or problems to be solved and the software behaviors necessary to address those
problems.

Therefore, SRS should be written in natural language, in an unambiguous manner that may

Department of computer science, The National College Basavanagudi-04 Page 11


HOSPITAL MANAGEMENT SYSTEM

also include charts, tables, dataflow diagrams and so on.

To avoid the complexity of the project, the entire project is partitioned into different modules with specific
functions.

SYSTEM CONFIGURATION

HARDWARE REQUEMENT:

1. Processor: 2.00GHz
2. RAM: 4GB
3. SSD: 512GB

SOFTWARE REQUIRMENTS:

1. Operating system: window10


2. Frame work: VB.NET framework
3. Database server: Microsoft SQL server

Department of computer science, The National College Basavanagudi-04 Page 12


HOSPITAL MANAGEMENT SYSTEM

4. DESIGN

Design is the first step in moving from the problem domain towards the solution. The design activity begins
when the requirement document for the software to be developed it available, Design is essentially the
bridge between the requirement specification and the final solution for satisfying the client's requirements.

With reference to the currently undertaken “Hospital” a hospital management project, the design can be
discussed through two aspects:

 Modular Design
 Graphical Design

Modular Design:
Any integrated software is the result of the combination of the several modules that eases implementation,
debugging, testing, documentation and maintenance of the software product. It also enhances the design
clarity.

With reference to the "Hospital” project, the design clearly specifies the interconnection of the different
modules through the external and internal data sources and data links

Login Module:
The concern of the login module is towards the accessibility of the functionality of the project by the
authorized user who enters the accurate password. This project is viewed or operated by the administration
for monitoring the website.

Patient Module:
This module helps user to create an account to the patient by using their personal details.

1. Add patient details:

To create patient account, hospital needs patient personal details, after creating an account the
patient will get a unique ID number further which will be used for updating, booking appointment,
deleting patient details by the user.

Department of computer science, The National College Basavanagudi-04 Page 13


HOSPITAL MANAGEMENT SYSTEM

Doctor Module:

To create doctor account, hospital needs doctor personal details and professional details after
creating an account the doctor will get a unique ID number further which will be used for updating,
booking appointment, deleting doctor details by the user.

Appointment Module:

Allows the hospital to add appointments and check the status of the appointment and delete the
completed appointments between doctors and patients.

Department of computer science, The National College Basavanagudi-04 Page 14


HOSPITAL MANAGEMENT SYSTEM

E-R Diagram
apptid
pntid number appt time
address

books appointment
patients
p

name

age status
gender

register
attends
gende
r

specialization
age
userid

Contact no

adds Doctor
Users

docid
passwor
d
name
name
emai
l

qualification gender

Department of computer science, The National College Basavanagudi-04 Page 15


HOSPITAL MANAGEMENT SYSTEM

Coding

A system consists of computers, which have components of their own; indeed, a system is a hierarchy of
components the highest-level component corresponds to the total system. To design such hierarchies there
are two possible approaches; top-down and bottom-up. Top-down approach starts from the highest-level
components of the hierarchy and proceeds through lower levels. By contrast, a bottom-up approach starts
with lowest level and proceeds through progressively higher level to the top-level components.

A top-down design approach starts by identifying the major components of the system, decomposing them
into their lower -level components and iterating until the desired level of details is achieved Top-down
methods often results in some form of step wise refinement. Starting from an abstract design, in each step
the design is refined to a more concrete level, until we reach a level where no more refinement is needed and
the design can be implemented directly. The top-down approach has been promulgated by many researches
and has been found to be extremely useful for design. Most design methodologies are based on the top-down
approach.

A top-down approach is suitable only if the specifications of the system are clearly knownand the system
development is from scratch. Hence, it is a reasonable approach if a waterfall type of process model is been
used.

Top-Down approaches require some idea about the visibility of the components specified during design. The
components specified during design should be implementable, which requires some idea about the visibility
of the lower-level parts of a component. Use a top-down approach to determine the modules in the system,
assuming that the abstract machine available for implementing the system provides the operations supported
by the abstraction layer, this approach is frequently used for developing system.

Department of computer science, The National College Basavanagudi-04 Page 16


HOSPITAL MANAGEMENT SYSTEM

5. TESTING
After the design and coding is done here comes the system testing System testing has

6.1. unit testing

6.2. Integration testing

6.3. System testing

6.4. sample testing

6.1. Unit Testing:


In this part the system is compiled for every individual form, classes and modules. Every object present in
the forms is coding part, the appropriate code is written in order to make the objects work properly the codes
are complied. After compilation if any error occurs it is rectified and make sure that every object in the form
is working properly and accordingly.

6.2. Integration Testing:


When an individual unit coding is done there starts integration testing the linked objects is tested. Whatever
the objects are linked between the forms are compiled and checked, if they are proper or not. If some error is
occurred during the linking it is changed.

6.3. System Testing:


After going with the unit and integration testing, system testing takes place system testing compilation and
testing the whole application and also trying it on the owner's computers if it is working there also. When all
the compilation is done and all over application is done which checks one object coding linking etc., and
finally provides the results as the standard EXE

Department of computer science, The National College Basavanagudi-04 Page 17


HOSPITAL MANAGEMENT SYSTEM

6.4. Sample Test cases:

TEST ID TEST CASE TEST CASE TEST DATA EXPECTED ACTUAL


DESCRIPTION PROCEDURE RESULTS RESULT

1 Validation for Place the admin valid user id Access


the user’s name cursor on the 1234 and password granted
and password text boxes
Invalid user id
Demo and password Access
123232 denied

2 Validation for Go to the Shilpa Valid name Valid


name textbox that
requires only
characters nava123 Invalid name Doesn’t go
further

3 Validation for Go to the 9898 Valid Valid


numbers textbox that
requires only
numbers 89dgd Invalid Doesn’t go
further

4 Validation for Go to the 9988774466 Valid Valid


contact number textbox that
requires only
numbers 665523ef Invalid Doesn’t go
further

5 Validation for Go to the [email protected] Valid Valid


email textbox that
requires only
numbers,
characters and
special Demogmal.com Invalid Doesn’t go
characters further

Department of computer science, The National College Basavanagudi-04 Page 18


HOSPITAL MANAGEMENT SYSTEM
6. Future Enhancement and conclusion

The package has been developed to efficiently manage all types of details, modification and deletion of the
patient and doctorand appointment records, the errors which normally creep during manual operation were
avoided. The package offers user friendly screen which is similar to most of window applications.

Conclusion

The main objective of working under this project was to get hands on knowledge on the implementation of
the “HOSPITAL MANAGEMENT SYSTEM” project. It has given us a large amount of experience. In the
project all the functionalities or automated accordingly to user’s satisfaction

Department of computer science, The National College Basavanagudi-04 Page 19


HOSPITAL MANAGEMENT SYSTEM
7. BIBILOGRAPHY

BOOKS:

1. Integrated Approach to "software Engineering" by Pankaj Jalote.

2. "Software Engineer" by Ivan Marsic

3. The Complete Reference of Visual Basics by "McGraw HILL EDUCATION".

4. Fundamentals of Database Systems by Remez Elmasri and Shamkant B. Navathe,

WEB REFERENCES:

 www.vbtutor.com
 www.wikipedia.com
 www.itsource.com
 www.kaashipara.org

Department of computer science, The National College Basavanagudi-04 Page 20


HOSPITAL MANAGEMENT SYSTEM
9. Appendixes

9.1 Screenshots

LOGIN FORM:

HOME FORM:

Department of computer science, The National College Basavanagudi-04 Page 21


HOSPITAL MANAGEMENT SYSTEM

PATIENT ADD FORM:

PATIENT VIEW FORM:

Department of computer science, The National College Basavanagudi-04 Page 22


HOSPITAL MANAGEMENT SYSTEM

PATIENT UPDATE FORM:

PATIENT DELETE FORM:

DOCTOR ADD FORM:

Department of computer science, The National College Basavanagudi-04 Page 23


HOSPITAL MANAGEMENT SYSTEM
VIEW DOCTOR FORM:

DOCTOR UPDATE FORM:

DOCTOR DELETE FORM:

Department of computer science, The National College Basavanagudi-04 Page 24


HOSPITAL MANAGEMENT SYSTEM

BOOK APPOINTMENT FORM:

APPOINTMENT VIEW FORM:

APPOINTMENT DELETE FORM:

Department of computer science, The National College Basavanagudi-04 Page 25


HOSPITAL MANAGEMENT SYSTEM

TABLES

LOGIN TABLE:

PATIENT TABLE:

Department of computer science, The National College Basavanagudi-04 Page 26


HOSPITAL MANAGEMENT SYSTEM

DOCTOR TABLE

APPOINTMENT TABLE:

Department of computer science, The National College Basavanagudi-04 Page 27


HOSPITAL MANAGEMENT SYSTEM

9.2. SOURCE CODE


LOGIN FORM:
Imports System.Data.SqlClient
Imports System.Data
Public Class Login
Dim username, password As String

Private Sub login_btn_Click(sender As Object, e As EventArgs) Handles login_btn.Click


'Make SQL connection
Dim conn As New SqlConnection("Data Source=LAPTOP-G734VL11;Initial Catalog=Hospital;Integrated
Security=True")
'SQL Comamnd to be executed
Dim cmd As New SqlCommand("Select Username , Password from Users where Username = @username
and Password = @password", conn)
'Open the connection
conn.Open()
username = username_text.Text
password = pass_text.Text
'Pass the values to the SQL Command
cmd.Parameters.AddWithValue("@username", username)
cmd.Parameters.AddWithValue("@password", password)
'Execute Command
Dim rd As SqlDataReader = cmd.ExecuteReader()
'Check if the fields are empty
If username = "" Or password = "" Then
MessageBox.Show("Username or password field cannot be empty")
ElseIf rd.HasRows Then
Dim home As New Home
'Hide current form
Me.Hide()
'Show next form
home.Show()
Else
MessageBox.Show("user not verified")
username_text.Focus()
End If
End Sub
End Class

Department of computer science, The National College Basavanagudi-04 Page 28


HOSPITAL MANAGEMENT SYSTEM

HOME FORM:
Imports System.Windows

Public Class Home


Private Sub logout_btn_Click(sender As Object, e As EventArgs) Handles logout_btn.Click
Dim previousform As Form = Application.OpenForms.OfType(Of Login)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub

Private Sub Pnt_view_Click(sender As Object, e As EventArgs) Handles Pnt_view.Click


Dim pnt As New Pnt_view
pnt.Show()
Me.Hide()
End Sub

Private Sub Pnt_add_Click(sender As Object, e As EventArgs) Handles Pnt_add.Click


Dim pnt_add As New Pnt_add
pnt_add.Show()
Me.Hide()
End Sub

Private Sub Pnt_del_Click(sender As Object, e As EventArgs) Handles Pnt_del.Click


Dim pnt_del As New Pnt_del
pnt_del.Show()
Me.Hide()
End Sub

Private Sub Doc_view_Click(sender As Object, e As EventArgs) Handles Doc_view.Click


Dim doc_view As New Doc_view
doc_view.Show()
Me.Hide()
End Sub

Private Sub Doc_del_Click(sender As Object, e As EventArgs) Handles Doc_del.Click


Dim doc_del As New Doc_del
doc_del.Show()
Me.Hide()
End Sub

Private Sub Doc_updt_Click(sender As Object, e As EventArgs) Handles Doc_updt.Click


Dim doc_updt As New Doc_update
doc_updt.Show()
Me.Hide()
End Sub

Private Sub Pnt_updt_Click(sender As Object, e As EventArgs) Handles Pnt_updt.Click


Dim pnt_updt As New Pnt_update
pnt_updt.Show()
Me.Hide()
End Sub

Private Sub Doc_add_Click(sender As Object, e As EventArgs) Handles Doc_add.Click


Dim doc_add As New Doc_add
doc_add.Show()
Me.Hide()
End Sub

Department of computer science, The National College Basavanagudi-04 Page 29


HOSPITAL MANAGEMENT SYSTEM
Private Sub new_apmt_Click(sender As Object, e As EventArgs) Handles new_apmt.Click
Dim appt_add As New appt_add
appt_add.Show()
Me.Hide()
End Sub

Private Sub fin_apmt_Click(sender As Object, e As EventArgs) Handles fin_apmt.Click


Dim appt_del As New appt_del
appt_del.Show()
Me.Hide()
End Sub

Private Sub all_apmt_Click(sender As Object, e As EventArgs) Handles all_apmt.Click


Dim appt_view As New View_appt
appt_view.Show()
Me.Hide()
End Sub
End Class

PATIENT ADD FORM:

PATIENT VIEW FORM:


Public Class Pnt_view
Private Sub Pnt_view_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'HospitalDataSet.Patients' table. You can move, or remove it,
as needed.
Me.PatientsTableAdapter.Fill(Me.HospitalDataSet.Patients)

End Sub

Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click


Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub

Private Sub DataGridView1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles


DataGridView1.CellContentClick

End Sub
End Class

PATIENT UPDATE FORM:


Imports System.Data.SqlClient
Imports System.Windows.Forms.VisualStyles.VisualStyleElement

Public Class Pnt_update


Private Sub Pnt_update_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'HospitalDataSet.Patients' table. You can move, or remove it,
as needed.
Me.PatientsTableAdapter.Fill(Me.HospitalDataSet.Patients)
End Sub

Department of computer science, The National College Basavanagudi-04 Page 30


HOSPITAL MANAGEMENT SYSTEM

Dim id As Integer

Private Sub DataGridView1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles


DataGridView1.CellContentClick
If e.ColumnIndex = 0 AndAlso e.RowIndex >= 0 Then
id = DataGridView1.Rows(e.RowIndex).Cells(1).Value
pnt_name_txt.Text = DataGridView1.Rows(e.RowIndex).Cells(2).Value
gender.Text = DataGridView1.Rows(e.RowIndex).Cells(3).Value
pnt_age_txt.Text = DataGridView1.Rows(e.RowIndex).Cells(4).Value
pnt_address_txt.Text = DataGridView1.Rows(e.RowIndex).Cells(5).Value
pnt_num_txt.Text = DataGridView1.Rows(e.RowIndex).Cells(6).Value
End If
End Sub
Function IsNumericString(input As String) As Boolean
For Each c As Char In input
If Not Char.IsDigit(c) Then
Return False
End If
Next
If input > 0 Then
Return True
Else
Return False
End If

End Function
Private Sub update_pnt_Click(sender As Object, e As EventArgs) Handles update_pnt.Click
Dim chk As Integer
If gender.Text = "Male" Or gender.Text = "Female" Or gender.Text = "Others" Then
If IsNumericString(pnt_age_txt.Text) Then
If IsNumericString(pnt_num_txt.Text) And pnt_num_txt.Text.Length = 10 Then
'Esatblish Connection
Dim conn As New SqlConnection("Data Source=LAPTOP-G734VL11;Initial
Catalog=Hospital;Integrated Security=True")
'Dim cmd As New SqlCommand("Insert Into Patients
(PatientName,Gender,Age,Address,ContactNumber) Values(@name,@gen,@age,@addr,@num)", conn)
Dim cmd As New SqlCommand("UPDATE Patients SET PatientName = @name, Gender = @gen,
Age = @age ,Address = @addr,ContactNumber = @num WHERE PatientID = @id", conn)
cmd.Parameters.AddWithValue("@id", id)
cmd.Parameters.AddWithValue("@name", pnt_name_txt.Text)
cmd.Parameters.AddWithValue("@gen", gender.Text)
cmd.Parameters.AddWithValue("@age", Integer.Parse(pnt_age_txt.Text))
cmd.Parameters.AddWithValue("@addr", pnt_address_txt.Text)
cmd.Parameters.AddWithValue("@num", pnt_num_txt.Text)

conn.Open()
Dim Res As Integer = cmd.ExecuteNonQuery()
If Res > 0 Then
MessageBox.Show("Entered successfully")
Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
Me.Close()
End If
Else
MessageBox.Show("Error occured while entering values")
End If
conn.Close()
Else
MessageBox.Show("Contact Number must be 10 digits!!!")
End If

Department of computer science, The National College Basavanagudi-04 Page 31


HOSPITAL MANAGEMENT SYSTEM
Else
MessageBox.Show("Age must be Integer")
End If
Else
MessageBox.Show("gender must be either 'M' or 'F'")
End If
End Sub

Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click


Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub
End Class

PATIENT DELETE FORM:


Imports System.Collections.Generic
Imports System.Data.SqlClient

Public Class Pnt_del


Private Sub Pnt_del_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'HospitalDataSet.Patients' table. You can move, or remove it,
as needed.
Me.PatientsTableAdapter.Fill(Me.HospitalDataSet.Patients)

End Sub
Dim ids As New List(Of Integer)

Private Sub del_rec_Click(sender As Object, e As EventArgs) Handles del_rec.Click


For Each row As DataGridViewRow In DataGridView1.Rows
Dim checkbox As DataGridViewCheckBoxCell = CType(row.Cells(0), DataGridViewCheckBoxCell)
If CBool(checkbox.Value) = True Then
ids.Add(CInt(row.Cells(1).Value))
End If
Next
If ids.Count = 0 Then
MessageBox.Show("Please select record to delete")
Else

For Each num As Integer In ids


Dim conn As New SqlConnection("Data Source=LAPTOP-G734VL11;Initial Catalog=Hospital;Integrated
Security=True")
Dim cmd As New SqlCommand("Delete from Patients Where PatientID = @val", conn)
cmd.Parameters.AddWithValue("@val", num)
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
Next
MessageBox.Show("Successfully deleted Record")
Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End If
End Sub

Department of computer science, The National College Basavanagudi-04 Page 32


HOSPITAL MANAGEMENT SYSTEM

Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click


Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub

End Class
DOCTOR ADD FORM:
Imports System.Data.SqlClient
Imports System.Text.RegularExpressions

Public Class Doc_add


Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click
'Go back to previous form
Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub
Dim id, chk As Integer

Dim d_name, gen, age, sal, specialisation, qualification, email, contact As String

' Function to check if the string contains only numeric characters


Function IsNumericString(input As String) As Boolean
For Each c As Char In input
If Not Char.IsDigit(c) Then
Return False
End If
Next
If input > 0 Then
Return True
Else
Return False
End If

End Function
Function IsValidEmail(email As String) As Boolean
Dim pattern As String = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
Return Regex.IsMatch(email, pattern)
End Function
Function IsValidname(email As String) As Boolean
Dim pattern As String = "^[a-zA-Z]+$"
Return Regex.IsMatch(email, pattern)
End Function
Private Sub add_doc_Click(sender As Object, e As EventArgs) Handles add_doc.Click

'Check if any field is empty


If age_txt.Text = "" Or sal_txt.Text = "" Or name_txt.Text = "" Or gender.Text = "" Or spl_cmb.Text = "" Or
qual_cmb.Text = "" Or email_txt.Text = "" Or contact_txt.Text = "" Then
MessageBox.Show("Do Not Leave any field empty")
Else
'If not, assign the values
age = age_txt.Text
sal = sal_txt.Text
d_name = name_txt.Text
gen = gender.Text

Department of computer science, The National College Basavanagudi-04 Page 33


HOSPITAL MANAGEMENT SYSTEM
specialisation = spl_cmb.Text

qualification = qual_cmb.Text
email = email_txt.Text
contact = contact_txt.Text

'Security check to prevent unwanted values


If IsNumericString(age) Then
If IsNumericString(sal) Then
If IsNumericString(contact) And contact.Length = 10 Then
If IsValidEmail(email_txt.Text) Then
If IsValidname(d_name) Then
Dim conn As New SqlConnection("Data Source=LAPTOP-G734VL11;Initial
Catalog=Hospital;Integrated Security=True")
Dim cmd As New SqlCommand("Insert Into Doctor
(DocName,Gender,Experience,EmailID,Qualification,Specialisation,ContactNumber,Salary)
Values(@name,@gen,@age,@email,@qual,@spl,@contact,@sal)", conn)
cmd.Parameters.AddWithValue("@name", d_name)
cmd.Parameters.AddWithValue("@gen", gen)
cmd.Parameters.AddWithValue("@age", age)
cmd.Parameters.AddWithValue("@spl", specialisation)
cmd.Parameters.AddWithValue("@qual", qualification)
cmd.Parameters.AddWithValue("@contact", contact)
cmd.Parameters.AddWithValue("@email", email)
cmd.Parameters.AddWithValue("@sal", sal)

conn.Open()
Dim Res As Integer = cmd.ExecuteNonQuery()
If Res > 0 Then
MessageBox.Show("Entered successfully")
Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
Me.Close()
End If
Else
MessageBox.Show("Error occured while entering values")
End If
conn.Close()
Else
MessageBox.Show("Invalid name")
End If
Else
MessageBox.Show("Invalid email")
End If
Else
'MessageBox.Show("Contact number must be all digits")
MessageBox.Show("Invalid Contact number")
End If
Else
'MessageBox.Show("Salary must be Integer")
MessageBox.Show("Invalid Salary")
End If
Else
'MessageBox.Show("Experience must be Integer and positive")
MessageBox.Show("Invalid Experience")
End If
End If
End Sub
End Class

Department of computer science, The National College Basavanagudi-04 Page 34


HOSPITAL MANAGEMENT SYSTEM

DOCTOR VIEW FORM:


Public Class Doc_view
Private Sub Doc_view_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'HospitalDataSet.Doctor' table. You can move, or remove it, as
needed.
Me.DoctorTableAdapter.Fill(Me.HospitalDataSet.Doctor)
'TODO: This line of code loads data into the 'HospitalDataSet.Doctor' table. You can move, or remove it, as
needed.
Me.DoctorTableAdapter.Fill(Me.HospitalDataSet.Doctor)
'TODO: This line of code loads data into the 'HospitalDataSet.Doctor' table. You can move, or remove it, as
needed.
Me.DoctorTableAdapter.Fill(Me.HospitalDataSet.Doctor)
'TODO: This line of code loads data into the 'HospitalDataSet1.Doctor' table. You can move, or remove it,
as needed.
Me.DoctorTableAdapter.Fill(Me.HospitalDataSet.Doctor)

End Sub

Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click


Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub
End Class

DOCTOR UPDATE FORM:


Imports System.Data.SqlClient
Imports System.Text.RegularExpressions

Public Class Doc_update


Private Sub Doc_update_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'HospitalDataSet.Doctor' table. You can move, or remove it, as
needed.
Me.DoctorTableAdapter.Fill(Me.HospitalDataSet.Doctor)

End Sub
Dim id As Integer
Private Sub DataGridView1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles
DataGridView1.CellContentClick
'Get values form table
If e.ColumnIndex = 0 AndAlso e.RowIndex >= 0 Then
id = DataGridView1.Rows(e.RowIndex).Cells(1).Value
name_txt.Text = DataGridView1.Rows(e.RowIndex).Cells(2).Value
gender.Text = DataGridView1.Rows(e.RowIndex).Cells(3).Value
spl_cmb.Text = DataGridView1.Rows(e.RowIndex).Cells(4).Value
qual_cmb.Text = DataGridView1.Rows(e.RowIndex).Cells(5).Value
age_txt.Text = DataGridView1.Rows(e.RowIndex).Cells(6).Value
contact_txt.Text = DataGridView1.Rows(e.RowIndex).Cells(7).Value
email_txt.Text = DataGridView1.Rows(e.RowIndex).Cells(8).Value
sal_txt.Text = DataGridView1.Rows(e.RowIndex).Cells(9).Value
End If

Department of computer science, The National College Basavanagudi-04 Page 35


HOSPITAL MANAGEMENT SYSTEM
End Sub

Function IsNumericString(input As String) As Boolean


For Each c As Char In input
If Not Char.IsDigit(c) Then
Return False
End If
Next
If input > 0 Then
Return True
Else
Return False
End If

End Function
Function IsValidEmail(email As String) As Boolean
Dim pattern As String = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
Return Regex.IsMatch(email, pattern)
End Function
Private Sub updt_btn_Click(sender As Object, e As EventArgs) Handles updt_btn.Click
Dim chk As Integer
'Security check
If gender.Text = "Male" Or gender.Text = "Female" Or gender.Text = "Others" Then
If IsNumericString(age_txt.Text) Then
If IsNumericString(contact_txt.Text) And contact_txt.Text.Length = 10 Then
If IsNumericString(sal_txt.Text) Then
If IsValidEmail(email_txt.Text) Then
'Esatblish Connection
Dim conn As New SqlConnection("Data Source=LAPTOP-G734VL11;Initial
Catalog=Hospital;Integrated Security=True")
Dim cmd As New SqlCommand("UPDATE Doctor SET DocName = @name, Gender = @gen,
Experience = @age ,Specialisation = @spl,Qualification = @qual, ContactNumber = @contact, EmailID =
@email,Salary = @sal Where DocID = @id", conn)
cmd.Parameters.AddWithValue("@id", id)
cmd.Parameters.AddWithValue("@name", name_txt.Text)
cmd.Parameters.AddWithValue("@gen", gender.Text)
cmd.Parameters.AddWithValue("@age", age_txt.Text)
cmd.Parameters.AddWithValue("@spl", spl_cmb.Text)
cmd.Parameters.AddWithValue("@qual", qual_cmb.Text)
cmd.Parameters.AddWithValue("@contact", contact_txt.Text)
cmd.Parameters.AddWithValue("@email", email_txt.Text)
cmd.Parameters.AddWithValue("@sal", sal_txt.Text)

conn.Open()
Dim Res As Integer = cmd.ExecuteNonQuery()
If Res > 0 Then
MessageBox.Show("Entered successfully")
Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
Me.Close()
End If
Else
MessageBox.Show("Error occured while entering values")
End If
conn.Close()
Else
MessageBox.Show("Invalid email")
End If
Else
MessageBox.Show("Salary must be Integer")
End If

Department of computer science, The National College Basavanagudi-04 Page 36


HOSPITAL MANAGEMENT SYSTEM
Else
MessageBox.Show("Contact Number must be 10 digits!!!")
End If
Else
MessageBox.Show("Experience must be Integer")
End If
Else
MessageBox.Show("gender must be either 'M' or 'F'")
End If
End Sub

Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click


'Go to previous form
Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub
End class

DOCTOR DELETE FORM:


Imports System.Data.SqlClient

Public Class Doc_del


Private Sub Doc_del_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'HospitalDataSet1.Doctor' table. You can move, or remove it,
as needed.
Me.DoctorTableAdapter.Fill(Me.HospitalDataSet.Doctor)

End Sub

Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click


'Go back to previous form
Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub

Private Sub del_rec_Click(sender As Object, e As EventArgs) Handles del_rec.Click


'Get all the rows to be deleted from the table
Dim ids As New List(Of Integer)
For Each row As DataGridViewRow In DataGridView1.Rows
Dim checkbox As DataGridViewCheckBoxCell = CType(row.Cells(0), DataGridViewCheckBoxCell)
If CBool(checkbox.Value) = True Then
ids.Add(CInt(row.Cells(1).Value))
End If
Next

'Mkae sure some row is being deleted


If ids.Count = 0 Then
MessageBox.Show("Please select record to delete")
Else
For Each num As Integer In ids
Dim conn As New SqlConnection("Data Source=LAPTOP-G734VL11;Initial Catalog=Hospital;Integrated
Security=True")
Dim cmd As New SqlCommand("Delete from Doctor Where DocID = @val", conn)
cmd.Parameters.AddWithValue("@val", num)
conn.Open()

Department of computer science, The National College Basavanagudi-04 Page 37


HOSPITAL MANAGEMENT SYSTEM
'Dim schemaTable As DataTable = conn.GetSchema("Columns", New String() {Nothing, Nothing,
"Patients"})
'For Each row As DataRow In schemaTable.Rows
'Dim columnName As String = row("COLUMN_NAME").ToString()
'Next
cmd.ExecuteNonQuery()
conn.Close()
Next
MessageBox.Show("Successfully deleted Record")
Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End If
End Sub
End Class
APPOINTMENT ADD FORM:
Imports System.Collections.ObjectModel
Imports System.Data.SqlClient
Imports Hospital_Management.HospitalDataSet

Public Class appt_add


Private Sub appt_add_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim conn As New SqlConnection("Data Source=LAPTOP-G734VL11;Initial Catalog=Hospital;Integrated
Security=True")
'SQL Comamnd to be executed
Dim cmd1 As New SqlCommand("select * from Patients where PatientID not in (select PntID from
Appointments where Status = 'Pending')", conn)
Dim cmd2 As New SqlCommand("select * from Doctor where DocID not in (select DOCID from
Appointments where Status = 'Pending')", conn)
conn.Open()
Dim DocDataTable As New DataTable
Dim PntDataTable As New DataTable
Dim adapter_pnt As New SqlDataAdapter(cmd1)
Dim adapter_doc As New SqlDataAdapter(cmd2)
adapter_pnt.Fill(PntDataTable)
adapter_doc.Fill(DocDataTable)

DataGridView1.DataSource = PntDataTable
DataGridView2.DataSource = DocDataTable
'TODO: This line of code loads data into the 'HospitalDataSet.Doctor' table. You can move, or remove it, as
needed.
Me.DoctorTableAdapter.Fill(Me.HospitalDataSet.Doctor)
'TODO: This line of code loads data into the 'HospitalDataSet.Patients' table. You can move, or remove it,
as needed.
Me.PatientsTableAdapter.Fill(Me.HospitalDataSet.Patients)

End Sub
Dim pntid, docid As Integer
Dim status As String
Dim time As Date

Private Sub DataGridView2_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles


DataGridView2.CellContentClick
'Get the docID from the table
If e.ColumnIndex = 0 AndAlso e.RowIndex >= 0 Then
docid = DataGridView2.Rows(e.RowIndex).Cells(1).Value
End If
DocID_txt.Text = docid
End Sub

Private Sub Add_apt_Click(sender As Object, e As EventArgs) Handles Add_apt.Click


status = "Pending"

Department of computer science, The National College Basavanagudi-04 Page 38


HOSPITAL MANAGEMENT SYSTEM
time = appmt_time.Value
If DocID_txt.Text = "" Or PntID_txt.Text = "" Then
MessageBox.Show("Please select doctor and patient")
Else

'Make SQL connection


Dim conn As New SqlConnection("Data Source=LAPTOP-G734VL11;Initial Catalog=Hospital;Integrated
Security=True")
'SQL Comamnd to be executed
Dim cmd As New SqlCommand("Insert into Appointments (PntID,DocID,AppointmentTime,Status)
values(@pntid,@docid,@time,@status)", conn)
'Pass the values to the SQL Command
cmd.Parameters.AddWithValue("@pntid", pntid)
cmd.Parameters.AddWithValue("@docid", docid)
cmd.Parameters.AddWithValue("@time", time)
cmd.Parameters.AddWithValue("@status", status)
'Open the connection
conn.Open()
'Execute Command
Dim res As Integer = cmd.ExecuteNonQuery()
'Check if the query was executed succesfully. If it was not, the result will be 0. If it was executed
succesfully the result is 0
If res > 0 Then
Dim home As New Home
home.Show()
Me.Close()
End If
conn.Close()
End If
End Sub

Private Sub appmt_time_ValueChanged(sender As Object, e As EventArgs) Handles


appmt_time.ValueChanged
'Set time
time = appmt_time.Value
End Sub

Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click


Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub

Private Sub DataGridView1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles


DataGridView1.CellContentClick
'Get the patientID from the table
If e.ColumnIndex = 0 AndAlso e.RowIndex >= 0 Then
pntid = DataGridView1.Rows(e.RowIndex).Cells(1).Value
End If
PntID_txt.Text = pntid
End Sub
End Class

Department of computer science, The National College Basavanagudi-04 Page 39


HOSPITAL MANAGEMENT SYSTEM

APPOINTMENT VIEW FORM:


Public Class View_appt
Private Sub View_appt_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'HospitalDataSet.Appointments' table. You can move, or
remove it, as needed.
Me.AppointmentsTableAdapter.Fill(Me.HospitalDataSet.Appointments)

End Sub

Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click


Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub
End Class
APPOINTMENT DELETE FORM:
Imports System.Data.SqlClient

Public Class appt_del


Dim ids As New List(Of Integer)
Private Sub appt_del_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim dataView As New DataView(Me.HospitalDataSet.Appointments)

' Set the RowFilter to show only the records where the specific column matches the condition.
dataView.RowFilter = "Status = 'Pending'"

' Set the filtered DataView as the DataSource for the DataGridView.
DataGridView1.DataSource = dataView
Me.AppointmentsTableAdapter.Fill(Me.HospitalDataSet.Appointments)

End Sub

Private Sub bck_btn_Click(sender As Object, e As EventArgs) Handles bck_btn.Click


Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
End Sub

Private Sub del_rec_Click(sender As Object, e As EventArgs) Handles del_rec.Click


For Each row As DataGridViewRow In DataGridView1.Rows
Dim checkbox As DataGridViewCheckBoxCell = CType(row.Cells(0), DataGridViewCheckBoxCell)
If CBool(checkbox.Value) = True Then
'MessageBox.Show(CInt(row.Cells(1).Value))
ids.Add(CInt(row.Cells(1).Value))
End If
Next

'Make sure some row is being deleted


If ids.Count > 0 Then

Department of computer science, The National College Basavanagudi-04 Page 40


HOSPITAL MANAGEMENT SYSTEM
For Each num As Integer In ids
Dim conn As New SqlConnection("Data Source=LAPTOP-G734VL11;Initial Catalog=Hospital;Integrated
Security=True")
Dim cmd As New SqlCommand("Update Appointments set status = 'completed' Where AptID = @val",
conn)
cmd.Parameters.AddWithValue("@val", num)
conn.Open()
cmd.ExecuteNonQuery()

conn.Close()
Next
MessageBox.Show("Successfully updated Records")
Dim previousform As Form = Application.OpenForms.OfType(Of Home)().FirstOrDefault()
If previousform IsNot Nothing Then
previousform.Show()
End If
Me.Close()
Else
MessageBox.Show("Please setect an appointment to close")
End If
End Sub

End Class

Department of computer science, The National College Basavanagudi-04 Page 41


HOSPITAL MANAGEMENT SYSTEM

Department of computer science, The National College Basavanagudi-04 Page 42

You might also like