Header — TechRadiant Floating Pill
Build vs Buy: EHR/FHIR Middleware vs Custom Integration | TechRadiant

Build vs Buy: EHR/FHIR Middleware vs Custom Integration

Healthcare organizations rarely struggle because they cannot technically connect to an EHR. The harder question is deciding how much of the integration stack should be owned internally versus purchased. This framework helps you answer it.

Should I build or buy EHR/FHIR integration middleware?
Buying middleware makes more sense when your organization needs multiple EHR connections, wants to reduce the infrastructure burden of building and maintaining integration plumbing, or lacks deep healthcare interoperability expertise. Custom integration makes more sense when workflows are highly specialized, integration requirements are narrow and well-defined, existing middleware cannot support the required behavior, or the integration layer is itself a source of competitive differentiation. A hybrid approach, buying the lower-level connectivity and building the application-specific logic on top, is often the most practical answer for growing healthcare SaaS companies and health systems alike.
The central argument
This is not really a choice between middleware and custom code. It is a decision about where your organization wants to own complexity. Buying shifts complexity to vendors, licensing, configuration, and platform limitations. Building shifts it to engineering, maintenance, monitoring, and long-term ownership. Neither is free.

Build vs buy is really a complexity decision

A healthtech company evaluating EHR integration often starts with what sounds like a simple question: "How do we connect our application to the EHR?" The answer that comes back from engineering is rarely simple.

A production EHR integration involves patient identity matching, SMART on FHIR authorization flows, FHIR resource mapping, legacy HL7 v2 message handling, clinical terminology normalization (ICD-10, SNOMED, LOINC, RxNorm), data quality handling for missing or inconsistent fields, retry logic, error handling, audit logging, monitoring, EHR-specific implementation differences, changing API versions, sandbox testing, and ongoing operational support. A single integration with one EHR is manageable. A strategy spanning five or more EHR ecosystems, each with its own implementation quirks, is a sustained engineering capability.

This is the underlying problem that middleware is designed to address. But "FHIR support" from a middleware vendor does not mean the hard work disappears. It means the location of that work shifts.

The real question
Which approach gives your organization the right balance of speed, control, interoperability, and total cost for its actual integration footprint? Not its hypothetical future footprint, and not the footprint of a larger organization whose decision appeared in a blog post.

The standards environment matters here. Under the 21st Century Cures Act, ONC requires FHIR R4 APIs in certified EHR systems for patient and provider data access. The HTI-1 Final Rule, which brought updated US Core Implementation Guide and USCDI v3 requirements, has compliance requirements taking effect January 2026. These regulatory developments have meaningfully expanded the FHIR API surface area of major EHRs, which changes the feasibility of both custom integration and middleware-based approaches compared to even two years ago.

It is worth being precise about what these requirements cover. They apply to EHR certification and to specific payer API obligations. CMS's Interoperability and Prior Authorization Final Rule (CMS-0057-F, finalized January 17, 2024) requires certain impacted payers, not all providers, to implement specific FHIR APIs by compliance dates beginning January 2026 for operational provisions and January 2027 for API requirements, with exact dates varying by payer type. These are payer-specific mandates. They do not translate directly into a requirement for every healthcare application or provider organization to adopt FHIR in a particular way.

What EHR/FHIR middleware actually does

"Middleware" in the healthcare integration space is not one category of product. Buyers encounter overlapping but distinct approaches: integration platforms and iPaaS tools, healthcare interface engines (which handle HL7 v2 alongside FHIR), FHIR servers, FHIR transformation layers, EHR-specific connector platforms, interoperability platforms, and API gateways. Understanding what any specific product covers is a prerequisite to evaluating it.

Broadly, a healthcare integration middleware layer does some combination of the following:

Your healthcare application
Integration / middleware layer
EHR / clinical systems / interfaces

The middleware layer handles authentication and authorization (OAuth 2.0, SMART App Launch, backend service authorization), transformation between standards (FHIR R4, HL7 v2, C-CDA), data normalization, patient identity matching, routing, retries, error handling, logging, and in many cases monitoring and operational dashboards. It abstracts some of the EHR-specific differences behind a more uniform API your application can call.

What middleware does not do automatically is eliminate EHR-specific work. Each EHR implements FHIR resources differently, supports different resource types, enforces different permission scopes, and may require different implementation guides or profile constraints. An organization using middleware still needs to configure connectors, map data fields, write workflow logic, handle edge cases, and test against each EHR environment. The middleware reduces repeated infrastructure plumbing; it does not eliminate clinical and workflow-specific engineering.

