Originally posted by James Baldwin
I have an HL7 text file,$msg,that I'd like to break into newline messages.
1) set maplist { rn r } ;change 0D0A to 0D
set msg1 [string map $maplist $msg]
2) set maplist { rMSH rnMSH } ; insert a newline before the MSH
set msg2 [string map $maplist $msg1]
Not having much luck getting the newline into place. :?
I was looking for an output
MSH.......
MSH.......
The input $MSG is a text file each line ends with 0D0A
MSH|^~&|...
PID|1|...
PV1|1|...
IN1|1|...
IN1|2|...
IN1|3|...
GT1|1|...
ORC|NW|...
OBR|1|...
ORC|NW|...
OBR|2|...
ORC|NW|...
OBR|3|...
DG1|1|...
DG1|2|...
MSH|^~&|...
PID|1|...
PV1|1|...
IN1|1|...
IN1|2|...
IN1|3|...
GT1|1|...
ORC|NW|...
OBR|1|...
DG1|1|...
DG1|2|...