Skip to content

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:

  1. 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.").
  2. 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 openPatient follow-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 (searchSlots is a POST for that reason).
  3. 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

  1. Supervised actions (OV-20 interim).
  2. 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).
  3. 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, context supervised).
  4. 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.
  5. 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.
  6. Handoff between screens.
  7. navigation.tsx keeps a map in the window's memory, under Symbol.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.
  8. The screen that leaves calls handOff and navigates with React Aria's Link, which goes through the shell's router (RouterProvider), so the window and its memory stay.
  9. The target screen calls takeHandoff once when it mounts, and the entry is removed. Nothing goes into the URL or browser storage.
  10. Closing or reloading the window loses the handoff. The target screen then opens empty, which is safe.
  11. Patient lines in rows.
  12. usePatientLines reads each person shown in a list once (readPerson, audited by the unit as adm.person.view) and shows the name as recorded, never truncated, and the facility's No. RM.
  13. 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.
  14. The follow-up is a patientDisplay field 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.
  15. 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.ts and check-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.
  16. One key per intent (intents.ts). This is the CUX-35 and CUX-36 behaviour of ADR-HIS-069 point 4 as a hook:
  17. the key is kept while the same intent is retried, and after a lost response only "Check again whether it was saved" is offered;
  18. the key is renewed on success, or when the user changes what is asked, because the intent name includes the request.
  19. 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.
  20. 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.
  21. 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.
  22. 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-urgency FR-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-reason FR-ADM-SCH-002 part 7: "Code / text", validation "Governed list" Member of the list "Reschedule appointment" is disabled with its reason
    adm.appointment-cancellation-reason FR-ADM-SCH-002 part 7, as above Member of the list "Cancel appointment" is disabled with its reason
    adm.appointment-request-decline-reason FR-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-reason FR-ADM-FLW-001 part 7: "Code / text", mandatory for an override Member, words, or both The reason in words alone is sent ({ text })
  23. 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).
  24. A record's coded value is shown with its own display, then the list's, then the code.
  25. 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.
  26. 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 example openScreen(id, context), replaces navigation.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): patientDisplay on 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-urgency is 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.