Schedule a demo
Segment

Payee information

Identifies the party receiving payment for a healthcare claim, including the payee type (provider, subscriber, or other), the relationship to the invoice patient, the payee's organization or person name, address, and payment method. It appears in EHC claim and remittance messages (EHC^E01, EHC^E02) to direct payment disbursement to the correct recipient.

7fields
2required
v2.9HL7 version
pye.py
from zato.hl7v2 import PYE

pye = PYE()
pye.set_id_pye = '1'
pye.payee_type = 'PROV'

Build PYE segments in Python

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

1

Provider payee

Payment directed to the provider organization that submitted the claim

from zato.hl7v2.v2_9 import PYE
from zato.hl7v2.v2_9 import CWE, XON

pye = PYE()
pye.set_id_pye = '1'
pye.payee_type = CWE(
    identifier='PROV',
    text='Provider',
    name_of_coding_system='HL70557'
)
pye.payee_identification_list = XON(organization_name='City Hospital')
pye.payment_method = CWE(
    identifier='CHK',
    text='Check',
    name_of_coding_system='HL70570'
)
2

Subscriber payee

Payment directed to the subscriber (patient) with a mailing address

from zato.hl7v2.v2_9 import PYE
from zato.hl7v2.v2_9 import CWE, XPN, XAD

pye = PYE()
pye.set_id_pye = '1'
pye.payee_type = CWE(
    identifier='SUB',
    text='Subscriber',
    name_of_coding_system='HL70557'
)
pye.payee_relationship_to_invoice_patient = CWE(
    identifier='PT',
    text='Patient',
    name_of_coding_system='HL70558'
)
pye.payee_person_name = XPN(
    family_name='DOE',
    given_name='JOHN'
)
pye.payee_address = XAD(
    street_address='100 Main St',
    city='Springfield',
    state='IL',
    zip_code='62701'
)
pye.payment_method = CWE(
    identifier='EFT',
    text='Electronic funds transfer',
    name_of_coding_system='HL70570'
)
3

Third-party payee

Payment directed to a third-party billing organization on behalf of the provider

from zato.hl7v2.v2_9 import PYE
from zato.hl7v2.v2_9 import CWE, XON

pye = PYE()
pye.set_id_pye = '2'
pye.payee_type = CWE(
    identifier='OTH',
    text='Other',
    name_of_coding_system='HL70557'
)
pye.payee_identification_list = XON(
    organization_name=(
        'Billing Services Inc'
    )
)
pye.payment_method = CWE(
    identifier='CHK',
    text='Check',
    name_of_coding_system='HL70570'
)

Learn by building

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

Frequently asked questions

PYE identifies who receives payment for a healthcare claim. It specifies the payee type (provider, subscriber, or other), optionally the payee's relationship to the patient, and includes the payee's name, address, and preferred payment method.

The payee_type field uses the CWE datatype with HL7 table 0557:

from zato.hl7v2.v2_9 import PYE, CWE

pye = PYE()
pye.payee_type = CWE(
    identifier='PROV',
    text='Provider',
    name_of_coding_system='HL70557'
)

The payee_address field uses the XAD datatype:

from zato.hl7v2.v2_9 import PYE, XAD

pye = PYE()
pye.payee_address = XAD(
    street_address='100 Main St',
    city='Springfield',
    state='IL',
    zip_code='62701'
)

The payee_person_name field uses the XPN datatype:

from zato.hl7v2.v2_9 import PYE, XPN

pye = PYE()
pye.payee_person_name = XPN(
    family_name='DOE',
    given_name='JOHN'
)

The payee_identification_list field uses the XON datatype:

from zato.hl7v2.v2_9 import PYE, XON

pye = PYE()
pye.payee_identification_list = XON(organization_name='City Hospital')

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.

PYE field reference

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

#Python nameDatatypeUsageRepeatableTable
1set_id_pyeSIRequiredNo-
2payee_typeCWERequiredNoHL70557
3payee_relationship_to_invoice_patientCWEOptionalNoHL70558
4payee_identification_listXONOptionalNo-
5payee_person_nameXPNOptionalNo-
6payee_addressXADOptionalNo-
7payment_methodCWEOptionalNoHL70570

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python