What "custom integration" actually means

Custom integration is not a single approach. The scope varies considerably, and understanding what level of custom work a project actually requires is necessary before evaluating the build side of the comparison.

A custom connector builds the connection to one EHR or one interface. This is the narrowest form: a specific API client, FHIR resource handler, or HL7 parser for a single target system.

A custom integration service builds transformation, orchestration, authentication, routing, and workflow logic for one or more connections. This is meaningfully more complex than a single connector and becomes the beginning of an internal integration capability.

A custom interoperability layer builds a reusable internal platform that supports multiple EHRs, multiple standards, and multiple application consumers. This is the equivalent of building middleware, and it carries commensurate engineering costs and ongoing maintenance obligations.

A hybrid approach purchases infrastructure connectivity, FHIR transformation, or authentication handling from a vendor while building the healthcare-specific workflow, business logic, and application-layer functionality internally. This is often the most realistic choice for companies whose integration requirements exceed what a single middleware product covers but do not justify rebuilding the full connectivity stack.

The real tradeoffs: a direct comparison

Decision factor Buy middleware Custom integration
Initial build effortUsually lower; vendor provides connectivity infrastructureUsually higher; all components require development
Time to first integrationPotentially faster if pre-built connectors exist for your EHR targetUsually slower; no existing connectors to start from
Control over integration behaviorPlatform-dependent; some platforms are highly configurable, others constrain workflowHigh; full ownership of every layer
Custom workflow supportMay require workarounds or vendor professional services for unusual workflowsFull flexibility; build exactly what the workflow requires
Multi-EHR expansionFaster if pre-built connectors exist; verify actual coverage before assumingRequires engineering effort for each new EHR target
Maintenance ownershipShared with vendor, but organization still configures, maps, and maintains application-layer logicFully internal; every change, version update, and fix is your team's responsibility
Vendor dependencyHigher; pricing changes, platform direction, and sunset decisions affect your integrationLower; no external dependency on the integration stack
Internal expertise requiredLower at the connectivity layer; may still require FHIR and HL7 expertise for configurationHigher; requires deep FHIR, HL7 v2, EHR-specific, and security engineering expertise
Monitoring and observabilityOften built into the platform; operational dashboards typically includedMust be designed, built, and operated by the internal team
Migration awayMay require significant rework if vendor-specific APIs or configurations are deeply embeddedMore control; migration is an internal engineering decision
Long-term TCODepends on licensing, usage volume, connector count, and support tier; can exceed build costs at scaleDepends on engineering footprint, maintenance load, and operational overhead

The cost model buyers should actually use

The most common mistake in the build vs buy calculation is comparing middleware subscription cost against developer salary. That comparison omits most of the relevant cost on both sides, and it consistently underestimates the long-term cost of custom development while underestimating the operational cost of middleware at scale.

The relevant comparison is 3-5 year total cost of ownership, not implementation cost alone.

Buy: TCO considerations Build: TCO considerations
Platform subscription (often scales by connections, volume, or users) Engineering salaries, including FHIR and HL7 specialist time
Per-connector or per-EHR licensing fees Architecture and design investment up front
Transaction or API call volume charges Infrastructure (servers, messaging queues, storage, monitoring tools)
Implementation and onboarding services Security design and testing, including penetration testing where applicable
Mapping, configuration, and workflow customization EHR-specific testing and sandbox access
Vendor professional services for non-standard workflows Integration maintenance as EHR APIs and implementation guides evolve
Support tier costs for production SLAs Incident response and on-call operational support
Internal engineering time for configuration and integration management Documentation, training, and knowledge transfer
Migration or exit costs if you move away from the platform Technical debt remediation as requirements change
The hidden cost of "we'll build it"
Once you build a custom integration layer, you own everything that follows: future EHR API version changes, security patches, monitoring, documentation, and operational support. A team that builds a FHIR integration service for one EHR during a startup sprint often discovers two years later that maintaining and extending it across three EHRs has become a significant portion of engineering capacity, with no product differentiation to show for it. That ongoing cost should be in the model from the start.

When buying middleware usually makes more sense

Buy middleware when: your organization needs connections to multiple EHRs and does not want to build connector infrastructure for each one; your primary goal is reducing time to production; your team has strong software engineering capability but limited healthcare interoperability depth; your integration use cases are relatively standard (patient data access, scheduling, document retrieval); you want built-in operational tooling for monitoring, retries, and alerting; or your engineering resources are more valuable concentrated on your core product than on interoperability plumbing.

