annotate Sphinx/source/plugins/worklists-plugin.rst @ 101:3e78daa774df

typo
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Jun 2017 16:34:27 +0200
parents e83da2f99e45
children a4f392011021
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
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
15 <http://support.dcmtk.org/docs/wlmscpfs.html>`__.
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
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
20 <http://support.dcmtk.org/docs/dump2dcm.html>`__ to generate such
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
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
29 <https://bitbucket.org/sjodogne/orthanc/src/default/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",
101
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 99
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.
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
57 }
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 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
61 Orthanc
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
62 <https://bitbucket.org/sjodogne/orthanc/src/default/Plugins/Samples/ModalityWorklists/>`__
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
63 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
64 source distribution, as described in the `FAQ entry #37 of the DCMTK
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
65 project <http://forum.dcmtk.org/viewtopic.php?t=84>`__.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
66
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 Tutorial
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
69 --------
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
70
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
71 .. 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
72
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
73 - Download `DCMTK utilities
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
74 <http://dicom.offis.de/download/dcmtk/release/bin/>`__.
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
75 - Download sample `worklist files
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
76 <https://bitbucket.org/sjodogne/orthanc/src/default/Plugins/Samples/ModalityWorklists/>`__
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
77 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
78 - 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
79 - 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
80
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
81 "Worklists" : {
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
82 "Enable": true,
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
83 "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
84 },
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
85
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
86 - 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
87 for Microsoft Windows)::
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
88
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
89 "Plugins" : [
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
90 "OsimisWebViewer.dll",
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
91 "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
92 ],
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
93
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
94 - 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
95 from the `DCMTK utilities
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
96 <http://support.dcmtk.org/docs/findscu.html>`__. Assuming
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
97 ``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
98 ``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
99 know modalities::
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
100
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
101 "DicomModalities" : {
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
102 "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
103 "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
104 },
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 .. highlight:: bash
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
107
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
108 - 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
109 configuration file (e.g. for Microsoft Windows)::
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
110
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
111 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
112
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
113 - 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
114 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
115
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
116 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
117
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
118 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
119 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
120 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
121 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
122
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
123 - ``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
124
24
25fa874803ab plugins inside book
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
126 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
127 -----------------------------
31
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
128
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
129 .. highlight:: bash
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
130
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
131 - 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
132 found in the `Orthanc source distribution
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
133 <https://bitbucket.org/sjodogne/orthanc/src/default/Plugins/Samples/ModalityWorklists/WorklistsDatabase/>`__
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
134 (with ``.wl`` file extensions).
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
135 - 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
136 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
137
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
138 dcmdump.exe wklist1.wl > sampleWorklist.txt
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
139
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
140 - 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
141 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
142
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
143 # 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
144
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
145 # 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
146 # 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
147 (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
148 (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
149 (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
150 (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
151 (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
152 (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
153 (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
154
93bbfaf0e62c worklist instructions migrated to a specific page, indexing of Osimis Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
155 # 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
156 # 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
157 (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
158 (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
159 (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
160 (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
161 (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
162 (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
163 (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
164 (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
165 (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
166 (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
167 (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
168 (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
169 (0040,1003) SH [LOW] # 4, 1 RequestedProcedurePriority
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
170
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
171 - 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
172 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
173 - 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
174 ``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
175
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
176 dump2dcm.exe sampleWorklist.txt newWorklist.wl
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
177
64
a3df3c2b68cf import the documentation of the Worklists sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 42
diff changeset
178 - 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
179 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
180 can be automated using any scripting language.
99
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
181
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
182 Troubleshooting C-Find queries
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
183 ------------------------------
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 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
186 Therefore, it is usually convenient to mimic the modality with ``findscu`` (provided by `DCMTK software
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
187 <http://support.dcmtk.org/docs/wlmscpfs.html>`__).
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
188
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
189 - 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
190 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
191
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
192 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
193
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
194 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
195
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
196 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
197
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
198 ``findscu`` should output something like this::
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
199
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
200 W: ---------------------------
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
201 W: Find Response: 1 (Pending)
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
202 W:
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
203 W: # Dicom-Data-Set
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
204 W: # Used TransferSyntax: Little Endian Explicit
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
205 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
206 W: (0008,0050) SH [**********] # 10, 1 AccessionNumber
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
207 W:
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
208
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
209 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
210
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
211 - 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
212 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
213
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
214 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
215 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
216 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
217 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
218 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
219 {
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
220 "0008,0050" : "*"
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
221 }
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
222 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
223 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
224
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
225 - 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
226 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
227
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
228 Common problems
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
229 ---------------
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 - Some modalities do not include their AET name in ``ScheduledStationAETitle``. Therefore, they do receive worklists that do not concern them.
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
232 This may be handled by the ``FilterIssuerAet`` configuration option.
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
233
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
234 - Orthanc 1.2.0 does not handle the ``Generic group length`` tags.
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
235 You might need to include this kind of :ref:`lua script <lua-fix-cfind>` to remove these tags from the queries::
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
236
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
237 function IncomingFindRequestFilter(query, origin)
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
238
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
239 -- First display the content of the C-Find query
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
240 PrintRecursive(query)
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
241 PrintRecursive(origin)
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
242
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
243 -- Remove the "Generic group length" tags from the query
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
244 local v = query
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
245 v['0008,0000'] = nil
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
246 v['0010,0000'] = nil
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
247 v['0020,0000'] = nil
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
248 return v
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
249
e83da2f99e45 added 'troubleshooting C-Find queries' in the worklist section
amazy
parents: 84
diff changeset
250 end