Skip to content
RaktConnect

RaktConnect

It is an AI-powered blood donation platform that connects donors,hospitals, and patients to ensure timely and efficient blood supply.It optimizes blood availability, reduces shortages, and saves lives

Created on 13th April 2025

•

RaktConnect

RaktConnect

It is an AI-powered blood donation platform that connects donors,hospitals, and patients to ensure timely and efficient blood supply.It optimizes blood availability, reduces shortages, and saves lives

The problem RaktConnect solves

--> For Patients: Quickly find available blood, submit urgent requests, AI-powered haemoglobin level and disease predictors .
--> For Donors: Dynamically displays nearby blood banks, track donation history and receive smart reminders for the next eligible donation.
--> For Hospitals: Manage blood inventory, predict blood demands using AI, and connect patients.

Why It’s Better?

Connects patients, donors and hospitals through a single platform
Smart Demand Forecasting → Prevents blood shortages
AI-powered disease predictor → Predicts probable diseases based on user symptons
RaktConnect saves lives by making blood donation smarter, safer, and more efficient!

Challenges I ran into

AI Model Accuracy – Training the Blood Demand Prediction Model
🐞 The Bug/Hurdle
One major hurdle I faced while building the Blood Demand Prediction System was handling MongoDB time-series data efficiently for Prophet model training.

Issues Encountered:
Inconsistent timestamps: Some records had missing or incorrect timestamps.
Slow queries: Aggregation queries for time-series data were too slow, affecting model retraining.
Data format issues: Prophet requires a ds (datetime) and y (value) column, but MongoDB stores dates in different formats.
🔧 How We Fixed It
1️⃣ Standardizing Timestamps
✅ Ensured all timestamps were stored in ISODate format in MongoDB.
✅ Used MongoDB’s
$dateFromString

in aggregation queries to fix incorrect formats.

2️⃣ Optimizing Queries
✅ Indexed the timestamp field to speed up filtering.
✅ Used MongoDB’s "$match" before "$group" to reduce the amount of scanned data.

3️⃣ Preprocessing Before Prophet Training
Transformed MongoDB documents into a clean DataFrame before passing them to Prophet:

import pandas as pd

Fetch data from MongoDB

blood_data = list(mongo_collection.find({}, {"_id": 0, "timestamp": 1, "demand": 1}))

Convert to DataFrame and rename columns

df = pd.DataFrame(blood_data)
df.rename(columns={"timestamp": "ds", "demand": "y"}, inplace=True)

Ensure correct datetime format

df["ds"] = pd.to_datetime(df["ds"])

Discussion

Builders also viewed

See more projects on Devfolio