Hi,
I wrote this lua script for dicom-tag base routing,
json = require “json”
function OnStoredInstance(instanceId, tags, metadata)
– Extract the value of the “RemoteAET” DICOM tag
local RemoteAET = metadata[‘RemoteAET’]
if string.find(RemoteAET, ‘WKS1’) ~= nil then
local data= json.encode(‘{"Resources" : ["’…instanceId…‘"],"Synchronous" : false,"LocalAet" : "’…RemoteAET…‘","MoveOriginatorAet": "ORTHANC","MoveOriginatorID": 1234,"Timeout": 10,"StorageCommitment": false}’)
os.execute('curl -X POST http://localhost:8012/modalities/chntorh/store -d '…data)
end
end
but issue is when i upload this file within orthanc server, it shows error.
However, this script(json base) run perfectly out-side(commandline) on orthanc,
Please suggest.