Schema data definitions

The schemas contains the data definitions used in the HL7 standard. These data definitions include file, batch, and message formats. File protocol HL7 is the top-level group in the schemas.

An EDI message contains special characters called delimiters. These characters enable parsing of the message. The delimiters are:

  • segment terminator
  • subcomponent separator
  • field separator
  • repetition separator
  • component separator
  • escape character

The segment terminator, defined to be used with HL7 messages, is a carriage return (in ASCII, a hex 0D). The other delimiters are defined in the MSH segment, with the field separator in the fourth character position and the other delimiters occurring in the first field segment after the segment ID.

The following delimiter values specified in the MSH segment are used throughout the entire HL7 message:

MSH|^~\&  
  | = field separator
  ^ = comp separator
  ~ = repetition character
  \ = EscapeCharacter separator
  & = subcomponent

The following example shows a segment (ERR) that contains all of the delimiters:

ERR|IPR^10^8~IPR||CWE^ERR03|W|CWE^ERR05|||||CWE^ERR10|CWE^ERR11|PRN^PH^Add
res^034^444^5556666^^Any Text^^^^^^CWE&XTN Sub-Element^<cr>