Using "CT" in an IF statement

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Using "CT" in an IF statement

  • Creator
    Topic
  • #52958
    Tom Arrowsmith
    Participant

      Hello,

      I am trying to write a statement that specifies if the letter “E” is not appended to an account number in the PID-18.1  then “continue”. (with a previous “Supress”)

      Presently I have this

      IF 0(0).PID(0).#18(0).[0]  ! ct E

      When testing, I get this error:

      [0:TEST] IF expression parse failed: Expected a relational operator

      Error occurred at: ‘! ct =E’

      [0:TEST] Unable to compile XLT ‘ESCRIPT_ORU_to_ECIN_ORU.xlt’.

      A little background: The sending system is planning on appending an “E” to certain account numbers that will identify these numbers to me as accounts that should not pass the interface engine.

      Here’s an example HL7 message (showing just the MSH and PID) with an “E” appended in the PID-18

      Can anyone help me out as to the proper way to do this within an Xlate?

      Thanks!

      Tom Arrowsmith

    Viewing 3 reply threads
    • Author
      Replies
      • #76059
        Tom Arrowsmith
        Participant

          oops, forgot to paste in the message:

          MESSAGE 1

          MSH|^~&|ESMT|FH|rcvapp|FH|20120120143635||ORU^R01|20120120143635356|P|2.2||

          PID|||1100002||HIM^TEST^K||19990831|F||||||||||000001377E^^^L<

        • #76060
          Jim Kosloskey
          Participant

            Tom,

            Do you have this:

            IF 0(0).PID(0).#18(0).[0]  ! ct E

            or this:

            IF 0(0).PID(0).#18(0).[0]  ! ct =E

            If the former try with an =E, if the latter, try COPYing =E to a temp variable then using the temp variable in the IF Action.

            email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

          • #76061
            Chris Williams
            Participant

              It doesn’t like your exclamation point. If you want to look for the negative of the IF statement you can write it this way:IF !(0(0).PID(0).#18(0).[0] [code]IF !(0(0).PID(0).#18(0).[0]

            • #76062
              Tom Arrowsmith
              Participant

                That’s it, Chris… Thanks so much!

                Thank you too, Jim, for your response. I tried Chris’ suggestion first and it worked…..

                Tom

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