LUA Script for parsing Dicom Tag 1 to Tag 2

Hello, I am trying to create a LUA script who
copy the Tag “AccessionNumber” to Tag “StudyID”
and route the study to another dicom node.
Cannot find the right syntax,
Ex:
– The tags to be replaced
local replace = {}
replace[‘StudyID’] = ‘AccessionNumber’

Means will be replaced by the WORD non by the TAG
Who can help me? Thanks a lot

Max

Hi,

If you are in function OnStoredInstance(instanceId, tags, metadata) which is very likely, you should just write

replace['StudyID'] = tags['AccessionNumber']

HTH,

Alain

Thanks a lot, I will try

MP

Biotron spa