0% found this document useful (0 votes)
11 views75 pages

VB Project File

The project report details the development of a Blood Donation Management System (BDMS) aimed at efficiently managing blood donation processes, connecting donors, recipients, hospitals, and blood banks. It outlines the system's requirements, design, and features, including user authentication, donor management, blood inventory tracking, and integration with hospitals. The report also includes acknowledgments, a declaration of originality, and a comprehensive index of the project's chapters.

Uploaded by

Frustrated World
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)
11 views75 pages

VB Project File

The project report details the development of a Blood Donation Management System (BDMS) aimed at efficiently managing blood donation processes, connecting donors, recipients, hospitals, and blood banks. It outlines the system's requirements, design, and features, including user authentication, donor management, blood inventory tracking, and integration with hospitals. The report also includes acknowledgments, a declaration of originality, and a comprehensive index of the project's chapters.

Uploaded by

Frustrated World
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/ 75

PROJECT REPORT

ON
BLOOD DONATION SYSTEM
SUBMITTED TO

G.H.G. KHALSA COLLEGE, GURUSAR SADHAR


In the partial fulfilment of Degree of BCA

SUBMITTED BY
VISHAL KUMAR
BCA – 6th Semester
2024-25

PANJAB UNIVERSITY CHANDIGARH


DECLARATION
I declare that this written submission represents my ideas in my own words, and
where others’ ideas or words have been included, I have adequately cited and
referenced the original sources. I also declare that I have adhered to all principles
of academic honesty and integrity and have not misrepresented or fabricated or
falsified any idea/data/fact/source in my submission. I understand that any
violation of the above will be a cause for disciplinary action by the Institute and
can evoke penal action from the sources that have thus not been properly cited, or
from whom proper permission has not been taken when needed.

VISHAL KUMAR
ACKNOWLEDGEMENT
I take this opportunity to express my acknowledgement and a deep sense of gratitude for
rendering valuable assistance and guidance to me by the following personality for the successful
completion of my project.
We express our heartfelt gratitude to the Principal Prof. Inderjeet Singh, G.H.G Khalsa College
GurusarSadhar, and the management for providing the needed infrastructure. We wish to express
our deep sense of gratitude to Our Guide Miss Gurpreet kaur and HOD Prof. Tarsem Singh for
their able guidance and useful suggestions, which helped us in completing the project work, in
time. Finally, yet importantly, we would like to express our heartfelt thanks to our beloved
parents for their blessings, friends/classmates for their help, and wishes for the successful
completion of this project.
We thank all these people fervently as these were the leaders and we simply followed them.

VISHAL KUMAR
BCA – 6th Semester
22048577
CERTIFICATE

This is to certify that the project entitled BLOOD DONATION SYSTEM has been submitted
for the fulfillment of the requirement of the degree of Bachelors of Computer Applications of
Panjab University, Chandigarh. This project is bona fide work of VISHAL KUMAR no part of it
has been submitted for any other Degree.

HEAD OF DEPARTMENT MENTOR


Prof. Tarsem Singh MISS GURPREET KAUR
Computer Science and Applications Computer Science and Applications

MENTOR
MISS GURPREET KAUR
Computer Science and Applications
INDEX OF PROJECT

SR.NO TITLE PAGE.NO


1 CHAPTER 1 (Introduction)

1.1 Introduction to Visual Studio.NET 1


1.2 Introduction to .NET Framework
1.3 Features of .NET Framework
1.4Window Applications

2 Chapter 2 (Introduction about Project)


2.1 About project 8

