How to filter messages based on patient location?

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to filter messages based on patient location?

  • Creator
    Topic
  • #55516
    Amdy Diene
    Participant

    I need a script to filter messages based on the patient location and need help.  I am new to TCL.

Viewing 1 reply thread
  • Author
    Replies
    • #85598
      Peter Heggie
      Participant

      A great technique we got from Bill Pitts was to use a list for valid (or invalid) values and then a list lcontain command to do the filtering.

      Near the top you setup your list of locations. Here it is used for message types, but you can use the same technique for locations:

      # Set Not Allowed Events List      

      set HL7EventsNotAllowed {A17 A31 A34 A35 A60 Z08}

      And then in the logic portion, after you have parsed the field you want to test, you use a list command to see if the current value is in the list:

      # KILL message if MSH9_2 Event is in Not Allowed HL7 Event List

      if {[lcontain $HL7EventsNotAllowed $MSH9_2]} {

         if {$debug} {echo “$debugout KILL msg event $MSH9_2 not allowed”}

         lappend dispList “KILL $mh”

      }

      Peter Heggie

    • #85599
      Amdy Diene
      Participant

      Thank you, that is very helpful, nice code.

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10