IF values for suppression

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf IF values for suppression

  • Creator
    Topic
  • #50685
    Sandi Meyers
    Participant

    If I want to suppress an OBX segment that has a certain variable on OBX3.1 how do I define that value

    i.e    eq @MDIF

    or eq “MDIF”

    I don’t know what characters to use to surround the value.

Viewing 6 reply threads
  • Author
    Replies
    • #67093
      Robert Milfajt
      Participant

      No quotes, no fancy characters, just put in =MDIF as one of the arguments in the IF statement.

      Hope this helps,

      Robert Milfajt
      Northwestern Medicine
      Chicago, IL

    • #67094
      Sandi Meyers
      Participant

      That works thanks but now I think it ends up suppressing my whole message when I only want to suppress that OBX segment.

    • #67095
      Tom Rioux
      Participant

      Sandy,

      Instead of the SUPPRESS action, just put a PATHCOPY action after your statement that copies @NULL to the the OBX segment.

      Also, a little tip on variables in your IF statement.  If the value you are checking for has a space in it, (i.e. “MDIF VAL”), then it would be best to move it to a variable such as @temp or whatever you want to call it.  Then use that varaible in the IF statement.

      Hope this helps….

      Tom Rioux

    • #67096
      Sandi Meyers
      Participant

      Would that work?  I want that OBX segment to not send at all because it is missing a required field.

    • #67097
      Jim Kosloskey
      Participant

      Sandi,

      Assuming no BULKCOPY is involved –

      Have an IF Action checking for the condition that means you DO want to send (in other words the complement of the logic that means don’t send).

      Inside that IF do the PATHCOPy, or COPY, or whatever Actions you want to do to build the OBX. Then whnever the IF Action is true (that is the value is NOT equal to MDIF) you build an OBX segment, otherwise you do not.

      Of course all of the above is inside all of the appropriate ITERATE Actions.

      Now if the receiving system is sensitive to the Set-ID for the OBX being in seque4nce, you will need to keep your own Set-ID counter in a temp variable and use that for the OBX Set-ID. Becasue when you skip OBX segments there will be gaps in the Set-IDs.

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

    • #67098
      Sandi Meyers
      Participant

      Thanks.  The whole NOT logic can be confusing.  I actually had another IF statement inside that iterate that was an IF NOT then Pathcopy.  I just added this in with the && between.  It seems to be working fine.  This xlate is pretty involved due to the receiving system and the fact that I don’t have any tcl experience yet.  Hopefully will soon.

      Thanks for all your help it put me on the right path.

    • #67099
      Jim Kosloskey
      Participant

      Sandi,

      Orders and Results integrations can be very complex (very few vendors use the ORx messages the same).

      So it is not unusual to have complex Xlates.

      However, you can easily do most of everything you need to do in the Xlate with little need forTcl.

      The key is to organize your Xlates;be faimiliar with the power of the Xlate,; and comment – a  lot.

      Personally, I do most everything right in the Xlate and reserve Tcl for those things the Xlate does not yet support (some of which it should support IMO).

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

Viewing 6 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,426
Topic Tags
286
Empty Topic Tags
10