Hello everybody,
Im running this LUA:
function OnStoredInstance(instanceId, tags, metadata, origin)
if origin[‘RequestOrigin’] ~= ‘Lua’ then
– The tags to be replaced
local replace = {}
replace[‘StudyID’] = tags[‘AccessionNumber’]
– Modify the instance
local command = {}
command[‘Replace’] = replace
command[‘Remove’] = remove
local modified = RestApiPost(‘/instances/’ … instanceId … ‘/modify’, DumpJson(command, true))
– Delete the original instance
RestApiDelete(‘/instances/’ … instanceId)
– Upload the modified instance
RestApiPost(‘/instances/’, modified)
end
function OnStoredInstance(instanceId, tags, metadata)
SendToModality(instanceId, ‘DWAM’)
end
end
It works good but after some minutes or study it does not convert anymore
Im running Orthanc 19.3.1 with SQLite on Windows 10
Any idea?
Thanks a lot
Massimo