本文へスキップ
Skillpedia
分析とスプレッドシート5.8k · #14680

building-with-openmed

できること

このスキルは、端末上で臨床テキストを分析し匿名化するライブラリOpenMedの出発点となる地図です。臨床やメディカルのテキストのプロジェクトを始めるチームが、正しい入口を見つけるための案内です。

使う場面

  • ✓OpenMedをインストールする、または臨床テキストのパイプラインを始めたいとき。
  • ✓タスクに対して、どのOpenMedの機能やモデルが合うかわからないとき。
  • ✓抽出、匿名化、評価のための、適切な個別のOpenMedスキルを見つけたいとき。

スキルのリンク

https://github.com/maziyarpanahi/openmed/blob/master/skills/building-with-openmed/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/maziyarpanahi/openmed/blob/master/skills/building-with-openmed/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“臨床ノートのプロジェクトを始めます。診断名を抽出し、患者の名前を取り除くには、どのOpenMedの機能を使うべきですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、あなたの目的を特定し、対応するOpenMedの機能か個別のスキルに対応づけ、適切な最初の手順を案内します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Building with OpenMed

OpenMed is an Apache-2.0, local-first Python library for clinical and biomedical NLP. Models download once from the Hugging Face Hub and then run fully on-device — no network calls, no telemetry, no raw PHI in logs, caches, or temp files. This skill is the map: it tells you what OpenMed can do and which focused skill (or API) to reach for next.

When to use this skill

Use it to scope a task and pick an entry point. For the actual work, hand off to the focused OpenMed skills (each is grounded in the real API):

Task Skill / API
Find and load a model loading-openmed-models, choosing-openmed-models
Run clinical/biomedical NER extracting-clinical-entities (openmed.analyze_text)
Zero-shot NER (no fine-tune) running-zeroshot-ner (openmed zero)
Remove / mask PHI deidentifying-clinical-text (openmed.deidentify)
Detect PHI spans only extracting-pii-entities (openmed.extract_pii)
Restore masked PHI reidentifying-text (openmed.reidentify)
Pick a privacy policy configuring-privacy-policies (7 bundled profiles)
Non-English PHI deidentifying-multilingual-text
Signed, no-PHI audit auditing-deidentification-runs (audit=True)
Negation / temporality resolving-clinical-context (openmed.clinical)
Evaluate with leakage gates evaluating-with-leakage-gates (openmed.eval)
FHIR R4 export exporting-to-fhir (openmed.interop)
Serve REST / MCP serving-openmed-rest-api, deploying-openmed-mcp
Run on Apple Silicon / edge running-openmed-ondevice (MLX / CoreML / ONNX)

Install

pip install openmed                 # core: NER + de-identification
pip install "openmed[hf]"           # add Hugging Face model downloads
pip install "openmed[mcp]"          # Model Context Protocol server
pip install "openmed[service]"      # FastAPI REST service
pip install "openmed[mlx]"          # Apple Silicon acceleration
pip install "openmed[presidio]"     # Microsoft Presidio bridge

Extras map to capabilities: cli, mcp, service, presidio, spacy, langchain, gliner (zero-shot), multimodal/ocr-paddle (document intake), mlx/coreml/onnx (on-device backends), hf (model hub), dev (tests/lint).

The three core calls

import openmed

# 1) Named-entity recognition (token classification)
result = openmed.analyze_text(
    "Patient prescribed 500 mg metformin for type 2 diabetes.",
    model_name="disease_detection_superclinical",  # registry key, HF id, or local path
    output_format="dict",                           # dict | json | html | csv
)

# 2) De-identify PHI (mask | remove | replace | hash | shift_dates)
deid = openmed.deidentify(
    "John Doe (MRN 12345) seen on 2024-03-02.",
    method="replace",
    policy="hipaa_safe_harbor",   # bundled policy profile
)
print(deid.deidentified_text)     # PHI removed; deid.pii_entities lists the spans

# 3) Detect PHI spans without changing the text
pii = openmed.extract_pii("Call Dr. Smith at 617-555-0123.")  # PredictionResult
spans = pii.entities                                          # the PHI spans

analyze_text and deidentify are the workhorses. Everything else (multilingual, audit, policies, FHIR, eval) layers on top of these.

Discover what is available at runtime

Never hardcode model lists or language counts — query them:

import openmed
openmed.list_model_categories()          # e.g. Privacy, Disease, Oncology, Genomics ...
openmed.get_models_by_category("Disease")
openmed.get_pii_models_by_language("es")
from openmed.core.pii_i18n import SUPPORTED_LANGUAGES   # de-id language set

CLI equivalents: openmed models list, openmed models info <key>, openmed analyze --text "<text>" --model <key> --format json. MCP/REST expose the same surface as tools (openmed_analyze_text, openmed_deidentify, openmed_list_models, …).

Non-negotiable rules when building with OpenMed

  • Local-first. Do not add cloud calls to PHI workflows. Models run on-device after a one-time download.
  • No raw PHI in artifacts. Logs, caches, audit reports, and error messages must use offsets, hashes, and labels — never plaintext identifiers. Use audit=True for tamper-evident, no-PHI audit output.
  • Permissive licensing only. Do not bundle UMLS, SNOMED CT, CPT, MIMIC, i2b2, or n2c2 assets. Call restricted terminologies out-of-process with the user'
よくある質問

OpenMedはデータをインターネットに送りますか?

いいえ。モデルはモデルハブから一度だけダウンロードし、その後の処理は端末上で、ネットワーク通信なしで行われます。

クラウドサービスを呼び出しますか?

いいえ。処理はローカルで行われ、唯一のダウンロードはモデルハブからのモデルだけです。

OpenMedは無料ですか?

Apache-2.0のライセンスのライブラリなので、オープンソースです。

詳細

作者による元の説明

Orient and bootstrap any project that uses OpenMed, the on-device clinical and biomedical NLP library, for named-entity recognition, PHI de-identification, FHIR export, and evaluation. Use when the user mentions OpenMed, wants to install it, asks which OpenMed capability or model fits a task, or is starting to build a clinical/medical text pipeline and needs the right entry point.

repo: maziyarpanahi/openmed

人気

GitHubのスター
5.8k
ランキング
#14680
ライセンス
Apache-2.0
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル