Date: February 10, 2026
Subject: HL7 Integration — Live in Production

Hi Mika,

The HL7 MLLP server is live. Lab results are flowing from the analyzer to the EHR without manual entry. Average message processing time is 12ms.

I've configured the FHIR resources for your clinical terminology. The compliance audit trail logs every transaction. Ready for your team to review before we open it to the other wards.

Best,
Christian Hellsten
Aktagon Ltd.

ADR-001: HL7 MLLP Server Architecture

Status: Accepted

Context

Hospital laboratory systems send results via HL7 v2.3 messages over MLLP (Minimal Lower Layer Protocol). The current workflow requires manual data entry from analyzer to EHR. Error rate: 3.2% per ward.

Decision

Build an HL7 MLLP server in Go that receives lab results, validates message structure, maps clinical terminology to FHIR resources, and forwards to the EHR via REST API.

Architecture

  • Go TCP server with MLLP framing (0x0B/0x1C/0x0D)
  • HL7 v2.3 message parser with segment validation
  • FHIR R4 resource mapping (Observation, DiagnosticReport)
  • Compliance audit trail with SHA-256 message hashing
  • Retry queue for failed EHR deliveries

Constraints

  • Messages must be processed in under 50ms
  • All PHI encrypted at rest and in transit
  • Full audit log for regulatory compliance
  • Zero message loss: acknowledge only after persistence

Alternatives Considered

Mirth Connect (Java)

Rejected: Heavy runtime, complex configuration, licensing costs for production deployment

HAPI FHIR (Java)

Rejected: FHIR-first, not HL7 v2-first. Would require additional translation layer for legacy systems

Custom Python

Rejected: GIL limits concurrent connection handling. Hospital systems expect sub-50ms ACK responses

Consequences

  • Single binary deployment, no JVM or runtime dependencies
  • 12ms average processing time (measured in staging)
  • Audit trail satisfies ISO 27001 and MDR requirements
  • Manual data entry eliminated for 4 wards

Metrics

  • Messages processed: 2,400/day
  • Error rate: 0.01% (down from 3.2% manual)
  • Uptime: 99.97% over 6 months
  • Time saved: 4.5 hours/day across nursing staff
Operations Overview
Production
HL7 Integration — MLLP Server v1.4.2
Current month
Error Rate
0.01%
-3.19% vs last month
Time Saved / Day
4.5h
Work hours
Uptime
99.97%
6 month average
Messages / Day
2,400
12ms avg latency
Message Statistics
Message TypeCount (24h)
ORU^R01 — Lab Result1,840
ORM^O01 — Order312
ADT^A01 — Admission128
ADT^A08 — Update86
ACK — Acknowledge2,366
Recent Messages
Message TypeLast Received
ORU^R01 — Lab Result2 min ago
ORM^O01 — Order8 min ago
ADT^A01 — Admission23 min ago
ADT^A08 — Update41 min ago
ACK — Acknowledge2 min ago
Connected
Updated 2 min ago
main.go
Sign in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package main
import (
    "bufio"
    "crypto/sha256"
    "fmt"
    "log"
    "net"
    "time"
)
// MLLP framing bytes
const (
    startBlock = 0x0B
    endBlock   = 0x1C
    cr        = 0x0D
)
type Server struct {
    addr    string
    audit   *audit.Logger
    parser  *hl7.Parser
    mapper  *fhir.Mapper
}
func main() {
    srv := &Server{
        addr: ":2575",
    }
    if err := srv.Listen(); err != nil {
        log.Fatal(err)
    }
}
func (s *Server) handleConn(conn net.Conn) {
    defer conn.Close()
    start := time.Now()
    raw := readMLLP(bufio.NewReader(conn))
    msg := s.parser.Parse(raw)
    hash := sha256.Sum256(raw)
    s.audit.Log(msg, hash)
    s.mapper.ToFHIR(msg)
    conn.Write(ack(msg))
    log.Printf("processed in %v", time.Since(start))
}

From pilot to production without committees, roadmaps, or handoffs.

One engineer. Research to production. Healthcare. Finance. Compliance.