Storing codes of two external terminologies

Hello Pau,

I will make the assumption that when you say “terminology_id is checked to see if it contains the code_string”, you are literally saying that you want to check if the code comes from the terminology, and not checking if the code is part of a specific subset or reference set.

If it was the latter case, there is no mystery: just add as many terminology binding in the archetype as you need for every subset you have. And then you could check if the code is part of any of them.

But, following the initial assumption, you are saying that the terminology_id is modified over time. So, for example, you have a terminology identified as “MY_TERMINOLOGY_ORIGINAL_NAME” that at some point was renamed as “MY_TERMINOLOGY_NEW_NAME”. So, in the data instances you might have stored values as CODE_X::MY_TERMINOLOGY_ORIGINAL_NAME or as CODE_X::MY_TERMINOLOGY_NEW_NAME

To represent that, one option is what you said, add as many DV_CODED_TEXT as you need, one for each terminology_id. Bear in mind that you would also need to constrain the parent items attribute cardinality to 0…1 so that this is interpreted as alternative DV_CODED_TEXT and not as multiple instances.

Another option would be to just add one DV_CODED_TEXT and specify multiple terminologies for it. I have never done this with the Archetype Designer, but I think it is something like this: