annotate Sphinx/source/users/anonymization.rst @ 530:63d59fab98e2

webdav on windows server 2012
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 19 Oct 2020 18:17:34 +0200
parents 06521ac2c14a
children fcd2c2b66297
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 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 .. _anonymization:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 Anonymization and modification
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
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 .. contents::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 :depth: 2
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 Orthanc 0.5.0 introduces the anonymization of DICOM resources
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 (i.e. patients, studies, series or instances). This page summarizes
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 how to use this feature.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 Anonymization of a Single Instance
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 ----------------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 Orthanc allows to anonymize a single DICOM instance and to download
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 the resulting anonymized DICOM file. Anonymization consists in erasing
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 all the tags that are specified in Table E.1-1 from PS 3.15 of the
111
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
21 DICOM standard 2008 or 2017c (default). Example::
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 $ curl http://localhost:8042/instances/6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f/anonymize -X POST -d '{}' > Anonymized.dcm
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 It is possible to control how anonymization is achieved by specifying
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 a JSON body::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
444
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
28 $ curl http://localhost:8042/instances/6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f/anonymize -X POST \
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
29 --data '{
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
30 "Replace": {
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
31 "PatientName": "Hello",
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
32 "0010-1001": "World"
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
33 },
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
34 "Keep": [
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
35 "StudyDescription",
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
36 "SeriesDescription"
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
37 ],
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
38 "KeepPrivateTags": true,
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
39 "DicomVersion" : "2017c"
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
40 }' > Anonymized.dcm
0
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 Explanations:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 * New UUIDs are automatically generated for the study, the series and
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 the instance.
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
46 * The DICOM tags can be specified either by their name
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
47 (``PatientName``) or by their hexadecimal identifier (in the example
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
48 above, ``0010-1001`` corresponds to ``Other Patient Names``).
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 * ``Replace`` is an associative array that associates a DICOM tag with its
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 new string value. The value is dynamically cast to the proper DICOM
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 data type (an HTTP error will occur if the cast fails). Replacements
291
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
52 are applied after all the tags to anonymize have been removed.
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
53 You may also use the ``Replace`` field to add new tags to the file.
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 * ``Keep`` specifies a list of tags that should be preserved from full
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 anonymization.
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
56 * If ``KeepPrivateTags`` is set to ``true`` in the JSON request,
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
57 private tags (i.e. manufacturer-specific tags) are not removed by
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
58 the anonymization process. The default behavior consists in removing
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
59 the private tags, as such tags can contain patient-specific
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 information.
111
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
61 * ``DicomVersion`` specifies which version of the DICOM standard shall be used
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
62 for anonymization. Allowed values are ``2008`` and ``2017c`` (default value
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
63 if the parameter is absent). This parameter has been introduced in Orthanc
eaec5029ef01 DicomVersion
amazy
parents: 0
diff changeset
64 1.3.0. In earlier version, the ``2008`` standard was used.
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 Modification of a Single Instance
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 ---------------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 Orthanc allows to modify a set of specified tags in a single DICOM
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 instance and to download the resulting anonymized DICOM
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 file. Example::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73
444
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
74 $ curl -X POST http://localhost:8042/instances/6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f/modify \
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
75 --data '{
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
76 "Replace": {
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
77 "PatientName":"hello",
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
78 "PatientID":"world"
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
79 },
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
80 "Remove":[
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
81 "InstitutionName"
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
82 ],
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
83 "RemovePrivateTags": true,
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
84 "Force": true,
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
85 "Transcode": "1.2.840.10008.1.2.4.70"
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
86 }' > Modified.dcm
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 Remarks:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 * The ``Remove`` array specifies the list of the tags to remove.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 * The ``Replace`` associative array specifies the substitions to be applied (cf. anonymization).
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
92 * If ``RemovePrivateTags`` is set to ``true``, the private tags
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
93 (i.e. manufacturer-specific tags) are removed.
444
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
94 * The ``Transcode`` option allows you to define the TransferSyntax
06521ac2c14a transcode info
Alain Mazy <alain@mazy.be>
parents: 331
diff changeset
95 of the modified file.
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
96 * The ``Force`` option must be set to ``true``, in order to allow the
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
97 modification of the ``PatientID``, as such a modification of the
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
98 :ref:`DICOM identifiers <dicom-identifiers>` might lead to breaking
113
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 112
diff changeset
99 the DICOM model of the real-world. In general, any explicit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 112
diff changeset
100 modification to one of the ``PatientID``, ``StudyInstanceUID``,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 112
diff changeset
101 ``SeriesInstanceUID``, and ``SOPInstanceUID`` requires ``Force`` to
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 112
diff changeset
102 be set to ``true``, in order to prevent any unwanted side effect.
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
291
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
104 .. highlight:: json
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
291
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
106 * To replace a sequence of tags, you may use this syntax::
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
107
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
108
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
109 {
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
110 "Replace" : {
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
111 "ProcedureCodeSequence" : [
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
112 {
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
113 "CodeValue" : "2",
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
114 "CodingSchemeDesignator" : "1",
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
115 "CodeMeaning": "1"
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
116 }
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
117 ]
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
118 }
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
119 }
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
120
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
121 * To replace a binary tag, you should encode it in base64 and use::
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
122
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
123 {
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
124 "Replace" : {
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
125 "EncryptedAttributesSequence" : [
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
126 {
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
127 "EncryptedContentTransferSyntaxUID" : "1.2.840.10008.1.2",
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
128 "EncryptedContent" : "data:application/octet-stream;base64,SSB3YXMgaGVyZSBpbiAyMDE5LiAgTWFydHkgTWNGbHku"
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
129 }
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
130 ]
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
131 }
829ce317d215 added sample for /modify for sequences and binary fields
Alain Mazy <alain@mazy.be>
parents: 224
diff changeset
132 }
300
22d567933381 tutorials about plugins by Marco Barnig
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 291
diff changeset
133
331
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
134 .. _study-modification:
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 300
diff changeset
135
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 Modification of Studies or Series
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 ---------------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 It is possible to modify all the instances from a study or from a
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 series in a single request. In this case, the modified instances are
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 stored back into the Orthanc store. Here is how to modify a series::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 $ curl http://localhost:8042/series/95a6e2bf-9296e2cc-bf614e2f-22b391ee-16e010e0/modify -X POST -d '{"Replace":{"InstitutionName":"My own clinic"}}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 .. highlight:: json
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 The parameters are identical to those used to modify a single
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 instance. Orthanc will answer a JSON message that tells where the
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 modified series has been stored::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 {
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 "ID" : "3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 "Path" : "/series/3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce"
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 }
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 Similarly, here is an interaction to modify a study::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 $ curl http://localhost:8042/studies/ef2ce55f-9342856a-aee23907-2667e859-9f3b734d/modify -X POST -d '{"Replace":{"InstitutionName":"My own clinic"}}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 .. highlight:: json
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 ::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 {
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 "ID" : "1c3f7bf4-85b4aa20-236e6315-5d450dcc-3c1bcf28",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 "Path" : "/studies/1c3f7bf4-85b4aa20-236e6315-5d450dcc-3c1bcf28"
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 }
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 Modification of Patients
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 ------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 Starting with Orthanc 0.7.5, Orthanc can also modify all the instances
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 of a patient with a single REST call. Here is a sample::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183
112
6d357adfd892 updates for the new 1.3.0 API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
184 $ curl http://localhost:8042/patients/6fb47ef5-072f4557-3215aa29-f99515c1-6fa22bf0/modify -X POST -d '{"Replace":{"PatientID":"Hello","PatientName":"Sample patient name"},"Force":true}'
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 .. highlight:: json
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 ::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 {
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 "ID" : "f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 "Path" : "/patients/f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 "PatientID" : "f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0",
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 "Type" : "Patient"
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 }
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 Please note that, in this case, you have to set the value of the
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 ``PatientID (0010,0020)`` tag for Orthanc to accept this modification:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 This is a security to prevent the merging of patient data before and
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 after anonymization, if the user does not explicitly tell Orthanc to
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 do so.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 Anonymization of Patients, Studies or Series
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 --------------------------------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 .. highlight:: bash
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 Study and series can be anonymized the same way as they are modified::
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 $ curl http://localhost:8042/patients/6fb47ef5-072f4557-3215aa29-f99515c1-6fa22bf0/anonymize -X POST -d '{}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 $ curl http://localhost:8042/studies/ef2ce55f-9342856a-aee23907-2667e859-9f3b734d/anonymize -X POST -d '{}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 $ curl http://localhost:8042/series/95a6e2bf-9296e2cc-bf614e2f-22b391ee-16e010e0/anonymize -X POST -d '{}'
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 As written above, the anonymization process can be fine-tuned by using
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 a JSON body.
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
217
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
218
224
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
219 .. _split-merge:
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
220
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
221 Split/merge of DICOM studies
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
222 ----------------------------
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
223
178
981e5a996b11 Orthanc 1.5.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 167
diff changeset
224 Starting with Orthanc 1.5.0, Orthanc supports splitting and merging
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
225 DICOM studies through its REST API.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
226
224
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
227 .. _split:
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
228
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
229 Splitting
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
230 ^^^^^^^^^
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
231
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
232 Here is the syntax to **split** a DICOM study::
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
233
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
234 $ curl http://localhost:8042/studies/6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12/split -d \
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
235 '{"Series":["6ca4c9f3-5e895cb3-4d82c6da-09e060fe-9c59f228"],"Replace":{"PatientName":"HELLO"},"Remove":["AccessionNumber"]}'
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
236
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
237 By issuing this command, the series whose :ref:`Orthanc identifier
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
238 <dicom-identifiers>` is
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
239 ``6ca4c9f3-5e895cb3-4d82c6da-09e060fe-9c59f228``, and that is part of
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
240 the source study with identifier
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
241 ``6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12``, will be removed from
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
242 the source study, and will be moved to a brand new study.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
243
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
244 This is done by generating a new value for all the following DICOM
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
245 tags in the DICOM instances of the series of interest:
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
246 ``StudyInstanceUID (0x0020, 0x000d)``, ``SeriesInstanceUID (0x0020,
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
247 0x000e)``, and ``SOPInstanceUID (0x0008, 0x0018)``. Here are the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
248 arguments of this ``/studies/{study}/split`` URI:
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
249
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
250 * ``Series`` gives the list of series to be separated from the parent
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
251 study (mandatory option). These series must all be children of the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
252 same source study, that is specified in the URI.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
253 * ``Replace`` allows to overwrite the DICOM tags that are part of the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
254 "Patient Module Attributes" and the "General Study Module
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
255 Attributes", as specified by the DICOM 2011 standard in Tables C.7-1
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
256 and C.7-3.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
257 * ``Remove`` allows to remove DICOM tags from the same modules as in
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
258 the ``Replace`` options.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
259 * ``KeepSource`` (Boolean value), if set to ``true``, instructs
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
260 Orthanc to keep a copy of the original series in the source study.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
261 By default, the original series are deleted from Orthanc.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
262
224
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
263 .. _merge:
167
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
264
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
265 Merging
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
266 ^^^^^^^
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
267
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
268 Here is the syntax to **merge** DICOM series, into another DICOM study::
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
269
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
270 $ curl http://localhost:8042/studies/6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12/merge -d \
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
271 '{"Resources":["ef2ce55f-9342856a-aee23907-2667e859-9f3b734d"]}'
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
272
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
273 By issuing this command, the DICOM series whose :ref:`Orthanc
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
274 identifier <dicom-identifiers>` is
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
275 ``ef2ce55f-9342856a-aee23907-2667e859-9f3b734d``, will be merged into
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
276 target study with identifier
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
277 ``6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12``.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
278
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
279 As in the case of splitting, this is done by updating the following
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
280 DICOM tags: ``StudyInstanceUID (0x0020, 0x000d)``, ``SeriesInstanceUID
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
281 (0x0020, 0x000e)``, and ``SOPInstanceUID (0x0008,
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
282 0x0018)``. Furthermore, all the DICOM tags that are part of the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
283 "Patient Module Attributes" and the "General Study Module Attributes"
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
284 (as specified by the DICOM 2011 standard in Tables C.7-1 and C.7-3),
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
285 are modified to match the target study. Here are the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
286 arguments of this ``/studies/{study}/merge`` URI:
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
287
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
288 * ``Resources`` gives the list of source studies or source series
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
289 that are to be merged into the target study.
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
290 * ``KeepSource`` (Boolean value), if set to ``true``, instructs
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
291 Orthanc to keep the source studies and series. By default, the
7ba16d90ed93 split/merge
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
292 original resources are deleted from Orthanc.