Smart Blood Connect: An Offline AI-Driven
Blood Availability Network via SMS
V Surya, Sanjay M, T C Mohan Babu, See Vaishnavi V
Artificial Intelligence and Machine Learning
CMR Institute of Technology
Bangalore, India
{vsu22aiml, sam22aiml, tba22aiml, srv22aiml}@cmrit.ac.in
Abstract—BloodRequestAgent is an AI system that
automates blood request processing via SMS (e.g.,
“need 2 units B+ blood for Fortis”). It uses AI to
read SMS, find the nearest blood bank, and send
replies, promoting fast access to blood supplies. The
goal is to improve hospital efficiency and save lives
through inclusivity and accessibility.
Index Terms—artificial intelligence, blood request
automation, natural language processing, fuzzy
matching, Haversine algorithm, SMS processing,
healthcare accessibility
I. Introduction
Hospitals face delays in sourcing blood due
to manual communication processes. This AI
acts like a smart assistant, understanding blood
requests and coordinating with blood banks
instantly. Built using simple tools (VS Code,
Anaconda) for real-time SMS-based solutions.
– Blood type (e.g., B+)
– Quantity (e.g., 2 units)
– Location (e.g., Fortis)
• Finds the closest blood bank using location
data and distance calculations.
• Sends a reply SMS to patient with the
matched result, e.g., “LifeBlood Bank, 3.9
km.”
• Runs in VS Code using three Python files:
– app.py
– run.flask.py
– process.emails.py
• Executed using two terminal commands for
operation and testing.
• Tested with sample SMS to ensure accurate
request processing and automated response
delivery.
II. Problem Statement
Delays in blood requests can risk lives, especially in emergencies, due to lack of automated
systems. Many hospitals rely on phone calls
or manual checks, which are slow and errorprone. BloodRequestAgent bridges this gap by
automating requests, ensuring quick and accurate blood bank matching.
III. Methodology
Reads incoming SMS using SMS technology
(SimpleTexting).
• Understands requests using AI language
tools, even if misspelled (e.g., “blud” for
“blood”), such as:
•
TABLE I
Blood Bank Information for Fortis Hospital
No.
1
2
Blood Bank
LifeBlood Bank
Care Blood Bank
Location
Bangalore Central
Bangalore South
IV. System Architecture Overview
The AI-driven blood request and donation system is a modular, offline platform designed for
efficient blood request processing and donor
engagement in resource-constrained settings. Its
key components and features are:
•
Modular Design: Comprises six core components:
Blood Types
B+, A+
B+, O+
Dista
– SMS Gateway
– SMS Processor
– AI Matching Engine
– Donor Engagement Module
– Response Module
– Local Database
SMS Gateway: Handles all incoming and
outgoing SMS messages via a local GSM
modem for offline operation [2].
• SMS Processor: Parses requests like “need 2
units B+ blood for Fortis” using NLP tools
(spaCy) and fuzzy matching (FuzzyWuzzy)
to correct errors like “blud” to “blood,”
achieving up to 90% accuracy [4].
• AI Matching Engine: Matches parsed data
with nearby blood banks or donors using
the Haversine algorithm. It prioritizes:
•
– Blood type
– Distance (e.g., LifeBlood Bank, 3.9 km)
– Real-time availability
V. Implementation Details
A. Development Environment
Built using Python 3.9 for its robust AI and
data processing capabilities.
• Developed in Visual Studio Code with Anaconda for efficient dependency management
and virtual environment handling.
•
B. Software Stack
•
NLP and Fuzzy Matching:
– spaCy is used for entity extraction from
SMS (e.g., blood type, location).
– FuzzyWuzzy corrects misspellings (e.g.,
“blud” to “blood”).
Distance Calculation: NumPy is used to implement the Haversine algorithm efficiently
for geolocation processing.
• Database: SQLite provides lightweight,
offline-compatible data storage for blood
bank and donor records.
• SMS Handling: Simulated via a local GSM
modem using PySerial to manage USB
modem communication [2].
• Server: Flask is used to run the local server
and manage inter-component interactions.
•
The engine runs fully offline using Python
and NumPy [5].
• Donor Engagement Module: Maintains a
local donor registry using SQLite. It sends
AI-driven notifications to nearby donors
based on blood type and urgency (e.g., C. File Structure
“Urgent: B+ needed at Fortis”) [3].
• Response Module: Composes and sends
• app.py - Contains core logic for the AI
reply messages like “LifeBlood Bank, 3.9
Matching Engine and Donor Engagement
km, B+ available” and logs the transaction
Module.
details [1].
• smsp rocessor.py
−
• Offline Capability: All components work
Responsiblef orSM SparsingusingspaCyandF uzzyW uzzy.
without internet access by relying on local
storage, SMS protocols, and embedded AI D. Offline Setup
tools, ensuring scalability in low-resource
environments.
•
• All components are hosted on a single
• Data Flow: The flow starts from the SMS
hospital server (e.g., a local machine with
Gateway to SMS Processor, then to either
4GB RAM).
the AI Matching Engine or Donor Engage• The local SQLite database is pre-populated
ment Module. These components interact
with blood bank and donor data (see Tawith the Local Database and return the
ble ??).
• A GSM modem enables SMS functionality
output through the Response Module and
without requiring internet access [2].
SMS Gateway.
E. Execution
The system runs with two commands:
– python app.py - Launches the main
server and logic engine.
– python
smsp rocessor.py
−
InitiatesSM Shandling.
• Donor Engagement Module integrates a
lightweight logistic regression model trained
offline for predictive analytics.
•
F. Testing
Evaluated using 50 sample SMS requests
(e.g., “need 2 units B+ blood for Fortis”).
• Achieved 92% parsing accuracy and an
average response time of 1.8 seconds [5].
•
G. Security
Input sanitization is applied to prevent SMS
injection attacks.
• Donor data in SQLite is encrypted using
SQLCipher for secure storage.
•
VI. Conclusion and Future Work
A. Conclusion
The AI-driven blood request and donation system successfully automates blood
request processing and donor engagement
in offline environments.
• Achieved 92% parsing accuracy and an average response time of 1.8 seconds, thereby
improving hospital operational efficiency
[5].
• Offline SMS-based operation enhances accessibility in resource-constrained areas
without reliance on internet connectivity
[2].
• Demonstrates the potential of artificial
intelligence—particularly NLP and the
Haversine algorithm—for real-world healthcare applications.
•
B. Future Work
•
Integrate social media platforms (e.g.,
WhatsApp, Telegram) for broader donor
outreach and public awareness [3].
Implement multilingual SMS support to
increase inclusivity in linguistically diverse
regions.
• Deploy and test the system in rural hospitals to assess real-world performance and
scalability.
• Integrate IoT-enabled devices to fetch realtime donor availability when internet access
is available
•
References
[1] R. Singh, P. Bhargava, and S. Kain, “Smart
Phones to the Rescue: The Virtual Blood Bank
Project,” IEEE CS and IEEE ComSoc, vol.
1536-1268/07, pp. $25.00, 2007.
[2] A. H. M. Saiful Islam, N. Ahmed, K. Hasan,
and Md. Jubayer, “Multifield Blood Flow,”
(Publication details incomplete in source).
[3] Placeholder for donor engagement reference
(details incomplete in source).
[4] Placeholder for FuzzyWuzzy reference (details
incomplete in source).
[5] Placeholder for NumPy reference (details incomplete in source).