Comparing HL7 Repeatable Segment/Field to Lookup table
Awhile back the Developer community helped me with a situation I was having... How to loop through a Repeating Segment and Single Filed, example OBX().5, within a Business Process Rule and compare it against a Data Lookup table.
Well now I need to take it a step further. I need a way to loop through OBR() segment, and loop through OBR().4() and the subfield 4.1 and compare it to a Data Lookup table.
So I thought I could copy my existing function code and add another level to it, but its not returning what I would expect.
.png)
tRepCount is returning a 0 when it should be at least 1.
Comments
Hi there,
I think the problem is that the line which reads "set tRepCount = pHL7Msg.GetValueAt(pField2)" should be "set tRepCount = tSeg.GetValueAt(pField2)"
Scott
This line also looks suspect:
set tID = tSeg.GetValueAt(pField_"("_tRepCount_")"_"."_pSubField)
Do you want tRep, instead of tRepCount?