comparison Database/Lua/AutoroutingModification.lua @ 16:04fa104ab63b

lua
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Jun 2015 08:34:24 +0200
parents
children
comparison
equal deleted inserted replaced
15:2e5dbbbe3889 16:04fa104ab63b
1 function OnStoredInstance(instanceId, tags, metadata)
2 -- Ignore the instances that result from a modification to avoid
3 -- infinite loops
4 if (metadata['ModifiedFrom'] == nil and
5 metadata['AnonymizedFrom'] == nil) then
6
7 -- The tags to be replaced
8 local replace = {}
9 replace['StationName'] = 'My Medical Device'
10 replace['0031-1020'] = 'Some private tag'
11
12 -- The tags to be removed
13 local remove = { 'MilitaryRank' }
14
15 -- Modify the instance, send it, then delete the modified instance
16 Delete(SendToModality(ModifyInstance(instanceId, replace, remove, true), 'orthanctest'))
17
18 -- Delete the original instance
19 Delete(instanceId)
20 end
21 end