diff Resources/Samples/Lua/AutoroutingConditional.lua @ 1572:904096e7367e

More information about the origin request in OnStoredInstance() callbacks
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 25 Aug 2015 12:10:12 +0200
parents 5730f374e4e6
children
line wrap: on
line diff
--- a/Resources/Samples/Lua/AutoroutingConditional.lua	Tue Aug 25 11:04:19 2015 +0200
+++ b/Resources/Samples/Lua/AutoroutingConditional.lua	Tue Aug 25 12:10:12 2015 +0200
@@ -1,9 +1,6 @@
-function OnStoredInstance(instanceId, tags, metadata, remoteAet, calledAet)
-   -- The "remoteAet" and "calledAet" arguments are only available
-   -- since Orthanc 0.8.6
-   if remoteAet ~=nil and calledAet ~= nil then
-      print ("Source AET: " .. remoteAet .. " => Called AET: " .. calledAet)
-   end
+function OnStoredInstance(instanceId, tags, metadata, origin)
+   -- The "origin" is only available since Orthanc 0.9.4
+   PrintRecursive(origin)
 
    -- Extract the value of the "PatientName" DICOM tag
    local patientName = string.lower(tags['PatientName'])