Hi,
I am looking at auto-routing across multiple sites, leveraging the ‘OnStableStudy’ LUA function.
To enable me to keep track, I am trying to set a value to a private tag that will let me know the originating server of any given instance/study.
I have declared the test private tag in the dictionary in orthanc.json:
`
“Dictionary” : {
“0013,1001” : [ “LO”, “Originating Server”, 1, 1, “Test tag” ]
}
`
But whenever I set this tag in my script, it displays the following on the instance:
`
0013,1001 (Unknown Tag & Data): Null
`
I have tested the LUA script modifying a public tag, and this works as expected:
The LUA script as it stands is:
`
function OnStableStudy(studyId, tags, metadata)
if (metadata[‘ModifiedFrom’] == nil and
metadata[‘AnonymizedFrom’] == nil) then
print('This study is now stable: ’ … studyId)
– The tags to be replaced
local replace = {}
replace[‘StationName’] = ‘OriginJVVMRTC00’
replace[‘0013-1001’] = ‘OriginJVVMRTC00’
local command = {}
command[‘Replace’] = replace
local modifiedFile = RestApiPost(‘/studies/’ … studyId … ‘/modify’, DumpJson(command, true))
print('Modified study: ’ … modifiedFile)
end
end
`
Any help in the right direction would be greatly appreciated, I’m sure it’s something simple!
Reuben