Schedule a demo
Segment

Abstract

Contains clinical abstracting information for a patient encounter including the discharge care provider, transfer medical service, severity of illness, triage code, and case category. It also carries newborn-specific data such as gestation category, gestation period in weeks, newborn code, caesarian section indicator, and stillborn indicator. This segment supports clinical data abstraction and quality reporting workflows.

14fields
0required
v2.9HL7 version
abs.py
from zato.hl7v2 import ABS

abs_seg = ABS()
abs_seg.severity_of_illness_code = 'MI'
abs_seg.triage_code = 'UR'
abs_seg.case_category_code = 'IN'

Build ABS segments in Python

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

1

Discharge abstract

Clinical abstract with discharge provider, severity of illness, and case category

from zato.hl7v2.v2_9 import ABS
from zato.hl7v2.v2_9 import XCN, CWE

abs_seg = ABS()
abs_seg.discharge_care_provider = XCN(
    person_identifier='1234',
    family_name='DOE',
    given_name='JOHN',
    suffix='MD'
)
abs_seg.transfer_medical_service_code = CWE(
    identifier='MED',
    text='Medicine',
    name_of_coding_system='HL70069'
)
abs_seg.severity_of_illness_code = CWE(
    identifier='MI',
    text='Minor',
    name_of_coding_system='HL70421'
)
abs_seg.date_time_of_attestation = '20240601'
abs_seg.triage_code = CWE(
    identifier='UR',
    text='Urgent',
    name_of_coding_system='HL70422'
)
abs_seg.abstract_completion_date_time = (
    '20240615'
)
abs_seg.abstracted_by = XCN(
    person_identifier='5678',
    family_name='SMITH',
    given_name='ANNA'
)
abs_seg.case_category_code = CWE(
    identifier='IN',
    text='Inpatient',
    name_of_coding_system='HL70423'
)
2

Newborn record

Abstract with gestation data, newborn code, and caesarian section indicator

from zato.hl7v2.v2_9 import ABS
from zato.hl7v2.v2_9 import CWE

abs_seg = ABS()
abs_seg.severity_of_illness_code = CWE(
    identifier='MO',
    text='Moderate',
    name_of_coding_system='HL70421'
)
abs_seg.date_time_of_attestation = '20240801'
abs_seg.caesarian_section_indicator = 'Y'
abs_seg.gestation_category_code = CWE(
    identifier='FT',
    text='Full term',
    name_of_coding_system='HL70424'
)
abs_seg.gestation_period_weeks = '38'
abs_seg.newborn_code = CWE(
    identifier='SI',
    text='Single',
    name_of_coding_system='HL70425'
)
abs_seg.stillborn_indicator = 'N'
3

Attestation record

Abstract with attestation details and the attesting provider identified

from zato.hl7v2.v2_9 import ABS
from zato.hl7v2.v2_9 import XCN, CWE

abs_seg = ABS()
abs_seg.date_time_of_attestation = '20240901'
abs_seg.attested_by = XCN(
    person_identifier='9900',
    family_name='WONG',
    given_name='LEE',
    suffix='MD'
)
abs_seg.triage_code = CWE(
    identifier='EM',
    text='Emergency',
    name_of_coding_system='HL70422'
)
abs_seg.abstract_completion_date_time = (
    '20240910'
)
abs_seg.abstracted_by = XCN(
    person_identifier='8811',
    family_name='REED',
    given_name='MARK'
)
abs_seg.case_category_code = CWE(
    identifier='OP',
    text='Outpatient',
    name_of_coding_system='HL70423'
)

Learn by building

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

Frequently asked questions

ABS carries clinical abstracting data for a patient encounter. It includes the discharge care provider, severity of illness, triage code, case category, and newborn-related fields such as gestation period and stillborn indicator. It supports quality reporting and clinical data abstraction.

The severity_of_illness_code field uses CWE with HL7 table 0421:

from zato.hl7v2.v2_9 import ABS, CWE

abs_seg = ABS()
abs_seg.severity_of_illness_code = CWE(
    identifier='MI',
    text='Minor',
    name_of_coding_system='HL70421'
)

Use the gestation, newborn, and caesarian fields together:

from zato.hl7v2.v2_9 import ABS, CWE

abs_seg = ABS()
abs_seg.caesarian_section_indicator = 'Y'
abs_seg.gestation_category_code = CWE(
    identifier='FT',
    text='Full term',
    name_of_coding_system='HL70424'
)
abs_seg.gestation_period_weeks = '38'
abs_seg.newborn_code = CWE(
    identifier='SI',
    text='Single',
    name_of_coding_system='HL70425'
)
abs_seg.stillborn_indicator = 'N'

The discharge_care_provider field uses XCN with HL7 table 0010:

from zato.hl7v2.v2_9 import ABS, XCN

abs_seg = ABS()
abs_seg.discharge_care_provider = XCN(
    person_identifier='1234',
    family_name='DOE',
    given_name='JOHN',
    suffix='MD'
)

The triage_code field uses CWE with HL7 table 0422:

from zato.hl7v2.v2_9 import ABS, CWE

abs_seg = ABS()
abs_seg.triage_code = CWE(
    identifier='UR',
    text='Urgent',
    name_of_coding_system='HL70422'
)

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.

ABS field reference

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

#Python nameDatatypeUsageRepeatableTable
1discharge_care_providerXCNOptionalNoHL70010
2transfer_medical_service_codeCWEOptionalNoHL70069
3severity_of_illness_codeCWEOptionalNoHL70421
4date_time_of_attestationDTMOptionalNo-
5attested_byXCNOptionalNo-
6triage_codeCWEOptionalNoHL70422
7abstract_completion_date_timeDTMOptionalNo-
8abstracted_byXCNOptionalNo-
9case_category_codeCWEOptionalNoHL70423
10caesarian_section_indicatorIDOptionalNoHL70136
11gestation_category_codeCWEOptionalNoHL70424
12gestation_period_weeksNMOptionalNo-
13newborn_codeCWEOptionalNoHL70425
14stillborn_indicatorIDOptionalNoHL70136

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python