feature: Degraded Operations Visibility

This commit is contained in:
voltsrage
2026-06-23 23:18:31 +08:00
parent 940e27c0ac
commit 4399996448
81 changed files with 3949 additions and 323 deletions
+60 -43
View File
@@ -19,6 +19,22 @@ Each item includes **who needs it** (clinical role), **why** it matters for pati
---
## Implementation progress
**Last updated:** June 2026
| Status | Count | Items |
|--------|------:|-------|
| **Done** | 22 | #118, #2023, #25 |
| **Partial** | 1 | #26 (core WCAG improvements shipped; full audit not completed) |
| **Open** | 5 | #19, #24, #27, #28 |
**Recently completed (dashboard phases 2223):** scoring history charts (SOFA, GCS, qSOFA), patient banner, encounter timeline, medication chart markers, ward table clinical columns with sort/search, sepsis board, department overview, critical alert banner, handoff report, discharge summary panel, vitals/GCS entry, alert role context on acknowledge, threshold management, user management (`UsersController` + UI), audit log viewer, reconciliation dashboard, role-based navigation, dark-mode chart theming (`useChartTheme.js`), mobile patient-detail layout with collapsible sections, and baseline WCAG improvements (severity icons, chart `aria-label`s, modal focus trap, skip link, ward table keyboard nav).
**Still open:** gateway status dashboard (#19), alert-triage keyboard shortcuts (#24), Grafana expansion (#27), real-time push (#28).
---
# Part A — Patient Safety & Bedside Decision Support
---
@@ -902,32 +918,32 @@ Real-time push reduces alert notification latency from 5-10 seconds to sub-secon
| # | Issue | Priority | Part | Backend exists? | Status |
|---|-------|----------|------|----------------|--------|
| 1 | No SOFA trend chart | P0 | A | Yes | Open |
| 2 | No GCS trend chart / history endpoint | P0 | A | Partial (no history endpoint) | Open |
| 3 | No qSOFA history view | P0 | A | No (Redis-only, no persistence) | Open |
| 4 | No medication overlay on vital charts | P0 | A | Yes | Open |
| 5 | No encounter timeline view | P1 | A | Yes | Open |
| 6 | No patient demographics / allergy banner | P1 | A | Yes | Open |
| 7 | Ward table missing SOFA, GCS, staleness | P1 | B | Partial (DTO needs extension) | Open |
| 8 | No sepsis bundle compliance board | P2 | B | Yes | Open |
| 9 | No department overview with aggregates | P2 | B | Partial | Open |
| 10 | No sort controls on ward table | P2 | B | N/A (client-side) | Open |
| 11 | No search/filter on ward table | P2 | B | Yes (analytics search) | Open |
| 12 | No critical alert notification/sound | P1 | C | No (needs push or client detect) | Open |
| 13 | No handoff/shift summary report | P1 | C | Yes (data available) | Open |
| 14 | No discharge summary view | P2 | C | Partial (needs download endpoint) | Open |
| 15 | Alert ack lacks role context | P3 | C | Partial | Open |
| 16 | No vitals entry form | P3 | C | Yes | Open |
| 17 | No threshold management UI | P2 | D | Yes | Open |
| 18 | No user management UI | P2 | D | No (needs backend endpoints) | Open |
| 1 | No SOFA trend chart | P0 | A | Yes | **Done**`SofaHistory.vue` |
| 2 | No GCS trend chart / history endpoint | P0 | A | Yes | **Done**`GcsHistory.vue`, `GET /gcs/history` |
| 3 | No qSOFA history view | P0 | A | Yes | **Done**`QsofaHistory.vue`, `qsofa_evaluations` + `GET /qsofa/history` |
| 4 | No medication overlay on vital charts | P0 | A | Yes | **Done**`medicationMarkerPlugin.js` |
| 5 | No encounter timeline view | P1 | A | Yes | **Done**`EncounterTimeline.vue` |
| 6 | No patient demographics / allergy banner | P1 | A | Yes | **Done**`PatientBanner.vue` |
| 7 | Ward table missing SOFA, GCS, staleness | P1 | B | Yes | **Done** — extended `WardEncounterSummary` + `PatientRow` |
| 8 | No sepsis bundle compliance board | P2 | B | Yes | **Done**`SepsisBoardView.vue` |
| 9 | No department overview with aggregates | P2 | B | Yes | **Done**`DepartmentOverviewView.vue` |
| 10 | No sort controls on ward table | P2 | B | N/A (client-side) | **Done**`wardSort.js`, `SortableHeader` |
| 11 | No search/filter on ward table | P2 | B | Yes (analytics search) | **Done**`WardToolbar.vue` |
| 12 | No critical alert notification/sound | P1 | C | Partial (client detect) | **Done**`CriticalAlertBanner.vue`, sound mute toggle |
| 13 | No handoff/shift summary report | P1 | C | Yes (data available) | **Done**`HandoffReport.vue` |
| 14 | No discharge summary view | P2 | C | Yes | **Done**`DischargeSummaryPanel.vue`, `GET /discharge-summary` |
| 15 | Alert ack lacks role context | P3 | C | Yes | **Done**`alertAcknowledge.js`, `AcknowledgeModal.vue` |
| 16 | No vitals entry form | P3 | C | Yes | **Done**`VitalsEntryForm.vue`, `GcsEntryForm.vue` |
| 17 | No threshold management UI | P2 | D | Yes | **Done**`ThresholdManagementView.vue` |
| 18 | No user management UI | P2 | D | Yes | **Done**`UsersController`, `UserManagementView.vue` |
| 19 | No gateway status dashboard | P2 | D | Yes | Open |
| 20 | No audit log viewer | P4 | D | Yes | Open |
| 21 | No reconciliation dashboard | P4 | D | Yes | Open |
| 22 | No role-based navigation | P3 | E | N/A (frontend-only) | Open |
| 23 | Dark mode chart inconsistency | P3 | E | N/A | Open |
| 20 | No audit log viewer | P4 | D | Yes | **Done**`AuditLogView.vue` |
| 21 | No reconciliation dashboard | P4 | D | Yes | **Done**`ReconciliationView.vue` |
| 22 | No role-based navigation | P3 | E | N/A (frontend-only) | **Done**`roleAccess.js`, route guards |
| 23 | Dark mode chart inconsistency | P3 | E | N/A | **Done**`useChartTheme.js` |
| 24 | No keyboard shortcuts | P3 | E | N/A | Open |
| 25 | No mobile optimization for patient detail | P3 | E | N/A | Open |
| 26 | No accessibility (WCAG) compliance | P5 | E | N/A | Open |
| 25 | No mobile optimization for patient detail | P3 | E | N/A | **Done** — collapsible sections, single-column mobile layout |
| 26 | No accessibility (WCAG) compliance | P5 | E | N/A | **Partial** — severity icons, chart labels, modal focus trap, skip link, ward keyboard nav |
| 27 | Grafana dashboard incomplete | P4 | F | Partial (needs more metrics) | Open |
| 28 | No real-time push (polling only) | P4 | F | No (needs SSE/SignalR) | Open |
@@ -988,32 +1004,33 @@ flowchart TD
### Sprint-sized batches
| Batch | Items | Outcome |
|-------|-------|---------|
| **1 — Bedside Decision Support** | P0 SOFA chart, P0 GCS history + chart, P0 medication overlay, P1 patient banner, P1 timeline | Physicians and nurses see full scoring history and medication context for clinical decisions |
| **2 — Ward Awareness** | P0 qSOFA history, P1 ward table columns, P2 sort/search, P1 critical alert notification, P2 sepsis board | Charge nurses have complete situational awareness; critical alerts demand attention |
| **3 — Clinical Workflows** | P1 handoff report, P2 discharge summary, P3 vitals entry form, P3 alert role context | Nurses can chart vitals in-app; shift handoff is printable; discharge documents accessible |
| **4 — Admin Tools** | P3 role-based nav, P2 threshold management, P2 gateway status, P2 user management, P2 department overview | Admins manage thresholds without API calls; IT monitors gateway health; navigation is role-scoped |
| **5 — Polish & Infrastructure** | P3 dark mode charts, P3 keyboard shortcuts, P3 mobile optimization, P4 audit/reconciliation views, P4 Grafana, P5 WCAG | Night-shift readability, power-user efficiency, compliance audit trail, monitoring depth |
| **6 — Real-Time** | P4 SSE/SignalR push | Sub-second alert notification, reduced polling load |
| Batch | Items | Outcome | Status |
|-------|-------|---------|--------|
| **1 — Bedside Decision Support** | P0 SOFA chart, P0 GCS history + chart, P0 medication overlay, P1 patient banner, P1 timeline | Physicians and nurses see full scoring history and medication context for clinical decisions | **Done** |
| **2 — Ward Awareness** | P0 qSOFA history, P1 ward table columns, P2 sort/search, P1 critical alert notification, P2 sepsis board | Charge nurses have complete situational awareness; critical alerts demand attention | **Done** (department overview also shipped) |
| **3 — Clinical Workflows** | P1 handoff report, P2 discharge summary, P3 vitals entry form, P3 alert role context | Nurses can chart vitals in-app; shift handoff is printable; discharge documents accessible | **Done** |
| **4 — Admin Tools** | P3 role-based nav, P2 threshold management, P2 gateway status, P2 user management, P2 department overview | Admins manage thresholds without API calls; IT monitors gateway health; navigation is role-scoped | **Partial** — gateway status UI still open |
| **5 — Polish & Infrastructure** | P3 dark mode charts, P3 keyboard shortcuts, P3 mobile optimization, P4 audit/reconciliation views, P4 Grafana, P5 WCAG | Night-shift readability, power-user efficiency, compliance audit trail, monitoring depth | **Partial** — shortcuts, Grafana, full WCAG audit open |
| **6 — Real-Time** | P4 SSE/SignalR push | Sub-second alert notification, reduced polling load | Open |
---
## Backend work required
Most dashboard gaps are **frontend-only** — the API endpoints already exist but the dashboard does not consume them. The following items require backend changes:
Most dashboard gaps are **frontend-only** — the API endpoints already exist but the dashboard does not consume them. The following items required or still require backend changes:
| Item | Backend work needed |
|------|-------------------|
| GCS history chart | New `GET /encounters/{id}/gcs/history` endpoint |
| qSOFA history | Decide persistence strategy (Redis → DB) + new history endpoint |
| Ward table columns | Extend `WardEncounterSummary` DTO with SOFA/GCS/staleness |
| Discharge summary view | New `GET /encounters/{id}/discharge-summary` download endpoint |
| User management | New `UsersController` with CRUD endpoints |
| Real-time push | New SSE endpoint or SignalR hub |
| Grafana expansion | Depends on platform gap P5 metrics being implemented first |
| Item | Backend work needed | Status |
|------|---------------------|--------|
| GCS history chart | `GET /encounters/{id}/gcs/history` endpoint | **Done** |
| qSOFA history | `qsofa_evaluations` table + `GET /qsofa/history` | **Done** |
| Ward table columns | Extend `WardEncounterSummary` DTO with SOFA/GCS/staleness | **Done** |
| Discharge summary view | `GET /encounters/{id}/discharge-summary` + content download | **Done** |
| User management | `UsersController` with list/create/patch | **Done** |
| Gateway status dashboard | Fleet/summary APIs exist (Phase 23); dashboard UI not built | Open (frontend) |
| Real-time push | New SSE endpoint or SignalR hub | Open |
| Grafana expansion | Depends on platform gap P5 metrics being implemented first | Open |
All other items can be built against existing API endpoints.
All other closed items were built against existing API endpoints.
---
@@ -0,0 +1,10 @@
## Climate resilience demo
Run the network partition walkthrough:
export ADMIN_JWT=<admin-token>
export GATEWAY_JWT=<gateway-dashboard-token>
./scripts/demo-network-partition.sh
Expected flow: gateway ONLINE → partition → observation buffered locally →
central shows DEGRADED/OFFLINE + buffer depth > 0 → heal → ONLINE + buffer 0.