Here is an example of an HL7 message:
MSH|^~\&||.|||199908180016||ADT^A04|ADT.1.1698593|P|2.7 PID|1||000395122||LEVERKUHN^ADRIAN^C||19880517180606|M|||6 66TH AVE NE^^WEIMAR^DL^98052||(157)983-3296|||S||12354768|87654321 NK1|1|TALLIS^THOMAS^C|GRANDFATHER|12914 SPEM ST^^ALIUM^IN^98052|(157)883-6176 NK1|2|WEBERN^ANTON|SON|12 STRASSE MUSIK^^VIENNA^AUS^11212|(123)456-7890 IN1|1|PRE2||LIFE PRUDENT BUYER|PO BOX 23523^WELLINGTON^ON^98111|||19601||||||||THOMAS^JAMES^M|F|||||||||||||||||||ZKA535529776
The above message is divided into four different types of segments: MSH, PID, NK1 and IN1.
A segment contains fields separated by a field separator | . Fields can be further separated by ^ , the so-called component separator, and contain subcomponents indicated by & .
MSH (message header) reports the purpose of the message, for example. its identifier, sowing application, sending means, receiving application, receiving means, type, date and time of message, its version of HL7, etc.
PID (Patient Identification) contains patient information, for example. their identifier, name, ADD, address, gender, race, date and time of admission, etc.
NK1 (Next of Kin) contains information about a relative / other person.
IN1 (insurance 1) contains detailed information about the health insurance that the patient has, for example, Medicare, Medicaid, Tricare, etc. It contains the identifier of the insurance plan, the name of the insurance company, the address of the company, the name of the insured person, policy number, etc.