I’ve been using the REST API from a webapp to query an Orthanc Server for MWL files and to get a JSON response from the query. That seems to work fine from the webapp using a path like:
'modalities/PACS1/find-worklist, where PACS1 is defined in my modalities as an Orthanc Server. The find-worklist path alone does not work, which I guess is my design ?
If I try to call that from a Lua Script or a Python Script I get an error.
Just as a test, I have this in a Python script:
mwlquery = dict()
mwlquery[“AccessionNumber”] = ‘DEVACC00000023’
MWL = orthanc.RestApiPost(‘/modalities/PACS1/find-worklist’,json.dumps(mwlquery))
print(MWL)
It does seem to ‘partially’ work in that the request is received and even processed, but there is an error in the callback.
In the log there is this:
I0624 03:37:58.474952 PluginsManager.cpp:172] (plugins) Worklist matched: /var/lib/orthanc/worklists/DEVACC00000023.wl
I0624 03:37:58.475618 PluginsManager.cpp:172] (plugins) Worklist C-Find: parsed 2 files, found 1 match(es)
T0624 03:37:58.476197 FindScp.cpp:326] (dicom) Sending C-FIND Response 1/1:
Dicom-Data-Set
Used TransferSyntax: Little Endian Explicit
(0008,0005) CS [ISO_IR 192] # 10, 1 SpecificCharacterSet
(0008,0050) SH [DEVACC00000023] # 14, 1 AccessionNumber
but 'MWL" does not get set and there is also this error:
E0624 03:37:48.466308 OrthancException.cpp:57] Error in the network protocol: DicomAssociation - C-FIND to AET “SCOTTI_CUSTOM”: DIMSE No data available (timeout in non-blocking mode)
Is that because there is no support for that from within a Python script or Lua ?