Define a new (required) segment for some messages
with an unparsable structure
V 2.8 HL7 Proposal
Change Request ID:
File Name:
Description:
Status:
HL7-Version
Chapter/Section
Sponsoring Person
Sponsoring Business Unit
Date Originated:
Date HL7 approved:
Backward Compatible:
Forward Compatible:
HL7 Status & Date
678
678 Segment Group end Segment v01.doc
Define a new segment
proposed for Sydney
2.8
4
Frank Oemig
Agfa HealthCare
12/22/10
Yes
Yes
To be reviewed during January 2011 WGM
Justification Detail
The following message definition contains two substructures (marked in red), which do not
allow for a correct parsing. A distinction between ORC+OBR as a normal order and
ORC+OBR as a prior order is not possible:
Sample Message:
MSH|…
PID|…
PV1|…
ORC|…
OBR|…
ORC|…
OBR|…
ORC|…
OBR|…
OMG^O19^OMG_O19
General Clinical Order Message
MSH
[{SFT}]
[ UAC ]
[{NTE}]
[
PID
[ PD1 ]
[{NTE}]
[{NK1}]
[
Message Header
Software
User Authentication Credential
Notes and Comments (for Header)
--- PATIENT begin
Patient Identification
Additional Demographics
Notes and Comments (for Patient ID)
Next of Kin/Associated Parties
--- PATIENT_VISIT begin
1
Status
Chapter
2
2
2
2
3
3
2
3
Conformance Levels
OMG^O19^OMG_O19
PV1
[ PV2 ]
]
[{
IN1
[ IN2 ]
[ IN3 ]
}]
[ GT1 ]
[{AL1}]
]
{
ORC
[{
TQ1
[{TQ2}]
}]
OBR
[{NTE}]
[{ROL}]
[ CTD ]
[{DG1}]
[{
OBX
[{NTE}]
}]
[{
SPM
[{OBX}]
[{
SAC
[{OBX}]
}]
}]
[{
[SGB]
[
PID
[ PD1 ]
]
[
PV1
[ PV2 ]
]
[{AL1}]
{
[ ORC ]
OBR
[{
TQ1
[{TQ2}]
}]
[{NTE}]
[{ROL}]
[ CTD ]
{
OBX
General Clinical Order Message
Patient Visit
Patient Visit- Additional Info
--- PATIENT_VISIT end
--- INSURANCE begin
Insurance
Insurance Additional Information
Insurance Additional Information,
Certification
--- INSURANCE end
Guarantor
Allergy Information
--- PATIENT end
--- ORDER begin
Common Order
--- TIMING begin
Timing/Quantity
Timing/Quantity Order Sequence
--- TIMING end
Observation
Notes and Comments (for Detail)
Role (for Observation)
Contact Data
Diagnosis
--- OBSERVATION begin
Observation/Result
Notes and Comments (for Results)
--- OBSERVATION end
--- SPECIMEN begin
Specimen
Observation/Result
--- CONTAINER begin
Specimen Container
Observation/Result
--- CONTAINER end
--- SPECIMEN end
--- PRIOR_RESULT begin
Segmnent Group Begin
--- PATIENT_PRIOR begin
Patient Identification – previous
Additional Demographics – previous
--- PATIENT_PRIOR end
--- PATIENT_VISIT_PRIOR begin
Patient Visit
– previous
Patient Visit Add. Info – previous
--- PATIENT_VISIT_PRIOR end
Allergy Information
- previous
--- ORDER_PRIOR begin
Common Order
- previous
Order Detail
- previous
--- TIMING_PRIOR begin
Timing/Quantity
Timing/Quantity Order Sequence
--- TIMING_PRIOR end
Notes and Comments
- previous
Role (for Observation) - previous
Contact Data
- previous
--- OBSERVATION_PRIOR begin
Observation/Result
- previous
2
Status
Chapter
3
3
6
6
6
6
3
4
4
4
4
2
15
11
6
7
2
7
7
13
7
2
result
result
3
3
result
result
3
3
result
3
result
result
4
4
4
4
result
result
result
2
15
10
result
7
Conformance Levels
OMG^O19^OMG_O19
General Clinical Order Message
[{NTE}]
Notes and Comments
- previous result
--- OBSERVATION_PRIOR end
--- ORDER_PRIOR end
--- PRIOR_RESULT end
Financial Transaction
Clinical Trial Identification
Billing Segment
--- ORDER end
}
}
}]
[{FT1}]
[{CTI}]
[ BLG ]
}
Status
Chapter
2
6
7
4
One solution would be to populate some segments, e.g. TQ1/TQ2 which would clarify the
structure then. But those segments would contain invalid data which may lead to other
problems in the end.
A better solution seems to be the definition of a new segment, which is required at the end of
the segment group and only used for parsing:
Add explanation that SGB is to be defined in Chapter 2, but can either follow ADD/DSC
pattern, or must be declared in the message structure explicitely. If declared in message
structure, above is where we put it. OO favors explicit declation.
SGE – Segment Group Begin
The SGB segment is only used to provide information about the instantiated message structure to the
parsing process to indicate that a new segment group begins and subsequent segments should be
interpreted accordingly. It does not contain any patient related data.
HL7 Attribute Table – SGB – Segment Group Begin
SEQ
LEN
DT
OPT
1
4
SI
2
60
ST
RP/#
TBL#
ITEM#
ELEMENT NAME
R
?????
Set ID – SGB
O
?????
Segment Group Name
SGB field definitions
SGB-1 Set ID – SGB (SI) ?????
Definition: For the first order transmitted, the sequence number shall be 1; for the second order, it shall
be 2; and so on.
SGB-2 Segement Group Name (ST) ?????
Definition: This field contains the name of the segment group.
Outstanding Issues
none
V3 Implications
none
3
Conformance Levels
V2 Implications
none
v2.xml Implications
none
4
© Copyright 2026 Paperzz