# openmed | Maziyar Panahi | Knowledge Base | Instagit

open-source healthcare ai

GitHub Stars: 2.2k

Repository: https://github.com/maziyarpanahi/openmed

---

## Articles

### [Where to Find OpenMed Example Configurations: A Complete Guide to Setup Files](/maziyarpanahi/openmed/where-can-i-find-example-openmed-configurations)

Find OpenMed example configurations easily. This guide shows how to locate TOML setup files in the openmed/profiles directory and initialize your environment with config.toml.example.

- Tags: how-to-guide
- Published: 2026-06-13

### [OpenMed Security Best Practices: Deterministic PII Anonymization and Safety Sweeps](/maziyarpanahi/openmed/what-are-the-security-best-practices-for-openmed)

Discover OpenMed security best practices. Learn how deterministic PII anonymization and safety sweeps ensure data privacy with regex, locale-aware masking, and consistent seeding.

- Tags: best-practices
- Published: 2026-06-13

### [How to Access OpenMed Documentation: 3 Ways to View Guides and API References](/maziyarpanahi/openmed/how-to-access-openmed-documentation)

Easily access OpenMed documentation through three simple methods: online at openmed.life/docs, within the GitHub repository, or locally after cloning. Find guides and API references effortlessly.

- Tags: api-reference
- Published: 2026-06-13

### [OpenMed Project Structure: A Complete Guide to the Repository Layout](/maziyarpanahi/openmed/what-is-the-project-structure-of-openmed)

Understand OpenMed's project structure. Explore the repository layout for this multi-language clinical NLP project, including Python and Swift components for diverse deployment needs.

- Tags: getting-started
- Published: 2026-06-13

### [How to Troubleshoot OpenMed Errors: A Complete Guide to Debugging the REST API and Core Library](/maziyarpanahi/openmed/how-to-troubleshoot-openmed-errors)

Troubleshoot OpenMed errors efficiently. Debug REST API and core library issues using structured exceptions, JSON error envelopes, and log inspection. Fix validation, timeout, and runtime failures.

- Tags: how-to-guide
- Published: 2026-06-13

### [OpenMed Tutorials: Complete Guide to Examples, Documentation, and Getting Started](/maziyarpanahi/openmed/are-there-any-tutorials-for-openmed)

Explore OpenMed tutorials for NER extraction to REST API deployment. Get started with examples and documentation to quickly deploy your solution.

- Tags: getting-started
- Published: 2026-06-13

### [What Is the Development Roadmap for OpenMed? A Deep Dive into the Clinical NLP Platform](/maziyarpanahi/openmed/what-is-the-development-roadmap-for-openmed)

Explore the OpenMed development roadmap targeting 20+ languages, Apple Silicon MLX inference, Swift demo suite, and enterprise REST services with Kubernetes. Discover the future of clinical NLP.

- Tags: deep-dive
- Published: 2026-06-13

### [How to Integrate OpenMed with Other Systems: 5 Integration Patterns Explained](/maziyarpanahi/openmed/how-to-integrate-openmed-with-other-systems)

Discover 5 OpenMed integration patterns including Python libraries, REST services, and Swift frameworks. Learn how to connect OpenMed seamlessly with your existing systems for efficient data exchange.

- Tags: how-to-guide
- Published: 2026-06-13

### [OpenMed API Endpoints: Complete REST API Reference for Medical NLP](/maziyarpanahi/openmed/what-are-the-api-endpoints-for-openmed)

Explore the OpenMed API endpoints for medical NLP. This REST API reference details health checks, model management, text analysis, and PII extraction.

- Tags: api-reference
- Published: 2026-06-13

### [How to Configure OpenMed Settings: Config Files, Profiles, and Environment Variables](/maziyarpanahi/openmed/how-to-configure-openmed-settings)

Configure OpenMed settings effectively using TOML files profiles and environment variables. Learn the layered system managed by OpenMedConfig for your OpenMed project.

- Tags: how-to-guide
- Published: 2026-06-13

### [Database Schema for OpenMed: Understanding Pydantic Request Models](/maziyarpanahi/openmed/what-is-the-database-schema-for-openmed)

Explore the OpenMed database schema. Discover how Pydantic request models like AnalyzeRequest replace traditional tables with type-safe Python contracts for robust data validation in the REST-MCP service.

- Tags: database-schema
- Published: 2026-06-13

### [How to Deploy OpenMed: Complete Guide to Python Package, REST API, and Docker Installation](/maziyarpanahi/openmed/how-to-deploy-openmed)

