IF statement in xlate not working

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf IF statement in xlate not working

  • Creator
    Topic
  • #51885
    Ariba Jones
    Participant

      I am trying to suppress messages using an xlate.  The IF statement I have setup is not working though.  I can’t figure out why.

      I need to check two different fields and then suppress the message based on that.

      Here is the IF statement I have in my xlate.

      IF 2(0).1(0).0(0).OBR(0).00238(0).[0].[0] ne =11145 && 2(0).1(0).0(0).OBR(0).00238(0).[0].[1] ne =RC

           THEN SUPPRESS

      If I try the IF with one of the scenarios at a time, it works for each scenario.  When I put the two together, it doesn’t do what I expect.  It doesn’t suppress the messages that meet this criteria.  I have tried putting parenthesis around the first scenario (before the &&) and it doesn’t work.  I need to check if the exam code is not equal to 11145 AND the department is not equal to RC, then don’t send the message outbound.

      Does anybody know what I am doing wrong?   Is it due to the fact that I have two ‘not equal to’ statements in one IF?  This is something I am trying to get working by the end of day today.  We have a go-live for this interface on Monday next week.

      Thanks for any suggestions in advance!

      Ariba

    Viewing 1 reply thread
    • Author
      Replies
      • #72134
        Tom Rioux
        Participant

          Ariba,

          I’m assuming that this is a repeating first subfield in the OBR.4 segment.

        • #72135
          Ariba Jones
          Participant

            Tom,

            The way I have this listed is the way it appears when I run one of the messages through the Tester (using the HL7 tab).  I will try it the way you suggest.  I’ll let you know the result.

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