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

coding-icd10

できること

このスキルは、臨床ノートにある疾患と処置から診断コードと処置コードを提案し、それぞれの理由を示します。コーダーや医療スタッフが確認するための、候補コードの短い一覧が必要な人向けです。

使う場面

  • ✓ノートからの診断の一覧に対して、ICD-10-CMの候補コードがほしいとき。
  • ✓診断を、適切なコードの章にすばやく振り分ける必要があるとき。
  • ✓ICD-9のコードがあり、おおよその対応づけが必要なとき。

スキルのリンク

https://github.com/maziyarpanahi/openmed/blob/master/skills/coding-icd10/SKILL.md

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“この退院サマリーから、各診断にICD-10-CMのコードを提案してください。それぞれの提案の理由も示してください。”

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

仕組み

エージェントは抽出された診断と処置を読み、公開のコードファイルと照合して、理由とともに候補コードを返します。コーダーがそれを確認します。

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

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

Coding OpenMed diagnoses to ICD-10-CM / PCS

Suggest ICD-10-CM diagnosis codes (and ICD-10-PCS for inpatient procedures) for the diagnosis and procedure spans OpenMed extracts. This is decision support for a certified coder, not autonomous billing: OpenMed + this skill narrow the candidate set and explain why; a human validates the final, billable code.

ICD-10-CM and ICD-10-PCS are public domain. CMS publishes the complete annual code files, addenda, and indexes for free. (CPT/HCPCS procedure codes are AMA-licensed and restricted — out of scope here; obtain those separately under the user's own AMA license.)

When to use

  • A note yields diagnoses ("type 2 diabetes with diabetic CKD", "community- acquired pneumonia") and you want candidate ICD-10-CM codes plus rationale.
  • You need to route a span to the right chapter quickly (see references/icd10-chapters.md for code ranges).
  • You hold legacy ICD-9 codes and need an approximate GEM cross-walk.
  • You are pre-filling encounter diagnoses for a coder's review queue.

For clinical-meaning codes use mapping-to-snomed; for HCC/risk capture use coding-hcc-risk-adjustment; this skill is for the ICD-10 classification.

Quick start (public data + public FHIR lookup)

Two complementary paths, both license-clean:

A) CMS files, loaded locally (public domain; you download once):

# CMS publishes the order/addenda file; load the code->description table.
# Columns: code (no dot), description; you insert the dot for display.
icd10cm = {}                       # "E1122" -> "Type 2 diabetes mellitus with diabetic chronic kidney disease"
with open("icd10cm_order_2025.txt", encoding="latin-1") as fh:
    for line in fh:
        code = line[6:13].strip()
        billable = line[14] == "1"     # '1' = valid billable code
        long_desc = line[77:].strip()
        if billable:
            icd10cm[code] = long_desc

def search_local(term: str, limit: int = 5):
    t = term.lower()
    hits = [(c, d) for c, d in icd10cm.items() if t in d.lower()]
    return sorted(hits, key=lambda cd: len(cd[1]))[:limit]

B) A FHIR terminology server that hosts ICD-10-CM (public servers exist; e.g. an NLM Clinical Tables endpoint or your own HAPI/Ontoserver):

import requests

# NLM Clinical Tables (public, no key) — ICD-10-CM autocomplete/search:
def search_icd10cm(term: str, count: int = 7):
    r = requests.get(
        "https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search",
        params={"sf": "code,name", "terms": term, "maxList": count}, timeout=10,
    )
    r.raise_for_status()
    _total, codes, _extra, display = r.json()
    return list(zip(codes, [d[1] for d in display]))   # [(code, name), ...]

print(search_icd10cm("type 2 diabetes nephropathy"))

Workflow

  1. Extract diagnosis/procedure spans with OpenMed (Disease/Pathology models).
  2. Route to a chapter using the span's clinical theme and references/icd10-chapters.md (e.g. endocrine → E00–E89, circulatory → I00–I99). This shrinks the search space and catches obvious mis-hits.
  3. Search the code text (local CMS table or the NLM API) for candidates.
  4. Apply ICD-10-CM specificity rules in your rationale: laterality, acute/chronic, episode of care, "with"/"due to" combination codes, and "code first / use additional code" notes. Flag where the note lacks the detail a billable code requires.
  5. Rank candidates; present the top few with rationale and the missing- detail caveat, not a single auto-selected code.
  6. Emit {system: "http://hl7.org/fhir/sid/icd-10-cm", code, display} marked status: needs-coder-review, with OpenMed source offsets.

Hand-off from OpenMed

openmed.analyze_text(..., output_format="dict") returns entities, each a dict with text, label, confidence, start, end. Consume Disease/Pathology spans:

import openmed

note = "Assessment: type 2 diabetes with diabetic nephropathy; CAP."
result = openmed.analyze_text(
    note,
    model_name="disease_detection_superclinical",   # Disease category
    output_format="dict",
)

DX_LABELS = {"DISEASE", "CONDITION", "PATHOLOGY"}
for ent in result["entities"]:
    if ent["label"] in DX_LABELS:
        candidates = search_icd10cm(ent["text"], count=5)
        print(ent["text"], ent["start"], ent["end"],
              f"(conf {ent['confidence']:.2f}) ->", candidates)
        # surface as SUGGESTIONS for a coder — never
よくある質問

提案されたコードは最終ですか?

いいえ。提案は出発点です。請求に使える最終的なコードは、認定の人間のコーダーが確認します。

処置のコードも扱いますか?

入院の処置のICD-10-PCSの処置コードを扱います。CPTとHCPCSのコードはライセンスが別で、対象外です。

コードのファイルは無料ですか?

ICD-10のコードセットはパブリックドメインで、CMSが毎年のファイルを無料で公開しています。

詳細

作者による元の説明

Suggests candidate ICD-10-CM diagnosis codes (and ICD-10-PCS procedure codes) for diagnoses and procedures extracted by OpenMed, with rationale and a human-coder caveat. Use when the user wants to code a problem list, map a diagnosis span to a billable ICD-10-CM code, route a finding to the right chapter, cross-walk ICD-9 via GEMs, or pre-fill an encounter for coder review. Trigger keywords: ICD-10-CM, ICD-10-PCS, diagnosis coding, billable code, GEMs, problem list coding, encounter diagnosis, chapter range, CMS code lookup. references/icd10-chapters.md holds the chapter/section ranges. Pairs

repo: maziyarpanahi/openmed

人気

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

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

0

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

コメント

  • …

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

似ているスキル