fix: Replay controls
This commit is contained in:
+12
-6
@@ -197,13 +197,17 @@ Five **vital sign trend** line charts (Chart.js via `vue-chartjs`):
|
||||
|
||||
#### Replay controls
|
||||
|
||||
Local playback UI for reviewing scenario timelines:
|
||||
Local playback UI for reviewing scenario timelines against data already loaded for this encounter:
|
||||
|
||||
- Pause / resume, speed presets (1×, 60×, 360×, Instant)
|
||||
- Progress bar and elapsed time display
|
||||
- **Next Alert →** cycles through open alerts chronologically, selects each for reasoning, and scrolls to the chart section
|
||||
- **Pause / resume** — starts paused at the end of the timeline (all data visible). Resume rewinds to the start and plays forward.
|
||||
- **Speed presets** (1×, 60×, 360×, Instant) — advance the replay clock through observation and NEWS2 timestamps; **Instant** jumps to the end.
|
||||
- **Progress bar and elapsed time** — derived from the earliest to latest timestamp across observations, NEWS2 history, and alerts.
|
||||
- **Chart scrubbing** — vitals panel, vital trend charts, and NEWS2 history show only data at or before the replay clock.
|
||||
- **Next Alert →** — cycles open/escalated alerts chronologically, selects each for the reasoning panel, scrubs the replay clock to that alert’s `triggeredAt`, scrolls the alert row into view, and scrolls to the chart section.
|
||||
|
||||
> Replay state is **client-side only**. It does not send commands to the simulator.
|
||||
Selecting an alert row in **Active Alerts** also scrubs the replay clock to that alert’s time.
|
||||
|
||||
> Replay state is **client-side only**. It does not send commands to the simulator. Patient detail loads encounter-scoped alerts on every poll so the alert list and **Next Alert →** are not affected by a prior visit to Alert Center.
|
||||
|
||||
Patient detail data polls every **5 seconds**.
|
||||
|
||||
@@ -232,7 +236,7 @@ Typical demo flow:
|
||||
2. Replay a scenario at moderate speed (`--speed 60`).
|
||||
3. Open **Virtual Ward** — new or updated encounters appear as the simulator creates them.
|
||||
4. Click the patient — watch vitals and charts fill in as observations ingest.
|
||||
5. When alerts fire, click an alert row to read reasoning; try **Next Alert →** on the replay bar.
|
||||
5. When alerts fire, click an alert row to read reasoning (replay scrubs to that time); try **Next Alert →** on the replay bar.
|
||||
6. Use **Alert Center** to acknowledge alerts globally.
|
||||
|
||||
**Suggested scenarios:**
|
||||
@@ -305,6 +309,8 @@ Implementation plans: `docs/plans/phase-17-plan.md` (ward shell + detail), `docs
|
||||
| Blank ward / network errors in console | API not running or wrong URL | Start API; check `VITE_API_URL` |
|
||||
| CORS error in browser | Dashboard origin not allowed | Add origin to API `DashboardOptions` in `appsettings.json` |
|
||||
| Charts crash on mount | Chart data not unwrapped | Ensure `VitalTrendChart` wrapper is used (see `TrendsGrid.vue`) |
|
||||
| Replay bar stuck at 0:00 | No timestamped data yet | Wait for observations/alerts to load; bounds sync after first fetch |
|
||||
| Next Alert shows wrong patient | Stale global alert store | Fixed in Patient Detail — encounter alerts reload on mount/poll |
|
||||
| No patients listed | No active encounters | Run simulator or use seeded API data |
|
||||
| NEWS2 chart empty | Scores not computed yet | Wait for Kafka `news2-scoring` consumer after observations ingest |
|
||||
| Acknowledge fails 400 | Invalid clinician ID | Set `clinicianId` in localStorage or settings store |
|
||||
|
||||
Reference in New Issue
Block a user