Before selecting middleware, verify that the platform's actual production connector coverage matches your specific EHR targets. "We support Epic" and "we have a production-tested FHIR R4 connector for Epic with US Core compliance, write-back capability for the resource types your workflow requires, and SMART Backend Services support" are materially different statements. Ask for production references from organizations using the specific connectors you need, not general platform references.

Scenario A
Multi-EHR SaaS platform
A healthcare SaaS company expects to support five or more EHR ecosystems within two years. Building and maintaining connectors for each would consume sustained engineering capacity. Middleware with production connectors covering those targets is likely worth the licensing cost and dependency.
Scenario D
Middleware that still requires custom work
A healthtech company buys middleware and discovers that its core clinical workflow requires custom transformation, proprietary business logic, and EHR-specific handling that the platform cannot support. The result is middleware licensing cost plus custom development cost on top. This is a common outcome and should be stress-tested during vendor evaluation, not discovered post-contract.

When custom integration makes more sense

Build custom integration when: your workflow requirements are highly specialized and unlikely to be supported by a general-purpose platform; you need a small number of strategically important integrations (one or two EHRs, long-term relationships); your integration layer is itself a source of competitive differentiation in your product; you have strict performance or latency requirements that a middleware layer would compromise; your team already has deep FHIR and HL7 expertise; or you are building a platform that will itself become an integration product for others.

Scenario B
Single strategic EHR integration
A digital health startup needs one EHR connection for a narrow clinical workflow. The integration is well-defined, the EHR is known, and the startup has engineering resources with prior FHIR experience. A custom connector built and maintained internally may be more economical and flexible than a middleware subscription optimized for multi-EHR scale.
Scenario C
Specialized write-back workflow
A provider organization needs a highly specialized write-back workflow involving custom FHIR resources, complex clinical decision logic, and proprietary data transformations. No available middleware supports the required behavior. Custom development is the only viable path, but the ongoing maintenance obligation should be scoped and resourced explicitly.

Custom integration can be strategically justified when the integration layer is part of the product's differentiation. But the principle holds: once you build it, you own it. That means owning every future EHR API version change, every security update, every new standard requirement, and every monitoring and incident response obligation.

The hybrid approach: buy the plumbing, build the product layer

Many production healthcare integration architectures are neither pure middleware nor pure custom development. They are deliberate hybrids. A company purchases lower-level connectivity, FHIR transformation, and authentication infrastructure from a vendor while building the healthcare-specific workflow, business logic, and application-layer functionality internally.

The architecture looks something like this:

Healthcare application
Proprietary clinical workflow and business logic (custom)
FHIR normalization and data transformation (may be custom or middleware)
Middleware: authentication, connectivity, routing, monitoring
EHR / clinical systems

In this model the company avoids rebuilding commodity infrastructure: SMART on FHIR authorization flows, retry mechanisms, operational dashboards, connector maintenance. The engineering investment focuses on the layers that create product value: the clinical workflow, the proprietary decision logic, the user experience, the data model that differentiates the application.

The hybrid approach requires careful boundary design. Where does the middleware's responsibility end and the custom layer begin? That boundary should be defined before procurement, not discovered during implementation. If the core workflow requires capabilities that sit inside the middleware platform's configuration layer rather than in custom code above it, the organization may end up dependent on vendor feature development rather than its own engineering roadmap.

The hybrid approach is often the right starting point for healthcare SaaS companies moving from their first EHR connection toward a multi-EHR strategy. It does not, however, eliminate the need for healthcare software engineering expertise. The custom layers still require FHIR knowledge, clinical workflow understanding, security design, and testing against real EHR environments.

Find a healthcare software development partner

Browse verified healthcare IT development agencies

TechRadiant verifies healthcare software development agencies on documented EHR integration experience, FHIR and HL7 expertise, HIPAA architecture capability, and independently verifiable delivery outcomes.

EHR/FHIR middleware due-diligence checklist

Use this before selecting middleware or starting a custom integration project. These questions apply to evaluating middleware vendors and to scoping custom development requirements.

