In HL7 messaging, the separator characters are known as the message delimiters or special encoding characters.
| | Field separator, aka pipe |
^ | Component separator, aka hat |
~ | Field repetition separator |
\ | Escape character |
& | Sub-component separator |
The first two fields in the MSH segment define the separator characters to be used throughout the HL7 message. The MSH-1 field defines the field separator, and the MSH-2 field defines the other separator characters for the message in the following order: component, field repeat, escape character, and subcomponent. Here’s an example of an MSH segment with the defined separator characters in MSH-1 and MSH-2:
MSH|^~\&|GPMS|CTX||MED2000|200803060953||SIU^S14|20080306953450|P|2.3||||||||
To learn more about HL7 Separator Codes, enroll in the Academy’s HL7 training course now!