Skip to content

Implementation plan / Session plan / Handover RC-1-S25

Handover RC-1-S25 Screens: ESS screens (part 3 of 3)

Card: RC-1-S25. Issue: cema-care/his#39. Branch: session/RC-1-S25. Decision record: ADR-HIS-071.

What was built and where

Two screens of the ESS workspace, each in its own folder. Outside them the change adds only this handover and ADR-HIS-071 with its index row.

Folder Screen Registration Contracts
web/domains/ess/UI-ESS-010/ UI-ESS-010 Notification inbox and task list (shared component) W18, route /ess/ui-ess-010, no navigation entry (opened from the global bar counter and from links) contracts/ess/api/workflow.v1, notification.v1; contracts/adm/api/patient-identity.v1 (readPerson)
web/domains/ess/UI-ESS-011/ UI-ESS-011 Configuration lifecycle workspace W18 Administration, route /ess/ui-ess-011, deep link /ess/ui-ess-011/version/<id> contracts/ess/api/configuration.v1

Both folders have the parts of the earlier ESS screens (RC-1-S24): - screen.ts; - api/http.ts, the gateway client of UI-ESS-009, trimmed to what each screen needs; - one function per contract operation (api/worklist.ts, api/configuration.ts); - model.ts for the presentation rules and which actions apply, with the reason when one does not; - ui.tsx and failure.tsx; - component tests with a fake gateway (test-support.ts); - stubs.test.tsx with check-against-stubs.sh against his-contract serve.

UI-ESS-010 Notification inbox and task list

UI-ESS-010 is the one work list component of OV-01. It is built as a library with a public index.ts and as a screen (ADR-HIS-071):

  • WorkList shows its regions in reading order:
  • a header with the title, the count of open items, "As at [time]" and the stale indicator after 5 minutes (CUX-53);
  • the Notifications and Tasks tabs, each with its open count;
  • the filter bar: the fixed filters (assigned to me or my queues, state, priority, type, overdue, source), then the domain's filters, and the sort;
  • the list;
  • the detail of the opened item beside it.
  • Fixed row anatomy:
  • item;
  • patient (the name and No. RM from Domain 1, PH-01) or the record;
  • due time, priority, state, assignee or recipient, source and age.

A domain adds up to four columns. - Order and words. The default order is critical first, then due time. The user can sort by any fixed column. Priorities use the glossary 5 words, and Critical has the danger tone. A priority code outside the known ones (critical, high, normal or routine, low) is not guessed: it shows as "Priority not recognized · [code]" in caution colours, ranks right after Critical, and has its own filter option. "Overdue · [duration]" carries the clock symbol, and every row shows its age. - A source that fails is never dropped silently. If the list of queues, the user's own tasks or one queue cannot be read, the Tasks tab names it in a notice ("Not every list could be read, so tasks may be missing below: …"), shows its failure with the service desk reference, and keeps the other tasks. The "As at" time moves only after a read in which every source answered, so the view turns stale (CUX-53). - Tasks: - Claim task, Start task, Release task and Mark task complete; - the completion evidence is a form built from the task type's schema, and its outcome property gives the outcome codes; - a type the owning domain confirms has no complete button, and the reason is shown instead (part 6.10); - Reassign task and Change priority, with a reason, for the queue supervisor; - the brief's messages: "This task has been claimed by another user." (409), "You are not eligible for this queue." (403) and "Complete the required fields."; - CUX-36: a command that gets no answer is sent again with the same key. - Notifications: - the inbox states only: Delivered is shown as "New", then Escalated, Acknowledged, Escalation exhausted, and Closed or Cancelled for the rest of the session; - a new item is in bold until it is opened (a per-user marker, not a state); - the detail shows the message, the sent time, the delivery state, the acknowledgement and the escalation history; - an exhausted escalation stays open with its reason (BR-ESS-025); - the list never closes a notification. - Open [item] goes to the owning screen (CUX-04). The configuration's target is used first, then the notification's own route of this application, then a default by record type. For example, adm.IdentityMatch opens /adm/ui-adm-002 and ess.ConfigurationVersion opens /ess/ui-ess-011/version/<id>. - WorkListCounter shows counts only, for example "Tasks 2 · Notifications 1 · 1 critical" (CUX-47). - MY_WORK is the configuration behind the route: the user's tasks (assignee=me), the tasks of each queue listWorkQueues returns, and recipient=me notifications.

