# Orthanc identifiers global unicity in question ?

**URL:** <https://discourse.orthanc-server.org/t/orthanc-identifiers-global-unicity-in-question/376>\
**Category:** Google Groups archive\
**Created:** [March 9, 2016, 4:30pm UTC](https://discourse.orthanc-server.org/t/orthanc-identifiers-global-unicity-in-question/376 "2016-03-09T16:30:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Delpont](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/3d9bf3/32.png) [@Marc\_Delpont](https://discourse.orthanc-server.org/u/Marc_Delpont)\
**Post date:** [March 9, 2016, 4:30pm UTC](https://discourse.orthanc-server.org/t/orthanc-identifiers-global-unicity-in-question/376/1 "2016-03-09T16:30:49Z")

</div>

Hi,

in documentation : [https://orthanc.chu.ulg.ac.be/book/faq/orthanc-ids.html](https://orthanc.chu.ulg.ac.be/book/faq/orthanc-ids.html)

> Because the DICOM standard guarantees the StudyInstanceUID, SeriesInstanceUID and SOPInstanceUID tags to be globally unique, the Orthanc identifiers for studies, series and instances are also globally unique…

but if they are identified by the **PatientID** (not globaly unique) concatenated with their uuids, their orthanc identifiers can’t be globally unique !

Where is the truth ?

Marc

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [March 9, 2016, 9:05pm UTC](https://discourse.orthanc-server.org/t/orthanc-identifiers-global-unicity-in-question/376/2 "2016-03-09T21:05:42Z")

</div>

Hello,

Concatenating the Patient ID (that is not globally unique) with Study/Series/SOP instance UIDs (that are globally unique) leads to a globally unique identifier, as the trailing part will be globally unique.

So, the Orthanc identifiers of studies/series/instances are globally unique (apart from the Orthanc identifiers of the patients).

HTH,  
Sébastien-

---

<div class="post-metadata">

**Author:** ![Marc\_Delpont](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/3d9bf3/32.png) [@Marc\_Delpont](https://discourse.orthanc-server.org/u/Marc_Delpont)\
**Post date:** [March 10, 2016, 2:10pm UTC](https://discourse.orthanc-server.org/t/orthanc-identifiers-global-unicity-in-question/376/3 "2016-03-10T14:10:30Z")

</div>

It seems that I don’t understand how identifiers are generated in Orthanc.

Named uuids are globaly unique, so that the same string passed to uuid generator returns the same uuid.  
If the Patient ID is part of the original string, different patient IDs will make different strings and then different uuids, even if trailing part is the same.  
Where am I wrong ?

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [March 11, 2016, 11:45am UTC](https://discourse.orthanc-server.org/t/orthanc-identifiers-global-unicity-in-question/376/4 "2016-03-11T11:45:42Z")

</div>

The FAQ gives a full explanation about Orthanc identifiers:  
[https://orthanc.chu.ulg.ac.be/book/faq/orthanc-ids.html](https://orthanc.chu.ulg.ac.be/book/faq/orthanc-ids.html)

Your misunderstanding probably comes from the fact that Orthanc identifiers are _not_ UUID/GUID as you seem to think [1], but result from a SHA-1 hashing [2].

[1] [https://en.wikipedia.org/wiki/Universally\_unique\_identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier)  
[2] [https://en.wikipedia.org/wiki/SHA-1](https://en.wikipedia.org/wiki/SHA-1)
