Identifies how a specific department uses a location defined in the preceding LOC, carrying the department code, hospital service, specialty type, and active or inactive status. Multiple LDP segments can follow one LOC, one per department using that location. It is used in MFN location master file messages for location and department synchronization.
from zato.hl7v2.v2_9 import LDP
from zato.hl7v2.v2_9 import CWE, PL
ldp = LDP()
ldp.primary_key_value_ldp = PL(
point_of_care='WELL',
room='PCW',
)
ldp.location_department = CWE(
identifier='PREV',
text='Preventive wing',
name_of_coding_system='HL70264',
)How to construct and work with real-world LDP segments.
Full row with services, classes, hours, phone, and cost center
from zato.hl7v2.v2_9 import LDP
from zato.hl7v2.v2_9 import CWE, PL, VH, XTN
ldp = LDP()
ldp.primary_key_value_ldp = PL(
point_of_care='WELL',
room='PCW-101',
facility='WELLMAIN',
location_status='A',
building='B2',
floor='3',
)
ldp.location_department = CWE(
identifier='PREV',
text='Preventive wing',
name_of_coding_system='HL70264',
)
ldp.location_service = [
CWE(
identifier='FIT',
text='Fitness coaching',
name_of_coding_system='HL70069',
),
CWE(
identifier='NUT',
text='Nutrition visit',
name_of_coding_system='HL70069',
),
]
ldp.specialty_type = CWE(
identifier='GEN',
text='General wellness',
name_of_coding_system='HL70265'
)
ldp.valid_patient_classes = CWE(
identifier='AMB',
text='Ambulatory',
name_of_coding_system='HL70004'
)
ldp.active_inactive_flag = 'A'
ldp.activation_date_ldp = '20260401080000'
ldp.visiting_hours = [
VH(
start_day_range='1',
end_day_range='5',
start_hour_range='0800',
end_hour_range='1700',
),
]
ldp.contact_phone = XTN(
telephone_number='5551234',
telecommunication_use_code='PRN',
telecommunication_equipment_type='PH',
)
ldp.location_cost_center = CWE(
identifier='CCWELL',
text='Wellness center',
name_of_coding_system='HL70462',
)Department code with screening-friendly patient class
from zato.hl7v2.v2_9 import LDP
from zato.hl7v2.v2_9 import CWE, PL
ldp = LDP()
ldp.primary_key_value_ldp = PL(
point_of_care='WELL',
room='NUT-2A',
facility='WELLMAIN',
)
ldp.location_department = CWE(
identifier='NCDEPT',
text='Nutrition counseling',
name_of_coding_system='HL70264',
)
ldp.valid_patient_classes = CWE(
identifier='AMB',
text='Ambulatory',
name_of_coding_system='HL70004'
)Inactive flag with end date and neutral closure note
from zato.hl7v2.v2_9 import LDP
from zato.hl7v2.v2_9 import PL, VH
ldp = LDP()
ldp.primary_key_value_ldp = PL(
point_of_care='WELL',
room='GYM-1',
facility='WELLMAIN',
)
ldp.active_inactive_flag = 'I'
ldp.activation_date_ldp = '20260401080000'
ldp.inactivation_date_ldp = '20260901170000'
ldp.inactivated_reason = 'Seasonal layout refresh'
ldp.visiting_hours = [
VH(
start_day_range='1',
end_day_range='7',
start_hour_range='0600',
end_hour_range='2100',
),
]Step-by-step guides for working with HL7 v2 in Zato.
LOC names the site while LDP binds a PL primary key to a department CWE, optional services, and visiting hours so wellness flows know which wing handles fitness coaching versus nutrition counseling.
Add a VH for each public window, for example weekday morning coaching versus weekend open gym blocks, each with day range and hour range components.
Use CWE with table HL70264 so receivers align the row to a department concept:
from zato.hl7v2.v2_9 import LDP
from zato.hl7v2.v2_9 import CWE
ldp = LDP()
ldp.location_department = CWE(
identifier='PREV',
text='Preventive wing',
name_of_coding_system='HL70264',
)Repeat CWE values from HL70004 to show which visit types may book the location, such as ambulatory wellness visits for a screening desk.
Field 12 ties the department row to a finance code so fitness passes, nutrition packages, and screening bundles roll up to the right wellness budget line.
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 LDP segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | primary_key_value_ldp | PL | Required | No | - |
| 2 | location_department | CWE | Required | No | HL70264 |
| 3 | location_service | CWE | Optional | Yes | HL70069 |
| 4 | specialty_type | CWE | Optional | Yes | HL70265 |
| 5 | valid_patient_classes | CWE | Optional | Yes | HL70004 |
| 6 | active_inactive_flag | ID | Optional | No | HL70183 |
| 7 | activation_date_ldp | DTM | Optional | No | - |
| 8 | inactivation_date_ldp | DTM | Optional | No | - |
| 9 | inactivated_reason | ST | Optional | No | - |
| 10 | visiting_hours | VH | Optional | Yes | HL70267 |
| 11 | contact_phone | XTN | Optional | No | - |
| 12 | location_cost_center | CWE | Optional | No | HL70462 |
Get started with Zato and connect your systems in minutes.