Following on from @SevKohler 's original question in the thread Terminology_id name list, we morphed into a discussion about namespaces, version ids and so on, see particularly @erik.sundvall 's post near the end. This is mostly SNOMED-specific.
Terminology pros can skip to the bottom ![]()
Background
A bit of SNOMED CT meta-terminology (doesn’t officially apply to other terminologies):
- A module is a self-contained collection of Snomed components (hierarchies, related ref-sets) for some content scope (e.g. Swedish ref-sets + translation of international)
- An Edition is a collection of module(s) and all semantic dependencies, i.e. modules containing hierarchies under which codes were defined in a local extension. An ‘edition’ is what you deploy in some production environment. An edition has to include a Module Dependency Ref Set, i.e. a full manifest of everything in it, including versions.
- A Release is an Edition on a certain date, i.e. a particular list of modules and their versions. (On some other date, the same edition will be different.)
- A module version id is a short-form ISO8601 date string, e.g. “20260630”.
Here’s a graphic showing the modules relevant to Region Stockholm and (bottom right) what a ‘Region Stockholm edition’ would consist of). This example would have equivalents in any country.
Following SNOMED and HL7, a coded term is supposed to be represented in data as 3 things:
- System: always
http://snomed.info/sct, whichever module a code belongs to. An international, Swedish or Stockholm code therefore sits in the same system. - Version: says which edition the code was taken from, as
http://snomed.info/sct/[sctid]/version/[YYYYMMDD]. - Code: the concept’s SCTID. The module it belongs to can often be read from the namespace inside the SCTID, but only the concept’s moduleId is reliable, since concepts can be promoted across modules, and their original code does not change.
Suppose a Region Stockholm module were created inside Sweden’s namespace 1000052. A made-up but correctly formed ID would be 99991000052100. It breaks down as item number 9999, namespace 1000052, partition 10 (meaning an extension concept) and check digit 0.
So the System+Version URI for a Stockholm Edition based on that RS extension module would be: http://snomed.info/sct/99991000052100/version/20260630. (Just the module would be identified by http://snomed.info/module/99991000052100/version/20260630).
Note that a code originally created in the Stockholm Region or Sweden extension (and thus having either a Sweden or Region Stockholm module name space in its id) could be promoted to the international core. Its code doesn’t change - so those long codes with module ids for various countries etc, only indicate where the code originated, not what module it is in today.
Thus, when a coded term is created in data, the only reliable way to know what version of anything it was obtained from is to know the code and the Edition + version, i.e. what terminology release was being served in the runtime and/or design time (since some codes in data come from archetypes or templates, e.g. choice of BP measurement position or similar).
Editions change over time, so the same terminology concept id could will usually have been taken from different releases of an Edition, and maybe even different Editions say over a 5 year period (the latter if an org started out with just SNOMED Intl core, but subsequently deployed a national extension). Its meaning shouldn’t change in principle, but the answers inferencing or querying produce could be different. E.g. an extension might add a relationship between two international core concepts; to compute with that, something in the data needs to indicate that that extension was in use when the data item was created, if not, it might not even resolve if processed in a different institution or country.
Requirements
I’ll restate Erik’s requirements as I understand them in a summarised form:
- From a SNOMED CT code’s id, we can get back to what module it’s from (core, Swedish extension etc) but not what version.
- TB: not quite true; only what module it originally came from; it’s the Edition that counts
- For medico-legal and research reasons you always want to know which SNOMED Edition was either a) live deployed, for terms obtained from a running service (e.g. UI picklist) or b) used to make a template or archetype, if the term came from there (= informal value-set or hard-coded); ultimately we want to know what the full set of module+version making up the Edition in use
- A production environment can have an Edition consisting of multiple levels of extension. @erik.sundvall - I think your concern in this point was that both national and regional codes are then likely to occur mixed in a single patient’s data; the same concept code could occur in data with different terminology URIs (or namespace versions)
- TB: it can certainly have different editions visible in the version field
- For many queries and logical reasoning of actual instance data you actually don’t want to care about the difference between different modules, but rather treat SNOMED CT as one giant graph.
- TB: agree
So I think 2. and 4 are the concrete requirements.
What is needed in openEHR
So, what does this mean for openEHR coded term representation? How much do we care about Edition / version info?
If a terminology code in data is represented the openEHR way, i.e. something like “SNOMED-CT::373873005” (or equivalent openEHR CODE_PHRASE instance), inside a Composition committed on 2025-04-27, then what the “SNOMED-CT” really refers to is defined by the Edition of SNOMED CT deployed, that the code was served from (e.g. for building UI drop downs) and resolved against (e.g, to display “Pharmaceutical / biologic product” to a human); note that it doesn’t actually matter where the Edition was deployed, e.g. Karolinska UH or Lund UH as long as the Edition is well defined and accessible
In this approach, the string “SNOMED-CT::373873005” cannot on its own tell you what versions of anything were available in the environment where it was created.
There is more than one way to solve the problem…
Per-code
In openEHR, the RM class CODE_PHRASE caters for the version as well, but annoyingly (in hindsight) it is not a separate field, but within the TERMINOLOGY_ID part. Also, the reliable way to indicate the ‘version’ is going to be with a SNOMED CT Edition URI, as per above, e.g. http://snomed.info/sct/99991000052100. Or a particular release, with version info included - http://snomed.info/sct/99991000052100/version/20260630
So a ‘fully coded’ openEHR Terminology_id in a coded term could look like this: “SNOMED-CT(http://snomed.info/sct/99991000052100/version/20260630)”
Pretty ugly, and it’s going to make simple lexical matching in a query engine or ETL generator problematic.
Record the Edition elsewhere
We could however record the Edition URI in the Composition. Today it would need to go in the EVENT_CONTEXT, but one could imagine a dedicated field for it, like we have for territory. Then, resolving exactly which version of which module within which edition some code was created would be done by using this information. We assume that the SNOMED edition is actually the same for all codes recorded within a Composition. Is this guaranteed? It would prevent mixing Evaluations created locally with some Observations pulled in from a LIS, if they contained SNOMED codes but from different Editions - but I think this is actually a pretty unlikely scenario.
The downside is that the Edition info is not next to the concept codes themselves, so any querying that wants it has to stitch things together.
What will work in practice?
This might however be exactly what we want. Consider that most computing on coded terms in data will be done within the institution, or (increasingly) region, and 95% of the time, the same country.
Per Erik’s point 4, for normal operations, all Snomed codes are going to resolve just fine against the current release of the Edition in use; we don’t need any version info.
Per point 2 - medico-legal and research - at least medico-legal operations are expected to take a bit of effort. It will be easy enough to use Edition info from a Composition to figure out what Snomed was running when some particular EHR data was created.
The edge cases might theoretically be problematic:
- data being moved to a new organisation that uses a different Edition of Snomed
- data being moved to a new country - will every code resolve against what might be a quite different SNOMED Edition?
In such cases, even having perfect Edition information available might not help, since to compute, you need the actual release. Is an Irish jurisdiction going to rebuild a historical Swedish release to make the EHR of a Swede who moves there fully interpretable? Seems unlikely.
Conclusions
I’m not sure how much the edge cases above truly matter. We in IT like to solve for everything, but I doubt that they are economically justifiable. The vast majority of diagnostic and procedure codes that will appear in e.g. an IPS will be from the SNOMED core, or at worst, a National extension.
I am therefore inclined to think that SNOMED version information doesn’t matter for the vast majority of routine computing, of latest data versus most recent SNOMED (local) release.
And if we store a correct SNOMED Edition URI in every Composition containing SNOMED codes, it will serve all realistic medico-legal and research needs.
If doing so doesn’t solve other issues I have not covered here, and storing Edition information on a per-code basis looks unavoidable, I’d opt for a separate field in TERMINOLOGY_ID, and possibly deprecate the use of the “(version)” part of the TERMINOLOGY_ID type as currently defined. This allows routine querying to function easily, but ‘special querying’ or reporting could make use of the new version_id field.
We could actually do both, but generally leave the CODE_PHRASE version field empty - populate it on demand e.g for Compositions passing through an API, or being processed in an ETL service - it is easy to see that the Composition Edition info can be injected into every instance of CODE_PHRASE within it.





