Resources

Rhapsody site logo

HL7 resources

HL7 Encoding Characters

Encoding characters are special characters used to construct an HL7 message, defining how data is separated in an HL7 message. Below are the encoding characters:

  • Field Separator (normally |)
  • Component Separator (normally ^)
  • Subcomponent Separator (normally &)
  • Field Repeat Separator (normally ~)
  • Escape Character (normally \)

Encoding characters are defined dynamically in the MSH segment. The character immediately following the segment “MSH” is the first encoding character, which is the field separator. The rest of the encoding characters are defined in MSH-2, where the four characters in this field define the component separator, repetition separator, escape character, and subcomponent separator in that respective order.

Optimize resource productivity with the most trusted and flexible HL7 and API integration tools in the market

HL7 implementation

In an HL7 message , sometimes the actual data in a field may contain an encoding character, which will require some data manipulation for the message to be sent correctly. For example, keep in mind that the escape character for the subcomponent separator is “&”, data in a message may contain the following: “Patient must rest & ice the knee”. In this case, a system may treat the field in which this data is located as two subcomponents, although it really should be treated as a single field because the “&” is meant to mean “and” and not a subcomponent separator.

Additional information can be found on the HL7 Resource pages on the following topics:

Visit our blog for insights on working with HL7 messaging and other healthcare IT observations.

Register for an upcoming HL7: First Steps training class.

You might also like

HL7 resources

HL7 Data Types

HL7 data types define the kind of data included in a field used in the HL7 message structure. Examples include a string, text, timestamp, address, or coded element.

Read more >

HL7 resources

RIM-Reference Information Model

The HL7 Reference Information Model (RIM) represents a static model of healthcare workflows as viewed by the HL7 standards development group.

Read more >

HL7 resources

Minimum Layer Protocol – MLP

MLP is how an application should wrap an HL7 message to ensure HL7 compliant applications know where a message starts and stops, and where the next message begins.

Read more >