EHR coverage

  • Which specific EHRs are supported with production connectors, not sandbox or in-development connectors?
  • Which FHIR version is supported (R4, R5), and which US Core Implementation Guide version?
  • Which FHIR resource types are actually implemented, not just listed in documentation?
  • Do connectors support both read and write operations for the resources your workflow requires?
  • Which EHR implementation guides are tested (US Core, Da Vinci, SMART on FHIR)?

Authentication and authorization

  • Is SMART App Launch (both standalone and EHR launch) supported?
  • Is SMART Backend Services (system-to-system, no user context) supported?
  • How are OAuth 2.0 credentials managed, stored, and rotated?
  • How does the platform handle authorization scope negotiation across different EHRs?

Data quality and standards

  • How are missing or inconsistent FHIR fields handled?
  • Is clinical terminology mapping (ICD-10, SNOMED, LOINC, RxNorm) built in, or does the organization need to implement it?
  • How is patient identity matching handled across EHR environments?
  • Is HL7 v2 or C-CDA handling required for any integration path?

Reliability and operations

  • How are retries, error handling, and dead-letter queues managed?
  • What is the platform's documented uptime SLA for production integrations?
  • What monitoring, alerting, and debugging capabilities are included?
  • How are incidents investigated and resolved: by the vendor, the customer, or both?

Security and compliance

  • Does the platform handle PHI, and is a Business Associate Agreement available?
  • What security certifications does the vendor hold (SOC 2 Type II, HITRUST, ISO 27001)?
  • How is audit logging handled for API calls that involve PHI?
  • Are access controls enforced at the API and data-access level?

Commercial model and portability

  • Is pricing based on connections, transactions, volume, or seat count? How does it scale?
  • What implementation or onboarding costs are separate from the subscription?
  • If you migrate away from this platform in two years, what does that migration involve?
  • Are connector configurations, mappings, and workflow logic portable or vendor-proprietary?
  • What happens to your integration data and credentials if the vendor is acquired or discontinued?

Common questions answered

Should I build or buy EHR integration middleware?
Buy when you need multiple EHR connections and do not want to build connector infrastructure for each one, when you lack deep healthcare interoperability expertise, or when standard workflows can be served by existing platform connectors. Build when your workflow is highly specialized, your integration footprint is small and well-defined, or the integration layer is a source of product differentiation. A hybrid approach, buying connectivity infrastructure and building application-specific logic above it, is often the most practical path for growing healthcare SaaS companies.
What is FHIR middleware?
FHIR middleware is a general term for software that sits between a healthcare application and EHR or clinical systems, handling connection management, authentication (OAuth 2.0, SMART on FHIR), FHIR resource transformation, data normalization, routing, retries, and monitoring. The category includes integration platforms, healthcare interface engines, FHIR servers, and EHR-specific connector platforms. These products solve overlapping but different problems, and "middleware" covers a wide range of architectures. Evaluating a specific platform requires understanding exactly which layers it handles and which remain the buyer's responsibility.
Is FHIR enough for EHR integration?
No, not on its own. FHIR is a standard that defines how healthcare data can be represented and exchanged. Whether a specific integration works depends on which FHIR resources the EHR exposes, which version and implementation guide is implemented, what permission scopes are available, how authentication is handled, what write-back capabilities exist, and how the EHR's specific implementation differs from the published standard. Many production healthcare environments also require HL7 v2 or C-CDA handling alongside FHIR. FHIR adoption has made EHR APIs more accessible than they were five years ago, but it has not made all EHR integrations equivalent or straightforward.
How much does custom EHR integration cost?
The cost varies significantly based on scope, EHR targets, workflow complexity, authentication requirements, and whether the team has prior FHIR and HL7 experience. A single FHIR read integration with a well-documented EHR can be built more quickly than a bidirectional, multi-resource integration with custom data transformations across several EHR environments. The more useful frame is 3-5 year total cost of ownership: initial development plus ongoing maintenance, EHR API version updates, monitoring, security updates, incident response, and operational support. Teams without prior FHIR integration experience consistently underestimate maintenance obligations. These costs should be modeled explicitly before committing to a build approach.
What is the difference between FHIR and HL7 v2 integration?
HL7 v2 is a message-based standard that has been the backbone of clinical data exchange for decades, used for lab results, ADT (admission, discharge, transfer) events, order communications, and many other workflows. FHIR (Fast Healthcare Interoperability Resources) is a REST API-based standard using modern web protocols and JSON or XML representations, designed for application integration and patient data access. Both are actively used in production healthcare environments. Many EHR integrations require both: FHIR for patient-facing data access and clinical app integration, HL7 v2 for operational workflows and legacy system interfaces. Middleware products vary in their support for each.
What should I look for in an EHR integration platform?
Verify production connector coverage for your specific EHR targets (not just listed support). Confirm which FHIR resources, implementation guides, and US Core profiles are actually tested and supported. Ask whether both read and write-back are supported for your required resources. Understand how authentication (SMART App Launch, Backend Services) is handled. Evaluate the monitoring, alerting, and debugging capabilities included in the platform. Review the security certifications and BAA availability. Understand the pricing model at your expected scale, and explicitly ask what happens during migration away from the platform.
Does middleware eliminate the need for custom healthcare software development?
No. Middleware reduces the amount of integration plumbing an organization needs to build and maintain, but it does not eliminate the need for clinical workflow logic, data transformation, application development, security design, testing, and operational support. Organizations using middleware still need to configure connectors, map data fields, write the application logic that consumes FHIR resources, test integrations against real EHR environments, and maintain that work as requirements change. The question is how much of the overall stack is purchased versus built, not whether custom development is required at all. For complex or specialized workflows, significant custom development on top of middleware is common.
When should a company bring in a healthcare software development partner for EHR integration?
When internal engineers understand software development but lack healthcare interoperability depth (FHIR implementation guides, HL7 v2, SMART on FHIR, EHR-specific behavior); when the integration must become part of a larger healthcare SaaS platform and architectural decisions made now will be expensive to reverse; when multiple standards need to coexist; when complex write-back workflows or custom FHIR extensions are involved; when the organization needs security design, compliance architecture, and integration testing alongside development; or when the project timeline is compressed and building the expertise internally would take longer than the project requires. Evaluate partners on actual EHR integration experience with specific platforms, FHIR implementation depth, and whether they can explain tradeoffs rather than simply recommending custom development.
TR
TechRadiant Research Team
B2B Technology Intelligence · techradiant.co
Regulatory citations in this article are sourced from official CMS and ONC/ASTP documentation. The CMS Interoperability and Prior Authorization Final Rule (CMS-0057-F) was finalized January 17, 2024, with operational compliance dates beginning January 1, 2026 and API compliance dates beginning January 1, 2027 for impacted payers; exact dates vary by payer type and should be verified at cms.gov. ONC's HTI-1 Final Rule requirements (including updated US Core and USCDI v3) take effect January 2026 for certified health IT. These regulations apply to specific categories of payers and certified EHR vendors; they do not universally require every healthcare application to implement FHIR in a specific way. Organizations should consult qualified legal and compliance advisers for guidance on their specific regulatory obligations.

