Healthcare  •  Phase 1 Complete

EMR-to-Mainframe Integration
for a Multi-Hospital Health System

Phase 1 of a strategic cloud migration: a hybrid BizTalk & Azure architecture that integrated EMR clinical workflows with legacy mainframe and Db2 systems — while laying the foundation for full Azure modernization in Phase 2.

Industry Healthcare
Engagement Type Hybrid Integration / Cloud Migration
Standards HL7 v2, Canonical XML
Status Phase 1 Delivered — Phase 2 Planned
BizTalk Server Azure Logic Apps Azure Functions Azure Blob Storage Azure Service Bus Azure Event Hub HL7 IBM Db2 SQL Server ExpressRoute Hybrid Architecture
Hybrid BizTalk and Azure Integration Architecture
Phase 1 Architecture: Hybrid BizTalk & Azure Integration Pipeline

Background

A multi-hospital health system was operating a complex portfolio of clinical integrations built on BizTalk Server over more than a decade. These integrations connected EMR platforms with legacy mainframe systems and IBM Db2 databases — handling patient admissions, discharge summaries, lab results, and clinical order workflows in HL7 v2 format.

As the organization grew through acquisitions and its EMR footprint expanded, the BizTalk environment became a critical bottleneck. Maintaining the aging middleware required scarce on-premise expertise, and the system’s monolithic architecture made it difficult to scale individual integration workloads independently.

The mandate was clear: modernize the integration layer without disrupting clinical operations — and do it in a way that progressively moved the organization toward the cloud rather than requiring a high-risk big-bang cutover.

The Challenge

Three constraints defined the engagement from day one:

Zero downtime tolerance. The integrations being migrated processed live clinical data 24/7. Any disruption to HL7 message flow carried direct patient safety implications, making a phased, parallel-run approach non-negotiable.
Reuse existing BizTalk maps. Years of business logic had been encoded in BizTalk maps and orchestrations. Rebuilding everything from scratch in Phase 1 was not feasible — the architecture had to leverage this investment while setting up a clean migration path.
Legacy back-end systems stay on-premise. The mainframe and IBM Db2 databases that HL7 messages ultimately needed to reach were not part of this migration scope. The architecture had to bridge cloud processing back to on-prem destinations reliably and securely.

The Solution: A Hybrid Integration Pipeline

Relay615 designed a five-stage hybrid architecture that kept BizTalk in place for what it does well — ingestion, validation, and existing map execution — while moving orchestration, rule processing, and enrichment into Azure. This allowed the team to deliver immediate cloud value without requiring a full BizTalk replacement in Phase 1.

Secure hybrid connectivity was established via Azure ExpressRoute (with a Site-to-Site VPN fallback), creating a private, low-latency path between the on-premise data center and the Azure Virtual Network housing all integration components.

1

Ingestion — On-Premise BizTalk Server

BizTalk Server continued to handle the intake of HL7 v2 messages from EMR systems via FTP file drops and receive adapters. Existing receive ports, validation pipelines, and BizTalk maps were reused without modification — preserving years of encoded business logic and minimizing migration risk. BizTalk Management DB retained full orchestration visibility for on-prem operations.

BizTalk Server FTP Adapters HL7 Receive Pipelines BizTalk Maps (Reused)
2

Decode & Transform — Azure Logic App

An Azure Logic App (Standard tier) consumed messages forwarded from BizTalk via Event Hub or Blob trigger. It decoded raw HL7 segments, applied existing BizTalk maps through a reuse adapter, and transformed the message into a Canonical XML format — the internal representation that all downstream Azure services would operate on. The canonical document was written to Azure Blob Storage (Hot Tier, RA-GRS).

Azure Logic Apps Azure Event Hub Blob Storage (Hot / RA-GRS) BizTalk Map Reuse
3

Orchestration, Rule Engine & Enrichment — Azure Function

A Blob Created event triggered an Azure Function that acted as the orchestration and enrichment engine. The Function consumed the canonical XML, evaluated it against a configurable rule engine (routing logic, message classification, conditional processing), and performed lookup calls to on-premise IBM Db2 via a hybrid connection for patient and provider enrichment data. The enriched canonical document was written to a separate Blob Storage container.

