comparison Sphinx/source/users/anonymization.rst @ 291:829ce317d215

added sample for /modify for sequences and binary fields
author Alain Mazy <alain@mazy.be>
date Thu, 14 Nov 2019 10:28:31 +0100
parents 02399e86f046
children 22d567933381
comparison
equal deleted inserted replaced
290:6cbcdb965ad3 291:829ce317d215
35 (``PatientName``) or by their hexadecimal identifier (in the example 35 (``PatientName``) or by their hexadecimal identifier (in the example
36 above, ``0010-1001`` corresponds to ``Other Patient Names``). 36 above, ``0010-1001`` corresponds to ``Other Patient Names``).
37 * ``Replace`` is an associative array that associates a DICOM tag with its 37 * ``Replace`` is an associative array that associates a DICOM tag with its
38 new string value. The value is dynamically cast to the proper DICOM 38 new string value. The value is dynamically cast to the proper DICOM
39 data type (an HTTP error will occur if the cast fails). Replacements 39 data type (an HTTP error will occur if the cast fails). Replacements
40 are applied after all the tags to anonymize have been removed. 40 are applied after all the tags to anonymize have been removed.
41 You may also use the ``Replace`` field to add new tags to the file.
41 * ``Keep`` specifies a list of tags that should be preserved from full 42 * ``Keep`` specifies a list of tags that should be preserved from full
42 anonymization. 43 anonymization.
43 * If ``KeepPrivateTags`` is set to ``true`` in the JSON request, 44 * If ``KeepPrivateTags`` is set to ``true`` in the JSON request,
44 private tags (i.e. manufacturer-specific tags) are not removed by 45 private tags (i.e. manufacturer-specific tags) are not removed by
45 the anonymization process. The default behavior consists in removing 46 the anonymization process. The default behavior consists in removing
72 the DICOM model of the real-world. In general, any explicit 73 the DICOM model of the real-world. In general, any explicit
73 modification to one of the ``PatientID``, ``StudyInstanceUID``, 74 modification to one of the ``PatientID``, ``StudyInstanceUID``,
74 ``SeriesInstanceUID``, and ``SOPInstanceUID`` requires ``Force`` to 75 ``SeriesInstanceUID``, and ``SOPInstanceUID`` requires ``Force`` to
75 be set to ``true``, in order to prevent any unwanted side effect. 76 be set to ``true``, in order to prevent any unwanted side effect.
76 77
77 78 .. highlight:: json
79
80 * To replace a sequence of tags, you may use this syntax::
81
82
83 {
84 "Replace" : {
85 "ProcedureCodeSequence" : [
86 {
87 "CodeValue" : "2",
88 "CodingSchemeDesignator" : "1",
89 "CodeMeaning": "1"
90 }
91 ]
92 }
93 }
94
95 * To replace a binary tag, you should encode it in base64 and use::
96
97 {
98 "Replace" : {
99 "EncryptedAttributesSequence" : [
100 {
101 "EncryptedContentTransferSyntaxUID" : "1.2.840.10008.1.2",
102 "EncryptedContent" : "data:application/octet-stream;base64,SSB3YXMgaGVyZSBpbiAyMDE5LiAgTWFydHkgTWNGbHku"
103 }
104 ]
105 }
106 }
78 Modification of Studies or Series 107 Modification of Studies or Series
79 --------------------------------- 108 ---------------------------------
80 109
81 .. highlight:: bash 110 .. highlight:: bash
82 111