USSD + WhatsApp health check-in system for Eswatini"
# Sibonga Health 🏥
**USSD + WhatsApp Health Check-in System for Eswatini**
Patient dials `*123#` → Reports health status → Nurse dashboard shows red alerts instantly → Export data for MOH.
Built for **Mbabane Clinic**, Eswatini. Works on Nokia phones. Zero data required.
---
## 🎯 Features
| Feature | What It Does | User |
|---------|-------------|------|
| **USSD Menu** | Patient dials `*123#` → Answers 3 questions in siSwati | Patient (any phone) |
| **Red Alerts** | Chest pain → Alert on nurse dashboard in real-time | Nurse (laptop) |
| **SMS Reminders** | Auto-SMS at 7am day before appointment | Patient |
| **Nurse Dashboard** | See all patients who checked in + urgent cases | Nurse (web) |
| **CSV Export** | Download daily report for MOH | Clinic manager |
| **Self-Registration** | Patient dials `*123*4#` to register themselves | Patient |
---
## ⚡ Quick Start (5 minutes)
### 1. Install Dependencies
```bash
pip install -r requirements.txt
```
### 2. Setup Database
**Option A: Local PostgreSQL**
```bash
creatdb sibonga_db
psql sibonga_db OK
curl -X POST
localhost \
-d "phoneNumber=26876123456&text=1*1"
# Check-in -> Urgent
curl -X POST
localhost \
-d "phoneNumber=26876123456&text=1*3"
```
### Test with Africa's Talking Sandbox
1. Sign up:
africastalking.com
2. Go to USSD → Create app
3. Set callback URL: `
your-railway-url`
4. Use Africa's Talking simulator to test
### Test Dashboard
1. Create patient in database: `INSERT INTO patient (phone, name, next_appointment) VALUES ('+26876123456', 'Test', '2026-04-20');`
2. Generate check-in: `curl -X POST
localhost -d "phoneNumber=26876123456&text=1*3"`
3. Visit:
localhost
4. You should see red alert
---
## 🚀 Deployment to Production
### Deploy on Railway.app (Recommended)
1. **Push to GitHub** (if not already)
```bash
git push origin main
```
2. **Create Railway project**
- Go to
railway.app
- Click …