The MSH segment defines the intent, source, destination, and some specifics of the syntax of a message.

HL7 Attribute Table - MSH - Message Header

21
C.LenElementv2.3.1FHIR
1..1-STR1-00001MSH-1Field Separator-
2..4-STR1-00002MSH-2Encoding Characters-
3..180-HDO1036100003MSH-3Sending Application4 mappings
4..180-HDO1036200004MSH-4Sending Facility5 mappings
5..180-HDO1036100005MSH-5Receiving Application3 mappings
6..180-HDO1036200006MSH-6Receiving Facilitydestination[1].receiver(Organization)
7..26-TSR1-00007MSH-7Date/Time Of MessageOptionality3 mappings
8..40-STO1-00008MSH-8Securitymeta.security
9..15-MSGR1007600009MSH-9Message TypeLength3 mappings
10..20-STR1-00010MSH-10Message Control ID2 mappings
11..3-PTR1-00011MSH-11Processing IDmeta
12..60-VIDR1010400012MSH-12Version ID-
13..15-NMO1-00013MSH-13Sequence Number-
14..180-STO1-00014MSH-14Continuation Pointer-
15..2-IDO1015500015MSH-15Accept Acknowledgment Type-
16..2-IDO1015500016MSH-16Application Acknowledgment Type-
17..3-IDO1039900017MSH-17Country Code2sender(Organization.address.country)
18..16-IDO*021100692MSH-18Character Set-
19..250-CEO1-00693MSH-19Principal Language Of MessageLengthlanguage
20..20-IDO1035601317MSH-20Alternate Character Set Handling Scheme-
21..10-IDO*044901598MSH-21Conformance Statement IDNEW-
184