Parameter out of range when querying Orthanc worklist

Hello.

I want to use Orthanc as a worklist server, so I am using the worklist tutorial here, but I’m unable to query the worklist files contents.

I set up the worklists plugin like this:

“Worklists”: {
“Enable”: true,
“Database”: “/root/worklists”,
“FilterIssuerAet”: false,
“LimitAnswers”: 0
}

I also set up the command line findscu as an authorized modality

“DicomModalities” : {
“findscu” : [ “FINDSCU”, “127.0.0.1”, 1234 ]
},

Then I put the .wl samples on the worklist folder, and created the following query via command line:

findscu -W -k “ScheduledProcedureStepSequence[0].Modality=CT” 127.0.0.1 4242

But it returns nothing and the Orthanc log says:

I0523 03:39:21.849196 CommandDispatcher.cpp:332] (dicom) Association Received from AET FINDSCU on IP 172.18.0.1
I0523 03:39:21.849315 main.cpp:311] Incoming connection from AET FINDSCU on IP 172.18.0.1, calling AET ANY-SCP
I0523 03:39:21.849432 CommandDispatcher.cpp:663] (dicom) Association Acknowledged (Max Send PDV: 16372) to AET FINDSCU on IP 172.18.0.1
I0523 03:39:21.852370 main.cpp:344] Incoming Find request from AET FINDSCU on IP 172.18.0.1, calling AET ANY-SCP
I0523 03:39:21.852435 main.cpp:232] No limit on the number of C-FIND results at the Patient, Study and Series levels
I0523 03:39:21.852443 main.cpp:242] No limit on the number of C-FIND results at the Instance level
I0523 03:39:21.852803 PluginsManager.cpp:172] (plugins) Received worklist query from remote modality FINDSCU:
{
“0040,0100” : [
{
“0008,0060” : “CT”
}
]
}

E0523 03:39:21.875355 PluginsManager.cpp:197] Exception while invoking plugin service 7000: Parameter out of range
E0523 03:39:21.875401 PluginsManager.cpp:164] Error while adding an answer to a worklist request
E0523 03:39:21.875595 FindScp.cpp:295] C-FIND request handler has failed: Parameter out of range
I0523 03:39:21.877284 CommandDispatcher.cpp:917] (dicom) Finishing association with AET FINDSCU on IP 172.18.0.1: DUL Peer Requested Release
I0523 03:39:21.877339 CommandDispatcher.cpp:925] (dicom) Association Release with AET FINDSCU on IP 172.18.0.1

And i don’t receive any results. The issue seems to be related to that “parameter out of range”. Does anyone know what could be the problem here?

I am using DCMTK 3.6.6 with Orthanc 1.9.3

Might have something to do with your Docker ? setup. You actually can make a worklist query using the REST API using something of the form:

curl -k -H “Authorization:Bearer xxx” -d ‘{“ScheduledProcedureStepSequence”: [{“Modality”: “MR”}]}’ http://localhost:8042/modalities/PACS1/find-worklist

where “PACS1” is the Orthanc Server configured as a modality. If you are using Docker, you might have to tweak that to point to the correct Host in your Docker containers. I’ve found using the REST API to be much more helpful and flexible while doing development, Not hard to build a little web-based GUI to make queries and return the find results as JSON. You can probably also configure findscu to return results in a similar manner, but I just added the Orthanc Server as a modality and query the worklist as above.

Stephen D. Scotti, M.D.

Hello Stephen! That was a very quick response!

Registering Orthanc itself as a modality to use the worklist API was a great idea. Thanks. Anyway, i used the API request, but it gives me the same error.

Here is the request body (the same you posted):

{
“ScheduledProcedureStepSequence”: [
{
“Modality”: “MR”
}
]
}

The request response:

{
“Details” : “C-FIND SCU to AET "CCR" has failed with DIMSE status 0xC000 (unable to process - invalid query ?)”,
“HttpError” : “Unprocessable Entity”,
“HttpStatus” : 422,
“Message” : “Error in the network protocol”,
“Method” : “POST”,
“OrthancError” : “Error in the network protocol”,
“OrthancStatus” : 9,
“Uri” : “/modalities/ccr/find-worklist”
}

And the Orthanc log:

I0523 04:41:50.884362 HttpServer.cpp:1238] (http) POST /modalities/ccr/find-worklist
I0523 04:41:50.886751 DicomAssociation.cpp:274] (dicom) Opening a DICOM SCU connection without DICOM TLS from AET “CCR” to AET “CCR” on host 127.0.0.1:4242 (manufacturer: Generic, timeout: 10s)
I0523 04:41:50.887589 CommandDispatcher.cpp:332] (dicom) Association Received from AET CCR on IP 127.0.0.1
I0523 04:41:50.887777 main.cpp:311] Incoming connection from AET CCR on IP 127.0.0.1, calling AET CCR
I0523 04:41:50.887945 CommandDispatcher.cpp:663] (dicom) Association Acknowledged (Max Send PDV: 16372) to AET CCR on IP 127.0.0.1
I0523 04:41:50.888494 main.cpp:344] Incoming Find request from AET CCR on IP 127.0.0.1, calling AET CCR
I0523 04:41:50.888601 main.cpp:232] No limit on the number of C-FIND results at the Patient, Study and Series levels
I0523 04:41:50.888620 main.cpp:242] No limit on the number of C-FIND results at the Instance level
I0523 04:41:50.889083 PluginsManager.cpp:172] (plugins) Received worklist query from remote modality CCR:
{
“0040,0100” : [
{
“0008,0060” : “MR”
}
]
}

E0523 04:41:50.901760 PluginsManager.cpp:197] Exception while invoking plugin service 7000: Parameter out of range
E0523 04:41:50.901840 PluginsManager.cpp:164] Error while adding an answer to a worklist request
E0523 04:41:50.902355 FindScp.cpp:295] C-FIND request handler has failed: Parameter out of range
E0523 04:41:50.902691 OrthancException.cpp:80] Error in the network protocol: C-FIND SCU to AET “CCR” has failed with DIMSE
status 0xC000 (unable to process - invalid query ?)
I0523 04:41:50.902918 CommandDispatcher.cpp:917] (dicom) Finishing association with AET CCR on IP 127.0.0.1: DUL Peer Requested Release
I0523 04:41:50.902993 CommandDispatcher.cpp:925] (dicom) Association Release with AET CCR on IP 127.0.0.1

Maybe it has got something to do with encoding? I noticed I use “DefaultEncoding”: “Windows1251” on the Orthanc JSON configuration file (even though I run the official Docker Linux images).

I found out that the “DefaultEncoding”: “Windows1251” was in fact the problem here. After changing it to “DefaultEncoding”: “Latin1”, all queries started working immediately (via both API and findscu CLI)! Though i don’t know the impact that change could have on the existing data.

BTW, Stephen, your findings regarding worklist usage on Orthanc really helped me with implementing it too. I found your earlier posts and used your Python script. Thanks for that!