At-a-Glance
- description (10-20 chars): SOAP builder
- keywords: clinical-notes, SOAP, guardrails, ICD10, gaps
- measurable_outcome: Produce SOAP markdown + JSON (when requested) covering all four sections with ≥95% note coverage and explicit missing info in ≤2 minutes per note.
Inputs
note_text(dictation, OCR, or EHR export) and optionalpatient_contextmetadata.output_format(markdowndefault,jsonwhen downstream validators need schema).
Outputs
- Structured SOAP summary with Subjective/Objective/Assessment/Plan bulleting.
- Alerts plus missing-information checklist.
- Optional JSON payload using schema from README.
Workflow
- Load system prompt:
prompt.mdenforces no hallucinations + data gap surfacing. - Normalize input: Pre-clean vitals, labs, and timeline context when available.
- Generate summary: Call preferred LLM (OpenAI, Anthropic, Gemini, OSS) using
usage.pyas a template. - Validate: Cross-check extracted values vs. source text and ensure contradictions/missing data are spelled out.
- Deliver output: Provide markdown + JSON as required and log PHI handling steps.
Guardrails
- Never invent findings; state "not provided" explicitly.
- Mark outputs as documentation support only—not clinical decisions.
- Strip/re-mask PHI before storing prompts/responses.
References
- For detailed schema, guardrails, and integration snippets see
README.md,prompt.md, andusage.py.