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.
| Attribute | Healthcare interpretation | Architectural lever |
|---|---|---|
| Confidentiality | PHI exposed only to users with a care or business need | PHI boundary, attribute-based authorization, encryption, tenant isolation |
| Integrity | Results, orders, and identities never silently altered or merged | Idempotent consumers, provenance, immutable event logs |
| Availability | Clinical workflows usable around the clock | Redundancy, degraded modes, defined recovery objectives |
| Auditability | Reconstruct who accessed or changed what, and when | Structured audit events, tamper-evident storage, retention policy |
| Interoperability | Exchange with many systems using shared standards | Integration layer, canonical model, FHIR and HL7 adapters |
| Modifiability | Adapt to new customers, standards versions, and regulations | Configuration 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.
| Topology | Strengths | Weaknesses | Fits when |
|---|---|---|---|
| Point-to-point | Simple for one or two connections | Explodes combinatorially; no central monitoring | Prototype or single-site deployment |
| Interface engine hub (e.g. Mirth Connect, Rhapsody, Cloverleaf) | Mature HL7 tooling, routing, transformation, replay | Can become a logic dumping ground; specialized skills | Hospital environments with many v2 feeds |
| Event backbone (Kafka, cloud pub/sub) | Scalable fan-out, durable log, replay | Requires schema governance; not HL7-aware by default | Product platforms with many internal consumers |
| API gateway with FHIR facade | Standard external contract, centralized auth | Facade can hide inconsistent backends | Exposing 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
- HL7 FHIR: Security and Privacy
- HL7 SMART App Launch
- OpenID Connect
- eCFR: 45 CFR Part 164
- IHE Profiles
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.