3 Chapter 3 (System Requirements and Specification


3.1 Definition 9
3.2 Hardware and Software Requirements 10

4 Chapter 4 (System Design)


4.1 Definition 11
4.2 Data Flow Diagram(DFD) 12
4.3 Entity-Relation Diagram(ER) 13

5 Chapter 5 (Source Code)


5.1 Source of Project 14 – 55

6 Chapter 6 (Testing and Implementation)


6.1 Testing Definition and Importance 56
6.2 Testing Report 57-60

7 Chapter 7 (System Implementation)


7.1 Definition of Implementation of System
7.2 Deployment of Project

8 Chapter 8 (Output and Future scope )


8.1 Output Screenshots
8.2 Future Scope
8.3 Bibliography
CHAPTER 1

INTRODUCTON TO VISUAL STUDIO.NET

Visual Studio.NET

VISUAL STUDIO.NET is an IDE (Integrated development Environment). This is basically


designed to make software development easy. Visual Studio.NET comes with .NET framework,
which provides an environment for creating console, windows, and web based applications. It
supports all .NET compliant languages.

It is very popular IDE for .NET. It provides Intelligence that means developer does not require
remembering methods and member of class.They can get all information like methods, properties
etc regarding any class or object by typing dot (.) after the class, object or related
thing.Consider the following image of Visual Studio .net
Introduction to .NET Framework

It is a virtual machine that provide a common platform to run an application that was built using
the different language such as C#, VB.NET, Visual Basic, etc. It is also used to create a form
based, console-based, mobile and web-based application or services that are available in
Microsoft environment. Furthermore, the .NET framework is a pure object oriented, that similar
to the Java language. But it is not a platform independent as the Java. So, its application runs
only to the windows platform.

The main objective of this framework is to develop an application that can run on
the windows platform. The current version of the .Net framework is 4.8.

Note: The .NET Framework is not only a language, but it is also a software and language
Features of .NET Framework

1. Language Interoperability: Language Interoperability means code written in any


language can be used by other languages and there is an access provided to COM
components in the System. In other words, this is the ability of code to interact with
code which is written using a different programming language. It can help to maximize
code reusability and therefore improve the efficiency of the development process.

2. Portable: The .NET Framework provides a common platform to write portable


programs using different languages of .NET environment, based on open Internet
standards which allow different devices, software’s and applications to work together
across a wide and dispersed network of networks.

3. Type Safety: During program execution, the type checker ensures that all objects and
values, and the references to those objects and values, have a valid type. For example,
the type checker ensures that only an integer value is assigned to an integer variable.
The type checker also ensures that only valid operations are performed on the objects or
values.

4. Managed Multithreading Support: Applications running in the CLR can utilize the
managed multithreading support. Multithreading requires careful programming For most
tasks, you can reduce complexity by queuing requests for execution by thread pool .

5. Performance: Its CLR environment promotes safe execution of code, eliminates


performance bottlenecks through its garbage collector, minimizes software
development conflicts through namespaces and avoids versioning conflicts through
assembly manifest.

6. Side by Side Execution: The NET Framework allows you to deploy multiple versions
of an application on a system by using assemblies. Assemblies are the deployment units
in the NET Framework. An assembly contains the IL code and metadata. The metadata
contains information such as the version of the other assemblies on which the assembly
depends. The Common Language Runtime uses the version lo information in the
metadata to determine application dependencies and enables you to execute multiple
versions of an application side-by-side.
Window Application

Creating a Windows application in .NET typically involves using the Windows Forms or WPF
(Windows Presentation Foundation) frameworks. Here's a basic guide on how to create a simple
Windows application using Windows Forms in .NET:

1. Open Visual Studio: If you don't have Visual Studio installed, you can download it from the
official Microsoft website. Open Visual Studio to create a new project.
2. Create a new project: Go to File > New > Project. In the New Project dialog, select "Windows
Forms App (.NET Framework)" or "Windows Forms App (.NET Core)" depending on your
preference. Give your project a name and click "Create."
3. Design the User Interface: Once your project is created, you'll see the Form designer where you
can design your application's user interface. Drag and drop controls such as buttons, labels, text
boxes, etc., from the Toolbox onto the Form to design your UI.
4. Write code for event handling: Double-click on any control to generate a default event handler
for it (e.g., a click event for a button). Write the necessary code within these event handlers to
define the behavior of your application.
5. Build and Run: Once you've designed your UI and written the necessary code, you can build
your project by pressing Ctrl+Shift+B or by going to Build > Build Solution. After a successful
build, you can run your application by pressing F5 or by clicking the Start button in the toolbar.

Conclusion

That's it! You've created a simple Windows Forms Application with .NET. With this
fundamental knowledge, you can start building more complex applications. If you need
to hire .NET remote developers, don't hesitate to contact Reintech!
ABOUT PROJECT

BLOOD DONATION PROJECT

The Blood Donation Management System (BDMS) is a web or mobile-based application


designed to manage the process of blood donation and transfusion efficiently. It acts as a bridge
between donors, recipients, hospitals, and blood banks, streamlining requests, registrations,
and tracking.

1. User Authentication & Roles

 Login/Registration (Donor, Recipient, Admin, Hospital Staff)


 Role-based access control

2. Donor Management

 Donor registration
 Health screening input
 Donation eligibility tracking
 Donation history log

3. Recipient Management

 Request blood based on blood type and urgency


 View availability
 Assign donor or refer to nearest blood bank

4. Blood Inventory Management

 Track available blood units by type


 Blood expiry management
 Stock levels per location (hospital/blood bank)

5. Blood Request Module

 Blood request creation and tracking


 Matching logic for blood compatibility
 Notifications to potential donors

6. Hospital/Blood Bank Integration

 Register hospitals/blood banks


 Allow them to update inventory
 Access and process requests

7. Notification System

 SMS/Email/App push notifications


o Upcoming donation dates
o Emergency needs
o Approval/Rejection of requests

8. Search & Filter Functionality

 Search donors by blood group, location


 Filter donation history, blood availability

9. Reporting & Analytics

 Donation trends
 Stock analytics
 Donor engagement reports

10. Admin Dashboard

 Manage users, reports, and system settings


 Moderate blood requests
 Audit logs

11. Security & Data Privacy

 Encrypted data storage


 Secure authentication
 Compliance with medical data policies (like HIPAA if in US)

12. Geo-Location Feature (Optional but useful)

 Locate nearest donor/hospital/blood bank


 Distance-based search
CHAPTER 3
(SYSTEM REQUIREMENT AND SPECIFICATION)
3.1
DEFINITION -
In the context of software development using the .NET framework, system requirements and
specifications refer to the detailed description of what the software system should accomplish
and how it should behave. These requirements and specifications serve as a blueprint for the
development team, guiding them throughout the development process. Here's a breakdown of
each term:

1. System Requirements:
 System requirements outline the functionalities, constraints, and conditions that the
software system must meet to satisfy the needs of its users and stakeholders.
 These requirements are typically divided into functional and non-functional categories.
 Functional requirements describe specific features and capabilities of the system, such as
user authentication, data processing, and reporting functionalities.
 Non-functional requirements specify quality attributes such as performance, reliability,
security, usability, and scalability.
 System requirements are usually gathered through discussions with stakeholders, analysis
of business needs, and examination of existing systems or processes.
2. System Specifications:
 System specifications provide detailed documentation of the system requirements,
outlining how the system will be designed, implemented, and tested.
 Specifications include technical details, architectural diagrams, data models, user
interface designs, and other relevant information.
 They serve as a reference for developers, testers, and other team members involved in the
software development process.
 System specifications also document any external interfaces, dependencies, and
integration points that need to be considered during development.
 Additionally, they may include acceptance criteria and validation procedures to ensure
that the system meets the specified requirements.

In .NET development, system requirements and specifications are crucial for ensuring that the
developed software meets the needs of its users and stakeholders while adhering to industry best
practices and standards. These documents evolve throughout the software development lifecycle,
from initial planning and requirements gathering to design, implementation, testing, and
deployment. Effective communication and collaboration among project stakeholders are essential
for creating and maintaining accurate and comprehensive system requirements and
specifications.
3.2HARDWARE & SOFTWARE REQUIREMENT

HARDWARE REQUIREMENTS

 Minimum processor Pentium 4 or above


 Minimum RAM: 256 MB
 Minimum HardDisk: 1GB
 Input Device: keyboard , Mouse
 Output Device: Monitor
 Operating System: WINDOW 7

SOFTWARE REQUIREMENTS

Visual Studio 2012 or above

DATABASE USED
MySQL (XAMPP Apache Server)
CHAPTER 4
(SYSTEM DESIGN)

DEFINITION -
The Blood Donation Management Project is a software-based system designed to efficiently
manage and streamline the process of blood donation, storage, and distribution. It acts as a digital
platform that connects blood donors, recipients, hospitals, and blood banks, allowing for real-
time data tracking, blood request management, donor eligibility monitoring, and inventory
control.

1. Patient Registration Module

This module allows patients to register themselves or be registered by hospital staff. It stores
essential information like:

 Patient name, age, gender, and contact info


 Blood group and medical condition
 Required blood type and urgency level

📌 Purpose: To maintain a database of patients who need blood and to enable quick matching
with available donors or blood stock.

🔹 2. Donor Adding System

This system is used to register new donors and manage their details, including:

 Personal information (name, age, gender, contact)


 Blood group
 Health status (eligibility to donate)
 Donation history and next possible donation date

📌 Purpose: To build and maintain a network of reliable and eligible blood donors.

🔹 3. Patient Adding System

This feature allows hospital staff or administrators to manually add patients into the system in
cases where the patient cannot self-register.
📌 Purpose: To quickly log patient details during emergencies and match them with blood donors
or available blood stock.

🔹 4. Blood Transfer Page

This page/module handles the process of transferring blood units from:

 Donor to patient
 Blood bank to hospital or patient

It logs details like:

 Blood type transferred


 Donor and patient IDs
 Date and quantity
 Transfer location

📌 Purpose: To track the movement of each blood unit and ensure proper documentation for
safety and auditing.

🔹 5. Blood Stock Management

This module maintains real-time data on the blood inventory available in hospitals and blood
banks. It includes:

 Quantity of each blood type (A+, A-, B+, etc.)


 Expiry dates of stored units
 Stock levels by location

📌 Purpose: To monitor and manage blood availability, prevent shortages, and reduce waste due
to expired blood.
4.2 DFD FLOW DIAGRAM (DFD)

DONOR LIST

DONOR ADDING
SYSYEM
Patient
ADDING
SYSTEM
LOGIN PAGE

BLOOD
STOCK

BLOOD TRANSFER PATIENT LIST


SYSTEM

DFD (DATA FLOW DIAGRAM) of BLOOD DONATION


SYSTEM
4.3 ENTITY RELATION DIAGRAM (ER)

name age
name
id id
gender address

age
Phone no gender
DONOR
Patient
Blood type

Blood type
USERNAME PASSWORD
Phone

LOGIN
address

Donor id
DONOR Patient id
Patient name BLOOD
LIST
TRASFER

Blood group

Available or not

name
id address

BLOO
D

Add query
Save query

Update query
Delete query
CHAPTER 5 (SOURCE CODE)

5.1 Source of Project-

1. CONNECTION.VB CLASS

Imports System.Data.OleDb

Public Class connectionstr


Public Shared Function con_str()
Dim conn_str As String = "C:\Users\HP 640 G2\Desktop\navi\navi\bin\Debug\
nvydb1.mdb"
Return conn_str

End Function
End Class
Login page

Imports System.Data.OleDb
Public Class login01
Dim cmd As OleDbCommand
Dim que As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Then
MsgBox("fields are empty")
Exit Sub
End If

Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data


Source=" & connectionstr.con_str() & ";Mode=Share Deny None;")
If conn.State = ConnectionState.Closed Then
conn.Open()
End If
que = "select * from login_table where login=@login and pass=@pass"
cmd = New OleDbCommand(que, conn)
cmd.Parameters.AddWithValue("@login", TextBox1.Text)
cmd.Parameters.AddWithValue("@pass", TextBox2.Text)

Dim result As Integer = Convert.ToInt32(cmd.ExecuteScalar)


If result > 0 Then
MsgBox("logged in")
HOMEP.Show()
Me.Hide()
Else
MsgBox("invalid username and password")
End If
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


If TextBox1.Text = "" Or TextBox2.Text = "" Then
MsgBox("fields are empty")
Exit Sub
End If
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
+ connectionstr.con_str())
If conn.State = ConnectionState.Closed Then
conn.Open()
End If
que = "insert into login_table(login,pass)values(@login,@pass)"
cmd = New OleDbCommand(que, conn)
cmd.Parameters.AddWithValue("@login", TextBox1.Text)
cmd.Parameters.AddWithValue("@pass", TextBox2.Text)

