The carriage return
character (alias <cr>
, \r
or \x0d
) is the designated segment terminator in a HL7 message.
Therefore this character is prohibited to be used in a field. However, some data may consist of line breaks. How is a line break encoded then? What is the way to go here? What's best practice?
There are some options I see:
- Use line feed (
\n
) instead - Use this special escape sequence
\.br\
- Escape it like this
\x0d\
- Something different?
Which of these options are valid? What can I expect to see in a HL7 message? How should I encode line breaks in my own HL7 messages?