Concept with similar ID but different source

Hi there,

When I add two distinct concepts coming from different sources that have the same Numeric OCL ID (but different Ext IDs) and their distinct mappings to a collection, their respective mappings are getting mixed together.

Is this a normal behaviour of OCL as both concept have the same ID number (but different source)? And therefore, should I make sure any concept in my collection has a different OCL ID (regardless of the source)?

When I import this collection in OpenMRS, the mapping issue is not reflecting as all concepts/mappings have distinct Ext ID/UUID.


PS: Apologise if this is not the place for such question, New to the community

1 Like

Hi @maxsemal! Thanks for reaching out! This is a great question, and there’s probably multiple perspectives to consider.

@askanter or @jon Do you have any thoughts on the possibility of the same ID showing up multiple times in one collection from the perspective of terminology management? It doesn’t seem like something that a source manager needs to be on the lookout for (i.e. to see if other sources share similar concept IDs). Maybe this is a topic for an upcoming OCL/OpenMRS Squad call?

And @Sny does this seem like something that OCL could handle in either the API or the TermBrowser to ensure that mappings are pointing to the right concepts, even in the case of overlapping IDs?

1 Like

If the OCL ID for a source is the human readable ID and the external ID is the UUID, then you really cannot assume that they are unique. The pairing of SOURCE + ID is what is unique which is corresponding to the code system-code pairing…

Thanks a lot for the quick answers, appreciated!

Just to give precisions as issue might come from us wrongly using OCL, here are the two concepts with same “OCL ID”

When adding both of them into one collection, the mappings of one concept are added to both concepts:

As mentioned above, it’s not blocking when we import them in OpenMRS (each concept has its respective mappings) but when looking at OCL, the associations “look” wrong.

Thanks again!

This feels like a bug to me. Source + Concept ID is what makes it unique.


I went ahead and made a ticket for this! Mixed up concept IDs in collections · Issue #1860 · OpenConceptLab/ocl_issues · GitHub

1 Like

This is fixed on all environments now.

1 Like