0% found this document useful (0 votes)
65 views10 pages

FINAL DSA MINI PROJECT - PDF - 20241027 - 225622 - 0000

Uploaded by

v.ishu.845940
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)
65 views10 pages

FINAL DSA MINI PROJECT - PDF - 20241027 - 225622 - 0000

Uploaded by

v.ishu.845940
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/ 10

IT1306

DATA STRUCTURE AND ALGORITHMS LABORATORY

DEPARTMENT OF INFORMATION TECHNOLOGY


GOVERNMENT COLLEGE OF ENGINEERING,
AMRAVATI
B.TECH-THIRD SEMESTER
LAB RECORD FOR

IT1306
DATA STRUCTURE and ALGORITHMS
Blood Bank Manegement System

Submitted by:-

Name of Students:- 1.
23007041- Rahul Yawle
2. 23007048:- Shraddhey Dukare
3. 23007059:- Tushar Rathod

2024-25 DEPARTMENT OF INFORMATION TECHNOLOGY


Project Date:

Aim: Mini Project based on Data Structure Application (group task)


Problem statement Blood Bank Management System

Objective :-
• Manage information related to blood donors, recipients, and blood inventory.
• Ensure the availability of safe and adequate blood.
• Automate blood collection, storage, and distribution.
• Track blood donations, blood groups, and stock levels.
• Provide real-time information to users about blood availability.

Skill Used:- c

Data Structure Used:-


Blood Bank Management System systems typically use various data
structures to organize and manage the information efficiently. Some common
data structures include:

Arrays in the Blood Bank Management System

1. Global Arrays:

The system uses two global arrays to store data about donors and recipients:

Donor Array:

Type: Donor donors[MAX_DONORS];

Purpose: Holds up to 100 Donor structures, each containing information such as ID,
name, blood group, and age.

Recipient Array:

Type: Recipient recipients[MAX_RECIPIENTS];


Purpose: Holds up to 100 Recipient structures with similar fields to track recipient
details.

2. Data Management:

Dynamic Entry Tracking:

The system maintains two integer variables, num_donors and num_recipients, to track
the current number of entries in the respective arrays. These variables ensure that
data is added only when there is space available in the arrays.

3. Array Operations:

Adding Donors and Recipients:

New entries are added at the next available index, which is managed by incrementing
num_donors or num_recipients after each successful addition.

Displaying Data:

Functions display_donors() and display_recipients() iterate through the respective


arrays, accessing each entry using a loop to print details.

4. Capacity Limitations:

The arrays are statically sized, which means the maximum number of donors and
recipients is limited to 100 each. This constraint can impact scalability and flexibility in
real-world applications.

5. Data Retrieval:

Blood group compatibility checks utilize the donor array to verify if a suitable donor
exists before adding a recipient, ensuring that the system enforces safety protocols.
Theory:
Blood Bank Management System:-
A Blood Bank Management System is an essential tool designed to streamline the processes
involved in collecting, storing, processing, and distributing blood and its components. Below
is a theoretical overview of the system:

1. Introduction:
Blood banks are institutions responsible for the storage and supply of blood. A Blood
Bank Management System ensures efficient management of donor data, blood inventory,
and transfusion records. The system aims to reduce human error, minimize wastage, and
make the process transparent and fast.

2. Objectives:
• Manage information related to blood donors, recipients, and blood inventory.
• Ensure the availability of safe and adequate blood.
• Automate blood collection, storage, and distribution.
• Track blood donations, blood groups, and stock levels.
• Provide real-time information to users about blood availability.

3. Functional Modules of the System


1.Donor Management:
Registration of new donors.
Maintain donor profiles with contact details, blood type, and donation history.
Automated notifications for the next eligible donation date.
Record deferral periods if the donor is temporarily ineligible.

2.Inventory Management:
Track blood units based on type (A+, A-, O+, O-, etc.).
Monitor the expiry date of blood units.
Record component separation (e.g., plasma, platelets, red blood cells). Alert
for low stock levels or nearing expiry units.

3.Blood Collection and Processing:


Maintain records of blood collected from donors.
Ensure compliance with safety and processing standards. Support
for blood camps and mobile collections.

4.Recipient and Transfusion Management: Register


patients who require blood.
Match patient requirements with available blood types. Generate
and maintain transfusion records.

5.Reporting and Analytics:


Generate reports on donor trends, inventory status, and transfusion statistics.
Predict future blood demand using historical data.
Audit trail for transparency and regulatory compliance.

6.User Management and Security:


Role-based access control (e.g., admin, technician, donor).
Ensure data security and privacy of sensitive information.
4. Technologies Used
• Frontend: HTML, CSS, JavaScript for a user-friendly interface.
• Backend: Java, PHP, Python, or Node.js for handling server-side logic.
• Database: MySQL, PostgreSQL, or MongoDB to store data.
• Cloud Storage: For online blood banks to ensure scalability.
• SMS/Email Integration: Notify donors and recipients about availability, reminders, or alerts.

