mapping-to-snomed
できること
このスキルは、臨床上の所見、処置、身体の部位をSNOMED CTのコンセプトに対応づけます。SNOMED CTは詳細な臨床用語集です。制限があるため、利用者が提供し、利用ライセンスを持つ用語サーバーを使います。正確な臨床コードが必要なチーム向けです。
使う場面
- ✓所見、疾患、処置、身体の部位について、詳細なSNOMED CTのコードが必要なとき。
- ✓ICD-10など既存のコードを、SNOMED CTに変換する必要があるとき。
- ✓臨床のコンセプトにまたがる、階層を意識した検索が必要なとき。
スキルのリンク
https://github.com/maziyarpanahi/openmed/blob/master/skills/mapping-to-snomed/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“当院の用語サーバーを使い、このノートの所見をSNOMED CTのコードに対応づけてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは各スパンを利用者自身の用語サーバーに送り、一致するコンセプトを識別子とともに選び、記録に使うコードだけを返します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Mapping OpenMed spans to SNOMED CT
Ground clinical concept spans that OpenMed extracts — disorders, findings, procedures, body structures, substances — to SNOMED CT, the comprehensive clinical reference terminology. The atom is the SCTID (a SNOMED CT concept identifier), organized into a description-logic hierarchy you can query with ECL (Expression Constraint Language).
Hard licensing boundary — read first. SNOMED CT is license-restricted. OpenMed and this skill never bundle, ship, cache, or redistribute any SNOMED CT content. All mapping happens out-of-process against a terminology server the user supplies and is licensed for — their own Ontoserver, Snowstorm, the NLM's UTS/UMLS FHIR endpoint, or a national release server. SNOMED International requires an Affiliate License (free in member territories like the US via the NLM; check your country). Your code receives a base URL + credentials from the user; it must work with any compliant FHIR terminology server and store nothing but the returned codes.
When to use
- You need rich, hierarchy-aware clinical codes (more granular than ICD-10) for problems, procedures, or body sites.
- You want to translate an existing code (ICD-10-CM, local code) to SNOMED CT
via a
ConceptMap/$translate. - You need subsumption/ECL queries ("is this a descendant of Diabetes mellitus?") for cohorting or decision support.
For billing codes use coding-icd10; for drugs normalizing-rxnorm; for labs
mapping-loinc. SNOMED CT is the clinical-meaning layer.
Quick start (user-supplied FHIR terminology server)
Configuration is injected, never hardcoded. The operations are standard FHIR R4.
import os, requests
# Provided by the USER — their licensed server. Nothing bundled.
TX = os.environ["FHIR_TX_URL"] # e.g. https://snowstorm.example.org/fhir
TOKEN = os.environ.get("FHIR_TX_TOKEN") # if the server requires auth
SNOMED = "http://snomed.info/sct"
HDRS = {"Accept": "application/fhir+json"}
if TOKEN:
HDRS["Authorization"] = f"Bearer {TOKEN}"
def lookup(code: str) -> dict:
"""$lookup: fully specified name + properties for an SCTID."""
r = requests.get(f"{TX}/CodeSystem/$lookup",
params={"system": SNOMED, "code": code},
headers=HDRS, timeout=15)
r.raise_for_status()
return r.json()
def find_concepts(text: str, ecl: str = "<<404684003", count: int = 10):
"""Text search constrained by ECL (default: descendants of Clinical finding)."""
vs = f"{SNOMED}?fhir_vs=ecl/{ecl}"
r = requests.get(f"{TX}/ValueSet/$expand",
params={"url": vs, "filter": text, "count": count},
headers=HDRS, timeout=20)
r.raise_for_status()
return r.json().get("expansion", {}).get("contains", [])
def translate(code: str, source_system: str, conceptmap_url: str):
"""$translate an existing code to SNOMED CT via a ConceptMap."""
r = requests.get(f"{TX}/ConceptMap/$translate",
params={"url": conceptmap_url, "system": source_system,
"code": code, "targetsystem": SNOMED},
headers=HDRS, timeout=20)
r.raise_for_status()
return r.json()
# ECL examples: 64572001=disease, 71388002=procedure, 123037004=body structure
print(find_concepts("type 2 diabetes", ecl="<<64572001"))
Workflow
- Extract spans with OpenMed (Disease, Anatomy, Pharmaceutical models).
- Pick a semantic constraint (ECL) from the OpenMed label so you search the
right hierarchy: disorder span →
<<64572001; anatomy span →<<123037004; substance/drug →<<105590001; procedure →<<71388002. - Search with
ValueSet/$expand?filter=<span>under that ECL. - Rank & disambiguate by display match and confidence; prefer the most specific concept whose meaning is fully entailed by the text (do not over-code).
- Validate with
$validate-code;$lookupto capture the FSN and any needed properties. - Translate instead of searching when you already hold an ICD-10/local code
and the user's server has the relevant
ConceptMap. - Emit
{system: "http://snomed.info/sct", code, display}— the SCTID plus the OpenMed source offsets for traceability.
Hand-off from OpenMed
openmed.analyze_text(..., output_format="dict") returns entities, each a dict
with text, label, confidence, `sta
よくある質問
スキルにSNOMED CTのコンテンツが含まれますか?
いいえ。SNOMED CTを同梱も保存もしません。利用者が、ライセンスのあるサーバーに接続します。
どのようなサーバーが使えますか?
アクセスできる準拠のFHIR用語サーバーなら使えます。Ontoserverやsnowstormなどです。
階層の検索もできますか?
はい。ECLのクエリや、親と子のコンセプトの確認にも対応しています。
詳細
作者による元の説明
Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL query, translate via a ConceptMap, or resolve a span to a concept id with FHIR $lookup/$translate/$validate-code. Trigger keywords: SNOMED CT, SNOMED concept id, ECL, ConceptMap, $translate, $lookup, Ontoserver, Snowstorm, SCTID, post-coordination, terminology server. Pairs after Ope
repo: maziyarpanahi/openmed
人気
- GitHubのスター
- 5.8k
- ランキング
- #14712
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
annotating-variants
5.8kエージェントが、無料の公開アノテーターを使って、遺伝子バリアントの作用を予測し、HGVS名をゲノム上の位置に変換し、集団の頻度を付与できるよう支援します。
ask-openmed
5.8kエージェントが、臨床テキストの依頼に合ったOpenMedのワークフローを選べるよう支援します。患者データが含まれる可能性がある場合は、必ずプライバシーの確認から始めます。
assembling-fhir-bundles
5.8kエージェントが、複数のFHIR健康記録を、内部の参照を正しくつないだ一つのトランザクションBundleにまとめ、EHRに送れる状態にします。
auditing-deid-leakage
5.8kエージェントが、匿名化済みの臨床テキストに残っている識別子(SSN、カード番号、メール、日付など)をスキャンし、残っていれば公開を止めます。
似ているスキル
discrawl
394k保存済みのローカルなDiscordメッセージのアーカイブを検索して要約し、その新しさを確認し、ダイレクトメッセージを読めるようエージェントを支援します。
clickhouse-io
280kエージェントがClickHouseデータベースのクエリとスキーマを最適化できるようにします。高性能な分析処理向けのベストプラクティスを適用します。分析クエリが遅すぎるときに使います。
scientific-db-pubmed-database
280kエージェントが生物医学分野の科学論文を検索するのに役立ちます。特定の医療情報が必要な研究に便利です。