Sorry for the beginner question. I am new to lua. I am trying to auto-route the files received to other modality server running on the same server.
This is how I have defined in config file.
"isiri" :[ "ISIRI", "localhost", 3020]
"LuaScripts" : ["/home/radio/auto_routing.lua"],
This is the content of my auto_routing.lua file.
function OnStoredInstance(instanceId, tags, metadata)
Delete(SendToModality(instanceId, 'isiri'))
end
I have installed lua on my ubuntu machine. Also I can forward/send to "isiri" from web interface. But automatically it is not happening. Can you please suggest, if I have missed something.
Thanks
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
W0708 05:10:05.781128 5748 OrthancInitialization.cpp:62] Using the configuration from: /etc/orthanc/orthanc.json
W0708 05:10:05.787314 5748 main.cpp:327] Storage directory: "/var/lib/orthanc/db-v3"
W0708 05:10:05.787338 5748 main.cpp:328] Index directory: "/var/lib/orthanc/db-v3"
W0708 05:10:05.787351 5748 ServerContext.cpp:76] Disk compression is disabled
W0708 05:10:05.787369 5748 main.cpp:338] Installing the Lua scripts from: /home/radiology/auto_routing.lua
W0708 05:10:05.787451 5748 ServerIndex.cpp:1034] No limit on the number of stored patients
W0708 05:10:05.787549 5748 ServerIndex.cpp:1051] No limit on the size of the storage area
W0708 05:10:05.787816 5748 main.cpp:400] DICOM server listening on port: 4242
W0708 05:10:05.787843 5748 main.cpp:401] HTTP server listening on port: 8042
W0708 05:10:05.792481 5763 DicomServer.cpp:86] Loading the external DICOM dictionary "/usr/share/libdcmtk2/dicom.dic"
W0708 05:10:05.808430 5763 DicomServer.cpp:86] Loading the external DICOM dictionary "/usr/share/libdcmtk2/private.dic"
W0708 05:10:05.842730 5748 main.cpp:415] Orthanc has started
E0708 05:27:51.112529 5759 MongooseServer.cpp:711] MongooseServer Exception [Internal error]
--------------------------
It is not logging below lines.
print('onStoredInstance function has been called')
function OnStoredInstance(instanceId, tags, metadata)
print('onStoredInstance function has been called')
end
But no log/warning files inside /var/log/orthanc folder recorded this string. I am running orthanc on a ubuntu machine. I have installed lua and confirmed it works using lua interactive console like below
lua
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
> print('onStoredInstance function has been called')
onStoredInstance function has been called
>
Do I have to do any thing else in orthanc side? I have attached orthanc config file for reference.
Thanks for helping.