Architecture / Decision records / ADR-HIS-078
ADR-HIS-078 How screens ask for supervisor approval, move to another screen with a patient, and show who a record is about, until the shell SDK and the contracts offer them¶
| Status | Accepted |
| Decided | 2026-11-26 by session RC-2-S07 |
| Record | Drafted 2026-11-26; approved 2026-11-30 by the Enterprise Architecture Board |
| Where the rule lives | web/domains/adm/UI-ADM-005/, UI-ADM-006/ and UI-ADM-007/ (navigation.tsx, patients.tsx, intents.ts, failure.tsx, time.ts, api/persons.ts, fake-gateway.ts, check-against-stubs.sh; api/terminology.ts) |
Context¶
RC-2-S07 builds the scheduling workspace UI-ADM-005, waitlist management UI-ADM-006 and the queue console UI-ADM-007. They follow ADR-HIS-069 for service calls, the patient context zone and the proof against the stubs. They meet three more gaps that ADR-HIS-069 did not cover, and that later screen sessions will meet too:
- Supervisor approval in place. Overbooking, a waitlist priority override and a queue override need a registration supervisor (OV-20, CUX-64). The design has the supervisor authenticate in the step-up dialog of UI-ESS-001 on the requester's screen. The dialog is not built, and the contracts carry nothing for a second person. The scheduling.v1 and flow.v1 contracts decide supervisor authority for the signed-in caller through the policy decision point (403 "Supervisor authority required.").
- Moving to another screen with a patient or an item. The briefs send the user from one screen to another with context: "Book offered slot" opens UI-ADM-005 with patient, template and slot; "Add to waitlist" opens UI-ADM-006 with patient and service; check-in exits to the queue console. The shell SDK has no call for this (the
openPatientfollow-up of ADR-HIS-069). The enterprise person identifier must never be displayed (DEC-ADM-002), and scheduling.v1 keeps the patient out of URLs (searchSlotsis a POST for that reason). - Who a record is about. Appointments, waitlist entries and appointment requests carry only the person identifier. A row must show the name and No. RM (PH-01, OV-01). Queue items carry
patientDisplay; the scheduling records do not.
Options considered¶
For 1: - (a) Hide the supervised actions until UI-ESS-001 exists. The brief's actions would be missing, and a supervisor signed on could not act. - (b) Build a second-credential prompt in the screen. The contracts have no field for it, and a screen must not collect credentials (UI-ESS-001 owns sign-on). - (c) Offer the action. The command goes under the signed-in user's own authority, and the unit and the policy decision point decide. A 403 shows "Supervisor authority required. A registration supervisor can approve it." In-place approval is shown as a disabled action with its reason.
For 2: - (a) Query parameters. They put the person identifier in the address bar, the browser history and the gateway logs. - (b) Browser storage. ADR-HIS-069 point 7 and CUX-39 rule it out. - (c) A one-time handoff in the memory of the window, keyed by the target screen, followed by in-shell navigation.
For 3:
- (a) Ask for a contract change. That is a contract session's work, and adding a field is a later, compatible minor version.
- (b) Read the person (readPerson) once per person shown, and show the name and No. RM.
Decision¶
- Supervised actions (OV-20 interim).
- Overbook slot, Override priority (waitlist) and Override position and out-of-order calls (queue) are offered to every user with the reason field. A missing reason is blocked on the screen with "Enter the reason for the priority change." (or the overbooking reason).
- The command is sent as is, and the unit decides authority. A 403 on such a command reads "Supervisor authority required. A registration supervisor can approve it." (
failure.tsx, contextsupervised). - Each of these forms shows "Supervisor approves here" disabled, with the reason "In-place approval comes with the step-up dialog of sign-on (UI-ESS-001)". So a supervisor signed on acts today, and a clerk is told who can.
- When UI-ESS-001 offers the step-up, the dialog is opened from that control. The contract then needs to carry the approver; that is a contract change, recorded as a follow-up.
- Handoff between screens.
navigation.tsxkeeps a map in the window's memory, underSymbol.for("his.adm.screen-handoff"), keyed by the target screen. Its typed payloads are:- to UI-ADM-005: patient, template, slot, waitlist entry;
- to UI-ADM-006: patient, template, service;
- to UI-ADM-007: queue, queue item.
- The screen that leaves calls
handOffand navigates with React Aria'sLink, which goes through the shell's router (RouterProvider), so the window and its memory stay. - The target screen calls
takeHandoffonce when it mounts, and the entry is removed. Nothing goes into the URL or browser storage. - Closing or reloading the window loses the handoff. The target screen then opens empty, which is safe.
- Patient lines in rows.
usePatientLinesreads each person shown in a list once (readPerson, audited by the unit asadm.person.view) and shows the name as recorded, never truncated, and the facility's No. RM.- A person that cannot be read shows "Patient details unavailable", or "Not permitted to show this patient" on a 403. It never shows the identifier.
- The follow-up is a
patientDisplayfield on Appointment, WaitlistEntry and AppointmentRequest, in the shape of flow.v1's. It is a compatible minor version of scheduling.v1, and it would remove the per-row reads. - Files the three folders share as identical copies. These are
api/http.ts(identical to UI-ADM-001's),api/persons.ts,failure.tsx,intents.ts,navigation.tsx,patients.tsx,time.ts,ui.tsx(identical to UI-ADM-001's),fake-gateway.tsandcheck-against-stubs.sh. A screen folder imports nothing from another one (session rule 10), so the copies stay identical and move to the SDK or the design system together. - One key per intent (
intents.ts). This is the CUX-35 and CUX-36 behaviour of ADR-HIS-069 point 4 as a hook: - the key is kept while the same intent is retried, and after a lost response only "Check again whether it was saved" is offered;
- the key is renewed on success, or when the user changes what is asked, because the intent name includes the request.
- Facility time (
time.ts). Dates and times staff enter, such as a search period or an availability exception, are wall times in the facility's zone (useShell().timeZone, CUX-62). They are converted to UTC instants before they are sent. - Governed lists are read, never written into a screen (review rounds 1 and 2). This holds for every list the specification or the contract calls governed, clinical or administrative.
- The screens read the members from the D10 terminology service (terminology.v1
expandValueSet,api/terminology.ts, identical in the three folders). They offer the members with their displays, send the member's own system and code, and hold no code of any governed list. -
The lists and what a screen does while one cannot be read (not yet registered in D10, or the service unavailable) follow from the field's definition in the specification:
List (value set) Specification Field While the list cannot be read adm.clinical-urgencyFR-ADM-SCH-004 part 7: governed value set, supplied by clinicians Code Urgency cannot be set or changed; "Add to waitlist" cannot be completed adm.appointment-change-reasonFR-ADM-SCH-002 part 7: "Code / text", validation "Governed list" Member of the list "Reschedule appointment" is disabled with its reason adm.appointment-cancellation-reasonFR-ADM-SCH-002 part 7, as above Member of the list "Cancel appointment" is disabled with its reason adm.appointment-request-decline-reasonFR-ADM-SCH-002 part 6.8: "a reason from a governed list" Member of the list "Decline request" is disabled with its reason; booking and offering another time stay possible adm.queue-override-reasonFR-ADM-FLW-001 part 7: "Code / text", mandatory for an override Member, words, or both The reason in words alone is sent ( { text }) -
A reason the specification gives no list for is the user's words, sent as
{ text }:- the overbooking reason (FR-ADM-SCH-003 part 6.6, "with a reason");
- the cancellation of a queue item (brief UI-ADM-007: "Code or text", left or withdrawn);
- the no-show reason (scheduling.v1 example);
- waitlist priority-change and offer-decline reasons (scheduling.v1 examples).
- A record's coded value is shown with its own display, then the list's, then the code.
- The value set identifiers are names to register in D10,
adm.plus the code list's name of the contracts/adm README; the decline reason list is not in the README yet. They carry no codes. - Later screens do the same for every governed list: read it through terminology.v1, or stop and ask on the issue (session rule 3). They never propose its codes.
Rationale¶
- The unit, not the screen, is the authority on access (session rule 3; architecture 8). Option 1(c) changes no access behaviour: the decision point decides as the contract says. Hiding the action would take the brief's action away from supervisors who are signed on.
- An identifier in a URL is a disclosure that outlives the session. Memory in the window is the narrowest place that still lets the shell's router carry the user across.
- One read per person is the only contract-compliant way to meet PH-01 in a row today. The number of people on one waiting list or worklist page is small, and the reads are the user's own, audited ones.
Consequences¶
- Shell SDK (a session owning
web/shell): a navigation-with-context call, for exampleopenScreen(id, context), replacesnavigation.tsx, and the step-up dialog of UI-ESS-001 is offered to screens for OV-20. The copies listed in point 4 then move to the SDK or the design system. - Contracts (an ADM contract session):
patientDisplayon Appointment, WaitlistEntry and AppointmentRequest; the approver of an override or overbooking once step-up exists; a list operation for the waiting lists (CFG-ADM-018), since UI-ADM-006 now offers only the lists its entries name; a "withdraw offer" transition, if the owners confirm the brief's assumption. - D10 registrations: the five value sets of point 7.
adm.clinical-urgencyis supplied by clinical governance; the reason lists by the owner of the D01-ADM code lists. Until they exist, the actions of point 7 that need a member stay disabled. - Later screen sessions follow points 1 to 7 until then.