Architecture / Decision records / ADR-HIS-080
ADR-HIS-080 The consent directive panel UI-ESS-006: a shared component with the consent model as an input, its codes from terminology, and the privacy request workspace within the contracts of version 1¶
| Status | Accepted |
| Decided | 2026-11-26 by session RC-2-S09 |
| Record | Drafted 2026-11-26; approved 2026-11-30 by the Enterprise Architecture Board |
| Where the rule lives | web/domains/ess/UI-ESS-006/ (index.ts, model.ts, lines.ts, lists.tsx, DirectivePanel.tsx, DirectiveForm.tsx, PrivacyWorkspace.tsx, View.tsx) |
Context¶
UI-ESS-006 has two parts: - Part A, the consent directive panel, is a shared component. Every domain opens it beside its own form, first the consent lines of UI-ADM-001 (OV-09). - Part B, the privacy request workspace, is a screen for the privacy officer.
Four things are not settled by the brief or the contracts:
- How a shared component is offered. ADR-HIS-070 did this for sign-on and Break-the-Glass, and ADR-HIS-071 for the work list. A screen folder has one registration, and UI-ESS-006 has two parts.
- Where the consent model comes from. The form needs, per consent type, the allowed purposes, scope parts, recipients, maximum validity and legal bases (FR-ESS-CNS-001 part 6.1). These are the consent model, CFG-ESS-010 and DEC-ESS-009. No contract of version 1 serves it:
consent.v1validates against it but does not expose it. The codes of each list are governed, and ADR-HIS-078 point 7 keeps governed lists out of screen code. - What the host form sees. OV-09 has the host show one line per required consent and open the panel from it. The host's lines and the panel must read the same states with the same words (PH-02).
- Part B without its contract. Data subject requests (FR-ESS-CNS-003) have no operation in version 1 (
contracts/ess/CONTRACT-POINTS.md, "Consent directive panel"). Consent conflicts are D10 tasks.
Options considered¶
- Model held in the screen, or model as an input. Holding the five PH-02 types with their lists in the panel would put a governed configuration into screen code, and it changes by deployment profile. An input follows ADR-HIS-070 point 5, where the Break-the-Glass reasons and window are inputs that the host resolves from configuration.
- Codes in the model, or value set identifiers in the model. Codes in the model would make the host the owner of governed lists. Value set identifiers keep the members in the terminology service, where they are versioned and stewarded (FR-ESS-TRM-001), and the panel reads them as ADR-HIS-078 point 7 does.
- Part A as a second folder, or under the route of Part B. Another folder would need a screen identifier that does not exist. The brief is one screen in two parts, so the preview of Part A lives under the route of Part B.
Decision¶
- Part A is a library in the screen folder; Part B is its screen.
index.tsexports:ConsentDirectivePanel;consentLinesanduseConsentLinesfor the host's consent lines;PH_02_CONSENT_MODELand the model types;setServiceSettings.
- The shell imports
index.tsand offers the panel to host screens, as in ADR-HIS-070 point 1. No screen imports the folder. screen.tsregisters Part B, "Privacy requests", in W14 (item context)./ess/ui-ess-006/conflict/<taskId>opens a conflict from a task link.- The preview of Part A is
/ess/ui-ess-006/panel/<patientRef>, with?counter=1and?officer=1. It is not in navigation. The panel writes to the patient of the address, so the preview reads that patient from Domain 1readPerson, names them above the panel and in its confirmations, and opens nothing until they are read. It never uses the shell's patient in context, which carries no identifier to match (CUX-01, CUX-11). - The consent model is an input, and it names value sets, not codes.
ConsentModelgives each type its code and label, its scope parts, its recipient kinds and whether one is required, and its maximum validity days.- It also gives the value sets of its purposes, legal bases, data categories and labels, plus the value sets of the representative's relationship and authority basis.
- The panel reads the members through terminology.v1
expandValueSetand sends each member's code. PH_02_CONSENT_MODELholds the five types of PH-02, with the parts FR-ESS-CNS-001 part 4 describes. It serves the preview and the tests, and is the starting point for the CFG-ESS-010 item. A host passes the active model.- The value sets it names (
ess.consent-purpose,ess.consent-legal-basis,ess.consent-data-category,ess.security-label,ess.communication-channel,ess.representative-relationship,ess.representative-authority-basis) are D10 registrations still to be made. - What the host decides, and what the provider decides.
- The host passes these inputs:
- the recording channel;
- its encounter and source record, sent as the directive's
context; counter, for a counter workstation (CUX-47, CUX-48): the list shows type and state only, and detail opens on demand;privacyOfficer, which offers "Mark entered in error";readOnly.
- These only shape what is offered. The consent service decides every read and write through the policy decision point, and a refusal is shown with the Shell 13 words.
- The host is never blocked.
- A 503, a lost answer, or a gateway that cannot check access shows every line as "Not recorded" with the reason, and offers no recording. The host form can still be saved.
- A value set that cannot be read stops only the form that needs it, with its reason.
useConsentLinesanswers the same "Not recorded" lines while the service is unavailable, so a host never waits on consent (PH-02 legal basis: the lines are informative, never a gate).- A refusal is not unavailability. A 403 gives the host no lines and the panel's Shell 13 refusal text (
state: "refused"), so a user is never told "Not recorded" for directives they may not see. - A new version keeps the scope it starts from. The encounters a version is limited to are kept in the next version: they are not dropped where the host has no encounter (Part B), and not moved to the host's encounter. The form shows the limit as "Keep the limit of version N …", checked. Removing it is the user's visible choice, and the form says that the directive then covers more. The host's encounter is added only when the user asks.
- One rule for lines and states.
linesOfandstatusLabel(model.ts) build the panel and the host's lines alike: - one line per type of the model;
- the current directives (Active or Proposed), or else the last that ended;
- Superseded only in the history;
- Proposed with outstanding attributes shown as "Recorded, incomplete";
- Proposed and complete shown as "Recorded · applies from [date]" (Q-RC2-5);
- a directive whose type is not in the model listed under its code, so nothing the service holds is hidden.
- Part B within version 1.
- The data subject request queue is shown as not available, and "Register request" is disabled with its reason, until a compatible minor version of
consent.v1brings FR-ESS-CNS-003. - The conflict queue is
listTasks?queueId=ess.privacy-review&taskType=ess.consent-conflict-review, in the row anatomy of OV-01, sorted by due time, with the overdue symbol. - A conflict shows the directives of its subjects side by side. "Open directives" embeds Part A for the patient, with
privacyOfficerand the channelprivacy-office. - The patient is read from Domain 1
readPersonand shown in the header and on each row (brief, assumption 6). - Copies.
api/http.tsis UI-ESS-009's, andintents.tsandtime.tsare UI-ADM-008's, as in ADR-HIS-078 point 4.ui.tsxis UI-ESS-009's plus a radio group, a checkbox group and a date-and-time field. These move to the design system with the other copies.
Rationale¶
The model as an input keeps configuration where CFG-ESS-010 puts it, and keeps the panel the same for every host. Value set identifiers keep governed codes in the terminology service. One function for lines and states gives the host and the panel the same words. Showing Part B's missing queue as not available, rather than leaving it out, tells the privacy officer what the workspace cannot do yet.
Consequences¶
- D10 registrations:
- the value sets of point 2;
- a CFG-ESS-010 configuration item type whose content is a
ConsentModel; - the channel code
privacy-office. - Contracts:
consent.v1: a read of the active consent model, so that a host need not resolve it itself (a compatible minor version);- the data subject request operations of FR-ESS-CNS-003, as the contracts/ess README plans.
- Shell (a session owning
web/shell): - offer
ConsentDirectivePanelto screens through the SDK, with the active model; - a policy decision on whether the user may record, so the panel can open read-only rather than learn it from a refusal.
- Host screens: UI-ADM-001 replaces its disabled "Record consent" with the panel and its lines with
useConsentLines. That is a change to the ADM screen folder, not this one. - Design system: the three form pieces of point 8, and the work list rows of the conflict queue once UI-ESS-010 is offered through the SDK (ADR-HIS-071 point 2).
- Evidence documents: the evidence reference is shown, not captured. Capturing it needs the document registry contract (IF-ESS-011), which is not written yet.