changeset 137:68380637c215

Merged in bryandearlove/orthanc-book/bryandearlove/added-find-information-to-performing-que-1523454574665 (pull request #4) Added find information to: Performing Query/Retrieve and Find with REST
author Sébastien Jodogne <s.jodogne@gmail.com>
date Tue, 24 Apr 2018 18:29:49 +0000
parents 0691978ee3d9 (current diff) 8e08909ab69b (diff)
children f3127d33cf5e
files
diffstat 1 files changed, 35 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/users/rest.rst	Wed Apr 18 15:08:59 2018 +0200
+++ b/Sphinx/source/users/rest.rst	Tue Apr 24 18:29:49 2018 +0000
@@ -306,7 +306,7 @@
 you would find the Patient Name of the instance::
 
     $ curl http://localhost:8042/instances/e668dcbf-8829a100-c0bd203b-41e404d9-c533f3d4/content/0010-0010
-    Anonymous^Unknown 
+    Anonymous^Unknown
 
 The list of all the available tags for this instance can also be retrieved easily::
 
@@ -414,7 +414,7 @@
    <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Python/HighPerformanceAutoRouting.py>`__.
 
 
-Performing Query/Retrieve with REST
+Performing Query/Retrieve and Find with REST
 -----------------------------------
 
 *Section contributed by Bryan Dearlove*
@@ -427,10 +427,10 @@
 Configuration section under Sending resources to remote modalities).
 
 
-Performing a Query on a Remote Modality
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. highlight:: bash
 
-.. highlight:: bash
+Performing Queries on Modalities
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 To initiate a query you perform a POST command against the Modality
 with the identifiers you are looking for. The the example below we are
@@ -446,16 +446,16 @@
 
 .. highlight:: json
 
-You will receive back an ID which can be used to retrieve more information with GET commands or C-Move requests with a POST Command:: 
+You will receive back an ID which can be used to retrieve more information with GET commands or C-Move requests with a POST Command::
 
      {
      	"ID": "5af318ac-78fb-47ff-b0b0-0df18b0588e0",
      	"Path": "/queries/5af318ac-78fb-47ff-b0b0-0df18b0588e0"
      }
 
-     
-Additional Query Options
-^^^^^^^^^^^^^^^^^^^^^^^^
+
+Additional Options
+^^^^^^^^^^^^^^^^^^
 
 .. highlight:: json
 
@@ -463,13 +463,17 @@
 search. For example if you were searching for a name beginning with
 `Jones` you can do::
 
-  "PatientName":"Jones*". 
+  "PatientName":"Jones*".
 
 If you wanted to search for a name with the words `Jo` anywhere within
 it you can do::
 
  "PatientName":"*Jo*".
 
+ To perform date searches you can specify within StudyDate a starting date and/or
+ a before date. For example "StudyDate":"20180323-" would search for all study dates after the specified date to now.
+ Doing "StudyDate":"20180323-20180325" would search for all study dates between the specified date.
+
 
 Reviewing Level
 ^^^^^^^^^^^^^^^
@@ -482,7 +486,7 @@
 
 Will retrieve the level with which the query was performed, Study,
 Series or Instance.
- 
+
 
 Reviewing Modality
 ^^^^^^^^^^^^^^^^^^
@@ -493,7 +497,7 @@
 
    $ curl --request GET --url http://localhost:8042/queries/5af318ac-78fb-47ff-b0b0-0df18b0588e0/modality
 
-Will provide the modality name which the original query was performed against. 
+Will provide the modality name which the original query was performed against.
 
 
 Reviewing Query
@@ -506,7 +510,7 @@
 
   $ curl --request GET --url http://localhost:8042/queries/5af318ac-78fb-47ff-b0b0-0df18b0588e0/query
 
-  
+
 Reviewing Query Answers
 ^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -546,6 +550,24 @@
 
   $ curl --request POST --url http://localhost:8042/queries/5af318ac-78fb-47ff-b0b0-0df18b0588e0/answers/0/retrieve --data Orthanc
 
+Performing Finds within Orthanc
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. highlight:: bash
+
+Performing a find within Orthanc is very similar to using Queries against DICOM modalities and the additional options listed above work with find also.
+When performing a find, you will receive the Orthanc ID's of all the matched items within your find. For example if you perform a study level find and 5 Studies
+match you will receive 5 study level Orthanc ID's in JSON format as a response::
+
+$ curl --request POST --url http://localhost:8042/tools/find --data '{"Level":"Instance","Query":{"Modality":"CR","StudyDate":"20180323-","PatientID":"*"}}'
+
+Additional Options
+^^^^^^^^^^^^^^^^^^
+.. highlight:: bash
+
+You also have the ability to limit the responses by specifying a limit within the body of the POST message. For example::
+
+"Limit":4
+
 
 Tracking changes
 ----------------