User Interface Use Cases (UI)¶
UC-UI-001: View Patient List¶
Purpose: Oncologist finds a patient to review.
Main Success Scenario:
- User logs in.
- System displays list of assigned patients.
- User types name in search bar.
- System filters list in real-time.
- User clicks a patient row.
- System navigates to UC-UI-002.
Acceptance Criteria:
- [ ] Search works on Name and ABHA ID
- [ ] Pagination for lists > 20 items
UC-UI-002: View Patient Overview¶
Purpose: See high-level summary (Diagnosis, Stage, Vitals).
Main Success Scenario:
- Page loads
GET /api/patients/:id. - System renders "Patient Card" (Name, Age).
- System renders "Cancer Summary" (Site, Stage).
- System renders "Recent Alerts" (Critical labs).
- System renders "Vitals Sparklines".
Acceptance Criteria:
- [ ] Loads in < 1.5s
- [ ] Critical alerts are visually distinct (Red)
UC-UI-003: View Timeline¶
Purpose: Understand the chronological cancer journey.
Main Success Scenario:
- User clicks "Timeline" tab.
- System renders vertical timeline component.
- Events grouped by month/year.
- User clicks "Chemo Cycle 1".
- System expands details (Regimen, Dates).
Acceptance Criteria:
- [ ] Scroll performance smooth with 500+ events
- [ ] Filters available by event type
UC-UI-004: View Lab Trends¶
Purpose: Monitor blood counts during chemotherapy.
Main Success Scenario:
- User clicks "Labs" tab.
- System displays table of recent results.
- User selects "Hemoglobin".
- System renders line chart (6 months).
- Critical values (<7.0) highlighted.
Acceptance Criteria:
- [ ] Interactive tooltips on chart points
- [ ] Reference ranges visualized as shaded area
UC-UI-005: Acknowledge Clinical Alert¶
Purpose: Ensure oncologists can acknowledge and document alert handling.
Main Success Scenario:
- Alert banner appears with severity color coding.
- User clicks "Acknowledge".
- Modal prompts for optional comment + next action.
- User submits; UI disables alert and shows "Acknowledged by Dr. Rao".
- API call
POST /api/alerts/{id}/ackpersists status. - Activity feed records acknowledgement entry.
Acceptance Criteria:
- [ ] Only assigned oncologist can acknowledge
- [ ] Comments limited to 500 chars with markdown preview
- [ ] Undo available for 30s
UC-UI-006: Annotate Document¶
Purpose: Allow clinicians to highlight and tag portions of OCR documents.
Main Success Scenario:
- User opens document viewer.
- Selects text span; context toolbar appears.
- User chooses tag (e.g., "Med Change") and adds note.
- Annotation saved via
POST /api/documents/{docId}/annotations. - Tag icon appears inline; hovering reveals note + author + timestamp.
- All annotations listed in side panel with filter + jump-to.
Acceptance Criteria:
- [ ] Supports overlapping annotations without rendering glitches
- [ ] Stores page + coordinate metadata for each annotation
- [ ] Permissions enforce read-only mode for non-authorized viewers
UC-UI-007: Compare Lab Panels¶
Purpose: Visualize two lab panels side-by-side for treatment decision-making.
Main Success Scenario:
- User selects two lab types (e.g., CBC vs CMP) from dropdowns.
- UI fetches
/api/patients/{id}/labs?panel=cbe&panel=cmp. - Two synchronized charts render with shared x-axis (date).
- Brushing over date range updates both charts simultaneously.
- Critical thresholds display as horizontal bands.
- User exports comparison as PNG/PDF.
Acceptance Criteria:
- [ ] Charts stay responsive under 5 years of monthly data
- [ ] Download respects dark/light theme
- [ ] Keyboard navigation accessible for all controls
UC-UI-008: Manage Worklist Queue¶
Purpose: Provide triage board for new documents/jobs requiring review.
Main Success Scenario:
- User opens "Worklist" tab.
- Table lists jobs with columns (Type, Patient, SLA, Status).
- User drags job card to "In Progress" lane (Kanban mode) or assigns via dropdown.
- UI calls
POST /api/worklist/{jobId}/assignwith userId. - Job row updates in real-time via SSE when state changes.
- User filters by SLA or modality using chips.
Acceptance Criteria:
- [ ] SLA color coding (<2h amber, <30m red)
- [ ] Supports bulk selection + assign
- [ ] Persisted column layout per user profile
Related: API | Alerts | Doctor Workflows