How to Search a Repeating Field within Routing Rules

161 views
Skip to first unread message

YM

unread,
Jun 8, 2010, 6:15:18 AM6/8/10
to InterSystems: Ensemble in Healthcare
To handle Repeating Fields in DTL we have ForEach (or Empty
Parentheses for shorter notation) to iterate all instances of the
field - can the same be performed via Message Routing Rules on the IF
Condition entry?

For example I'm looking at a HL7 2.4 Document Name ADT_A31 with a PID
Segment which has a Repeating Field PatientIdentifierList. I can
check a Fixed position for a particular entry:

IF HL7.{PID:PatientIdentifierList(7).assigningauthority} = "NHS"

However, the position is not fixed and I want to check all the
AssigningAuthority entries - how do I do this?

Appreciate any help - Many Thanks

Gary

unread,
Jun 8, 2010, 11:24:18 AM6/8/10
to InterSystems: Ensemble in Healthcare
I have found that our business service didn't have a message schema
category set, once I set this to 2.3 then the MSH:MessageControlID
format worked. So from what I can gather this data is passed through
ensemble, I have looked in the header and can't see it there - that
was my first guess, so now I will have to do some more digging.

Gary

unread,
Jun 8, 2010, 11:25:02 AM6/8/10
to InterSystems: Ensemble in Healthcare
Ok - sorry about that, I have just replied to the wrong thread.
> > Appreciate any help - Many Thanks- Hide quoted text -
>
> - Show quoted text -

Meredith

unread,
Jun 10, 2010, 11:23:48 AM6/10/10
to InterSystems: Ensemble in Healthcare
Hi,

To do this you should use the parenthesis syntax.

For example, if I want to loop through all of the IN1grp().IN1:4
fields, I would say something like

If HL7.(IN1grp().IN1:4) = "Medicare"

Please let me know if you have any questions,

Best Regards,
Meredith

Jenn

unread,
Jun 11, 2010, 3:15:47 PM6/11/10
to InterSystems: Ensemble in Healthcare

One thing to note. The results are returned, bracketed, in a single
string. You're likely to get better results with something like this:

HL7.(In1grp().IN1:4) Contains "<Medicare>"



On Jun 10, 11:23 am, Meredith <meredith.stas...@intersystems.com>
wrote:
Reply all
Reply to author
Forward
0 new messages