X12 & HIPAA files
The version is the last element in the GS segment or the ST segment. When present, the version in the ST segment takes precedence.
EDIFACT & EANCOM files
The version is the combination of the edition and release component elements following the message type in the UNH segment.