Iteration point changes based on message content

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Iteration point changes based on message content

  • Creator
    Topic
  • #53307
    Cynthia Briscoe
    Participant

      I have a message that some times has a PR1 segment which is optional and is repeatable.. along with that are ZP4 segments and Z3C segments.  These two segments can only come across if a PR1 segment is present.  A PR1 segment can come through with or with out the ZP4 and Z3C since these are both optional but conditional to the presence of the PR1.  My problem lies in that when a Message comes through with PR1 AND ZP4 segments and Z3C segments the point of interation is with the group but as soon as a message come through without the Z segments then the point of iteration changes to the segment level.  I have tried multiple configurations of the group and segments and everytime there is a switch in the point of iteration based on the presence or absence of the Z segments.  Latest attempt I made the PR1 and Z segments all a group that was repeatable and optional and then made the PR1 repeatable within the group and the Zsegments as optional within the group.  Depending on the message content the iteration point changes from  group to segment.  I am on clover leaf 3.5 and hl7 2.3.  I know everyone in the world has a higher version! 🙂  I am open to suggestions.

    Viewing 3 reply threads
    • Author
      Replies
      • #77232
        Daniel Lee
        Participant

          I’m not seeing anything in the two messages that you’ve sent that violate your understanding of the variant.  It really looks like your message structure for that group is:

          Code:

          [
           {
             PR1
             [ZP4]
             [Z3C]
           }
          ]


          Maybe the problem is in your Xlate iterate in how you’re itterating over your groups.

        • #77233
          Daniel Lee
          Participant

            I also wanted to point out something that you said that may be where your hang up is.  You said

            Quote:

            as soon as a message come through without the Z segments then the point of iteration changes to the segment level

            The above is not true.  Your point of itteration is always with the group in this case.  If the message doesn’t have any ZP4 or Z3C you still itterate over the group.  Look at the following that you sent:

            Code:

            1(0).0(0).PR1(0) : >|1|I9|37.22^Left heart cardiac catheterization||20120917||||||373|||1|2|I9|88.53^Angiocardiography of left heart structures||20120917||||||373|||2|3|I9|88.56^Coronary arteriography using two catheters||20120917||||||373|||3<


            Those three PR1 are still each in a PR1, ZP4, Z3C group.  Just because they don’t have the optional ZP4 or Z3C segments doesn’t make them any less an itteration of the group.  So below is how you need to think of that last message:

            Code:

            1st Itteration: 1(0).0(0).PR1(0) : >|1|I9|37.22^Left heart cardiac catheterization||20120917||||||373|||1|2|I9|88.53^Angiocardiography of left heart structures||20120917||||||373|||2|3|I9|88.56^Coronary arteriography using two catheters||20120917||||||373|||3|4|C4|93458^Cath plmt l hrt & arts w/njx & angio img s&i||20120917||||||373|||1||1||||117|00000||||| No Reim|4<

          • #77234
            Daniel Lee
            Participant

              Sorry for all the posts but I think I see part of your issue.  Inside the group do not make the PR1 optional or repeating.  The whole group is optional and repeating but not the PR1.  If the group exists it is required for the PR1 to exist only once.  Looking at the messages in your grouping I can see that you must have your varient set up something like this:

              Code:

              [
               {
                 {PR1}
                 [ZP4]
                 [Z3C]
               }
              ]


              Go back to my first post on this subject and look how I set up that PR1 group and use that.

            • #77235
              Cynthia Briscoe
              Participant

                Thanks Dennis I have changed my iterate to remove the segment part and everything is working now.  I actually tried both groupings at different times.  The first worked.  Thanks again!!

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