Architecture / Decision records / ADR-HIS-125
ADR-HIS-125 The D10-ESS contracts of slice RC-5: labels and consent in the one decision, stewardship items kept by terminology, a second major of TerminologyPublished for concept maps, and document content on the storage channel only¶
| Status | Accepted |
| Decided | 2026-12-02 by session RC-5-S01 |
| Record | Drafted 2026-12-02; awaiting approval by the Enterprise Architecture Board |
| Where the rule lives | contracts/ess/ (api/policy-decision.v1.openapi.yaml 1.2, api/terminology.v1.openapi.yaml 1.1, api/document-reference.v1.openapi.yaml 1.0, the events of contract.yaml, CONTRACT-POINTS.md); D10-ESS section 7.3 |
Context¶
The contract session RC-5-S01 writes the D10-ESS contracts of slice RC-5. It covers four requirements: - FR-ESS-AUZ-003, privacy labels and segmentation; - FR-ESS-CNS-002, consent-aware decisions; - FR-ESS-TRM-003, concept maps and unmapped-code stewardship; - FR-ESS-DOC-001, document registration and secure reference resolution.
Four questions were left to the contract:
- Labels and consent are both "part of the decision response" (IF-ESS-003 is produced by MOD-ESS-002 "with MOD-ESS-003"). They could be one decision or a separate consent check.
- FR-ESS-TRM-003 creates stewardship items and notifies the reporting domain through EVT-ESS-012. That event and its items belong to the data governance module MOD-ESS-011, which no slice before RC-5 builds and RC-5 does not build either. FR-ESS-AUZ-003 also raises an item for an unknown label code (PR-AUZ-003-1).
- EVT-ESS-006 TerminologyPublished covers concept maps. Version 1.0 of its schema closes
kindto code systems and value sets, and a new value in a closed list that consumers read is a breaking change (contracts/common, Compatibility). - Document content is binary and up to 500 MB (CFG-ESS-024). It travels "over the Domain 2 storage channel" (IF-ESS-011), and its retrieval reference is "short-lived and bound to the requester" (PR-DOC-001-5). The contract tooling (FN-S04) serves and verifies JSON only.
Options considered¶
- Labels and consent:
- (a) a separate consent decision API in
consent.v1, which the caller asks besides the policy decision; - (b) both inside the one policy decision, with the consent basis in the answer.
- Stewardship items:
- (a) write a first IF-ESS-013 now, for a unit (
ess-governance) that no RC-5 session builds; - (b) the terminology service keeps its own items in
terminology.v1, as RC-1 already began withreportValidationFailure, and publishes EVT-ESS-012 for them. - Concept maps on TerminologyPublished:
- (a) leave concept maps without an event;
- (b) a new event name;
- (c) TerminologyPublished 2.0 on a topic of its own, beside 1.0.
- Document content:
- (a) content inside JSON (base64);
- (b) a binary content endpoint of the document service;
- (c) content only on the storage channel. The upload is pre-signed. Retrieval is two steps: a subject-bound retrieval, then a version-pinned address valid for 60 seconds that only the bound subject can redeem, after the hash check.
Decision¶
- Labels and consent are decided in the one policy decision (1b).
policy-decision.v1goes to 1.2. - The request gains typed fields:
labels,fieldLabels,labelTaxonomyVersion,recipientandemergencySessionId. - The answer gains
consentBasis: a directive version, a catalogued exception with its legal basis, another legal basis, or consent absent. It also gains the taxonomy version used. - The stored trace gains
labelsInfluencing. - Obligations name their labels and fields.
accompany-labelscarries labels on an exchange, anddiscloseRedactiontells the caller whether it may show that data was withheld. - Bulk export uses
decideBatchwith one item per patient.
Reasons:
- Every enforcement point already asks this one service before it acts (FR-ESS-AUZ-001).
- A second call would double the latency budget of NFR-ESS-001 on every Tier 1 read.
- The precedence of a deny directive, an emergency session and a label must be settled in one place (PR-AUZ-001-2, PR-CNS-002-2).
2. The terminology service keeps the terminology stewardship items until MOD-ESS-011 is built (2b).
- terminology.v1 1.1 lists, assigns, resolves and rejects items (state Open, Assigned, Resolved, Rejected, FR-ESS-TRM-003 part 11), with the reports of 1.0 and 1.1 in one queue.
- The service publishes StewardshipItemRaised and StewardshipItemResolved (EVT-ESS-012) on his.ess.stewardshipitem.v1, with producer ess-reference.
- Unknown label codes are items of the policy decision service. It lists and closes them in policy-decision.v1, and they are not evented, since no consumer is named for them.
- When MOD-ESS-011 is built, its session decides whether it takes over the topic and the terminology queue. The item identifiers and the event schema stay as they are.
3. Concept maps are published as TerminologyPublished 2.0 (3c) on his.ess.terminologyartifact.v2. Its kind adds concept-map and is marked as growing.
- The terminology service publishes every activation and rollback on v2.
- It keeps publishing code systems and value sets as 1.0 on v1 until no consumer reads 1.0.
- Option 3a would leave the interface mappings of Domain 2 and the decision support of Domain 3 with stale local copies.
- Option 3b would leave the event catalogue.
4. A concept map is its own resource (/v1/concept-maps, /v1/concept-map-versions), on the same version lifecycle as code systems and value sets, rather than a third kind of terminology-versions. That kind enum, too, is read by consumers and closed.
5. Document content never travels in JSON (4c).
- createDocumentUpload answers a pre-signed upload address on the Domain 2 object storage (RustFS with object lock, technology stack row 25).
- Registration checks the real type, size and malware scan, and computes the hash.
- resolveDocumentReference asks the policy decision point. On Permit it makes a retrieval bound to the requesting subject, valid for at most 5 minutes.
- redeemDocumentRetrieval refuses any other subject or an expired retrieval. It verifies the hash, and then answers an address pinned to that object version, valid for at most 60 seconds.
- A hash mismatch withholds the content with 503 unavailable, raises an integrity alert and is audited as ess.doc.security. unavailable is chosen because the common problem codes have no integrity code, and the user message is the same: the content cannot be shown.
- Option 4a cannot carry a 500 MB video. Option 4b cannot be served by the stub or checked by his-contract verify, which handle JSON only.
The 60-second address is a bearer capability. It is accepted because:
- only the bound subject receives it, after a Permit decision and the hash check;
- it opens one immutable object version;
- each redemption is audited.
6. Documents are enterprise-scoped (architecture 7.5): no operation is facility-owned, and the facility of the authoring encounter is provenance. A duplicate registration (PR-DOC-001-1) answers 201 with outcome: existing rather than a second success status, which the stub cannot serve.
Consequences¶
- RC-5-S03 builds labels and consent into the existing decision service, RC-5-S04 the concept maps, translation and item queue, and RC-5-S05 the document service, each as
contracts/ess/CONTRACT-POINTS.mdlists. - The event backbone's topic register (
platform/event-backbone) must gainhis.ess.terminologyartifact.v2andhis.ess.stewardshipitem.v1(produceress-reference) andhis.ess.document.v1(produceress-coordination). ItsRegisterTestfails until it does, as it did for earlier contract topics (RC-1-S26). - The integration environment needs an S3-compatible object store for the document service's end-to-end run. Until FN-S02's environment has one, the unit's tests start their own.
- Consumers of TerminologyPublished that need concept maps subscribe to v2. Retiring v1 is a later change, made once its consumers have moved.
- The data governance session that builds MOD-ESS-011 inherits the terminology items and the EVT-ESS-012 topic, and decides how they join its queue.