Academy
⌘K
Getting Started
  • Platform Overview
  • AWS Marketplace Setup
  • Quickstart Guide
Connections
  • Overview
Workflow Builder
  • Overview
  • Nodes Catalog
Helix AI Assistant
  • Overview
Mapping Engine
  • Overview
Workflow Library
  • Overview
  • HL7
  • FHIR
  • Insurance
  • Agentic
  • Mapping
Security & Infrastructure
  • Architecture
  • HIPAA Compliance
  • Performance & Scalability
← Back to ConnectHealth
Get Started
Back to Nodes
HL71 input → 1 output

HL7 Parser

payload.hl7msg (string)payload (string)HL7HL7 Parserpayload.hl7v2D… (object)payload.metadata (object)hl7.messageType (string)Data flowProperty

Parses HL7 messages into structured objects with metadata extraction.

Inputs

payload.hl7msg string
Raw HL7 message to parse (optional if provided in payload directly)
payload string
Alternative: Raw HL7 message can be provided directly in payload
payload object
Alternative: an HL7 In envelope — the message is read from .raw (or .segments) automatically. Any other object is handled as before.

Outputs

payload.message object
Parsed HL7 message object from node-hl7-client (use .get() methods to access segments/fields)
payload.metadata object
Message metadata (messageType, triggerEvent, messageId, version, etc.)
payload.patient object
Patient information from PID segment (if available)
hl7 object
Metadata about the HL7 operation:
  • messageType - HL7 message type (e.g., ADT)
  • triggerEvent - Trigger event (e.g., A01)
  • messageId - Original message control ID
  • version - HL7 version
  • integrationId - Integration context if available
  • operation - Always "parse"
  • timestamp - Processing timestamp

Details

This node parses HL7 v2.x messages into structured objects using the node-hl7-client library.

The node extracts metadata from the MSH (Message Header) segment and patient information from the PID (Patient Identification) segment if available. The parsed message object provides methods to access any segment and field in the HL7 message.

Working with Parsed Message

The parsed message is a node-hl7-client Message object. You can access segments and fields using:

  • msg.payload.message.get('PID') - Get a specific segment
  • msg.payload.message.get('PID.5.1') - Get a specific field (e.g., patient last name)
  • msg.payload.message.get('OBX').toArray() - Get all instances of a repeating segment
  • msg.payload.message.toString() - Convert back to HL7 string format

Error Handling

The node will report errors for:

  • Missing HL7 message in input
  • Invalid HL7 message format
  • Missing MSH segment

Best Practices

  • Validate HL7 message structure before parsing
  • Use msg.payload.metadata to quickly identify message type
  • Handle parsing errors with a catch node
  • Log original message for debugging failed parses
  • Use msg.payload.patient for quick access to patient info
  • Connect to HL7 Acknowledgement node to send ACK responses