Schedule a demo
Segment

Row definition

Defines the column structure of a tabular data response, specifying the number of columns and each column's name, data type, and maximum length. It is used in response to tabular-style query messages and in waveform-related messages to describe the schema of the data rows that follow in accompanying RDT segments, allowing the receiving system to dynamically parse variable-format result sets.

2fields
2required
v2.9HL7 version
rdf.py
from zato.hl7v2.v2_9 import RDF

rdf = RDF()
rdf.number_of_columns_per_row = '3'
rdf.column_description = [
    'wellness_score^NM^8',
    'steps_daily^NM^6',
    'water_liters^NM^4',
]

Build RDF segments in Python

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

1

Wellness panel columns

Three RDF column definitions for a preventive screening score, activity, and hydration

from zato.hl7v2.v2_9 import RDF

rdf = RDF()
rdf.number_of_columns_per_row = '3'
rdf.column_description = [
    'wellness_score^NM^8',
    'steps_daily^NM^6',
    'water_liters^NM^4',
]
2

Nutrition screening layout

Two columns for fiber intake and daily calories in a food diary export

from zato.hl7v2.v2_9 import RDF

rdf = RDF()
rdf.number_of_columns_per_row = '2'
rdf.column_description = [
    'fiber_grams^NM^5',
    'calories_kcal^NM^6',
]
3

Single fitness metric

One column for VO2-style aerobic capacity in a structured fitness extract

from zato.hl7v2.v2_9 import RDF

rdf = RDF()
rdf.number_of_columns_per_row = '1'
rdf.column_description = [
    'aerobic_capacity^NM^5',
]

Learn by building

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

Frequently asked questions

RDF states how many columns each row has and repeats one RCD per column so receivers know names, HL7 datatypes, and display widths before RDT rows arrive.

Assign a list of encoded RCD strings: segment_field_name, then ^, hl7_data_type, then ^, maximum_column_width. Zato accepts plain strings without an RCD class.

RDF must appear before RDT rows in the same logical table. Each RDT row uses the same column order and count that RDF defines for that extract.

HL70440 classifies column description rows. Follow your integration profile for which table values apply to wellness dashboards and fitness exports.

Append another RCD string to column_description and increment number_of_columns_per_row to match:

from zato.hl7v2.v2_9 import RDF

rdf = RDF()
rdf.number_of_columns_per_row = '2'
rdf.column_description = [
    'sleep_hours^NM^4',
    'resting_hr^NM^3',
]

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.

RDF field reference

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

#Python nameDatatypeUsageRepeatableTable
1number_of_columns_per_rowNMRequiredNo-
2column_descriptionRCDRequiredYesHL70440

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python