Forum Replies Created
-
AuthorReplies
-
The following code would filter off all messages where the gender is male. Or to be more technical, where the PID:8 value is “M”
If you have any questions, let me know.
#########################################################################
# Name: gender_filter.tcl
#########################################################################
# Purpose: TCL proc to filter by gender.
#
# UPoC type: tps
#
# Args: tps keyedlist containing the following keys:
# MODE run mode (“start”, “run”, “time” or “shutdown”)
# MSGID message handle
# CONTEXT tps caller context
# ARGS user-supplied arguments:
#
#
# Returns: tps disposition list:
#
#
# Note: All included routines “inc_” and global variables “gv_” are
# defined in the drmc_includes.tcl file
#
#########################################################################
# Last Update:
# Description:
#
#########################################################################
proc gender_filter { args } {
keylget args MODE mode ;# Fetch mode
set dispList {} ;# Nothing to return
set iKillMsg 0 ;# Kill message indicator (0 = Send | 1 = Kill)
set iDebug 0 ;# Debug indicator ( 0 = Off | 1 = On )
switch -exact — $mode {
start { }
run {
keylget args MSGID mh
# Set message variables
set msg [msgget $mh] ;# Original message
set fs [cindex $msg 3] ;# Field seperator
set sfs [cindex $msg 4] ;# Subfield seperator
set rfs [cindex $msg 5] ;# Repeating field seperator
set segs [split $msg r] ;# Split message into segments using CR
set newmsg {} ;# New message list
# Loop through segments
foreach seg $segs {
set fields [split $seg $fs] ;# Split the segment into fields
# Main Switch
switch [lindex $fields 0] {
PID {
set sGender [lindex $fields 8]
if { $sGender eq “M” } {
set iKillMsg 1
}
set seg [join $fields $fs]
lappend newmsg $seg
}
default {
lappend newmsg $seg
}
}
}
# Join the list with CR
set newmsg [join $newmsg r]
# Set the original message to new message
msgset $mh $newmsg
if {$iKillMsg == 1} {
# Kill Message
lappend dispList “KILL $mh”
} else {
# Send Message
lappend dispList “CONTINUE $mh”
}
}
time { }
shutdown { }
default { error “Unknown mode ‘$mode’ in $module” }
}
return $dispList
}
I’ve never heard from the state or government what they prefer.
We have a Mirth engine set up as our HIE server so we can interface lab, rad, and transcriptions to private practices. Our organization currently has 4 hospitals so the first question that always comes up when we take on one of these projects is, how do we display the resulting facility? We have about 20 lab result only interfaces set up with physician offices that are outside of our healthcare network.
From what I’ve seen, it’s split down the middle. Half of them use the dedicated field in the HL7 spec (OBX segment), and half of them prefer the resulting facility to come in a comment (NTE). I guess it ultimately depends on the EHR you are working with, and what their capabilities are. I usually just leave it up to the customer, as either solution, OBX or NTE, are fairly easy to accomplish with our setup.
Internally, we use Cerner on the inpatient side, and GE on the outpatient side. All labs and radiology are resulted out of Cerner and interfaced to GE. Our lab admin and informatics team like the resulting facility to be sent to GE in a comment (NTE) field. Populating the OBX segment does not make it “obvious enough” as to which facility the result came from in our GE system.
That’s my input 🙂
August 17, 2017 at 6:30 pm in reply to: TCL scrip for changing date from MM/DD/YYYY to YYYYMMDD #85267Charlie’s answer is best! I wasn’t sure if “clock scan” liked the MM/DD/YYYY” format, but I verified that it does in fact work.
set xlateOutVals [clock format [clock scan $date] -format “%Y%m%d”]
You should be able to use something like the following:
set sDate “201704270933”
set xlateOutVals [clock format [clock scan $sDate -format “%Y%m%d%H%M” ] -format “%m/%d/%Y %H:%M”]
This will turn 201704270933 into 04/27/2017 09:33.
Thanks.
August 16, 2017 at 8:52 pm in reply to: TCL scrip for changing date from MM/DD/YYYY to YYYYMMDD #85265You have already broken the date into a list. Each element in the list is part of the new date format that you need. I think you can just change your last line to:
set xlateOutVals “[lindex $date 2][lindex $date 0][lindex $date 1]”
That should put it in YYYYMMDD format. I hope that helps.
January 13, 2016 at 8:55 pm in reply to: Using cloverleaf to send to HTTP or LLP/MLLP endpoints #83521I can’t confirm or deny if Cloverleaf supports sending to HTTP destinations. But figured it might be worth sharing what we did in a similar situation.
We have an interface in which the final destination is an HTTP post also. The sending interface is also a Cerner OpenEngine interface. We pass the message from OpenEngine to Cloverleaf, and then to a custom Windows service on one of our Windows Servers. We then let the custom Windows service do the HTTP post via some scripting. I can provide you with more details if you like, but it sounds like it might be easier to do it from OpenEngine than using the method we used.
January 13, 2016 at 6:19 pm in reply to: Configuring single alert to email multiple email addresses. #83526Thank you Brent and G! I never would have guessed that. I have confirmed this works on our engine.
Thanks again!
December 31, 2014 at 3:04 pm in reply to: Question about deleting outbound threads and their routes. #81775Looking back at the configurations, the source thread was, in fact, in a different process than the outbound thread. It is possible that I only bounced the one process and not the other, leaving the configuration in the source process applied. This would explain how the messages got built up in the recovery database.
I will also look into adding step 5 in Bob’s process to our documentation as that isn’t something we normally do, but it makes perfect sense to me.
Thank you for the excellent input!
-
AuthorReplies