Hi… I would like to store a UMLS code and and a snomed code while storing certain clinical values. The two codes will be needed for two different downstream systems. In the archetype designer I see the possibility of binding a DV_CODED_TEXT value to one terminology, not multiple.
Or is there a better way to address my problem, than binding to 2 terminology codes ?
The DV_TEXTmappings element is intended for adding any number of additional codes. A DV_CODED_TEXT still needs a single defining_code to be the main one though.
Using the TERM_MAPPING class, you can specify whether the additional codes are identical to, broader or narrower than the defining_code.
Maybe there is a difference between adl1 vs 2:
Adl2 spec: “ Bindings may be defined for a given set of terms for more than one terminology, enabling the different bindings to be used in different contexts, e.g. hospital deployment versus aged care.”
Hi Silje,
Mappings are intended for run time mapping of individual patient data, right?
Since Sangeeta talked about AD, I think he’s looking for design time binding of the meaning of a concept (archetype/template). Single defining code makes sense, but is again a different concept. Or am I missing something from your message?
I think @siljelb is on the right track, and also @joostholslag saying that this might be a limitation of the AD.
My interpretation of the original question is that @sangeeta.nbose wants to store a single textual value, but having it mapped to two different codes. If we model the following DV_CODED_TEXT in the AD, we are in fact defining alternative defining_code values, i.e. we will use one coding system or the other in the instances. But if we want both we need to store the DV_TEXT_CODE twice.
As @siljelb said, the right thing to do is to constrain the mapping attribute, but it does not seem that the AD supports it. I show it using LinkEHR.
And finally, one important detail. The mapping attribute is also part of DV_TEXT. So we can use it to define two term mappings associated to one text value without needing to have a main defining_code (which is only part of the DV_CODED_TEXT data type)
This is my understanding too. However, I didn’t understand, as @joostholslag points out, that she wanted to do the mapping in the template and not at run time. In that case AD certainly needs to add support for this. How does this look from your end, @borut.fabjan ?
An example intention would be … Patient shows ‘sign/symptom’ such as ‘headache’. I would like to store the ‘headache’ as the value and also the umls code and the snomed code for headache. This would be a runtime activity. But I would need to design my template/archetype to accept the multiple terminologies isnt it ?
You don’t need to do anything at design time to be able to store those. But you can record (multiple) term bindings at design time. It’s important these should be considered implementation guidance and not automatically recorded as mappings in patient data for clinical safety reasons.
Thanks all… I am a little confused about storing multiple term mappings. Is there any sample code I can refer. (I do not see the support for setting the TERM_MAPPING attribute in AD. But as I understand it, I do not need to do anything design time).
You can record the fact that a value must be from a particular terminology, and its subset etc, if you go with DV_CODED_TEXT as @damoca mentions, and that can be expressed at the archetype level.
So if you want to make the terminology of the mapping part of validation, use DV_CODED_TEXT in your archetype, or specialise DV_TEXT fields of the archetype you’re re-using to DV_CODED_TEXT in a template.
If you’re ok with users using any terminology, which means you’ll only query for the ones you’re interested in when using the data, and not be concerned about codes from terminologies you don’t care about, then stay with DV_TEXT.
Can I join the clinical modelling experts group now? ? I’d be very happy to be educated if the above is wrong.
P.S. simply use the RM paths in EHRbase for (partial) querying:
{
"q":"select
c/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]/data[at0001]/events[at0002]/data[at0003]/items[openEHR-EHR-CLUSTER.specimen.v1]/items[at0029]/value/mappings/target/code_string
from EHR e
contains COMPOSITION c
"
}
Now I’m confused I tried to answer @sangeeta.nbose 's question, then implicitly asked if my answer was correct. I’ll stop here before go into an infinite loop
Thank you so much @birger.haarbrandt . The code helped… we have this working now. Just one last question… For storing multiple mappings… I would need to make this a list with multiple mappings. Would this be right.?
“mappings”: [
{
“_type”: “TERM_MAPPING”,
“match”: “=”,
“target”: {
“terminology_id”: {
“value”: “SNOMED-CT”
},
“code_string”: “345356676789”
}
}
{
“_type”: “TERM_MAPPING”,
“match”: “=”,
“target”: {
“terminology_id”: {
“value”: “UMLS”
},
“code_string”: “1234”
}
}
]
If so, how would the RM path work out for accessing the individual item in the list ? Thanks for all your help.
Hi… I. have another question too… Can I use the ‘match’ field to store an accuracy number. It would be my information on the accuracy of the mapping of the source value with the target code. ‘Match’ is a char, so i would be able to store the number… but just checking if there are are guidelines against it.
Hi Sangeeta, I think technically you can use any character, other should confirm this. But only 4 characters are specified in the TERM_MAPPING class to have meaning. I rencentlh proposed to add ~ as a fifth option to indicate a somewhat match (e.g. machine learning suggestion). Is this also your usecase?
Yes @joostholslag my use case would be a machine learning suggestion… but I do have a confidence number… Hence was looking at using ‘match’ for storing the number.