Let's take a look at a typical HL7 ADT^A04 message. This message is sent when a new patient arrives at the hospital.
The patient's demographics are entered into a HIS (hospital information system), and then the information is
communicated to all the other systems to avoid multiple entries of the patient's demographic information.
Messages are a defined sequence of segments and/or segment groups.
Each segment, group or message set within a message
can be optional and/or repeating.
Each message consists of the segments that are delimited by "carriage return"
characters ("\r" or 0x0D). Each segment is placed on a different line.