Executive Summary
A 300-bed regional hospital was drowning in integration complexity. Fifteen clinical and administrative systems needed to share data — EHR, lab, pharmacy, radiology, billing, scheduling, dietary, blood bank, and more. With point-to-point connections, they were maintaining 105 separate interfaces, each breaking independently whenever any system was upgraded.
We deployed Mirth Connect as a central integration engine, replacing the spaghetti of point-to-point connections with a clean hub-and-spoke architecture. We built 52 channels handling HL7 v2, FHIR R4, X12 EDI, CDA, and flat file formats — with dead-letter queuing, automated retry, real-time monitoring, and zero-downtime deployments.
The result: interfaces reduced from 105 to 15, message delivery reliability at 99.7%, 87% reduction in integration maintenance, and a foundation for the hospital's HL7-to-FHIR migration roadmap.
The Problem: Point-to-Point Integration Hell
When a hospital has 15 systems that need to exchange data, the naive approach is point-to-point: System A connects directly to System B, System C, System D, and so on. The math is brutal: N × (N-1) / 2 = 105 unique connections for 15 systems.
What This Looked Like in Practice
- 105 custom interfaces — each with its own connection logic, message format, error handling, and monitoring
- Every system upgrade broke something. When the EHR vendor released a patch, 14 interfaces needed testing. When the lab system upgraded, 14 more. The integration team spent 80% of their time fixing broken interfaces.
- No visibility: when a lab result didn't appear in the EHR, nobody knew if the lab system didn't send it, the interface dropped it, or the EHR rejected it. Troubleshooting was detective work.
- No retry or dead-letter handling: failed messages were simply lost. A network blip at 3 AM meant patient results didn't reach providers until someone noticed and manually reprocessed.
- Format chaos: some systems spoke HL7 v2.3, others v2.5.1, the billing system wanted X12, the HIE expected CDA, and the new patient portal needed FHIR R4. Each format required custom translation code scattered across 105 interfaces.
Channel Management Dashboard
The channel dashboard is the integration team's home screen. At a glance, they see every active channel with its status, message throughput, error count, and last activity. Channels are organized into logical groups:
- ADT Feeds (8 channels): admission, discharge, transfer, registration events flowing to bed management, nursing, dietary, billing
- Lab Results (6 channels): inbound results from LIS, transformed and routed to EHR, patient portal, and referring providers
- Orders (7 channels): physician orders flowing to lab, pharmacy, radiology, and procedure scheduling systems
- Billing (5 channels): charge capture, claim generation, eligibility verification, remittance processing
- Clinical Documents (4 channels): CDA/CCDA exchange with the state HIE, discharge summaries, referral letters
- Custom (22 channels): specialized workflows — blood bank, dietary, OR scheduling, public health reporting, quality measures
System Architecture
Hub-and-Spoke Design
Every system connects to Mirth Connect once. Mirth handles all routing, transformation, filtering, and delivery. Adding a new system means adding 1 connection, not 14.
Internal Components
- Channel Router: rules engine that determines where each message goes based on message type, content, source system, and business rules
- Message Transformer: converts between any supported format — HL7 v2 ↔ FHIR R4, HL7 → CDA, X12 → JSON, CSV → HL7
- Filter Engine: drops messages that don't meet criteria (e.g., test patients, duplicate messages, irrelevant event types)
- Dead Letter Queue: failed messages stored with full context — error type, source message, attempted transformation, retry count. Nothing is lost.
- Alert Manager: configurable alerts via email, Slack, and PagerDuty for channel failures, queue depth thresholds, and latency spikes
- Audit Logger: every message logged with timestamp, source, destination, processing time, and outcome. HIPAA audit trail compliance.
Message Transformation: HL7 v2 to FHIR R4
The hospital's strategic goal is migrating from HL7 v2 to FHIR R4. Mirth Connect serves as the translation bridge — accepting HL7 v2 from legacy systems and emitting FHIR R4 for modern consumers, without requiring any legacy system to change.
Transformation Examples
| HL7 v2 Segment | FHIR R4 Resource | Complexity |
|---|---|---|
| PID (Patient Identification) | Patient | Low — direct field mapping |
| PV1 (Patient Visit) | Encounter | Medium — status mapping required |
| OBX (Observation/Result) | Observation | Medium — LOINC code mapping |
| ORC + RXE (Pharmacy Order) | MedicationRequest | High — multi-segment aggregation |
| DG1 (Diagnosis) | Condition | Medium — ICD code version handling |
| AL1 (Allergy) | AllergyIntolerance | Low — direct mapping with coding |
| MSH (Message Header) | MessageHeader + Bundle | Low — metadata mapping |
ADT Message Flow
When a patient arrives at the ER, a cascade of data events follows:
- Registration system sends ADT-A01 (admission) via TCP/MLLP to Mirth
- Mirth validates the message structure, enriches missing fields (attending physician lookup, insurance verification)
- Mirth routes the A01 to 5 downstream systems simultaneously: bed management (room assignment), nursing station (care team notification), dietary (meal planning), lab (standing order activation), billing (account creation)
- Each destination sends an ACK back to Mirth confirming receipt
- When the patient transfers (A02) or discharges (A03), the same fan-out pattern repeats with updated information
This happens 400+ times per day — every admission, transfer, discharge, registration update, and merge event.
Dead Letter Queue & Error Handling
Before Mirth, failed messages were simply lost. Now, every failure is captured, categorized, and actionable:
- Transient failures (connection timeouts, system temporarily down): auto-retry with exponential backoff — 1s, 5s, 30s, 2min, 10min, 1hr. 95% of transient failures resolve within the first 3 retries.
- Validation failures (malformed HL7, missing required segments): routed to dead-letter queue with parse error details. Integration team reviews and fixes source system configuration.
- Business rule violations (unknown patient ID, invalid code): flagged with specific error context for clinical staff review.
- Resolution tracking: every dead-letter message has a status — Pending Review, Auto-Retried, Manually Resolved, Escalated. SLA: 95% of dead-letter messages resolved within 4 hours.
Monitoring & Alerting
The monitoring dashboard provides 24/7 visibility into integration health:
- 12,847 messages/hour at peak — real-time throughput gauge
- 99.7% success rate — tracked per channel and overall
- 23ms average latency — from message receipt to destination delivery
- Channel health matrix: green/yellow/red status for all 52 channels at a glance
- Alerting: PagerDuty for critical (channel down), Slack for warning (queue depth), email for info (scheduled maintenance)
The Transformation: Before vs After
Message Format Support
Results
| Metric | Before | After | Impact |
|---|---|---|---|
| Interfaces to maintain | 105 point-to-point | 15 hub connections + 52 channels | 87% reduction |
| Message delivery reliability | ~92% (failures lost) | 99.7% (with DLQ recovery: 99.99%) | Near-perfect delivery |
| Integration maintenance time | 80% of team capacity | 25% of team capacity | 55% time freed for new projects |
| Time to add new interface | 4-6 weeks | 3-5 days | 85% faster |
| Message troubleshooting time | 2-4 hours (detective work) | 5-15 minutes (audit trail) | 90% faster resolution |
| Messages processed daily | N/A (no visibility) | 180,000+ with full audit trail | Complete visibility |
| FHIR R4 readiness | 0% | 100% (translation layer in place) | Future-proof |
| Average message latency | Unknown | 23ms (p95: 87ms) | Real-time data flow |
Cost Impact
- Integration team efficiency: 2 FTEs freed from maintenance → reassigned to new projects (value: ~$280K/year)
- Reduced system downtime: automated retry prevents data gaps → estimated $150K/year in avoided clinical and billing impact
- Faster onboarding: new system integrations completed in days instead of weeks → accelerated IT project delivery
- Total annual value: ~$430K/year in efficiency gains and risk reduction
Technology Stack
| Component | Technology | Purpose |
|---|---|---|
| Integration Engine | Mirth Connect (NextGen) | Central message routing, transformation, delivery |
| Protocols | TCP/MLLP, HTTP/REST, SFTP, JDBC | System-specific connectivity |
| Formats | HL7 v2.x, FHIR R4, X12, CDA/CCDA, CSV, JSON | Multi-format support |
| Monitoring | Grafana + Prometheus + custom dashboards | Real-time health monitoring |
| Alerting | PagerDuty + Slack + Email | Tiered incident notification |
| Database | PostgreSQL | Message audit logs, channel configuration, DLQ |
| Infrastructure | On-premise (hospital data center) + DR in AWS | Data residency + disaster recovery |
Timeline
| Phase | Duration | Deliverables |
|---|---|---|
| Phase 1: Foundation | 4 weeks | Mirth deployment, ADT channels (8), lab result channels (6), monitoring setup |
| Phase 2: Core Clinical | 4 weeks | Orders channels (7), pharmacy, radiology, blood bank, OR scheduling |
| Phase 3: Administrative | 3 weeks | Billing channels (5), HIE/CDA exchange (4), public health reporting |
| Phase 4: Advanced | 3 weeks | HL7-to-FHIR translation layer, dead-letter automation, Grafana dashboards, DR setup |
Total: 3.5 months with 2 integration engineers + 1 Mirth specialist. All 105 point-to-point interfaces decommissioned by end of Phase 4.
Lessons Learned
- Start with ADT — everything depends on it. ADT events are the backbone of hospital data flow. Get ADT channels right first, then lab, orders, billing follow naturally. Every downstream system needs to know when patients arrive, move, and leave.
- Dead letter queues are non-negotiable. Before Mirth, lost messages were invisible. After Mirth, every failure is captured and recoverable. The DLQ is the single most important operational feature.
- The monitoring dashboard sells the project. Hospital IT leadership went from "integration is a black box" to "I can see every message flowing in real-time." Visibility builds trust and justifies the investment.
- HL7 v2 is not going away — but FHIR is coming. Building the Mirth translation layer means the hospital can accept HL7 v2 from legacy systems while emitting FHIR R4 for modern consumers. Mirth is the bridge.
- Channel naming conventions matter. With 52 channels, naming like "ADT-A01-to-BedMgmt" is infinitely better than "Channel_47". Invest 5 minutes in naming — it saves hours in troubleshooting.
Share
Related Case Studies

AI-Powered Personalized Oncology Treatment Platform: A Technical Case Study

Building a Patient-First Health Record Platform: Connecting 12 US EMRs Into One View

