I have a read TPS that runs every hour.
It calls a Tcl script that reads a CSV file and builds a SQLite database for use instead of a lookup table in Cloverleaf.
The Tcl proc is below. The call to crmcCdmDb::update does the CSV read and writes to the SQLite DB.
The proc doesn’t generate any outbound messages, but I expect that would be as simple as creating a new message handle, populating it and “CONTINUE $mh”.
proc importSiemensChargeMaster { args } {
keylget args MODE mode ;# Fetch mode
set dispList {} ;# Nothing to return
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
# ‘run’ mode always has a MSGID; fetch and process it
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
crmcCdmDb::update
return $dispList
}
shutdown {
#nothing to do
}
default {
error “Unknown mode ‘$mode’ in importSiemensChargeMaster”
}
}
return $dispList
}
Jeff Dinsmore
Chesapeake Regional Healthcare