A general-purpose segment for carrying free-text notes and comments associated with the preceding segment. It appears in virtually every HL7 v2 message type - following OBR or OBX in results, ORC in orders, PID in ADT messages, and so on - and repeats for multiple comment lines. Lab systems, EHRs, radiology, and other clinical systems use NTE extensively to transmit narrative text, result interpretations, order instructions, and clinical notes.
from zato.hl7v2.v2_9 import NTE
from zato.hl7v2.v2_9 import CWE, XCN
nte = NTE()
nte.set_id_nte = '1'
nte.source_of_comment = 'O'
nte.comment = ['Hydration goals reviewed']
nte.comment_type = CWE(
identifier='COACH',
text='Coaching note',
name_of_coding_system='HL70364',
)
nte.entered_by = XCN(
person_identifier='COACH01',
family_name='Rivera',
given_name='Maria',
)
nte.entered_date_time = '20260404103000'
nte.coded_comment = CWE(
identifier='WELL',
text='Wellness tag',
name_of_coding_system='HL70611'
)How to construct and work with real-world NTE segments.
Coaching note with author, effective window, and coded wellness tag
from zato.hl7v2.v2_9 import NTE
from zato.hl7v2.v2_9 import CWE, XCN
nte = NTE()
nte.set_id_nte = '1'
nte.source_of_comment = 'O'
nte.comment = ['Hydration goals reviewed']
nte.comment_type = CWE(
identifier='COACH',
text='Coaching note',
name_of_coding_system='HL70364',
)
nte.entered_by = XCN(
person_identifier='COACH01',
family_name='Rivera',
given_name='Maria',
)
nte.entered_date_time = '20260404103000'
nte.effective_start_date = '20260401080000'
nte.expiration_date = '20261201000000'
nte.coded_comment = CWE(
identifier='WELL',
text='Wellness tag',
name_of_coding_system='HL70611'
)Repeating comment lines for strength and mobility coaching notes
from zato.hl7v2.v2_9 import NTE
from zato.hl7v2.v2_9 import CWE
nte = NTE()
nte.set_id_nte = '2'
nte.source_of_comment = 'O'
nte.comment = [
'Strength targets noted',
'Mobility plan updated',
]
nte.comment_type = CWE(
identifier='FIT',
text='Fitness note',
name_of_coding_system='HL70364',
)Entered-by stamp with follow-up scheduling context
from zato.hl7v2.v2_9 import NTE
from zato.hl7v2.v2_9 import CWE, XCN
nte = NTE()
nte.set_id_nte = '3'
nte.source_of_comment = 'P'
nte.comment = ['Nutrition coaching follow-up scheduled']
nte.comment_type = CWE(
identifier='NUTRI',
text='Nutrition note',
name_of_coding_system='HL70364',
)
nte.entered_by = XCN(
person_identifier='NUT01',
family_name='Chen',
given_name='Alex',
)
nte.entered_date_time = '20260405141500'Step-by-step guides for working with HL7 v2 in Zato.
NTE often follows ORC, OBR, OBX, PID, PV1, or MSH groups to add human-readable notes. Position depends on the message profile; keep the same order your trading partner documents for wellness or screening feeds.
Field comment repeats in ER7 with ~ between occurrences. In Python, assign a list of formatted text strings:
from zato.hl7v2.v2_9 import NTE
nte = NTE()
nte.comment = [
'Strength targets noted',
'Mobility plan updated',
]comment_type is a CWE bound to HL70364. Use identifier, text, and coding system name together for clear display in coaching or screening tools:
from zato.hl7v2.v2_9 import NTE, CWE
nte = NTE()
nte.comment_type = CWE(
identifier='COACH',
text='Coaching note',
name_of_coding_system='HL70364',
)coded_comment carries optional HL70611 tags as repeating CWE entries. Supply a list when you need more than one structured label on the same note row.
Populate entered_by with XCN and align entered_date_time with the same event:
from zato.hl7v2.v2_9 import NTE, XCN
nte = NTE()
nte.entered_by = XCN(
person_identifier='COACH01',
family_name='Rivera',
given_name='Maria',
)
nte.entered_date_time = '20260404103000'Zato connects to any system that speaks HL7v2 over MLLP or FHIR over REST. This includes Epic, Cerner, Meditech, Allscripts, and other EHR platforms.
Yes, Zato has built-in MLLP support for sending and receiving HL7v2 messages. MLLP channels handle the framing protocol automatically.
Zato supports HL7 v2.9, which is backward compatible with earlier versions including v2.3, v2.5, and v2.7. Standard segments and datatypes are available as typed Python classes.
Yes. Zato handles both HL7v2 and FHIR natively, so you can parse v2 messages and build FHIR resources with IG-specific extensions in the same service. Typed Python classes are available for both protocols, including extensions from US Core, UK Core, Da Vinci, and other Implementation Guides.
Complete list of fields in the NTE segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | set_id_nte | SI | Optional | No | - |
| 2 | source_of_comment | ID | Optional | No | HL70105 |
| 3 | comment | FT | Optional | Yes | - |
| 4 | comment_type | CWE | Optional | No | HL70364 |
| 5 | entered_by | XCN | Optional | No | - |
| 6 | entered_date_time | DTM | Optional | No | - |
| 7 | effective_start_date | DTM | Optional | No | - |
| 8 | expiration_date | DTM | Optional | No | - |
| 9 | coded_comment | CWE | Optional | Yes | HL70611 |
Get started with Zato and connect your systems in minutes.