Deploy OpenMed with pip, FastAPI, or Docker. Install the Python package, run the REST API, or build the Docker image to serve local-first healthcare AI.

- Tags: how-to-guide
- Published: 2026-06-13

### [Build Process for OpenMed: Complete Packaging and Distribution Guide](/maziyarpanahi/openmed/what-is-the-build-process-for-openmed)

Master the OpenMed build process with our comprehensive guide. Learn to create source distributions and wheels using Hatchling and Makefiles, plus optional PyPI publishing for seamless distribution.

- Tags: how-to-guide
- Published: 2026-06-13

### [How to Run OpenMed Tests: A Complete Guide to Unit, Integration, and Evaluation Testing](/maziyarpanahi/openmed/how-to-run-openmed-tests)

Learn how to run OpenMed tests with this guide. Execute unit, integration, and evaluation tests easily using pytest commands from the repository root.

- Tags: how-to-guide
- Published: 2026-06-13

### [OpenMed Dependencies: Complete Guide to Core and Optional Packages](/maziyarpanahi/openmed/what-are-the-dependencies-for-openmed)

Explore OpenMed dependencies, including core packages like pysbd and faker, and optional groups for transformers MLX FastAPI and GLiNER to enable advanced features.

- Tags: how-to-guide
- Published: 2026-06-13

### [How to Contribute to OpenMed: A Complete Guide for Healthcare AI Developers](/maziyarpanahi/openmed/how-to-contribute-to-openmed)

Learn how to contribute to OpenMed, the open-source healthcare AI platform. Fork, branch, code, test, and submit your pull request to join the project.

- Tags: how-to-guide
- Published: 2026-06-13

### [Main Components of OpenMed: A Modular Architecture for Medical NLP](/maziyarpanahi/openmed/what-are-the-main-components-of-openmed)

Discover the main components of OpenMed: its six modular layers (Core, Processing, NER Families, Privacy & PII, Utilities, Service/API) form a powerful clinical text analysis framework.

- Tags: architecture
- Published: 2026-06-13

### [What Programming Languages Does OpenMed Use? A Technical Breakdown of the Hybrid ML Stack](/maziyarpanahi/openmed/what-programming-languages-does-openmed-use)

Discover the programming languages powering OpenMed's hybrid ML stack. Learn how Python, Swift, and Bash drive its innovative machine learning and development.

- Tags: deep-dive
- Published: 2026-06-13

### [What Is OpenMed? A Local‑First Healthcare AI Library for Clinical NLP and PII De‑Identification](/maziyarpanahi/openmed/what-is-openmed)

Discover OpenMed, the local-first Python library for clinical NLP and PII de-identification. Process sensitive health data securely on-device without external servers.

- Tags: getting-started
- Published: 2026-06-13

### [How to Select a Model from OpenMed's Registry: A Complete Guide](/maziyarpanahi/openmed/selecting-a-model-from-openmeds-registry)

Easily select models from OpenMed's registry using the ModelLoader class. This guide shows how to map symbolic keys to HuggingFace model IDs for your AI projects.

- Tags: how-to-guide
- Published: 2026-06-12

### [Using the Medical Tokenizer for Custom Tokenization in OpenMed](/maziyarpanahi/openmed/using-the-medical-tokenizer-for-custom-tokenization)

Learn to use the medical tokenizer for custom tokenization in OpenMed. Split clinical text into stable, human-readable spans by enabling use_medical_tokenizer and providing an exceptions list.

- Tags: how-to-guide
- Published: 2026-06-12

### [Ensuring HIPAA Compliance with On-Device PII Detection in OpenMed](/maziyarpanahi/openmed/ensuring-hipaa-compliance-with-on-device-pii-detection)

Ensure HIPAA compliance with OpenMed's on-device PII detection. Locally process and de-identify sensitive data using Safe Harbor standards for enhanced privacy and security.

- Tags: best-practices
- Published: 2026-06-12

### [How to Customize OpenMed Output to CSV Format: A Complete Guide](/maziyarpanahi/openmed/customizing-openmed-output-to-csv-format)

Learn how to customize OpenMed output to CSV format using the OutputFormatter class and to_csv_rows method. Export your structured prediction results easily.

- Tags: how-to-guide
- Published: 2026-06-12

### [How to Customize OpenMed Output to HTML Format: A Complete Guide](/maziyarpanahi/openmed/customizing-openmed-output-to-html-format)

Customize OpenMed output to HTML format effectively. Learn to use format predictions or subclass OutputFormatter for custom colors, templates, and filtering.

- Tags: how-to-guide
- Published: 2026-06-12

