Describes the transportation details for a physical shipment, including the shipment identifier, internal tracking numbers, shipment status, priority, confidentiality, number of packages, and condition upon receipt. It is the header segment for specimen shipment messages (such as OML O39) used between reference labs, public health labs, and sending facilities to electronically manifest biological specimens and other healthcare materials in transit.
from zato.hl7v2.v2_9 import SHP
from zato.hl7v2.v2_9 import EI, CWE, DTM
shp = SHP()
shipment_id = EI(entity_identifier='SHP20240115001')
shp.shipment_id = shipment_id
shp.shipment_status = CWE(
identifier='S',
text='Shipped'
)How to construct and work with real-world SHP segments.
Laboratory specimen transport
from zato.hl7v2.v2_9 import SHP
from zato.hl7v2.v2_9 import EI, CWE, DTM
shp = SHP()
shp.shipment_id = EI(entity_identifier='SHP20240115001')
shp.internal_shipment_id = EI(entity_identifier='LAB-001')
shp.shipment_status = CWE(
identifier='S',
text='Shipped'
)
shp.shipment_status_date_time = DTM('20240115100000')Shipment received at destination
from zato.hl7v2.v2_9 import SHP
from zato.hl7v2.v2_9 import EI, CWE, DTM
shp = SHP()
shp.shipment_id = EI(entity_identifier='SHP20240115002')
shp.internal_shipment_id = EI(entity_identifier='LAB-002')
shp.shipment_status = CWE(
identifier='R',
text='Received'
)
shp.shipment_status_date_time = DTM('20240115140000')Shipment in transit
from zato.hl7v2.v2_9 import SHP
from zato.hl7v2.v2_9 import EI, CWE, DTM
shp = SHP()
shp.shipment_id = EI(entity_identifier='SHP20240115003')
shp.internal_shipment_id = EI(entity_identifier='LAB-003')
shp.shipment_status = CWE(
identifier='T',
text='In Transit'
)
shp.shipment_status_date_time = DTM('20240115120000')Step-by-step guides for working with HL7 v2 in Zato.
SHP contains shipment information including shipment identifiers, status, and dates for public health specimen tracking.
Common shipment statuses include S (Shipped), R (Received), and T (In Transit).
Use shipment_id field with EI datatype:
from zato.hl7v2.v2_9 import SHP
from zato.hl7v2.v2_9 import EI
shp = SHP()
shp.shipment_id = EI(entity_identifier='SHP20240115001')SHP contains shipment information while PAC contains package information. A shipment may contain multiple packages.
action_code records lifecycle updates so nutrition screening, fitness biomarker, and preventive-care specimen shipments stay coordinated across teams.
from zato.hl7v2.v2_9 import SHP
shp = SHP()
shp.action_code = 'U'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 SHP segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | shipment_id | EI | Required | No | - |
| 2 | internal_shipment_id | EI | Optional | Yes | - |
| 3 | shipment_status | CWE | Optional | No | HL70905 |
| 4 | shipment_status_date_time | DTM | Required | No | - |
| 5 | shipment_status_reason | TX | Optional | No | - |
| 6 | shipment_priority | CWE | Optional | No | HL70906 |
| 7 | shipment_confidentiality | CWE | Optional | Yes | HL70907 |
| 8 | number_of_packages_in_shipment | NM | Optional | No | - |
| 9 | shipment_condition | CWE | Optional | Yes | HL70544 |
| 10 | shipment_handling_code | CWE | Optional | Yes | HL70376 |
| 11 | shipment_risk_code | CWE | Optional | Yes | HL70489 |
| 12 | action_code | ID | Optional | No | - |
Get started with Zato and connect your systems in minutes.