PEER = 'MyPeer'
function OnStableSeries(seriesId, tags, metadata)
if (metadata['ModifiedFrom'] == nil and
metadata['AnonymizedFrom'] == nil) then
-- The tags to be replaced
local replace = {}
replace['StationName'] = 'ABC'
-- Modify the instance
local command = {}
command['Replace'] = replace
-- Modify the entire series in one single call
local modifiedId = RestApiPost('/series/' .. seriesId .. '/modify', DumpJson(command, true))
local transfer = {}
transfer['Resources'] = {}
transfer['Resources'][1] = {}
transfer['Resources'][1]['Level'] = 'Series'
transfer['Resources'][1]['ID'] = modifiedId
transfer['Compression'] = 'gzip'
transfer['Peer'] = PEER
local job = ParseJson(RestApiPost('/transfers/send', DumpJson(transfer, true)))
RestApiDelete('/series/' .. seriesId)
RestApiDelete('/series/' .. modifiedId)
end
end
"Transfers" : {
"Threads" : 8, // Number of worker threads for one transfer
"BucketSize" : 4096, // Optimal size for a bucket (in KB)
"CacheSize" : 128, // Size of the memory cache to process DICOM files (in MB)
"MaxPushTransactions" : 8, // Maximum number of simultaneous receptions in push mode
"MaxHttpRetries" : 4 // Maximum number of HTTP retries for one bucket
}
However, I have not been able to run this plugin successfully. Please note I'm using 1.5.6 64-bit under Windows.