If cmd.ExecuteNonQuery Then
MsgBox("signed up successfully")
TextBox1.clear()
TextBox2.clear()
End If

End Sub

End Class
HOME PAGE

Public Class HOMEP

Private Sub BunifuImageButton1_Click(sender As Object, e As EventArgs)

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs)

End Sub

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


BunifuImageButton1.Click
login01.Show()
Me.Hide()
End Sub

Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click


DONOR.Show()
Me.Hide()

End Sub

Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click


patients.Show()
Me.Hide()

End Sub

Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click


DONORSLIST.Show()
Me.Hide()

End Sub

Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click


Viewpatients.Show()
Me.Hide()

End Sub
Private Sub Label7_Click(sender As Object, e As EventArgs) Handles Label7.Click
BLOODSTOCK.Show()
Me.Hide()

End Sub

Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click


BLOOD_TRANSFER.Show()
Me.Hide()

End Sub

Private Sub Label8_Click(sender As Object, e As EventArgs)


DASHBOARD.Show()
Me.Hide()

End Sub

Private Sub BunifuImageButton2_Click(sender As Object, e As EventArgs)

End Sub
End Class
DONOR PAGE

Imports System.Data.OleDb
Imports System.Text.RegularExpressions
Public Class DONOR
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
& connectionstr.con_str())
Dim cmd As OleDbCommand
Dim que As String
' Regular Expression to validate Phone number, it check if phone number contains digits from
0-9 and must be of 10 digits.
Dim numValidation As Regex = New Regex("^[\d]{10}$")
' Regular Expression to validate Date of Birth and Date of Joining, it check Date contain digits
from 0-9 and - or / in dd-mm-yyy or dd/mm/yyyy format
Dim dateValidation As Regex = New Regex("^[\d]{2}[/-]{1}[\d]{2}[/-]{1}[\d]{4}$")
' It checks for Doctor ID is of Integer type only.
Dim idValidation As Regex = New Regex("^[\d]+$")
' It Check for Gender, Gender must be Male or Female only.
Dim genderValidation As Regex = New Regex("^(Male|Female)$")

Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click


patients.Show()
Me.Hide()

End Sub

Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click


Viewpatients.Show()
Me.Hide()

End Sub

Private Sub Label7_Click(sender As Object, e As EventArgs) Handles Label7.Click


BLOODSTOCK.Show()
Me.Hide()

End Sub

Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click


BLOOD_TRANSFER.Show()
Me.Hide()
End Sub

Private Sub Label8_Click(sender As Object, e As EventArgs)


DASHBOARD.Show()
Me.Hide()

End Sub

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


BunifuImageButton1.Click
HOMEP.Show()
Me.Hide()
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button5.Click


If dnametb.Text = "" Or dagetb.Text = "" Or dbloodtb.Text = "" Or daddresstb.Text = "" Or
dphonetb.Text = "" Then
MsgBox("Fields Are Empty")
Exit Sub

End If
' Check connection, if connection is closed then open it.
If conn.State = ConnectionState.Closed Then
conn.Open()
' Query to insert new Donor record
que = "insert into
donor_table(did,name,age,bloodtype,phoneno,gender,address)values(@didtb,@dnametb,@daget
b,@dbloodtb,@dphonetb,@dgendertb,@daddresstb)"
cmd = New OleDbCommand(que, conn)
cmd.Parameters.AddWithValue("@didtb", didtb.Text)
cmd.Parameters.AddWithValue("@nametb", dnametb.Text)
cmd.Parameters.AddWithValue("@agetb", dagetb.Text)
cmd.Parameters.AddWithValue("@bloodtb", dbloodtb.Text)
cmd.Parameters.AddWithValue("@phonetb", dphonetb.Text)
cmd.Parameters.AddWithValue("@gendertb", dgendertb.Text)
cmd.Parameters.AddWithValue("@addresstb", daddresstb.Text)

End If
If cmd.ExecuteNonQuery Then
MsgBox("Donor is added successfully")
Else
MsgBox("Error")

End If
End Sub

Private Sub DONOR_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click

If conn.State = ConnectionState.Closed Then


conn.Open()
End If

' Query to update Record


que = "UPDATE doctor SET Name=@dnametb, age=@dagetb, Gender=@dgendertb,
Phoneno=@dphonetb, bloodtype=@dbloodtb, address=@daddresstb WHERE donorid=@did"
cmd = New OleDbCommand(que, conn)
cmd.Parameters.AddWithValue("@id", didtb.Text)
cmd.Parameters.AddWithValue("@nametb", dnametb.Text)
cmd.Parameters.AddWithValue("@agetb", dagetb.Text)
cmd.Parameters.AddWithValue("@bloodtb", dbloodtb.Text)
cmd.Parameters.AddWithValue("@phonetb", dphonetb.Text)
cmd.Parameters.AddWithValue("@gendertb", dgendertb.Text)
cmd.Parameters.AddWithValue("@addresstb", daddresstb.Text)

If cmd.ExecuteNonQuery Then
MsgBox("Update Sucess")
Else
MsgBox("Error")
End If
End Sub

Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click


If conn.State = ConnectionState.Closed Then
conn.Open()
End If

' Query used to Delete Record


que = "DELETE FROM doctor WHERE doctorid=@dc_id"
cmd = New OleDbCommand(que, conn)
cmd.Parameters.AddWithValue("@id", didtb.Text)

If cmd.ExecuteNonQuery Then
MsgBox("Delete Sucess")
didtb.Text = vbNullString
Else
MsgBox("Error")
End If
End Sub

' Function for Validation of different textboxes


Private Function validate_fields()
' check for all textboxes if thery are empty or not. if any textbox i empty it display message
If didtb.Text = "" Or dnametb.Text = "" Or dagetb.Text = "" Or dgendertb.Text = "" Or
dphonetb.Text = "" Or daddresstb.Text = "" Or dbloodtb.Text = "" Then
MsgBox("All fields are compulsory", MsgBoxStyle.Critical)
Return False
End If

