AI-Powered Clinical Report Intelligence Platform
Transforming medical reports into actionable health insights for humanity
Live Demo · Features · Architecture · Getting Started
MedBios AI is an open-source clinical intelligence platform that analyzes medical lab reports using AI. Upload a PDF lab report, and MedBios extracts every lab value via OCR, detects abnormalities against 100+ reference ranges, reasons about clinical conditions using 20 clinical rules, maps findings to a medical knowledge graph, checks 30 drug interaction pairs, and generates personalized health recommendations — all in seconds.
Built for humanity. Free and open source.
- OCR Extraction — Extracts lab values from PDF reports with intelligent multi-pattern parsing
- 100+ Lab Test References — Comprehensive database with 130+ name aliases for high OCR accuracy
- Multi-Level Severity Scoring — Every abnormal value gets a 0-100 severity score with percentage deviation
- 20 Clinical Reasoning Rules — Detects conditions: metabolic syndrome, anemia, thyroid disorders, cardiac risk, coagulation abnormalities, pancreatic injury, PSA screening, and more
- Knowledge Graph — Medical ontology linking diseases, symptoms, lab tests, and medications
- Smart Health Recommendations — 15+ condition-specific databases generating personalized diet, exercise, supplement, and follow-up plans
- AI Chat Assistant — Context-aware chat about your report findings in natural language
- Drug Interaction Checker — 30 clinically significant drug-drug pairs with 65+ medication aliases covering macrolides, aminoglycosides, PDE5 inhibitors, nitrates, anticonvulsants, and more
- Animated Health Score Ring — 60fps SVG donut with decorative tick marks, glow effects, end-dot cursor, inner rings, and risk-coded descriptions
- Organ System Radar Chart — Spider chart mapping risk across all body systems
- Biomarker Heatmap — Dense color-coded grid of all lab values with hover tooltips
- Interactive Organ System Map — SVG body silhouette with hover-activated glowing indicators, detail panels, and animated pulse rings for high-risk organs
- Critical Alert Banners — Dismissible severity-coded banners for critical findings
- Severity Ring Chart — SVG donut visualizing drug interaction severity distribution
- Animated Patient Summary — Counter animations, 6-metric strip, mini progress bar
- Premium Login Page — Gradient background, branded card, platform highlights, form validation
- Sign Up Page — 6-role selector, password strength indicator, confirm password with real-time match indicator
- Auth Context — localStorage session persistence, protected routes, user avatar dropdown
- Settings & Profile — Appearance customization, notification preferences, keyboard shortcuts, account management
- Doctor-Ready PDF Reports — Generated clinical reports with ReportLab
- Patient Summary Cards — Gradient avatar, animated counters, risk badges, stacked progress bar
- Trend Analysis — Track health progression across multiple reports
- Print-Optimized Styles — Clean print output for physical copies
┌─────────────────────────────────────────────────────────┐
│ React 19 Frontend │
│ Dashboard · Upload · Results · Drug Checker · Settings │
│ 25+ Premium Components · Tailwind CSS v4 │
├─────────────────────────────────────────────────────────┤
│ FastAPI Backend │
│ REST API · SQLAlchemy ORM · Async I/O │
├──────────────┬─────────────────┬────────────────────────┤
│ OCR Engine │ NLP Pipeline │ Knowledge Graph │
│ PyMuPDF │ Reference │ Medical Ontology │
│ Tesseract │ Ranges (100+) │ Diseases/Symptoms │
├──────────────┴─────────────────┴────────────────────────┤
│ AI Services Layer │
│ 20 Clinical Rules · 30 Drug Pairs · Risk Scoring │
│ Recommendations · Trend Analysis · Report Generation │
├─────────────────────────────────────────────────────────┤
│ SQLite / PostgreSQL │
│ Patients · Reports · Lab Results · Insights │
└─────────────────────────────────────────────────────────┘
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite, Tailwind CSS v4, Recharts, Axios |
| Backend | Python 3.12+, FastAPI, SQLAlchemy (async), Pydantic |
| OCR | PyMuPDF (fitz), Tesseract OCR |
| Database | SQLite (dev), PostgreSQL (prod) |
| PDF Export | ReportLab |
| Auth | Session-based (frontend), JWT-ready (backend) |
| Deployment | Vercel (frontend), Render (backend), Docker |
| CI/CD | GitHub Actions (lint, test, build, security audit) |
- Python 3.12+
- Node.js 20+
- Tesseract OCR (optional, for scanned PDFs)
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000cd frontend
npm install
npm run devVisit http://localhost:5173 — the frontend connects to the backend automatically.
cd backend
python -m pytest tests/ -v --tb=short# Backend
DATABASE_URL=sqlite+aiosqlite:///./medbios.db
CORS_ORIGINS=http://localhost:5173,https://your-domain.com
GOOGLE_API_KEY=your-gemini-key # Optional: for AI chat features
# Frontend (Vercel)
VITE_API_URL=https://your-backend.onrender.com| Method | Endpoint | Description |
|---|---|---|
POST |
/api/reports/upload |
Upload PDF for analysis |
GET |
/api/reports/ |
List all reports |
GET |
/api/reports/{id} |
Get report details |
GET |
/api/reports/{id}/recommendations |
AI health recommendations |
POST |
/api/reports/{id}/chat |
Chat with report |
POST |
/api/reports/drug-interactions/check |
Drug interaction check |
GET |
/api/reports/analytics/dashboard |
Dashboard analytics |
GET |
/api/reports/export/{id}/pdf |
Download PDF report |
GET |
/api/reports/knowledge-graph/stats |
Knowledge graph statistics |
| Component | Description |
|---|---|
HealthScoreRing |
Multi-ring SVG donut with tick marks, glow, and end-dot cursor |
SystemRadarChart |
Recharts radar chart for organ system risks |
BiomarkerHeatmap |
Color-coded grid with hover tooltips |
CriticalAlerts |
Dismissible severity-coded alert banners |
PatientSummaryCard |
Animated counters, 6 metrics, stacked progress bar |
OrganSystemVis |
Interactive SVG body map with hover detail panels |
HealthRecommendations |
Expandable accordion with diet/exercise/supplements |
ReportChat |
Floating AI chat panel with typing indicators |
AbnormalFindings |
Sortable lab table with severity bars |
ClinicalInsights |
Evidence-based clinical condition cards |
RiskScores |
System-level risk progress bars with animated filling |
KnowledgeGraphViz |
Interactive knowledge graph visualization |
DoctorReport |
Comprehensive clinical report with 20-rule + 30-pair stats |
SkeletonLoader |
6 types: card, stats, hero, table, heatmap, profile, chat |
ToastProvider |
4-type notification system |
SeverityRing |
SVG donut for drug interaction severity distribution |
Login |
Premium login with gradient orbs and platform highlights |
Signup |
Premium signup with password strength and role selector |
Settings |
5-section settings: Profile, Appearance, Notifications, Shortcuts, About |
- Push this repo to GitHub
- Go to render.com → New → Blueprint
- Connect your GitHub repo — Render auto-reads
render.yamland provisions:- A free PostgreSQL database (
medbios-db) - A free Python web service (
medbios-ai-backend) with all env vars wired up
- A free PostgreSQL database (
- After deploy, note your backend URL:
https://medbios-ai-backend.onrender.com
Manual setup (without Blueprint):
- Connect GitHub repo → set root directory to
backend - Build command:
pip install -r requirements.txt - Start command:
uvicorn main:app --host 0.0.0.0 --port $PORT - Health check path:
/health - Add env vars (see table below)
- Connect GitHub repo → set root directory to
frontend - Framework preset: Vite
- Add environment variable:
VITE_API_URL=https://medbios-ai-backend.onrender.com/api - Deploy —
frontend/vercel.jsonhandles SPA routing and security headers automatically
| Variable | Where | Description | How to Generate |
|---|---|---|---|
DATABASE_URL |
Render | PostgreSQL connection string | Auto-injected by Render Blueprint |
JWT_SECRET_KEY |
Render | JWT signing secret | python -c "import secrets; print(secrets.token_hex(32))" |
MEDBIOS_ENCRYPTION_KEY |
Render | Fernet encryption key | python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" |
CORS_ORIGINS |
Render | Comma-separated allowed origins | https://your-app.vercel.app,http://localhost:5173 |
GOOGLE_API_KEY |
Render | Gemini Vision OCR (optional) | Google AI Studio |
VITE_API_URL |
Vercel | Backend API base URL | https://medbios-ai-backend.onrender.com/api |
VITE_WS_URL |
Vercel | WebSocket base URL | wss://medbios-ai-backend.onrender.com |
# 1. Clone
git clone https://github.com/your-username/MedBios-AI.git
cd MedBios-AI
# 2. Backend
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp ../.env.example .env # edit .env with your values
uvicorn main:app --reload --port 8000
# 3. Frontend (new terminal)
cd frontend
npm install
npm run dev
# Visit http://localhost:5173
# 4. Generate secrets (first-time setup)
python -c "import secrets; print(secrets.token_hex(32))"
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"The project includes a comprehensive GitHub Actions workflow:
- Backend: Python lint (Ruff), tests (pytest), type checking (pyright)
- Frontend: ESLint, production build with artifact upload
- Security: npm audit + safety checks
- Deployment gate: All checks must pass before release
MIT License — free to use, modify, and distribute.
Built with AI, for humanity.
MedBios AI is for informational purposes only. Always consult your healthcare provider.