# Logic PDF Coverage Matrix — Patient Booking & Treatment Management System

Every section of the logic document mapped to what was built. ✅ done · ✳️ done with a
noted adaptation (see `assumptions.md`).

| # | PDF Section | Status | Where |
|---|-------------|--------|-------|
| 1 | User Roles & Permissions (Admin/Staff/Doctor) | ✅ | RBAC middleware + `UserPolicy`; dynamic per-user module access; admin-created accounts, no self-signup |
| 2 | Dashboard (analytics, overviews, today's schedule, breakdowns) | ✅ | `Admin\DashboardController` + charts |
| 3 | Patient Management (Patient→Doctor→Dept→Diagnosis→Appointment) | ✅ | `PatientController@store` creates patient + allocated appointment |
| 4 | Frontend Appointment Booking | ✳️ | Public wizard; **date-only, no time slot** (F6) |
| 5 | Doctor Allocation | ✅ | `AllocationController` + allocate modal |
| 6 | Clinical Disease / Diagnosis Management (cost per sitting) | ✳️ | Single billable catalog; **"service" merged into "Clinical Disease / Diagnosis"** (F7) |
| 7 | Medicine Directory (multi-composition) | ✅ | `MedicineController` + composition rows |
| 8 | Doctor Dashboard | ✅ | `Doctor\DashboardController` |
| 9 | Doctor Consultation | ✅ | `Doctor\ConsultationController` workspace |
| 10 | Doctor Notes (latest + history) | ✅ | `consultation_notes` history table |
| 11 | Diagnosis (searchable select) | ✳️ | Same entity as §6 (F7); selectable in consultation |
| 12 | Treatment / Service Selection (auto cost) | ✅ | Live `cost_per_sitting × sittings` |
| 13 | Follow-Up Appointment | ✅ | Consultation completes → next appointment created |
| 14 | Medicine & Prescription (auto-generate) | ✅ | Prescription + items on complete; printable, matches F9 image |
| 15 | Billing & Payment (auto calc, remaining) | ✅ | Per-patient ledger; `balanceDue()` |
| 16 | Record Payment Modal (tabs) | ✳️ | Same 5 tabs as a **tabbed page** rather than one modal |
| 17 | Payment History | ✅ | Billing detail → History tab |
| 18 | Summary & Ledger | ✅ | Billing detail → Summary & Ledger tab |
| 19 | Treatment Procedures | ✳️ | Merged with treatments (F10); add via billing tab |
| 20 | Patient Documents (upload / download prescription) | ✅ | Documents tab; images→WebP; prescription print links |
| 21 | Complete Patient Financial/Medical Record | ✅ | Patient-360 profile + billing detail |
| 22 | Bulk Broadcasting (SMS + Email, segments) | ✅ | Tubelight gateway + Mail, queued; segment resolver |
| 23 | Message Templates (variables) | ✅ | Template CRUD + `{variable}` renderer |
| 24 | Reports (Admin only) | ✅ | `ReportController`; staff blocked |
| 25 | Doctor Management | ✅ | Via user management (combined form) + Doctors directory |
| 26 | Staff Management | ✅ | `UserController` (role-based) |

**Adaptations (all in `assumptions.md`):** date-only booking (F6); "service" and "Clinical Disease
/ Diagnosis" unified (F7); procedures merged into treatments (F10); record-payment as a tabbed page;
lean custom auth instead of Breeze (F19); uploads converted to WebP (F17).