UI-ESS-011 Configuration lifecycle workspace

  • Item browser:
  • the types of listConfigurationItemTypes, each "Authored here" or "Open in [screen]";
  • the versions of the chosen type, filtered by scope and state, with "Emergency review due" (emergencyReviewDue);
  • the empty state "No versions of this type".
  • Version header (UX-ESS-005): version, state, effective period, author, approver, scope, change reason and impact, and the package hash.
  • The state words are those of OV-18, with "Rolled back · [date]".
  • An emergency version shows the amber "Emergency change · review due [date]".
  • A superseded version shows "Superseded" and "Open the current version" (supersededBy).
  • Panels:
  • the version comparison against another version of the same item and scope (compareConfigurationVersions);
  • validation with its findings, each with field, rule and reason (DAT-002), and the test evidence the type requires;
  • the approval route (the registered role, and the clinical authority where the type needs it) with the approvals;
  • the promotion history, read-only. Promotion itself is on UI-ISE-007.
  • Actions (WF-ESS-006):
  • Create draft and Edit draft, for types authored here only. In production both are disabled with the reason "Production content is read-only (PR-CFG-001-4)";
  • Validate, Attach test evidence and Submit for review. Submission is blocked until validation passes and the required evidence is attached;
  • Approve version and Return to author, with the PH-03 sign step every time. Three failed attempts cancel it. Both are disabled for the author: "You wrote this version. A different approver is required.";
  • Activate version, now or at a set time. Its impact summary names the active version that becomes Superseded;
  • Roll back. The request answers the version to be restored and the data-compatibility warnings, which are shown before the signed "Approve rollback" or "Decline rollback";
  • Retire version, with an end date and a reason;
  • Request emergency change, for clinical-content types. A second person confirms in place (CUX-64), their refusal is told to the requester, the requester signs, and secondApproval carries both.
  • Read-only types. A type authored on a specialist screen is listed read-only, with "Open in [screen]".
  • Dialogs open on Cancel, Enter does not confirm (CUX-12), and the confirming button repeats the action (CUX-10, CUX-11).

Checks and their result

Node.js is not installed on this server. The Node checks ran in the node:22.18-bookworm container (pnpm 10.34.9 through corepack), as earlier sessions did. The integration environment was not needed: each check-against-stubs.sh serves the stubs itself.

Check Command Result
Type check of the workspace pnpm build in web/domains/ess Passed
Component and accessibility tests pnpm test in web/domains/ess 192 passed, 19 skipped (the stub tests). UI-ESS-010: 28. UI-ESS-011: 23
UI-ESS-010 against the ESS and ADM stubs web/domains/ess/UI-ESS-010/check-against-stubs.sh 2 of 2 passed; neither stub recorded a violation
UI-ESS-011 against the ESS stub web/domains/ess/UI-ESS-011/check-against-stubs.sh 3 of 3 passed; no violation
The shell with both screens pnpm build and pnpm test in web/shell Bundle built (View and ConfigurationWorkspace chunks); 19 passed, 1 skipped, and the shared-version check passed
Static analysis platform/delivery-pipeline/bin/static-analysis web/domains/ess/UI-ESS-010 web/domains/ess/UI-ESS-011 No blocking finding
Secret scan platform/delivery-pipeline/bin/secret-scan code origin/main No secret
Dependency scan platform/delivery-pipeline/bin/dependency-scan web/domains/ess 0 blocking; the 2 tinypool findings are under the approved exception. No dependency was added
Protected files platform/delivery-pipeline/bin/protected-files origin/main HEAD No exception or register approval added
Documentation python3 docs/implementation_plan/tools/check_links.py; mkdocs build Passed

Accessibility. axe-core checks WCAG 2.0 to 2.2 A and AA on: - both tabs of the work list and a domain configuration; - the notification detail; - the item browser and the version detail; - the completion, draft, approval and rollback dialogs while they are open.

Keyboard: every control is a React Aria control. Enter does not confirm a dialog (tested).

What the stub checks cover. The ESS stub keeps no lifecycle state between calls. UI-ESS-011's stub test therefore walks the example draft's own actions on the screen: validate, attach evidence and create a draft. It then sends every signed and confirmed command directly, each in the shape the dialogs use, and the stub records no violation for any of them. The commands are submit, approve, return, activate, the rollback request and its decision, retire, and the emergency change.

