# HG changeset patch # User Alain Mazy # Date 1573723711 -3600 # Node ID 829ce317d215b2a02bc26c01210459862f094269 # Parent 6cbcdb965ad3b24e19f85a477004380d313e9772 added sample for /modify for sequences and binary fields diff -r 6cbcdb965ad3 -r 829ce317d215 Sphinx/buildWidthDockerForWindows.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sphinx/buildWidthDockerForWindows.bat Thu Nov 14 10:28:31 2019 +0100 @@ -0,0 +1,4 @@ +docker rm orthanc-book-builder-container +docker build -t orthanc-book-builder . +docker run --name=orthanc-book-builder-container orthanc-book-builder +docker cp orthanc-book-builder-container:/app/build . \ No newline at end of file diff -r 6cbcdb965ad3 -r 829ce317d215 Sphinx/source/users/anonymization.rst --- 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 ---------------------------------