Carries the header information for a patient referral, including referral status, priority, type (medical, psychiatric, and others), disposition, referral identifiers, effective and expiration dates, and the referral reason. It is the anchor segment in REF (Patient Referral) and RRI (Referral Response) messages sent between referring provider systems and referred-to provider systems to initiate, track, and respond to inter-provider referrals.
from zato.hl7v2.v2_9 import RF1
from zato.hl7v2.v2_9 import CWE, EI
rf1 = RF1()
rf1.referral_status = CWE(
identifier='A',
text='Accepted',
name_of_coding_system='HL70283'
)
rf1.referral_type = CWE(
identifier='WEL',
text='Wellness Program',
name_of_coding_system='HL70281'
)
referral_id = EI(entity_identifier='REF202401150001')
rf1.originating_referral_identifier = referral_idHow to construct and work with real-world RF1 segments.
Referral to fitness coaching program
from zato.hl7v2.v2_9 import RF1
from zato.hl7v2.v2_9 import CWE, EI, DTM
rf1 = RF1()
rf1.referral_status = CWE(
identifier='A',
text='Accepted',
name_of_coding_system='HL70283'
)
rf1.referral_type = CWE(
identifier='WEL',
text='Wellness Program',
name_of_coding_system='HL70281'
)
rf1.originating_referral_identifier = EI(entity_identifier='REF202401150001')
rf1.effective_date = DTM('20240115')
rf1.expiration_date = DTM('20240415')
rf1.referral_reason = 'Fitness coaching for preventive health'Referral to dietary services
from zato.hl7v2.v2_9 import RF1
from zato.hl7v2.v2_9 import CWE, EI, DTM
rf1 = RF1()
rf1.referral_status = CWE(
identifier='A',
text='Accepted',
name_of_coding_system='HL70283'
)
rf1.referral_type = CWE(
identifier='NUT',
text='Nutrition Services',
name_of_coding_system='HL70281'
)
rf1.originating_referral_identifier = EI(entity_identifier='REF202401160002')
rf1.effective_date = DTM('20240116')
rf1.expiration_date = DTM('20240716')
rf1.referral_reason = 'Dietary counseling for wellness goals'Referral for annual wellness screening
from zato.hl7v2.v2_9 import RF1
from zato.hl7v2.v2_9 import CWE, EI, DTM
rf1 = RF1()
rf1.referral_status = CWE(
identifier='P',
text='Pending',
name_of_coding_system='HL70283'
)
rf1.referral_type = CWE(
identifier='PRV',
text='Preventive Care',
name_of_coding_system='HL70281'
)
rf1.originating_referral_identifier = EI(entity_identifier='REF202401170003')
rf1.effective_date = DTM('20240117')
rf1.expiration_date = DTM('20240217')
rf1.referral_reason = 'Annual wellness screening'Step-by-step guides for working with HL7 v2 in Zato.
RF1 contains referral information including status, type, providers, and reason. It coordinates referrals between wellness programs, nutrition services, and preventive care providers.
Use HL70283 table values for referral status like A (Accepted) or P (Pending):
rf1.referral_status = CWE(
identifier='A',
text='Accepted',
name_of_coding_system='HL70283'
)Use HL70281 table values for referral types. Common wellness types include WEL (Wellness Program), NUT (Nutrition Services), and PRV (Preventive Care).
Use effective_date and expiration_date fields to define when the referral is valid. This helps wellness centers manage referral lifecycles.
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 RF1 segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | referral_status | CWE | Optional | No | HL70283 |
| 2 | referral_priority | CWE | Optional | No | HL70280 |
| 3 | referral_type | CWE | Optional | No | HL70281 |
| 4 | referral_disposition | CWE | Optional | Yes | HL70282 |
| 5 | referral_category | CWE | Optional | No | HL70284 |
| 6 | originating_referral_identifier | EI | Required | No | - |
| 7 | effective_date | DTM | Optional | No | - |
| 8 | expiration_date | DTM | Optional | No | - |
| 9 | process_date | DTM | Optional | No | - |
| 10 | referral_reason | CWE | Optional | Yes | HL70336 |
| 11 | external_referral_identifier | EI | Optional | Yes | - |
| 12 | referral_documentation_completion_status | CWE | Optional | No | HL70865 |
| 13 | planned_treatment_stop_date | DTM | Optional | No | - |
| 14 | referral_reason_text | ST | Optional | No | - |
| 15 | number_of_authorized_treatments_units | CQ | Optional | No | - |
| 16 | number_of_used_treatments_units | CQ | Optional | No | - |
| 17 | number_of_schedule_treatments_units | CQ | Optional | No | - |
| 18 | remaining_benefit_amount | MO | Optional | No | - |
| 19 | authorized_provider | XON | Optional | No | - |
| 20 | authorized_health_professional | XCN | Optional | No | - |
| 21 | source_text | ST | Optional | No | - |
| 22 | source_date | DTM | Optional | No | - |
| 23 | source_phone | XTN | Optional | No | - |
| 24 | comment | ST | Optional | No | - |
| 25 | action_code | ID | Optional | No | HL70206 |
Get started with Zato and connect your systems in minutes.