Mapping between terminologies returns a set of concepts each time in a different order

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapping between terminologies returns a set of concepts each time in a different order

Lara
Hi everyone, I am trying to map UMLS CUI to ICD10 using PyMedTermino2.

I have read in the documentation that mapping between terminologies returns a set of concepts that can contain several concepts
when the starting concept corresponds to several concepts in the terminology of arrival.  However, my set of concepts is in a different
order each time I execute my code, although my CUI stays the same.

For example:

CUI C0021345

This concept corresponds to the following concepts in ICD10:
Gammaherpesviral mononucleosis B 27.0
Infectious mononucleosis, unspecified B27.9
Infectious mononucleosis B27.

Now, each time I execute my code, the order of the returned concepts changes, e.g., B27.0 comes first, the next time B27 comes first, and so on...

Does anyone have any idea why this happens? :)

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Mapping between terminologies returns a set of concepts each time in a different order

Jiba
Administrator
Hi,

The returned values is a set, so the actual order of the items has no particular meaning.

In practice, the order depends on the SQLite database (which seems to return the results in variable order).

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Mapping between terminologies returns a set of concepts each time in a different order

Lara
Hi Jiba,

thanks for your answer! That helps me a lot! :)

Best,
Lara