# Node name mappings in EHRBase **Category:** [Tool Support](https://discourse.openehr.org/c/tool-support/29) **Created:** 2021-10-13 07:22 UTC **Views:** 865 **Replies:** 4 **URL:** https://discourse.openehr.org/t/node-name-mappings-in-ehrbase/1930 --- ## Post #1 by @ce.mascia Hello! Following [this discussion](https://discourse.openehr.org/t/coding-archetype-concepts-and-nodes-using-terminology/347/4) I tried to add a mapping to a node name in a composition and post it to EHRbase (the "archetype_node_id": "at0019" in the snippet below). I had no errors in the upload, but after retrieving the composition through a GET call this part disappeared and it is unreachable even using specific queries. Does EHRBase support TERM_MAPPINGS or am I missing something? If not, is it planned to support this requirement? Thanks! ``` [...] "archetype_node_id": "openEHR-EHR-EVALUATION.gender.v1", "language": {...}, "encoding": {...}, "subject": {...}, "data": { "_type": "ITEM_TREE", "name": { "_type": "DV_TEXT", "value": "Tree" }, "archetype_node_id": "at0002", "items": [ { "_type": "ELEMENT", "name": { "_type": "DV_TEXT", "value": "Biological sex", "mappings": [ { "_type": "TERM_MAPPING", "match":"=", "target":{ "_type":"CODE_PHRASE", "terminology_id":{ "_type":"TERMINOLOGY_ID", "value":"OMOP" }, "code_string":"37116947" } } ] }, "archetype_node_id": "at0019", "value": { "_type": "DV_TEXT", "value": "male" } } ] } }, [...] ``` --- ## Post #2 by @birger.haarbrandt Hi @ce.mascia, TERM_MAPPING is supported. What version of EHRbase are you using? Feel free to create a ticket in our issue tracker and we take a look at it. https://github.com/ehrbase/ehrbase/issues --- ## Post #3 by @pieterbos You put mappings on the ELEMENT level. But that is not a property of ELEMENT, it is a property of DV_TEXT. So change the JSON for the Element part to the following and it should work: ```json { "_type": "ELEMENT", "name": { "_type": "DV_TEXT", "value": "Biological sex" }, "archetype_node_id": "at0019", "value": { "_type": "DV_TEXT", "value": "male", "mappings": [ { "_type": "TERM_MAPPING", "match":"=", "target":{ "_type":"CODE_PHRASE", "terminology_id":{ "_type":"TERMINOLOGY_ID", "value":"OMOP" }, "code_string":"37116947" } } ] } } ``` --- ## Post #4 by @ce.mascia Hi, thanks @birger.haarbrandt, okay then I might add the request on GitHub too. Anyway, the version I'm using should be the latest, the 0.17.2. @pieterbos thanks for your suggestion, that actually works correctly in EHRbase, but what I'm trying to do is a different thing: I don't want to map the "value" of the element but the "name". Since this is a DV_TEXT as well, I thought it would work the same way, am I wrong? --- ## Post #5 by @pieterbos [quote="ce.mascia, post:4, topic:1930"] thanks for your suggestion, that actually works correctly in EHRbase, but what I’m trying to do is a different thing: I don’t want to map the “value” of the element but the “name” [/quote] Ah right. Sorry about that, that is indeed what you posted, and your json is correct and parses with Archie - I misread it! --- **Canonical:** https://discourse.openehr.org/t/node-name-mappings-in-ehrbase/1930 **Original content:** https://discourse.openehr.org/t/node-name-mappings-in-ehrbase/1930