
Predetermined Change Control Plan: FDA Guide for AI Devices
How an FDA predetermined change control plan lets AI device updates ship without new submissions: the three parts, modification protocol and release controls.
RAG for clinical documents: ingest FHIR notes, retrieve and cite evidence, protect PHI, and test faithfulness, recall and abstention before release.

FHIR R4 allows a DocumentReference to point to clinical notes, scanned paper, or other document formats without storing the document's actual bytes inside the resource, according to the HL7 DocumentReference specification. For engineers building RAG for clinical documents, that separation creates an immediate problem: finding a record doesn't mean you've retrieved its content, preserved its context, or established permission to use it. Production architecture must connect ingestion, evidence retrieval, PHI controls, and clinical evaluation before a generated answer reaches a user.
Retrieval-augmented generation (RAG) retrieves relevant passages from approved sources and asks a model to answer from that evidence, with citations. For clinical text, the engineering objective is to make fragmented documentation usable without allowing the generator to fill missing information with plausible medical statements.

A clinical chart contains documentation from different encounters, authors, and specialties. A passage can be semantically relevant yet unsuitable for the question because it describes an earlier admission or repeats an outdated medication list. Treat document relevance and clinical applicability as separate decisions.
A hospitalized-patient EHR evaluation compared targeted retrieval with recent-note context and much larger context windows for imaging extraction, antibiotic timelines, and diagnosis identification. Targeted retrieval closely matched or beat the use of recent notes and approached the performance of giving the model its full context window, while using far fewer input tokens. Results varied by task.
That finding supports targeted retrieval as an architecture worth testing, rather than assuming that a larger prompt solves chart comprehension. Larger context can preserve information retrieval would miss, but it also increases the material the model must reconcile.
Require the system to demonstrate which evidence supports an answer and which relevant evidence it failed to retrieve.
We would establish separate release gates for retrieval recall, faithfulness, and abstention behavior. A single aggregate score can hide a system that retrieves well but reasons incorrectly, or writes convincing answers from incomplete evidence.
Use FHIR R4 DocumentReference as an ingestion boundary, then resolve its content attachment before parsing. Preserve the resource identity, patient subject, author, encounter context, document type, MIME type, source location, and status information alongside the extracted text.
US Core Clinical Notes guidance supports clinical-note exchange through DocumentReference and DiagnosticReport profiles, with DocumentReference preferred for narrative content broader than a specific order or report. Don't assume every clinically useful record arrives as a DiagnosticReport or a plain-text attachment.
Our recommended chunking policy follows sections and clinical relationships before fixed token windows. Keep a medication name with its dose, route, and date; retain a section's heading and author context; and preserve source-page references for scanned attachments. If extraction loses a negation or table relationship, embedding that text won't repair it.
The AI-powered data extraction engine provides a relevant product reference for clinical-document extraction.
Ingestion pipeline responsibilities
| Step | Owner | Evidence |
|---|---|---|
| Ingest and resolve attachments | Integration engineering | Source identity and attachment-resolution records |
| Normalize text and layout | Document-processing engineering | Extracted text checked against source pages |
| Chunk by clinical structure | Retrieval engineering | Reviewed section boundaries and relationship preservation |
| Embed and index | Search engineering | Versioned index configuration and metadata checks |
| Process updates | Integration and search engineering | Tests showing superseded material is handled correctly |
Integration acceptance tests belong in the scope of AI implementation support, alongside connectivity. An interface that successfully transfers documents can still produce unusable retrieval evidence.
The resulting flow is straightforward: ingest the source, normalize its content, chunk without losing relationships, embed the text, and index it with provenance and access metadata intact.
Start evaluation with dense, sparse, and hybrid retrieval rather than declaring a winner before testing your corpus. Dense retrieval is a candidate for semantic matching; sparse retrieval provides an explicit lexical signal for abbreviations and uncommon clinical terms. Hybrid retrieval adds operational complexity, so its inclusion should depend on measured improvements on your documents.

A comparison of clinical RAG configurations tested twelve RAG designs on 250 de-identified patient vignettes; a hybrid pipeline with cross-encoder reranking performed best. That supports testing hybrid retrieval with reranking first, while measuring latency and generation errors separately. Those results justify a baseline experiment, not a universal production configuration.
A practical candidate architecture combines semantic and lexical candidates, removes duplicates, reranks passages against the current question, and assembles a bounded evidence package. Include enough surrounding text to interpret each passage, but don't pad the context with weak matches merely to fill the available window.
A medical question-answering evaluation illustrates why evidence recall and answerability deserve separate assessment. If the necessary passage never reaches the generator, instructions to be factual can't supply the missing chart information.
Conversation handling needs its own retrieval policy. A controlled evaluation of conversational retrieval drift found that a clinical RAG system's hallucination rate rose from 5% with no conversation history to 40% after just 10 prior exchanges. Rewrite the current question into a standalone query, preserve necessary patient context separately, and test follow-up questions explicitly.
Inspect the final evidence package during debugging. Reading only the user's question and generated answer leaves the most consequential failure point unexamined.
Measure recall@k, passage relevance, citation completeness, and answerability independently. Tune reranking only after confirming that candidate generation can find the required evidence.
Apply patient and access-right filters before evidence enters the model context. Our recommended design derives authorization from the authenticated application session and checks it during retrieval and source-document access. A prompt telling the model to ignore unauthorized material is an inadequate substitute for application enforcement.

