Skip to content

Architecture / Decision records / ADR-HIS-128

ADR-HIS-128 Concept maps and unmapped-code stewardship: maps on the terminology version lifecycle, translation that never guesses, one stewardship queue per source, and TerminologyPublished 2.0 sequenced per topic

Status Accepted
Decided 2026-12-02 by session RC-5-S04
Record Drafted 2026-12-02; awaiting approval by the Enterprise Architecture Board
Where the rule lives services/ess-reference/mod-ess-004/ (ConceptMapService, TranslationService, StewardshipService, MapStore, ItemStore, ItemEvents, migration V3__concept_maps_and_stewardship.sql); services/ess-reference/service-kit/.../events/DomainEventPublisher

Context

FR-ESS-TRM-003 asks the terminology service for concept maps between code systems. Maps are versioned and effective-dated, carry provenance and a relationship type, and are translated as of a date. A code that cannot be mapped is never guessed: it becomes a stewardship item with a count, which a steward resolves, and the reporting sources are told. Contract session RC-5-S02 added these operations to terminology.v1 (1.1): concept maps, translation, unmapped-code reports and the stewardship queue. ADR-HIS-125 put the items in the terminology service and published concept maps as TerminologyPublished 2.0 on his.ess.terminologyartifact.v2. Code systems and value sets were built by RC-1-S06 (ADR-HIS-051).

The questions left to this session: - how a concept map is stored, and whose rules govern its versions; - what each translation outcome means where the specification names only the outcome; - what one stewardship item is, and when a report adds to it; - how a release that inactivates a mapped target is held; - how one aggregate's events are sequenced on two topics.

Options considered

  1. Map versions as a kind of the existing version table. One lifecycle in code. But a map has two code systems, a pinned version of each and entries that are not concepts. Every query on version would have to exclude it.
  2. Own tables for maps, versions and entries, on the same lifecycle rules (chosen). Separation of duties, the second review and class confirmation are reused from AuthoringService as static rules.
  3. Translation answers the "best" candidate when several exist. This is ruled out by AC-02 and PR-TRM-003-2.
  4. One stewardship item per code and system, whatever the source. The contract describes items per reporting source with their count, and PR-TRM-003-4 merges repeated reports "from the same source". So the key keeps the source.

Decision

  1. Storage.
  2. A concept map is concept_map, with exactly one source and one target code system. A map between clinical terminology and an administrative classification is therefore always its own, separately identified map (part 6.8, AC-05). The classification each side shows is the registered one; a create that states another is refused.
  3. Its versions are map_version, pinned to a published source version and a published target version (approved, active, superseded or retired). Its entries are map_entry.
  4. The first version names the map: url, name, systems, owning domain and safety relevance. Later versions inherit these and may not change them or lower the class (part 6.2).
  5. The map's owner is the first author. The policy decision point decides who may author for the owning domain. The request carries owningDomain and the stewardId of the target code system.
  6. Lifecycle. Map versions follow section 4.3 with the rules of FR-ESS-TRM-001:
  7. a Safety-relevant map needs a second steward;
  8. the approver is neither the author nor the second reviewer;
  9. the effective time is not before approval;
  10. Clinical Governance confirms the class at first publication or a class change (ess.trm.safety-class.confirm on ess.ConceptMap).

Activation supersedes the prior Active version, and superseded, rolled-back and retired versions stay readable. Entries are frozen at submission under a SHA-256 content hash. 3. Consistency check (part 10). GET .../check lists blocking findings, and submission and approval are refused while any exist: - content-not-loaded: content given by contentRef that is not loaded yet; - inactive-target: a target code inactive in the selected target version; - conflicting: for one source code with overlapping periods, two different equivalent targets, the same target twice, or no-map mixed with a target; - circular: for a map within one code system, entries that lead back to their start; - target-inactivated: a target inactive in the target code system version now in force.

A create whose target is inactive in the selected version is refused with 400 and "Target code is inactive in the selected version." Several narrower or broader candidates for one code are not a conflict: they are a legitimate ambiguous map (AC-02). 4. Translation outcomes. A translation uses the map version in force at asOf or now, and the entries effective then. The outcome is: - equivalent: exactly one candidate, whose relationship is equivalent; - non-equivalent: exactly one candidate that is broader, narrower or related; - ambiguous: more than one candidate, every one returned with its relationship and the target version; - no-map: every entry for the code is a recorded no-map; - unmapped: the map has no entry for the code, no map joins the two systems, or a system is not registered (BR-ESS-017); - not-available: only for unlicensed callers of licensed content, as for lookups.

With more than one map in force between the same systems, the caller must name the map (400 at /conceptMap). A target that a later release inactivated is still returned, with a reason that names it (see 6). Translations are counted by outcome and not audited (part 12). 5. Stewardship items. - One open item exists per kind (validation-failure, unmapped, ambiguous), system, code, target system and reporting source. A repeat adds to its count and last-reported time, and never lowers its safety relevance or severity. - A closed item (resolved or rejected) stays as it was, and a later report raises a new one. - An unmapped or ambiguous translation raises or counts an item only when the request names its source. - The item's class is Safety-relevant if the use is a safety use (medication, allergy, results interpretation, decision support) or if the map or the target code system is Safety-relevant. It is also Safety-relevant when nothing classifies it. - The steward of the target code system is assigned at creation. - A resolution names a version, approved or Active, that carries the change: a concept map version with an entry for the code, or a code system version holding it. StewardshipItemResolved carries that version's effectiveFrom, so that reporters reprocess from then (part 6.7, AC-04). - Assign, resolve and reject are people's acts. 6. Inactivated targets (PR-TRM-003-3). - The impact report of a code system release lists, as usedBy kind concept-map, every Active or Approved map version targeting that system that maps to a code the release inactivates. Such a use blocks submission of the release. - It is resolved once a later version of the map, in review or approved, no longer maps to the code. - After the release is in force, the entries of the old map version are flagged (flaggedEntryCount, flagged), and its check reports target-inactivated. The map therefore cannot stay current without a new version. 7. Audit. Map version create, submit, second review, return, approval, activation, rollback and retirement are audited as ess.trm.map. So are item create, assign, resolve and reject (actions ess.trm.item.*). Each record carries the version, or the item's revision, and the values before and after. Each is tier 2 except item creation and activation, which run inside reports and the job. 8. Sequencing on two topics. The kit's DomainEventPublisher numbers an aggregate's events per topic on topics that are not .v1. The event 2.0 that a code system activation publishes on v2 therefore has its own gap-free sequence beside 1.0 on v1. Before this change the two shared one counter, and each topic would have seen gaps. On .v1 topics nothing changes.

Consequences

  • The policy decision point's rules (services/ess-runtime-decision) must permit the new actions:
  • ess.trm.map.* and ess.trm.read on ess.ConceptMap;
  • ess.trm.item.{read,assign,resolve,reject};
  • ess.trm.safety-class.confirm on ess.ConceptMap.

Until they do, a deployment with the real decision point denies these operations. This is a follow-up for that unit. - The topic register (platform/event-backbone) must gain his.ess.terminologyartifact.v2 and his.ess.stewardshipitem.v1, as ADR-HIS-125 says. - Domains that quarantine or flag records on unmapped or ambiguous subscribe to StewardshipItemResolved and reprocess from the artifact's effectiveFrom. Interfaces send source and use so that items are counted and classed. - When MOD-ESS-011 exists, the queue moves behind the StewardshipItems port without a contract change. - A map loaded by contentRef cannot be submitted until its entries are loaded. A loader is a later change.