Mercurial > hg > orthanc-book
changeset 545:931052bd5a53
explain the "Parent" field in "/tools/create-dicom" for PDF
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 18 Nov 2020 11:25:04 +0100 |
parents | d7ec7ea133b8 |
children | 7c4ef4411992 |
files | Sphinx/source/users/advanced-rest.rst |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Sphinx/source/users/advanced-rest.rst Thu Nov 12 09:26:24 2020 +0100 +++ b/Sphinx/source/users/advanced-rest.rst Wed Nov 18 11:25:04 2020 +0100 @@ -217,12 +217,16 @@ They convert the ``HelloWorld2.pdf`` file to base64, then perform a ``POST`` request with JSON data containing the converted payload. +Importantly, the ``Parent`` field of the ``POST`` body can be set to +the :ref:`Orthanc identifier of some study <orthanc-ids>` in order to +attach the newly-created PDF series to the given parent study. + Using bash: .. code-block:: bash # create the json data, with the BASE64 data embedded in it - (echo -n '{"Tags" : {"PatientName" : "Benjamino", "Modality" : "CT"},"Content" : "data:application/pdf;base64,'; base64 HelloWorld2.pdf; echo '"}') > /tmp/foo + (echo -n '{"Parent": "b6e8436b-c5835b7b-cecc9576-0483e165-ab5c710b", "Tags" : {"Modality" : "CT"}, "Content" : "data:application/pdf;base64,'; base64 HelloWorld2.pdf; echo '"}') > /tmp/foo # upload it to Orthanc cat /tmp/foo | curl -H "Content-Type: application/json" -d @- http://localhost:8042/tools/create-dicom