Skip to content

Architecture / Decision records / ADR-HIS-124

ADR-HIS-124 The emergency access review workspace: its queue, the embedded audit query, the review steps, and where it sends the reviewer while no incident can be opened

Status Accepted
Decided 2026-12-02 by session RC-4-S05
Record Drafted 2026-12-02; awaiting approval by the Enterprise Architecture Board
Where the rule lives web/domains/ess/UI-ESS-005/ (model.ts, ReviewWorkspace.tsx, SessionReview.tsx, Activity.tsx, Patterns.tsx, people.tsx)

Context

RC-4-S05 builds the emergency access review workspace UI-ESS-005, the screen where privacy and security officers review each Break-the-Glass session (FR-ESS-AUZ-002 parts 3, 6.9 and 6.10). The specification entry and the contract points of contracts/ess/CONTRACT-POINTS.md (slice RC-4) settle what it shows. Several things are left to the screen:

  • The review queue is "a configuration of the work list component (OV-01), not a list of its own". The work list of UI-ESS-010 is not in the design system, and a screen folder imports nothing from another one (session rule 10).
  • The activity list "is the audit query view of UI-ESS-008, embedded and filtered by the session identifier" (OV-116). The same import rule applies, and every audit read needs a stated purpose (PR-AUD-002-2).
  • A review task is created after the session, from a durable record, and may not exist yet when the workflow service was down (PR-AUZ-002-3, ADR-HIS-120 point 4). Such a session is still waiting for review.
  • "Inappropriate" opens a security incident on UI-ISE-006, "which the reviewer is taken to". Security monitoring version 1 has no operation to open one, so the emergency access service refers the outcome and leaves securityIncidentId absent (ADR-HIS-120 point 6).
  • ADR-HIS-117 point 1 expects this screen to serve /ess/ui-ess-005/session/<sessionId>.

Options considered

  1. Wait for the shared components. Build the queue and the activity list only once the work list and the audit query view are in the design system. The workspace would not exist for the slice's integration (RC-4-S06).
  2. Design the screen's own queue and activity list. Against F-9 and OV-116, which forbid a second list design.
  3. Copy the shared designs into the folder, as the other screens do until the components move: the work list's row anatomy for the queue, UI-ESS-008's result table and evidence view for the activity, each fed from the contract operations the contract points name.

Decision

Option 3.

  1. Entries and exits.
  2. This screen serves /ess/ui-ess-005/session/<sessionId>, for a review task, an alert, the audit workspace and the patient access report. Opening a session from the queue keeps it in the address the same way (replaceState), and "Back to review queue" is the exit.
  3. It opens UI-ESS-008 at /ess/ui-ess-008/session/<sessionId> ("Open in audit workspace") and UI-ESS-003 at /ess/ui-ess-003/decision/<decisionId>.
  4. It opens UI-ISE-006 at /ise/ui-ise-006/<securityIncidentId> when the session carries one, and otherwise at /ise/ui-ise-006.
  5. The queue.
  6. The rows are the open review tasks (workflow.v1 listTasks, task type ess.emergency-access-review), earliest due first, in the row anatomy of OV-01: item, patient, due time with "Overdue ยท [duration]", priority, state, assignee, source.
  7. The overdue sessions (listEmergencyAccessSessions?reviewOverdue=true) are read too. One whose review task is not in the list is added as a row, "Review task not created yet", so no session waiting for review is out of sight while its task waits to be created (TEST-ESS-009).
  8. If one of the two reads fails, the other is shown with a notice that the queue may be incomplete.
  9. The activity list.
  10. It is UI-ESS-008's result table and evidence view, copied, with its integrity marks. It is filled by searchAuditEvents?emergencySessionId=<sessionId>.
  11. The purpose sent is privacy-investigation, the code of the contract points, with the text "Emergency access review of session ". The screen says so above the list, and the audit service records the read.
  12. The activity is read when the session opens: reviewing the session is the purpose.
  13. The review steps.
  14. "Start review" (openEmergencyAccessReview) is a separate step on an Expired session. It moves the session to Under Review, so other reviewers see that it is taken. Only then is the outcome form shown.
  15. The outcome is recorded after a confirmation that names the outcome and what it does, with the version read as If-Match and one idempotency key per intent (CUX-35, CUX-36). The first focus is on "Cancel", and Enter does not confirm (CUX-12).
  16. The form is replaced by its reason for:
    • a session in force;
    • the reviewer's own session, compared with the host's accountId;
    • a recorded outcome.
  17. "Inappropriate" cannot be sent without a comment.
  18. Reassignment is workflow.v1 reassignTask, with a reason and the reviewer's account identifier, offered only when the review task is in the reviewer's queue.
  19. After "Inappropriate". The recorded outcome shows "Referred to security monitoring as a security incident". It gives a link to UI-ISE-006 that takes the focus: "Open the security incident" with a reference, or "Go to security monitoring" without one. The screen does not navigate by itself, because the shell SDK offers screens no navigation call, only links through the shell's router. When D02 offers an operation to open an incident, the reference fills the same link.
  20. The pattern panel. It shows sessions per user, per unit or per patient over the provider's default of 90 days. It starts with the session's user (subject=), and the reviewer can widen it to all users. The group of this session's user, unit or patient is marked.
  21. Names beside references. These follow ADR-HIS-117 point 3, with one correction to the copied cache. A read that ends before the component has subscribed is now rendered. Before, a fast answer could resolve in microtasks before React ran the subscribing effect, and the name was never shown.

Rationale

  • Copying the shared designs is what F-9 and OV-116 ask for in substance: one list design, one evidence view. It keeps the import rule. The copies move to the design system with the others (ADR-HIS-117 consequences).
  • Adding task-less overdue sessions to the queue serves the purpose of the screen, "complete retrospective reviews within the configured timeframe", in the failure case PR-AUZ-002-3 names.
  • A separate start step uses the transition the contract offers, and tells other reviewers the review is taken. The provider also accepts an outcome on an Expired session (RC-4-S02 handover). The screen does not rely on that, because the contract says Under Review first.
  • A link the reviewer follows is the nearest to "taken to UI-ISE-006" that the SDK allows. It also keeps the outcome on screen for the reviewer to read first.

Consequences

  • UI-HIM-012 and the notification of an emergency access alert open sessions at /ess/ui-ess-005/session/<sessionId>.
  • When the work list of OV-01 and the audit query view move to the design system, the queue and the activity list are replaced by them, configured as here.
  • When security-monitoring.v1 offers an incident operation, and UI-ISE-006 serves incidents at their reference, the link of point 5 needs no change. UI-ISE-006 today reads the path as an alert identifier.
  • UI-ESS-008's people.tsx has the cache race corrected in point 7 (follow-up in the RC-4-S05 handover).