Azure Functions Blob Storage (Enriched) IBM Db2 Lookup Business Rules Engine
4

Final Transformation & Delivery — Azure Logic App

A second Logic App performed the final transformation from enriched canonical XML into the target format required by each downstream on-premise system. Output was written directly to on-premise SQL Server (via a hybrid connection through the ExpressRoute network), completing the end-to-end flow. Each downstream system received data in its own native format without any modification to its existing interfaces.

Azure Logic Apps SQL Server (On-Prem) Mainframe Output Azure Hybrid Connection
5

Observability & Governance (Cross-Cutting)

Full end-to-end observability was built in from the start rather than added after go-live. Azure Monitor, Application Insights, and Log Analytics provided unified telemetry across Logic Apps and Azure Functions. Azure Key Vault managed all connection strings, credentials, and shared secrets. Alert rules and dashboards gave operations teams real-time visibility into message throughput, error rates, and processing latency.

Azure Monitor Application Insights Log Analytics Azure Key Vault Dashboards & Alerts

Outcomes

0 Clinical integration downtime during cutover
100% BizTalk map reuse — no business logic rewrite
~60% Reduction in BizTalk infrastructure footprint post-Phase 1
5 Independent Azure components, each horizontally scalable
Full End-to-end observability from day one
Phase 2 Roadmap defined to retire BizTalk entirely

The hybrid architecture delivered immediate value by moving orchestration, enrichment, and observability into Azure — the components with the highest operational burden — while keeping BizTalk in place as a stable, proven ingestion layer. This approach de-risked Phase 1 significantly and produced a clean, well-documented foundation for Phase 2, which will migrate BizTalk ingestion itself into Azure Logic Apps and retire the on-premise middleware footprint entirely.

Key Design Decisions

Canonical XML as the lingua franca. Introducing a canonical document format as the internal standard decoupled sources from destinations. New source or target systems in Phase 2 only need to implement a map to/from canonical — not a point-to-point integration for every combination.
Blob Storage as a durable integration bus. Using Azure Blob Storage between pipeline stages (rather than synchronous chaining) provided natural durability, replay capability, and independent scalability for each stage. A failed Azure Function step can be retried without reprocessing the entire pipeline.
Separate Logic Apps for transformation vs. delivery. Splitting Step 2 (decode/transform) and Step 4 (final output) into independent Logic App instances allowed each to scale independently and be tested, updated, or redeployed without touching the other — a significant advantage over the monolithic BizTalk orchestrations they replaced.
Observability was scoped in, not bolted on. Application Insights instrumentation and Log Analytics workspaces were provisioned as part of the initial infrastructure, not added in a later sprint. This gave the operations team real monitoring from the first deployment, not just after go-live.

What’s Next: Phase 2 Roadmap

Phase 2 will complete the migration by replacing the on-premise BizTalk ingestion layer with an Azure-native alternative. Key workstreams include:

  • Migrating BizTalk receive adapters and FTP file drop processing to Azure Logic Apps with Azure File Storage and Event Grid triggers
  • Converting remaining BizTalk orchestrations into Logic App workflows using Relay615’s migration playbook
  • Decommissioning BizTalk Server and the associated on-premise infrastructure
  • Extending the rule engine to support additional clinical message types (ADT, ORU, ORM)
  • Evaluating FHIR R4 as a replacement for HL7 v2 on select workflows

Engagement Summary

Industry Healthcare
Client Multi-Hospital Health System
Scope Phase 1 of 2
Standards HL7 v2, Canonical XML
Connectivity ExpressRoute + S2S VPN
Status Delivered — Phase 2 planned

Technologies Used

IngestionBizTalk Server
TransformAzure Logic Apps
OrchestrationAzure Functions
StorageAzure Blob (RA-GRS)
MessagingAzure Event Hub
EnrichmentIBM Db2 (On-Prem)
OutputSQL Server (On-Prem)
ObservabilityApp Insights, Monitor
SecurityAzure Key Vault

Similar Project?

We’ve delivered hybrid BizTalk/Azure architectures across healthcare, supply chain, and financial services. Let’s talk about your environment.

Contact Us
All Case Studies