MSH-1 Field Separator Must Be Exactly One Character
MSH-1 is the single character immediately following the literal "MSH". It defines the field separator for the whole message. The validator found zero or more than one character there.
HL7v2 · Error
The error
MSH-1 (field separator) must be exactly one characterWhy it happens
A space accidentally inserted after MSH, the field separator doubled, or the message truncated right after MSH. Re-encoding through a system that normalizes delimiters can also corrupt MSH-1.
How to fix it
Ensure exactly one delimiter character sits between "MSH" and the encoding characters. The conventional value is the pipe (|). Whatever you use becomes the field separator for every other segment.
Example
The snippet below triggers the error:
MSH||^~\&|SENDAPP|SENDFAC|RCVAPP|RCVFAC|20240115||ADT^A01|MSG001|P|2.5The corrected version:
MSH|^~\&|SENDAPP|SENDFAC|RCVAPP|RCVFAC|20240115||ADT^A01|MSG001|P|2.5Frequently asked questions
Does the field separator have to be a pipe?
No, but it must be exactly one character and it must match what the rest of the message actually uses. The pipe (|) is the near-universal convention and the safest choice for interoperability.
Related
- Open the HL7v2 Validator
- All validation errors
- Message Does Not Begin With an MSH Segment
- MSH-2 Encoding Characters Must Be Exactly 4 Characters
- Delimiter Characters Are Not Unique
- Required Segment Is Missing
- Required Field Is Missing or Empty
- Segment Appears More Times Than Allowed
- Segment Is Not Defined in This HL7v2 Version
- Invalid Message Type and Trigger Event Combination