Sources and further reading

  • CMS: Interoperability and Prior Authorization Final Rule (CMS-0057-F), January 17, 2024. Compliance dates: operational provisions beginning January 1, 2026; API requirements beginning January 1, 2027 (payer type-specific). cms.gov
  • ONC/ASTP: 21st Century Cures Act Final Rule (Cures Act Final Rule) establishing FHIR R4 API certification requirements (45 CFR 170.315(g)(10)), US Core Implementation Guide, Bulk FHIR, and SMART App Launch Framework. healthit.gov
  • ONC/ASTP: HTI-1 Final Rule (Health Data, Technology, and Interoperability: Certification Program Updates, Algorithm Transparency, and Information Sharing), including USCDI v3 and updated US Core IG requirements effective January 2026. healthit.gov
  • HL7 International: FHIR R4 specification and implementation guides. hl7.org
  • HL7 International: SMART App Launch Implementation Guide. hl7.org
  • HL7 International: Bulk Data Access (Flat FHIR) Implementation Guide. hl7.org
  • ONC/ASTP: US Core Implementation Guide (supports USCDI). hl7.org
  • TechRadiant: In-House vs Outsourced Healthcare Software Development. techradiant.co
  • TechRadiant: What Is FHIR and Why Does It Matter for Healthcare Software in 2026. techradiant.co
  • TechRadiant: HIPAA vs HITRUST vs SOC 2: What Healthcare Buyers Need to Know. techradiant.co
  • TechRadiant: Healthcare Software Development Cost 2026. techradiant.co

Need a partner who understands both the middleware and the workflow?

TechRadiant connects healthcare organizations with verified software development agencies that can evaluate your integration architecture, not simply sell you a services engagement.

✓ Verified on real delivery outcomes ✓ No paid placement ✓ FHIR and EHR integration expertise categories
Featured Reports — TechRadiant