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 2.0.0 establishes a stable major-version contract across Python, Swift, Kotlin/Android, JavaScript, REST, and local deployment surfaces. It combines policy-aware de-identification, expanded clinical and structured-data workflows, broad multilingual PII coverage, and fail-closed 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.
  • 35 supported PII language codes: am, ar, as, bn, cs, da, de, el, en, es, fr, he, hi, id, it, ja, ko, mr, nl, no, or, pt, ro, ru, sv, sw, ta, te, th, tr, uk, vi, xh, zh, and zu, with Russian using a documented multilingual default-model placeholder and Bengali, Chinese, and Tamil using dedicated registry entries, plus locale-aware validation and surrogate generation. A user-configured Indic NER adapter adds four optional routes and can also serve Assamese, Bengali, Hindi, Marathi, Odia, Tamil, and Telugu. Additional validator-backed national-ID coverage remains available 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 deployment-oriented de-identification workflows.
  • 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.

LLM-ready documentation

Use the curated llms.txt index to discover the quickstarts, APIs, and agent tool surfaces, or load llms-full.txt when you need their full rendered content in one file. Both feeds are regenerated by the documentation build.

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 2.0.0 Release Notes – review the current installation coordinates, compatibility contract, and validation requirements.
  4. Core guides:
  5. Project operations:

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.