' Validate Phone Number


' IsMatch function is used to Math Regular Expresion with the textBox Value, if TextBox
value is not correct according to regular expression then it shows error
If Not numValidation.IsMatch(dphonetb.Text) Then
MsgBox("Phone number must be of 10 [0-9] digits", MsgBoxStyle.Critical)
Return False
End If

' Validate Doctor ID


If Not idValidation.IsMatch(dphonetb.Text) Then
MsgBox("Doctor ID must be of Integer Type [0-9]", MsgBoxStyle.Critical)
Return False
End If

' Validate Gender


If Not genderValidation.IsMatch(dgendertb.Text) Then
MsgBox("Gender must be Male or Female", MsgBoxStyle.Critical)
Return False
End If

Return True
End Function
End Class
DONOR LIST PAGE

Imports System.Data.OleDb
Imports System.Text.RegularExpressions

Public Class DONORSLIST

Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +


connectionstr.con_str())
Dim cmd As OleDbCommand
Dim que As String
' Regular Expression to validate Phone number, it check if phone number contains digits from
0-9 and must be of 10 digits.
Dim numValidation As Regex = New Regex("^[\d]{10}$")
' Regular Expression to validate Date of Birth and Date of Joining, it check Date contain digits
from 0-9 and - or / in dd-mm-yyy or dd/mm/yyyy format
Dim dateValidation As Regex = New Regex("^[\d]{2}[/-]{1}[\d]{2}[/-]{1}[\d]{4}$")
' It checks for Doctor ID is of Integer type only.
Dim idValidation As Regex = New Regex("^[\d]+$")
' It Check for Gender, Gender must be Male or Female only.
Dim genderValidation As Regex = New Regex("^(Male|Female|Others)$")
Private Sub Form4_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try
' Open connection
conn.Open()

' SQL query to fetch donors


que = "SELECT name, Age, BloodType, phoneno, Gender, Address, did FROM
Donor_table"

' Create data adapter and fill table


Dim adapter As New OleDbDataAdapter(que, conn)
Dim dt As New DataTable()
adapter.Fill(dt)

' Bind to DataGridView


GunaDataGridView1.DataSource = dt

' Close connection


conn.Close()
Catch ex As Exception
MessageBox.Show("Error loading data: " & ex.Message)
End Try
End Sub
Private Sub Label2_Click(sender As Object, e As EventArgs)
DONOR.Show()
Me.Hide()

End Sub

Private Sub Label3_Click(sender As Object, e As EventArgs)


patients.Show()
Me.Hide()

End Sub

Private Sub Label5_Click(sender As Object, e As EventArgs)


Viewpatients.Show()
Me.Hide()

End Sub

Private Sub Label7_Click(sender As Object, e As EventArgs)


BLOODSTOCK.Show()
Me.Hide()

End Sub

Private Sub Label6_Click(sender As Object, e As EventArgs)


BLOOD_TRANSFER.Show()
Me.Hide()

End Sub

Private Sub Label8_Click(sender As Object, e As EventArgs)


DASHBOARD.Show()
Me.Hide()

End Sub

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


BunifuImageButton1.Click
HOMEP.Show()
Me.Hide()
End Sub

Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click

End Sub
Private Sub GunaDataGridView1_CellContentClick(sender As Object, e As
DataGridViewCellEventArgs) Handles GunaDataGridView1.CellContentClick

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


login01.Show()
Me.Hide()
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

End Sub

Private Sub Label2_Click_1(sender As Object, e As EventArgs) Handles Label2.Click


DONOR.Show()
Me.Hide()

End Sub

Private Sub Label3_Click_1(sender As Object, e As EventArgs) Handles Label3.Click


patients.Show()
Me.Hide()

End Sub

Private Sub Label5_Click_1(sender As Object, e As EventArgs) Handles Label5.Click


Viewpatients.Show()
Me.Hide()

End Sub

Private Sub Label6_Click_1(sender As Object, e As EventArgs) Handles Label6.Click


BLOOD_TRANSFER.Show()
Me.Hide()

End Sub

Private Sub Label7_Click_1(sender As Object, e As EventArgs) Handles Label7.Click


BLOODSTOCK.Show()
Me.Hide()

End Sub
End Class
PATIENT PAGE

Imports System.Data.OleDb
Imports System.Text.RegularExpressions
Public Class patients
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
& connectionstr.con_str())
Dim cmd As OleDbCommand
Dim que As String
Dim numValidation As Regex = New Regex("^[\d]{10}$")
Dim dateValidation As Regex = New Regex("^[\d]{2}/[\d]{2}/[\d]{4}$")
Dim idValidation As Regex = New Regex("^[\d]+$")
Dim genderValidation As Regex = New Regex("^(Male|Female)$")

Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click


DONOR.Show()
Me.Hide()

End Sub

Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click


DONORSLIST.Show()
Me.Hide()

End Sub

Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click


Viewpatients.Show()
Me.Hide()

End Sub

Private Sub Label7_Click(sender As Object, e As EventArgs) Handles Label7.Click


BLOODSTOCK.Show()
Me.Hide()

End Sub

Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click


BLOOD_TRANSFER.Show()
Me.Hide()

End Sub

Private Sub Label8_Click(sender As Object, e As EventArgs)


DASHBOARD.Show()
Me.Hide()

End Sub

Private Sub Label12_Click(sender As Object, e As EventArgs) Handles Label12.Click

End Sub

Private Sub BunifuMaterialTextbox2_OnValueChanged(sender As Object, e As EventArgs)

End Sub

Private Sub Label14_Click(sender As Object, e As EventArgs) Handles Label14.Click

End Sub

Private Sub Label16_Click(sender As Object, e As EventArgs) Handles Label16.Click

End Sub

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


BunifuImageButton1.Click
HOMEP.Show()
Me.Hide()

End Sub

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


pgendertb.SelectedIndexChanged

End Sub

Private Sub patients_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

Private Sub BunifuMaterialTextbox3_OnValueChanged(sender As Object, e As EventArgs)

End Sub

Private Sub Panel2_Paint(sender As Object, e As PaintEventArgs) Handles Panel2.Paint

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button5.Click


If pidtb.Text = "" Or pnametb.Text = "" Or pagetb.Text = "" Or pbloodtb.Text = "" Or
paddresstb.Text = "" Or pphonetb.Text = "" Then
MsgBox("Fields Are Empty")
Exit Sub

End If
Dim conn As New OleDbConnection(My.Settings.nvydb1ConnectionString)
If conn.State = ConnectionState.Closed Then
conn.Open()
que = "insert into
paitent_table(pid,name,age,bloodtype,phoneno,gender,address)values(@pidtb,@pnametb,@page
tb,@pbloodtb,@pphonetb,@pgendertb,@paddresstb)"
cmd = New OleDbCommand(que, conn)
cmd.Parameters.AddWithValue("pidtb", pidtb.Text)
cmd.Parameters.AddWithValue("@pnametb", pnametb.Text)
cmd.Parameters.AddWithValue("@pagetb", pagetb.Text)
cmd.Parameters.AddWithValue("@pbloodtb", pbloodtb.Text)
cmd.Parameters.AddWithValue("@pphonetb", pphonetb.Text)
cmd.Parameters.AddWithValue("@pgendertb", pgendertb.Text)
cmd.Parameters.AddWithValue("@paddresstb", paddresstb.Text)

