MOD ESS 004 TRM
Domain specifications / D10-ESS / 5. Detailed Functional Requirements / 5.4 Module Specification: Terminology Service
5.4 Module Specification: Terminology Service¶
5.4.1 Module Overview¶
Module ID: MOD-ESS-004 (module code TRM)
Purpose: Host governed, versioned and effective-dated code systems, value sets, concept maps and units, and provide lookup, validation, expansion and translation to all domains. The service distinguishes clinical concepts from administrative classification codes (PRS 22.3).
Business Capabilities: - CAP-ESS-005 Terminology services
Primary Actors: - Terminology steward (ACT-ESS-005), approver (ACT-ESS-007 or clinical governance), calling domain service (ACT-ESS-013)
Dependencies: - MOD-ESS-012 (version lifecycle), MOD-ESS-011 (stewardship queue), MOD-ESS-010 (code system registry), MOD-ESS-008, MOD-ESS-006. - Licensed terminology content, subject to licensing and national policy (PRS 3.3).
5.4.2 Functional Area: Code System and Value Set Management¶
Functional Area ID: FA-ESS-012
Description: Loading, versioning, approval and publication of code systems, local extensions, value sets and units.
Scope: - Included: standard and local code systems, value sets, unit definitions, licence metadata. - Excluded: order catalogue, formulary, tariff and inventory item content, which are owned by their domains and bind to terminology.
5.4.3 Functional Area: Terminology Runtime Services¶
Functional Area ID: FA-ESS-013
Description: Lookup, validation, value set expansion and unit validation for callers.
Scope: - Included: runtime APIs and version pinning. - Excluded: deciding what a domain does with an invalid code beyond the reject-or-flag binding rule.
5.4.4 Functional Area: Concept Mapping and Unmapped-Code Stewardship¶
Functional Area ID: FA-ESS-014
Description: Concept maps between code systems, mapping provenance and the steward queue for unmapped or ambiguous codes.
Scope: - Included: map storage, versioning, translation API, stewardship items for mapping gaps. - Excluded: authoring of guideline and pathway concept mapping content (Domain 9); the coder's decision in encounter coding (Domain 6).
5.4.5 Detailed Requirements¶
Requirement FR-ESS-TRM-001: Governed, Versioned Code Systems, Value Sets and Units¶
| Attribute | Description |
|---|---|
| Requirement ID | FR-ESS-TRM-001 |
| Requirement Name | Governed, versioned code systems, value sets and units |
| Requirement Type | Functional |
| Module | Terminology Service |
| Functional Area | FA-ESS-012 Code system and value set management |
| Priority | Must |
| Criticality | High |
| Requirement Status | Draft |
| Source | PRS section 22.3; PRS section 7.2 (effective-dated terminology, units and code maps); PRS section 9.2 (Terminology standards row); DAT-001; CFG-001; Architecture 5.1 (Terminology service) |
| Related Business Rule | BR-ESS-016 |
| Related Workflow | WF-ESS-004 |
1. Requirement Statement
The system shall maintain code systems, local extensions, value sets and units of measure as governed content in which every version has an owner, an approval record and an effective period, shall retain all prior versions, and shall keep clinical terminology and administrative classification code systems separately identified.
2. Business Rationale
Effective-dated terminology lets historical meaning be reconstructed (PRS 7.2). PRS 9.2 requires governance of code systems, local extensions, mappings, version and licensing. Semantic inconsistency is a named programme risk (PRS 19.1).
3. Actors and Permissions
| Actor | Permission | Conditions |
|---|---|---|
| Terminology steward | Create / Update drafts; load releases | For code systems the steward is assigned to |
| Designated approver | Approve publication | Clinical governance for clinical content; data governance for others; not the author |
| Calling domain service / any authenticated user | Read published content | Subject to licence restrictions |
4. Preconditions - The code system is registered (FR-ESS-REG-001) with owner, steward, licence status and classification (clinical terminology, administrative classification, unit system, local).
5. Trigger - New source release; request for local code, value set or unit change.
6. Functional Behaviour
- The system stores each code system version with its codes, displays, status (active, inactive), hierarchy and properties where present, and its source release identifier.
- The system supports at least the code system families named in PRS 22.3 as content: SNOMED CT, LOINC, UCUM, RxNorm and/or ATC, ICD-10 and ICD-11, and CPT/HCPCS or local equivalents, each loaded only where licensing and national policy permit.
- The system supports local code systems and local extensions with the same governance as standard content.
- The system stores value sets as versioned definitions (enumerated or rule-based) bound either to a pinned code system version or to "current".
- The system stores unit definitions and permits unit validation and normalization against UCUM.
- The system runs the impact analysis and approval workflow in WF-ESS-004 before publication.
- The system publishes a version with an effective date, retains prior versions, and emits a terminology-published event (EVT-ESS-006).
- The system records for each code system its classification, so that callers and reports can distinguish clinical concepts from administrative codes.
- The system exports terminology content and mappings in documented machine-readable formats (PRS 15.2).
- The system records for each code system, value set, concept map and binding a safety-relevance class, Safety-relevant or Standard (set 17 Nov 2026, GAP-ESS-006). An item is Safety-relevant when its codes drive any of: medication (KFA, RxNorm or ATC, formulary codes, routes, dose forms and dose units); allergy and intolerance (substances, reactions, severity); results interpretation (LOINC, specimen types, result units, abnormal flags, blood groups and blood product codes); or clinical decision support (every value set or map that a decision-support rule, order set or pathway eligibility rule uses). A value set used by such a rule is Safety-relevant even when its code system is Standard. Everything else is Standard, for example billing classifications, location types and administrative codes. Domain 10 proposes the class and Clinical Governance confirms it at first publication.
- The system holds the national formulary (Formularium Nasional, Fornas) as a Safety-relevant value set named "Fornas" (set 17 Nov 2026). Each member is a KFA code (product or virtual product) of a medicine listed in the Fornas issued by Minister of Health decree. Each member carries the Fornas details that the decree states: therapeutic class, dosage form and strength, facility level at which it may be prescribed, and the prescribing restriction and maximum quantity where given. One value set version is published per Fornas edition and per addendum, with the decree number as its source release identifier and the decree's effective date. The pharmacy terminology steward maintains it, and the Pharmacy and Therapeutics Committee approves it under part 6.11. The value set is used for formulary status in the Domain 3 medication catalogue and for national formulary compliance (INM 9) in Domain 8; callers test membership with FR-ESS-TRM-002 at the version effective on the prescription date.
- A Safety-relevant version, map or binding is published only after two-person review: the author and a second steward who did not author it, at least one of them clinically qualified; the approver of WF-ESS-004 is a third person. A Safety-relevant binding rejects invalid or inactive codes, and its stewardship items get Critical or High severity (CFG-ESS-012, CFG-ESS-027). A Standard binding accepts the code with a flag and raises a stewardship item.
7. Input Requirements
| Input Field | Data Type | Mandatory | Validation | Description |
|---|---|---|---|---|
| Code system identifier | URI / identifier | Yes | Registered | Canonical identity |
| Version | String | Yes | Unique per code system | Release or local version |
| Content | Structured file or API payload | Yes | Schema valid; codes unique | Codes, displays, status, properties |
| Effective from | Date-time | Yes | Not before approval | Start of validity |
| Licence statement | Structured | Yes for licensed content | Present | Licence and permitted use |
| Value set definition | Structured | For value sets | References resolvable | Members or rules |
8. Processing Rules
| Rule ID | Processing Rule | Expected Result |
|---|---|---|
| PR-TRM-001-1 | Published versions are immutable | Corrections create a new version |
| PR-TRM-001-2 | New release inactivates codes used by active value sets or registered bindings | Publication blocked until resolved or accepted |
| PR-TRM-001-3 | Licensed content without licence statement | Load refused |
| PR-TRM-001-4 | Value set bound to a pinned version | Unchanged by later code system releases |
| PR-TRM-001-5 | Safety-relevant version submitted for approval without a second steward review | Approval blocked |
9. Output Requirements
| Output | Format | Recipient | Description |
|---|---|---|---|
| Published code system / value set version | API resource; FHIR terminology resources where selected | All domains | Content with version and effective period |
| Terminology-published event | Event (EVT-ESS-006) | All domains | New version effective |
| Impact report | Report | Steward, approver | Affected value sets, maps and bindings |
10. Validation and Error Handling
| Scenario | Validation | System Response | User Message / Action |
|---|---|---|---|
| Duplicate code in content | Uniqueness | Reject load with line detail | Fix source and reload. |
| Unresolvable reference in value set | Reference check | Block approval | "Value set refers to codes not present in the bound version." |
| Approver is author | Separation of duties | Block | "A different approver is required." |
11. State and Lifecycle Behaviour
Versions are Draft, In Review, Approved, Active, Superseded or Retired (section 4.3).
12. Audit Requirements
- Audited events: load, change, approval, publication, retirement, export.
- Each event records steward, approver, source release and version identifiers.
13. Security and Privacy Requirements
- Terminology content is Internal; licensed content is distributed only within licence terms.
- Authoring and approval are separated.
14. Acceptance Criteria
- AC-01: Given a new code system release, when it is approved and its effective date is reached, then lookups at "current" use the new version and lookups pinned to the prior version still succeed.
- AC-02: Given a release that inactivates a code used in an active value set, when publication is attempted, then it is blocked and the impact report lists the value set.
- AC-03: Given any published version, when its record is inspected, then owner, approver, approval time and effective period are present.
- AC-04: Given a historical date, when a value set is expanded as of that date, then the membership effective on that date is returned.
- AC-05: Given a value set used by a decision-support rule, when it is submitted for approval with only the author's review, then approval is blocked until a second steward has reviewed it.
- AC-06: Given a Fornas addendum decree, when its value set version is published, then a KFA code added by the addendum tests as a member from the decree's effective date, and a prescription dated before that date tests against the prior version.
15. Dependencies and Integration
- Upstream dependencies: content publishers; FR-ESS-REG-001; FR-ESS-CFG-001.
- Downstream dependencies: all domains; Domain 2 mapping and validation at interfaces; Domain 8 conformed layer.
- Required events or APIs: IF-ESS-006; EVT-ESS-006.
16. Open Questions / Assumptions
- Required code systems, local catalogues, licensing and stewardship are an open PRS decision (PRS 19.3 Terminology strategy; DEC-ESS-012).
- Formulary and procedure dictionaries are listed under the terminology service in Architecture 5.1. This specification treats the dictionaries' terminology bindings as in scope and the catalogue content as owned by the using domain (DEC-ESS-004).
Requirement FR-ESS-TRM-002: Code Lookup, Validation and Value Set Expansion¶
| Attribute | Description |
|---|---|
| Requirement ID | FR-ESS-TRM-002 |
| Requirement Name | Code lookup, validation and value set expansion |
| Requirement Type | Functional |
| Module | Terminology Service |
| Functional Area | FA-ESS-013 Terminology runtime services |
| Priority | Must |
| Criticality | Critical |
| Requirement Status | Draft |
| Source | DAT-002 (code systems and units validated at entry and ingestion); PRS section 22.3; contributes to EHR-006 (primary Domain 3) and SDLC-003 (primary Domain 2) |
| Related Business Rule | BR-ESS-015, BR-ESS-016 |
| Related Workflow | WF-ESS-004 |
1. Requirement Statement
The system shall provide runtime services that look up a code, validate a code against a code system version or value set, expand a value set, and validate a unit, returning for an invalid or inactive code an explicit result with the reason and never a substituted code.
2. Business Rationale
EHR-006 requires terminology validation to reject or flag invalid or inactive codes, and DAT-002 requires code systems and units to be validated at entry and ingestion. A common service makes every domain and interface apply the same answer.
3. Actors and Permissions
| Actor | Permission | Conditions |
|---|---|---|
| Calling domain service | Read (lookup, validate, expand) | Authenticated service identity |
| Workforce user (through applications) | Read (search, display) | Authenticated |
| Release pipeline (Domain 2) | Read (validate bindings) | Service identity for pipeline |
4. Preconditions - The requested code system or value set version is published.
5. Trigger - Data entry, ingestion, order or rule authoring, artifact validation in a release pipeline.
6. Functional Behaviour
- The system returns for a code its display, status, code system version and properties.
- The system validates a code against a named code system version, a value set, or the version effective at a stated date, and returns valid, inactive, not in value set, or unknown, with the reason.
- The system validates that a unit is a valid UCUM expression and, where requested, that it is commensurable with an expected unit.
- The system expands a value set with paging and text filter for use in pick-lists.
- The system returns in every response the version used, so that the caller can store it with the recorded code (version pinning).
- The system allows callers to hold a local read-only copy of published content for resilience and latency; the copy is identified by version and refreshed on the terminology-published event.
- The system creates a stewardship item when a caller reports a code that failed validation in live data entry or ingestion (FR-ESS-TRM-003, FR-ESS-DGV-002).
- The system supports validation of terminology bindings in clinical schemas, FHIR profiles and templates when invoked by the release pipeline.
7. Input Requirements
| Input Field | Data Type | Mandatory | Validation | Description |
|---|---|---|---|---|
| Code | String | Yes | Non-empty | Code to check |
| Code system | Identifier | Yes | Registered | System of the code |
| Version or as-of date | String / date | No | Published version | Defaults to current |
| Value set | Identifier | No | Published | Membership check |
| Unit / expected unit | String | For unit validation | — | Unit expression |
8. Processing Rules
| Rule ID | Processing Rule | Expected Result |
|---|---|---|
| PR-TRM-002-1 | Code exists but is inactive in the evaluated version | Result "inactive" with date of inactivation where known |
| PR-TRM-002-2 | Code not found | Result "unknown"; no nearest match is substituted |
| PR-TRM-002-3 | Caller uses a cached version older than the configured maximum staleness | Caller must flag results as based on stale terminology |
| PR-TRM-002-4 | Code system not licensed for the caller's use | Result "not available" with reason |
9. Output Requirements
| Output | Format | Recipient | Description |
|---|---|---|---|
| Lookup / validation result | API response | Calling service | Outcome, reason, version used |
| Value set expansion | Paged API response | Calling service | Members with displays |
10. Validation and Error Handling
| Scenario | Validation | System Response | User Message / Action |
|---|---|---|---|
| Unknown code system | Registry check | Error | "Code system is not registered." Stewardship item. |
| Service unavailable | Timeout | Caller uses local published copy; if none, applies the binding's rule (flag as unvalidated or reject) | "Code could not be validated; entry is flagged for review." |
| Version not found | Version check | Error | Caller corrects pinned version. |
11. State and Lifecycle Behaviour
None; read-only against published versions.
12. Audit Requirements
- Routine lookups are not individually audited. Failed validations in live transactions are logged with caller, code, code system and context to support stewardship.
13. Security and Privacy Requirements
- Requests carry no patient identifiers; callers must not send patient data to the terminology service.
14. Acceptance Criteria
- AC-01: Given an inactive code, when validated against the current version, then the result is "inactive" and the calling domain rejects or flags the entry according to its binding (EHR-006 acceptance).
- AC-02: Given a code valid in an earlier version, when validated as of a date within that version's effective period, then the result is valid.
- AC-03: Given an invalid unit expression, when validated, then the result is invalid with reason.
- AC-04: Given the terminology service is unreachable, when a caller with a local published copy validates a code, then validation succeeds against the copy and the response records the copy's version.
- AC-05: Given a template with a binding to a non-existent value set, when the release pipeline validates it, then the validation fails (SDLC-003 acceptance).
15. Dependencies and Integration
- Upstream dependencies: FR-ESS-TRM-001.
- Downstream dependencies: Domains 1, 3, 4, 5, 6, 8, 9; Domain 2 interface validation and pipelines.
- Required events or APIs: IF-ESS-006; EVT-ESS-006.
16. Open Questions / Assumptions
- The maximum staleness of local copies is a proposed configuration value (CFG-ESS-011; ASM-ESS-005).
Requirement FR-ESS-TRM-003: Concept Maps and Unmapped-Code Stewardship¶
| Attribute | Description |
|---|---|
| Requirement ID | FR-ESS-TRM-003 |
| Requirement Name | Concept maps and unmapped-code stewardship |
| Requirement Type | Functional |
| Module | Terminology Service |
| Functional Area | FA-ESS-014 Concept mapping and unmapped-code stewardship |
| Priority | Must |
| Criticality | High |
| Requirement Status | Draft |
| Source | PRS section 22.3 (bindings, mappings and versions effective-dated and traceable); PRS section 7.2; DAT-005 (unmapped codes); contributes to EBP-003 and EBP-011 (primary Domain 9), RCM-007 and RCM-008 (primary Domain 6 and Domain 5), ANC-007 (primary Domain 3) |
| Related Business Rule | BR-ESS-017, BR-ESS-016 |
| Related Workflow | WF-ESS-004 |
1. Requirement Statement
The system shall store concept maps between code systems as versioned, effective-dated content with mapping provenance and relationship type, shall provide a translation service that returns the map version used, and shall route unmapped or ambiguous concepts to a terminology steward rather than returning an assumed equivalent.
2. Business Rationale
Local codes, interface codes and classification crosswalks must be traceable (PRS 22.3). An assumed mapping for a safety-relevant concept (a laboratory test, a drug, an allergen) can produce a wrong result display or a missed decision-support check.
3. Actors and Permissions
| Actor | Permission | Conditions |
|---|---|---|
| Terminology steward | Create / Update maps; resolve stewardship items | For assigned code systems |
| Content author in another domain (for example Domain 9 pathway designer, Domain 6 coding lead) | Create / Update maps owned by that domain | Through the same service; ownership recorded per map |
| Designated approver | Approve map versions | Not the author |
| Calling domain service | Read (translate); report unmapped code | Authenticated |
4. Preconditions - Source and target code systems are registered and published.
5. Trigger - Mapping request; translation request; unmapped code reported by a domain or interface.
6. Functional Behaviour
- The system stores each map entry with source code and version, target code and version, relationship type (equivalent, broader, narrower, related, no map), author, approver, rationale and effective period.
- The system records for each concept map its owner, so that maps authored by other domains (guideline mappings by Domain 9, coding crosswalks by Domain 6) are stored and versioned here but remain that domain's content. This service is the store of record for every published concept map, and all run-time translation, for Domain 3 decision support, Domain 9 eligibility and Domain 8 cohorts, uses it (DEC-ESS-020).
- The system translates a code using the map version effective at a stated date and returns all candidate targets with their relationship types and the map version.
- The system never presents a non-equivalent or multi-candidate mapping as a single equivalent result.
- The system creates a stewardship item when translation finds no entry or the caller reports an unmapped code, recording source system, code, display, context, frequency and safety relevance.
- The system prioritizes stewardship items by safety relevance and age and assigns them to the steward of the target code system.
- The system notifies the reporting domain when an item is resolved, so that quarantined records can be reprocessed by their owner.
- The system keeps maps between clinical terminology and administrative classifications as explicit, separately identified maps, and does not merge the two vocabularies.
- The system preserves superseded map versions so that the mapping effective at the time of care can be reconstructed.
7. Input Requirements
| Input Field | Data Type | Mandatory | Validation | Description |
|---|---|---|---|---|
| Source code and system | Code, identifier | Yes | Valid in source version | Concept to map |
| Target code and system | Code, identifier | Yes unless "no map" | Valid and active in target version | Mapped concept |
| Relationship type | Code | Yes | Value set | Equivalence type |
| Rationale | Text | Yes | Non-empty | Mapping provenance |
| Effective period | Date-time range | Yes | Valid range | Validity |
| Safety relevance (stewardship item) | Code | Yes | Value set | Drives priority |
8. Processing Rules
| Rule ID | Processing Rule | Expected Result |
|---|---|---|
| PR-TRM-003-1 | No entry for the source code | Result "unmapped"; stewardship item created or its frequency incremented |
| PR-TRM-003-2 | More than one candidate target | All candidates returned with relationship; flagged ambiguous |
| PR-TRM-003-3 | Target code becomes inactive in a new release | Entry flagged; map version cannot remain current without resolution |
| PR-TRM-003-4 | Repeated reports of the same unmapped code from the same source | One stewardship item, with count |
9. Output Requirements
| Output | Format | Recipient | Description |
|---|---|---|---|
| Translation result | API response | Calling service | Targets, relationship types, map version |
| Stewardship item | Task / queue item | Terminology steward | Unmapped or ambiguous code |
| Terminology stewardship report | Report (REP-ESS-007) | Data Governance Council | Unmapped count, age, resolution |
10. Validation and Error Handling
| Scenario | Validation | System Response | User Message / Action |
|---|---|---|---|
| Target code inactive | Target validation | Reject entry | "Target code is inactive in the selected version." |
| Circular or conflicting entries | Consistency check | Block approval | Listed in impact report. |
| Translation of safety-relevant code returns unmapped | PR-TRM-003-1 | Caller quarantines or flags per its own rule | Caller-specific message; item visible to steward. |
11. State and Lifecycle Behaviour
Concept map versions follow the version lifecycle. Stewardship items are Open, Assigned, Resolved or Rejected.
12. Audit Requirements
- Audited events: map entry create, change, approval, retirement; stewardship item creation and resolution with reason.
13. Security and Privacy Requirements
- Stewardship items carry the code and source context only; where an example record is needed, the steward follows a reference into the owning domain subject to authorization.
14. Acceptance Criteria
- AC-01: Given a local laboratory code with no map to the target system, when an interface requests translation, then the result is "unmapped" and a stewardship item exists.
- AC-02: Given a source code with two candidate targets, when translated, then both are returned and the result is marked ambiguous (EBP-003 acceptance: invalid or ambiguous mappings flagged for human resolution).
- AC-03: Given a historical date, when a code is translated as of that date, then the map version effective then is used and reported (EBP-011 support).
- AC-04: Given a resolved stewardship item, when it is closed, then the reporting domain is notified and the resolution reason is recorded.
- AC-05: Given a clinical concept and a classification code linked by a map, when the map is inspected, then source and target code systems are identified as clinical terminology and administrative classification respectively (RCM-008 support).
15. Dependencies and Integration
- Upstream dependencies: FR-ESS-TRM-001; FR-ESS-DGV-002.
- Downstream dependencies: Domain 2 (interface mapping), Domain 5, Domain 6 (coding crosswalks), Domain 8 (conformed layer mapping), Domain 9 (guideline mapping).
- Required events or APIs: IF-ESS-006; EVT-ESS-006, EVT-ESS-012.
16. Open Questions / Assumptions
- Terminology service versus guideline mapping content versus encounter coding follows the shared working position (DEC-ESS-004).
- Update 17 Nov 2026 (GAP-ESS-006, closed): safety relevance is classified by use (medication, allergy, results interpretation, decision support) and drives two-person review and reject behaviour (FR-ESS-TRM-001 parts 6.10 and 6.11).
← 5.3 Module Specification: Consent and Privacy Preference Services | Contents | Identifier index | 5.5 Module Specification: Master and Reference Data Governance and Registries →