|
| 1 | +# Clinic preparation |
| 2 | + |
| 3 | +> **When to use**: Preparing for a live clinic (or a dummy run) that uses the |
| 4 | +> gateway imaging flow. Work through it in order — the sections have lead times. |
| 5 | +
|
| 6 | +--- |
| 7 | + |
| 8 | +## The week before |
| 9 | + |
| 10 | +- [ ] **Software currency**: the intended gateway release is deployed to the site VM |
| 11 | + (check the deploy pipeline history, or `current` junction target on the VM), |
| 12 | + and any Manage changes the clinic depends on are in prod. |
| 13 | +- [ ] **Feature flag**: `gateway_images` is **on** for prod — it lives in |
| 14 | + **`flags.production.yml` in the Manage repo**. |
| 15 | +- [ ] **Prod Manage records**: `Gateway` record with the machine's managed-identity |
| 16 | + OID; `Relay` record whose **Setting matches the clinic's Setting**. |
| 17 | +- [ ] **Test data prepared with fresh accession numbers** — never reuse a previous |
| 18 | + clinic's CSV: Manage's per-gateway accession uniqueness rejects reused values, |
| 19 | + and gateway-side reuse serves stale participant data. |
| 20 | +- [ ] **First time at a site, or after a promotion**: run a full remote dummy run |
| 21 | + first — one test participant end to end, glove-box exposure included. |
| 22 | + |
| 23 | +## The day before |
| 24 | + |
| 25 | +- [ ] **The VM is on and will stay on** — `az connectedmachine show … --query status` |
| 26 | + returns **Connected**. |
| 27 | +- [ ] **The relay path passes traffic** — echo probe from the Manage container, or |
| 28 | + a fresh successful check-in. |
| 29 | +- [ ] **Fresh appointments only** — any appointment that ever had manual image |
| 30 | + details recorded stays in manual mode by design. |
| 31 | +- [ ] **Gateway worklist DB is clean** — no stale items from previous tests |
| 32 | + (`Get-GwWorklist`, or the run-command SELECT; wipe if needed). |
| 33 | +- [ ] **People and access roster confirmed for the whole clinic window**: |
| 34 | + - someone with a **prod Rubie login** including Django admin (Gateway actions) |
| 35 | + - someone with **az / portal access** to the prod subscriptions |
| 36 | + - the **hospital contact** who can operate the modality and physically reach the VM |
| 37 | + - RDP to the VM if the hospital can provide it (live tails beat run-commands) |
| 38 | +- [ ] **Fallback agreed**: if the gateway flow breaks mid-clinic, the manual-images |
| 39 | + flow carries the clinic and debugging happens without time pressure. |
| 40 | +- [ ] **No stale Arc run-commands queued** on the machine |
| 41 | + (`az connectedmachine run-command list -o table`; delete non-terminal stragglers — |
| 42 | + they block deploys and diagnostics). |
| 43 | + |
| 44 | +## The morning (~20 minutes before the first participant) |
| 45 | + |
| 46 | +On the VM (RDP or run-command): |
| 47 | + |
| 48 | +1. `Restart-Service Gateway-Relay` — fresh relay connection, freshly-started token |
| 49 | + clock. Wait for **`Connected - waiting for worklist actions...`** in the log. |
| 50 | +2. `Get-GwHealth` — all four services **Running**, ports 104 and 11112 listening. |
| 51 | +3. After the first (test) participant is checked in on Manage: `Get-GwWorklist` |
| 52 | + shows the item almost immediately — that proves Manage → Relay → VM |
| 53 | + end to end. |
| 54 | +4. On the modality: query the worklist and confirm the participant is listed. |
| 55 | + |
| 56 | +From a laptop: |
| 57 | + |
| 58 | +1. `az relay hyco show … --query listenerCount` returns ≥ 1. |
| 59 | +2. Gateway actions in the Django admin: the test check-in shows **`confirmed`** |
| 60 | + with an empty `last_error`. |
| 61 | + |
| 62 | +## During the clinic — passive monitoring |
| 63 | + |
| 64 | +On the VM, keep two windows open: |
| 65 | + |
| 66 | +```powershell |
| 67 | +Watch-GwLog PACS # window 1 — see each C-STORE arrive |
| 68 | +Watch-GwLog Upload # window 2 — see each upload to Manage |
| 69 | +``` |
| 70 | + |
| 71 | +Elsewhere: the **Gateway actions** admin page (each check-in → `confirmed`), and |
| 72 | +App Insights **Live Metrics** if telemetry is up. |
| 73 | + |
| 74 | +After each participant: `Get-GwImages` shows the expected image count with |
| 75 | +`uploaded` equal to `images` within a minute or two. |
| 76 | + |
| 77 | +## Afterwards |
| 78 | + |
| 79 | +- [ ] Wipe test items from the gateway worklist DB; note any test studies/images |
| 80 | + created in prod Rubie and clean up or record them. |
| 81 | +- [ ] Write up anything that surprised you — against this checklist — and fold the |
| 82 | + lesson back into this document. That is how everything above got here. |
0 commit comments