HL7 Fundamentals

How to filter messages

Ignoring specific messages can be done very easily. Simply omit running the queue.push{data=Data} in a Translator Filter instance for all the HL7 messages you wish to filter out.

You can apply any arbitrary logic you like to exclude messages from being processed. For example:

Here’s the code in a format you can copy.

function main(Data)
   local Msg = hl7.parse{data=Data, vmd='demo.vmd'}

   if Msg.PID[5][1][1][1]:nodeValue() == 'Adams' then
      iguana.logInfo('Adams family not welcome here!  Filtering message!')
   else
      queue.push{data=Data}
   end 
end

See Also

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.