Bound list/PDF payloads, stream MinIO I/O with cancellation, paginate history and FHIR $everything, tighten OCR lifetimes/buffers, and add phase tracking docs.
6.1 KiB
Phase 16 — Core Digitization Workstation (Entry, Verification, Approval)
What exists
From Phase 14 + Phase 15: shell, tokens, shared primitives.
Workstation screens today:
| View | Files | Layout |
|---|---|---|
| Data Entry | EntryView.vue, EntryForm.vue |
Queue list or scan + form split |
| Verification | VerificationView.vue, VerificationForm.vue |
Same pattern |
| Clinical Approval | ApprovalView.vue |
Same pattern + approval panel |
| Scan | ScanViewer.vue |
Document iframe/blob |
Stores/API: stores/batches.ts — draft CRUD, submit, verify, reject, approve. Do not change endpoint contracts.
Design reference: design-doc.md §§14–16, §22 (density), §34 (evidence hierarchy).
What needs to be built
Redesign the three high-risk screens for dense, scan-first workflows. Same store methods and routes. Apply Phase 15 SoD, OCR badges, sticky action bars, status badges, confirm dialogs.
Do not start Phase 17 until Entry, Verification, and Clinical Approval meet success criteria.
Step 1 — Shared workstation layout pattern
Introduce a consistent layout (component or shared structure in each view):
- Optional left rail: queue / document list (when useful) — can show assigned/pending items while a batch is open, without new APIs (reuse current list payloads)
- Center: source scan (
ScanViewer) — dominant evidence (Level 1) - Right: structured form / draft / clinical summary — Levels 2–4
Queue-only mode (no batchId) remains a full-width list with EmptyState/skeletons.
Target desktop width ≥1280px; do not force phone layouts for these flows (design-doc §32).
Step 2 — Scan viewer chrome
Polish ScanViewer.vue:
- Neutral page surface, subtle page shadow only
- Controls: zoom, fit width (keep existing capabilities; add only if trivial)
- Loading/error via Phase 15 patterns
- No decorative overlays or “AI confidence” chrome on the image itself
Step 3 — Data Entry
EntryView.vue / EntryForm.vue:
- Dense form sections driven by existing
fieldRequirements(unchanged logic) - OCR badges + assistive banner (Phase 15)
- Sticky
WorkstationActionBar:- Left: reject/flag if already supported; otherwise omit
- Center: Save Draft (existing autosave/save)
- Primary: Submit for Verification
- Right: optional next-batch navigation if list context exists
- Autosave feedback per design-doc §9 (use existing save behavior; improve visible “Last saved” if data available)
Update tests in __tests__/components/EntryForm.test.ts.
Step 4 — Verification
VerificationView.vue / VerificationForm.vue:
- Mount
SeparationOfDutiesBanner; disable Pass when same user - Source scan + draft with validation markers remain primary; avoid analytics chrome
- Sticky actions:
- Pass Verification when pass selected
- Return for Rework when reject selected (with reason — existing reject flow)
- Avoid generic “Submit Decision” labeling
- Confirm dialog for reject if not already modal-confirmed
Update __tests__/components/VerificationForm.test.ts.
Step 5 — Clinical Approval
- Visually distinct from verification (stronger clinical framing, not a clone with purple chip only)
- Show scan + verified draft summary; highlight high-stakes fields from existing draft data when present
- Retroactive alerts toggle: keep existing
enableRetroactiveAlertsbehavior; copy per design-doc §16 - Primary: Approve & Promote via
ConfirmDialogstating promotion to live clinical tables - Destructive: Reject Batch with reason
- Post-success: show promotion result if already returned by API (
promotion-result/ approve response fields) — polish presentation only
Step 6 — Evidence hierarchy (copy + visual weight)
Across all three screens, reinforce design-doc §34:
- Source scan
- Entered / verified structured data
- Verification / approval decision controls
- Promotion outcome
Do not let secondary panels overpower the scan or draft.
Success criteria
- Entry, Verification, Approval use shell + dense split layout; sticky CTAs with design-doc labels
- SoD enforced in Verification UI; OCR badges on Entry/Verification when confidence present
- Approve & Promote uses confirmation copy about live promotion
- No new API calls beyond what stores already perform (except optional read-only list for queue rail using existing list/queue fetch)
- Component/view tests updated and
npm testpasses - Manual: walk upload→entry→verify→approve on seed data still works end-to-end
Out of scope
- OCR region click-to-highlight
- Multi-document batch progress (18/76)
- Switching queues to
work-queue/*endpoints (Phase 18) - Batch events audit panel (Phase 18)
- Intake / Live Capture / Dashboard restyle (Phase 17)
Verification
cd vigilcare-records-web && npm test- Manual E2E with seeded users through Entry → Verification → Clinical Approval
- Manual: same-user verify attempt shows SoD block
- Spot-check against design-doc §§14–16 (ignore mockup infra/analytics clutter)
Gate
Do not start Phase 17 until success criteria above are met.