Harden API memory and CPU usage across Phases 19–22.
Bound list/PDF payloads, stream MinIO I/O with cancellation, paginate history and FHIR $everything, tighten OCR lifetimes/buffers, and add phase tracking docs.
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
# Phase 17 — Supporting Screens
|
||||
|
||||
## What exists
|
||||
|
||||
From [Phases 14–16](./phase-16-plan.md): shell, tokens, primitives, redesigned Entry/Verification/Approval.
|
||||
|
||||
Supporting views still use pre-redesign layout density and teal-era patterns (they inherit tokens if Phase 14 remapped utilities, but structure/copy need alignment):
|
||||
|
||||
| View | File | Role |
|
||||
|---|---|---|
|
||||
| Intake | [`IntakeView.vue`](../../vigilcare-records-web/src/views/IntakeView.vue) | Upload, cover sheet lookup, assign |
|
||||
| Cover Sheets | [`CoverSheetView.vue`](../../vigilcare-records-web/src/views/CoverSheetView.vue) | Generate / list / PDF |
|
||||
| Live Capture | [`LiveCaptureView.vue`](../../vigilcare-records-web/src/views/LiveCaptureView.vue) | Bedside observations |
|
||||
| Patient History | [`PatientHistoryView.vue`](../../vigilcare-records-web/src/views/PatientHistoryView.vue) | Digitization timeline |
|
||||
| Queue Dashboard | [`QueueDashboardView.vue`](../../vigilcare-records-web/src/views/QueueDashboardView.vue) | `work-queue/overview` |
|
||||
| FHIR Explorer | [`FhirExplorerView.vue`](../../vigilcare-records-web/src/views/FhirExplorerView.vue) | FHIR read UI |
|
||||
|
||||
Design reference: [design-doc.md](../designs/design-doc.md) §§11–13, 17–20; §36 (dashboard: work first, no infra health).
|
||||
|
||||
## What needs to be built
|
||||
|
||||
Restyle and restructure these screens with **existing data and actions only**. No fake metrics, SSO, MEWS, or multi-doc chrome.
|
||||
|
||||
Do not start Phase 18 until these screens meet success criteria.
|
||||
|
||||
---
|
||||
|
||||
## Step 1 — Intake
|
||||
|
||||
**[`IntakeView.vue`](../../vigilcare-records-web/src/views/IntakeView.vue)** (design-doc §12):
|
||||
|
||||
- Main column (~70%): upload zone + batch details (type, track, patient link, cover sheet code) — existing fields
|
||||
- Right (~30%): recent uploads / guidance
|
||||
- States: idle, uploading, success, error via Phase 15 patterns
|
||||
- Keep assign clerk dialog ([`AssignClerkDialog.vue`](../../vigilcare-records-web/src/components/AssignClerkDialog.vue))
|
||||
|
||||
Update [`__tests__/views/IntakeView.test.ts`](../../vigilcare-records-web/src/__tests__/views/IntakeView.test.ts) as needed.
|
||||
|
||||
---
|
||||
|
||||
## Step 2 — Cover Sheets
|
||||
|
||||
**[`CoverSheetView.vue`](../../vigilcare-records-web/src/views/CoverSheetView.vue)** (design-doc §13):
|
||||
|
||||
- Generation form + preview + existing list table
|
||||
- Clear primary CTA for generate / print PDF (existing endpoints)
|
||||
- StatusBadge for any status columns
|
||||
- Update [`__tests__/views/CoverSheetView.test.ts`](../../vigilcare-records-web/src/__tests__/views/CoverSheetView.test.ts)
|
||||
|
||||
---
|
||||
|
||||
## Step 3 — Live Capture
|
||||
|
||||
**[`LiveCaptureView.vue`](../../vigilcare-records-web/src/views/LiveCaptureView.vue)** (design-doc §17):
|
||||
|
||||
- Keep New / Existing encounter modes and attestation checkbox flows already implemented
|
||||
- Clearer section hierarchy: patient → encounter → observations → attestation → submit
|
||||
- **Do not add:** password re-entry step, MEWS/critical alert side panels, fake “submission outcome” cards without API data
|
||||
- Prefer table density for observations consistent with Phase 14 tokens
|
||||
|
||||
---
|
||||
|
||||
## Step 4 — Patient History
|
||||
|
||||
**[`PatientHistoryView.vue`](../../vigilcare-records-web/src/views/PatientHistoryView.vue)** (design-doc §18):
|
||||
|
||||
- Search + timeline using existing digitization-history payload
|
||||
- StatusBadge for batch statuses
|
||||
- Audit trail presentation: actor / timestamp / event type already in payload — improve readability
|
||||
- Promotion attribution: show names/roles from history response; do not invent “entry clerk promoted” if data shows approver (design-doc §36)
|
||||
|
||||
---
|
||||
|
||||
## Step 5 — Queue Dashboard
|
||||
|
||||
**[`QueueDashboardView.vue`](../../vigilcare-records-web/src/views/QueueDashboardView.vue)** (design-doc §§11, 19; §36):
|
||||
|
||||
Data source remains `GET work-queue/overview` only:
|
||||
|
||||
- `statusCounts`
|
||||
- `averageTimeInQueueMinutes`
|
||||
- `rejectRate`
|
||||
- `oldestPendingVerificationMinutes`
|
||||
- Existing batch list section if already loaded via batch list API
|
||||
|
||||
**Prioritize work metrics** (pending entry, in entry, pending verification, oldest age, reject rate).
|
||||
|
||||
**Must not add:** PostgreSQL / Redis / MinIO / FHIR API uptime cards, vanity trend sparklines without data, Quick Actions that deep-link nowhere.
|
||||
|
||||
Supervisor framing is fine; this is the administrator dashboard today (`canSupervise`).
|
||||
|
||||
---
|
||||
|
||||
## Step 6 — FHIR Explorer
|
||||
|
||||
**[`FhirExplorerView.vue`](../../vigilcare-records-web/src/views/FhirExplorerView.vue)** (design-doc §20):
|
||||
|
||||
- Visual polish only: shell, typography, tables, JSON panel
|
||||
- Keep existing fhirClient behavior
|
||||
- Update [`__tests__/views/FhirExplorerView.test.ts`](../../vigilcare-records-web/src/__tests__/views/FhirExplorerView.test.ts) if selectors change
|
||||
|
||||
---
|
||||
|
||||
## Success criteria
|
||||
|
||||
- [ ] All six views render inside AppShell with consistent tokens
|
||||
- [ ] Intake/Cover Sheets usable for existing upload/generate flows
|
||||
- [ ] Live Capture submit/attestation still works; no invented clinical alert UI
|
||||
- [ ] Dashboard shows only overview-backed metrics (no infra health)
|
||||
- [ ] Patient History timeline/audit readable; StatusBadges applied
|
||||
- [ ] FHIR Explorer functional parity preserved
|
||||
- [ ] `npm test` passes
|
||||
|
||||
## Out of scope
|
||||
|
||||
- Users admin, batch events panel, work-queue endpoint swap (Phase 18)
|
||||
- Global search, notifications, reports, master data
|
||||
- Changing Live Capture API to require password confirm if not already required by backend
|
||||
|
||||
## Verification
|
||||
|
||||
1. `cd vigilcare-records-web && npm test`
|
||||
2. Manual smoke per role: intake upload, cover sheet generate, live capture observation, patient search/history, admin dashboard refresh, FHIR metadata/search
|
||||
3. Confirm dashboard has **no** service-uptime widgets
|
||||
|
||||
## Gate
|
||||
|
||||
Do not start [Phase 18](./phase-18-plan.md) until success criteria above are met.
|
||||
Reference in New Issue
Block a user