Requirements and test scenarios

Every test names its requirement, and its test scenario where one exists (session rule 5). The D10-ESS section 15.2 scenarios are covered for their screen part only. The service behaviour belongs to the build sessions: RC-1-S15 for workflow and notification, RC-1-S05 for configuration.

Requirement Test scenario Tests (describe titles)
FR-ESS-WFL-002: claim, release, start, complete with evidence, owning-domain confirmation, supervisor reassign and reprioritize with a reason, returned-to-queue flag, minimum subject TEST-ESS-029 (screen part) FR-ESS-WFL-002 TEST-ESS-029 UI-ESS-010 tasks; FR-ESS-NTF-001 FR-ESS-WFL-002 UX-ESS-001 UI-ESS-010 work list; against the stubs: FR-ESS-WFL-002 FR-ESS-NTF-001 UI-ESS-010 against the contract stubs
FR-ESS-NTF-001: the user's notifications, priority order, minimum content None for the inbox FR-ESS-NTF-001 FR-ESS-NTF-002 CUX-28 UI-ESS-010 notifications, and the work list tests
FR-ESS-NTF-002: exhausted escalation open and visible, escalation history, acknowledgement shown TEST-ESS-027 (screen part: open and visible) BR-ESS-025 TEST-ESS-027 … in the notifications tests. Acknowledging is not built (below)
FR-ESS-DGV-002 stewardship items None The configuration supports their four columns (OV-01 UI-ESS-010 configuration by a domain). The items themselves have no contract in this slice
FR-ESS-CFG-001: draft, validate, evidence, submit, signed approval by another person, activation superseding, rollback with warnings, retirement, emergency path, production read-only TEST-ESS-030 (screen part: promotion history shown, rollback restores the prior version) FR-ESS-CFG-001 TEST-ESS-030 WF-ESS-006 UI-ESS-011 …, FR-ESS-CFG-001 BR-ESS-029 PH-03 UI-ESS-011 approval, FR-ESS-CFG-001 TEST-ESS-030 UX-ESS-006 UI-ESS-011 activate, roll back, retire, FR-ESS-CFG-001 part 6.11 OV-114 CUX-64 UI-ESS-011 emergency change; against the stub: FR-ESS-CFG-001 TEST-ESS-030 UI-ESS-011 against the contract stub
FR-ESS-AUZ-002: the Break-the-Glass settings as configuration items None FR-ESS-CFG-001 FR-ESS-AUZ-002 UX-ESS-005 OV-18 UI-ESS-011 item browser and version header (the tests use ess.break-glass-session-window)
FR-ESS-CFG-002: feature flags as configuration items TEST-ESS-031 Not covered by a test of its own. A feature flag registered as an item type goes through the same lifecycle. The extension-point register is UI-ESS-012

Each test also names the rule it checks in its title: UX-ESS-001, UX-ESS-005, UX-ESS-006, OV-01, OV-18, OV-114, PH-01, PH-03, CUX-12, CUX-28, CUX-36, CUX-47, CUX-53, CUX-64, BR-ESS-025, BR-ESS-026, BR-ESS-029, PR-CFG-001-1, PR-CFG-001-4, PR-CFG-001-5 and Shell 13.

NFR-ESS-010 Usability was a design input, because notification acknowledgement and task completion are among its named tasks: - each state is in words; - every action names its effect; - every unavailable action says why; - completion asks only the evidence the type defines; - both screens work by keyboard; - times are shown in the facility zone, or in UTC on request.

The NFR's task-based evaluation with representative users is for the slice's readiness work.

Differences from the brief, specification or contract, and why

UI-ESS-010: - Acknowledge notification is shown but disabled. notification.v1 version 1 has no acknowledgement operation; its description says FR-ESS-NTF-002 comes in a later minor version. The button says so: "Acknowledgement is not available in this release yet…". Escalation still runs at the provider. A critical notification is listed first and shows "Not acknowledged". - The notification inbox has a contract after all. RC-1-S01's contract points said it had none in this slice. notification.v1 (RC-2-S01) is on main, and the inbox reads it, as session rule 12 allows. - "Read" is kept in the component for the session. The brief says it is a per-user marker, not a state, and no contract field holds it. - The task outcome. completeTask requires an outcome, and TaskType names no outcome codes. Where the evidence schema has an enumerated outcome property, the user chooses one of its values. Otherwise the screen sends completed. - "My queues" are the queues listWorkQueues returns for the user, one listTasks?queueId= call each, merged with assignee=me. The contract has no "queues I am eligible for" filter. The provider lists only what the user may see. - Queue supervisor. The screen offers Reassign task and Change priority on a task in a queue that has supervisor roles. It cannot tell whether the user holds one, so the provider decides and a refusal says so. This is the same gap as RC-1-S24's approval rights. - Shell read-only mode (Shell 7) is not shown: ShellState has no read-only signal yet. - Handheld. The one-task-per-screen variant for housekeeping (UR-29) is not built. Its bed turnover configuration belongs to UI-ADM-004, and the shell has no handheld form factor signal.

