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
|
|
10 `SHA-1 hash <http://en.wikipedia.org/wiki/Sha-1>`__ with a fixed
|
|
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
|
|
26 Because the DICOM standard guarantees the StudyInstanceUID,
|
|
27 SeriesInstanceUID and SOPInstanceUID tags to be globally unique, the
|
|
28 Orthanc identifiers for studies, series and instances are also
|
|
29 globally unique (provided no hash collision occurs, which is highly
|
|
30 improbable).
|
|
31
|
|
32 The patient-level identifiers are *not* guaranteed to be globally
|
|
33 unique, and might collide between different hospitals. For this
|
|
34 reason, you should **always do queries at the study level** as soon as
|
|
35 you deal with an application that handles patients from different
|
|
36 hospitals.
|
|
37
|
|
38 The actual implementation of the hashing is carried on by the
|
|
39 `DicomInstanceHasher class
|
|
40 <https://bitbucket.org/sjodogne/orthanc/src/default/Core/DicomFormat/DicomInstanceHasher.cpp>`_.
|
|
41
|
|
42
|
|
43 The "Inexistent Tag" error
|
|
44 --------------------------
|
|
45
|
|
46 If you use an old version of Orthanc (< 0.7.4) and you receive the
|
|
47 "*Exception while storing DICOM: Inexistent tag*" error while storing
|
|
48 a DICOM instance into Orthanc, please make sure that all the 4
|
|
49 following tags do exist in the DICOM file:
|
|
50
|
|
51 * PatientID (0010,0020),
|
|
52 * StudyInstanceUID (0020,000d),
|
|
53 * SeriesInstanceUID (0020,000e),
|
|
54 * SOPInstanceUID (0008,0018).
|
|
55
|
|
56 These tags are all used to index the incoming DICOM instances. The
|
|
57 error message is more explicit starting with Orthanc 0.7.4.
|