Architecture / Decision records / ADR-HIS-090
ADR-HIS-090 Integrating slice RC-2: the supervisor and scheduling administrator roles, check-in on behalf of the person, one ADM kit, and the RC-2 end-to-end stack¶
| Status | Accepted |
| Decided | 2026-11-27 by session RC-2-S10 |
| Record | Drafted 2026-11-27; approved 2026-11-30 by the Enterprise Architecture Board |
| Where the rule lives | services/ess-runtime-decision (role catalogue, position mapping, starter policy), services/adm-scheduling-flow (kit, encounter client), e2e/scenarios/RC-2/, e2e/harness/lib/runner.py |
Context¶
RC-2-S10 joins the build and screen sessions of slice RC-2: scheduling and flow (adm-scheduling-flow), encounter states, payer and consent references (adm-patient-administration), consent directives (ess-runtime-decision) and notifications (ess-coordination). They had been built against contract stubs and the harness's permissive stub decision point. Run together on the D10 decision service, four things had no home yet:
- the D01-ADM 9.2 roles that only some staff hold (registration supervisor, scheduling and flow administrator), which D10's starter role catalogue does not have;
- how a unit that serves a person's command calls another ADM unit for that person;
- the service kit of adm-scheduling-flow, copied before RC-1-S26's kit fixes;
- an end-to-end stack that adds a slice to RC-1's without copying it.
Decision¶
- Two starter roles, from D01-ADM 9.2, answered by a person on issue #55 (Q-S10-1, Q-S10-2).
registration-supervisor(UR-26) holds encounter correction and reversal, cancellation with downstream activity, backdating beyond the tolerance, queue and waitlist override and overbooking. It is held besidepatient-access-and-flow, which D10's catalogue (GAP-ESS-003) gives every clerk. A clerk is refused all of these (FR-ADM-FLW-001 AC-03, FR-ADM-ENC-002 AC-03).scheduling-flow-administratorholds the creation, approval and retirement of templates and calendars and availability exceptions.- Both are in the role catalogue (
mod-ess-001 identity/roles.json) and the approved position mapping (positions.json, positionsregistration-supervisorandscheduling-flow-administrator), as unapproved starter content. The D10-ESS owner confirms them into the catalogue. - The RC-2 resource types and rules are in the starter policy
enterprise-accessversion 1 (mod-ess-002 policy/enterprise-access.v1.json), each with its source: - the resource types of ADR-HIS-075, 077, 081 and 074 (
adm.PayerReference,adm.ConsentReference,adm.AppointmentTemplate,adm.ResourceCalendar,adm.Appointment,adm.AppointmentRequest,adm.WaitlistEntry,adm.QueueItem,adm.FlowBoard,ess.Notification,ess.NotificationSettings,ess.NotificationType), and the new actions onadm.Encounter; - rules
adm-*added by RC-2-S10: the clerk and scheduler (patient-access-and-flow), the supervisor, the scheduling administrator, the triage nurse (nurse-and-midwife, triage), the responsible clinician (physician, clinical urgency) and revenue staff (payer references, read); ntf-domain-requestfor a domain service within the scopeess.ntf.notification.request, andntf-recipientfor every workforce user (their own notifications and settings; the unit checks recipient and owner, ADR-HIS-074 point 8).
The test pack gains TP-50 to TP-59. The content stays unapproved starter content, as RC-2-S02 left it; the security officer and privacy officer approve it through the configuration lifecycle.
3. A person's command that another ADM unit carries out goes on behalf of the person. Check-in (adm-scheduling-flow) creates and reads the encounter in adm-patient-administration with the person's own token and its own service token beside it (Downstream.onBehalfOfPerson, ADR-HIS-076 point 4). The encounter is then decided and audited for the person, with the calling service named (FR-ESS-IAM-003 AC-04). Lookups a unit makes for itself (person index, master data, the open-encounter check of an arrival) and jobs (reminders) stay on the service token.
4. One service kit for the ADM units. adm-scheduling-flow/service-kit is now the kit of adm-patient-administration, which carries RC-1-S26's fixes: the token to the decision service, the decision client's answer reading, budget and retry, the subject's assurance and session, and the acting-service header. Without them every decision of the unit failed closed. A kit change is made in one ADM unit and copied to the others in the same pull request, until the template carries it (ADR-HIS-076, consequences).
5. The RC-2 end-to-end stack builds on RC-1's (e2e/scenarios/RC-2/):
- provision/provision.py runs RC-1's provisioning on RC-1's identities and terminology, with what RC-2 adds (identities.json, terminology.json). An installed clinician is a named individual with a practitioner reference and a current credential, because a clinical role needs one (BR-ESS-002) and the identity feed alone does not make one;
- the code lists and value sets of RC-2 are registered without content in the ess-reference registry seed, and the synthetic clinic (rooms, practitioner, device, payer) is in its master-data seed. The e2e provisioning loads synthetic code content as approved versions, as RC-1 does; the owners supply the governed content;
- D05-FIN is not built, so payer capture calls the FIN contract stub;
- queues and boards come from a configuration file (his.flow.configuration-file) until D10 registers their item types.
6. Two backward-compatible harness additions (e2e/harness/lib/runner.py): ${stub.<domain>} names a contract stub's address in a unit's settings, and stubFacilities adds facilities the stubs permit, for a unit that calls a stub with the facility of its own request.
7. Time-driven rules run on real time. The synthetic clinic is open around the clock on a 10-minute grid, so that a test always finds slots and a slot just over 24 hours ahead has its CFG-ADM-017 reminder fall due within minutes. The stack retries a pending reminder after 30 seconds (his.scheduling.reminder-retry, default 5 minutes). Neither changes a rule of the specification.
Consequences¶
- The supervisor's and administrator's privileges are denied to every other role. A deployment that wants them on other roles changes the policy content, not code.
- The starter policy's hash changes again; ess-governance imports the content as it is when it imports it (RC-2-S02's note).
- Every ADM unit's kit is the same version. The template still lags (RC-2-S05's follow-up).
- Later slices add their units, identities and terminology to their own stack in the same way, on RC-1's and RC-2's provisioning.
- The reminder test waits for real time, up to the grid's 10 minutes.
Alternatives considered¶
- The supervisor privileges on
patient-access-and-flow, in force only with a second factor. Every clerk who signs on with a second factor could then override the queue, against FR-ADM-FLW-001 AC-03. Rejected by the person's answer to Q-S10-1. - Templates and calendars to
configuration-administrator-change-approver. That role is D10's configuration lifecycle, privileged and enterprise-wide, not a clinic's scheduling administration. Rejected by the person's answer to Q-S10-2. - Check-in creating the encounter as the scheduling unit's service identity, with a service rule. The encounter would then be decided for a service, not for the clerk who checked the patient in, and audited without the person (FR-ESS-IAM-003 AC-04).
- A test clock for reminders. The units read the system clock, and no contract offers to move it; a shorter reminder schedule would change CFG-ADM-017's values. The grid keeps the specified schedule.