Implementation plan / Session plan / Handover RC-5-S01
Handover RC-5-S01 Contract: Contracts and stubs: D10 ESS (slice RC-5)¶
Card: RC-5-S01, issue #176. Decision record: ADR-HIS-125.
What was built and where¶
All changes are in contracts/ess/ and in D10-ESS section 7.3. Every change is compatible: minor versions where a contract exists, and new contracts or new major event versions on topics of their own.
| Contract | Version | Requirement | What it adds |
|---|---|---|---|
api/policy-decision.v1.openapi.yaml |
1.1 → 1.2 | FR-ESS-AUZ-003, FR-ESS-CNS-002 | Request fields labels, fieldLabels, labelTaxonomyVersion, recipient and emergencySessionId. In the decision, consentBasis and labelTaxonomyVersion. In the stored trace, labelsInfluencing. The registered obligations and their attributes are described (redact/mask, accompany-labels, elevated-audit), and so is the per-patient batch for bulk export. New operations: readLabelTaxonomy, listUnknownLabels, resolveUnknownLabel |
api/terminology.v1.openapi.yaml |
1.0 → 1.1 | FR-ESS-TRM-003 | Concept maps as their own resources, on the version lifecycle of code systems and value sets (create, check, submit, second review, return, approve, roll back, retire, entries). translateCode (outcomes equivalent, non-equivalent, ambiguous, no-map, unmapped, not-available). reportUnmappedCode. The stewardship item queue: list, read, assign, resolve, reject |
api/document-reference.v1.openapi.yaml |
1.0 (new, IF-ESS-011) | FR-ESS-DOC-001 | Document types; the pre-signed upload; registration (duplicate answered outcome: existing); search; read; versions; entered-in-error; the Domain 6 flags and disposal; resolveDocumentReference (policy decision; retrieval bound to the subject, 5 minutes at most); redeemDocumentRetrieval (hash verified, an address pinned to the object version for 60 seconds at most) |
events/DocumentRegistered.v1 |
1.0, his.ess.document.v1 |
EVT-ESS-013 | Registration, new version, flags, entered-in-error, disposal, patient reassigned or restored |
events/StewardshipItemRaised.v1, StewardshipItemResolved.v1 |
1.0, his.ess.stewardshipitem.v1 |
EVT-ESS-012 | The terminology items, until MOD-ESS-011 exists (ADR-HIS-125 point 2) |
events/TerminologyPublished.v2 |
2.0, his.ess.terminologyartifact.v2 |
EVT-ESS-006 | Concept maps, with an extensible kind. 1.0 stays on the v1 topic (ADR-HIS-125 point 3) |
Also changed:
contract.yamllists the new API and events.stubs/was regenerated.TRACE.mdtraces every new field. The section is "Labels, consent, concept maps, stewardship and documents".CONTRACT-POINTS.mdlists the points each session must meet: RC-5-S03, RC-5-S04, RC-5-S05, RC-5-S02, RC-5-S15, and every enforcement point.README.mdhas the API and event tables, and the names ESS registers for RC-5: configuration item types, label codes, obligations, policy resource types, audit types and document types.- Section 7.3 has four "Added by the RC-5 contracts" blocks: DE-ESS-004 (taxonomy content), DE-ESS-005 (labels, recipient, consent basis, labels influencing), and the concept map part of DE-ESS-009. It also has two new entity sections, DE-ESS-016 Document Reference and DE-ESS-017 Stewardship Item, linked from their 7.2 rows.
Checks and their result¶
All checks ran in contracts/ess, with Node.js 22.18 in a container (the host's Node.js cannot run the tool).
| Check | Command | Result |
|---|---|---|
| Conventions | pnpm build (his-contract lint .) |
passed |
Compatibility with origin/main, stubs up to date |
pnpm test (his-contract check .) |
passed: policy-decision 1.1 → 1.2, terminology 1.0 → 1.1, document-reference new, the four event versions new |
| Stub against the provider contract test | scripts/verify-stub.sh |
passed, 647 cases, no violation |
| References from other domains | node scripts/cross-references.ts in contracts/adm and contracts/ise |
passed (467 and 294 references) |
| Ends when | scripts/ends-when.sh with his-env env of the full profile exported, started as HIS_SESSION=RC-5-S01 (his-rc-5-s01), then his-env reset |
passed. It checked the contract and the stubs, verified the stub with a synthetic token and with a token of the realm his, and registered every ESS event schema in Apicurio, including the four new ones. The second run answered unchanged |
| Documentation links | python3 docs/implementation_plan/tools/check_links.py |
0 broken, 0 duplicate anchors |
| Documentation site | mkdocs build |
builds |
| Secret scan | platform/delivery-pipeline/bin/secret-scan code origin/main and docs origin/main |
no secret |
Requirements and test scenarios¶
| Requirement / scenario | Where the contract covers it | Who tests it |
|---|---|---|
| FR-ESS-AUZ-003 parts 6.1, 6.7 (taxonomy, category rules) | readLabelTaxonomy; LabelTaxonomy, TaxonomyLabel, CategoryRule |
RC-5-S03; RC-5-S15 (UI-ESS-003) |
| Parts 6.2 to 6.6, PR-AUZ-003-2, PR-AUZ-003-3 (field redaction, the same evaluation for read, export and exchange, trace) | labels, fieldLabels, recipient; obligations redact, mask, accompany-labels; labelsInfluencing |
RC-5-S03 |
| PR-AUZ-003-1, AC-04 (unknown label is most restrictive) | labelsInfluencing.source: unknown-code; listUnknownLabels, resolveUnknownLabel |
RC-5-S03 |
| TEST-ESS-010 | All of the above | RC-5-S03, tagged FR-ESS-AUZ-003 TEST-ESS-010 |
| FR-ESS-CNS-002 parts 6.1 to 6.7, PR-CNS-002-1 to PR-CNS-002-4 (consent in the decision, exceptions, withdrawal, batch) | consentBasis, emergencySessionId, recipient; elevated-audit; decideBatch one item per patient |
RC-5-S03 |
| TEST-ESS-013 | As above | RC-5-S03, tagged FR-ESS-CNS-002 TEST-ESS-013 |
| FR-ESS-TRM-003 parts 6.1, 6.2, 6.8, 6.9, 11, PR-TRM-003-3 (concept maps) | Concept map operations; readConceptMapCheck; MapEntry.flagged |
RC-5-S04 |
| Parts 6.3 to 6.7, PR-TRM-003-1, PR-TRM-003-2, PR-TRM-003-4, AC-01 to AC-04 (translation, stewardship) | translateCode, reportUnmappedCode, the item operations; StewardshipItemRaised and StewardshipItemResolved |
RC-5-S04 |
| TEST-ESS-017 | As above | RC-5-S04, tagged FR-ESS-TRM-003 TEST-ESS-017 |
| FR-ESS-DOC-001 parts 6.1 to 6.10, PR-DOC-001-1 to PR-DOC-001-5, AC-01 to AC-05 | document-reference.v1; DocumentRegistered |
RC-5-S05 |
| TEST-ESS-032 | As above | RC-5-S05, tagged FR-ESS-DOC-001 TEST-ESS-032 |
| TEST-ESS-018 (it names FR-ESS-TRM-003 and FR-ESS-DOC-001) | Concept map versions and document reference resolution | RC-5-S04 and RC-5-S05, each for its part |
| The slice scenario (steps 1 and 6 touch ESS) | Stub of contracts/ess |
RC-5-S02 writes the failing scenario test, as the card's scope gives it to the last contract session of the slice ("joins the domains and writes the scenario test") |
Contract changes (session rule 4)¶
All are backward compatible, and his-contract check against origin/main passed. No existing field, operation, status or enum value was changed or removed. Two things were done to stay compatible:
- TerminologyPublished. Adding
concept-mapto the 1.0kindwould have been a breaking change. So 2.0 is a new schema on the new topichis.ess.terminologyartifact.v2, and the producer keeps publishing 1.0 on v1. - Concept maps. They are new resources rather than a new
kindofterminology-versions, for the same reason.
A 1.0 caller's attributes.labels in a decision request is still read, as the union with labels.
Differences from the card or specification¶
- The failing scenario test is not in this session. The card's "Ends when" names it, but the card's scope gives it to the last contract session of the slice, RC-5-S02. RC-3-S01 and RC-6-S01 left it to their slice's last contract session in the same way.
- Stewardship items. The specification places them, and EVT-ESS-012, in MOD-ESS-011 (data governance), which no session of RC-5 builds. Until it is built, the terminology service keeps its own items and publishes EVT-ESS-012 for them. Unknown label items stay in the policy decision service and are not evented (ADR-HIS-125 point 2).
- Document content is never in JSON. It travels over the Domain 2 object storage channel, through pre-signed addresses (ADR-HIS-125 point 5).
- The retrieval reference is bound to the subject and valid for 5 minutes, as PR-DOC-001-5 asks.
- The content address it yields is valid for 60 seconds and is a bearer address. That residual risk is accepted in the ADR.
- Hash mismatch answers
503 unavailable. The common problem codes have no integrity code, and this session did not add one tocontracts/common, which is FN-S04's. - A duplicate registration answers
201withoutcome: existing(PR-DOC-001-1), because the stub serves one success status per operation. - Nothing was invented beyond the specification. Where it is silent the contract leaves it to configuration and says so: exception types, label handling codes and document types.
Needs a person¶
- Review of the contracts and of the section 7.3 additions (DE-ESS-004, DE-ESS-005, DE-ESS-009, and the new DE-ESS-016 and DE-ESS-017):
- the D10 ESS domain lead;
- the D3 CLI domain lead, for the points RC-5-S02 takes up.
- The privacy officer and legal, on the consent basis kinds and the obligation attributes (
discloseRedaction,accompany-labels), which the build will apply as written. - Enterprise Architecture Board approval of ADR-HIS-125.
- No question is left open.
Follow-ups outside the card¶
- Topic register (
platform/event-backbone/mod-ise-004/src/main/resources/backbone/topic-register.yaml). It must gain three topics, and itsRegisterTestrequires every contract topic: his.ess.document.v1, produceress-coordination;his.ess.stewardshipitem.v1, produceress-reference;his.ess.terminologyartifact.v2, produceress-reference.
Owner: the session on platform/event-backbone, as RC-1-S26 did for earlier topics.
2. Object storage in the integration environment (platform/dev-environment, FN-S02 owner). An S3-compatible store with object lock (RustFS, technology stack row 25) is needed for the document service's end-to-end run. Until then RC-5-S05's tests start their own.
3. Malware scanning contract of Domain 2. FR-ESS-DOC-001 part 6.10 needs the result of a scan. No D02-ISE contract offers one yet. RC-5-S05 uses a port with a test stub, as CONTRACT-POINTS says.
4. MOD-ESS-011. When data governance is built, its session decides whether it takes over the terminology item queue and the his.ess.stewardshipitem.v1 topic (ADR-HIS-125 point 2).
5. TerminologyPublished 1.0 consumers move to 2.0. v1 is retired once no consumer reads it.
6. Integrity problem code. If an integrity problem code is wanted in place of unavailable for a hash mismatch, it is a change to contracts/common.
7. Configuration item types ess.consent-policy, ess.consent-exception-catalogue and ess.document-type are registered by the build sessions that use them (RC-5-S03, RC-5-S05).
8. Design system: none.