infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
How to filter messages based on patient location?
System
Originally posted by Amdy Diene
I need a script to filter messages based on the patient location and need help. I am new to TCL.
Find more posts tagged with
Clovertech
Comments
Peter Heggie
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"
}
System
Originally posted by Amdy Diene
Thank you, that is very helpful, nice code.