Inspiration

Doctors spend up to 2 hours per day on clinical documentation — time stolen directly from patient care. The problem isn't that physicians don't know what to write; it's that translating real-time clinical thinking into a structured SOAP note is tedious, repetitive, and interruptive. We built SOAP Note Generator to eliminate that friction entirely.

What it does

SOAP Note Generator takes rough physician bullet notes — the kind scribbled during a consult — and instantly converts them into a fully structured SOAP note:

  • Subjective: Patient complaints and history
  • Objective: Vitals, exam findings, observations
  • Assessment: Diagnosis or differentials
  • Plan: Treatment, medications, follow-up

It flags [MISSING] fields where clinical data is absent and marks inferred details as [INFERRED] — ensuring transparency and preventing hallucination.

How we built it

Built as a BYO Agent on Prompt Opinion with A2A protocol enabled. The system prompt was engineered around clinical documentation standards, with strict rules against fabricating clinical details. FHIR context extension was enabled to pull structured patient data alongside free-text notes. Two skills registered:

  • generate_soap_note
  • flag_missing_fields

Published to the Prompt Opinion Marketplace for A2A discovery.

Challenges we ran into

The hardest challenge was preventing hallucination. Medical documentation has zero tolerance for invented details — a fabricated lab value or inferred diagnosis can cause real harm. Getting the agent to confidently flag gaps rather than fill them with plausible-sounding fiction required careful prompt engineering and explicit output rules.

Accomplishments that we're proud of

We're proud of the [MISSING] and [INFERRED] tagging system. It makes the agent trustworthy — a clinician can glance at the output and immediately know what came from the patient and what was inferred. The 87% token compression ratio (1522 input → 197 output) also shows the agent distills information efficiently without losing clinical accuracy.

What we learned

Prompt constraints matter more than model size in clinical AI. A well-constrained smaller model outperforms an unconstrained larger one for structured documentation tasks. Explicit output rules — [MISSING], [INFERRED] — are more reliable than asking the model to "be careful."

What's next for SOAP Note Generator

  • Voice input: dictate notes, get SOAP output in real time
  • EHR integration: push generated notes directly to Epic or Cerner via FHIR DocumentReference
  • Multi-language support for non-English speaking clinicians
  • Specialty templates: separate prompts for psychiatry, pediatrics, emergency medicine
  • Chain with MedCheck agent to auto-flag drug interactions inside the Plan section

Built With

Share this project:

Updates