How do I Use/Access the Orthanc Worklist Plugin?

3,078 views
Skip to first unread message

TM Co

unread,
Jun 20, 2021, 9:49:00 PM6/20/21
to Orthanc Users
Hi, I'm trying to using the worklist plugin for Orthanc, but I can't really find any documentation on it, so I don't really understand how I'm supposed to make worklists and actually view them in Orthanc. I was wondering if someone could point me in the right direction. I'm also using Orthanc in a docker container if that makes any difference. Thanks!

ja...@binary.com.au

unread,
Jun 20, 2021, 11:35:59 PM6/20/21
to Orthanc Users
Hi,

The documentation for the Orthanc Worklist plugin is https://book.orthanc-server.com/plugins/worklists-plugin.html

It also includes a tutorial on how to use the plugin.

The Osimis Orthanc image does contain the worklist plugin that can be enabled by setting the WORKLISTS_PLUGIN_ENABLED environment variable to true. 

James

Jorge Vidal

unread,
Jun 22, 2021, 10:58:28 AM6/22/21
to Orthanc Users
Hi, after making the correct configuration you should provide the files of each patient to the server, and the server will "serve" this files to the modality when requested. 

I made it work this way (in my case using php)
1) Made a php file to get the list of patients to include from the RIS
2) for each patient prepare one xml with all its data. To make it easy I made a template and just replace some fields with the ones I need. 
3) run xml2dcm for each xml in order to create de "wl" files
4) move those files to the directory inside the orthanc installation (which has been set in worklist.json)
5) You should configure the modality for requesting de worklist (port and ip)

I believe there is no way to check the worklist from the UI.  See the attached files as examples.
Hope this helps...
Jorge

tomo_wk1.wl
tomo_wk1.xml

Rénison Silva

unread,
Nov 30, 2022, 1:04:01 PM11/30/22
to Orthanc Users
Good afternoon, did you manage to solve it? I have the same problem

Stephen Douglas Scotti

unread,
Nov 30, 2022, 1:53:46 PM11/30/22
to Orthanc Users
The documentation in the book already mentioned isn't bad.  If you are going to be working with MWL's a lot you really should have some testing tools installed on your system as well, like:

1. dcmtk:  Open Source and multiplatform:  dcmtk
2. Multiple others depending on your platform, but dcmtk is probably good enough for most cases once you learn how to use it.
3. https://www.dvtk.org/ has a set of testing tools for Windows that are free with a registered account.

I have a repo that has some stuff for creating them via an API using some Python Plug-ins on GitHub (GitHub Repo), but the MWL generation is largely based on a pretty simple Python script that allows you to create MWL's from JSON using the DICOM short names and a JSON request.  I have attached a sample file for that and the generated .wl file with dummy values.

To get it to run you'll need python3 on your system, the pydicom PIP module and probably dcmtk for testing.  To run the script, just run 'python3 mwl_sample.py" from the working directory for that file and it will spit out the generated tags and save a .wl file as well called "MWL_TEST.wl".  To use it, you would have to create a template for your system and populate the tags from a RIS..

To check the tags in the .wl using dcmtk, just run 'dcmdump MWL_TEST.wl' and it will display a dump of the tags.  If you put that file in the worklist folder with the MWL plug-in enabled, then when Orthanc receives a MWL find request it will search the worklist folder and possibly display that requested tags from that file if there is a match.  If you want to use XML, a text file, etc. up to you, but I find JSON much more pleasant to deal with.  It isn't that hard to save them in a DB along with some other column for items that you want to Index on, possibly along with the JSON depending upon your DB.
 
That is useful if you want to use a Python Plug-in to do some more advanced handling of the MWL's.  See:  Handling worklist SCP requests in the Orthanc Book.

Regarding checking the MWL's via the API, I believe there is a way using a call like this:

orthanc.RestApiPost('/modalities/PACS1/find-worklist', json.dumps(tags))

using curl from the CLI, that would just be like:

curl -k -d '{"Modality": "MR","PatientID":"","ScheduledProcedureStepSequence": [{"Modality": "MR"}]}' localhost:8042/modalities/SELF/find-worklist

where SELF and PACS1 are defined as modalities in your orthanc.json.  FINDSCU is also often used for the name there.

Haven't tried that in awhile, but I think it works.  the dcmtk findscu works fine in most cases, unless you want to use an API from a WebApp for some reason.

Stephen D. Scotti
MWL_TEST.wl
mwl_sample.py
Reply all
Reply to author
Forward
0 new messages