iteration help

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf iteration help

  • Creator
    Topic
  • #54134
    Kevin Crist
    Participant

      Working with an iteration for A60s and not having any luck. I am only getting the first segment (below). Can someone point me in the right direction, i am sure it is something simple. My variant is 2.4 and is the same for IB and OB.

      0(0).MSH(0)  :  >|^~&|SynapseRIS|A|Cloverleaf|A|20140401102748||ADT^A60|RIS1321682|P|2.3.1|||AL|NE< 0(0).EVN(0)  :  >|A60|20140401102748< 0(0).PID(0)  :  >|1|001951^^^^E|001951^^^A^MR^A||BEAM^JIM||19501015000000|F< 0(0).IAM(0)  :  >|1|DA^Drug Allergy^HL70127|476^PENICILLINS^99AGID|SV^Severe^HL70128|Anaphylaxis|X|18397^PCM||AD^Adverse Reaction^HL70436|||1954|||””^””^””||U^Unconfirmed^HL70438

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

          The %s1 variable follows whatever your basis is.  So in your case:

          0(0).IAM(%s1)

          This is particularly important on the source side since that is what you are actually iterating over.  If you are simply going through fields in each segment, it would be like:

          Copy 0(0).IAM(%s1).#1.[0] –> 0(0).IAM(%s1).#1.[0]

          for example….

        • #80284
          Keith McLeod
          Participant

            Another note:

            If you are simply wanting all of the IAM segments to be copied, the pathcopy statement copies all paths that start with….

            pathcopy 0(0).IAM –> 0(0).IAM

            Will generally copy them all without using the iterate.

          • #80285
            Russ Ross
            Participant

              Here is a parital screen shot of the allergy xlate for HL7 2.4 A60 message going to pharmacy that I did that you can look at for comparison to see how I iterated over the IAM segment(s).

              You might also notice another technique we have come to like of using an if statement to contain all the mappings of a given segment so it can be expanded/collapsed easily to avoid all the scrolling through other segment mappings not of interest.

              If you want a copy of my xlate to leverage as a starting point email me off line and I will send you a copy, but be aware I only mapped the fields that get consumed by the downstream pharmacy system.

              If memory serves me right the variants are probably a copy of the standard HL7 2.4 A60 but we have a in-house standard that we define a inbound and outbound variant for every xlate regardless if it is just a copy of the standard.

              Russ Ross
              RussRoss318@gmail.com

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