Mercurial > hg > orthanc-book
diff 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 |
line wrap: on
line diff
--- a/Sphinx/source/users/anonymization.rst Wed Oct 16 15:13:27 2019 +0200 +++ b/Sphinx/source/users/anonymization.rst Thu Nov 14 10:28:31 2019 +0100 @@ -37,7 +37,8 @@ * ``Replace`` is an associative array that associates a DICOM tag with its new string value. The value is dynamically cast to the proper DICOM data type (an HTTP error will occur if the cast fails). Replacements - are applied after all the tags to anonymize have been removed. + are applied after all the tags to anonymize have been removed. + You may also use the ``Replace`` field to add new tags to the file. * ``Keep`` specifies a list of tags that should be preserved from full anonymization. * If ``KeepPrivateTags`` is set to ``true`` in the JSON request, @@ -74,7 +75,35 @@ ``SeriesInstanceUID``, and ``SOPInstanceUID`` requires ``Force`` to be set to ``true``, in order to prevent any unwanted side effect. +.. highlight:: json +* To replace a sequence of tags, you may use this syntax:: + + + { + "Replace" : { + "ProcedureCodeSequence" : [ + { + "CodeValue" : "2", + "CodingSchemeDesignator" : "1", + "CodeMeaning": "1" + } + ] + } + } + +* To replace a binary tag, you should encode it in base64 and use:: + + { + "Replace" : { + "EncryptedAttributesSequence" : [ + { + "EncryptedContentTransferSyntaxUID" : "1.2.840.10008.1.2", + "EncryptedContent" : "data:application/octet-stream;base64,SSB3YXMgaGVyZSBpbiAyMDE5LiAgTWFydHkgTWNGbHku" + } + ] + } + } Modification of Studies or Series ---------------------------------