💡 Inspiration

In outpatient specialist clinics, physicians don't lose time simply because electronic health records are long. They lose entire 30-minute consultation slots because intake packets arrive fragmented, illegible, or incomplete.

Consider a real-world scenario in a busy cardiology clinic: A patient arrives for an initial consultation. The GP referral letter was photographed with a smartphone at an awkward angle; it describes the patient's past history but omits the actual clinical question. The patient hands over a wrinkled, handwritten medication list, but the blood-thinner (anticoagulant) dose is smudged with ink. A printout of a hospital discharge summary has specular glare across the renal blood test results.

The doctor cannot safely make management or prescribing decisions without knowing why the patient was referred or what dose of anticoagulant they are taking. The consultation collapses into an administrative scramble, the appointment slot is burned, and the patient waits another four weeks.

As a physician and health informatics researcher, I asked: Why are clinicians triaging messy paperwork during the consultation, instead of autonomous background agents auditing intake the night before?


🩺 What It Does

Anteroom is an ambient pre-visit intake coordinator built with the Strands Agents SDK, Amazon Bedrock, and Amazon Textract, with an Amazon Bedrock AgentCore action group packaged and dry-run validated.

Anteroom runs autonomously in the background the evening before clinic, ingesting whatever messy artifacts arrive (angled smartphone photos, handwritten notes, screen captures). It deterministically audits readiness against clinic policy and routes work into three role-specific queues before the patient ever steps through the door:

  1. ☎ Receptionist Action Queue: Detects missing administrative prerequisites (e.g. missing referral reason, illegible phone number) and generates verbatim telephone call scripts so front-desk staff can resolve issues with a single quick call.
  2. 💊 Nurse Review Queue: Flags high-risk clinical reconciliation gaps (e.g. verifying an altered blood-thinner with the community pharmacy).
  3. 🩺 Doctor 30-Second Pre-Consultation Brief: Gives the clinician an instant, structured orientation with clickable visual bounding-box citations linking directly to the source pixels on the original document.

🛡️ Non-Negotiable Safety Boundaries

  • Anteroom does not diagnose.
  • Anteroom does not prescribe or recommend treatments.
  • Anteroom does not perform emergency clinical triage.
  • Anteroom is strictly an assistive pre-visit completeness and audit coordinator.

⚙️ How We Built It

Anteroom combines AWS serverless intelligence with strict deterministic clinical policy engines:

1. The Hardware Confidence Gate (Structural Hallucination Defense)

Standard LLMs love to "helpfully" guess illegible text. If a prompt receives Apixaban [smudge] twice daily, language models statistically default to common doses (e.g., 5mg). In medicine, that guess can cause fatal bleeding or stroke.

We built a structural defense:

  • Every document passes through Amazon Textract, which computes word-level confidence scores.
  • Any word scoring below the 60% confidence floor is stripped and replaced with an explicit ⟪ILLEGIBLE⟫ token before any language model sees the text.
  • The Amazon Bedrock model is fed the sanitized transcript—it never sees raw blur pixels. It is structurally incapable of guessing a dose because the token was deleted before it arrived.
  • The model is configured via a single environment variable (ANTEROOM_MODEL_ID, default Amazon Nova Lite) precisely because safety does not depend on model choice.

2. Strands Agents SDK — Deliberately Two Agents, Deliberately Narrow

The Strands Agents SDK runs two focused agents using strict Pydantic v2 schemas:

  • Document Interpreter (anteroom/agents.py): Extracts semantic meaning from transcripts (identifying which line holds allergies, which token represents a drug name).
  • Brief Composer (anteroom/brief.py): Generates concise, source-grounded clinical summaries.

Every safety-critical decision is handled by deterministic code around the agents:

  • Token deletion (anteroom/ocr.py) — confidence thresholding.
  • Drug risk tiering (config/visit_requirements.yaml) — inspectable lookup policy.
  • Gap severity and role ownership (anteroom/readiness.py) — pure deterministic logic without model calls.
  • Dosage rendering — strict string interpolation, never generated freehand by an LLM.

