
FHIR Resources Explained: Types, Structure and Examples
Learn FHIR resources step by step: what each resource type holds, how IDs, references and extensions work, and how to choose the right ones.
A reference architecture and practices for building safe generative AI features in healthcare products.

Adding a generative AI feature to a healthcare product takes more than calling a model API. The feature has to be grounded in the right data, protected against errors and misuse, evaluated before every release, compliant with HIPAA and observable in production. This engineering guide sets out a reference architecture for generative AI features in healthcare products and the practices that make them safe to ship. For use cases and risks at a higher level, see our main guide to generative AI in healthcare.
| Layer | What it does |
|---|---|
| Input handling | Authenticates the user, checks permissions, removes data the task does not need |
| Retrieval | Finds relevant, authorized source content such as notes, policies or guidelines |
| Prompt assembly | Combines instructions, retrieved evidence and the user's request in a versioned template |
| Model | A model from a provider covered by a business associate agreement, or a self-hosted model |
| Output checks | Validates format, checks citations against sources, filters unsafe content |
| Review interface | Shows the output with sources and makes editing and approval easy |
| Logging and monitoring | Records inputs, outputs, versions and user actions for audit and quality tracking |
Most healthcare features should answer from approved sources rather than the model's memory. Retrieval-augmented generation finds relevant passages and asks the model to answer from them with citations. Getting retrieval right is most of the work: chunking documents without losing meaning, combining semantic and keyword search, reranking and checking that every claim is supported. Our guide to RAG for clinical documents goes deep on this.
Build an evaluation set from real, de-identified examples with expected outputs reviewed by clinicians. Score each release on accuracy, omissions, unsupported claims, harmful content, format and performance across patient groups and languages. NIST's Generative AI Profile describes confabulation, where a model produces confident but false content, as a key risk to measure (NIST AI 600-1). Re-run the evaluation whenever the model, prompt, retrieval source or parser changes.
For the wider product path, see adding AI to a healthtech product. Teams building generative AI features can see our approach on the AI implementation support page.
Related reading: generative AI in healthcare explained and generative AI risks in healthcare.
Safe generative AI features in healthcare products share an architecture: controlled inputs, grounded retrieval, versioned prompts, a BAA-covered model, output checks, a good review interface and full logging. Add guardrails against errors and manipulation, evaluate before every release and monitor in production. That is what turns a demo into a feature customers can trust.
If you are building generative AI features for a healthcare product, talk to Ekipa's HealthTech engineers.
With controlled inputs, retrieval from approved sources, versioned prompts, a BAA-covered model, output checks, a review interface, logging and an evaluation set used before every release.
It grounds answers in approved sources with citations, which reduces made-up content and lets users check where answers come from.
With an evaluation set of real, de-identified examples reviewed by clinicians, scored for accuracy, omissions, unsupported claims, harmful content and fairness.
An attack where instructions hidden in content the model reads try to change its behavior. Treat external content as data and limit what the model can do.
Documentation and administrative features generally do not. Features that diagnose or guide treatment may be medical devices.

Learn FHIR resources step by step: what each resource type holds, how IDs, references and extensions work, and how to choose the right ones.

Medical device software development explained: IEC 62304 lifecycle, ISO 14971 risk, FDA documentation, cybersecurity and AI change control.

Telemedicine software development guide covering features, HIPAA and BAA rules, state licensure, FHIR integration and a step-by-step build plan.
Connect with our team to explore how AI expertise can transform your business.