Question: HL7 v2 Backwards Compatibility

Jan 15, 2014

Question

If I code a library to HL7 2.6 standard, will it mostly work for all versions below it? Wikipedia says 2.x is backward compatible, but how backward compatible is it?

Answer In principle, HL7 is highly backward compatible. The basic syntax and structures are unchanged between any version 2.x (as long as you use the vertical bar syntax, which is the normal way). So your code will read earlier messages just fine. In fact, very often the only difference between the message is the value of the MSH-12 field: MSH ^~\& ADT1 MCM LABADT MCM 198808181126   ADT^A17^ADT_A17 MSG00001 P 2.6 If you can parse this, and you don’t explicitly tie your logic to the value of the 12th field of MSH - and I never do - then your library is version independent. However, as the versions have rolled on, additional fields have been added. If your logic depends on a value of an additional field that was defined in a more recent version, then your logic won’t be backward compatible.