comparison Sphinx/source/users/rest.rst @ 314:5f0cd51d97c0

Normalize option in /modalities/.../query
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Feb 2020 09:31:21 +0100
parents 8e97e0524e16
children 48673b8abae3
comparison
equal deleted inserted replaced
313:8e97e0524e16 314:5f0cd51d97c0
395 Configuration 395 Configuration
396 ^^^^^^^^^^^^^ 396 ^^^^^^^^^^^^^
397 397
398 .. highlight:: json 398 .. highlight:: json
399 399
400 You first have to declare the Url of the remote orthanc inside the :ref:`configuration file 400 You first have to declare the Url of the remote orthanc inside the
401 <configuration>`. For instance, here is how to declare a remote 401 :ref:`configuration file <configuration>`. For instance, here is how
402 orthanc peer:: 402 to declare a remote orthanc peer::
403 403
404 ... 404 ...
405 "Peers" : { 405 "Peers" : {
406 "sample" : [ "http://localhost:8043" ], // short version 406 "sample" : [ "http://localhost:8043" ], // short version
407 "sample2" : { // long version 407 "sample2" : { // long version
630 630
631 $ curl --request POST \ 631 $ curl --request POST \
632 --url http://localhost:8042/modalities/sample/query \ 632 --url http://localhost:8042/modalities/sample/query \
633 --data '{"Level":"Study","Query": {"PatientID":"","StudyDescription":"*Chest*","PatientName":""}}' 633 --data '{"Level":"Study","Query": {"PatientID":"","StudyDescription":"*Chest*","PatientName":""}}'
634 634
635 You might be interested in including the ``Normalize`` option to bypass
636 the normalization of the outgoing C-FIND queries. For instance, for
637 the ``InstitutionName`` to be included at the ``Study`` level, one would
638 run::
639
640 $ curl -v http://localhost:8042/modalities/sample/query -X POST -d \
641 '{"Level":"Study","Query":{"InstitutionName":"a"},"Normalize":false}'
635 642
636 .. highlight:: json 643 .. highlight:: json
637 644
638 You will receive back an ID which can be used to retrieve more 645 You will receive back an ID which can be used to retrieve more
639 information with GET commands or C-Move requests with a POST Command:: 646 information with GET commands or C-Move requests with a POST Command::
647 Additional Options 654 Additional Options
648 ^^^^^^^^^^^^^^^^^^ 655 ^^^^^^^^^^^^^^^^^^
649 656
650 .. highlight:: json 657 .. highlight:: json
651 658
652 You can use patient identifiers by including the `*` within your 659 You can use patient identifiers by including the ``*`` within your
653 search. For example if you were searching for a name beginning with 660 search. For example if you were searching for a name beginning with
654 `Jones` you can do:: 661 ``Jones`` you can do::
655 662
656 "PatientName":"Jones*" 663 "PatientName":"Jones*"
657 664
658 If you wanted to search for a name with the words `Jo` anywhere within 665 If you wanted to search for a name with the words ``Jo`` anywhere
659 it you can do:: 666 within it you can do::
660 667
661 "PatientName":"*Jo*" 668 "PatientName":"*Jo*"
662 669
663 To perform date searches you can specify within StudyDate a starting 670 To perform date searches you can specify within StudyDate a starting
664 date and/or a before date. For example ``"StudyDate":"20180323-"`` 671 date and/or a before date. For example ``"StudyDate":"20180323-"``
721 $ curl --request GET --url http://localhost:8042/queries/5af318ac-78fb-47ff-b0b0-0df18b0588e0/answers/0/content 728 $ curl --request GET --url http://localhost:8042/queries/5af318ac-78fb-47ff-b0b0-0df18b0588e0/answers/0/content
722 729
723 If there are content items missing, you may add them by adding that 730 If there are content items missing, you may add them by adding that
724 identifier to the original query. For example if we wanted Modalities 731 identifier to the original query. For example if we wanted Modalities
725 listed in this JSON answer in the initial query we would add to the 732 listed in this JSON answer in the initial query we would add to the
726 POST body: `"ModalitiesInStudy":""` 733 POST body: ``"ModalitiesInStudy":""``
727 734
728 735
729 Performing Retrieve (C-Move) 736 Performing Retrieve (C-Move)
730 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 737 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
731 738