I have a translation that uses a xlt proc. It puts a value of ‘Positive’ in a field if certain text is found.
When I use this the message is not imported correctly in our Meditech system.
When I do the same thing with IF and COPY statements in the translation configuarator Meditech imports the file correctly.
I got a sample of each of the output file and compared them. They are exactly the same. I even compared the hex, and that is exactly the same.
Has anyone else had a problem where the output of a Proc and of a Translation are treated differently in a recieving system? Here is my proc:
######################################################################
# Name: xltReplaceHPV
# Purpose:
# UPoC type: xltp
# Args: none
# Notes: All data is presented through special variables. The initial
# upvar in this proc provides access to the required variables.
#
# This proc style only works when called from a code fragment
# within an XLT.
#
proc xltReplaceHPV {} {
upvar xlateId xlateId
xlateInList xlateInList
xlateInTypes xlateInTypes
xlateInVals xlateInVals
xlateOutList xlateOutList
xlateOutTypes xlateOutTypes
xlateOutVals xlateOutVals
set positive “HPV High Risk: Positive”
set negative “HPV High Risk: Negative”
if {[string match “*$positive*” $xlateInVals]} {
set xlateOutVals Positive
} elseif {[string match “*$negative*” $xlateInVals]} {
set xlateOutVals Negative
}
}