Skip to content

BloodAI

BloodAI is an end-to-end clinical triage system that bridges the gap between a confused patient and an overworked doctor.

Core trick

A vision model extracts nine lab values from a photo, which a from-scratch domain BERT classifies into eight triage classes with calibrated probabilities.

Tags

Description

BloodAI is an end-to-end clinical triage system that bridges the gap between a confused patient and an overworked doctor. PROBLEM: In Poland, doctors have 7 minutes per patient. 47% of patients don't understand their lab results. Wait time for a specialist on public insurance is 3-18 months. SOLUTION: Photograph your lab report. In 10 seconds: - Opus 4.7 Vision extracts 9 lab parameters - Custom BERT model (18MB, trained from scratch on 408,214 Synthea+MIMIC sequences) performs 8-class triage with calibrated probabilities (ECE 0.012) - 52 vocab-aware adaptive questions empirically shift predictions by up to 37 percentage points - Opus 4.7 generates patient-mode (plain language) and clinical-mode (structured assessment) explanations - 37 personalized follow-up tests recommended with 14 conditional rules - Real doctor finder integrates live NFZ public health in Poland API + Google Places for private clinics - Trend analysis with 6 cross-parameter comorbidity detectors (CKD progression, pancytopenia, etc.) with R^2 up to 0.99 13 live endpoints. Zero mocks. Built solo in 36 hours.
antoniopater/BloodAI-Hackathon-Claude★ 00 forksPythonMITCreated Apr 22, 2026 · last push Apr 26, 2026

README excerpt

# BloodAI — Intelligent Multi-Label Triage

> Snap a photo of a blood test → AI explains what's abnormal, which specialist to see, and where to book. From‑scratch domain BERT (val ECE 0.012, 8‑class triage) + Claude Opus 4.7 for vision OCR / explanations / trend narrative + live NFZ queue API + Google Places.

Built solo for the **Built with Opus 4.7** hackathon (Cerebral Valley).

---

## What it does

1. **Scan** a blood test printout (photo or PDF) — Opus 4.7 Vision OCR extracts values + reference ranges.
2. **Triage** with a domain‑specific BERT (6L · 8H · 256d · vocab 179) trained on 408k Synthea + MIMIC sequences. Returns 8 calibrated probabilities + per‑parameter attention.
3. **Explain** the result in plain English (patient mode) or as a structured clinical note (clinical mode), with red flags and 3–6 follow‑up tests.
4. **Track trends** over multiple visits — linear regression per parameter, 6 cross‑parameter comorbidity detectors (CKD progression, hepatocellular injury, bone‑marrow suppression, …) and an Opus narrative.
5. **Find a doctor** — live NFZ queue API (Polish public health) + Google Places for private clinics, with haversine distance ranking.

---

## Quick start

### 1. Clone

```bash
git clone https://github.com/<your-fork>/BloodAI-Hackathon-Claude.git
cd BloodAI-Hackathon-Claude
```

### 2. Create your `.env` file (IMPORTANT — read this carefully)

The backend needs API keys to run. They are **never** committed (`.env` is in `.gitignore`).

```bash
cp .

Team