coding-icd10
它能做什么
这项技能根据临床记录中的病情和操作,建议诊断编码和操作编码,并附上每个编码的理由。适合需要一份候选编码清单供审核的编码人员和医疗工作人员。
适用场景
- ✓当你需要为记录中的诊断列表找到候选 ICD-10-CM 编码的时候。
- ✓当某个诊断需要快速归入正确的编码章节的时候。
- ✓当你有旧版 ICD-9 编码,需要进行近似对照的时候。
技能链接
https://github.com/maziyarpanahi/openmed/blob/master/skills/coding-icd10/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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.mdfor 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
- Extract diagnosis/procedure spans with OpenMed (Disease/Pathology models).
- 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. - Search the code text (local CMS table or the NLM API) for candidates.
- 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.
- Rank candidates; present the top few with rationale and the missing- detail caveat, not a single auto-selected code.
- Emit
{system: "http://hl7.org/fhir/sid/icd-10-cm", code, display}markedstatus: 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
评论
- …
同一仓库的更多技能
annotating-variants
5.8k帮你的智能体预测基因变异的作用,把 HGVS 名称转换为基因组位置,并使用免费的公共注释工具添加人群频率。
ask-openmed
5.8k帮你的智能体为临床文本请求选择合适的 OpenMed 工作流程,并在可能涉及患者数据时,先进行隐私检查。
assembling-fhir-bundles
5.8k把多份 FHIR 健康记录打包成一个事务 Bundle,可直接发送给 EHR 系统,并正确链接其中的内部引用。
auditing-deid-leakage
5.8k扫描已去标识化的临床文本,查找残留的标识符,例如社会安全号、银行卡号、电子邮件地址和日期,若仍有残留则阻止发布。