Skip to content

OpenMed Documentation

OpenMed bundles curated biomedical models, advanced de-identification, multimodal intake, structured health-data utilities, and one-call orchestration so you can ship clinical NLP workflows without wrangling infrastructure. This documentation keeps copied snippets and workflows close at hand: each section is Markdown-first, searchable, and optimized for quick scanning or copy/paste into notebooks.

OpenMed 1.9.1 completes the 1.9 rollout for one ONNX token-classification model contract across Python, browsers, Node.js, and Android, alongside a corrected Swift package, expanded clinical extraction, 17-language PII coverage, and stronger release evidence:

  • Policy-aware de-identification with signed audit reports, reproducibility hashes, review bundles, redaction previews, and release gates.
  • Multimodal and structured inputs across OCR, images, PDFs, DOCX, EPUB, vCard/iCalendar, DICOM, CSV/TSV, JSONL chat logs, HL7 v2, CDA/C-CDA, FHIR operations, and FHIR Bulk NDJSON.
  • Python, Swift, Kotlin/Android, REST, gRPC, React Native, TypeScript, and browser paths including OpenMedKit, typed REST clients, ONNX/WebGPU, and Transformers.js export bundles.
  • 17 supported PII language codes: ar, de, en, es, fr, he, hi, id, it, ja, ko, nl, pt, ro, te, th, and tr in the model-backed allow-list, with locale-aware validation and surrogate generation, plus additional validator-backed national-ID coverage for ID-only locales.
  • Release evidence for leakage heatmaps, model scorecards, threshold sweeps, k-anonymity/l-diversity/t-closeness, utility loss, SBOMs, signed images, SLSA provenance, secret scanning, and reproducible dependency locks.

What you get

  • Curated registries – discoverable Hugging Face models with metadata (domain, size, device guidance).
  • One-line orchestrationanalyze_text wraps validation, inference, and formatting for scripts, notebooks, or services.
  • PII detection & de-identification – HIPAA-aware smart entity merging, policy profiles, signed audit reports, and production-ready de-identification.
  • Apple Silicon and mobile acceleration – MLX-backed Python inference plus Swift-native and Android/Kotlin app integration through OpenMedKit.
  • REST service – FastAPI endpoints for /livez, /readyz, /analyze, /pii/extract, /pii/deidentify, warm pools, batching, metrics, and typed Python/TypeScript clients.
  • Browser and React Native export – ONNX/WebGPU bundles for Transformers.js token classification in browser runtimes plus a React Native bridge for mobile apps.
  • Advanced NER post-processing – score-aware grouping, PHI-friendly filtering, and CSV/JSON/HTML export helpers.
  • Composable configOpenMedConfig reads YAML/ENV so deployments stay reproducible across laptops and clusters.

Copy-friendly defaults

Every page in this site exposes code fences with copy buttons and callouts so teammates (or AI copilots) can lift the exact snippet they need. Use the search shortcut (/ or cmd/ctrl + K) to jump straight to an entity, API call, or API surface.

First look

from openmed import analyze_text

result = analyze_text(
    "Patient started on imatinib for chronic myeloid leukemia.",
    model_name="disease_detection_superclinical",
    confidence_threshold=0.55,
)

for entity in result.entities:
    print(entity.label, entity.text, entity.confidence)
uv pip install "openmed[hf]"
uv run python examples/pii_model_comparison.py

The rest of the docs expand on this snippet—head to Quick Start for the end-to-end setup, then explore the guides for configuration, zero-shot GLiNER workflows, and advanced processing helpers.

Latest release highlights

How these docs are structured

  1. Quick Start – fastest path to a working environment plus a copy/paste script.
  2. Feature Map – see how every capability maps back to the code.
  3. OpenMed 1.9.1 Release Notes – review the current patch fixes, installation coordinates, and validation evidence.
  4. Core guides:
  5. Analyze Text Helper for single-call inference.
  6. REST Service (MVP) for Dockerized HTTP endpoints.
  7. PII Detection & Smart Merging for HIPAA-compliant de-identification (v0.5.0).
  8. Batch Processing for multi-text/file processing.
  9. ModelLoader & Pipelines for long-running jobs.
  10. Model Registry to pick the right checkpoint.
  11. Configuration Profiles for dev/prod/test switching.
  12. Advanced NER & Output Formatting to polish spans.
  13. Medical-Aware Tokenizer for better clinical token boundaries.
  14. Configuration & Validation to keep deployments reproducible.
  15. Zero-shot Toolkit when you need GLiNER workflows.
  16. Performance Profiling for timing and optimization.
  17. Examples and Testing & QA for day-to-day operations.
  18. Project operations:
  19. Contributing & Releases – how we cut releases, publish docs, and keep CI green.
  20. Release Streams & Channels – model artifact and library release policy.
  21. Generative Model Policy – approved and prohibited model-assisted workflows.

Need something that is not here yet? Drop an issue on GitHub and mention the missing recipe. Every addition is just a Markdown file away.