End If
If cmd.ExecuteNonQuery Then
MsgBox("Patient is added successfully")
Else
MsgBox("Error")
End If

End Sub

Private Sub PictureBox1_Click(sender As Object, e As EventArgs)

End Sub

Private Sub Label11_Click(sender As Object, e As EventArgs) Handles Label11.Click

End Sub

Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click

If conn.State = ConnectionState.Closed Then


conn.Open()
End If
' Query to update Record
que = "UPDATE doctor SET Name=@pnametb, age=@pagetb, Gender=@pgendertb,
Phoneno=@pphonetb, bloodtype=@pbloodtb, address=@paddresstb WHERE patientid=@pid"
cmd = New OleDbCommand(que, conn)
cmd.Parameters.AddWithValue("@id", pidtb.Text)
cmd.Parameters.AddWithValue("@nametb", pnametb.Text)
cmd.Parameters.AddWithValue("@agetb", pagetb.Text)
cmd.Parameters.AddWithValue("@bloodtb", pbloodtb.Text)
cmd.Parameters.AddWithValue("@phonetb", pphonetb.Text)
cmd.Parameters.AddWithValue("@gendertb", pgendertb.Text)
cmd.Parameters.AddWithValue("@addresstb", paddresstb.Text)

If cmd.ExecuteNonQuery Then

Else
MsgBox("Error")
End If
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


If conn.State = ConnectionState.Closed Then
conn.Open()
End If

' Query used to Delete Record


que = "DELETE FROM doctor WHERE doctorid=@dc_id"
cmd = New OleDbCommand(que, conn)
cmd.Parameters.AddWithValue("@id", pidtb.Text)

If cmd.ExecuteNonQuery Then
MsgBox("Delete Sucess")
Else
MsgBox("Error")
End If
End Sub

' Function for Validation of different textboxes


Private Function validate_fields()
' check for all textboxes if thery are empty or not. if any textbox i empty it display message
If pidtb.Text = "" Or pnametb.Text = "" Or pagetb.Text = "" Or pgendertb.Text = "" Or
pphonetb.Text = "" Or paddresstb.Text = "" Or pbloodtb.Text = "" Then
MsgBox("All fields are compulsory", MsgBoxStyle.Critical)
Return False
End If

' Validate Phone Number


' IsMatch function is used to Math Regular Expresion with the textBox Value, if TextBox
value is not correct according to regular expression then it shows error
If Not numValidation.IsMatch(pphonetb.Text) Then
MsgBox("Phone number must be of 10 [0-9] digits", MsgBoxStyle.Critical)
Return False
End If

' Validate Doctor ID


If Not idValidation.IsMatch(pphonetb.Text) Then
MsgBox("Doctor ID must be of Integer Type [0-9]", MsgBoxStyle.Critical)
Return False
End If

' Validate Gender


If Not genderValidation.IsMatch(pgendertb.Text) Then
MsgBox("Gender must be Male or Female", MsgBoxStyle.Critical)
Return False
End If

Return True
End Function
End Class
VIEW PATIENTS PAGE

ImportsMySql.Data.MySqlClient

PublicClassview
Dim con AsMySqlConnection = connection.con
Dim com AsMySqlCommand
DimcmdAsObject

PrivateSub Button2_Click(sender AsObject, e AsEventArgs) Handles Button2.Click


doctor.Show()
Me.Hide()

EndSub

PrivateSubview_Load(sender AsObject, e AsEventArgs) HandlesMyBase.Load


Ifcon.State = ConnectionState.ClosedThen
con.Open()
EndIf
EndSub

PrivateSub Button1_Click(sender AsObject, e AsEventArgs) Handles Button1.Click


Ifcon.State = ConnectionState.ClosedThen
con.Open()
EndIf

Dim table AsNewDataTable("doctor")


table.Columns.Add("DOCTOR_ID")
table.Columns.Add("NAME")
table.Columns.Add("DATE OF BIRTH")
table.Columns.Add("GENDER")
table.Columns.Add("BLOOD GROUP")
table.Columns.Add("QUALIFICATION")
table.Columns.Add("JOIN DATE")
table.Columns.Add("SALARY")

table.Columns.Add("ADDRESS")
table.Columns.Add("CITY")

table.Columns.Add("USERTYPE")

cmd = "SELECT * FROM adddoctor_info WHERE Doctor_id=@id"


com = NewMySqlCommand(cmd, con)
com.Parameters.AddWithValue("id", Convert.ToInt32(TextBox1.Text))

Dim count AsInteger = Convert.ToInt32(com.ExecuteScalar())

If count > 0 Then


Dim row AsString()
Dim result AsObject = com.ExecuteReader

result.Read()
row = NewString() {result.Item(0), result.Item(2), result.Item(3), result.Item(4),
result.Item(5), result.Item(6), result.Item(7), result.Item(8), result.Item(9), result.Item(10),
result.Item(11)}
table.Rows.Add(row)

Else
MsgBox("No Record Found")
EndIf

DataGridView1.DataSource = table
EndSub

EndClass
PATIENT PAGE
ImportsMySql.Data.MySqlClient

PublicClasspatient
Dim con AsMySqlConnection = connection.con
Dim com AsMySqlCommand
DimcmdAsObject

PrivateSubpatient_Load(sender AsObject, e AsEventArgs) HandlesMyBase.Load

Ifcon.State = ConnectionState.ClosedThen
con.Open()
EndIf

EndSub

PrivateSub Button1_Click(sender AsObject, e AsEventArgs) Handles Button1.Click


addpatient.Show()
Me.Hide()

EndSub

PrivateSub Button5_Click_1(sender AsObject, e AsEventArgs) Handles Button5.Click


discharge.Show()
Me.Hide()

EndSub

PrivateSub Button4_Click(sender AsObject, e AsEventArgs) Handles Button4.Click


updatepatient.Show()
Me.Hide()

EndSub

PrivateSub TextBox1_TextChanged(sender AsObject, e AsEventArgs) Handles


TextBox1.TextChanged
Ifcon.State = ConnectionState.ClosedThen
con.Open()
EndIf
cmd = "SELECT * FROM addpatient_info WHERE INPATIENT_ID=@id"
com = NewMySqlCommand(cmd, con)
com.Parameters.AddWithValue("id", TextBox1.Text)

Dim status AsInteger = Convert.ToInt32(com.ExecuteScalar)

If (status > 0) Then

Dim res AsObject = com.ExecuteReader


res.read()

TextBox3.Text = res.Item(2)
TextBox2.Text = res.Item(3)
Ifres.Item(4) = "Male"Then
RadioButton2.Checked = True
RadioButton1.Checked = False
Else
RadioButton1.Checked = True
RadioButton2.Checked = False
EndIf
TextBox4.Text = res.Item(5)
TextBox7.Text = res.Item(6)
TextBox5.Text = res.Item(7)
TextBox10.Text = res.Item(8)
TextBox11.Text = res.Item(9)
ComboBox4.Text = res.Item(10)

TextBox9.Text = res.Item(12)
TextBox12.Text = res.Item(13)

Else
clearfields()
EndIf

con.Close()

EndSub

