HRL Configuration

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf HRL Configuration

  • Creator
    Topic
  • #48298
    James Cobane
    Participant

      All,

      I’m attempting to define an HRL that consists of multiple different FRL definitions, each of which are optional; that is, the inbound data may or may not contain a line that has data for that particular FRL definition.  Additionally, a group of the segments (FRL

    Viewing 2 reply threads
    • Author
      Replies
      • #58279
        Ivan Ng
        Participant

          While I don’t fully understand the sample data and your message structure, I suspect that there could be a fundamental problem.

          Assuming that the [TRN], [NM1] are optional segments, when Cloverleaf is parsing a message without TRN but has a NM1 segment, how would it be possible for Cloverleaf to recognize what it is seeing is an NM1 instead of a TRN?

          Please also note that the ‘Condition Options’ determines the presence/absence of a segment using a field from a previous segment.

          I would expect a very complicated and intelligent setup in order for this to work if it is at all possible.  It would be nice if you can provide a more detailed view on your sample data as well as your message structure.  For instance, does every segment ends with a new line character?  Does the 6-8 characters always presence regardless of the presence of the segment?

        • #58280
          James Cobane
          Participant

            Ivan,

            Thanks for the reply.  As for “Does every segment end with a new line character?”, the answer is ‘yes’.  With respect to is position 6-8 valued for a segment regardless of the presence of the segment, the answer is ‘no’.  If a segment is not present (i.e. TRN), then there will not be a line in the data that has TRN in positions 6-8.  Regarding more detail about the data, suffice it to say that for each segment (ie. ISA, TRN NM1, etc.) there is a different FRL (which is what is inserted into the HRL definition); each segment has a different field/record layout.

            I know that I can handle this type of transaction within tcl and use the GRM functions to access the data via my FRL’s (extracting position 6-8 from the current line, and apply the appropriate FRL with GRM), and then manipulate the data, but I would like to keep this within the context of the normal toolset for maintainability by others.

            Hope this makes sense.

            Thanks,

            Jim Cobane

            Henry Ford Health

          • #58281
            Ivan Ng
            Participant

              James,

              You can use a repeat while segmentName.fieldName to determine if the message consists of a certain frl.

              You can use a condition on previousSegmentName.fieldName to determine if a message consists of a certain frl based on the existence of a previous segment.

              These allows us to parse the following structure:

                    HL

                    [TRN]

                    [NM1]

                    [EQ]

                    [AMT]

                    [III]

                    [REF]

                    [N3]

                    [N4]

                    [PER]

                    [PRV]

                    [DMG]

                    [INS]

                    [DTP]

              by doing

              Top.hrl

              HL Segment (with repeat while HL.Field6-8 is ‘HL ‘) pointing to HL.frl

              Group Segment (with condition HL.Field6-8 is ‘HL ‘) pointing to Group.hrl

              Group.hrl

              TRN Segment (with repeat while TRN.Field6-8 is ‘TRN’) pointing to TRN.hrl

              .

              .

              .

              I have trouble adding another layer of repeatition to handle the outer loop though.  I will get back to this board if I have any new insights.  And please let me know if you found out anything.  Thanks.

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