Published on InterSystems Developer Community (https://community.intersystems.com)

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

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
#HL7 #Ensemble #InterSystems IRIS for Health

Source URL:https://community.intersystems.com/post/creating-filter-based-repeating-obx-segment-two-fields-obx-31-and-obx-51