PrivateSubclearfields()
TextBox3.Clear()
TextBox2.Clear()
RadioButton2.Checked = False
RadioButton1.Checked = False
TextBox4.Clear()
TextBox7.Clear()
TextBox5.Clear()
TextBox10.Clear()
TextBox11.Clear()
TextBox4.Clear()
TextBox9.Clear()
TextBox12.Clear()

EndSub
VIEW PATIENTS
Imports System.Data.OleDb
Imports System.Text.RegularExpressions
Public Class Viewpatients

Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +


connectionstr.con_str())
Dim cmd As OleDbCommand
Dim que As String
' Regular Expression to validate Phone number, it check if phone number contains digits from
0-9 and must be of 10 digits.
Dim numValidation As Regex = New Regex("^[\d]{10}$")
' Regular Expression to validate Date of Birth and Date of Joining, it check Date contain digits
from 0-9 and - or / in dd-mm-yyy or dd/mm/yyyy format
Dim dateValidation As Regex = New Regex("^[\d]{2}[/-]{1}[\d]{2}[/-]{1}[\d]{4}$")
' It checks for Doctor ID is of Integer type only.
Dim idValidation As Regex = New Regex("^[\d]+$")
' It Check for Gender, Gender must be Male or Female only.
Dim genderValidation As Regex = New Regex("^(Male|Female)$")

Private Sub LoadPatients()


Try
' Open the connection
conn.Open()

' Write your SQL query


que = "SELECT [pid], [name], [age], [gender], [phoneno], [address], [bloodtype] FROM
paitent_table"

' Create a data adapter and data table


Dim adapter As New OleDbDataAdapter(que, conn)
Dim dt As New DataTable()
adapter.Fill(dt)

' Bind data to DataGridView (assuming it's named GunaDataGridView1)


GunaDataGridView1.DataSource = dt

' Optional: Set custom column headers


GunaDataGridView1.Columns(0).HeaderText = "Patient ID"
GunaDataGridView1.Columns(1).HeaderText = "Name"
GunaDataGridView1.Columns(2).HeaderText = "Age"
GunaDataGridView1.Columns(3).HeaderText = "Gender"
GunaDataGridView1.Columns(4).HeaderText = "Phone No"
GunaDataGridView1.Columns(5).HeaderText = "Address"
GunaDataGridView1.Columns(5).HeaderText = "Blood Type"
Catch ex As Exception
MessageBox.Show("Error loading data: " & ex.Message)
Finally
' Always close the connection
conn.Close()
End Try
End Sub

Private Sub Form4_Load(sender As Object, e As EventArgs) Handles MyBase.Load


LoadPatients()
End Sub
Private Sub Viewpatients_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs) Handles Panel1.Paint

End Sub

Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click


patients.Show()
Me.Hide()

End Sub

Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click


DONORSLIST.Show()
Me.Hide()

End Sub

Private Sub Label7_Click(sender As Object, e As EventArgs) Handles Label7.Click


BLOODSTOCK.Show()
Me.Hide()

End Sub

Private Sub Label8_Click(sender As Object, e As EventArgs)


DASHBOARD.Show()
Me.Hide()

End Sub
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
DONOR.Show()
Me.Hide()

End Sub

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


BunifuImageButton1.Click
HOMEP.Show()
Me.Hide()
End Sub

Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click

End Sub

Private Sub Label12_Click(sender As Object, e As EventArgs) Handles Label12.Click

End Sub

Private Sub GunaDataGridView1_CellContentClick(sender As Object, e As


DataGridViewCellEventArgs) Handles GunaDataGridView1.CellContentClick

End Sub

End Class
BLOOD STOCK
Imports System.Data.OleDb

Public Class BLOODSTOCK

Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source="


& connectionstr.con_str())
Dim cmd As OleDbCommand

Private Sub BLOODSTOCK_Load(sender As Object, e As EventArgs) Handles MyBase.Load

Try
conn.Open()
Dim query As String = "SELECT [BloodGroup], [BloodStock] FROM blood_table"
Dim cmd As New OleDbCommand(query, conn)
Dim adapter As New OleDbDataAdapter(cmd)
Dim dt As New DataTable()
adapter.Fill(dt)
Guna121.DataSource = dt

Guna121.Columns(0).HeaderText = "Blood Group"


Guna121.Columns(1).HeaderText = "Blood Stock"

' Optional styling (makes it look nicer)


Guna121.ColumnHeadersDefaultCellStyle.Font = New Font("Segoe UI", 10,
FontStyle.Bold)
Guna121.ColumnHeadersDefaultCellStyle.BackColor = Color.Black
Guna121.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
Guna121.EnableHeadersVisualStyles = False

Catch ex As Exception
MessageBox.Show("Error loading blood stock: " & ex.Message)
Finally

conn.Close()
End Try

LoadStockData1()
End Sub

Public Sub LoadStockData1()


