🏥 SETU+ — Swasthya Examination & Triage Unit Plus
A complete AI-assisted healthcare platform with three components:
- Clinic Kiosk — Touchscreen patient intake & AI triage
- Doctor Dashboard — Web-based review & prescription portal
- Patient Mobile App — Expo/React Native prescription & delivery tracking
🚀 Quick Start
1. Clone & Setup
git clone https://github.com/yourusername/setu-plus.git
cd setu-plus
cp .env.template .env
2. Run with Docker (Recommended)
docker-compose up --build
Access: | Service | URL | |---|---| | 🏥 Kiosk | http://localhost:3000 | | 👨⚕️ Doctor Dashboard | http://localhost:3001 | | 🔌 Backend API | http://localhost:5000 | | 📚 API Health | http://localhost:5000/api/health |
3. Run Without Docker
Backend:
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python app.py
Kiosk:
cd kiosk
npm install --legacy-peer-deps
npm start # Opens on localhost:3000
Doctor Dashboard:
cd doctor-dashboard
npm install --legacy-peer-deps
npm start # Opens on localhost:3001 (or 3002 if 3001 is taken)
Patient App:
cd patient-app
npm install --legacy-peer-deps
npx expo start
# Scan QR code with Expo Go app
# Or press 'w' for web preview
🔑 Demo Credentials
| Component | Login |
|---|---|
| Doctor Dashboard | [email protected] / demo123 |
| Kiosk / Patient App | Any 10-digit phone + OTP: 123456 |
📁 Project Structure
setu-plus/
├── backend/ # Flask Python API
│ ├── app.py # Main Flask app + WebSocket
│ ├── config.py # Configuration
│ ├── database.py # SQLAlchemy models
│ ├── routes.py # All API routes
│ ├── triage_engine.py # AI triage decision tree
│ ├── seed_data.py # Demo data seeder
│ ├── requirements.txt
│ └── Dockerfile
│
├── kiosk/ # React kiosk app (5 screens)
│ ├── src/
│ │ ├── App.jsx # All screens in one file
│ │ └── index.js
│ ├── public/index.html
│ ├── package.json
│ └── Dockerfile
│
├── doctor-dashboard/ # React doctor portal
│ ├── src/
│ │ ├── App.jsx # Login + Dashboard + Patient Detail
│ │ └── index.js
│ └── ...
│
├── patient-app/ # Expo React Native app
│ ├── App.js # All screens
│ └── package.json
│
├── docker-compose.yml
├── .env.template
├── .gitignore
└── README.md
🤖 AI Triage Logic
The triage engine (backend/triage_engine.py) uses a rule-based decision tree:
| Condition | Tier |
|---|---|
| SpO₂ < 90% | 🔴 Tier 3 — Emergency |
| Fever > 104°F | 🔴 Tier 3 — Emergency |
| Chest Pain | 🔴 Tier 3 — Emergency |
| Breathing Difficulty | 🔴 Tier 3 — Emergency |
| BP > 180 systolic | 🔴 Tier 3 — Emergency |
| Headache + High BP + Vision Changes | 🔴 Tier 3 — Emergency |
| Fever + Cough + SpO₂ ≥ 95% | 🟡 Tier 2 — Hospital |
| Fever 102-104°F | 🟡 Tier 2 — Hospital |
| Abdominal Pain + Vomiting + Fever | 🟡 Tier 2 — Hospital |
| Mild symptoms, normal vitals | 🟢 Tier 1 — Home Care |
📡 API Reference
Kiosk APIs
POST /api/kiosk/send-otp → Send OTP to phone
POST /api/kiosk/verify-otp → Verify OTP, get/create patient
POST /api/kiosk/update-patient → Update patient details
POST /api/kiosk/start-visit → Start new visit session
POST /api/kiosk/submit-symptoms → Save symptom data
POST /api/kiosk/submit-vitals → Save vitals + get alerts
POST /api/kiosk/run-triage → Run AI triage algorithm
POST /api/kiosk/submit-to-doctor → Send to doctor queue
Doctor APIs
POST /api/doctor/login → Doctor authentication
GET /api/doctor/patients → Get waiting patients
GET /api/doctor/patient/:id → Get patient details + history
POST /api/doctor/prescription → Submit prescription
PUT /api/visit/:id/complete → Mark visit complete
GET /api/doctor/stats → Dashboard statistics
Patient APIs
POST /api/patient/send-otp → Send OTP (app)
POST /api/patient/verify-otp → Login/register patient
GET /api/patient/profile/:id → Get patient profile
PUT /api/patient/profile/:id → Update profile
GET /api/patient/prescriptions/:id → Get all prescriptions
GET /api/patient/visits/:id → Get visit history
GET /api/patient/vitals/:id → Get vitals trend data
POST /api/patient/emergency → Dispatch ambulance (mock)
GET /api/patient/delivery/track/:id → Track delivery status
Video APIs
POST /api/videos/upload → Upload video (file or URL)
GET /api/videos/all → Get all videos (filterable)
DELETE /api/videos/:id → Soft-delete video
🗄️ Database Schema
patients — id, phone, name, age, gender, medical_history, allergies, ...
doctors — id, name, email, password_hash, specialty, clinic_name, ...
visits — id, patient_id, doctor_id, symptoms, vitals, ai_tier, ai_confidence, status, ...
prescriptions — id, visit_id, medicine_name, dosage, frequency, duration, delivery_status, ...
videos — id, title, url, category, thumbnail_url, ...
🌐 Deployment
Vercel (Frontend)
# Kiosk
cd kiosk && npm run build
vercel deploy --prod
# Doctor Dashboard
cd doctor-dashboard && npm run build
vercel deploy --prod
Railway / Render (Backend)
Set environment variables and deploy from GitHub.
Expo (Mobile App)
cd patient-app
npx eas build --platform android
npx eas build --platform ios
🔧 Tech Stack
| Layer | Technology |
|---|---|
| Kiosk Frontend | React 18, Axios |
| Doctor Frontend | React 18, Axios, Socket.io |
| Backend | Flask 3, Flask-SocketIO, SQLAlchemy |
| Database | SQLite (dev) / PostgreSQL (prod) |
| Mobile App | Expo + React Native |
| Real-time | WebSocket (Socket.io) |
| Containerization | Docker + Docker Compose |
✅ Features Checklist
- [x] Patient OTP login (kiosk + app)
- [x] AI symptom chatbot with follow-up questions
- [x] Hindi + English support
- [x] Vitals entry with alerts for critical values
- [x] AI triage (15+ rules, 3 tiers)
- [x] Real-time doctor queue (WebSocket)
- [x] Prescription writing (multi-medicine)
- [x] Patient mobile app (all 7 screens)
- [x] Delivery tracking (mock)
- [x] Emergency ambulance dispatch (mock)
- [x] Video upload and management
- [x] Visit history + vitals trends
- [x] Docker containerization
- [x] Demo data seeder
📄 License
MIT License — Free for educational and healthcare use.
Built with ❤️ for accessible rural healthcare in India 🇮🇳
Built With
- dockerfile
- html
- javascript
- python
- shell
Log in or sign up for Devpost to join the conversation.