Network
Traffic to Textract, Comprehend Medical, Bedrock, KMS, and Secrets Manager never traverses the public internet. There is no DNS name an attacker can probe.
A single workers'-compensation case can contain dozens of PDFs and hundreds of pages of medical history. IMEAI runs the mechanical work — OCR, medical entity extraction, hybrid retrieval, drafting — and hands the physician an editable report where every claim is one click from its source. No PHI ever leaves the AWS BAA boundary during processing.
An Independent Medical Examination produces a structured medico-legal report that establishes causation, severity, and treatment recommendations. The inputs are a stack of PDFs — medical records, radiology, prior treatment, incident statements — running into hundreds of pages, spanning years. The expectation is that every claim in the final report is defensible against an attorney looking for inconsistencies.
The reality: physicians spend 60–70% of their IME time on the mechanical work — finding the relevant pages, extracting ICD-10 codes, tracking which page supports which claim, transcribing it into a structured template. The clinical judgment that justifies their hourly rate is squeezed into the last third of the engagement.
IMEAI does not throw documents at a single LLM and pray. Each AI service does what it does best, produces a structured artifact that a human can inspect, and hands it to the next. If Textract misreads a word it is visible in the document blocks. If Comprehend misclassifies an entity it is visible in the medical entities table. The LLM is the last mile, not the entire journey.
Async document analysis with FORMS + TABLES + LAYOUT. Preserves spatial geometry (page, bbox) — the geometry is what makes citation chips clickable later.
Each stage produces an artifact you can audit. The LLM only sees curated, retrieved context.
Most RAG products treat citations as decorative footnotes. We invert that — the citation schema is the prompt contract. Every chunk carries provenance (case_file_id, page, bbox), the LLM must emit citations as structured data, the UI renders them as clickable chips. The physician verifies any claim in under three seconds. Click any chip below.
The claimant presented following a work-related lifting injury on 2024-07-22 with right-sided lumbar radiculopathy. Imaging confirmed an consistent with the reported mechanism. Surgical intervention proceeded uneventfully, with and no documented post-operative complications. Maintenance pharmacotherapy includes for the residual neuropathic component, with a planned 12-week taper.
The physician's authority is never delegated. AI does extraction, retrieval, and drafting. The physician owns every clinical judgment, every claim that ends up in the final report, and the custody transfer at download.
Every layer below answers the same question — "where can PHI legitimately travel and where can it not?" — at a different altitude. The combination is what makes IMEAI defensible against the audit a regulator will run three years from now, not the policy document filed today.
Traffic to Textract, Comprehend Medical, Bedrock, KMS, and Secrets Manager never traverses the public internet. There is no DNS name an attacker can probe.
Buckets cannot accidentally become public. Final reports are WORM-locked — the same byte sequence a regulator audits in five years is the byte sequence the physician downloaded.
No EC2 to SSH into. No persistent volume that survives task replacement. The smallest possible attack surface for the smallest possible operations burden.
Every query against PHI is logged at the database layer — independent of application logging. pgvector and pg_trgm live next to the relational data, removing an entire DB to secure.
PHI columns are encrypted at the Eloquent layer with envelope keys. The audit_logs table is append-only — an insider cannot scrub their tracks at the app layer.
MFA mandatory, advanced security mode on. Roles in JWT claims rather than database lookups. Every query is scoped by case_id at the repository layer — admins cannot accidentally see other admins' cases.
Application logs are scrubbed of PHI by structured logging conventions. GuardDuty watches for anomalous AWS calls; Macie scans S3 for unexpected PHI. AWS Config validates the HIPAA controls every hour.
Browsers never get a permanent URL to a PDF. Every document fetch is a freshly-signed 15-minute URL. The moment a physician downloads the final report, custody transfer terms move liability onto the physician.
We do not use Comprehend Medical's DetectPHI to redact patient data inside the system. PHI stays within the BAA boundary end-to-end, so there is nothing to redact between trusted services. This eliminates an entire class of false-negative redaction risks while simplifying the architecture. Redaction is for when PHI leaves the boundary — and in IMEAI, it doesn't.
An IME report is not an article. It is a document that may sit on an attorney's desk in three years, opposing counsel pulling at every claim, looking for the one statement that lacks a source. The physician who signed it is responsible. The platform that drafted it cannot disappear into a black box.
IMEAI was built so that the physician's authority is never delegated and never undermined. The AI handles the mechanical work — finding the relevant pages, extracting structured medical entities, drafting the standardized sections. The physician owns the final judgment. The audit trail is forever.
If a claim in the final report is challenged in five years, "I remember reading that" is not a defence.
"Here is the page, here is the bounding box, here is the SSE-KMS-encrypted document still in its original byte sequence" is a defence.
— Architecture review note, IMEAINo separate vector database. No third-party AI provider hops. No supplementary identity service. Everything we needed already existed inside a single AWS account, covered by a single BAA. The discipline was in not adding services, not in choosing exotic ones.
Citation-first RAG, BAA-boundary processing, layered hybrid retrieval, model-agnostic via Bedrock Converse — these patterns apply to insurance underwriting, prior-auth, legal discovery, regulatory submissions, and tax review. The domain changes, the architectural commitments don't.
If you're thinking about AI for your business and you want to talk to someone who will tell you the truth — including when AI is the wrong answer — book a call. We'll spend 30 minutes understanding what you're trying to do, what you're worried about, and whether we're the right fit.