Xlate Iteration query

Clovertech Forums Read Only Archives Cloverleaf General Xlate Iteration query

  • Creator
    Topic
  • #48333
    Ray Mullen
    Participant

      Hi this is probably quite simple but im not too sure how to go about it. I am trying to map HL7 Phone values to a proprietry system. (FRL). For Example I am mapping Home Phone number and Mobile Phone number to 2 seperate fields in A FRL.

      On the hl7 side the fields required come in as follows:

      PID_13_1(1): phone number

      PID_13_1(2): PH

      PID_13_2(1): mobile_phone

      PID_13_2(2): CP

      I have set up an iterate in the Xlate as follows:

      Type: Field

      Basis: 0(0).pid.00116

      Variable: %f1

      On the copy Option for the telephone e.t.c I have setup the following:

      Source : 0(0).pid.00116(%f1)

      Destination: Telephone Number

      And the tcl in the translate goes as follows:

      set data [lindex $xlateInVals 1]

      if {[cequal $data “PH”]} {

       set c_phone [lindex $xlateInVals 0]

       set xlateOutVals

        }

        I keep getting the last value in the repeating field , am i going about this the correct way or is there a much easier way. I need to fall out of the iteration when i receive the telecomunication use code i need e.t.c.

        Thanks in advance for your help

        Ray

    • The forum ‘General’ is closed to new topics and replies.