Implementation plan / Session plan / Handover RC-1-S24
Handover RC-1-S24 Screens: ESS screens (part 2 of 3)¶
Card: RC-1-S24. Issue: cema-care/his#38. Branch: session/RC-1-S24.
What was built and where¶
Two screens of the ESS workspace, each in its own folder. The change touches nothing else except this handover.
| Folder | Screen | Workspace | Contracts |
|---|---|---|---|
web/domains/ess/UI-ESS-007/ |
UI-ESS-007 Terminology and master-data stewardship workspace | W16 Data governance, route /ess/ui-ess-007 |
contracts/ess/api/terminology.v1, master-data.v1, registry.v1 |
web/domains/ess/UI-ESS-009/ |
UI-ESS-009 Notification, task and workflow operations workspace (recovery worklist) | W19 IT operations, route /ess/ui-ess-009 |
contracts/ess/api/workflow.v1, notification.v1; contracts/adm/api/patient-identity.v1 (readPerson) |
Each folder has the parts of the RC-1-S22 screens (UI-ISE-007, UI-ISE-008):
screen.tsregisters the screen. Deep links open an item:- UI-ESS-007:
/ess/ui-ess-007/version/<id>and/proposal/<id>, from a stewardship task or notification; - UI-ESS-009:
/ess/ui-ess-009/<notification|instance|task|queue>/<id>, from an operational alert. - The service layer.
api/http.tsis the gateway client, copied from RC-1-S22 (below).api/stewardship.tsandapi/recovery.tshave one function per contract operation, with the contract's types. model.tsholds the presentation rules: the state words of OV-18 and the glossary, the safety relevance class and binding behaviour in words, the order of the work lists, and which actions are available, with the reason when one is not. The provider enforces every rule again.- The views:
- UI-ESS-007:
StewardshipWorkspace.tsx(tabs, queue, terminology browser),VersionDetail.tsx,ProposalDetail.tsx,RegistersPanel.tsxanddialogs.tsx. - UI-ESS-009:
RecoveryWorklist.tsx,Detail.tsxandActionDialog.tsx. - Shared pieces.
ui.tsxholds pieces the design system lacks, andfailure.tsxmaps failures to the screen states of Shell 13. - Tests:
- component tests with a fake gateway shaped by the contract examples (
*.test.tsx,test-support.ts); stubs.test.tsxandcheck-against-stubs.sh, which run the screen againsthis-contract serveof the contracts it calls.
UI-ESS-007 Terminology and master-data stewardship¶
- Stewardship queue (OV-01 configured for OV-16). It lists:
- master-data and registry change proposals in review (
listChangeProposals?state=proposed); - terminology versions in review, read from each code system's version list.
Columns: item, category, safety relevance, age, source, state and approval route. Safety-relevant items come first, then the oldest. A proposed version shows as "In review" (FR-ESS-MDM-001 part 11). Empty state: "No open stewardship items"; the header shows "As at [time]" (CUX-53). - Terminology: - code systems with classification, safety relevance ("Safety-relevant", "Standard", "· proposed" while Clinical Governance has not confirmed the class), owner and active version; - a version browser per code system, with "Load release"; - value sets with their binding behaviour: "Rejects invalid codes" or "Accepts with a flag" (CFG-ESS-012). - Version detail (OV-18): - The version header shows version, state, effective period, safety relevance and owner. For a safety-relevant version it shows author, second reviewer and approver as three names. The state words are Draft, In review, "Awaiting second review", "Second review done · [name]", Approved, "Scheduled · effective [date]", Active, Superseded, "Rolled back · [date]" and Retired. - The impact report has validation errors, inactivated codes and where they are used. - The action bar has Validate, Submit for review, Record second review, Return to author, Approve, Roll back and Retire version. Each unavailable action shows its reason, in the words of the brief: - "Submission is blocked while validation errors or unresolved impacts exist." - "You wrote this version. Another steward must review it." - "A second steward must review this safety-relevant version first." - "You wrote this version. A different approver is required." - "You recorded the second review. The approver is a third person." - A superseded version says "Superseded" and links to the current version. - Approve uses the PH-03 sign step, as on UI-ISE-007: - it re-authenticates every time, and three failed attempts cancel it; - Enter does not confirm, and the focus opens on Cancel; - it sets the effective time, "at approval" or a time in the facility's zone (stored in UTC). - Roll back shows the version to be restored. Retire takes an end date. Both need a reason. - Change proposal detail (OV-16 compare and resolve): - The version in force and the proposed values are side by side, with agreement per attribute by symbol and text (Same, Changed, New, Removed). - It shows the likely duplicates (PR-MDM-001-4), the dependants and the entity's version history. - The resolution bar has "Approve proposal" (with the sign step) and "Reject and return to author". Both need a reason, and both are disabled for the author: "You proposed this change. A different approver is required." - Master data and Registries are read-only browsers: - facilities, organizations, locations, practitioners ("In use", "Inactive", "Retired"), services and resources; - assigning authorities, identifier types, naming systems and external systems.
Each entry shows its version, state and effective period (UX-ESS-005). An opened entity shows its version history and, for the cross-referenced kinds, its cross-references. The confidential practitioner fields (identifiers, strNumber, practiceLicences; FR-ESS-MDM-003 part 13) are never shown.
UI-ESS-009 Recovery worklist¶
- Five work lists (OV-01, operations variant):
- Delivery failed and Escalation exhausted (
listNotifications?state=…); - failed and aged workflow instances (
listWorkflowInstances?stuck=true); - stuck tasks (
listTasks?stuck=true); - stuck queues (
listWorkQueues?stuck=true).
Row anatomy: item, subject, due, priority, state, assignee or recipient, source and age. Critical items come first, and the owning-domain filter never hides them (rule 3). Empty state: "No failed deliveries, stuck tasks or failed instances". A source that fails is reported by itself, and the other lists stay.
- Subjects are references only. The patient's name and No. RM appear only in an opened detail. They are read there from Domain 1 (readPerson), which audits the read (FR-ESS-WFL-002 part 13); the detail says so.
- The detail beside the list shows the full history, the steps with their failing reason, the delivery attempts, the escalation steps and the queue measures. An item closed by someone else shows "Closed: [state] · by [name] · [time]".
- Actions, each with a required reason that goes to history and audit:
- Retry delivery, or reroute to other channels or another recipient;
- Retry step and Request skip of step, for each failed step, then "Awaiting approval";
- Trigger compensation;
- Reassign task, to a queue, a user or a role;
- Recover task, for a failed task: retry, reassign or resolve;
- Reassign queue items, which reassigns every open task of a stuck queue with its own key. A queue with no eligible user also links to UI-ESS-002 ("Grant the role on Identity and access administration").
- Replay confirmation (OV-112) for a replay-sensitive step:
- It shows scope, target, ordering and replay-sensitive status.
- A second person authenticates in place, sees the same summary and reason, and cannot be the requester (CUX-64). Their refusal, with its reason, is shown to the requester. Without second-person authorization the retry is not offered.
- An instance flagged reconciliation-required (ADR-HIS-058 point 2) says so in words.
- The provider refuses a replay its owning domain does not permit, and the screen shows that refusal.
How the screens call the service¶
Both folders hold the api/http.ts of RC-1-S22 (same-origin gateway /ess and /adm, ADR-HIS-062):
- headers:
Authorization,X-Correlation-Id,X-Purpose-Of-Use: HOPERAT, andX-Facilityonly where the operation declares it; Idempotency-Keykept across a check again, andIf-Matchfrom the ETag or the record's version;- the Shell 13 failure mapping;
- CUX-36 "Checking whether this was saved", then the same request with the same key.
Two hooks were added to ServiceSettings. Both are supplied by the host and are screen-local, like RC-1-S22's stepUp, so this session wrote no decision record:
accountId()is the signed-in user's account ID (the token'ssub,contracts/essREADME). With it, the screen can disable an approval for the author and say why. While it is null, the screen leaves the action to the provider, which refuses (BR-ESS-006).secondPerson(request)is the CUX-64 second-person authorization in place. It returns the confirming person's account ID, name and role, or their refusal with a reason. While the host offers none, a replay-sensitive retry is not offered, with the reason.
Checks and their result¶
Node.js is not installed on this server. Every Node check ran in the node:22-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 |
46 passed (UI-ESS-007: 24, UI-ESS-009: 22); the 5 stub tests are skipped there, as designed |
| UI-ESS-007 against the ESS stub | web/domains/ess/UI-ESS-007/check-against-stubs.sh |
3 of 3 passed, and the stub recorded no violation |
| UI-ESS-009 against the ESS and ADM stubs | web/domains/ess/UI-ESS-009/check-against-stubs.sh |
2 of 2 passed, and neither stub recorded a violation |
| The shell with both screens | pnpm build and pnpm test in web/shell |
Bundle built (StewardshipWorkspace and RecoveryWorklist chunks). 19 passed and 1 skipped, plus the shared-version and screen-discovery checks |
| Static analysis | platform/delivery-pipeline/bin/static-analysis web/domains/ess/UI-ESS-007 web/domains/ess/UI-ESS-009 |
No blocking finding |
| Secret scan | platform/delivery-pipeline/bin/secret-scan code origin/main |
No finding |
| Protected files | platform/delivery-pipeline/bin/protected-files origin/main HEAD |
No exception or register approval added |
| Links of this handover | python3 docs/implementation_plan/tools/check_links.py |
Passed |
Accessibility. axe-core (WCAG 2.0 to 2.2 A and AA) checks:
- the queue, the terminology tab, the version detail, the proposal compare view and the registers;
- the recovery worklist;
- the retry, replay and sign-step dialogs while they are open.
Every dialog opens with the focus on Cancel, and Enter does not confirm (CUX-12).
Timeout. The first test of a component test file also loads the screen and axe-core, and once took over Vitest's default 5 seconds on a cold container. Both component test files set a 20-second test timeout with vi.setConfig, as the stub tests already do. The workspace's vitest.config.ts is unchanged.
Requirements and test scenarios¶
Every test names its requirement, and its test scenario where one exists (session rule 5). The scenarios of D10-ESS section 15.2 are covered for their screen part only; the service behaviour belongs to the build sessions RC-1-S06, RC-1-S07 and RC-1-S15.
| Requirement | Test scenario | Tests (describe titles) |
|---|---|---|
| FR-ESS-TRM-001: version header, lifecycle, impact report blocking submission, second review of safety-relevant versions, approval by a third person | TEST-ESS-015 (publication blocked; approval blocked until a second steward reviews) | FR-ESS-TRM-001 TEST-ESS-015 UX-ESS-005 UI-ESS-007 terminology versions; against the stub: FR-ESS-TRM-001 FR-ESS-MDM-001 FR-ESS-REG-001 UI-ESS-007 against the contract stub |
| FR-ESS-MDM-001, FR-ESS-MDM-002: proposal queue, compare and resolve, owner decision, not by the author | TEST-ESS-019, TEST-ESS-020 (screen part) | FR-ESS-MDM-001 FR-ESS-MDM-002 TEST-ESS-019 TEST-ESS-020 OV-16 UI-ESS-007 change proposals, FR-ESS-MDM-001 FR-ESS-TRM-001 FR-ESS-DGV-002 UI-ESS-007 stewardship queue |
| FR-ESS-MDM-003: practitioner "In use", no confidential fields | TEST-ESS-021 (screen part) | FR-ESS-MDM-003 TEST-ESS-021 FR-ESS-REG-001 TEST-ESS-033 UI-ESS-007 registers |
| FR-ESS-REG-001: registries and cross-references | TEST-ESS-033 (screen part) | the same |
| FR-ESS-TRM-003, FR-ESS-DGV-002 | TEST-ESS-017, 018, 035 | Not covered: no contract in this slice (below) |
| FR-ESS-WFL-001: failed and aged instances, retry, skip, compensation, no blind replay | TEST-ESS-028, TEST-ESS-043 (screen part) | FR-ESS-WFL-001 TEST-ESS-028 UI-ESS-009 failed workflow instances, FR-ESS-WFL-001 TEST-ESS-043 OV-112 CUX-64 UI-ESS-009 replay into a replay-sensitive step |
| FR-ESS-WFL-002: stuck tasks and queues, manual reassignment with a reason, no eligible user, minimum necessary subject | TEST-ESS-029 (screen part) | FR-ESS-WFL-002 TEST-ESS-029 UI-ESS-009 stuck tasks and queues, FR-ESS-WFL-001 FR-ESS-WFL-002 FR-ESS-NTF-001 UI-ESS-009 recovery worklist |
| FR-ESS-NTF-001: Delivery failed on the operations worklist, retry and reroute | TEST-ESS-026 (screen part) | FR-ESS-NTF-001 TEST-ESS-026 FR-ESS-NTF-002 TEST-ESS-027 UI-ESS-009 undelivered notifications |
| FR-ESS-NTF-002: exhausted escalation open and visible | TEST-ESS-027 (screen part: listed and shown) | the same; against the stubs: FR-ESS-WFL-001 FR-ESS-WFL-002 FR-ESS-NTF-001 UI-ESS-009 against the contract stubs |
Each test also names the rule it checks in its own title: UX-ESS-005, UX-ESS-006, OV-16, OV-112, CUX-12, CUX-36, CUX-53, CUX-64, PH-03, PR-TRM-001-2, PR-TRM-001-5, PR-WFL-002-3, WF-ESS-004, DAT-002, Shell 13 and UI-ESS-009 rule 3.
NFR-ESS-010 Usability was a design input. These choices serve it:
- every state is shown in words, never by colour alone;
- red is never used, because no state on these workspaces endangers patient care now by itself (CUX-15);
- each action's label names its effect;
- each unavailable action says why;
- both screens work by keyboard throughout (React Aria);
- times are in the facility zone, and in UTC on request.
The NFR's own measure, an observed task-based evaluation, is for the slice's readiness work.
Differences from the brief, specification or contract, and why¶
Not in any contract of this slice, so not shown. The screens show nothing for these and invent no data:
- stewardship items of data governance (MOD-ESS-011, FR-ESS-DGV-002): the queue columns "occurrence count", the items for unknown identifiers and invalid codes, and "resolve or reject stewardship item";
- the concept map editor, and the unmapped instrument codes and units (FR-ESS-TRM-003; OV-45, OV-46, OV-55, OV-69, OV-71);
- Clinical Governance's "Confirm safety relevance" (terminology.v1 has no operation for it);
- edit of a map, and a binding detail beyond the value set's binding behaviour;
- the value set version list (terminology.v1 lists versions for code systems only).
The CONTRACT-POINTS of RC-1-S01 say this for the concept maps and the stewardship items.
UI-ESS-007:
- "Activate version" is part of the approval. terminology.v1 has no activate operation: approval sets the effective time, and the version becomes Active when that time comes. The approval dialog offers "At approval (activate now)" or "At a set time". An approved version with a future time shows "Scheduled · effective [date]" (glossary).
- "Return" of a master-data proposal is a rejection.
decideChangeProposalknowsapproveandrejectonly. The button says what it does: "Reject and return to author". The author proposes again. - The decision always needs a reason, as the OV-16 resolution bar asks, though the contract's
commentis optional. - The author may never decide their own proposal on this screen, as the brief says. The contract refuses it only where the attribute class needs owner approval.
- A steward without approval rights still sees Approve and Approve proposal enabled. The brief's No-permission state asks for "the approval actions disabled with the reason". The screen has no source for the user's approval rights:
- the shell SDK gives the user's name, role and location, not their permissions;
- the policy decision point answers service callers only;
- terminology.v1 and master-data.v1 carry no "may approve" signal on a version or a proposal.
The screen therefore disables approval only where it can tell: for the author, for the second reviewer, before the second review, and without a step-up provider. A steward without approval rights goes through the sign step, and the provider then refuses with 403. The screen shows "Your role does not allow this action. A different approver is required: …" (failure.tsx), and nothing is approved. A follow-up below asks for the signal that closes the gap.
- "One reviewer must be clinically qualified" cannot be checked on the screen, because the contract has no qualification of the stewards. The provider refuses, and the screen shows its message.
- A terminology version in the queue shows its age as "Not recorded", because TerminologyVersion has no submission time.
- Only the internal attributes of an entity are shown, and no confidential practitioner field.
UI-ESS-009:
- Replay permission is the provider's. "Disabled unless the owning domain's reconciliation rule permits it" needs the definition's
replayPermitted(ADR-HIS-058 point 2), which workflow.v1 does not expose on the instance. The screen asks for the second person; the provider refuses a replay the owning domain does not permit, and the screen shows that refusal. The flagreconciliation-requiredis shown in words. - An exhausted escalation is listed and opened, but not retried.
retryNotificationserves Delivery failed only (FR-ESS-NTF-001 part 3). Its follow-up belongs to FR-ESS-NTF-002, a later slice; the screen says so as the action's reason. - "Reassign queue items" reassigns each open task of the queue with
reassignTask, one key per task, because workflow.v1 has no queue-level reassignment. It reports how many moved and names any that did not. - The patient line reads ADM's
readPerson. It shows the name and the No. RM of the working facility. A 403 says the role may not see them, and the reference stays.
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 SDK (a session owning
web/shell): - a service client for the
api/http.tsnow copied into four screen folders (UI-ISE-007, UI-ISE-008, UI-ESS-007, UI-ESS-009) and RC-1-S21's ADM screens; - three host hooks from sign-on (UI-ESS-001): the account ID (
sub), the PH-03 step-up, and the CUX-64 second person in place; - the
CSS.escapestand-in that eachtest-support.tscarries. - Design system: tabs, a multi-line text field, a compare row with agreement by symbol and text, and the pieces RC-1-S22 listed (section, notice, disabled action with reason, confirmation whose button ignores Enter, select, label and value summary, time with UTC on request).
- ESS contract, compatible minor versions:
- terminology.v1:
- the submission time of a version (queue age);
- the version list of a value set;
- "confirm safety relevance" for Clinical Governance;
- the reviewers' clinical qualification, so the screen can say "One reviewer must be clinically qualified." before the provider refuses;
- workflow.v1: the step's
replayPermittedon the instance, so the screen can disable a replay the owning domain does not permit, and a step-up assertion of the second person (RC-1-S15's follow-up); - master-data.v1: a "return to author" distinct from a rejection, if the owner wants the brief's wording kept.
- Approval rights on UI-ESS-007 (differences, above), one of:
- a permission hint in the shell SDK, for a session owning
web/shellwith the policy decision service (RC-1-S16, RC-1-S17): the user's permitted actions for a resource type, such asVERSION_APPROVEand the proposal decision; - a compatible minor version of terminology.v1 and master-data.v1 with a per-caller "can approve" signal on the version and on the proposal.
With either, the screen disables Approve and Approve proposal before the sign step, with the reason, as the brief's No-permission state asks.
- Later slices: UI-ESS-007's queue gains the MOD-ESS-011 stewardship items and the concept maps when their contracts come. The rows for guideline and pathway mapping exceptions then open UI-EBP-003 (OV-45).
- Contract stub: a draft the ESS stub creates has no impact report (readTerminologyImpact answers 404), so the stub test stops at the draft's header. Validate is covered by the component tests.
- RC-1-S26 (integrate): it may run both check-against-stubs.sh scripts beside the slice scenario, since the pipeline does not run them.