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 orchestration –
analyze_textwraps 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 config –
OpenMedConfigreads 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)
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¶
- OpenMed 1.9.1 Release Notes – Swift packaging, Android release hardening, current model examples, and dependency-security fixes for the cross-platform 1.9 release.
- OpenMed 1.8.0 Release Notes – historical cross-platform runtime and service release inventory.
- OpenMed v1.6-v1.7 Feature Coverage – historical coverage checklist across examples, docs, website, and source modules.
- Examples & Copy/Paste Recipes – release-friendly snippets for Python, PII, batch jobs, Apple runtimes, browser export, multimodal inputs, and FHIR/HL7.
- Transformers.js Export – browser/WebGPU packaging for token classification bundles.
- FHIR Interop Helpers, HL7 v2 De-identification, and OMOP/lakehouse integrations – structured health-data workflows.
- MLX Backend, OpenMedKit, Android Span Parity, and CoreML Packaging – local mobile/runtime paths.
How these docs are structured¶
- Quick Start – fastest path to a working environment plus a copy/paste script.
- Feature Map – see how every capability maps back to the code.
- OpenMed 1.9.1 Release Notes – review the current patch fixes, installation coordinates, and validation evidence.
- Core guides:
- Analyze Text Helper for single-call inference.
- REST Service (MVP) for Dockerized HTTP endpoints.
- PII Detection & Smart Merging for HIPAA-compliant de-identification (v0.5.0).
- Batch Processing for multi-text/file processing.
- ModelLoader & Pipelines for long-running jobs.
- Model Registry to pick the right checkpoint.
- Configuration Profiles for dev/prod/test switching.
- Advanced NER & Output Formatting to polish spans.
- Medical-Aware Tokenizer for better clinical token boundaries.
- Configuration & Validation to keep deployments reproducible.
- Zero-shot Toolkit when you need GLiNER workflows.
- Performance Profiling for timing and optimization.
- Examples and Testing & QA for day-to-day operations.
- Project operations:
- Contributing & Releases – how we cut releases, publish docs, and keep CI green.
- Release Streams & Channels – model artifact and library release policy.
- 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.