# Summarizing Clinical Notes

Produces structured, citation-anchored summaries of clinical notes, one-liner...

- Repository: https://github.com/maziyarpanahi/openmed (5755 stars)
- Category: Writing
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -g -a claude-code -y`
Codex: `npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -g -a codex -y`
Cursor: `npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -g -a cursor -y`
Gemini CLI: `npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add maziyarpanahi/openmed`

## Description

Produces structured, citation-anchored summaries of clinical notes, one-liner, hospital course, and problem-oriented views, where every claim cites a source span so nothing is hallucinated. Use after de-identifying notes when the user wants a discharge summary draft, handoff/SBAR, problem list, or chart-abstraction summary. De-identify FIRST with openmed.deidentify, then anchor summary claims to entity spans from openmed.analyze_text. Trigger keywords: summarize note, discharge summary, hospital course, problem-oriented, one-liner, SOAP, SBAR, handoff, chart abstraction.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Summarizing Clinical Notes with Span Citations

A clinical summary is only useful if it is *faithful*: every statement must
trace back to something the chart actually says. The failure mode for
note summarization is the confident hallucination, an invented dose, a
fabricated allergy, a discharge diagnosis that was never made. This skill
produces summaries where **each line cites the source span** that supports it,
so a clinician can verify in one glance and catch any fabrication.

> **Not a medical device.** OpenMed and this skill assist documentation; they
> do not diagnose, triage, or make autonomous clinical decisions. Every summary
> is a *draft for clinician review and editing*. Surface that disclaimer in any
> UI that renders these summaries.

## When to use

- Drafting a discharge summary, transfer note, or SBAR/handoff from a long
  encounter.
- Building a problem-oriented view (problem list with supporting evidence).
- Generating a "one-liner" (the single-sentence patient summary) for rounds.
- Chart abstraction where reviewers need quick, verifiable evidence pointers.

## Quick start

De-identify before anything else, extract entities to anchor against, then
compose the summary with citations:

```python
import openmed

note = """\
HPI: 68M with HTN, T2DM presents with 3 days of productive cough and fever to
38.9C. CXR shows RLL infiltrate. Started on ceftriaxone and azithromycin.
Hospital course: improved on IV antibiotics, transitioned to PO. Discharged on
amoxicillin-clavulanate. Follow up with PCP in 1 week.
"""

# 1) ALWAYS de-identify before summarizing or sending text anywhere.
deid = openmed.deidentify(note, method="replace", policy="hipaa_safe_harbor")

# 2) Extract entities; their offsets become your citation anchors.
ner = openmed.analyze_text(deid.text, output_format="dict")
spans = {
    (e["start"], e["end"]): e["text"]
    for e in ner["entities"]
}

The rest: https://github.com/maziyarpanahi/openmed/blob/HEAD/skills/summarizing-clinical-notes/SKILL.md
