HL7

The HL7 Bridge connects BridgeERP HMS to the laboratory analysers, radiology information systems, registration desks and legacy hospital systems that still speak HL7 version 2.x. It receives and sends the pipe-delimited (ER7) messages those systems use — patient admissions, orders and results — over MLLP, a file hot-folder, HTTP, REST or SFTP, parses each one, logs it, and returns an acknowledgement. This page explains the channels, the message types, the ports involved, and how messages are mapped and routed.

Where to find it

All HL7 tooling lives under HMS Core → Integration → HL7 Bridge:

MenuOpens
Configuration → EndpointsChannels (hms.hl7.endpoint) — protocol, host/port, sender & receiver identifiers, version and supported message types.
Configuration → Message TypesThe message catalogue (hms.hl7.message.type) — mnemonic, wire trigger and a sample payload.
Configuration → Mapping RulesSegment / field mapping into platform records (hms.hl7.mapping.rule).
Configuration → Routing RulesWhere each message goes after parsing (hms.hl7.routing.rule).
Configuration → SubscriptionsOutbound message subscriptions (hms.hl7.subscription).
Operations → MessagesEvery inbound / outbound message with its parsed JSON (hms.hl7.message).
Operations → ACK LogAcknowledgements sent and received (hms.hl7.ack.log).
Operations → Segment LogsPer-segment breakdown for debugging (hms.hl7.segment.log).

Message types supported

The bridge handles the standard v2.x message families. Each is catalogued under Message Types with a mnemonic Code (such as ADT_A01) and a wire Trigger Event (such as ADT^A01):

FamilyPurposeTypical triggers
ADT — Admit / Discharge / TransferPatient registration and movement events.A01 admit, A03 discharge, A04 register, A08 update.
ORM — Order MessageLab or imaging orders placed on an external system.O01 new order.
ORU — Observation ResultResults returning from analysers or radiology.R01 unsolicited result.
ACK — AcknowledgementThe reply confirming receipt and processing.AA accept, AE error, AR reject.
Tip — Store a real Sample Payload on each message type record. It documents the partner’s exact segment layout and gives you a reference to test the parser against.

Channels, MLLP and ports

Each endpoint chooses a Protocol: MLLP / TCP (the default), File Hot Folder, HTTP POST, REST API or SFTP. For MLLP the listener wraps each message in the standard framing bytes (start 0x0B, end 0x1C 0x0D) and listens on the Port you set on the endpoint — a hospital convention is TCP 2575, but the bridge binds whatever port the endpoint specifies. A built-in listener can be started for a 30-second test from the endpoint, reporting how many messages and errors it saw on that port.

Two HTTP routes are also exposed for environments where an external MLLP proxy decodes the framing and forwards the raw payload:

RouteMethodPurpose
/hl7/inboundPOSTAccepts a raw ER7 payload, stores it as a message, parses it and returns an ACK. The target channel is chosen by the X-Endpoint-Code header (or the first inbound endpoint).
/hl7/healthGETA health probe returning the count of active endpoints and messages received in the last 24 hours.

Step-by-step: receive lab results from an analyser

  1. Under Configuration → Message Types confirm ORU_R01 exists (add it with trigger ORU^R01 if not).
  2. Create an endpoint under Configuration → Endpoints: set Direction to Inbound, Protocol to MLLP / TCP, fill in Host, Port, the sender / receiver application and facility fields, and pick the HL7 Version (default 2.5).
  3. Tick ORU_R01 under Supported Message Types and choose the Partner Facility.
  4. Add a Mapping Rule so result segments land on the right platform records, and a Routing Rule for where parsed results go.
  5. Run the 30-second listener test on the endpoint, or have the analyser send a sample. Confirm a new row appears under Operations → Messages and an AA entry under ACK Log.

Message lifecycle & states

Every message is logged with a Direction (Inbound / Outbound) and moves through a status:

StatusMeaning
ReceivedRaw payload stored, not yet parsed.
ParsedSegments decoded into JSON.
ProcessedMapped into platform records.
FailedParse or processing error (see Error Message).
DuplicateA repeat of a control id already seen.
Queued (outbound) / Sent / AcknowledgedOutbound flow: waiting to send, sent, and confirmed by the receiver.

Acknowledgements carry an ACK Code of AA (Application Accept), AE (Application Error) or AR (Application Reject), recorded against the message and in the ACK Log.

Endpoint field reference

FieldMeaningRequired
Name / CodeLabel and unique key for the channel.Yes (code unique)
DirectionInbound, Outbound or Bidirectional.Yes
ProtocolMLLP/TCP, File Hot Folder, HTTP POST, REST API or SFTP.Yes
Host / Port / PathNetwork target, or folder / URL path for non-TCP protocols.As per protocol
Sender / Receiver App & FacilityMSH identifiers used to stamp and match messages.No
VersionHL7 v2.x version, 2.3 through 2.9 (default 2.5).Yes
Supported Message TypesWhich families this channel accepts.No
Partner FacilityThe facility this channel belongs to.Defaulted
StatusActive, Disabled or Error.Yes

Roles & access

  • HL7 Viewer — read messages, ACK logs and segment logs.
  • HL7 Operator — run the listener, resend, and manage day-to-day traffic.
  • HL7 Administrator — configure endpoints, message types, mapping and routing.

Troubleshooting

SymptomLikely cause & fix
Listener will not startThe endpoint has no TCP port, or the protocol is not MLLP/TCP; set a port and protocol.
Message stuck at Received / FailedMalformed segments; open the message and read Error Message and the Segment Logs.
Sender gets AE on every messageThe parser raised an error and the bridge replied with an application error; fix the mapping or payload.
Inbound message lands on the wrong channelThe X-Endpoint-Code header is missing; it falls back to the first inbound endpoint.
Warning — The MLLP listener binds 0.0.0.0 on the chosen port and /hl7/inbound is publicly reachable. Place both behind a firewall and only allow your known analyser / partner IP addresses.
Was this page helpful?