Schedule a demo
Segment

Insurance

Carries primary insurance plan information including plan identifier, company name and address, group and policy numbers, insured's name, coordination of benefits priority, and coverage dates. It is a repeating segment (one per insurance plan) found in ADT, BAR, and DFT messages. Registration and patient accounting systems send IN1 to billing, claims, and eligibility verification systems.

52fields
3required
v2.9HL7 version
in1.py
from zato.hl7v2 import IN1

in1 = IN1()
in1.set_id_in1 = '1'
in1.health_plan_id = 'PPO'
in1.insurance_company_id = 'INS001'
in1.group_number = 'GRP100'

Build IN1 segments in Python

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

1

Plan enrollment

Basic insurance enrollment with company name, group, and plan effective dates

from zato.hl7v2.v2_9 import IN1
from zato.hl7v2.v2_9 import CWE, CX, XON

in1 = IN1()
in1.set_id_in1 = '1'
in1.health_plan_id = CWE(identifier='PPO')
in1.insurance_company_id = CX(id_number='INS001')
in1.group_number = 'GRP100'
in1.insureds_group_emp_name = XON(organization_name='GREENVALLEY WELLNESS')
in1.plan_effective_date = '20240101'
in1.plan_expiration_date = '20241231'
2

Family coverage

Insurance with insured name, relationship to patient, and coordination of benefits

from zato.hl7v2.v2_9 import IN1
from zato.hl7v2.v2_9 import CWE, CX, XON, XPN

in1 = IN1()
in1.set_id_in1 = '1'
in1.health_plan_id = CWE(identifier='HMO')
in1.insurance_company_id = CX(id_number='INS002')
in1.insurance_company_name = XON(organization_name='BRIGHT HEALTH PLANS')
in1.group_number = 'GRP200'
in1.plan_effective_date = '20240301'
in1.plan_expiration_date = '20250228'
in1.plan_type = CWE(identifier='PPO')
in1.name_of_insured = XPN(
    family_name='SMITH',
    given_name='ALICE',
    middle_name='M'
)
in1.insureds_relationship_to_patient = CWE(identifier='SPO')
in1.coordination_of_benefits = CWE(identifier='CO')
in1.coord_of_ben_priority = '1'
3

Verification

Insurance eligibility verified by a provider with policy and company details

from zato.hl7v2.v2_9 import IN1
from zato.hl7v2.v2_9 import CWE, CX, XON, XPN, XTN, XCN

in1 = IN1()
in1.set_id_in1 = '1'
in1.health_plan_id = CWE(identifier='EPO')
in1.insurance_company_id = CX(id_number='INS003')
in1.insurance_company_name = XON(organization_name='SUNLIGHT BENEFITS')
in1.insurance_co_contact_person = XPN(
    family_name='CLARK',
    given_name='DANA'
)
in1.insurance_co_phone_number = XTN(
    telecommunication_use_code='WPN',
    telecommunication_equipment_type='PH',
    country_code='1',
    area_city_code='800',
    local_number='5550100'
)
in1.group_number = 'GRP300'
in1.verification_date_time = '20240601120000'
in1.verification_by = XCN(
    person_identifier='7890',
    family_name='WELLS',
    given_name='MARIA',
    suffix='MD'
)

Learn by building

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

Frequently asked questions

IN1 carries insurance coverage details - the health plan, insurance company, group number, policy dates, insured person information, coordination of benefits, and verification status. It appears in ADT, BAR, and DFT messages for billing and eligibility workflows.

Create the segment, set its fields, then read them back:

from zato.hl7v2.v2_9 import IN1, CWE

in1 = IN1()
in1.health_plan_id = CWE(identifier='PPO')
in1.group_number = 'GRP100'

plan = in1.health_plan_id
group = in1.group_number

Use the insurance_company_name field with the XON datatype and the contact fields:

from zato.hl7v2.v2_9 import IN1, XON, XPN

in1 = IN1()
in1.insurance_company_name = XON(organization_name='Bright Health')
in1.insurance_co_contact_person = XPN(
    family_name='Clark',
    given_name='Dana'
)

Create separate IN1 instances for primary, secondary, and tertiary coverage, each with its own set_id_in1:

from zato.hl7v2.v2_9 import IN1, CWE

primary = IN1()
primary.set_id_in1 = '1'
primary.health_plan_id = CWE(identifier='PPO')

secondary = IN1()
secondary.set_id_in1 = '2'
secondary.health_plan_id = CWE(identifier='HMO')

Use coordination_of_benefits with HL7 table 0173 and coord_of_ben_priority for ordering:

from zato.hl7v2.v2_9 import IN1, CWE

in1 = IN1()
in1.coordination_of_benefits = CWE(identifier='CO')
in1.coord_of_ben_priority = '1'

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.

IN1 field reference

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

#Python nameDatatypeUsageRepeatableTable
1set_id_in1SIRequiredNo-
2health_plan_idCWERequiredNoHL70072
3insurance_company_idCXRequiredYes-
4insurance_company_nameXONOptionalYes-
5insurance_company_addressXADOptionalYes-
6insurance_co_contact_personXPNOptionalYes-
7insurance_co_phone_numberXTNOptionalYes-
8group_numberSTOptionalNo-
9group_nameXONOptionalYes-
10insureds_group_emp_idCXOptionalYes-
11insureds_group_emp_nameXONOptionalYes-
12plan_effective_dateDTOptionalNo-
13plan_expiration_dateDTOptionalNo-
14authorization_informationAUIOptionalNo-
15plan_typeCWEOptionalNoHL70086
16name_of_insuredXPNOptionalYes-
17insureds_relationship_to_patientCWEOptionalNoHL70063
18insureds_date_of_birthDTMOptionalNo-
19insureds_addressXADOptionalYes-
20assignment_of_benefitsCWEOptionalNoHL70135
21coordination_of_benefitsCWEOptionalNoHL70173
22coord_of_ben_prioritySTOptionalNo-
23notice_of_admission_flagIDOptionalNoHL70136
24notice_of_admission_dateDTOptionalNo-
25report_of_eligibility_flagIDOptionalNoHL70136
26report_of_eligibility_dateDTOptionalNo-
27release_information_codeCWEOptionalNoHL70093
28pre_admit_cert_pacSTOptionalNo-
29verification_date_timeDTMOptionalNo-
30verification_byXCNOptionalYes-
31type_of_agreement_codeCWEOptionalNoHL70098
32billing_statusCWEOptionalNoHL70022
33lifetime_reserve_daysNMOptionalNo-
34delay_before_lr_dayNMOptionalNo-
35company_plan_codeCWEOptionalNoHL70042
36policy_numberSTOptionalNo-
37policy_deductibleCPOptionalNo-
39policy_limit_daysNMOptionalNo-
42insureds_employment_statusCWEOptionalNoHL70066
43insureds_administrative_sexCWEOptionalNoHL70001
44insureds_employers_addressXADOptionalYes-
45verification_statusSTOptionalNo-
46prior_insurance_plan_idCWEOptionalNoHL70072
47coverage_typeCWEOptionalNoHL70309
48handicapCWEOptionalNoHL70295
49insureds_id_numberCXOptionalYes-
50signature_codeCWEOptionalNoHL70535
51signature_code_dateDTOptionalNo-
52insureds_birth_placeSTOptionalNo-
53vip_indicatorCWEOptionalNoHL70099
54external_health_plan_identifiersCXOptionalYes-
55insurance_action_codeIDOptionalNoHL70206

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python