Determine the version from a sample file

X12 (HIPAA)

X12 HIPAA

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)

EDIFACT EANCOM

The version is the combination of the edition and release component elements following the message type in the UNH segment.