Using Lookup or Exists on Repeating Fields in Ensemble Business rule
I have a project to only filter certain pathology results into a downstream system.
Within a HL7 router and business I was planning on using a lookup table and either the exists() or Lookup(), but am having issues when using it with repeating fields or segments.
For example if I perform teh analysis per stated segment usign {} brackets this will work, as each stated repeat is assessed:
(HL7.{PIDgrpgrp(1).PIDgrp.PID:PatientIdentifierList(1).ID} DoesNotStartWith "ICE")&&((Lookup("Sunquest.Lorenzo.OBR4Whitelist",HL7.{PIDgrpgrp1(1).ORCgrp(1).OBR:UniversalServiceIdentifier.identifierST},,)="1")||(Lookup("Sunquest.Lorenzo.OBR4Whitelist",HL7.{PIDgrpgrp(1).ORCgrp(2).OBR:UniversalServiceIdentifier.identifierST},,)="1")||(Lookup("Sunquest.Lorenzo.OBR4Whitelist",HL7.{PIDgrpgrp(1).ORCgrp(3).OBR:UniversalServiceIdentifier.identifierST},,)="1"))
However if I try to use () I do not get very far as the second part of this rule does not evaluate as true:
(HL7.{PIDgrpgrp(1).PIDgrp.PID:PatientIdentifierList(1).ID} DoesNotStartWith "ICE")&&(Lookup("Sunquest.Lorenzo.OBR4Whitelist",HL7.(PIDgrpgrp1().ORCgrp().OBR:UniversalServiceIdentifier.identifierST),,)="1")
I've seen in another post (Link) that the repeating fields cannot be handled out of the box with these functions.
If this is the case I guess the next step is to write my own utility function to handle these.
Any advice would be appreciated.
Regards
Stuart