Question
Nicole Febres · Nov 12, 2020

Creating filter based on repeating OBX segment for two fields (OBX 3.1 and OBX 5.1)

Hi, I am trying to filter transactions based on a value within OBX 3.1 and OBX 5.1 within the same repeating segment.  The segment looks like this

OBX|60|ST|RADONCPT||Y|

I originally tried this within a routing rule

(HL7.{OBX():3.1} Contains "<RADONCPT>")&&(HL7.{OBX():5.1} Contains "<Y>"))
This didn't work because if the RADONCPT was present and another OBX segment contained Y, it would still pass.  I am now looking to do this via a DTL, but I am stuck.  Is there a way to skip transforming a message based on if a value matches both OBX 3.1 and OBX 5.1 within the same segment?  I understand I need to do a loop (which I tried at the very top of the DTL), but its not transforming the message.
 
Thanks
00
0 3 30 2

Replies

Nicole, I believe your problem is with the repeating fields. You can not leave () blank. You will need to use a counter or loop through OBX to look for the individual fields you are looking for.

Scott

Your welcome.