Home/ Docs/HL7 MLLP setup

HL7 MLLP setup

Send ORU^R01 messages from the gateway to your HMIS over MLLP

4 min read

The gateway emits an HL7 v2.5 ORU^R01 message to your HMIS over MLLP after each successful ECG ingest. No cloud round-trip needed.

1. Configure in .env

HL7_ENABLED=true
HL7_HOST=10.0.0.42        # Your HMIS MLLP listener
HL7_PORT=6661             # Standard MLLP port
HL7_SENDING_FACILITY=ECG_CONNECT
HL7_RECEIVING_APP=YOUR_HMIS

Restart the gateway: docker compose restart gateway.

2. Open the inbound port on your HMIS

The HMIS must accept TCP connections from the gateway on HL7_PORT. Test connectivity from the gateway host:

nc -zv $HL7_HOST $HL7_PORT

3. Message shape

Each ORU^R01 includes:

Segment Carries
MSH Sending facility, timestamp, message control id
PID Patient MRN, name, DOB, sex
OBR Universal service id (93000^ECG), order timestamp
OBX One per measured value (HR, PR, QRS, QT, axis) + interpretation flags

4. Verify

After processing an ECG, the gateway logs:

[hl7] sent ORU^R01 msg=… ack=AA

AA = application accepted. If you see AE or no ack at all, check the HMIS-side log for parse errors — most issues are field-length or charset mismatches your HMIS rejects.

FHIR alternative

If your HMIS prefers FHIR R4, set FHIR_ENABLED=true instead and point at a FHIR endpoint. ECG observations post as Observation resources linked to a Patient.