Convert a File to an ORU using to VRL in an HRl

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Convert a File to an ORU using to VRL in an HRl

  • Creator
    Topic
  • #54559
    Chuck Busch
    Participant

      I am attempting to take a file with one record per row and convert it to an ORU.  I have step up a vrl for the single segment data and another vrl for the repeating OBX.  I have set up a ‘Repeat While” the .[Field] has a value of F.  The xlate works for the non-repeating but when it gets to the repeating OBX segments I am not getting them.  Please take a look at my screen shots and let me know where I may be making my mistake.

    Viewing 3 reply threads
    • Author
      Replies
      • #81964
        Chuck Busch
        Participant

          I had hoped to add more screen shots but I guess we can only upload 3.  In particular I wanted to  upload the XLATE.  In it I am trying to ITERATE using the OBX segment defined in HRL.  I am using the Type of segment and the variable %s1.

        • #81965
          Jim Kosloskey
          Participant

            Is your data like this?

            Segs

            OBX

            OBX

            OBX

            Segs

            OBX

            OBX

            OBX

            Segs

            OBX

            OBX

            OBX

            etc.

            Or –

            Segs

            Segs

            Segs

            OBX

            OBX

            OBX

            OBX

            OBX

            OBX

            OBX

            etc.

            email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

          • #81966
            Chuck Busch
            Participant

              My data is like this>

              Seg

              Seg

              Seg

              Seg

              Seg

              Seg

              OBX

              Literally it is

              MSH

              PID

              PV1

              ORC

              OBR

              {OBX}

              I am making the file myself with C# extraction from a database.  I have one record per line.  I can put any filed seperator I want in the data.  In the screen shot above I used a pipe for the Seg vrl and a tilda for the OBX vrl.

            • #81967
              Jim Kosloskey
              Participant

                So your HRL needs to account for each of the segments before the OBX.

                Not one VRL for all of the pre OBX segments.

                Also in the Globall Properties for each VRL specify a Terminator character (that goes at the end of the ‘segment’) and use that character when building each segment (at the end of the segment).

                When that is done before testing the Xlate run the data through the HRL tester and make sure the HRL is reading the data correctly.

                email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            Viewing 3 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.