FastAPI

AI Services

Blood Connect runs AI workloads as Python FastAPI services under infrastructure/ai-services/, wired into the Next.js app via NEXT_PUBLIC_AI_SERVICES_URL and tRPC routers such as matching.

Available
Donor–Recipient Matching

Ranks eligible donors for a blood request using blood type compatibility, proximity, availability, and urgency.

  • •Blood type compatibility
  • •Geographic proximity
  • •Availability and fatigue signals
  • •Urgency prioritization
  • •Exposed via tRPC matching router and FastAPI service
Available
Demand Forecasting

Predicts blood demand patterns to support inventory planning and donor recruitment.

  • •Demand prediction models
  • •Inventory planning support
  • •Hospital / blood-bank analytics inputs
  • •Stored as DemandPrediction records
Available
Risk Assessment

Supports donor eligibility and donation-safety evaluation using structured health and history signals.

  • •Eligibility-oriented risk scoring
  • •WHO-aligned screening context
  • •FastAPI risk assessment API
  • •Used alongside digital health screening flows
How services are deployed

The unified FastAPI entrypoint is infrastructure/ai-services/main.py. Matching has a dedicated module at infrastructure/ai-services/matching/; forecasting and risk assessment live alongside shared middleware, caching, and monitoring.

The web app does not ship a public npm/Python SDK. Integrate through the Blood Connect backend (tRPC / internal AI client), not a direct third-party SDK package.

Application integration

Typical product paths:

  • Hospital / emergency blood requests → matching via bloodRequests + matching routers
  • Inventory planning → forecasting outputs / analytics
  • Donor screening → risk assessment + WHO screening flows
See Developer API
Note: There is no production AI chatbot, public AI playground, or published @bloodlink/ai-sdk package in this repository. Accuracy percentages shown in older marketing copy are not product SLAs.