HL7 v2 MSH-12 Field Guide: Version ID Codes and Common Mistakes
MSH-12 tells a receiving system which revision of the standard the rest of the message follows, and it matters more than it looks — fields that are optional in one version can be required, repositioned, or renamed in another.
MSH-12 is the twelfth field of the MSH segment — a code identifying the HL7 v2 version the message conforms to, such as 2.3, 2.5.1, or 2.7.
Common values
Example
The 12th field, 2.5.1, declares which HL7 v2 revision the rest of the message conforms to. Synthetic message — not a real transmission.
Where this trips people up
A parser built and tested against one HL7 version can silently misread messages from a partner running a different version, because the version number in MSH-12 rarely gets checked at parse time — it is treated as informational rather than something the parser branches on, so a field that shifted position or meaning between versions gets read using the wrong assumption without raising any error at all.