Settings in UltraEdit-32
Advanced –> Configuration –> General tab:
Auto Detect Unix Files – Checked
Auto Convert Unix Files – Unchecked
Save File as Input Format – Unchecked
1. Open .msg file but do NOT convert to DOS.
2. Search on “!” char in file (Generally NOT found).
3. Assuming no “!” character in file, REPLACE “MSH|” with “!MSH|”
4. Remove the ! at the very beginning of the file (First HL7 message in file)
5. Go into HEX Mode.
6. In HEX Mode, replace Hex 21 (This is the “!” character) with Hex 0A.
7. Go out of HEX Mode.
8. The file is all now in “newline” format, with original Hex 0d characters separating HL7 segment within each message
and Hex 0D 0A at the end of every HL7 message WITH ONE EXCEPTION.
9. Enter Ctrl-Home to go to LAST character in the file. This is a Hex 0D character. Use backspace to delete this character, then press enter.
Pressing enter inserts Hex 0D 0A as the last two characters of the file.
10. Save the file to the Cloverleaf server. It is ready to load to a thread in Newline format.
NOTE #1: If you find a “!” character in the original file, you can replace using TWO or THREE “!” characters in Step 3.
Then, in Step 6, you would replace with HEX 21 21 (or HEX 21 21 21). The point is to have somethine unique for this search/replace action.
NOTE #2: If your “raw” file is already saved in DOS format with CR-LF after each message, you will need to insert a step above between Steps 5 and 6, to replace HEX 0A with null, then continue on to Step 6.
Hope this helps!