3. Cross-Document Clinical Deduction

Single-document summarizers cannot detect cross-document discrepancies. Anteroom maintains multi-document context:

  • A discharge summary notes: "Apixaban continued. Dose reduced on discharge." (omits the new dose).
  • A handwritten list has the Apixaban dose smudged out.
  • Holding both documents simultaneously, Anteroom's auditor deduces: An altered high-risk anticoagulant has no documented dose across all available sources. It immediately generates a blocking safety alert for the nurse.

4. Zero-Trust Clinical Authorization

Anteroom enforces strict practice and role scoping:

  • Cross-practice reads raise AccessDenied and log a security audit trail.
  • Receptionists see administrative logistics and phone scripts, but are strictly prohibited from viewing clinician briefs.
  • Clinicians receive immediate visibility into all blocking safety gaps.

🚧 Challenges We Ran Into

  1. The LLM Completion Reflex: Multimodal models reflexively infer smudged numbers based on statistical training priors. Prompt engineering alone ("do not guess") proved unreliable. We resolved this structurally: Amazon Textract performs word-level confidence scoring, and our OCR confidence gate replaces low-confidence words with ⟪ILLEGIBLE⟫ before any language model sees the text.
  2. The "Silent Absence" Problem: Window glare across an intake monitor scan obliterated the creatinine/eGFR row, yet Textract returned the surrounding lines with 95%+ confidence. A generic summarizer would report the document as complete. We solved this with inspectable clinical schemas (config/visit_requirements.yaml) that audit what must be present rather than summarizing what was observed.
  3. Multi-Role Scoping & Privacy: Creating an operational interface where receptionists receive actionable telephone scripts without exposing sensitive clinician briefs required strict role-based access contracts (AccessDenied boundaries across practice and role domains).

🏆 Accomplishments We're Proud Of

  1. Zero Hallucination Guarantee: In 20 consecutive live runs against Amazon Bedrock, the agent refused to guess the smudged anticoagulant dose 20 out of 20 times (dose=None, confidence=UNREADABLE).
  2. Reliable Cross-Document Deduction: 20/20 detection of the interlocking discharge-note/medication-list gap.
  3. Control Case Accuracy: Evaluated against clean, flatbed-scanned referrals (apt-002), achieving 100/100 READY with zero false-alarm flags.
  4. AgentCore Action Group Packaging: Packaged and dry-run validated with OpenAPI schemas for Amazon Bedrock AgentCore deployment.
  5. 93 Automated Tests: Complete test suite passing in under 1 second.

🧠 What We Learned

  • Separate Semantic Extraction from Policy Enforcement: Let models handle unstructured language understanding, but let deterministic code enforce clinical safety policies. Anyone can audit a YAML policy; nobody can reliably audit a prompt.
  • Clinicians Want Provenance, Not Chatbots: Doctors do not want conversational assistants in outpatient care; they want a 30-second bulleted brief with visual bounding boxes traceable to source pixels.

🔮 What's Next for Anteroom

  • HL7 FHIR & EHR Connectors: Direct integration with Epic, Cerner, and EMIS Health to automate schedule pulls and note write-backs.
  • Ambient Patient Pre-Intake: Automated, secure SMS workflows requesting missing intake items 48 hours before appointments.
  • Multi-Tenant Practice Federation: Enterprise scoping for multi-site hospital trusts.

Built With

  • agentcore
  • agentic-ai
  • amazon-bedrock
  • amazon-nova
  • amazon-textract
  • artificial-intelligence
  • aws-lambda
  • clinical-nlp
  • health-informatics
  • healthcare
  • machine-learning
  • pillow
  • pydantic
  • pytest
  • python
  • strands-agents
  • streamlit
Share this project:

Updates

Submission history