# Nigeria Healthcare Intelligence System (NHIS) — Cavista Hackathon
**Team:** Mannalon
**Frontend (this repo — maintained by @prosperisadev):**
github.com
**Frontend author GitHub:**
github.com
**Backend (main backend repo):**
github.com
HealthConnect Nigeria (NHIS) is a lightweight, mobile-first clinical flow that helps:
- **CHEWs** capture patient vitals + complaints quickly
- **Patients** get a **Health QR** they can share
- **Doctors** scan the QR to view the patient’s latest record, see AI-generated summaries, and get trend/preventive insights
## Live/Production Architecture
- **Frontend:** Vite + React + TypeScript + Tailwind (deployed on Vercel)
- **Backend:** Spring Boot (deployed on Render)
- **Routing in prod:** the frontend uses same-origin `/api/*` and Vercel rewrites it to Render
- See vercel.json
## Core Product Flow
### 1) CHEW captures a visit
- Register patient demographics
- Submit a visit with:
- Chief complaint (free text)
- Vitals (BP, temp, pulse, SpO₂, etc.)
- Location
- Backend returns:
- `qrToken`
- risk level
- AI summary
### 2) Patient receives a QR
- QR encodes a URL like: `/doctor/patient/{qrToken}`
- This is the “Health ID” used for doctor lookup
### 3) Doctor scans QR
- The Doctor view fetches `/api/patients/qr/{qrToken}`
- Shows:
- patient profile
- latest visit + vitals
- AI summary
- local trend analysis + preventive guidance (frontend-only)
## Key Frontend Paths
- App entry: src/main.tsx
- Routing: src/App.tsx
### Pages
- CHEW
- Dashboard: src/pages/CHEWDashboard.tsx
- New patient capture: src/pages/NewPatient.tsx
- Patient result + QR: src/pages/PatientResult.tsx
- Doctor
- Dashboard: src/pages/DoctorDashboard.tsx
- Manual QR entry: src/pages/DoctorScan.tsx
- QR patient record view: src/pages/DoctorPatientView.tsx
- Shared
- Leaderboard: src/pages/Leaderboard.tsx
### API Layer
- Fetch client + endpoints: src/lib …