Why 80% of Healthcare AI Pilots Die in Pilot: The Data Architecture Problem

Published: (December 15, 2025 at 08:13 AM EST)
5 min read
Source: Dev.to

Source: Dev.to

Overview

Healthcare data is a mess. You’ve got EHRs, labs, pharmacies, payers, and assorted vendors all speaking slightly different dialects of “almost‑FHIR, sort‑of‑HL7, random CSV, and mystery XML”. On top of that, there are duplicates, missing fields, and business rules that only exist in someone’s head.

Drop a powerful LLM on top of that and you don’t get magic. You get unstable behavior, unsafe recommendations, and a project that never makes it out of “cool internal demo” mode.

Read the full guide on building an AI‑ready healthcare data architecture in 6 steps

Why most healthcare AI projects stall

  • Data is fragmented, inconsistent, and governed by tribal knowledge instead of explicit rules.

Core layers of a modern healthcare platform

  1. FHIR operational layer – near‑real‑time clinical workflows.
  2. Warehouse / lakehouse – analytics and ML on de‑identified data.
  3. MDM / hMDM – identity resolution and golden records.
  4. API + access control – how apps and AI touch the data.

Six steps to make the stack AI‑ready

  1. Use FHIR‑first persistence as your canonical model.
  2. Add fine‑grained authorization, tighter than normal app RBAC.
  3. Expose tools / function calls for LLMs instead of raw API access.
  4. Add Retrieval‑Augmented Generation (RAG) so answers are grounded in patient data.
  5. ETL into a warehouse for cross‑patient analytics and ML.
  6. Bake in privacy and compliance controls (tokenization, consent, logging, zero‑retention LLMs).

Common failure pattern

  1. Teams start with the model (“Let’s integrate GPT with our EHR!”).
  2. A quick prototype works on a sandbox dataset.
  3. As soon as it touches live data and real permissions, everything falls apart.

After almost two decades building software for regulated industries, the pattern looks less like an AI problem and more like an architecture problem.

Typical blockers

  • Missing or inconsistent fields → misclassified risk, wrong triage, “why is this answer so off?”
  • Duplicate patients and providers → broken histories, unsafe recommendations.
  • Conflicting business rules across systems → AI behavior changes depending on which source you hit.
  • Different source formats for the same concept → fragile ETL, surprise errors.

A tiny data glitch that would be harmless in an e‑commerce app can translate to bad clinical guidance. That’s why we start with the data foundation instead of the model.

Detailed view of the four layers

FHIR‑first operational data layer

  • Near real‑time clinical data.
  • Resources like Patient, Observation, MedicationRequest, Encounter, Condition share common semantics.
  • Systems can plug into a known structure instead of one‑off schemas.

Warehouse / lakehouse analytics layer

  • Snowflake, BigQuery, Databricks, etc.
  • ETL’d, standardized data for population‑health dashboards, longitudinal patient journeys, predictive models on de‑identified data, cost and quality analytics.

MDM / hMDM (Master Data Management)

  • Reconciles identities across patients, providers, payers, and plans.
  • Produces “golden records” so everything above isn’t built on a shaky identity layer.

API + access control layer

  • REST / GraphQL / FHIR APIs exposed in a predictable way.
  • Central place for permission logic, purpose‑of‑use checks, masking/redaction, auditing, and field‑level access controls.
  • This is also where AI systems should enter the picture.

Why FHIR matters for AI

  • Eliminates schema chaos – all clinical entities use defined resource structures.
  • Reduces one‑off mapping – many vendors already expose FHIR or can be transformed into it with stable pipelines.
  • Makes interoperability default – hospitals, labs, pharmacies, payers all plug into the same structure.
  • Provides predictable outputs – a function like get_patient_observations() always returns a list of Observation resources.
  • Keeps you adaptable – new modules or AI tools can connect without reinventing the data model.

Other healthcare standards (for context)

StandardPrimary Use
HL7 v2Older, message‑based hospital workflows
HL7 v3 / CDADocument‑centric clinical documents and summaries
openEHRLong‑term clinical modeling and robust repositories
OMOPResearch and population analytics on de‑identified data
CDISCClinical research submission workflows

We normally see FHIR working alongside these standards, not replacing them. FHIR handles modern, API‑driven, patient‑centric workflows; the others handle archival, research, or regulatory use cases.

Example: FHIR‑first patient engagement platform

  • Server: HAPI FHIR server managing read/write operations.
  • Integration: External EHR and pharmacy systems synced through FHIR APIs.
  • Permissions: Enforced at the resource level (RBAC + relationship‑based rules + FHIR security mechanisms).

Impact

  • No custom schemas for core clinical data → drastically less mapping.
  • Multiple apps (patient, provider, admin) could reuse the same data layer.
  • Access controls lined up naturally with FHIR resources.
  • When AI features were added, the data model already made sense to an LLM.

Permission model for AI assistants

Giving an AI assistant access to clinical data is very different from building a normal CRUD app. You need a permission model that accounts for:

  • User‑specific access – patients only see their own records; physicians see active patients under their care.
  • Purpose of use – treatment vs research vs billing, etc.
  • Contextual rules – time‑bound access, “break‑glass” emergency overrides.
  • Full audit trails – who accessed which fields, and why.

Example flow

  1. Patient asks: “What were my last blood test results?”
  2. AI identifies and authenticates the user.
  3. Authorization layer evaluates: Is this user the patient? Are they allowed to see Observation resources for themselves?
  4. Only authorized FHIR resources are retrieved.
  5. AI summarizes those observations in natural language.

Tools for fine‑grained access control

  • Permit.io, Permify – developer‑friendly APIs.
  • OPA / ABAC – custom solutions for very specific policy logic.

Key point: All AI queries should pass through this layer. The model never “free‑browses” your datastore.

Safe AI interaction via function calling

Modern LLMs (OpenAI, Claude, etc.) support function calling. Instead of asking the model to generate SQL or call arbitrary URLs, you expose a small toolkit of functions.

Available back‑ends

  • FHIR server (operational data)
  • Warehouse / lakehouse (analytics)
  • MDM (identity)
  • APIs (access)

Example function toolbox

def get_patient_observations(patient_id: str, category: str) -> List[Observation]:
    ...

def get_patient_conditions(patient_id: str) -> List[Condition]:
    ...

def get_patient_medications(patient_id: str) -> List[MedicationRequest]:
    ...

def search_encounters(patient_id: str, date_range: Tuple[date, date]) -> List[Encounter]:
    ...

Runtime flow

  1. User asks a question.
  2. LLM selects the appropriate tool from its toolbox.
  3. Tool checks permissions using your auth layer, queries FHIR/MDM/warehouse as needed, and returns structured data.
  4. LLM generates a natural‑language answer based on that structured result.

The model never talks directly to your FHIR store or warehouse; it always goes through a thin, well‑tested layer you control. This is where you enforce input validation, logging, and compliance.

Back to Blog

Related posts

Read more »