Anecdotal AI: Your EHR's Medical Detective

🧠 Inspiration

You know that feeling when you walk into a doctor’s office, and after a five-minute chat, they diagnose you with "stress" and send you home with sleeping pills? Meanwhile, your body is "literally on fire"? Yeah, that frustration was my muse.

Anecdotal AI was born not just from frustration, but from curiosity, what if a doctor had an always-on-call, well-read, never-sleeping assistant who actually read all the clinical notes, pulled insights from research published last week, and could gently ask, “Hey, have you considered this?”


🚀 What It Does

Anecdotal AI is your AI-augmented clinical co-pilot, turbocharged with Sonar, and can be launched directly from any FHIR-compliant Electronic Health Record system (thanks to SMART on FHIR). It doesn’t just assist, it investigates. Think of it as:

  • The Sherlock Holmes of EHRs - Finds diagnostic clues even House would miss
  • A Time Machine - Transforms decades of messy medical information into a clean, coherent timeline
  • Your Overachieving Intern - Suggests research-backed next steps with references
  • A Preventative Care Ninja - Help saves Medicare $17B in readmissions (one avoided boomerang patient at a time)

Here’s what it does:

🩺 The Magic Workflow:

  • EHR Launch: Seamlessly launches inside your EHR via OpenID Connect & MeldRx, pulling in real-time data (conditions, observations, allergies, encounters, notes, etc.).
  • Sonar-Powered Timeline: Imports clinical notes (even decades' worth), organizing them into an informative, chronological medical history.
  • Scoped Smart Analysis: Need to assess cardiovascular risks? Suspect biotoxins? Want a full-body workup or a general checkup? Choose your scope and watch Sonar get clinical (More scopes coming soon).
  • Service Requests, Simplified: Sonar suggests FHIR-compliant service requests based on current data. Add with one click, zero paperwork guilt.
  • Preventive Care Plans: Personalized, research-backed care recommendations that help reduce readmissions. Your EHR now has a future planner.
  • Diagnostic Companion: Generates encounter briefs with red flags, relevant questions, and medical literature references. Sherlock Holmes meets UpToDate.

🧠 Agentic Chat Mode

  • Sonar Agent uses a Model Context Protocol-inspired workflow to choose the right tools.
  • Follows clinical reasoning with a checklist (because even AIs need a to-do list).
  • Generates and saves structured reports directly into the EHR.
  • Can execute tasks autonomously.
  • Engages human-in-the-loop protocol when there's uncertainty to ensure no rogue diagnoses happen.
  • Remembers context across queries.
  • Has a Deep Research Mode - Scours medical literature like a grad student on espresso

🔍 How I Built It

  1. Befriended FHIR (it's complicated)
  2. Integrated Sonar (immediately wondered how I ever worked without it)
  3. Survived Cryptography (the real diagnostic challenge was my sanity)

Tech Stack:

  • Sonar API (sonar-pro & sonar-deep-research) – Because knowledge is power (and this one comes with the most up-to-date references).
  • Flutter/Dart – For those sweet cross-platform pixels.
  • MeldRx API + FHIR Server – EHR access with brains and brawn.
  • Firebase Hosting – Because it's fast/secure and the free tier is very generous 🤷.
  • Custom OIDC – Yes, I did cryptography, so you wouldn’t have to.

🎵 Music in Demo Video: "Omega" by Ardie Son – because even clinical AI needs a soundtrack. (Licensed from Artlist with License Number - qS2JJK)


🧩 How It's Different (and Better)

“If ChatGPT was an enthusiastic intern, and Gemini a cautious resident, Sonar is the seasoned attending who read every single research paper last night, including the ones published last Monday.”

This isn’t just another AI layer slapped on an EHR. With Sonar, I’ve built:

  • A clinical-grade, real-time analysis engine that respects the complexity of patient care.
  • An intelligent agent that operates with transparency, cites its sources, and respects compliance (HIPAA, ONC, 21st Century Cures Act, etc).
  • A workflow-aware assistant that blends into clinical life, not disrupts it.

🧪 Challenges

  • Sonar’s depth = 🔥. But integrating with FHIR data (aka: JSON Jungle) took a machete.
  • OIDC setup made me question all my life choices… again. But hey, security matters.
  • FHIR Data Wrangling - Turns out "standardized" still means "bring a map".
  • Keeping Up with Sonar - It knows more new studies than my med school friends.

🏆 Accomplishments I’m Proud Of

  • Built a fully working, EHR-integrated, AI-powered diagnostic assistant.
  • Merged AI analysis, research sourcing, service request generation, and documentation, all in one flow.
  • Tamed Sonar’s depth to fit into clinical windows (and attention spans).
  • Built tools for real-world doctors, not just hackathon demos.
  • Built a tool that contextually understands clinical data (no more "have you tried yoga?" for stage 4 cancers).

📚 What I Learned

  • Sonar by Perplexity is the closest thing to a med school-trained AI researcher on call.
  • FHIR ≠ easy. But it is powerful, elegant, and worth the pain.
  • AI needs good scaffolding to thrive in real clinical settings. Sonar made it easier.
  • Doctors don’t just need data, they need insight. Anecdotal AI + Sonar delivers that securely and in context.
  • Sonar knows that Biotoxin is not a Pokémon.
  • AI can't replace doctors, unless you want your diagnosis in TikTok dance form.

🔮 What’s Next

  • 📱 Mobile-first version: because good AI should fit in a lab coat.
  • 🧑‍🤝‍🧑 *Patient portal integration: let people see their own risks and data stories.
  • 🧠 *More Agentic Tools: think chart summarization, structured diagnosis prediction, and burnout-busting automation.
  • 🩻 *More Scopes: Neurology, Nephrology, Oncology, we are coming for all the -ologies.
  • ⚙️ EHR Partnerships: because democratizing powerful diagnostics is the mission.

Thanks to Sonar, electronic Health Records (EHRs) can now ask the right questions, at the right time, with receipts.

Built With

Share this project:

Updates

Submission history