Skip to content
Healthcare

Native HL7 Integration

Parse, query, and transform healthcare data with comprehensive HL7v2 support. From ADT to ORU messages, handle all healthcare interchange formats with SQL.

All HL7v2 versions (2.1 - 2.8)
Query segments with SQL functions
HIPAA-ready architecture
Raw HL7 Message MSH |^~\&|EPIC|MCM|... PID |1||12345^^^MRN... PV1 |1|I|ICU^301^A... OBR |1|12345||CBC^... OBX |1|NM|WBC||7.2|... OBX |2|NM|RBC||4.5|... OBX |3|NM|HGB||14.2| PARSE Structured Data { "patient" : { "mrn" : "12345" , "location" : "ICU-301" }, "results" : [ { WBC: 7.2, RBC: 4.5 } ] } Delta Forge SQL Engine SELECT hl7_field (msg, 'PID-3' ) FROM hl7_messages WHERE type = 'ADT^A01' STORE Delta Lake Table healthcare.hl7_events msg_id | type | patient_id | timestamp | raw_msg Stats Messages/sec 12,847 Avg latency 2.3ms

HL7v2 Version Support

Complete support for all major HL7v2 versions

HL7 2.1 Legacy Support
HL7 2.2 Extended ADT
HL7 2.3 Widely Used
HL7 2.3.1 US Standard
HL7 2.4 Enhanced
HL7 2.5 Current Standard
HL7 2.5.1 Meaningful Use
HL7 2.6+ Latest Versions

Message Types

Support for all standard HL7v2 message categories

ADT - Patient Administration

Admit, discharge, and transfer events for patient tracking.

  • A01 - Admit/Visit Notification
  • A02 - Transfer a Patient
  • A03 - Discharge/End Visit
  • A04 - Register a Patient
  • A08 - Update Patient Information
  • A31 - Update Person Information

ORU - Observation Results

Laboratory, radiology, and other clinical results.

  • R01 - Unsolicited Observation
  • Lab results with OBX segments
  • Radiology reports
  • Pathology findings
  • Vital signs and measurements
  • Microbiology results

ORM/OML - Orders

Order entry and management for clinical workflows.

  • O01 - General Order
  • O21 - Laboratory Order
  • Pharmacy orders
  • Imaging requests
  • Procedure scheduling
  • Order status tracking

SIU - Scheduling

Appointment and resource scheduling messages.

  • S12 - Notification of New Appointment
  • S13 - Rescheduling
  • S14 - Modification
  • S15 - Cancellation
  • Resource allocation
  • Availability queries

MDM - Document Management

Clinical document notifications and content.

  • T01 - Original Document
  • T02 - Original with Content
  • Transcription reports
  • Progress notes
  • Discharge summaries
  • Operative reports

DFT - Financial Transactions

Billing and financial information exchange.

  • P03 - Post Detail Financial
  • Charge capture
  • Billing codes (CPT, ICD)
  • Insurance information
  • Payment posting
  • Claim generation

Segment Parsing

Complete parsing for all HL7v2 segment types

Header Segments

  • MSH - Message Header
  • MSA - Message Acknowledgment
  • EVN - Event Type
  • ERR - Error Information

Patient Segments

  • PID - Patient Identification
  • PD1 - Additional Demographics
  • NK1 - Next of Kin
  • PV1/PV2 - Patient Visit

Clinical Segments

  • OBR - Observation Request
  • OBX - Observation Result
  • DG1 - Diagnosis
  • AL1 - Allergy Information

Order Segments

  • ORC - Common Order
  • RXA - Pharmacy Administration
  • RXE - Pharmacy Encoded Order
  • TXA - Transcription Document

Insurance Segments

  • IN1 - Insurance
  • IN2 - Additional Insurance
  • GT1 - Guarantor
  • ACC - Accident Information

Z-Segments

  • Custom Z-segment support
  • Site-specific extensions
  • Configurable field mapping
  • Preservation of custom data

HL7 Query API

Powerful querying capabilities for healthcare data

hl7_parse()

Parse raw HL7 message into structured format

hl7_segment()

Extract specific segment by name

hl7_field()

Access field by segment and position

hl7_component()

Extract component from composite field

hl7_repeat()

Handle repeating fields and segments

hl7_terser()

XPath-like terser notation queries

hl7_validate()

Validate message against HL7 schema

hl7_encode()

Encode structured data back to HL7

HL7 Data Types

Full support for complex HL7v2 data types

Primitive Types

  • ST - String
  • TX - Text Data
  • FT - Formatted Text
  • NM - Numeric
  • ID - Coded Value
  • IS - Coded User-Defined

Date/Time Types

  • DT - Date
  • TM - Time
  • TS - Timestamp
  • DTM - Date/Time
  • Timezone handling
  • Precision levels

Composite Types

  • XPN - Extended Person Name
  • XAD - Extended Address
  • XTN - Extended Telecom
  • CX - Extended Composite ID
  • CE/CWE - Coded Elements
  • HD - Hierarchic Designator

Special Types

  • ED - Encapsulated Data
  • RP - Reference Pointer
  • SN - Structured Numeric
  • TQ - Timing/Quantity
  • VID - Version Identifier
  • MSG - Message Type

Multi-Message Clinical Correlation

Track a patient's complete journey across ADT, ORM, and ORU messages

A single patient encounter generates dozens of HL7 messages: an ADT admit, lab orders via ORM, results via ORU, and eventually an ADT discharge. Delta Forge lets you correlate these messages in SQL, joining across message types by patient ID to reconstruct the full clinical workflow.

Correlation Patterns

  • Admit-to-discharge tracking - link ADT^A01 through ADT^A03 to measure length of stay
  • Order-to-result matching - join ORM orders to ORU results by placer order number
  • Lab turnaround time - measure elapsed time from ORM order entry to ORU result report
  • Missing results detection - find orders with no corresponding result message
-- Correlate admits, orders, and results
-- for a single patient encounter
SELECT
  adt.patient_id,
  hl7_field(adt.msg, 'PV1-44') AS admit_time,
  hl7_field(orm.msg, 'OBR-4')  AS order_name,
  hl7_field(oru.msg, 'OBX-5')  AS result_value,
  hl7_field(oru.msg, 'OBX-8')  AS abnormal_flag
FROM hl7_messages adt
JOIN hl7_messages orm
  ON adt.patient_id = orm.patient_id
JOIN hl7_messages oru
  ON orm.placer_order_id = oru.placer_order_id
WHERE adt.msg_type = 'ADT^A01'
  AND orm.msg_type = 'ORM^O01'
  AND oru.msg_type = 'ORU^R01';

Enterprise Integration

Production-ready healthcare data integration

Message Processing

  • Batch message processing
  • Real-time streaming
  • Message routing and filtering
  • Acknowledgment generation

Transformation

  • HL7 to FHIR conversion
  • HL7 to JSON/XML
  • Version migration
  • Custom field mapping

Validation

  • Schema validation
  • Cardinality checking
  • Data type validation
  • Custom rule engines

Compliance

  • HIPAA-ready architecture
  • Audit logging
  • PHI field identification
  • Data masking support

Transform your healthcare data

Start processing HL7 messages with enterprise-grade reliability.