Implementation plan / Session plan / Handover RC-3-S23
Handover RC-3-S23 Screens: ESS screens (UI-ESS-008, UI-ESS-012)¶
Card: RC-3-S23. Issue: cema-care/his#79. Branch: session/RC-3-S23. Slice: RC-3. Decision record: ADR-HIS-117. The screens follow ADR-HIS-069 (service layer, screen states, proof against the stubs) and ADR-HIS-071 (accountId, stepUp, secondPerson, the signatureId).
What was built and where¶
Two screen folders in the ESS workspace, and the decision record. Nothing else in web/ changed.
| Folder | Screen | Workspace, nav order | Contracts |
|---|---|---|---|
web/domains/ess/UI-ESS-008/ |
UI-ESS-008 Audit search and review workspace | W14 Privacy, security and audit, 40; route /ess/ui-ess-008 |
contracts/ess audit.v1 (1.2); for names, contracts/adm patient-identity.v1 readPerson and contracts/ess identity.v1 readAccount |
web/domains/ess/UI-ESS-012/ |
UI-ESS-012 Governance registers | W16 Data governance, 20; route /ess/ui-ess-012 |
contracts/ess api-catalogue.v1, decision records |
Each folder has the parts of the earlier ESS screens (UI-ESS-011, handover RC-1-S25):
screen.ts;api/http.ts, the service layer of ADR-HIS-069, copied from UI-ESS-011. UI-ESS-008's copy adds the domainadm;api/audit.tsandapi/people.ts, orapi/decisions.ts: one function per contract operation, with the contract's types;model.ts, the presentation rules;failure.tsx, the Shell 13 states in each screen's own words;ui.tsx, the layout pieces of UI-ESS-011, plus the checkbox and tab set of UI-ISE-011;dialogs.tsx, the commands;- the views;
test-support.ts, the fake gateway shaped by the contract examples;- the component tests;
stubs.test.tsxandcheck-against-stubs.sh.
UI-ESS-008 Audit search and review workspace¶
- Purpose of query, once at the top. It is a code and optional text, required before any read and sent with every one (PR-AUD-002-2). Beside it the screen says that every search, report, review view and export is recorded with its criteria and this purpose (BR-ESS-021). The codes are listed in ADR-HIS-117 point 2; question 1 below.
- Read-only. The header says audit events cannot be changed or deleted. No action anywhere edits or deletes one (BR-ESS-020).
- Integrity marks. Verification runs are read once. Every search result in a range a failed run marked carries "Integrity failure in this range", and the ranges are named above the views (PR-AUD-002-1).
- Search. The query form takes every criterion of FR-ESS-AUD-002 part 6.4: time range, patient, actor, resource type and ID, action, outcome, source system, correlation ID and emergency access session.
- "Search audit records" is disabled with its reason until the query is bounded ("Limit the search by time range or subject.").
- The paged result list comes newest first, with:
- local time, and UTC on request;
- the actor, with both the person and the service when a service acted for a person;
- event type, action and outcome;
- the patient by name and MRN (PH-01);
- the resource as a reference;
- the source;
- the flags: purple "Emergency access" with the shield, linked to its session; event and receipt times that differ; the integrity mark.
- A row opens the evidence view beside the list, with every field of the event:
- the decision trace link with its policy version;
- before and after, or "Detail is held in the source record history" (PR-AUD-001-4);
- the integrity metadata;
- "Open patient access report".
- "Export audit records" exports the criteria of the result as NDJSON. It polls the export and offers "Download export file" with the digest to check and the link's expiry.
- Patient access report (OV-14, REP-ESS-010).
- The patient comes from a search result or the evidence view, from a typed person ID, or handed over in the window's memory by another screen (UI-HIM-012, ADR-HIS-117 point 1). The patient never appears in the URL.
- The patient context zone is drawn in its counter form, with no clinical content (CUX-48).
- The columns come in the order of OV-14: who, when, from where, for what purpose, emergency access. Then action, resource, outcome and care relationship. Every column is a filter.
- "Print report" prints with the patient's name, second identifier and "Emergency access" at the top of every page (Shell 4 rule 8, CUX-46).
- Review views, the six of FR-ESS-AUD-003 part 6.5.
- Purpose and time range are required, with the account for access by a user and the patient for access to a patient, and an optional facility.
- Rows use the report's columns, with the patient, the event type and, for access outside assignment, why the row is in the view. The patterns are counts in the period, "No threshold is applied; the reviewer judges".
- A refused view says "Limit the search by time range or subject." (contract point RC-3-S23), unless the refusal names self-review.
- Integrity. The last verification with its result, range, trigger and marked ranges; the list of runs; a run opens its detail. "Verify integrity now" takes a range, and the provider decides who may start it.
- Evidence holds.
- The holds list shows criteria, reason, incident, who placed the hold and in which role, state, and the release with both people.
- "Place evidence hold" takes the role (defaulted from the active role), reason, incident and bounded criteria.
- "Release evidence hold" follows FR-ESS-AUD-003 part 6.7, not the brief's assumption: see "Differences" below.
- Screen states. Sign-on; empty before the first search; loading; no results; error with the service-desk reference; partial result ("Archived records for the period are temporarily unavailable."); no permission ("You are not authorized to view audit records. This attempt has been recorded."); self-review refused (PR-AUD-002-4). Downtime is the shell's.
UI-ESS-012 Governance registers¶
The screen has three tabs: Ownership register, API catalogue and ADR register.
- ADR register.
- The architecture decision records, with number, title, status, decision date and review date. "Review overdue" carries the clock symbol (Shell 9). Filters are status and review overdue.
- The detail beside the list shows:
- the header: state, type, approving body, author, approver, decision date and review date;
- the context, options, decision, rationale and risks;
- the linked items;
- supersession both ways.
- Actions:
- "Propose decision record" asks for options, rationale, risks and review date, in the words of part 10.
- "Accept record" and "Reject record" use the sign step. The author is never offered them, and the screen says why. A rejection needs a reason.
- "Mark superseded by" offers only another Accepted record of the same type. It shows what refers to the record first (UX-ESS-006), and asks for the sign step.
- "Link item" is offered while the record is Proposed.
- Ownership register.
- The tab says that the register of data domains is not available in this release, because no contract serves it (see "Differences").
- It shows the governance decision log of FR-ESS-DGV-001 part 6.3: the governance decisions of the same register, approved by the Data Governance Council, with the same detail and actions. "Record governance decision" is there.
- API catalogue. A link only: "Open API catalogue" goes to
/ise/ui-ise-003?view=governance, the governance view of RC-3-S20's UI-ISE-003 (OV-15). The tab has no contract list of its own. - Entry.
/ess/ui-ess-012/record/<recordId>opens a record in the tab of its type (OV-19, UI-ISE-011). - Screen states. Sign-on; empty register; loading; error with reference; no permission to change, from the provider; review overdue.
Checks and their result¶
The host's Node.js 22.22 cannot run the TypeScript contract tool, so the checks ran in the image node:22.18-bookworm with pnpm 10.34.9 through corepack, as earlier sessions did. The integration environment was not needed: check-against-stubs.sh serves the stubs itself. The host was heavily loaded during the session (load average 25 to 45 on four cores), which the timeouts below account for.
| Check | Command | Result |
|---|---|---|
| Type check of the workspace | pnpm build in web/domains/ess |
Passed |
| UI-ESS-008 component and accessibility tests | pnpm exec vitest run UI-ESS-008/AuditWorkspace.test.tsx |
22 of 22 passed |
| UI-ESS-012 component and accessibility tests | pnpm exec vitest run UI-ESS-012/GovernanceRegisters.test.tsx |
14 of 14 passed |
| The whole workspace | pnpm test in web/domains/ess |
UI-ESS-008 (22) and UI-ESS-012 (14) passed in the full run. 8 tests of screens this session did not touch failed at load 15 to 30: UI-ESS-002, UI-ESS-004, UI-ESS-006, UI-ESS-010 and UI-ESS-011. Re-run at load 3 to 7, those of UI-ESS-004, 006, 010 and 011 pass. UI-ESS-002's Accounts and Authentication files still fail, alone and on different tests each run (see the follow-ups) |
| UI-ESS-008 against the ESS and ADM stubs | web/domains/ess/UI-ESS-008/check-against-stubs.sh |
4 of 4 passed; neither stub recorded a violation |
| UI-ESS-012 against the ESS stub | web/domains/ess/UI-ESS-012/check-against-stubs.sh |
2 of 2 passed; the stub recorded no violation |
| The shell with the two screens | pnpm build and pnpm test in web/shell |
Bundle built (AuditWorkspace and GovernanceRegisters chunks). 19 passed, 1 skipped, plus the shared-version check |
| Secret scan | platform/delivery-pipeline/bin/secret-scan code origin/main |
No secret found |
| Documentation links | python3 docs/implementation_plan/tools/check_links.py |
0 broken, 0 duplicate anchors |
Accessibility is checked with axe-core (WCAG 2.0 to 2.2 A and AA) on:
- UI-ESS-008: the first view, the result list with the evidence view, the patient access report, the review view and the evidence holds;
- UI-ESS-012: the ADR register, a record and the ownership register tab.
Every dialog opens with the focus on "Cancel", and Enter does not confirm.
Timing:
- Both component test files set a 40-second test timeout, with the reason in a comment. The export test sets 60 seconds, because the export is polled every 2 seconds. On the loaded host, flows that type into many fields took over 20 seconds.
- Both
check-against-stubs.shwait up to 90 seconds for a stub to start, not 10, because the ESS contract took longer than 10 seconds to load on the loaded host. - The stub tests set 20-second waits for their answers.
Requirements and test scenarios¶
The card names screens, not requirements. The table lists the requirements the briefs use, and the test scenarios of D10-ESS 15.2 for their screen part. The provider behaviour belongs to the build sessions (RC-1-S04, RC-3-S04) and to RC-3-S24.
| Requirement | Test scenario | Tests (describe titles) |
|---|---|---|
| FR-ESS-AUD-002: search, purpose, bounded query, no edit or delete, export, patient access report, integrity, partial result, denial, self-review | TEST-ESS-023 (screen part: no function changes an event; the query carries criteria and purpose; denial shown) | FR-ESS-AUD-002 TEST-ESS-023 BR-ESS-021 UI-ESS-008 search and evidence view, FR-ESS-AUD-002 UI-ESS-008 screen states (Shell 13), FR-ESS-AUD-002 PR-AUD-002-1 UI-ESS-008 integrity, FR-ESS-AUD-002 UI-ESS-008 export, FR-ESS-AUD-002 OV-14 REP-ESS-010 UI-ESS-008 patient access report; against the stubs: FR-ESS-AUD-002 FR-ESS-AUD-003 UI-ESS-008 against the contract stubs |
| FR-ESS-AUD-003: review views, evidence holds, release by the permitted releaser with a second person (PR-AUD-003-4) | TEST-ESS-024 (screen part: the evidence hold) | FR-ESS-AUD-003 UI-ESS-008 review views, FR-ESS-AUD-003 TEST-ESS-024 PR-AUD-003-4 UI-ESS-008 evidence holds; against the stubs, as above |
| FR-ESS-AUD-001: what an event shows (excluded detail, time skew, service on behalf of a person) | The third test of ... search and evidence view, named FR-ESS-AUD-001 PR-AUD-001-4 ... |
|
| FR-ESS-CFG-003: ADR register, mandatory fields, accept and reject by the approver not the author, supersede, links | TEST-ESS-037 (screen part: ADR completeness; the catalogue is UI-ISE-003's) | FR-ESS-CFG-003 OV-19 UI-ESS-012 ADR register, FR-ESS-CFG-003 TEST-ESS-037 UI-ESS-012 propose, accept and reject, FR-ESS-CFG-003 UX-ESS-006 UI-ESS-012 supersede and link, FR-ESS-CFG-003 UI-ESS-012 screen states (Shell 13); against the stub: FR-ESS-CFG-003 FR-ESS-DGV-001 UI-ESS-012 against the contract stub |
| FR-ESS-DGV-001: the governance decision log (part 6.3) | TEST-ESS-034 not covered: ownership lookup and steward deactivation need the ownership register, which has no contract | FR-ESS-DGV-001 OV-15 UI-ESS-012 ownership register and API catalogue |
Test titles also name BR-ESS-020, BR-ESS-021, PR-AUD-001-4, PR-AUD-002-1, PR-AUD-002-4, PR-AUD-003-4, OV-14, OV-15, OV-19, OV-116, REP-ESS-010 and UX-ESS-006.
NFR-ESS-010 Usability was a design input:
- every state is in words, never colour alone;
- each action names its effect and says why when it is unavailable;
- keyboard use throughout (React Aria);
- local times with zone, and UTC on request;
- one purpose field for the whole workspace.
Its measure, an observed evaluation with users of each role, is for the slice's readiness work.
Differences from the brief, specification or contract, and why¶
The screens show nothing their contracts do not carry, and invent no data.
UI-ESS-008:
- Release of an evidence hold follows FR-ESS-AUD-003 part 6.7 and contract point RC-3-S23, not the brief's assumption that the security officer who placed a hold releases it.
- It is offered to the privacy officer or the legal and compliance officer who placed the hold, in the same role, and to a privacy officer for a hold a security officer placed.
- The second person authorizes in place (
secondPerson, CUX-64) and may not be the releaser. The screen refuses that before anything is sent, and so does the provider. - The confirmation names both people. A refusal with rule PR-AUD-003-4 says "Release refused (PR-AUD-003-4)" with the provider's reason.
- The brief correction is already a follow-up of RC-3-S01.
- The purpose of query is a fixed list in the screen until the audit access purpose value set is published (question 1).
- The auditor's remaining grant time is not shown in the header (brief [A]): no contract carries the grant's end (follow-up).
- "Verify integrity now" asks for the range to verify, which
startIntegrityVerificationrequires. The brief has no input for it. - Patient selection for the report is from a search result, from the evidence view, from another screen's handoff, or by typed person ID. The screen does not search Domain 1 by name. The brief names no patient search on this screen, and audit reviewers work from the record or a request.
- Export of the patient access report is the audit export of its patient and time range (NDJSON). The printed report is the browser's print of the view, with the identity header on every page.
- The search reads no event again (
readAuditEvent): the evidence view shows the row the search returned, which carries every field. A second read would add a second audited access for the same data.
UI-ESS-012:
- The ownership register's data domain entries are not built. FR-ESS-DGV-001 part 6.1 has no contract: MOD-ESS-011 is in no slice's contracts, and the ESS contract points say DGV is outside RC-1 and RC-3. Not built with them:
- the entry list, detail and history;
- "Propose entry", "Propose change to entry", "Approve entry", "Return entry", "Retire entry" and "Record review";
- the "Owner inactive", "Steward inactive", "No owner", "No steward" and "No quality rules" flags.
The tab says the register is not available in this release, and shows the governance decision log, which has a contract. The same was done for UI-ISE-011's dependency register (RC-3-S22). A follow-up asks for the contract. - "Record governance decision" proposes a governance decision in the one register. The Data Governance Council then accepts it with "Accept record", which sets the approver and date. The brief's "approver and date present" is met by that acceptance. The contract has no single call that records an approved decision. - "Link item" is offered only while a record is Proposed, because updateDecisionRecord changes only a Proposed record. The brief says "ADR open". - Deprecated, a state of the contract that the brief does not list, is shown as "Deprecated", read-only. - The extension-point register is not on the screen, as the brief says.
Questions for a person¶
None blocks this work. Asked here and in the pull request:
- Owner of D10-ESS (FR-ESS-AUD-002 part 7, "Purpose of query: value set"): which codes does the audit access purpose value set hold? Until it is published, UI-ESS-008 offers
privacy-investigation,security-investigation,access-review,patient-access-request,external-auditandlegal-request. The audit service accepts any code. For a record review, the reasons of CFG-HIM-027 apply (FR-ESS-AUD-002 part 6.5). The answer changes onlyPURPOSESinmodel.ts.
Follow-up work outside the card¶
- Contract for the ownership register (MOD-ESS-011, FR-ESS-DGV-001 parts 6.1, 6.5 and 6.6; INT-ESS-017 reads it). It would be a D10 contract session in a later slice. UI-ESS-012 then adds the entries in the tab that now holds the decision log (ADR-HIS-117, "Consequences").
- The auditor's grant end (FR-ESS-AUD-002 part 3, brief [A]): a compatible field on the caller's grant, in identity.v1 or audit.v1, so UI-ESS-008 can show when an auditor's access ends.
patientDisplayon audit rows. A compatible field on AuditEvent and the report rows, in the shape of flow.v1's, would replace the per-rowreadPersoncalls, as ADR-HIS-078 point 3 proposes for the ADM contracts.- The contract stub and enum path parameters.
his-contract servetreats the path parameterviewofrunReviewViewas a record identifier and seeds only the example'semergency-access. The other five views answer 404 from the stub, so the stub test runs only that view. The stub generator could answer every enum value of a path parameter (contracts/common, FN-S04's tool). - Design system: the layout pieces of
ui.tsx(section, notice, unavailable action, confirm dialog and button, summary, select, multi-line field, time with UTC, checkbox, tab set), the emergency access label with its session link, and the handoff ofhandoff.ts, as the earlier screens list. - Shell workspace kit:
CSS.escapefor jsdom, as the earlier screens list. - UI-ESS-002 tests (RC-1-S23), not changed by this session.
Accounts.test.tsxandAuthentication.test.tsxfail on this host even alone at load 3 to 7, on different tests each run: "Unable to find role=\"table\" and name \"Accounts\"", and "Unable to find role=\"button\" and name \"Open account Sinta Kurniawati\"".- The failures are
findByqueries that give up after their default 1-second wait, not test timeouts (those files set 20 and 30 seconds). - The fix is to give those first queries a longer wait: a fix session for RC-1-S23's screens.
check-against-stubs.shin other folders waits 10 seconds for a stub. That was too short for the ESS contract on the loaded host, and this session's copies wait 90.- Entries the later screens serve or use (ADR-HIS-117 point 1):
- UI-ESS-003 serves
/ess/ui-ess-003/decision/<decisionId>; - UI-ESS-005 serves
/ess/ui-ess-005/session/<sessionId>and links to/ess/ui-ess-008/session/<sessionId>; - UI-HIM-012 hands the patient over with
handOff("UI-ESS-008", { patientRef }); - UI-ISE-011 links to
/ess/ui-ess-012/record/<recordId>. - Decision record numbering. ADR-HIS-112, 113 and 114 are taken by open pull requests #273, #285 and #290, and 115 and 116 are on main, so this record is ADR-HIS-117. It was checked against
origin/mainand every open pull request on 2026-12-01. ADR-HIS-117 cites ADR-HIS-113 without a link, because that record is not on main yet.