Error: MSH segment is either missing or not at the start
Problem
The error “MSH segment is either missing or not at the start" indicates that after parsing an HL7 message with hl7.parse, the MSH segment could not be found or is not at the start.
Causes
MSH segment is missing.
MSH segment is not the first segment.
There is whitespace or character(s) before the MSH segment.
MSH segment is not defined or is not the first child for the corresponding message definition in the vmd.
MSH segment is not defined as a child in the catchall message definition, even if the inbound message is not filtered by the catchall.
Case 5 is only applicable on IguanaX versions 10.1.112 and below.
Solutions