UI-ESS-011: - The signature reference of an approval is taken as described in ADR-HIS-071 point 4: the host's signatureId, else the stepped-up token's jti. - A pending rollback request can be decided only in the session that raised it. configuration.v1 has no list of rollback requests, and the version does not name one. RollbackRequest has no version, so its decision sends the ETag of the request's answer (the stub sends "1"). - "Scheduled · effective [date]" is not shown for an approved version activated at a future time. The contract has no state for it, so the version shows "Approved" with its effective period. - Return to author always needs a comment. The contract's comment is optional, but a return without one tells the author nothing. - Approval rights. Approve is disabled only where the screen can tell (the author; no re-authentication). As on UI-ESS-007, the screen has no source for whether the user holds the approval role, so the provider refuses and the screen says "A different approver is required…". - Feature flags and extension points (FR-ESS-CFG-002) have their own operations in configuration.v1. The workspace's component list does not name them, so they are not shown beyond the lifecycle of an item type.

Review round 1

The review asked for three changes, all made on this branch:

  • A failed queue read hid tasks behind a fresh "As at" time. loadTasks now reports each failed part by name. The Tasks tab shows a notice and the failure, and the watermark does not move. Tests: CUX-53 a queue that cannot be read is named in a notice… and CUX-53 a failed list of queues is reported too….
  • Unknown task priority codes were shown as Normal. They are now shown in words as not recognized, with a caution, ranked after Critical and filterable. Tests: an unrecognized priority code is shown in words with a caution… and the glossary 5 mapping test.
  • Rows of adm.IdentityMatch and adm.Patient open /adm/ui-adm-002 without the record. UI-ADM-002 is not on main and has no deep link to an item yet, so this stays a follow-up (below).

Questions for a person

None. Nothing in this card needed a ruling on clinical, financial or access behaviour. The points the contracts leave open are handled as above, and the provider enforces each of them.

Follow-ups outside the card

  • Shell (a session owning web/shell):
  • mount WorkListCounter in the global bar;
  • offer WorkList to screens through the SDK (ADR-HIS-071), with UI-ADM-002's list as the first to move onto it;
  • set both folders' service settings;
  • a read-only mode signal and a form factor signal in ShellState;
  • the service client that replaces the api/http.ts copies, now in six screen folders.
  • UI-ADM-002 (RC-1-S21) deep link: UI-ESS-010 opens identity matches and patients at /adm/ui-adm-002 with no record, so the steward must find the item again (CUX-04 wants the owning screen opened with its context). Once UI-ADM-002 accepts /adm/ui-adm-002/match/<id> or similar, change the two entries of SCREENS in web/domains/ess/UI-ESS-010/config.ts to pass the identifier.
  • UI-ESS-001: the step-up adapter should return signatureId, and the second person's step-up should return theirs.
  • ESS contract, compatible minor versions:
  • notification.v1: acknowledge (FR-ESS-NTF-002), a per-user read marker if one is wanted;
  • workflow.v1: the outcome codes of a task type; a "queues I am eligible for" and a "queues I supervise" filter;
  • configuration.v1: a list of rollback requests by version, with a version on the request; a state or flag for an approved version scheduled for a future time.
  • Design system: tabs, a disabled action with its reason, a confirmation whose button ignores Enter, a select, a label and value summary, a multi-line text field, a time with UTC on request. These are the pieces RC-1-S22 and RC-1-S24 listed; they are copied into both folders.
  • RC-1-S26 (integrate): run both check-against-stubs.sh scripts beside the slice scenario, because the pipeline does not run them. The duplicate-review task of scenario step 6 appears in UI-ESS-010 for a steward, and opens UI-ADM-002.