Nigeria Clinical Referral Decision Support System
# RefPath
### Nigeria Clinical Referral Decision Support System
---
## What is RefPath?
RefPath is an AI-powered clinical referral decision support tool built specifically for Nigeria. A community health worker or clinician types a patient presentation in plain English and gets back:
- ✅ The matched clinical condition from NSTG 2022
- ✅ Appropriate level of care (primary, secondary, or tertiary)
- ✅ Urgency classification (emergency, urgent, or routine)
- ✅ Immediate intervention from Nigerian clinical guidelines
- ✅ Nearest appropriate health facilities ranked by distance
**Try it live:** refpath.streamlit.app
---
## The Problem
Nigeria's referral system fails not because clinicians don't know when to refer — but because no tool exists that tells them *where* to refer. A CHW in rural Ondo who knows a patient needs tertiary care still has to figure out which facility to go to, how far it is, and what to do in the meantime.
RefPath fills that gap — the referral decision layer that sits on top of clinical knowledge.
> *"You know what the patient needs. RefPath tells you where to take them."*
---
## How It Works
```
User Input (free text)
↓
Gemini 3.6 Flash → Match against 285 clinical scenarios
↓
Extract: condition, care level, urgency, intervention
↓
Haversine Distance → Rank 37,261 facilities by proximity
↓
Return: Referral recommendation + nearest facilities
```
---
## Example
**Input:** `"Pregnant woman with fits and high blood pressure"`
**Output:**
```
🔴 Eclampsia
Urgency: EMERGENCY | Care Level: TERTIARY
Immediate Action:
Secure airway, place in left lateral position. Give IV/IM magnesium
sulphate 4g loading dose over 5 minutes. Control BP with IV hydralazine
5-10mg or labetalol 20mg IV. Insert urinary catheter. Deliver baby
urgently. Transfer immediately to tertiary facility.
Source: FMOH Maternal Health Guidelines 2016
Nearest Tertiary Facilities:
📍 State Specialist Hospital — Ondo West, Ondo · 1.8 km
📍 Flomer Garden Specialist Hospit …