Terminologies in the template

Hey everybody,

I have one question. I am currently working on a template in Marand and would like to add SNOMED codes for the antibiotic in addition to the LOINC coding. Do you know how to do that? Do you think it works? I want to add a LOINC coding and a SNOMED coding for the same antibiotic.

regards
Sarah Ballout

1 Like

Hi Sarah,

The very quick answer is that currently this is not possible with either the .oet template format or the current ADL2 specification (which Archetype Designer mirrors closely).

Can you clarify why you want to have both the SNOMED and LOINC codes?

I would assume that this is a situation where for each LOINC code you want to specify a SNOMED equivalent, and are saying that either are acceptable in the patient data.

e.g.

LOINC: 12345 => SNOMED-CT:: 345657
LOINC: 445634 => SNOMED-CT:: 5678990

and that in the data it is acceptable to have either LOINC or the SNOMED equivalent?

The openEHR codedText datatype allows you to carry one ‘defining_code’ and any number of ‘mappings’ in the patient data, which probably does what you need but we no not have any ability t odefine those mappings in templates, so you would have to define the valid codes and mappings somewhere else. One possibility is to use FHIR Valuesets and Concept Maps for this purpose.

Can you tell us more about why you need both the terminologies and what are you are hoping to end up in the patient record as there are several possibilities…

  1. If a contributing system sends a SNOMED code, rather than a LOINC code, havethat converted into a LOINC code then store the LOINC code as the defining_code. This ensures that all the defining_codes are LOINC-based.

  2. Same as (1) but also carry the original SNOMED code in the patient record as as codedText.mapping. This allows querying on both the the LOIN code and SNOMED code but the LOINC code is always the defining_code.

  3. If the contributing system sends a SNOMED code, store that as the defining_code but also store the equivalent LOINC code as a codedText.mapping. As for (2) this allows both the LOINC and SNOMED codes to be queried but critically in this case the defining_code is a SNOMED code, and if there are other contributers who use LOINC codes then things get a bit mixed up and this may make querying more complex.

This is worth a good discussion though, as it is a very common challenge (handling mixed coding systems).

The main message for me is that we need to be able to define mappings explicitly, either in templates or related artefacts like Valuesets and Concept Maps.

Hey @ian.mcnicoll, so I understand that you can add terminology bindings to archetype nodes as you’ve mentioned in this video:

Is the same possible for templates?

For example, I want to add the LOINC code for Systolic Blood Pressure in addition to the one already present in the Archetype for SNOMED CT. It makes it easier to map things out to FHIR or other artefacts from the EHR if things are already coded.

1 Like

I don’t have an answer for you, but I’m here to warn everyone to view the current SNOMED CT bindings in the international CKM archetypes with a certain level of healthy suspicion, even if they look right at first glance. None of them have gone through any kind of terminology review :grimacing:

While the intent behind the use of 271649006 |Systolic blood pressure (observable entity)| you’re mentioning as an example is probably correct (“it’s the systolic blood pressure we do normally, you know”), it’s ontologically iffy. It should probably be something like ‘Systolic systemic arterial pressure (observable entity)’, which doesn’t currently exist in SNOMED CT :woman_shrugging:

1 Like

Hi Sidharth,

It is important to differentiate 3 ways of representing terminology in openEHR archetypes and templates.

  1. Bindings

There are really just design guidance - we can set a ‘binding’ on any internal openEHR code e.g at Codes, to suggest appropriate SNOMED or LOINC or other codes. So a few archetype like Blood pressure have those bindings especially SNOMED bindings and technically LOINC bindings can be added, both to valuesets and node names like ‘systolic blood pressure’

However, it is important to understand that these ‘bindings’ are advisory only - nothing happens specifically to add these codes into patient data. There is also a likelihood that those bindings do not fit with local/regional choice of SNOMED or LOINC codes.

Right now we cannot add template-level bindings to templates but that is probably not as useful as it sounds - you’ll see why when we get to ‘mappings’.

  1. Mappings.

If you want to carry actual LOINC or SNOMED codes alongside the internal openEHR codes, you need ot make use of the mappings attribute in the Reference model, which is available on any Text or Coded_text node, including the node name. This is fully queryable via AQL.


So to do what you really want @Sidharth, I think we really need to be able to ‘constrain mappings’ in the template i.e if someone adds a ‘systolic’ value then force the associated SNOMED-CT mapping to be set. Right now we can only advice the developers of this requirement via written guidance.

These mappings might be based on bindings in the underlying archetypes but these cannot be relied on to be ‘correct’ in any local setting.

Let’s bring this discussion up in the SEC technical group - we can’t constrain mappings in current tooling but I think it may be supported in the latest template formalisms.

3 Likes