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