Mercurial > hg > orthanc-book
annotate Sphinx/source/faq/orthanc-ids.rst @ 215:d7073b3e8488
Orthanc 1.5.5
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 25 Feb 2019 13:01:41 +0100 |
parents | 9b4e810f4ecf |
children | d217af5e6cb3 |
rev | line source |
---|---|
0 | 1 .. _orthanc-ids: |
2 | |
3 Orthanc identifiers | |
4 =================== | |
5 | |
6 In Orthanc, each patient, study, series and instance is assigned with | |
7 an unique identifier that is derived from the DICOM identifiers. | |
8 Contrarily to the :ref:`identifiers of the DICOM standard | |
9 <dicom-identifiers>`, the Orthanc identifiers are formatted as a | |
25 | 10 `SHA-1 hash <https://en.wikipedia.org/wiki/Sha-1>`__ with a fixed |
0 | 11 length, so as to be more Web-friendly. More specifically: |
12 | |
13 * Patients are identified as the SHA-1 hash of their PatientID tag | |
14 (0010,0020). | |
15 * Studies are identified as the SHA-1 hash of the concatenation of | |
16 their PatientID tag (0010,0020) and their StudyInstanceUID tag | |
17 (0020,000d). | |
18 * Series are identified as the SHA-1 hash of the concatenation of | |
19 their PatientID tag (0010,0020), their StudyInstanceUID tag | |
20 (0020,000d) and their SeriesInstanceUID tag (0020,000e). | |
21 * Instances are identified as the SHA-1 hash of the concatenation of | |
22 their PatientID tag (0010,0020), their StudyInstanceUID tag | |
23 (0020,000d), their SeriesInstanceUID tag (0020,000e), and their | |
24 SOPInstanceUID tag (0008,0018). | |
25 | |
125
9b4e810f4ecf
note about concatenation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
25
diff
changeset
|
26 NB: The concatenation adds a `pipe |
9b4e810f4ecf
note about concatenation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
25
diff
changeset
|
27 <https://en.wikipedia.org/wiki/Vertical_bar>`__ separator "``|``" |
9b4e810f4ecf
note about concatenation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
25
diff
changeset
|
28 between the concatenated DICOM tags. |
9b4e810f4ecf
note about concatenation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
25
diff
changeset
|
29 |
0 | 30 Because the DICOM standard guarantees the StudyInstanceUID, |
31 SeriesInstanceUID and SOPInstanceUID tags to be globally unique, the | |
32 Orthanc identifiers for studies, series and instances are also | |
33 globally unique (provided no hash collision occurs, which is highly | |
34 improbable). | |
35 | |
36 The patient-level identifiers are *not* guaranteed to be globally | |
37 unique, and might collide between different hospitals. For this | |
38 reason, you should **always do queries at the study level** as soon as | |
39 you deal with an application that handles patients from different | |
40 hospitals. | |
41 | |
42 The actual implementation of the hashing is carried on by the | |
43 `DicomInstanceHasher class | |
44 <https://bitbucket.org/sjodogne/orthanc/src/default/Core/DicomFormat/DicomInstanceHasher.cpp>`_. | |
45 | |
46 | |
47 The "Inexistent Tag" error | |
48 -------------------------- | |
49 | |
50 If you use an old version of Orthanc (< 0.7.4) and you receive the | |
51 "*Exception while storing DICOM: Inexistent tag*" error while storing | |
52 a DICOM instance into Orthanc, please make sure that all the 4 | |
53 following tags do exist in the DICOM file: | |
54 | |
55 * PatientID (0010,0020), | |
56 * StudyInstanceUID (0020,000d), | |
57 * SeriesInstanceUID (0020,000e), | |
58 * SOPInstanceUID (0008,0018). | |
59 | |
60 These tags are all used to index the incoming DICOM instances. The | |
61 error message is more explicit starting with Orthanc 0.7.4. |