For this architecture, use only BAA-covered model providers when transmitting PHI, and have compliance verify the contracted processing scope. Decide separately whether each development or evaluation environment needs identifiable records. Don't treat removing names as proof that a dataset has been legally de-identified.
The HIPAA Security Rule requires audit controls under 45 CFR 164.312(b) and transmission-security measures under 45 CFR 164.312(e). The regulation establishes obligations; the following telemetry design is an engineering recommendation for producing control evidence.
Record the requesting user or service, patient and document scope, authorization decision, retrieval event, model invocation, and response identifier. Avoid unnecessarily copying full clinical text into operational logs. The covered entity or business associate defines risk-based requirements, engineering implements and tests the controls, and compliance reviews evidence such as log samples, configuration records, and access reviews.
For citations, bind each supported statement to a document identity and source span, with a visible timestamp. Validate that the cited passage supports the statement. When evidence is absent or contradictory, return an explicit limitation or route the question for review rather than generating a definitive clinical conclusion.
Test refusal behavior deliberately. A response that says the record lacks sufficient evidence is preferable to an unsupported inference presented with a citation that merely looks relevant.
Create a representative evaluation set from the document types, terminology, languages, and workflows the application will encounter. Include incomplete charts, conflicting notes, historical findings, and questions whose answers are absent. Clinical reviewers should identify the required evidence as well as the expected response.
A review of healthcare RAG evaluation found a lack of standardized evaluation frameworks for healthcare RAG applications. That makes local acceptance criteria especially important: published benchmarks don't establish that your ingestion pipeline, authorization policy, or clinical workflow is safe.
| Signal | Question to test | Release evidence |
|---|---|---|
| Faithfulness | Does the retrieved evidence support each clinical claim? | Claim-to-passage review |
| Retrieval recall | Did retrieval find the necessary evidence? | Clinician-annotated relevant passages |
| Abstention behavior | Does the application stop when evidence is insufficient? | Missing-evidence and contradiction tests |
| Temporal correctness | Does the answer distinguish historical from current findings? | Longitudinal chart review |
| Clinical usefulness | Does the output help the intended workflow? | Clinician assessment and correction burden |
Generic text similarity can supplement this process, but it doesn't establish whether an answer missed an allergy, used an outdated medication list, or inferred a diagnosis without support. Set acceptance criteria by failure severity and intended use rather than borrowing a benchmark's aggregate score.
Re-test after changes to the model, prompt, embedding configuration, parser, chunking policy, reranker, or source corpus. Version the evaluation artifacts alongside those components so reviewers can trace a regression to a specific change. Consider Trace during implementation planning without treating a product choice as proof that release criteria have been met.
Use TRIPOD+AI reporting guidance when reporting applicable clinical AI studies, and distinguish reporting completeness from deployment validation. In production, retain authorized event telemetry, sample outputs for clinician review, and investigate rising unsupported-claim rates. Monitor recall on maintained labeled cases rather than claiming to measure it from unlabeled traffic.
The Clinic AI Assistant uses RAG with clinic-specific content to provide grounded answers reflecting dermatology-clinic workflows, policies, and care practices. That is a bounded knowledge-assistant use case; it shouldn't be presented as evidence of validated longitudinal EHR reasoning or patient-specific clinical decision-making.

Consider a hypothetical clinic-policy assistant, rather than a claim about the product's internal implementation. An authorized staff member asks which preparation instructions apply to a scheduled service. The application resolves the intended service, searches approved clinic documents, and selects the applicable policy version.
The generator then drafts an answer from the selected passage and exposes its source. If approved documents contain conflicting instructions, the application flags the conflict for review instead of choosing whichever passage ranks highest.
This example illustrates an important scope decision: clinic-policy retrieval and patient-chart synthesis need different evaluation sets. Product teams should establish the intended information boundary before extending an assistant into new clinical workflows.
Require a release package that a reviewer can inspect without reconstructing the system from a demonstration.
Integration evidence should show how source updates, attachment failures, and superseded documents affect the searchable corpus.
Security evidence should include cross-patient isolation tests, authorization failures, and reviewed audit-log samples.
Clinical evidence should document consequential failure cases, reviewer decisions, and unresolved limitations.
Operational evidence should identify component versions, regression results, rollback procedures, and the owner responsible for incident review.
Production readiness depends on the entire evidence path, from source document to reviewed answer. Benchmarks can guide architecture experiments, but local release gates must account for clinical consequences, access boundaries, and documentation quality. Keep the deployment scope narrow enough that engineering and clinical reviewers can explain its limitations.
Compare both approaches on the intended task. Targeted retrieval can reduce context requirements, while larger context may retain evidence a retriever misses; neither approach removes the need to evaluate clinical reasoning.
DocumentReference is the appropriate starting point for broad narrative documents such as progress notes and discharge summaries. DiagnosticReport also participates in clinical-note exchange, so ingestion should support the relevant source profiles rather than forcing every document into the same representation.
It should expose the disagreement and avoid resolving it through generation without indication. Provide the relevant source dates and passages, then apply a defined review or refusal pathway.
No. Review whether the cited passage supports the specific claim and whether its patient, encounter, and time context are applicable. Citation presence alone doesn't demonstrate grounding.
Rerun it whenever a change can affect evidence selection or answer generation. Include parser and index updates, not just model and prompt changes, and retain the results with the release record.
Book a consultation with Ekipa's HealthTech engineers to define the integration boundaries, PHI controls, and clinical release gates for your document workflow.

How an FDA predetermined change control plan lets AI device updates ship without new submissions: the three parts, modification protocol and release controls.

How to integrate with Epic EHR: FHIR vs HL7 v2, Epic developer programs, hospital approval, sandbox-to-production gates and the blockers that stall teams.

A practical HL7 v2 to FHIR migration roadmap: side-by-side running, segment-to-resource mapping, tooling, semantic testing and safe retirement of old feeds.
Connect with our team to explore how AI expertise can transform your business.