Schedule a demo
Segment

Notes and comments

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.

9fields
0required
v2.9HL7 version
nte.py
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'
)

Build NTE segments in Python

How to construct and work with real-world NTE segments.

1

Wellness consultation note

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'
)
2

Fitness assessment observations

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',
)
3

Nutrition program comment

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'

Learn by building

Step-by-step guides for working with HL7 v2 in Zato.

Frequently asked questions

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.

NTE field reference

Complete list of fields in the NTE segment, HL7 v2.9.

#Python nameDatatypeUsageRepeatableTable
1set_id_nteSIOptionalNo-
2source_of_commentIDOptionalNoHL70105
3commentFTOptionalYes-
4comment_typeCWEOptionalNoHL70364
5entered_byXCNOptionalNo-
6entered_date_timeDTMOptionalNo-
7effective_start_dateDTMOptionalNo-
8expiration_dateDTMOptionalNo-
9coded_commentCWEOptionalYesHL70611

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python