batch-processing-clinical-text
Run large-scale batch NER, PII extraction, or de-identification over many clinical notes on-device with OpenMed, with sharding, checkpointing, resumability, and append-only JSONL output. Use when the user needs to process a corpus or folder of notes, de-identify a dataset, run NER over thousands of documents, build a resumable batch pipeline, or stream results to JSONL without holding everything in memory. Covers process_batch / BatchProcessor / BatchItem / BatchResult, the operation= selector (analyze_text | extract_pii | deidentify), iter_process streaming, the PHI-safe on_progress callback,
npx skills add maziyarpanahi/openmed --skill batch-processing-clinical-text --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Batch processing clinical text `openmed.processing` runs OpenMed over many documents efficiently, with progress tracking, per-item error isolation, and streaming. It runs **fully on-device**: the corpus, the model, and the output never leave the host. This skill shows a **resumable** runner — sharded, checkpointed, append-only JSONL — that you can restart without reprocessing. ## When to use this skill For corpora, folders, or datasets — anything beyond a handful of notes. For a single note, just call `openmed.analyze_text` / `deidentify` directly (`extracting-clinical-entities`, `deidentifying-clinical-text`). For an always-on HTTP service, see `serving-openmed-rest-api`. ## Quick start ```python from openmed import process_batch texts = ["Patient has type 2 diabetes.", "No acute distress. BP 120/80."] result = process_batch(texts, model_name="disease_detection_superclinical") print(result.summary()) # PHI-safe counts + timing print(result.successful_items, "/", result.total_items) for item in result.get_successful_results(): print(item.id, item.result.to_dict()["entities"]) # spans only; avoid raw text in logs ``` `process_batch(...)` is a thin wrapper over `BatchProcessor`. Re
- When to use this skill
- Quick start
- Choosing the operation
- Streaming + PHI-safe progress
- Workflow
- A resumable batch runner
- Chunking long documents
- Hand-off to / from OpenMed
- Edge cases & gotchas
- Standards & references
What does the batch-processing-clinical-text skill do?
Run large-scale batch NER, PII extraction, or de-identification over many clinical notes on-device with OpenMed, with sharding, checkpointing, resumability, and append-only JSONL output. Use when the user needs to process a corpus or folder of notes, de-identify a dataset, run NER over thousands of documents, build a resumable batch pipeline, or stream results to JSONL without holding everything in memory. Covers process_batch / BatchProcessor / BatchItem / BatchResult, the operation= selector (analyze_text | extract_pii | deidentify), iter_process streaming, the PHI-safe on_progress callback,
How do I install it?
Run `npx skills add maziyarpanahi/openmed --skill batch-processing-clinical-text --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From maziyarpanahi/openmed, a repository with 4,851 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
