A segment is a logical grouping of data elements. In X12, the same segment can be used for different purposes. This means that a field’s meaning can change based on the segment. For example:
The NM1 segment is for any name (patient, provider, organization, doctor)
The DTP segment is for any date (date of birth, discharge date, coverage period)
For more information on the X12 enveloping segments, refer to Structure of X12 Envelopes.