comparison Sphinx/source/plugins/python.rst @ 701:f093160dd7f4

cross-references regarding worklists
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 11 Jun 2021 09:30:28 +0200
parents 56a06ca9ec20
children 6e02cd89eb6a
comparison
equal deleted inserted replaced
700:56a06ca9ec20 701:f093160dd7f4
961 961
962 Handling worklist SCP requests (new in 3.2) 962 Handling worklist SCP requests (new in 3.2)
963 ........................................... 963 ...........................................
964 964
965 Starting with release 3.2 of the Python plugin, it is possible to 965 Starting with release 3.2 of the Python plugin, it is possible to
966 answer worklist queries using a Python script. This is especially 966 answer :ref:`worklist queries <worklist>` using a Python script. This
967 useful to create a bridge between Orthanc, HL7 messages and RIS 967 is especially useful to easily create a bridge between Orthanc,
968 systems. Indeed, Python provides many tools to handle HL7 such as 968 HL7/FHIR messages and RIS systems. Indeed, Python provides many tools
969 `python-hl7 library <https://python-hl7.readthedocs.io/en/latest/>`__. 969 to handle HL7 such as `python-hl7 library
970 <https://python-hl7.readthedocs.io/en/latest/>`__.
970 971
971 The following Python script reproduces features similar to the 972 The following Python script reproduces features similar to the
972 :ref:`sample modality worklists plugin <worklists-plugin>`: 973 :ref:`sample modality worklists plugin <worklists-plugin>`:
973 974
974 .. literalinclude:: python/worklist.py 975 .. literalinclude:: python/worklist.py
975 :language: python 976 :language: python
976 977
978 .. highlight:: text
979
980 Here is the result of this plugin on a sample call::
981
982 $ findscu -W -k "ScheduledProcedureStepSequence[0].Modality=MR" 127.0.0.1 4242
983 I: ---------------------------
984 I: Find Response: 1 (Pending)
985 I:
986 I: # Dicom-Data-Set
987 I: # Used TransferSyntax: Little Endian Explicit
988 I: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
989 I: (0040,0100) SQ (Sequence with explicit length #=1) # 18, 1 ScheduledProcedureStepSequence
990 I: (fffe,e000) na (Item with explicit length #=1) # 10, 1 Item
991 I: (0008,0060) CS [MR] # 2, 1 Modality
992 I: (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
993 I: (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
994 I:
995 I: ---------------------------
996 I: Find Response: 2 (Pending)
997 I:
998 I: # Dicom-Data-Set
999 I: # Used TransferSyntax: Little Endian Explicit
1000 I: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
1001 I: (0040,0100) SQ (Sequence with explicit length #=1) # 18, 1 ScheduledProcedureStepSequence
1002 I: (fffe,e000) na (Item with explicit length #=1) # 10, 1 Item
1003 I: (0008,0060) CS [MR] # 2, 1 Modality
1004 I: (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
1005 I: (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
1006 I:
1007
1008
977 1009
978 Performance and concurrency 1010 Performance and concurrency
979 --------------------------- 1011 ---------------------------
980 1012
981 **Important:** This section only applies to UNIX-like systems. The 1013 **Important:** This section only applies to UNIX-like systems. The