Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Text to HL7 message
I am new to cloverleaf and need some help. I have a ‘Data Dump” that has /.br/ at the end of each segment. I need to convert these to a ~ so that it will read as an HL7 message. Would it be easier to do this as a TCL Proc or a Xlate. Please advise.
You will most likely not be able to do this in an xlate, but a pre-proc would work well.
set msg [string map {”/.br/” ~} $msg]
Example Code:
set msg “foobar/.br/helloworld/.br/abc/.br/123/.br/” set msg [string map {”/.br/” ~} $msg] puts $msg
Output:
foobar~helloworld~abc~123~
-- Max Drown (Infor)
Check out this link:
<a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=6420″ class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=6420
which has a discussion you might find enlightening along with ways to do this in the Xlate (with some Tcl).
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.