coding-hcc-risk-adjustment
它能做什么
这项技能把临床记录中的慢性病映射到 CMS-HCC 风险调整类别,并估算风险评分。它是供编码人员和临床医生使用的决策辅助工具,每项结果都必须由人工审核。
适用场景
- ✓当你想找出记录中提到、但未出现在已编码问题清单中的、可进行风险调整的诊断的时候。
- ✓当你需要把 ICD-10-CM 编码映射到 CMS-HCC V28 类别的时候。
- ✓当你想检查某项诊断是否有足够的文档支持的时候。
技能链接
https://github.com/maziyarpanahi/openmed/blob/master/skills/coding-hcc-risk-adjustment/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请根据这些就诊记录,找出可能计入风险调整、但未出现在已编码问题清单中的慢性病。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会提取这些疾病,将其映射到公开的 CMS-HCC 类别,应用层级规则,并列出每个候选项及支持或不支持它的文档依据。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Mapping conditions to CMS-HCC V28 and estimating RAF
Surface and risk-adjust the chronic conditions OpenMed extracts by mapping them to CMS-HCC categories (the V28 model, phasing in for payment years 2024–2026) and estimating a RAF (Risk Adjustment Factor) score. CMS pays Medicare Advantage plans based on RAF, so accurate, documented capture of chronic disease matters — and much of that signal lives in the narrative note, exactly what OpenMed reads.
This is decision support for coders/clinicians, not autonomous coding. The output is "candidate HCCs + estimated RAF + the documentation that supports (or fails to support) each one," for human validation.
CMS-HCC crosswalks (ICD-10-CM → HCC) and the category coefficients are public — CMS publishes them annually. Nothing restricted is bundled.
When to use
- You want to find risk-adjustable diagnoses mentioned in a note that may not be on the coded problem list ("suspect HCCs" / recapture).
- You need to map ICD-10-CM codes to V28 HCCs and apply the hierarchy.
- You want an estimated RAF for a patient or panel for review.
- You need to check whether a diagnosis has MEAT support (Monitored, Evaluated, Assessed, Treated) in the documentation.
Pairs with coding-icd10 (you need ICD-10-CM codes first) and may consume
mapping-to-snomed output upstream.
Quick start (public CMS crosswalk + coefficients)
CMS publishes the V28 ICD-10-CM→HCC mapping and the model coefficients. Load them locally (public files) and apply the model:
import csv
# 1) ICD-10-CM -> HCC (V28) crosswalk from the CMS Risk Adjustment files.
icd_to_hcc = {} # "E1122" -> "HCC38" (Diabetes w/ complication)
with open("cms_hcc_v28_icd_map.csv") as fh:
for row in csv.DictReader(fh):
icd_to_hcc[row["icd10cm"].replace(".", "")] = row["hcc_v28"]
# 2) HCC -> RAF coefficient for the relevant model segment (e.g. CNA community).
hcc_weight = {} # "HCC38" -> 0.166 (illustrative)
with open("cms_hcc_v28_coefficients.csv") as fh:
for row in csv.DictReader(fh):
hcc_weight[row["hcc"]] = float(row["coefficient"])
# 3) Apply the HCC hierarchy: a more severe HCC in a family suppresses milder
# ones (e.g. acute MI suppresses angina). Load the hierarchy from CMS.
hierarchy = { # parent HCC -> HCCs it zeroes out
# "HCC37": {"HCC38"}, # illustrative; use the official V28 hierarchy file
}
def apply_hierarchy(hccs: set[str]) -> set[str]:
kept = set(hccs)
for parent in hccs:
kept -= hierarchy.get(parent, set())
return kept
def estimate_raf(icd_codes: list[str], demo_factor: float = 0.0) -> dict:
hccs = {icd_to_hcc[c] for c in icd_codes if c in icd_to_hcc}
hccs = apply_hierarchy(hccs)
disease_raf = sum(hcc_weight.get(h, 0.0) for h in hccs)
return {"hccs": sorted(hccs),
"disease_raf": round(disease_raf, 3),
"estimated_raf": round(disease_raf + demo_factor, 3)}
The demo_factor (age/sex, dual/disability, institutional status) comes from the
CMS demographic tables — add it for a full RAF; omit for the disease component.
Workflow
- Extract condition spans with OpenMed (Disease/Pathology/Oncology models).
- Code each to ICD-10-CM (see
coding-icd10) — HCCs key off ICD-10-CM. - Map ICD-10-CM → V28 HCC via the CMS crosswalk.
- Apply the hierarchy so only the most severe HCC in each family counts.
- Sum coefficients for the correct model segment + add the demographic factor to estimate RAF.
- Attach MEAT evidence: for each candidate HCC, cite the note text that Monitors/Evaluates/Assesses/Treats the condition. No MEAT → flag as "unsupported / needs clinician confirmation," not a captured HCC.
- Emit candidate HCCs + estimated RAF + supporting offsets for human review.
Hand-off from OpenMed
openmed.analyze_text(..., output_format="dict") returns entities, each a dict
with text, label, confidence, start, end. Use the offsets to pull MEAT
evidence sentences:
import openmed
note = ("Problem list: type 2 diabetes with diabetic nephropathy; COPD. "
"Plan: continue metformin, ordered HbA1c, refer nephrology.")
result = openmed.analyze_text(
note,
model_name="disease_detection_superclinical", # Disease category
output_format="dict",
)
DX_LABELS = {"DISEASE", "CONDITION", "PATHOLOGY"}
suspects = []
for ent in re
常见问题
它会自动为理赔编码吗?
不会。它只是决策辅助工具,每个候选编码都需要人工验证。
它使用受限数据吗?
不使用。它使用公开的 CMS 对照表和系数。
它会检查文档是否有支持吗?
会。它可以检查某项诊断是否有监测、评估、评定或治疗方面的文档记录。
详情
作者的原始描述
Maps chronic conditions extracted by OpenMed to CMS-HCC V28 risk-adjustment categories and estimates a RAF (Risk Adjustment Factor) score as decision support. Use when the user wants to surface risk-adjustable diagnoses from notes, map ICD-10-CM codes to HCC categories, estimate or reconcile a patient/panel RAF, find suspected-but-undocumented HCCs, or check MEAT documentation support. Trigger keywords: HCC, CMS-HCC, V28, RAF score, risk adjustment, Medicare Advantage, hierarchical condition category, MEAT, recapture, suspect HCC, RADV. Pairs after OpenMed NER + ICD-10 coding: consume Disease/
repo: maziyarpanahi/openmed
热度
- GitHub 星标
- 5.8k
- 排名
- #14683
- 许可证
- 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扫描已去标识化的临床文本,查找残留的标识符,例如社会安全号、银行卡号、电子邮件地址和日期,若仍有残留则阻止发布。