5.3 xlate question

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf 5.3 xlate question

  • Creator
    Topic
  • #49211
    Daniel Bantaa
    Participant

      I’m trying to do an xlate from HL7 2.2 to HL7 2.2.  I am having trouble with PID (3).

      Example –> PID:::000123456;;;A~000123456;;;B

      After the xlate, I would like the output to look like

      PID:::123456

      I know how to strip off the leading zeroes, but how do I also remove the rest of the sub-fields?

      Thanks in advance.

    Viewing 2 reply threads
    • Author
      Replies
      • #61111
        Elizabeth Wilson
        Participant

          Are you using bulkcopy or pathcopy? If so, you have repeating fields there, you need to use ITER and copy blanks to the rest of subfields. If not, then individually copy only the fields that you want.

        • #61112
          Vince Angulo
          Participant

            We skipped from 5.2 to 5.4, but I’ve used this method successfully:

            PathCopy @null -> 0(0).PID.00106

            Copy 0(0).PID.00106.[0]->0(0).PID.00106.[0]

            The pathcopy will null all all components of PID-3 (since it works at the root level of the path), the copy (via your zero-stripping proc) will just move the first element of the first repeat to the target side.

          • #61113
            Daniel Bantaa
            Participant

              The Pathcopy worked great thanks for your help Vince.

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