### [Customizing OpenMed Output to JSON Format: Methods and Examples](/maziyarpanahi/openmed/customizing-openmed-output-to-json-format)

Learn to customize OpenMed output to JSON format. Explore methods like subclassing OutputFormatter or extending to_dict() with practical examples for tailored results.

- Tags: how-to-guide
- Published: 2026-06-12

### [How to Customize OpenMed Output to Dictionary Format](/maziyarpanahi/openmed/customizing-openmed-output-to-dictionary-format)

Customize OpenMed output to dictionary format easily. Learn to use format_predictions or to_dict() for structured results from your medical image analysis.

- Tags: how-to-guide
- Published: 2026-06-12

### [Selecting the Correct Device for OpenMed Inference: A Complete Guide](/maziyarpanahi/openmed/selecting-the-correct-device-for-openmed-inference)

Learn how to select the correct device for OpenMed inference. Explore CPU, CUDA, MLX, and CoreML support for optimal performance with automatic fallback.

- Tags: how-to-guide
- Published: 2026-06-12

### [Profiling OpenMed Performance: A Complete Guide to the Built-In Profiler](/maziyarpanahi/openmed/profiling-openmed-performance)

Learn to profile OpenMed performance with its built-in profiler. Measure execution time with nanosecond precision and zero overhead. A complete guide to maximizing your application's efficiency.

- Tags: performance
- Published: 2026-06-12

### [Optimizing OpenMed Performance with Batching: A Complete Guide to High-Throughput Clinical NLP](/maziyarpanahi/openmed/optimizing-openmed-performance-with-batching)

Boost OpenMed clinical NLP performance with batching. This guide explains how BatchProcessor reuses model loaders and creates GPU-efficient tensors for high throughput.

- Tags: performance
- Published: 2026-06-12

### [Integrating OpenMedKit Swift Library in macOS Applications: Clinical NLP On-Device](/maziyarpanahi/openmed/integrating-openmedkit-swift-library-in-macos-applications)

Integrate OpenMedKit Swift library into your macOS app for on-device clinical NLP. Leverage MLX or CoreML backends for PII extraction and NER offline.

- Tags: how-to-guide
- Published: 2026-06-12

### [Integrating OpenMedKit Swift Library in iOS Applications: Complete Setup Guide](/maziyarpanahi/openmed/integrating-openmedkit-swift-library-in-ios-applications)

Integrate OpenMedKit Swift library into your iOS app. Easily add the maziyarpanahi/openmed package, initialize OpenMed, and extract PII for clinical entity recognition on-device.

- Tags: getting-started
- Published: 2026-06-12

### [Setting up MLX Backend on Apple Silicon for Accelerated Inference with OpenMed](/maziyarpanahi/openmed/setting-up-mlx-backend-on-apple-silicon-for-accelerated-inference)

Accelerate OpenMed inference on Apple Silicon with the MLX backend. Achieve 24-33x speedups over CPU PyTorch automatically. No code changes needed for seamless integration.

- Tags: how-to-guide
- Published: 2026-06-12

### [How to Perform Batch Processing of Clinical Documents with OpenMED's BatchProcessor](/maziyarpanahi/openmed/how-to-perform-batch-processing-of-clinical-documents-with-batchprocessor)

Learn how to perform batch processing of clinical documents with OpenMED's BatchProcessor. Efficiently extract and de-identify PII across thousands of documents using configurable batches and cached ML pipelines.

- Tags: how-to-guide
- Published: 2026-06-12

### [Implementing PII De-identification with shift_dates Redaction in OpenMed](/maziyarpanahi/openmed/implementing-pii-de-identification-with-shift_dates-redaction)

Implement PII de-identification with OpenMed shift_dates. Securely shift dates for HIPAA compliance while retaining formatting and chronological utility for analysis.

- Tags: how-to-guide
- Published: 2026-06-12

### [Implementing PII De-identification with Hash Redaction in OpenMed](/maziyarpanahi/openmed/implementing-pii-de-identification-with-hash-redaction)

Implement PII de-identification with hash redaction in OpenMed using SHA-256. Generate consistent 8-character hashes for HIPAA-compliant linkability. Learn more about secure data handling.

- Tags: how-to-guide
- Published: 2026-06-12

### [Implementing PII De-identification with Replace Redaction in OpenMed](/maziyarpanahi/openmed/implementing-pii-de-identification-with-replace-redaction)

Implement PII de-identification in OpenMed using replace redaction. Generate realistic, locale-aware surrogates with Faker for reproducible clinical data de-identification.

- Tags: tutorial
- Published: 2026-06-12

