annotate Sphinx/source/plugins/worklists-plugin.rst @ 485:4fff8fa6c2db

new option LimitAnswers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 17 Aug 2020 14:49:42 +0200
parents 2922fb1bd65e
children f093160dd7f4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24
25fa874803ab plugins inside book
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 .. _worklists-plugin:
25fa874803ab plugins inside book
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
25fa874803ab plugins inside book
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
4 Sample Modality Worklists plugin
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
5 ================================
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
6
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
7 This page describes the **official sample plugin** turning Orthanc
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
8 into a server of DICOM worklists. General information about how
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
9 Orthanc supports DICOM worklists through plugins is explained in the
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
10 :ref:`FAQ <worklist>`.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
11
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
12 The sample plugin will serve the worklists stored in some folder on
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
13 the filesystem. This mimics the behavior of the ``wlmscpfs``
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
14 command-line tool from the `DCMTK software
358
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
15 <https://support.dcmtk.org/docs/wlmscpfs.html>`__.
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
16
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
17 The worklists to be served must be put inside the folder of interest
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
18 by an external application or script (note: files must have a ``.wl`` extension). ``dump2dcm`` might be a very
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
19 `useful companion tool
358
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
20 <https://support.dcmtk.org/docs/dump2dcm.html>`__ to generate such
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
21 worklist files. Whenever a C-Find SCP request is issued to Orthanc,
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
22 the plugin will read the content of the folder of interest to locate
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
23 the worklists that match the request. As a consequence, the external
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
24 application can dynamically modify the content of this folder while
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
25 Orthanc is running to add/remove worklists.
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
26
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
27 The source code of this sample plugin is `available in the source
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
28 distribution of Orthanc
449
2922fb1bd65e fix links
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 360
diff changeset
29 <https://hg.orthanc-server.com/orthanc/file/default/OrthancServer/Plugins/Samples/ModalityWorklists/>`__
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
30 (GPLv3+ license).
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
32
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
33 Basic configuration
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
34 -------------------
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
35
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
36 .. highlight:: json
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
37
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
38 1. First, generate the :ref:`default configuration of Orthanc <configuration>`.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
39 2. Then, modify the ``Plugins`` option to point to the folder containing
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
40 the shared library of the plugin.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
41 3. Finally, create a section "ModalityWorklists" in the configuration
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
42 file to configure the worklist server.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
43
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
44 A basic configuration would read as follows::
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
45
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
46 {
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
47 [...]
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
48 "Plugins" : [
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
49 "."
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
50 ],
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
51 "Worklists" : {
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
52 "Enable": true,
83
468cb58b702a Worklist plugin: added description for FilterIssuerAet
Alain Mazy <alain@mazy.be>
parents: 64
diff changeset
53 "Database": "./WorklistsDatabase",
485
4fff8fa6c2db new option LimitAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 449
diff changeset
54 "FilterIssuerAet": false, // Some modalities do not specify 'ScheduledStationAETitle (0040,0001)'
83
468cb58b702a Worklist plugin: added description for FilterIssuerAet
Alain Mazy <alain@mazy.be>
parents: 64
diff changeset
55 // in the C-Find and may receive worklists not related to them. This option
468cb58b702a Worklist plugin: added description for FilterIssuerAet
Alain Mazy <alain@mazy.be>
parents: 64
diff changeset
56 // adds an extra filtering based on the AET of the modality issuing the C-Find.
485
4fff8fa6c2db new option LimitAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 449
diff changeset
57 "LimitAnswers": 0 // Maximum number of answers to be returned (new in release 1.7.3)
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
58 }
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
59 }
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
60
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
61 The folder ``WorklistsDatabase`` of the `source distribution of
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
62 Orthanc
449
2922fb1bd65e fix links
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 360
diff changeset
63 <https://hg.orthanc-server.com/orthanc/file/default/OrthancServer/Plugins/Samples/ModalityWorklists/>`__
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
64 contains a database of sample worklists, that comes from the DCMTK
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
65 source distribution, as described in the `FAQ entry #37 of the DCMTK
358
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
66 project <https://forum.dcmtk.org/viewtopic.php?t=84>`__.
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
67
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
68
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
69 Tutorial
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
70 --------
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
71
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
72 .. highlight:: javascript
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
73
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
74 - Download `DCMTK utilities
358
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
75 <https://dicom.offis.de/download/dcmtk/release/bin/>`__.
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
76 - Download sample `worklist files
449
2922fb1bd65e fix links
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 360
diff changeset
77 <https://hg.orthanc-server.com/orthanc/file/default/OrthancServer/Plugins/Samples/ModalityWorklists/>`__
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
78 from the Orthanc source code and copy them in a dedicated folder.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
79 - Generate the :ref:`default configuration of Orthanc <configuration>`.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
80 - Enable the ModalityWorklist plugin in your configuration file by adding this section::
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
81
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
82 "Worklists" : {
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
83 "Enable": true,
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
84 "Database": "WorklistsDatabase" // Path to the folder with the worklist files
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
85 },
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
86
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
87 - Add the plugin to the list of plugins to load (this is an example
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
88 for Microsoft Windows)::
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
89
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
90 "Plugins" : [
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
91 "OsimisWebViewer.dll",
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
92 "ModalityWorklists.dll" // On GNU/Linux, use libModalityWorklists.so
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
93 ],
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
94
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
95 - The tests below will be done using the ``findscu`` command-line tool
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
96 from the `DCMTK utilities
358
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
97 <https://support.dcmtk.org/docs/findscu.html>`__. Assuming
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
98 ``findscu`` and Orthanc runs on the same computer (i.e. on the
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
99 ``127.0.0.1`` localhost), declare the ``FINDSCU`` AET to the list of
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
100 know modalities::
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
101
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
102 "DicomModalities" : {
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
103 "horos" : [ "HOROS", "192.168.0.8", 11112 ],
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
104 "findscu" : [ "FINDSCU", "127.0.0.1", 1234 ]
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
105 },
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
106
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
107 .. highlight:: bash
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
108
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
109 - Launch Orthanc as usual, making sure to give the proper
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
110 configuration file (e.g. for Microsoft Windows)::
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
111
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
112 Orthanc.exe config.json
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
113
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
114 - In another command-line prompt, launch a ``findscu`` request to ask
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
115 Orthanc to return all worklists for ``CT`` modalities::
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
116
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
117 findscu -W -k "ScheduledProcedureStepSequence[0].Modality=CT" 127.0.0.1 4242
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
118
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
119 The ``-W`` option makes ``findscu`` issue a DICOM worklist query,
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
120 the ``-k`` option specifies the query of interest, ``127.0.0.1``
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
121 corresponds to the localhost, and ``4242`` corresponds to the
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
122 default DICOM TCP port of Orthanc.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
123
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
124 - ``findscu`` will display the matching worklists.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
125
24
25fa874803ab plugins inside book
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
127 How to create a worklist file
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
128 -----------------------------
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
129
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
130 .. highlight:: bash
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
131
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
132 - Start with an existing worklist file, some samples of which can be
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
133 found in the `Orthanc source distribution
449
2922fb1bd65e fix links
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 360
diff changeset
134 <https://hg.orthanc-server.com/orthanc/file/default/OrthancServer/Plugins/Samples/ModalityWorklists/WorklistsDatabase/>`__
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
135 (with ``.wl`` file extensions).
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
136 - The worklist file is a DICOM file. Dump its content as a text file
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
137 using ``dcmdump``::
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
138
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
139 dcmdump.exe wklist1.wl > sampleWorklist.txt
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
140
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
141 - The content of the just-generated ``sampleWorklist.txt`` file should
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
142 look similar to this text file::
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
143
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
144 # Dicom-File-Format
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
145
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
146 # Dicom-Meta-Information-Header
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
147 # Used TransferSyntax: Little Endian Explicit
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
148 (0002,0000) UL 202 # 4, 1 FileMetaInformationGroupLength
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
149 (0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
150 (0002,0002) UI [1.2.276.0.7230010.3.1.0.1] # 26, 1 MediaStorageSOPClassUID
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
151 (0002,0003) UI [1.2.276.0.7230010.3.1.4.2831176407.11154.1448031138.805061] # 58, 1 MediaStorageSOPInstanceUID
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
152 (0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
153 (0002,0012) UI [1.2.276.0.7230010.3.0.3.6.0] # 28, 1 ImplementationClassUID
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
154 (0002,0013) SH [OFFIS_DCMTK_360] # 16, 1 ImplementationVersionName
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
155
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
156 # Dicom-Data-Set
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
157 # Used TransferSyntax: Little Endian Explicit
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
158 (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
159 (0008,0050) SH [00000] # 6, 1 AccessionNumber
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
160 (0010,0010) PN [VIVALDI^ANTONIO] # 16, 1 PatientName
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
161 (0010,0020) LO [AV35674] # 8, 1 PatientID
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
162 (0010,0030) DA [16780304] # 8, 1 PatientBirthDate
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
163 (0010,0040) CS [M] # 2, 1 PatientSex
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
164 (0010,2000) LO [METASTASIS] # 10, 1 MedicalAlerts
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
165 (0010,2110) LO [TANTAL] # 6, 1 Allergies
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
166 (0020,000d) UI [1.2.276.0.7230010.3.2.101] # 26, 1 StudyInstanceUID
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
167 (0032,1032) PN [SMITH] # 6, 1 RequestingPhysician
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
168 (0032,1060) LO [EXAM6] # 6, 1 RequestedProcedureDescription
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
169 (0040,1001) SH [RP454G234] # 10, 1 RequestedProcedureID
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
170 (0040,1003) SH [LOW] # 4, 1 RequestedProcedurePriority
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
171
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
172 - Open ``sampleWorklist.txt`` file in a standard text editor so as to
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
173 modify, add or remove some DICOM tags depending on your needs.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
174 - Generate a new DICOM worklist file from your modified file using
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
175 ``dump2dcm``::
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
176
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
177 dump2dcm.exe sampleWorklist.txt newWorklist.wl
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
178
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
179 - As a last step, copy that file in the folder where Orthanc searches
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
180 for its worklist files. Of course, this worklist generation workflow
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
181 can be automated using any scripting language.
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
182
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
183 Troubleshooting C-Find queries
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
184 ------------------------------
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
185
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
186 When trying to retrieve worklists from a modality, one usually don't get debugging capabilities from the modality itself.
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
187 Therefore, it is usually convenient to mimic the modality with ``findscu`` (provided by `DCMTK software
358
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 165
diff changeset
188 <https://support.dcmtk.org/docs/wlmscpfs.html>`__).
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
189
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
190 - First, you should make sure that you have configured the Worklist plugin correctly and that you have pushed
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
191 at least a ``.wl`` file in the worklist database. For this, you should issue this kind of command::
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
192
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
193 findscu -W 127.0.0.1 4242 -k 0008,0050="*"
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
194
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
195 This is the most generic C-Find request and should return all AccessionNumber of all the worklists in your database.
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
196
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
197 Note: you should make sure you have added a ``findscu`` DICOM modality in your configuration file.
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
198
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
199 ``findscu`` should output something like this::
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
200
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
201 W: ---------------------------
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
202 W: Find Response: 1 (Pending)
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
203 W:
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
204 W: # Dicom-Data-Set
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
205 W: # Used TransferSyntax: Little Endian Explicit
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
206 W: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
207 W: (0008,0050) SH [**********] # 10, 1 AccessionNumber
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
208 W:
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
209
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
210 If you don't get any output, you may add ``-v -d`` options to the ``findscu`` command line to get additional details.
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
211
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
212 - Everytime it receives a C-Find request, Orthanc displays the query parameters in its :ref:`logs <log>`.
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
213 With the previous C-Find command, you should expect this kind of output::
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
214
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
215 I0422 17:16:03.512449 CommandDispatcher.cpp:490] Association Received from AET FINDSCU on IP 127.0.0.1
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
216 I0422 17:16:03.514433 CommandDispatcher.cpp:688] Association Acknowledged (Max Send PDV: 16372)
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
217 I0422 17:16:03.532062 main.cpp:118] No limit on the number of C-FIND results at the Patient, Study and Series levels
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
218 I0422 17:16:03.535986 main.cpp:128] No limit on the number of C-FIND results at the Instance level
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
219 I0422 17:16:03.536968 PluginsManager.cpp:171] Received worklist query from remote modality FINDSCU:
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
220 {
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
221 "0008,0050" : "*"
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
222 }
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
223 I0422 17:16:03.559539 CommandDispatcher.cpp:891] DUL Peer Requested Release
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
224 I0422 17:16:03.560520 CommandDispatcher.cpp:898] Association Release
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
225
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
226 - Now you may try to issue a C-Find request from your modality and check Orthanc logs. You should then have a better understanding of the query
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
227 content and eventually understand why it does not match your worklists. You should also be able re-issue ``findscu`` requests with additional arguments to mimic the requests issued by your modality.
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
228
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
229 Common problems
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
230 ---------------
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
231
165
b879a6274065 IncomingWorklistRequestFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 121
diff changeset
232 - C-FIND requests can be modified by implementing the
b879a6274065 IncomingWorklistRequestFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 121
diff changeset
233 ``IncomingWorklistRequestFilter`` :ref:`Lua callback
b879a6274065 IncomingWorklistRequestFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 121
diff changeset
234 <lua-fix-cfind>` since Orthanc 1.4.2. This can be useful to
b879a6274065 IncomingWorklistRequestFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 121
diff changeset
235 fix/sanitize worklist queries.
b879a6274065 IncomingWorklistRequestFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 121
diff changeset
236
119
a4f392011021 Added spec reference relevant to missing ScheduledStationAETitle.
Amos Onn <amos.onn@inducon.ag>
parents: 101
diff changeset
237 - According to the `specification
121
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 119
diff changeset
238 <http://dicom.nema.org/MEDICAL/Dicom/2015c/output/chtml/part02/sect_B.4.2.2.3.html>`__,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 119
diff changeset
239 modalities should not include their AET name in
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 119
diff changeset
240 ``ScheduledStationAETitle`` on user initiated queries. Therefore,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 119
diff changeset
241 they do receive worklists that do not concern them. This may be
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 119
diff changeset
242 handled by the ``FilterIssuerAet`` configuration option. Note that
165
b879a6274065 IncomingWorklistRequestFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 121
diff changeset
243 the default behavior might in some cases be intended.
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
244
165
b879a6274065 IncomingWorklistRequestFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 121
diff changeset
245 - Orthanc <= 1.4.1 might behave unexpectedly in the presence of
b879a6274065 IncomingWorklistRequestFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 121
diff changeset
246 ``Generic group length (0x????, 0x0000)`` tags. Please upgrade.