Format for CT (Contains)

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Format for CT (Contains)

  • Creator
    Topic
  • #54983
    vdurst
    Participant

      Hello,

      I have a Xlate where if a field contains certain values to Send, else Suppress

      If 0(0).PV1(0).#3(0).[3].[0] ct =123

      Filter is not working and messages that should be suppressed are being sent. Can someone let me know the correct format?

      a) 0(0).PV1(0).#3(0).[3].[0] ct=123 (no space after ct=123)

      b) 0(0).PV1(0).#3(0).[3].[0] ct =”123″ (space after ct with quotes)

      c) 0(0).PV1(0).#3(0).[3].[0] ct=”123″ (no space after ct and quotes)

      Thanks!

    Viewing 2 reply threads
    • Author
      Replies
      • #83680
        Jim Kosloskey
        Participant

          The GUI will format correctly for you if you point and click but

          fieldoperandfield/literal/temp variable

          So in your case:

          0(0).PV1(0).#3(0).[3].[0]ct=123.

          Are you getting any errors or just not getting the results you want?

          If not getting the results you want, try echoing out the content of 0(0).PV1(0).#3(0).[3].[0] prior to the IF to make sure 0(0).PV1(0).#3(0).[3].[0] contains what you want at the time you are checking.

          Sometimes it is necesary to fist COPY =123 to a temp variable then use that temp variable in the IF. But I have not had to do that much anymore.

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

        • #83681
          Jon Blanchard
          Participant

            Is it possible to use a literal on the left side of the ct operator, such as

            Code:

            {=A01 A02 A03 A08} ct @hl7Event

            When I attempt to compile the Xlate, the error returned is

            Code:

            [0:TEST] IF expression parse failed: Expected a relational operator
            Error occurred at: ‘1 A04 A05 A08}  ct  @hl7Event’

            I did stash the literal in an @ variable, but am still wondering.

            Migration Consultant
            Coffee Regional Medical Center
            Eastern Time Zone

          • #83682
            Keith McLeod
            Participant

              You could copy the left side values as a list into another @variable and then do you IF statement.

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