cat /etc/orthanc/lua/send.lua function OnStoredInstance(instanceId, tags, metadata) local Modality = tags['Modality'] if string.find(Modality, 'CR') ~= nil then SendToModality(instanceId, 'sample') elseif string.find(Modality, 'MR') ~= nil then SendToModality(instanceId, 'sample') end end