A healthcare AI platform needed more than accurate diagnostic results. It needed a complete clinical report workflow — the entire pipeline from AI-generated preliminary findings through clinician review, mandatory change tracking, digital signing with audit logs, PDF generation, and automated result delivery back to the hospital's EHR. Every step carries regulatory weight under 21 CFR Part 11, and a single gap in the audit trail invalidates the entire chain.
ML LABS led the engineering effort, designing and building the backend systems powering this workflow. AIM Consulting handled the frontend interface. The collaboration is a good example of specialized vendors complementing each other to move faster for the client.
The Problem
The platform's AI models produced accurate diagnostic results. But between a model output and a legally signed clinical report sits a dense layer of workflow engineering that most teams underestimate. Research on implementing AI in clinical workflows identifies the peri-implementation phase — the processes wrapping the model — as where most complexity concentrates.
The specific requirements were unforgiving. Every edit to an AI-generated report needed a mandatory change reason. Clinicians needed to review, confirm, and sign reports in batch without losing state. Signed reports had to lock permanently, with any unlock requiring a separate privileged action and its own audit trail. PDF output had to render correctly across variable report lengths with institution-specific branding. And confirmed reports had to trigger automated result delivery to the EHR — without sending duplicates when both preliminary and final delivery paths were active.
graph LR
A1["AI Preliminary<br/>Result"] --> B1["Clinician<br/>Review"]
B1 --> C1["Change Tracking<br/>+ Confirmation"]
C1 --> D1["Digital<br/>Signing"]
D1 --> E1["Lock +<br/>PDF Generation"]
E1 --> F1["EHR Result<br/>Delivery"]
style A1 fill:#1a1a2e,stroke:#0f3460,color:#fff
style B1 fill:#1a1a2e,stroke:#ffd700,color:#fff
style C1 fill:#1a1a2e,stroke:#ffd700,color:#fff
style D1 fill:#1a1a2e,stroke:#e94560,color:#fff
style E1 fill:#1a1a2e,stroke:#16c79a,color:#fff
style F1 fill:#1a1a2e,stroke:#16c79a,color:#fffReport Lifecycle
We built a complete report lifecycle with full audit compliance. Every report passes through defined stages — with the system enforcing valid transitions and preventing any sequence violation. This is not a status flag on a database row. It is a compliance-grade workflow where every boundary carries enforced preconditions and auditable side effects.
Mandatory Change Tracking
When a clinician modifies any AI-generated value — a measurement correction, an interpretation override, an artifact removal — the system requires a structured change reason before allowing confirmation. This satisfies 21 CFR Part 11 requirements for electronic records: every modification is independently recorded with the original value, new value, clinician identity, reason, and timestamp.
Batch Confirmation
In production clinical environments, clinicians do not confirm reports one at a time. We built a confirm-and-next workflow that lets a clinician review, confirm, and advance to the next study in a single action — with every confirmation verified server-side before advancing. The batch workflow was hardened through production clinical use, catching edge cases that only surface under real clinical volume and timing conditions.
Signing and Locking
Signing is the legal act that seals the report. After signing, the report enters a locked state where no further edits are permitted. Any unlock requires a separate privileged action with its own mandatory reason and audit trail, creating a complete chain of custody from first AI output to final signed document.
The difference between a clinical AI prototype and a production system is not the model. It is whether every change to the model's output is tracked, attributed, and defensible under audit.
We hardened the lock enforcement through iterative testing — catching cases where the locked state could be circumvented through specific navigation paths. These are compliance-critical issues that only surface through exhaustive testing of real clinical workflows.
Prior Report Navigation
Clinicians compare current findings against prior studies for the same patient — longitudinal context that changes the clinical significance of individual measurements. We built a prior report navigation system that shows previous report titles and enables direct comparison, with the current and prior panels scrolling in lockstep and handling reports of different lengths gracefully.
PDF Generation
Clinical PDFs are regulated documents that must render identically across systems, embed all required assets, and handle variable content gracefully. We built the PDF generation pipeline to handle variable report lengths, institution-specific branding with configurable cover pages, consistent multi-page formatting, and self-contained output for network-restricted clinical environments. New institutions are supported through configuration rather than code changes.
Result Delivery
Confirmation triggers automated result delivery back to the EHR via HL7 result messages. We built result delivery with support for both preliminary and final result paths, with per-organization configuration controlling which paths are active. The system prevents duplicate sends across pathways and handles PDF delivery to EHR document management systems. The companion article on HL7 messaging covers the message construction layer in detail.
Boundary Condition
This workflow model assumes the AI system produces structured, discrete results that a clinician can meaningfully review field by field. If the AI output is an opaque score or free-text narrative without structured fields, the change-tracking and confirmation flow does not apply directly. Similarly, some screening applications deliver results without individual clinician sign-off — the full lifecycle is unnecessary overhead in those cases.
First Steps
- Map every report state and transition before writing code. Define preconditions, side effects, and audit requirements for each state change.
- Build the audit infrastructure before the review UI. Mandatory change tracking and compliant transition validation are the foundation.
- Test production edge cases explicitly. Batch workflows under latency, unconfirm-reconfirm flows, and comparison views are all testable.
Practical Solution Pattern
Design the clinical report workflow as a compliance-grade lifecycle with enforced transitions, mandatory change tracking, and controlled delivery timing that prevents duplicate result sends. Build the audit infrastructure first, enforce change reasons as preconditions rather than optional metadata, and invest in the edge cases — batch confirmation, lock enforcement, comparison views — that only surface under real clinical use.
This approach works because the primary failure mode in clinical AI report systems is not inaccurate AI output — it is untraceable changes to that output. When every modification is logged with its reason, timestamp, and operator identity, the system satisfies regulatory requirements by design rather than by retrofit. If the clinical workflow is defined and the constraint is production-quality engineering, AI Workflow Integration is the direct build path.
References
- Wang, F., Beecy, A. Implementing AI Models in Clinical Workflows: A Roadmap. BMJ Evidence Based Medicine, 2025.
- U.S. Food and Drug Administration. Part 11, Electronic Records; Electronic Signatures — Scope and Application. Regulatory Reference, 2003.