OpenMed
OpenMed transforms clinical text into structured insights. It bundles curated biomedical NER models, HIPAA-compliant de-identification, batch processing, a Dockerized REST API, and Apple Silicon acceleration — all behind a single analyze_text() call.
When to Use
| Scenario |
Start with |
| Extract diseases, drugs, anatomy from clinical notes |
references/entity-extraction |
| Remove PHI/PII before sharing or storing data |
references/pii-deidentification |
| Run NER on hundreds of clinical documents |
references/batch-processing |
| Serve OpenMed behind a REST API |
references/rest-service |
| Set up on Apple Silicon, Docker, or Swift |
references/installation |
| Configure profiles, pick the right model |
references/configuration |
| PII in French, German, Spanish, Portuguese, etc. |
references/multilingual-pii |
| Privacy Filter (OpenAI / Nemotron) families |
references/privacy-filter |
Quick Start
git clone https://github.com/maziyarpanahi/openmed.git
cd openmed
uv pip install -e ".[hf]"
from openmed import analyze_text
result = analyze_text(
"Patient started imatinib for chronic myeloid leukemia.",
model_name="disease_detection_superclinical",
)
for entity in result.entities:
print(f"{entity.label:<12} {entity.text:<35} {entity.confidence:.2f}")
# DISEASE chronic myeloid leukemia 0.98
# DRUG imatinib 0.95
Model Registry (12+ Models)
| Model |
Entity Types |
disease_detection_superclinical |
DISEASE, CONDITION, DIAGNOSIS |
pharma_detection_superclinical |
DRUG, MEDICATION, TREATMENT |
pii_detection_superclinical |
NAME, DATE, SSN, PHONE, EMAIL, ADDRESS |
anatomy_detection_electramed |
ANATOMY, ORGAN, BODY_PART |
gene_detection_genecorpus |
GENE, PROTEIN |
Browse the full catalog: openmed.life/docs/model-registry
Key Concepts
- analyze_text() — single-call inference with configurable model, aggregation, format, and confidence threshold
- BatchProcessor — multi-text and multi-file workflows with progress tracking
- extract_pii() / deidentify() — HIPAA-compliant PII detection and redaction
- Configuration Profiles —
dev, prod, test, fast presets via YAML or env vars
- REST API — FastAPI endpoints:
/health, /analyze, /pii/extract, /pii/deidentify
References
- OpenMed docs
- OpenMed arXiv paper
- OpenMed GitHub
references/installation.md — cross-platform install, Docker, Swift
references/entity-extraction.md — disease, drug, anatomy, gene models
references/pii-deidentification.md — HIPAA compliance, smart merging, anonymization
references/batch-processing.md — BatchProcessor API
references/rest-service.md — FastAPI endpoints, Docker
references/configuration.md — profiles, model registry, profiling
references/multilingual-pii.md — 9-language PII support
references/privacy-filter.md — OpenAI Privacy Filter, Nemotron, MLX
1---2name: openmed3description: Production-ready medical NLP toolkit (maziyarpanahi/openmed). Entity extraction, assertion detection, PII de-identification, batch processing, REST API, and multilingual support. Covers installation, all model families, configuration, and deployment.4---56# OpenMed78**OpenMed** transforms clinical text into structured insights. It bundles curated biomedical NER models, HIPAA-compliant de-identification, batch processing, a Dockerized REST API, and Apple Silicon acceleration — all behind a single `analyze_text()` call.910## When to Use1112| Scenario | Start with |13|---|---|14| Extract diseases, drugs, anatomy from clinical notes | `references/entity-extraction` |15| Remove PHI/PII before sharing or storing data | `references/pii-deidentification` |16| Run NER on hundreds of clinical documents | `references/batch-processing` |17| Serve OpenMed behind a REST API | `references/rest-service` |18| Set up on Apple Silicon, Docker, or Swift | `references/installation` |19| Configure profiles, pick the right model | `references/configuration` |20| PII in French, German, Spanish, Portuguese, etc. | `references/multilingual-pii` |21| Privacy Filter (OpenAI / Nemotron) families | `references/privacy-filter` |2223## Quick Start2425```bash26git clone https://github.com/maziyarpanahi/openmed.git27cd openmed28uv pip install -e ".[hf]"29```3031```python32from openmed import analyze_text3334result = analyze_text(35 "Patient started imatinib for chronic myeloid leukemia.",36 model_name="disease_detection_superclinical",37)38for entity in result.entities:39 print(f"{entity.label:<12} {entity.text:<35} {entity.confidence:.2f}")40# DISEASE chronic myeloid leukemia 0.9841# DRUG imatinib 0.9542```4344## Model Registry (12+ Models)4546| Model | Entity Types |47|---|---|48| `disease_detection_superclinical` | DISEASE, CONDITION, DIAGNOSIS |49| `pharma_detection_superclinical` | DRUG, MEDICATION, TREATMENT |50| `pii_detection_superclinical` | NAME, DATE, SSN, PHONE, EMAIL, ADDRESS |51| `anatomy_detection_electramed` | ANATOMY, ORGAN, BODY_PART |52| `gene_detection_genecorpus` | GENE, PROTEIN |5354Browse the full catalog: `openmed.life/docs/model-registry`5556## Key Concepts5758- **analyze_text()** — single-call inference with configurable model, aggregation, format, and confidence threshold59- **BatchProcessor** — multi-text and multi-file workflows with progress tracking60- **extract_pii()** / **deidentify()** — HIPAA-compliant PII detection and redaction61- **Configuration Profiles** — `dev`, `prod`, `test`, `fast` presets via YAML or env vars62- **REST API** — FastAPI endpoints: `/health`, `/analyze`, `/pii/extract`, `/pii/deidentify`6364## References6566- [OpenMed docs](https://openmed.life/docs/)67- [OpenMed arXiv paper](https://arxiv.org/abs/2508.01630)68- [OpenMed GitHub](https://github.com/maziyarpanahi/openmed)69- `references/installation.md` — cross-platform install, Docker, Swift70- `references/entity-extraction.md` — disease, drug, anatomy, gene models71- `references/pii-deidentification.md` — HIPAA compliance, smart merging, anonymization72- `references/batch-processing.md` — BatchProcessor API73- `references/rest-service.md` — FastAPI endpoints, Docker74- `references/configuration.md` — profiles, model registry, profiling75- `references/multilingual-pii.md` — 9-language PII support76- `references/privacy-filter.md` — OpenAI Privacy Filter, Nemotron, MLX