Mercurial > hg > orthanc-book
changeset 1119:6cc874fba817
extended find + changes
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Thu, 12 Dec 2024 10:50:18 +0100 |
parents | 981f74cb5f98 |
children | 3bd012947014 |
files | Sphinx/source/dicom-guide.rst Sphinx/source/users/rest.rst |
diffstat | 2 files changed, 64 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Sphinx/source/dicom-guide.rst Mon Dec 09 18:59:40 2024 +0100 +++ b/Sphinx/source/dicom-guide.rst Thu Dec 12 10:50:18 2024 +0100 @@ -667,7 +667,7 @@ *Note:* Orthanc only implements C-Get as a service class provider (SCP) since version 1.7.0. -Using C-Get as a service class user (SCU) is only supported in Orthanc since version 1.12.6 (not released yet). +Using C-Get as a service class user (SCU) will only be supported in Orthanc version 1.12.6 (not released yet). Using HTTP instead of the DICOM protocol
--- a/Sphinx/source/users/rest.rst Mon Dec 09 18:59:40 2024 +0100 +++ b/Sphinx/source/users/rest.rst Thu Dec 12 10:50:18 2024 +0100 @@ -840,7 +840,7 @@ }' -Performing C-Get (new in Orthanc 1.12.6) +Performing C-Get (coming in Orthanc 1.12.6) --------------------------------------- .. highlight:: bash @@ -883,8 +883,8 @@ -Performing Query/Retrieve (C-Find) and Find with REST ------------------------------------------------------ +Performing Query/Retrieve (C-Find) +---------------------------------- *Section contributed by Bryan Dearlove* @@ -1079,8 +1079,8 @@ -Performing Retrieve (with C-Get) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Performing Retrieve (with C-Get coming in Orthanc 1.12.6) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. highlight:: bash @@ -1120,8 +1120,9 @@ .. _rest-find: -Performing Finds within Orthanc -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Finding resources within Orthanc +-------------------------------- + .. highlight:: bash Performing a find within the local database of Orthanc is very similar @@ -1194,7 +1195,7 @@ $ curl -X POST http://localhost:8042/tools/find -d '{"Level":"Series","Query":{"DeviceSerialNumber":"123\\abc"},"Expand":true}' -Additional Options +Additional ``/tools/find`` options ^^^^^^^^^^^^^^^^^^ .. highlight:: json @@ -1251,6 +1252,47 @@ bring support for :ref:`labels <labels>`. +Additional ``/tools/find`` options (new in Orthanc 1.12.5) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. highlight:: bash + +Starting with Orthanc 1.12.5 and for DB backends supporting the ``ExtendedFind`` +extension (SQLite DB and PostgreSQL 7.0+), you also have the ability to +order the results, filter by metadata values and precisely define the content of the +response. Check the `API documentation <https://orthanc.uclouvain.be/api/index.html#tag/System/paths/~1tools~1find/post>`__ for full details. A full option call will look like:: + + $ curl -X POST http://localhost:8042/tools/find -d ' \ + { + "Level": "Studies", + "Query": { + "StudyDate": "20200101-" + }, + "MetadataQuery": { + "my-metadata": "value*" + }, + "OrderBy": [ + { + "Type": "DicomTag", + "Key": "StudyDate", + "Direction": "ASC" + }, + { + "Type": "Metadata", + "Key": "my-metadata", + "Direction": "DESC" + } + ], + "Labels": ["Toto", "Tutu"], + "LabelsConstraint": "Any", + "ParentPatient": "93034833-163e42c3-bc9a428b-194620cf-2c5799e5", + + "ResponseContent": ["MainDicomTags", "Metadata", "Children", "Labels", "Attachments"], + "RequestedTags": ["PatientName", "PatientID", "StudyDescription", "StudyDate", "StudyInstanceUID", "ModalitiesInStudy", "NumberOfStudyRelatedSeries"] + }' + + + .. _changes: Tracking changes @@ -1343,6 +1385,19 @@ <https://orthanc.uclouvain.be/hg/orthanc/file/default/OrthancServer/Resources/Samples/Python/ChangesLoop.py>`__ shows how to use this Changes API to implement a polling loop. +Additional ``/changes`` options (new in Orthanc 1.12.5) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. highlight:: bash + +Starting with Orthanc 1.12.5 and for DB backends supporting the ``ExtendedChanges`` +extension (SQLite DB and PostgreSQL 7.0+), you also have the ability to filter +the changes by type and to order them in reverse order. +Check the `API documentation <https://orthanc.uclouvain.be/api/index.html#tag/System/paths/~1changes/get>`__ for full details:: + + + $ curl 'http://localhost:8042/changes?type=StableStudy;NewPatient&to=7584&limit=100' + Deleting resources from Orthanc -------------------------------