Help splitting FT1 out to separate DFT messages

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Help splitting FT1 out to separate DFT messages

  • Creator
    Topic
  • #55652
    Mark Brown
    Participant

      I’m having a rough time trying to create a XLT to split multiple FT1 segments into individual DFT messages.  I looked at some of the examples already here and tried different things, but I get the same error  no matter what I try.  The error makes no sense to me.

      I’m running CL 6.02 on Windows Server.

      Any help is appreciated.

      This is the error I get.  The segments are not out of order in the file I’m testing with.

      MESSAGE 1

      [0:TEST] [mid:0x32c9f78] The # 1 segment encountered ‘PID’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      [0:TEST] [mid:0x32c9f78] The # 2 segment encountered ‘PV1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      [0:TEST] [mid:0x32c9f78] The # 3 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      [0:TEST] [mid:0x32c9f78] The # 4 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      [0:TEST] [mid:0x32c9f78] The # 5 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      [0:TEST] [mid:0x32c9f78] The # 6 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      [0:TEST] [mid:0x32c9f78] The # 7 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      [0:TEST] [mid:0x32c9f78] The # 8 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      [0:TEST] Warning during PathCopy: The # 1 segment encountered ‘PID’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      The # 2 segment encountered ‘PV1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      The # 3 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      The # 4 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      The # 5 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      The # 6 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      The # 7 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      The # 8 segment encountered ‘FT1’ is out of order when parsing hl7 (2.3 {}) for message type ‘DFT_P03’ during the translation(SplitFT1.xlt).  Segment ignored.

      And here is my attempted XLT:

      prologue

         xlt_infile: hl7 2.3  DFT

         who: srvieprod_server

         date: March 20, 2018 1:50:40 PM CDT

         xlt_outfile: hl7 2.3  DFT

         type: xlt

         version: 7.0

      end_prologue

      { { OP SUPPRESS } }

      { { OP PATHCOPY }

         { ERR 0 }

         { IN 0(0).MSH(0) }

         { OUT 0(0).MSH(0) }

      }

      { { OP PATHCOPY }

         { ERR 0 }

         { IN 0(0).PID(0) }

         { OUT 0(0).PID(0) }

      }

      { { OP PATHCOPY }

         { ERR 0 }

         { IN 0(0).PV1(0) }

         { OUT 0(0).PV1(0) }

      }

      { { OP ITERATE }

         { BASIS 1 }

         { VAR %g1 }

         { TYPE group }

         { BODY {

             { { OP COMMENT }

                 { COMMENT {TODO: Insert new actions here} }

             }

             { { OP PATHCOPY }

                 { ERR 0 }

                 { IN 1(%g1).0(0).FT1(0) }

                 { OUT 1(0).0(0).FT1(0) }

             }

             { { OP COPY }

                 { ERR 0 }

                 { IN =1 }

                 { OUT 1(0).0(0).FT1(0).#1(0) }

             }

             { { OP CONTINUE } }

         }}

      }

    Viewing 2 reply threads
    • Author
      Replies
      • #86019
        Keith McLeod
        Participant

          Couple of suggestions:

          1) Go to your variant and make the EVN segment optional.

        • #86020
          Jim Kosloskey
          Participant

            I don’t think there is any need to move the SUPRESS I think it is fine where it is at.

            Keith’s suggestion regarding your variant is worth looking into.

            If you have not done so already, try running the test message giving the error against the HL/7 tester using the variant you are referencing in your Xlate to see if you get the same error there.

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

          • #86021
            Mark Brown
            Participant

              Making EVN optional did the trick.

              Thanks!

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