Filtering messages

Added by iNTERFACEWARE

How to filter out unwanted HL7 messages (similar principles apply to other message types)

Source Code
function main(Data)
   -- Parse the HL7 message
   local Msg, Name = hl7.parse{vmd = 'example/demo.vmd', data = Data}
   local Out       = hl7.message{vmd = 'example/demo.vmd', name=Name}
   
   -- Filter out unwanted messages
   -- In this example we filter out any messages that do not match our VMD
   -- NOTE: you can use any condition to filter messages
   if Msg:nodeName() == "Catchall" then
      iguana.logError('Filtering Message')
   else
      -- Map the complete message      
      -- Transform the message      
      -- Push the outgoing message into the Iguana queue
   end
end
Description
How to filter out unwanted HL7 messages (similar principles apply to other message types)