Skip to content
Healthcare SoftwareEngineering

Architecture guide

Healthcare Software Architecture Guide: Making Decisions That Hold Up

Good healthcare architecture is less about picking fashionable patterns and more about making a small number of consequential decisions deliberately, writing down why, and leaving room to change course.

11 min read Updated

Architecture as a decision-making practice

An architecture is the set of decisions that are expensive to change. In healthcare those decisions carry extra weight because they determine audit scope, customer isolation, how quickly an interface can be fixed at 2 a.m., and whether a regulator or hospital security team will accept your answers.

Treat architecture as a practice with inputs and outputs. Inputs are quality attributes, constraints, and risks. Outputs are architecture decision records (ADRs) that state the context, the options considered, the choice, and the consequences — including the ones you dislike.

Quality attributes that drive healthcare architectures

Rank quality attributes explicitly before choosing patterns. Teams that say everything is top priority end up optimizing for whatever the loudest engineer cares about.

Quality attributes and their healthcare-specific meaning
AttributeHealthcare interpretationArchitectural lever
ConfidentialityPHI exposed only to users with a care or business needPHI boundary, attribute-based authorization, encryption, tenant isolation
IntegrityResults, orders, and identities never silently altered or mergedIdempotent consumers, provenance, immutable event logs
AvailabilityClinical workflows usable around the clockRedundancy, degraded modes, defined recovery objectives
AuditabilityReconstruct who accessed or changed what, and whenStructured audit events, tamper-evident storage, retention policy
InteroperabilityExchange with many systems using shared standardsIntegration layer, canonical model, FHIR and HL7 adapters
ModifiabilityAdapt to new customers, standards versions, and regulationsConfiguration over code, clear module boundaries

Decision: tenancy and isolation

For healthcare SaaS, tenancy is usually the first irreversible choice. Shared-schema designs with a tenant column are economical but make per-tenant restore, data deletion at contract end, and contractual isolation harder to demonstrate. Database-per-tenant designs make those easy but multiply operational overhead and complicate cross-tenant analytics.

Many teams settle on a pooled application tier with a separate database or schema per tenant, plus row-level security as defense in depth. Whatever you choose, test isolation directly: automated tests that attempt cross-tenant reads through every API should fail loudly.

Decision: where PHI is allowed to live

Draw a boundary around the services, data stores, queues, caches, and logs that may contain PHI. Everything outside the boundary handles only de-identified data, opaque identifiers, or operational metadata.

The payoff is concrete. Your observability vendor, error tracker, and analytics tools can sit outside the boundary if you scrub payloads before they leave it, which shrinks the list of vendors needing BAAs and the surface you must defend.

  • Tokenize patient identifiers at ingestion; services outside the boundary see tokens only.
  • Scrub request bodies and exception messages before they reach logging and error-tracking pipelines.
  • Separate PHI-bearing object storage buckets with distinct keys and access policies.
  • Review the boundary whenever a new service, queue, or vendor is introduced.

Decision: integration topology

These combine. A common shape is an interface engine at the edge translating HL7 v2 into canonical events on a backbone, with a FHIR API layer serving reads. The important decision is where transformation logic lives, so it is versioned, tested, and not duplicated across layers.

Integration topology options
TopologyStrengthsWeaknessesFits when
Point-to-pointSimple for one or two connectionsExplodes combinatorially; no central monitoringPrototype or single-site deployment
Interface engine hub (e.g. Mirth Connect, Rhapsody, Cloverleaf)Mature HL7 tooling, routing, transformation, replayCan become a logic dumping ground; specialized skillsHospital environments with many v2 feeds
Event backbone (Kafka, cloud pub/sub)Scalable fan-out, durable log, replayRequires schema governance; not HL7-aware by defaultProduct platforms with many internal consumers
API gateway with FHIR facadeStandard external contract, centralized authFacade can hide inconsistent backendsExposing data to apps and partners

Decision: canonical data model

Teams debate whether to store FHIR natively. FHIR resources give standard semantics and make outbound APIs trivial. They also carry generality you may not need, and enforcing invariants across loosely coupled resources is harder than in a purpose-built schema.

Native FHIR store

Good when the product is primarily a clinical data repository or exposes most data via FHIR. Managed FHIR services from major clouds reduce operational work.

Domain model with FHIR at the edge

Good when workflow state, scheduling, or product-specific concepts dominate. Map to FHIR in adapters; keep mappings tested against US Core profiles.

Hybrid

Store clinical facts as FHIR resources and product state in a relational model, linked by stable identifiers. This is the most common outcome in practice.

Decision: identity and authorization

Clinician users usually authenticate through their organization's identity provider via SAML or OpenID Connect, or arrive through a SMART on FHIR launch from inside the EHR. Patients authenticate through consumer identity flows. Service-to-service calls use short-lived credentials such as workload identity or OAuth client credentials.

Authorization is where healthcare differs most. Role-based access alone rarely captures real rules such as "nurses may see patients on their unit" or "this patient has restricted their record". Plan for attribute-based or relationship-based policies evaluated in one place, with every decision logged.

Resilience and degraded operation

Hospitals have downtime procedures for when systems fail. Your architecture should decide in advance what happens when a dependency disappears: does the app queue writes, show cached data with a clear staleness banner, or refuse to operate? Each choice has clinical implications that need informatics sign-off.

Checklist

  • Recovery time and recovery point objectives defined per service and agreed with customers.
  • Inbound interfaces persist messages durably before acknowledging them.
  • Dead-letter queues exist, are monitored, and have documented replay procedures.
  • Degraded modes are designed, tested, and visible to users.
  • Backups are restored in drills, not just taken.

Designing for evolution

Healthcare standards move: US Core versions advance with USCDI updates, EHR vendors deprecate endpoints, and regulations change what must be exposed. Isolate standards-specific code in adapters with version awareness. Prefer configuration for customer-specific mappings. Run fitness functions in CI — automated checks for dependency direction, PHI leakage into logs, and API contract compatibility — so the architecture does not decay silently.

Finally, revisit ADRs on a schedule. A decision that was right for three customers may be wrong for thirty, and the record makes it clear which assumptions changed.

References

This guide is educational and is not legal or regulatory advice.

Frequently asked questions

What is the most important architecture decision in healthcare SaaS?

Tenancy and isolation, closely followed by the PHI boundary. Tenancy determines how you prove customer separation, restore a single tenant, and delete data at contract end. The PHI boundary determines audit scope and which vendors need BAAs. Both are expensive to change after customers are live, so they deserve formal decision records.

Should healthcare systems use microservices?

Only where independent deployment and scaling justify the operational cost. A modular monolith with clear boundaries often serves early-stage products better, especially with small teams. Integration adapters, notification services, and analytics pipelines are common candidates for separation. Splitting services too early multiplies the places PHI lives and the number of components needing audit coverage.

Where should HL7-to-FHIR transformation logic live?

In one versioned, tested layer — typically the interface engine or a dedicated integration service — not scattered across consumers. Keep mappings in source control with sample-message tests. Downstream services should consume canonical events or FHIR resources, so a mapping fix in one place corrects behavior everywhere and messages can be replayed through the corrected logic.

How do architecture decision records help in healthcare?

ADRs capture the context, options, and consequences behind choices such as tenancy, data model, and identity. In healthcare they also answer customer security reviews and audits, show that risks were considered, and help new engineers understand constraints. Revisiting ADRs periodically makes it obvious when growth has invalidated an earlier assumption.

Discuss your healthcare engineering project

Tell us about the system, the integrations it depends on, and the constraints you are working within. A senior engineer will review it and reply with questions, not a sales script.