5. System Flow
• Donor Registration: A new donor's details are entered into the system.
• Blood Donation: Blood is collected and added to the inventory.
• Processing: Blood components are separated and stored.
• Inventory Management: The system monitors storage conditions and alerts for nearing expiry.
• Recipient Request: Patients request blood, and the system matches available units.
• Transfusion: Blood is issued to the patient, and records are updated.
• Reports Generation: Regular reports are generated for decision-making and compliance.

6. Advantages of a Blood Bank Management System


• Efficiency: Automates manual processes and reduces errors.
• Transparency: Tracks every unit of blood from donation to transfusion.
• Real-time Inventory: Ensures better stock management and availability.
• Data Security: Protects sensitive donor and patient information.
• Communication: Keeps donors and recipients informed with notifications

7. Challenges
• Ensuring data integrity and security.
• Integration with other healthcare systems.
• Training staff to use the system efficiently.
• Managing blood supply in emergencies and pandemics.

8. Conclusion
A Blood Bank Management System is critical for improving the efficiency of blood collection and
distribution processes. It helps in saving lives by ensuring that the right blood type is available at the
right time. With advancements in technology, these systems are becoming more sophisticated and
accessible, ensuring that both donors and recipients benefit from streamlined operations.
Source Code :-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_DONORS 100
#define MAX_RECIPIENTS 100

// Structure definitions
typedef struct { int
donor_id; char
name[50]; char
blood_group[5]; int
age;
} Donor;

typedef struct { int


recipient_id; char
name[50]; char
blood_group[5]; int
age;
} Recipient;

// Global arrays to store donors and recipients


Donor donors[MAX_DONORS];
Recipient recipients[MAX_RECIPIENTS];
int num_donors = 0; int num_recipients
= 0;

// Function prototypes void add_donor(); void


add_recipient(); void display_donors(); void
display_recipients(); int check_blood_group_match(const
char donor_bg[], const char recipient_bg[]);
int main()
{ int choice;

do {
printf("\nBlood Bank Management System\n");
printf("1. Add Donor\n"); printf("2. Add
Recipient\n"); printf("3. Display Donors\n");
printf("4. Display Recipients\n"); printf("5. Exit\
n"); printf("Enter your choice: ");
scanf("%d", &choice);
switch(choice)
{ case 1:
add_donor(); break;
case 2:
add_recipient();
break; case 3:
display_donors();
break; case 4:
display_recipients();
break; case 5:
printf("Exiting the program...\n");
break; default:
printf("Invalid choice. Please enter a valid choice.\n");
}

} while(choice != 5);

return 0;
}

void add_donor() {
if(num_donors < MAX_DONORS) { Donor
new_donor; printf("Enter Donor ID: ");
scanf("%d", &new_donor.donor_id);
printf("Enter Name: "); scanf(" %[^\n]s",
new_donor.name); printf("Enter Blood
Group: "); scanf(" %[^\n]s",
new_donor.blood_group); printf("Enter
Age: "); scanf("%d", &new_donor.age);

donors[num_donors++] = new_donor;

printf("Donor added successfully!\n");


} else {
printf("Maximum donors limit reached.\n");
}
}

void add_recipient() {
if(num_recipients < MAX_RECIPIENTS)
{ Recipient new_recipient; printf("Enter
Recipient ID: "); scanf("%d",
&new_recipient.recipient_id); printf("Enter
Name: "); scanf(" %[^\n]s",
new_recipient.name); printf("Enter Blood
Group: "); scanf(" %[^\n]s",
new_recipient.blood_group); printf("Enter
Age: ");
scanf("%d", &new_recipient.age);

// Check for blood group match with donors int


valid_match = 0; for(int i = 0; i < num_donors; ++i) {
if(check_blood_group_match(donors[i].blood_group,
new_recipient.blood_group)) {
valid_match = 1;
break;
}
}

if(valid_match)
{ recipients[num_recipients++] =
new_recipient; printf("Recipient added
successfully!\n");
} else {
printf("Error: No matching donor found for recipient's
blood group.\n");
}

} else {
printf("Maximum recipients limit reached.\n");
}
}
void display_donors()
{ if(num_donors == 0) {
printf("No donors available.\n");
} else { printf("List of Donors:\n"); for(int i = 0; i <
num_donors; ++i) { printf("Donor ID: %d, Name: %s,
Blood Group: %s, Age:
%d\n",
donors[i].donor_id, donors[i].name,
donors[i].blood_group, donors[i].age);
}
}
}
void display_recipients()
{ if(num_recipients == 0) {
printf("No recipients available.\n");
} else { printf("List of Recipients:\n"); for(int i = 0; i <
num_recipients; ++i) { printf("Recipient ID: %d, Name:
%s, Blood Group: %s, Age:
%d\n",
recipients[i].recipient_id, recipients[i].name,
recipients[i].blood_group, recipients[i].age);
}
}
}

// Function to check if there is a valid match of blood


group between donor and recipient int
check_blood_group_match(const char donor_bg[], const
char recipient_bg[]) { if(strcmp(donor_bg, recipient_bg) ==
0) { return 1; // Blood groups match
} else { return 0; // Blood groups do
not match
}
}
output:-

You might also like