Skip to content
LambogeniusDocs

HL7 Edge Gateway

Routes

Map MLLP ports to HTTPS URLs, and what each request looks like.

Runs onWindows · Linux · macOS · DockerFree developer license for test traffic. Production traffic needs a paid license.

A source and a destination

Each [[route]] takes messages from one source and delivers them to one destination. Write them as inline tables, or as [route.source] and [route.destination] sections.

TypeAs a source (receives)As a destination (sends)
mllpListens on listen; MLLPS with tls. The sender gets an HL7 ACK per message.Connects to address (host:port) and keeps the connection open; MLLPS with tls. The receiver's ACK decides the outcome.
httpPOST to path on listen, the message as the body (REST) or in a SOAP envelope; HTTPS with tls. The response carries the ACK.POST to url, REST or SOAP, with custom headers or OAuth2. HTTPS for https:// URLs.
service_busReceives from a queue, or a topic and subscription, one message at a time. See Azure Service Bus.Sends to a queue or topic.
sftpPolls a directory on an SFTP server and reads finished files: one message, messages back to back, or HL7 batches. See SFTP files.Writes one file per message, or batch files closed by count, size or age.

A route can also have several sources and destinations, with filters that decide which messages each destination gets: see Several sources and destinations. The details of each type are in HTTP, SOAP and MLLP out. Settings on the route itself:

SettingDefaultMeaning
namerequiredShown in the console, logs and metrics, and sent as X-Mllp-Route.
moderequiredpassthrough or store_and_forward. See Delivery modes.
sourcerequiredWhere messages come from (above).
destinationrequiredWhere they go (above).
request_timeout30sHow long one delivery attempt may take, including waiting for an MLLP ACK.
max_message_bytes16 MiBLarger messages are rejected.
max_connections64Concurrent connections on a listening source.
idle_timeout1hClose a source connection that sends nothing for this long.

What an HTTP destination receives

  • Method and body: POST with the HL7 message as-is, segments separated by carriage returns (REST), or inside the SOAP envelope.
  • X-Hl7-Control-Id: MSH-10. Use it to make delivery idempotent: store-and-forward is at-least-once.
  • X-Mllp-Route: the route's name.
  • Content-Type: x-application/hl7-v2+er7 for REST unless you set content_type; the SOAP version's type for SOAP.

Configurations from 0.1

Routes written for 0.1, with listen, listen_tls, target, target_tls, headers and content_type directly on the route, still work: they mean an MLLP source and an HTTP destination.

# 0.1 shorthand, still accepted: an MLLP source and an HTTP destination
[[route]]
name = "lab-oru"
listen = "10.10.10.10:7890"
target = "https://somewhere.com/lab/oru"
mode = "store_and_forward"
headers = { Authorization = "Bearer ${LAB_API_TOKEN}" }
Configuration without a file

Containers that can't mount files can pass the whole configuration in the HL7EDGE_CONFIG_TOML environment variable. Run hl7-edge-gateway check to validate it before deploying.