Multiple OBX’s into one NTE

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Multiple OBX’s into one NTE

  • Creator
    Topic
  • #48307
    Harold Freeman
    Participant

      Could someone tell me why I keep getting the same information on each in the NTE segment? I’m trying to take all the OBX’s with a sub ID greater then 1 and populate a NTE.

      This is my data:

      OBX|1|NM|CL^CHLORIDE|1|GOOD LUCK|MMOL/L|98-107||||F||

      OBX|2|NM|CO2^CO2|2|ON THIS|MMOL/L|22-30||||F||

      OBX|3|NM|CA^CALCIUM|3|JUST A TEST|MG/DL|8.4-10.2||||F||

      OBX|4|NM|CRE^CREATININE|1|LETS SEE IF|MG/DL|0.7-1.2||||F||

      OBX|5|NM|BUN^BUN|2|THIS WORKS|MG/DL|7-17|H|||F||

      And this is where I’m trying to get to:

      NTE|1||GOOD LUCK ON THIS JUST A TEST

      NTE|2||LETS SEE IF THIS WORKS

      I’m using a xLate with a global varible:

      set amsg $xlateInVals

      set imsg [lappend imsg $amsg]

      set xlateOutVals $imsg

      I’m only getting:

      NTE|5||{GOOD LUCK}

    Viewing 0 reply threads
    • Author
      Replies
      • #58299
        James Cobane
        Participant

          Harold,

          You should be able to handle this completely with an ITERATION within the xlate.  Within the ITER loop, you CONCAT your NTE field in the output format with the current OBX:5 value into the NTE field on the output record (note the ~, which is applied when you select from your output record in the source pane):

          CONCAT {~2(0).1(0).0(0).NTE(0).00098(0).[0]} {2(0).1(0).1(0).0(%g1).OBX.00573(0).[0]} –> 2(0).1(0).0(0).NTE(0).00098(0).[0]

           (where the separator character for the CONCAT is a space)

          Hope this helps.

          Jim Cobane

          Henry Ford Health

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