Reply To: need help with setting up HRL for OB msg from HL7 IB msg

› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › need help with setting up HRL for OB msg from HL7 IB msg › Reply To: need help with setting up HRL for OB msg from HL7 IB msg

#58708
Robert Kersemakers
Participant

    I think you do need a record identifier. I have used HRL’s as inbound, but never outbound, so I just created a small Xlate to check some things. I guess you’re trying to repeat an FRL inside the HRL, right?

    For this example, I have 2 FRL’s:

    Header.frl

     date( 8 )

     

    Text.frl

     segmentname( 3 )

     segmenttext( 70 )

    My HRL looks like this:

    Message.hrl

     Name: HEADER

     File Name: Header.frl

     No Repeat

     Name: TEXT

     File Name: Text.frl

     Repeat While Field: TEXT.segmentname

                         Value: TXT

    After this, I made a small Xlate (inbound doesn’t matter…):

    COPY =01012006         -> HEADER.date[0]

    COPY =TXT                  -> TEXT(0).segmentname[0]

    COPY =This is text one  -> TEXT(0).segmenttext[0]

    COPY =TXT                  -> TEXT(1).segmentname[0]

    COPY =This is text one  -> TEXT(1).segmenttext[0]

    This Xlate will generate 1 HEADERs and 2 TEXTs. But as soon as I change the ‘Repeat While Value’ from TXT into AAA in the HRL definition, the TEXTs are omitted.

    So if you want to use the Repeat While, you need a record identifier. I’m not sure how the Repeat Block works…

    Hope this helps!

    Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands