Interate help!

  • Creator
    Topic
  • #48554
    Ken Seachrist
    Participant

    I have trying to get an interate to work, but to no avail.

Viewing 2 reply threads
  • Author
    Replies
    • #58969
      James Cobane
      Participant

      Ken,

      It looks correct, but there are a couple of things to check.

    • #58970
      Mike Grieger
      Participant

      A quick test case to kind of review what I am thinking you are getting at.

      My test message:

      MSH|^~&|Send Ap|Send Facility|||20060602083331||ORU^R01||P|2.2

      PID|1||123456||TEST^TEST|||Male||

      ORC|NW||1||||||20060602083331||

      OBX|0001|ST|||element1~element2~element3~element4|

      My test variant (kind of based on your info given… according to your copy path, your OBX’s are in the zero level… no groups):

      MSH

      PID

      ORC

      {OBX}

      Xlate:

      ITERATE 0(0).OBX(0).00573     %f1

      PATHCOPY   0(0).OBX(0) -> 0(0).OBX(%f1)    (to copy all OBX fields per OBX_5)

      PATHCOPY  @null ->  0(0).OBX(%f1).00573   (so that element1~element2~element3~element4 do not appear in each OBX)

      COPY  0(0).OBX(0).00573(%f1).[0]  ->  0(0).OBX(%f1).00573(0).[0]   (so the correct repeat of OBX_5 is in the respective OBX)

      Output:

      MESSAGE 1

      0(0).MSH(0)  :  >|^~&|||||||ORU||P|2.3< 0(0).PID(0)  :  >< 0(0).ORC(0)  :  >< 0(0).OBX(0)  :  >|0001|ST|||element1< 0(0).OBX(1)  :  >|0001|ST|||element2< 0(0).OBX(2)  :  >|0001|ST|||element3< 0(0).OBX(3)  :  >|0001|ST|||element4< Now, I’m using the same test variant on inbound and outbound, so it isn’t exactly what it looks like you have, as your in/out variants must not match.  But this should get you started.  Remember, with some quick test data, the Xlate Test tool is your friend!

    • #58971
      Ken Seachrist
      Participant

      Thank you all for your help!  That got it working!  I never thought that I would be glad to see 25 OBX segments in a message!  Thanks again!

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

Forum Statistics

Registered Users
5,115
Forums
28
Topics
9,290
Replies
34,422
Topic Tags
286
Empty Topic Tags
10