Pathcopy and Partial Paths

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Pathcopy and Partial Paths

  • Creator
    Topic
  • #49105
    Dennis Dunn
    Participant

      Hello,

      I am trying to translate from an HL7 2.2 ADT_A08 to an HL7 2.5 ADT_A08 and I am having problems getting the PR1 segments to move over.  Only the first PR1 segment gets copied to the destination, any subsequent PR1 segments get lost.

      Here is the pathcopy from the xlate:

      0(0).PR1 -> 1(0).0(0).PR1

      Other segments that are using this same syntax seem to be copied over just fine, for example, all of the DG1 segments are moved.

      0(0).DG1 -> 0(0).DG1

      How do I get all of the PR1 segments to move over to the destination?

      Thanks,

      –dennis

    Viewing 2 reply threads
    • Author
      Replies
      • #60743
        Jim Kosloskey
        Participant

          Dennis,

          Even with PATHCOPY, you still need to ITERATE over the repeating element(s) (Group, Segment, etc.).

          Jim Kosloskey

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

        • #60744
          Dennis Dunn
          Participant

            Hello, Jim.  That’s what I was thinking I would need to do.  

            Now, since I want to copy over all of the PR1 segments from the source I think that I need to use the “segment” iteration type and my basis for the ITERATE action is 0(0).PR1.  

            I have a PATHCOPY as the action to be perform on each iteration as

            0(0).PR1(%s1) -> 1(0).0(0).PR1(%s1)

            I expected each PR1 segment from the source to be copied to the destination group but I am only getting the first segment.

            I will go back to my Level 1 notes and the user guide but if you have any more clues, I’d appreciate hearing from you.

            Thanks for your time,

            –dennis

          • #60745
            Dennis Dunn
            Participant

              Hello again,

              I figured out what I was doing wrong,  I needed to specify the pathcopy as

              0(0).PR1(%s1) -> 1(0).0(%s1).PR1(0)

              Thanks again for your help.

              –dennis

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