### [How to Validate Input and Handle Edge Cases with OpenMed's validate_input](/maziyarpanahi/openmed/how-to-validate-input-and-handle-edge-cases)

Master input validation with OpenMed's validate_input. Learn to handle edge cases, clean strings, and prevent errors, ensuring robust data integrity in your Python applications.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Implement Re-identification with Reversible De-identification in OpenMed](/maziyarpanahi/openmed/how-to-implement-re-identification-with-reversible-de-identification)

Learn to implement re-identification with reversible de-identification in OpenMed. Set keep_mapping=True in deidentify() and use reidentify() to restore PII.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Handle Multilingual PII Detection Across 12 Languages in OpenMed](/maziyarpanahi/openmed/how-to-handle-multilingual-pii-detection)

Learn how OpenMed handles multilingual PII detection across 12 languages using language-specific regex and models with a universal fallback for accurate identification in any text.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Use group_entities to Merge Adjacent Entities in OpenMed](/maziyarpanahi/openmed/how-to-use-group-entities-to-merge-adjacent-entities)

Learn how to use OpenMed's group_entities to automatically merge fragmented entity predictions. Consolidate split entities like dates into single cohesive units efficiently.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Configure Output Formatting in OpenMed: Dict, JSON, HTML, and CSV](/maziyarpanahi/openmed/how-to-configure-output-formatting)

Configure OpenMed output formats like dict, JSON, HTML, and CSV using the output_format parameter in format_predictions(). Easily extract clinical entity predictions in your desired format.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Implement Custom Label Normalization with CANONICAL_LABELS in OpenMed](/maziyarpanahi/openmed/how-to-implement-custom-label-normalization-with-canonical-labels)

Learn to implement custom label normalization with CANONICAL_LABELS in OpenMed. Extend _ALIAS_MAP or wrap normalize_label for consistent entity labeling.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Use Zero-Shot NER with GLiNER Family Models in OpenMed](/maziyarpanahi/openmed/how-to-use-zero-shot-ner-with-gliner-models)

Learn zero-shot NER with GLiNER models in OpenMed. Use the unified inference API to easily extract entities without specific training.  Install dependencies, create a request, and infer.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Use the Profiler and Timer for Performance Measurement in OpenMed](/maziyarpanahi/openmed/how-to-use-profiler-and-timer-for-performance-measurement)

Learn to use OpenMed's Profiler and Timer for precise performance measurement. Optimize your code with nanosecond accuracy using these lightweight, zero-overhead tools.

- Tags: performance
- Published: 2026-06-11

### [How to Export OpenMed Models to CoreML Format for iOS Deployment](/maziyarpanahi/openmed/how-to-export-models-to-coreml-format)

Export OpenMed models to CoreML format for seamless iOS deployment. Learn how to convert HuggingFace token-classification models to mlpackage files for iOS 16 and macOS 13.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Integrate OpenMedKit Swift Library in iOS Apps: MLX and CoreML Setup](/maziyarpanahi/openmed/how-to-integrate-openmedkit-swift-library-in-ios-apps)

Integrate OpenMedKit Swift library in iOS apps. Set up MLX or CoreML, then extract PII on-device for clinical entity extraction. Fast and efficient on-device processing.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Use OpenMed's REST Service with FastAPI: A Complete Guide](/maziyarpanahi/openmed/how-to-use-rest-service-with-fastapi)

Learn to use OpenMed's REST service with FastAPI. This guide covers clinical NLP, PII extraction, and model management via a simple HTTP interface. Integrate powerful text analysis into your applications today.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Enable MLX Automatic Fallback on Non-Apple Hardware in OpenMed](/maziyarpanahi/openmed/how-to-enable-mlx-automatic-fallback-on-non-apple-hardware)

Discover how to enable MLX automatic fallback on non-Apple hardware in OpenMed. Learn how OpenMed intelligently routes MLX-only models for seamless operation across diverse platforms.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Configure Confidence Thresholds for Entity Filtering in OpenMed](/maziyarpanahi/openmed/how-to-configure-confidence-thresholds-for-entity-filtering)

Learn to configure confidence thresholds for entity filtering in OpenMed. Adjust the score for precise data validation and optimize your output with this guide.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Load OpenMed Models from Local Directories for Offline and Air-Gapped Use](/maziyarpanahi/openmed/how-to-load-models-from-local-directories)

Load OpenMed models from local directories for seamless offline and air-gapped use. Simply pass a filesystem path to auto-enable local file loading without network requests.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Use Privacy Filter Family Models for PII Detection in OpenMed](/maziyarpanahi/openmed/how-to-use-privacy-filter-models-for-pii-detection)

