Nora.
We load the ‘tables’ into an array and access them this way – like Jim, we have a script which loads the data file into our tables. We use TCL for our translations and ‘source’ the tables and check their CVS id before using them. The example below is used by our clinical system for imaging.
proc ExamCode {aCode} {
# make the array global, so it is always available
global ExamCodeArray
#
# if the code is DATA_INIT then we initialise the array
#
if {[string equal $aCode DATA_INIT]} {
# ExamCode DATA_INIT START – do NOT remove this line
set ExamCodeArray(ABDO) “ABDO”
set ExamCodeArray(ABDOE) “ABDO”
set ExamCodeArray(ABDOENR) “ABDO”
set ExamCodeArray(ABDONR) “ABDO”
…
set ExamCodeArray(YWCWX) “YWC”
# ExamCode DATA_INIT END – do NOT remove this line
} else {
#
# set the return variable to the default value,
# in this case the original code
#
set myData $aCode
#
# make sure we don’t fall over if there is NO data!
#
catch {set myData $ExamCodeArray($aCode)}
#
# return the data from the array
#
return $myData
};# end of if
}
…
ExamCode DATA_INIT
ExamTechnique DATA_INIT
ExamDelete DATA_INIT
#
# return OK
#
return 0