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.
from zato.hl7v2 import PYE
pye = PYE()
pye.set_id_pye = '1'
pye.payee_type = 'PROV'How to construct and work with real-world PYE segments.
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'
)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'
)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'
)Step-by-step guides for working with HL7 v2 in Zato.
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.
Complete list of fields in the PYE segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | set_id_pye | SI | Required | No | - |
| 2 | payee_type | CWE | Required | No | HL70557 |
| 3 | payee_relationship_to_invoice_patient | CWE | Optional | No | HL70558 |
| 4 | payee_identification_list | XON | Optional | No | - |
| 5 | payee_person_name | XPN | Optional | No | - |
| 6 | payee_address | XAD | Optional | No | - |
| 7 | payment_method | CWE | Optional | No | HL70570 |
Get started with Zato and connect your systems in minutes.