Schedule a demo
Segment

Staff identification

Serves as the primary staff and personnel master file segment, carrying identifiers, name, staff type (provider, staff, system user), department, phone, email, and active or inactive status. It is the anchor segment in MFN staff master file messages and can also be used in PMU (Personnel Management) messages. It is sent by credentialing, HR, or provider enrollment systems to synchronize personnel data across EHR, scheduling, and order entry systems.

41fields
0required
v2.9HL7 version
stf.py
from zato.hl7v2.v2_9 import STF
from zato.hl7v2.v2_9 import XCN, XTN

stf = STF()
stf.primary_key_value_stf = '1'
stf.staff_identifier_code = XCN(
    person_identifier_type='NPI',
    id_number='1234567890',
    family_name='Johnson',
    given_name='Sarah'
)
stf.staff_name = XCN(
    family_name='Johnson',
    given_name='Sarah'
)
stf.staff_type = 'PHY'
stf.primary_phone = XTN(
    telecommunication_use_code='WPN',
    telecommunication_equipment_type='PH',
    local_number='5550100'
)

Build STF segments in Python

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

1

Wellness program coordinator

Primary health coach managing preventive care programs

from zato.hl7v2.v2_9 import STF
from zato.hl7v2.v2_9 import XCN, XON, XTN

stf = STF()
stf.primary_key_value_stf = '1'
stf.staff_identifier_code = XCN(
    person_identifier_type='NPI',
    id_number='1234567890',
    family_name='Johnson',
    given_name='Sarah'
)
stf.staff_name = XCN(
    family_name='Johnson',
    given_name='Sarah',
    name_type_code='D'
)
stf.staff_type = {
    'staff_type': 'PHY',
    'description': 'Physician',
    'coding_system': 'HL70182'
}
stf.organization_name_stf = XON(
    organization_name=
        'Active Life Wellness'
)
stf.primary_phone = XTN(
    telecommunication_use_code='WPN',
    telecommunication_equipment_type='PH',
    country_code='1',
    area_city_code='303',
    local_number='5550100'
)
stf.primary_email = XTN(
    telecommunication_use_code='NET',
    telecommunication_equipment_type='Internet',
    email_address='sarah.johnson@example.com'
)
2

Fitness instructor specialist

Exercise physiologist leading group fitness programs

from zato.hl7v2.v2_9 import STF
from zato.hl7v2.v2_9 import XCN, XON, XTN

stf = STF()
stf.primary_key_value_stf = '2'
stf.staff_identifier_code = XCN(
    person_identifier_type='NPI',
    id_number='9876543210',
    family_name='Miller',
    given_name='Michael'
)
stf.staff_name = XCN(
    family_name='Miller',
    given_name='Michael',
    name_type_code='D'
)
stf.staff_type = {
    'staff_type': 'FIT',
    'description': 'Fitness Instructor',
    'coding_system': 'HL70182'
}
stf.organization_name_stf = XON(
    organization_name=
        'River Valley Wellness'
)
stf.primary_phone = XTN(
    telecommunication_use_code='WPN',
    telecommunication_equipment_type='PH',
    country_code='1',
    area_city_code='303',
    local_number='5550200'
)
3

Nutrition specialist consultant

Registered dietitian providing wellness nutrition counseling

from zato.hl7v2.v2_9 import STF
from zato.hl7v2.v2_9 import XCN, XON, XTN

stf = STF()
stf.primary_key_value_stf = '3'
stf.staff_identifier_code = XCN(
    person_identifier_type='NPI',
    id_number='5551112222',
    family_name='Chen',
    given_name='Lisa'
)
stf.staff_name = XCN(
    family_name='Chen',
    given_name='Lisa',
    name_type_code='D'
)
stf.staff_type = {
    'staff_type': 'RD',
    'description': 'Registered Dietitian',
    'coding_system': 'HL70182'
}
stf.organization_name_stf = XON(
    organization_name=
        'Harmony Health Center'
)
stf.primary_phone = XTN(
    telecommunication_use_code='WPN',
    telecommunication_equipment_type='PH',
    country_code='1',
    area_city_code='303',
    local_number='5550300'
)
stf.primary_email = XTN(
    telecommunication_use_code='NET',
    telecommunication_equipment_type='Internet',
    email_address='lisa.chen@example.com'
)

Learn by building

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

Frequently asked questions

STF identifies healthcare staff members including their credentials, roles, and contact information. It's used to track providers, nurses, technicians, and administrative personnel in wellness centers.

Use HL70182 table values for staff types like PHY (Physician), RN (Registered Nurse), or FIT (Fitness Instructor):

stf.staff_type = {
    'staff_type': 'PHY',
    'description': 'Physician',
    'coding_system': 'HL70182'
}

staff_identifier_code includes official identifiers like NPI numbers, while staff_name contains the person's name information. Both use the XCN datatype but serve different purposes.

STF supports single primary phone and email. For multiple contacts, use additional STF segments or consider using the ROL segment for role-specific contacts.

organization_name_stf should contain the primary employing organization and department. Use XON datatype to include multiple organization names if the staff member works across departments.

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.

STF field reference

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

#Python nameDatatypeUsageRepeatableTable
1primary_key_value_stfCWEOptionalNoHL70786
2staff_identifier_listCXOptionalYesHL70061
3staff_nameXPNOptionalYes-
4staff_typeCWEOptionalYesHL70182
5administrative_sexCWEOptionalNoHL70001
6date_time_of_birthDTMOptionalNo-
7active_inactive_flagIDOptionalNoHL70183
8departmentCWEOptionalYesHL70184
9hospital_service_stfCWEOptionalYesHL70069
10phoneXTNOptionalYes-
11office_home_address_birthplaceXADOptionalYes-
12institution_activation_dateDINOptionalYesHL70537
13institution_inactivation_dateDINOptionalYesHL70537
14backup_person_idCWEOptionalYes-
15e_mail_addressSTOptionalYes-
16preferred_method_of_contactCWEOptionalNoHL70185
17marital_statusCWEOptionalNoHL70002
18job_titleSTOptionalNo-
19job_code_classJCCOptionalNo-
20employment_status_codeCWEOptionalNoHL70066
21additional_insured_on_autoIDOptionalNoHL70136
22drivers_license_number_staffDLNOptionalNo-
23copy_auto_insIDOptionalNoHL70136
24auto_ins_expiresDTOptionalNo-
25date_last_dmv_reviewDTOptionalNo-
26date_next_dmv_reviewDTOptionalNo-
27raceCWEOptionalNoHL70005
28ethnic_groupCWEOptionalNoHL70189
29re_activation_approval_indicatorIDOptionalNoHL70136
30citizenshipCWEOptionalYesHL70171
31date_time_of_deathDTMOptionalNo-
32death_indicatorIDOptionalNoHL70136
33institution_relationship_type_codeCWEOptionalNoHL70538
34institution_relationship_periodDROptionalNo-
35expected_return_dateDTOptionalNo-
36cost_center_codeCWEOptionalYesHL70539
37generic_classification_indicatorIDOptionalNoHL70136
38inactive_reason_codeCWEOptionalNoHL70540
39generic_resource_type_or_categoryCWEOptionalYesHL70771
40religionCWEOptionalNoHL70006
41signatureEDOptionalNo-

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python