How to bypass messages where last name = ZZTEST

Homepage Clovertech Forums Read Only Archives Cloverleaf Tcl Library How to bypass messages where last name = ZZTEST

  • Creator
    Topic
  • #51274
    Julie Presley
    Participant

    We are testing a new HIS system and don’t have test environments for all systems so we do not want to process messages where the last name is ZZSTEST.  Can anyone help with this?  Thanks.

Viewing 3 reply threads
  • Author
    Replies
    • #69480

      Try something like this in the pre-xlate tps.

      proc tps_filter_PASS { args } {
      [code]proc tps_filter_PASS { args } {

      -- Max Drown (Infor)

    • #69481
      Jeannette Wistrom
      Participant

      Another way if you are using a translation is to add an if statement at the beginning of the translation and then suppress the message.

      The if statement would be:

      if eq =ZZTEST

        SUPPRESS

      [/img]

    • #69482
      Chad Flodman
      Participant

      Good options all:

      Also, depending on what kind of volume you expect and how many threads or routes you need to do this on a proc you could use in multiple places could be used.

      The example below could be used to kill off all ZZTEST patient ADT messages if placed in the thread inbound TPS or only for those routes/threads for which you don’t have a test system if placed in the pre-xate or post-xlate TPS on the route. proc kill_zztest { args } {
      [code]proc kill_zztest { args } {

    • #69483
      Troy Morton
      Participant

      Hey Max.  I took your HL7get script and modified it slightly to return a list of Segments if only the Segment is specified in the arguments.

      This might be usefull if you want to grab all the OBX segments in a message and do something with them.

      Troy

      proc hl7get {args} {

        set MyMsg [lindex $args 0]                                               ;# 1st argument is the message

        set MySeg [lindex $args 1]                                               ;# 2nd argument is the segment

        set MyFld [lindex $args 2]                                               ;# 3rd argument is the field

        set MySubFld [lindex $args 3]                                            ;# 4th argument is the sub-field

        set FldSep [string index $MyMsg 3]                                       ;# Get the field seperator

        set SubSep [string index $MyMsg 4]                                       ;# Get the sub-field seperator

        set RetVal “”                                                            ;# Initialize the return value to NULL

        set LenSubFld [string length $MySubFld]                                  ;# See if the user spcified a sub-field

        set SplitMsg [split $MyMsg r]                                           ;# Split the message into a list of segments

        set TheSegment [lindex $SplitMsg [lsearch -regexp $SplitMsg “^$MySeg”] ] ;# Extract the segment we want

       

        if { $TheField != “” } {                                                   ;# If user specified a field  

       

          set SplitSegment [split $TheSegment $FldSep]                             ;# Split the segment into a list of fields

          set TheField [lindex $SplitSegment $MyFld]                               ;# Get the field number we’re looking for

       

          if { $LenSubFld > 0 } {                                                  ;# If the user specified a sub-field

             set SplitField [split $TheField $SubSep]                              ;# Split the field into sub-fields

             set RetVal [lindex $SplitField $MySubFld]                             ;# Return the sub-field component value

          } else {

             set RetVal $TheField                                                  ;# Otherwise return the whole field

          }

         

        } else {

          set RetVal $TheSegment                                                   ;# If only Segment specified, return Segment(s)

        }

       

        return $RetVal                                                           ;# Return the value of the field

      }

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

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,296
Replies
34,439
Topic Tags
287
Empty Topic Tags
10