Easily detect PII in OpenMed using Privacy Filter models. Leverage MLX or PyTorch for token classification and get standardized JSON results with entity labels and confidence scores.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Configure Sentence Detection with pySBD in OpenMED](/maziyarpanahi/openmed/how-to-configure-sentence-detection-with-pysbd)

Configure sentence detection in OpenMED with pySBD. Learn to use language, clean, and segmenter parameters for precise medical text segmentation and improved performance.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Choose Between Deidentification Methods (Mask, Replace, Hash) in OpenMED](/maziyarpanahi/openmed/how-to-choose-between-deidentification-methods)

Learn how to choose deidentification methods mask replace or hash in OpenMED. Select mask for placeholder redaction, replace for synthetic data, and hash for stable identifiers.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Customize Clinical ID Providers (CPF, CNPJ, BSN, etc.) in OpenMed](/maziyarpanahi/openmed/how-to-customize-clinical-id-providers)

Learn to customize clinical ID providers like CPF, CNPJ, and BSN in OpenMed by modifying pii_i18n.py and defining custom regex patterns and validator functions for accurate patient identification.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Use Date Shifting for HIPAA Safe Harbor Compliance in OpenMed](/maziyarpanahi/openmed/how-to-use-date-shifting-for-hipaa-safe-harbor-compliance)

Learn to use OpenMed's shift dates method for HIPAA Safe Harbor compliance. Safely de-identify dates while preserving intervals with this powerful tool.

- Tags: how-to-guide
- Published: 2026-06-11

### [How to Implement Batch PII Extraction with BatchProcessor in OpenMed](/maziyarpanahi/openmed/how-to-implement-batch-pii-extraction-with-batchprocessor)

Learn how to implement batch PII extraction efficiently with OpenMed's BatchProcessor. Discover automatic model caching, entity merging, and error aggregation for large text collections.

- Tags: how-to-guide
- Published: 2026-06-11

### [How Smart Entity Merging Prevents PII Fragmentation in OpenMed](/maziyarpanahi/openmed/how-smart-entity-merging-prevents-pii-fragmentation)

Discover how smart entity merging in OpenMed stops PII fragmentation by reconstructing complete entities from fragmented data for better privacy protection.

- Tags: how-to-guide
- Published: 2026-06-11

### [OpenMed Profiling Tools for Performance Debugging: A Complete Guide](/maziyarpanahi/openmed/openmed-profiling-tools-performance-debugging)

Debug medical NLP pipelines with OpenMed profiling tools. Discover the Profiler class, decorators, and timers for detailed execution timings and bottleneck identification.

- Tags: how-to-guide
- Published: 2026-06-10

### [Viterbi Decoding Strategy for NER in OpenMed: BIOES-Aware Implementation Guide](/maziyarpanahi/openmed/what-viterbi-decoding-strategy-ner-openmed)

Learn the Viterbi decoding strategy for NER in OpenMed. This guide details the BIOES-aware implementation, transforming log-probabilities into valid named entity spans using dynamic programming.

- Tags: how-to-guide
- Published: 2026-06-10

### [OpenMed REST API Configuration Options: Environment Variables, Global Settings, and Per-Request Parameters](/maziyarpanahi/openmed/openmed-rest-api-configuration-options)

Discover OpenMed REST API configuration: master environment variables, global settings, and per-request parameters for fine-grained control over model preloading and tokenization.

- Tags: api-reference
- Published: 2026-06-10

### [How OpenMed's Medical Tokenizer Remaps Predictions onto Stable Medical Tokens](/maziyarpanahi/openmed/how-openmed-medical-tokenizer-remap-predictions)

OpenMed's medical tokenizer remaps predictions onto stable tokens by splitting text, aligning predictions, and merging adjacent tokens. Learn how this process works.

- Tags: internals
- Published: 2026-06-10

### [How to Implement Custom Clinical ID Providers for PII De-identification in OpenMed](/maziyarpanahi/openmed/implement-custom-clinical-id-providers-pii-de-identification)

Learn to implement custom clinical ID providers for PII de-identification in OpenMed by subclassing Faker and registering your provider. Generate organization-specific identifiers effectively.

- Tags: how-to-guide
- Published: 2026-06-10

### [How OpenMed's Multi-Backend Architecture Handles Model Routing](/maziyarpanahi/openmed/how-openmed-multi-backend-architecture-handle-model-routing)

OpenMed's multi-backend architecture smartly routes inference requests. Discover how it auto-detects and prioritizes MLX on Silicon, falling back to HuggingFace Transformers for optimal performance.

- Tags: architecture
- Published: 2026-06-10

