SegmentsEach line in a message is referred to as a Segment, with each one having its own semantic purpose. This means that it contains information of a specific type. For example:
As you can see, the sample message in the previous section contains MSH, EVN, PID, NK1 and PV1 segments. There are more then 120 segments defined in version 2.3 of the standard.
Segments consist of fields that are composites. Composites are delimited by "|" (pipe) characters. Each field has its own unique purpose and is defined by the HL7 standard for each segment. The PID segment in HL7 version 2.3 consists of thirty composite fields. Only two of them are mandatory: Patient Name and Patient ID. As you can see, some fields consist of a single value (e.g. field 8), while the other fields consist of a number of values delimited by ^ (e.g. field 5, patient name).
|