Schedule a demo
Segment

Application control level statistics

Carries application-level communication statistics such as message counts sent and received, character counts, and error tallies for a given network link. It is used in NMQ (Network Management Query) and NMD (Network Management Data) messages to allow system management applications to monitor the health and throughput of HL7 interfaces between systems.

15fields
1required
v2.9HL7 version
nst.py
from zato.hl7v2.v2_9 import NST

nst = NST()
nst.statistics_available = 'Y'
nst.source_identifier = 'LAB-INTERFACE'
nst.messages_received = '1500'
nst.messages_sent = '1498'

Build NST segments in Python

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

1

Daily statistics for a lab interface

A daily statistics summary showing that the lab interface is active, with the collection period start time and message counts

from zato.hl7v2.v2_9 import NST

nst = NST()
nst.statistics_available = 'Y'
nst.source_identifier = 'LAB-INTERFACE-01'
nst.source_type = 'I'
nst.statistics_start = '20240601000000'
nst.statistics_end = '20240601235959'
2

Weekly message throughput for an ADT feed

A weekly throughput report for an ADT interface showing character counts and message totals for the period

from zato.hl7v2.v2_9 import NST

nst = NST()
nst.statistics_available = 'Y'
nst.source_identifier = 'ADT-FEED-EAST'
nst.source_type = 'A'
nst.statistics_start = '20240701000000'
nst.statistics_end = '20240707235959'
nst.receive_character_count = '524000'
nst.send_character_count = '518000'
nst.messages_received = '4200'
nst.messages_sent = '4195'
3

Monthly statistics for a pharmacy interface

A comprehensive monthly report for a pharmacy interface including message volumes, character counts, and error tallies

from zato.hl7v2.v2_9 import NST

nst = NST()
nst.statistics_available = 'Y'
nst.source_identifier = 'PHARM-LINK-03'
nst.source_type = 'I'
nst.statistics_start = '20240801000000'
nst.statistics_end = '20240831235959'
nst.receive_character_count = '2150000'
nst.send_character_count = '2140000'
nst.messages_received = '18500'
nst.messages_sent = '18490'
nst.checksum_errors_received = '0'
nst.length_errors_received = '0'
nst.other_errors_received = '0'
nst.connect_timeouts = '0'
nst.receive_timeouts = '0'
nst.application_control_level_errors = '0'

Learn by building

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

Frequently asked questions

NST contains application control level statistics including message counts, error counts, and performance metrics for monitoring wellness system health.

Use statistics_start and statistics_end fields:

nst.statistics_start = DTM('20240115120000')
nst.statistics_end = DTM('20240115180000')

NST tracks checksum errors, length errors, and other receive errors. These help identify communication issues with wellness applications.

NST contains statistics while NSC contains status change information. Both are used for monitoring wellness application health.

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.

NST field reference

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

#Python nameDatatypeUsageRepeatableTable
1statistics_availableIDRequiredNoHL70136
2source_identifierSTOptionalNo-
3source_typeIDOptionalNoHL70332
4statistics_startDTMOptionalNo-
5statistics_endDTMOptionalNo-
6receive_character_countNMOptionalNo-
7send_character_countNMOptionalNo-
8messages_receivedNMOptionalNo-
9messages_sentNMOptionalNo-
10checksum_errors_receivedNMOptionalNo-
11length_errors_receivedNMOptionalNo-
12other_errors_receivedNMOptionalNo-
13connect_timeoutsNMOptionalNo-
14receive_timeoutsNMOptionalNo-
15application_control_level_errorsNMOptionalNo-

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python