ingesting-clinical-documents

ingesting-clinical-documents is a skill for Claude Code from maziyarpanahi/openmed. It costs 151 tokens per session (2,080 once invoked), scanned A, original, Apache-2.0.

An on-device document intake workflow that turns scanned clinical notes, photographs, tables, and C-CDA medical XML files into normalized text. OCR means reading text from images; C-CDA is a standard format for exchanging clinical records.

In plain words
What is it for?
Reading text from image scans, handling CSV and TSV patient tables, flattening C-CDA files, and preparing the results for de-identification and clinical entity extraction.
Why use it?
Clinical information often arrives as images or structured exports rather than clean text, and this prepares it for later processing without sending documents away from the device.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the openmed-skills plugin — 74 skills shipped together

Good fit Reading text from image scans, handling CSV and TSV patient tables, flattening C-CDA files, and preparing the results for de-identification and clinical entity extraction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maziyarpanahi/openmed/ingesting-clinical-documents
About the project

OpenMed is local-first healthcare AI software that extracts clinical information and removes personally identifying details from clinical text on hardware controlled by the user. Healthcare developers use its Python runtime, Apple Silicon and mobile SDKs, and browser support for on-device clinical NER and PII de-identification.

maziyarpanahi/openmed · 5,282 stars · on GitHub · openmed.life

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add maziyarpanahi/openmed --skill ingesting-clinical-documents
Clone the repo
git clone --depth 1 https://github.com/maziyarpanahi/openmed

Made for: Claude Code.

Or install openmed-skills, the plugin that ships this one along with the rest of its 74 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ingesting-clinical-documents

README.md
[![agentmods](https://agentmods.dev/badge/skills/maziyarpanahi/openmed/ingesting-clinical-documents/github.svg)](https://agentmods.dev/skills/maziyarpanahi/openmed/ingesting-clinical-documents)
Your own site
<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/ingesting-clinical-documents"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/ingesting-clinical-documents/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ingesting-clinical-documents

Your own site · 80×15
<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/ingesting-clinical-documents"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/ingesting-clinical-documents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,080 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00151 $0.02080
Opus 5 $0.00076 $0.01040
Sonnet 5 $0.00030 $0.00416
Haiku 4.5 $0.00015 $0.00208

Measured 10d ago against content hash f3db6a26a682, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ingesting-clinical-documents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ingesting-clinical-documents/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ingesting Clinical Documents

Clinical text often arrives as scanned faxes, photographed notes, CSV exports, or C-CDA XML — not plain text. openmed.multimodal converts these into a normalized ExtractedDocument (clean text + character-offset → source-location spans) so you can run de-identification and NER. It runs on-device: OCR backends are local, no document leaves the machine.

When to use

  • You have images / scanned faxes of clinical notes and need text out (OCR).
  • You have CSV/TSV patient exports that need column-aware handling.
  • You have C-CDA XML to flatten into text.
  • You are building the intake stage that feeds openmed.deidentify and openmed.analyze_text.

This is the first stage. After intake, hand off to deidentifying-clinical-text then extracting-clinical-entities.

What is supported today

redact_document dispatches by file extension. Live handlers:

Input Extensions Path
Images / scans .png .jpg .jpeg .tif .tiff .bmp .gif .webp OCR (ocr() / image handler)
Tables .csv .tsv column-aware tabular redaction
C-CDA .xml (detected as CDA) stdlib CDA adapter

PDF and DOCX have no live handler yetredact_document("x.pdf") raises UnsupportedDocumentError. Convert PDFs to page images first (or to text with your own tool) and feed the images through OCR. See references/multimodal-ingest.md for the full contract, engines, and the tabular pipeline.

Install

pip install "openmed[multimodal]"      # document intake contract + image deps
pip install "openmed[ocr-paddle]"      # add the PaddleOCR engine
# Tesseract engine also needs the system binary, e.g.:  brew install tesseract

Quick start: OCR an image, then de-identify

The clean two-step intake path. ocr() lives in the submodule (it is intentionally not re-exported from openmed.multimodal):

from openmed.multimodal.ocr import ocr
import openmed

# 1) OCR a scanned/faxed note -> OcrResult -> ExtractedDocument -> plain text
result = ocr("fax_page.png", engine=None)   # None = auto-select an installed engine
doc    = result.to_document()                # ExtractedDocument
text   = doc.text                            # clean text for downstream OpenMed

# 2) De-identify, then run NER (privacy-first order)
deid = openmed.deidentify(text, method="mask", policy="hipaa_safe_harbor")
ner  = openmed.analyze_text(deid.deidentified_text, output_format="dict")

for ent in ner.entities:
    print(ent.label, ent.text, ent.confidence)

Read the full file on GitHub · 185 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 185 lines · 151 tokens per session scan A f3db6a26a682

Subscribe to this mod's changes

ingesting-clinical-documents is a skill published in the GitHub repository maziyarpanahi/openmed (5,282 stars, last pushed yesterday), licensed Apache-2.0. It adds 151 tokens to every session and 2,080 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

benchmarking

Use this skill when the user wants to benchmark an MLX-VLM change and present the numbers in a PR — fork-vs-main A/B comparisons, isolated-module micro-benchmarks, median-of-N timing with warmup, peak-memory reporting, correctness checks, parameter sweeps, and self-contained reproducible bench scripts to paste into a…

Blaizzy/mlx-vlm · 74 tokens

paper-length-gate

Deterministic artifact-backed manuscript readiness gate for meta-paper-write. Validates the workspace LaTeX artifact before compilation while leaving final page-count enforcement to compilepdf.

opensquilla/opensquilla · 38 tokens

paper-plot-stub

Plot a results CSV (x, ybaseline, yours) as a two-line matplotlib chart and write a PDF. Demo-only.

opensquilla/opensquilla · 35 tokens

latex-compile

Compile a LaTeX document and fix every error plus aesthetic issue (overfull/underfull boxes, widows, alignment, fonts) for a clean PDF and log. Use this instead of running pdflatex/latexmk manually — it avoids the latexmk stale-log trap and silent grep failures on binary log output, and it reformats rather than…

Mexregkan/claude-for-researchers · 79 tokens

6verity

A final-checking workflow for mathematical modelling competition papers, using either Typst or LaTeX to build the document. It checks the finished paper and its supporting files before submission.

jihe520/MathModelAgent · 76 tokens

figure-drawing

MANDATORY skill for creating any figure, diagram, chart, table visualization, or TikZ graphic in a paper. Must be activated BEFORE writing any drawing code. Produces standalone .tex → compiled PDF/PNG → \includegraphics in paper. Never inline TikZ code directly into paper sections.

nanoAgentTeam/research-claw · 62 tokens