Dim adapter As New OleDbDataAdapter("SELECT BloodGroup, BloodStock FROM
blood_table", conn)
Dim dt As New DataTable()
adapter.Fill(dt)
Guna121.DataSource = dt
End Sub

Private Sub Panel3_Paint(sender As Object, e As PaintEventArgs)

End Sub

Private Sub Label6_Click(sender As Object, e As EventArgs)


BLOOD_TRANSFER.Show()
Me.Hide()

End Sub

Private Sub Label2_Click(sender As Object, e As EventArgs)


DONOR.Show()
Me.Hide()

End Sub

Private Sub Label3_Click(sender As Object, e As EventArgs)


patients.Show()
Me.Hide()

End Sub

Private Sub Label5_Click(sender As Object, e As EventArgs)


Viewpatients.Show()
Me.Hide()

End Sub

Private Sub Label8_Click(sender As Object, e As EventArgs)


DASHBOARD.Show()
Me.Show()

End Sub
Private Sub BunifuImageButton1_Click(sender As Object, e As EventArgs) Handles
BunifuImageButton1.Click
HOMEP.Show()
Me.Hide()
End Sub

Private Sub GunaDataGridView1_CellContentClick(sender As Object, e As


DataGridViewCellEventArgs) Handles Guna121.CellContentClick

End Sub

Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click


DONORSLIST.Show()
Me.Hide()

End Sub

Private Sub Label6_Click_1(sender As Object, e As EventArgs) Handles Label6.Click


Me.Hide()
BLOOD_TRANSFER.Show()

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

End Sub

Private Sub Label2_Click_1(sender As Object, e As EventArgs) Handles Label2.Click


DONOR.Show()
Me.Hide()

End Sub

Private Sub Label3_Click_1(sender As Object, e As EventArgs) Handles Label3.Click


patients.Show()
Me.Hide()

End Sub

Private Sub Label5_Click_1(sender As Object, e As EventArgs) Handles Label5.Click


Viewpatients.Show()
Me.Hide()

End Sub
' Load blood stock data into DataGridView
Private Sub LoadStockData()
Dim adapter As New OleDbDataAdapter("SELECT BloodGroup, BloodStock FROM
blood_table", conn)
Dim dt As New DataTable()
adapter.Fill(dt)
Guna121.DataSource = dt
End Sub

' Call this function when form loads


Private Sub BloodTransferForm_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
LoadStockData()
End Sub

End Class
BLOOD TRANSFER

Imports System.Data.OleDb

Public Class BLOOD_TRANSFER

Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source="


& connectionstr.con_str())
Dim cmd As OleDbCommand

Private Sub Label2_Click(sender As Object, e As EventArgs)


DONOR.Show()
Me.Hide()

End Sub

Private Sub Label3_Click(sender As Object, e As EventArgs)


patients.Show()
Me.Hide()

End Sub

Private Sub Label4_Click(sender As Object, e As EventArgs)


DONORSLIST.Show()
Me.Hide()

End Sub

Private Sub Label5_Click(sender As Object, e As EventArgs)


Viewpatients.Show()
Me.Hide()

End Sub

Private Sub Label7_Click(sender As Object, e As EventArgs)


BLOODSTOCK.Show()
Me.Hide()

End Sub

Private Sub Label8_Click(sender As Object, e As EventArgs)


DASHBOARD.Show()
Me.Hide()

End Sub
Private Sub BunifuImageButton1_Click(sender As Object, e As EventArgs) Handles
BunifuImageButton1.Click
HOMEP.Show()
Me.Hide()
End Sub

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


patientidc.SelectedIndexChanged

End Sub

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


MyBase.Load

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


If patientidc.Text = "" Then
MessageBox.Show("Please enter Patient ID")
Exit Sub
End If

Try
conn.Open()
Dim cmd As New OleDbCommand("SELECT name, bloodtype FROM paitent_table
WHERE pid = ?", conn)
cmd.Parameters.AddWithValue("?", patientidc.Text)

Dim reader As OleDbDataReader = cmd.ExecuteReader()

If reader.Read() Then
patnametb.Text = reader("name").ToString()
bgrouptb.Text = reader("bloodtype").ToString()
Else
MessageBox.Show("No patient found with the given ID")
End If

reader.Close()
Catch ex As Exception
MessageBox.Show("Error: " & ex.Message)
Finally
conn.Close()
End Try
End Sub

Private Sub Label2_Click_1(sender As Object, e As EventArgs) Handles Label2.Click


DONOR.Show()
Me.Hide()
End Sub

Private Sub Label4_Click_1(sender As Object, e As EventArgs) Handles Label4.Click


DONORSLIST.Show()
Me.Hide()

End Sub

Private Sub Label3_Click_1(sender As Object, e As EventArgs) Handles Label3.Click


patients.Show()
Me.Hide()
End Sub

Private Sub Label5_Click_1(sender As Object, e As EventArgs) Handles Label5.Click


Viewpatients.Show()
Me.Hide()

End Sub

Private Sub Label7_Click_1(sender As Object, e As EventArgs) Handles Label7.Click


BLOODSTOCK.Show()
Me.Hide()
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


HOMEP.Show()
Me.Hide()

End Sub

Private Sub Label9_Click(sender As Object, e As EventArgs) Handles Label9.Click

End Sub

Private Sub transferbut_Click(sender As Object, e As EventArgs) Handles transferbut.Click


Try
Dim bloodType As String = patientidc.Text

If bloodType = "" Then


MessageBox.Show("Please select a blood type.")
Return
End If

conn.Open()

' Check current stock


'Dim checkCmd As New OleDbCommand("SELECT BloodStock FROM Blood_table
WHERE BloodGroup = ?", conn)
checkCmd.Parameters.AddWithValue("?", bloodType)

Dim stock As Integer = CInt(checkCmd.ExecuteScalar())

If stock <= 0 Then


MessageBox.Show("Not enough stock available.")
conn.Close()
Return
End If

' Update stock


Dim updateCmd As New OleDbCommand("UPDATE BloodStock SET BloodStock =
BloodStock - 1 WHERE BloodGroup = ?", conn)
updateCmd.Parameters.AddWithValue("?", bloodType)
updateCmd.ExecuteNonQuery()

MessageBox.Show("Blood transferred successfully!")

conn.Close()

Catch ex As Exception
MessageBox.Show("Error: " & ex.Message)
Finally
If conn.State = ConnectionState.Open Then conn.Close()
End Try
End Sub
End Class
CHAPTER 6
(TESTING AND IMPLEMENTATION)

6.1TESTING DEFINITION AND IMPORTANCE

TESTING- Testing a Blood Donation Management System (BDMS) involves verifying that
all functionalities work as expected, ensuring data integrity, system security, and smooth user
experience for donors, hospitals, and administrators. Here's a structured approach you can take:

1. Functional Testing:

This ensures that each module on the sidebar (Dashboard, Patient, View Donors, etc.) performs
as expected:

 Dashboard should display summarized data like total blood units, donors, and requests.
 Patient and Donor modules should support add/edit/delete functionality.
 Blood Stock must update accurately after donation or transfer.
 Blood Transfer should check compatibility and update inventory accordingly.

2. Performance Testing:

Tests how the system performs when:

 Multiple users access modules like "View Patients" or "View Donors".


 Large data loads are fetched or filtered from the system.
 Operations like blood stock updates are performed simultaneously.

3. Security Testing:

Important to:

 Ensure only authorized users can access modules.


 Prevent direct access to sensitive forms like "Blood Transfer" or "Patient" without login.
 Protect donor/patient data against threats like SQL injection or data breaches.

4. User Acceptance Testing (UAT):

Involves feedback from actual users (blood bank staff or administrators) to validate:

 Ease of use in navigating the UI.


 Understanding and usability of buttons like "LOG OUT".
 Overall satisfaction with performing tasks like registering a donor or updating stock.
IMPORTANCE - The Blood Bank Management System is critical in saving lives and
ensuring timely blood availability. Testing is crucial for the following reasons:

1. Patient Safety:
Prevents mismatched blood transfers, incorrect patient information, or expired stock
being issued.
2. Data Accuracy and Integrity:
Ensures that information about donors, patients, and blood units is updated correctly and
reflects real-time availability.
3. Operational Efficiency:
Reduces manual errors, improves tracking of donations and requests, and allows quick
decision-making during emergencies.
4. Compliance and Risk Mitigation:
Protects sensitive health data and aligns with standards such as data encryption and
access control policies for medical data.

Overall, testing plays a critical role in the successful implementation and operation of a Hospital
Management System, safeguarding patient care, data security, and organizational efficiency.
6.2TESTING REPORT

A Testing Report for a Hospital Management System (HMS) serves as a comprehensive


documentation of the testing process, findings, and outcomes throughout the development
lifecycle.

Login page

In this login page we test the validation , in this when we enter the wrong username or
password its gaves you a message box(“please check your username and password”)
DOCTOR LOGIN PAGE

In this page we when we enter the wrong id, username or password its gave you a
message box(“please check your id or username or password”)

Add new donor details

In this page we wil add the new donor.

View Donors list


It will show all the donors lists.

Add new patient page

In this page , information saved validation is required.

View patient details


In this page we can see all the patients information.

Blood transfer page


Blood stock
CHAPTER 7 (SYSTEM IMPLEMENTATION)

7.1 DEFINITION OF IMPLEMENTATION OF SYSTEM

The implementation of a Blood Donation Management System (BDMS) refers to the process of
executing the planned and developed software that manages blood donation activities such as
donor registration, blood requests, inventory tracking, and communication between donors and
hospitals. The aim is to ensure a smooth and efficient donation process, maintain an accurate
blood database, and improve healthcare responsiveness. This implementation typically follows
several key stages:

1. Planning:
This initial phase involves defining the project’s scope, identifying stakeholders (e.g.,
hospital staff, blood bank personnel, donors), setting project goals, and allocating
necessary resources. Needs assessment is performed to understand the specific functional
and non-functional requirements of the system.
2. Analysis:
Existing processes for blood donation, blood inventory tracking, and donor
communication are analyzed to identify inefficiencies. This analysis supports the
customization of the BDMS to meet the operational requirements of hospitals and blood
banks.
3. Design:
System architecture, user interface, and database structure are designed in this phase
using Visual Studio tools. Key design elements include donor registration forms, search
functionalities, blood request modules, and admin dashboards.
4. Development:
Using Visual Studio (with C#, .NET, and SQL Server), developers build the core features
such as donor registration, blood inventory updates, and request processing. Backend and
frontend development is completed according to the design specifications.
5. Testing:
Once development is completed, the system is tested thoroughly. This includes:
o Functional Testing: Ensuring each module (donor registration, blood request,
etc.) works as intended.
o Performance Testing: Verifying system stability and responsiveness.
o Security Testing: Checking data protection and access control mechanisms.
o User Acceptance Testing: Gathering feedback from potential users for usability
and reliability.
6. Deployment:
After successful testing, the BDMS is deployed on a secure hospital or blood bank server.
This may involve configuring IIS (Internet Information Services), setting up SQL Server
databases, and installing necessary components on client machines.
7. Training and Support:
Hospital staff and blood bank personnel are trained to operate the system efficiently. User
manuals and training sessions are provided. Technical support is also arranged to resolve
post-deployment issues.
8. Evaluation and Optimization:
Continuous monitoring is done to assess the effectiveness of the system. User feedback is
used to make improvements, fix bugs, and optimize performance. Updates are rolled out
periodically to ensure the system adapts to changing requirements and remains efficient.

Overall, the implementation of a Blood Donation Management System aims to streamline


Donationss, enhance patient care, improve decision-making, and optimize resource utilization
within the healthcare facility.
7.2 DEPLOYMENT OF PROJECT

Deploying a Blood Donation Management System (BDMS) involves making the software
solution available for use within blood banks, hospitals, or donor management centers. Below is
a step-by-step guide to deploying the BDMS:

1. Infrastructure Setup:

 Ensure that the required hardware infrastructure is in place, such as servers, networking
devices, and secure storage systems.
 Install necessary software prerequisites including Windows Server, IIS (Internet
Information Services), .NET Framework, SQL Server, and Visual Studio runtime
components.

2. Installation:

 Deploy the BDMS application on designated machines or virtual environments.


 Configure the system settings, including admin access, security permissions, and
database connections, based on the organization’s preferences.

3. Data Migration:

 If migrating from manual records or an existing system, import donor data, blood stock
levels, donation history, and hospital requests into the new database.
 Ensure the accuracy and integrity of migrated data by validating formats, removing
duplicates, and conducting trial runs.

4. Integration:

 Integrate BDMS with external platforms or tools if needed (e.g., hospital record systems,
email/SMS gateways for donor communication).
 Set up API endpoints or data exchange mechanisms to allow seamless interaction with
third-party applications or hospital systems.
5. User Training:

 Train staff on how to use the system for tasks like managing donor records, processing
blood requests, and updating stock levels.
 Provide clear documentation and practical sessions to help users become confident with
the software features.
 Address user queries and conduct walkthroughs for complex modules like reporting or
dashboard analytics.

6. Testing and Quality Assurance:

 Conduct thorough tests in the live environment to verify that all functionalities work as
intended.
 Perform system testing (functional, performance, and security) and conduct user
acceptance testing (UAT) to ensure reliability and usability.

7. Go-Live and Monitoring:

 After successful testing and training, schedule the official go-live of the BDMS.
 Monitor system usage and performance closely in the early stages to identify and resolve
any initial bugs or bottlenecks.
 Use monitoring tools or admin dashboards to track user activity, system load, and blood
stock alerts.

8. Post-Deployment Support:

 Offer continuous technical support and maintenance services to handle issues that arise
after deployment.
 Regularly patch the BDMS with updates for new features, bug fixes, and security
improvements.
 Collect user feedback to make enhancements and ensure the system remains aligned with
real-world operational needs.

By following these steps, the deployment of a Blood Donation Management System using Visual
Studio can be performed efficiently, ensuring smooth adoption by staff and improved donor and
inventory management across medical institutions.

.
CHAPTER 8: (OUTPUT AND FUTURE SCOPE)
8.1 OUTPUT SCREENSHOT

LOGIN PAGE

Its is login page when we enter the correct username and password then we login the page
by click the button name login If we don’t remember our password then we click on
forget password and change the password
Home page

It’s a home page from this we can go to login page for add a new donor or any new patient.
DONOR PAGE

In this DONOR page we have to enter Donor id Age, Name, Gender,Phone, Blood type,
Address and in this we have three different quaries like add delete and update.
DONOR LIST

IT’S a Donor list page it will show the donor name ,age,bloodg group,phone
no.,gender.address,donor id

PATIENT PAGE
It’s a patient page in this we can add new patients
VIEW PATIENTS PAGE

In this we can view all the patients and all the information about them
BLOOD TRANSFER

It’s a blood transfer in this we can transfer blood to the patient.


BLOOS STOCK

It’s a blood stock page in this we can see how much blood does we have.
8.2 FUTURE SCOPE

BLOOD DONATION MANAGEMENT SYSTEM

The future scope of the Blood Donation Management System is promising, driven by
advancements in technology, increasing healthcare digitization, and the growing need for
efficient donor-recipient matching and inventory management. Below are some areas where the
BDMS can evolve further:

1. AI and Predictive Analytics:


Incorporating AI can help predict blood demand based on trends, geographic needs, and
emergency alerts. Predictive analytics can optimize inventory levels, reduce wastage of
expired blood, and ensure timely donor outreach.
2. Mobile Application Integration:
A mobile version of BDMS can offer donors the ability to register, book appointments,
receive reminders, and get notified about urgent blood needs nearby. Push notifications
can also be used to encourage regular donations.
3. Real-Time Inventory Monitoring:
Implementing real-time blood stock tracking across multiple locations can ensure better
resource allocation, reduce shortages, and avoid surplus. Integration with hospital
systems for real-time updates can be introduced.
4. Blockchain for Donor Data Security:
Using blockchain can improve the security and integrity of donor data, consent forms,
and donation history. This ensures transparency, tamper-proof records, and secure
interoperability with other health platforms.
5. Advanced Donor Profiling:
Future systems could use detailed health analytics to match donors more precisely with
recipients, considering rare blood types, health history, and eligibility status, helping
improve compatibility and safety.
6. Geo-Mapping and Smart Donor Alerts:
GPS and smart notifications can help locate nearby blood banks or donation camps and
notify eligible donors when there’s a need in their vicinity, increasing response time
during emergencies.
7. Integration with National/Global Donation Networks:
The system can be expanded to interface with national health systems or global donation
registries to optimize blood sharing across regions, especially during crisis or disaster
relief efforts.

Overall, the Blood Donation Management System has a strong potential for expansion
and innovation. Its future will focus on increasing donor engagement, enhancing
operational efficiency, ensuring data security, and ultimately saving more lives through
smarter, technology-driven blood donation management.
BIBLOGRAPHY

Creating a bibliography for a Blood Donation Management System involves citing various
sources that cover aspects such as blood donation practices, database and web application
development, healthcare regulations, and user interface design. Here's a sample bibliography:

GEEKS FOR GEEKS


W3SCHOOLS.COM
RED CROSS BLOOD SERVICES
YOUTUBE
MICROSOFT DOCS
HEALTHLINE.COM

You might also like