Files
vigilcare-records/docs/plans/phase-17-plan.md
T
Trent a17bc2b734
CI / changes (push) Successful in 17s
dotnet8-ci / build-and-test (push) Successful in 8m23s
CI / backend (push) Successful in 8m24s
node-ci / build (push) Failing after 2m1s
CI / frontend (push) Failing after 2m2s
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.
2026-11-30 23:55:56 +08:00

5.5 KiB
Raw Blame History

Phase 17 — Supporting Screens

What exists

From Phases 14–16: 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 Upload, cover sheet lookup, assign
Cover Sheets CoverSheetView.vue Generate / list / PDF
Live Capture LiveCaptureView.vue Bedside observations
Patient History PatientHistoryView.vue Digitization timeline
Queue Dashboard QueueDashboardView.vue work-queue/overview
FHIR Explorer FhirExplorerView.vue FHIR read UI

Design reference: 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 (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)

Update __tests__/views/IntakeView.test.ts as needed.


Step 2 — Cover Sheets

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

Step 3 — Live Capture

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 (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 (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 (design-doc §20):


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 until success criteria above are met.