--- title: EdgeMed API emoji: ๐Ÿฅ colorFrom: blue colorTo: indigo sdk: docker pinned: false --- # EdgeMed Clinical BERT API FastAPI backend for the EdgeMed edge-intelligence emergency routing framework. ## Endpoints | Method | Path | Description | |--------|------|-------------| | GET | `/` | Health check | | POST | `/triage` | CAG + BERT triage pipeline | | POST | `/route` | KAG hospital routing | | GET | `/zones` | Zone + availability info | ## Model Fine-tuned `Mahdiya/edgemed-clinical-bert` on 1,267 KTAS-ED patients. Accuracy: **71.7%** ยท ESI classification (ESI-1 to ESI-5) ## Pipeline ``` Symptom text โ””โ”€โ–บ CAG keyword check โ”œโ”€ ESI-1 / ESI-2 hit โ†’ BYPASS BERT โ†’ immediate routing โ””โ”€ No critical hit โ†’ BERT inference โ†’ ESI 3/4/5 โ””โ”€โ–บ ฮฑ-weighted KAG routing ```