annotating-variants
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST,…
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,
Claude Code
$ npx -y skills add maziyarpanahi/openmed --skill summarizing-clinical-notes --agent claude-code
Codex
$ npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -a codex -y
Cursor
$ npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -a cursor -y
Gemini CLI
$ npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -a gemini-cli -y
GitHub Copilot
$ npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -a github-copilot -y
OpenCode
$ npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -a opencode -y
Windsurf
$ npx skills add maziyarpanahi/openmed --skill summarizing-clinical-notes -a windsurf -y
name: summarizing-clinical-notes 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." license: Apache-2.0 metadata: project: OpenMed category: clinical-nlp pairs: after version: "1.0"
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.
encounter.
De-identify before anything else, extract entities to anchor against, then compose the summary with citations:
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"]
}
# 3) Compose the summary. Every bullet references a (start, end) span so a
# reviewer can click back to the exact evidence.
def cite(start, end):
return f"[{start}:{end}] {deid.text[start:end]!r}"
# Example problem-oriented line, grounded in detected spans:
# "Community-acquired pneumonia (RLL infiltrate) — treated with ceftriaxone +
# azithromycin." with cite(...) anchors for each entity.`analyze_text` returns entities as `{"text", "label", "confidence", "start", "end", "metadata"}`; the `start`/`end` offsets index the de-identified text, giving you exact, verifiable citation anchors.
1. **De-identify** with `openmed.deidentify`. Summaries are often shared or logged; PHI must be gone before this stage. Keep the mapping (`keep_mapping=True`) only if a downstream clinician must re-identify in a controlled context — never persist the mapping with the summary. 2. **Extract grounding spans** with `openmed.analyze_text` (problems, meds, labs, procedures). These define the *allowed evidence set*: a summary claim that cannot point at a span is unsupported. 3. **Resolve context** with `openmed.clinical` (negation, temporality, subject) so "no chest pain" and "father had MI" are not summarized as active patient problems. See `resolving-clinical-context`. 4. **Compose by view:**
citing the spans it summarizes.
med/lab/procedure spans under each. 5. **Enforce citation coverage.** Reject or flag any output sentence with zero span citations. This is the anti-hallucination gate — keep it strict. 6. **Mark it a draft.** Render the medical-device disclaimer and require human sign-off before the summary enters the record.
text + entity spans) and `openmed.analyze_text(...)` (`PredictionResult` dict). Entity `start`/`end` offsets are the citation anchors.
`openmed.analyze_text` for a coded problem list, or through `openmed.eval` leakage gates to confirm no PHI leaked into the generated summary.
span-highlighted view of the source — handy for a click-to-evidence UI.
constrain it to the entity/span set and require a citation per sentence; do not let it introduce facts (doses, diagnoses, dates) absent from the spans.
"ruled out", "FH of" must not become patient problems.
the most recent supporting span and prefer the current encounter's text.
discharge diagnoses), surface both with citations rather than silently picking one.
summary; i
Local-first healthcare AI: clinical NER and HIPAA PII de-identification on hardware you control. 2,200+ medical models, 35 model-backed PII languages, and Python, MLX, Android and browser runtimes. Apache-2.0 SDK.
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST,…
Choose the first OpenMed workflow skill for an intake, privacy, extraction, exchange, or verification request using deterministic…
Package multiple FHIR R4 resources produced from OpenMed output into a single valid transaction Bundle ready to POST to an EHR,…
Adversarially scan already-de-identified clinical text for residual identifiers and emit a leakage report that blocks release on…
Produce a signed, reproducible, no-PHI audit trail for an OpenMed de-identification run via deidentify(audit=True). Use when the…
Generates and verifies 21 CFR Part 11-style audit trails — who/what/when, electronic signatures, and tamper-evidence — for…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…