DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-icd-rule-check

Icd Rule Check

ICD 合并编码与星剑号配对提示(依据 GB/T 14396-2016 与公开的 ICD 使用说明,仅提示差异,不作出定性结论)

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-icd-rule-check@0.2.12
README兼容性版本

兼容性与来源证明

Icd Rule Check 以 dsh-icd-rule-check 发布,当前版本为 0.2.12。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/11/6

版本

0.2.12stable
2026/11/4
0.2.11stable
2026/10/30
0.2.10stable
2026/10/18
查看其余 7 个版本收起版本
0.2.9stable
2026/10/18
0.2.4stable
2026/10/9
0.2.3stable
2026/10/8
0.2.2stable
2026/10/8
0.2.1stable
2026/10/8
0.2.0stable
2026/10/8
0.1.0stable
2026/10/7
最新版
0.2.12
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
520.3 kB
文件数
31
Surface
any
许可证
Apache-2.0
发布源
npm
GitHub
★ 0
周下载
706
安全扫描
✓ v0.2.12 扫描通过
最近提交
2026/11/6
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

README

dsh-icd-rule-check — ICD coding rule check for one coded inpatient episode: combined-code and dagger/asterisk pairing hints

English · 简体中文 · Español · Português · हिन्दी

What it is — ICD coding rule check for one coded inpatient episode: combined-code and dagger/asterisk pairing hints. It returns a list of what is inconsistent, where, and what to fix. Who it is for — medical coders and quality control; no command line required. What you give it — the source material the check works on (a table, register or document); the original is never modified. Excel can be converted to JSON/YAML first, in chat if the platform supports it. What it does not do — no compliance verdict, no liability finding, no replacement for the reviewer; differences only. How to start — search "Medical Record QC Suite" in WorkBuddy / Coze (this check is one part of it; availability as listed); or: dsh plugin --profile <name> add dsh-icd-rule-check

DSH Market

dsh-icd-rule-check reads one coded inpatient episode — the principal diagnosis, the other diagnoses, the principal procedure, the other procedures and the admission-condition codes — and checks that episode's own structure and cross-references: that every diagnosis code has ICD-10 form and every procedure code ICD-9-CM-3 form (the † / * markers are stripped before the form test), that the same diagnosis code is not listed twice, that an asterisk code has its dagger partner in the same episode, that a principal diagnosis is present, and that the fields each check needs are filled. Every difference names the clause it came from, and every check that could not run is listed in skipped rather than passing silently. It never looks a code up in a catalogue.

Install

dsh plugin --profile <name> add dsh-icd-rule-check
dsh --profile <name> --dump-config | grep 'dsh-icd-rule-check'

What it looks like

Workflow diagram for dsh-icd-rule-check: document → rule pack → findings.

Workflow overview: document → rule pack → findings. The examples below use the real command surface.

What it answers

Examples

The table below is the example set: the first row is the detailed walkthrough, the remaining rows are short cases.

Detailed output

Tool icd_rule_check

Input

{"principalDiagnosis":{"code":"急性心肌梗死","name":"急性心肌梗死"},"otherDiagnoses":[{"code":"I10","name":"高血压"}],"principalProcedure":{"code":"36.0600","name":"冠状动脉支架植入术"}}

Output

{
  "id": "dsh-icd-rule-check.IC-001.5a91e9d3",
  "ruleId": "IC-001",
  "severity": "error",
  "locator": {
    "column": "主要诊断",
    "cell": "急性心肌梗死"
  },
  "found": "诊断编码「急性心肌梗死」不符合 ICD-10 形式",
  "expected": "疾病诊断编码应当统一使用 ICD-10,形式为 ^[A-Z][0-9]{2}(\\.[0-9A-Z]{1,4})?$"
}

Observed from dsh-icd-rule-check/tests/fixtures/IC-001/IC-001-unsafe.json

You askWhat it answers
Our export stores the diagnosis code as A18.1†. Will the dagger make the form check fire?No. IC-001 strips the dagger and asterisk markers († / *) before it tests the code, so the marker alone never produces a finding. It checks the code's form only: a well-formed code that your catalogue does not actually contain still passes, because verifying that needs a licensed catalogue of the same version the coder uses.
The principal diagnosis field is empty. What is reported?IC-009 reports that the record carries no principal diagnosis and asks for it to be filled in. Its limit is that it checks only whether the field is filled, not whether the diagnosis chosen as principal is the right one — that choice belongs to the coder, and the rule does not make it.
There is an asterisk code in the list and no dagger code to go with it.IC-003 reports the asterisk code when the dagger code the pairing table assigns to it is absent from the same episode. It is the pack's most mechanical determination, and it needs your own table in pairs; with pairs empty the rule reports that it could not run instead of passing silently. Its limit is the pairing itself: the pack does not adopt the reading, common in Chinese medical-record practice, that an asterisk code may not be the principal diagnosis.
The same diagnosis code is listed twice.IC-002 reports the repeated code, treating it as the same diagnosis listed twice. It is capped at warn: no clause was found that forbids repetition in those words, so its basis is a principle and it points the row out for review instead of blocking.
The principal diagnosis is a T82 complication and no other diagnosis is listed.IC-011 reports that row. For a principal diagnosis in the T80-T88 series it asks only whether any other diagnosis is present at all: the clause requires an additional code to describe the complication but does not say which one, so the rule does not choose it — that belongs to the coder and to the catalogue in use.
IC-005 never reports anything on our export — does that mean the principal procedure matches the principal diagnosis?No. IC-005 ships with its correspondence table empty, so it declares itself in skipped with the reason that the table is not configured; an empty finding list there is not a pass. Fill correspondence with your own diagnosis→procedure groupings — an empty procedures list means that group should carry no principal procedure — and the rule starts comparing.

Standards it follows

DocumentNumberCited by rules
《住院病案首页数据填写质量规范(暂行)》国卫办医发〔2016〕24号IC-001, IC-002, IC-004, IC-005, IC-007, IC-008, IC-009, IC-010, IC-012
《疾病和有关健康问题的国际统计分类》第十次修订本 第二卷 指导手册WHO ICD-10 Volume 2(第二版,2004,ISBN 92 4 154653 0)IC-003
《疾病分类与代码》GB/T 14396-2016IC-003
《疾病分类与代码国家临床版 2.0》国卫办医函〔2019〕371号 附件1IC-003
《医疗保障基金结算清单填写规范(试行)》医保办发〔2020〕20号IC-005, IC-011, IC-006, IC-010, IC-012
《住院病案首页数据质量管理与控制指标(2016版)》国卫办医发〔2016〕24号IC-009

Boundary: this plugin performs structural checks on the codes of one inpatient episode — code form, duplicates, dagger/asterisk pairing, field completeness — and reports literal differences against cited clauses. It is not dsh-medrec-qc (which checks the front sheet as a whole, including its logic contradictions), not a code catalogue, and not an encoder. It never looks a code up: a catalogue lookup needs a licensed code table whose version matches the coder's, and a version mismatch there produces confident nonsense.

⚠️ What this plugin deliberately does not do, and why

It does not implement a combined-code (合并编码) rule, and it does not decide whether the principal procedure matches the principal diagnosis. The task this plugin was built from flagged those as a critical-path risk: the rules are scattered across ICD user guides, the clinical-version handbook and encoder training material, with no publicly quotable national clause found for them. This rule pack is built on the rule that an entry whose basis cannot be quoted does not go in, so instead of inventing a clause number the pack provides a parameterised hook (IC-005 correspondence) and ships it empty. Fill it in with your own catalogue's groupings, or leave it and read the skipped entry that says the check did not run.

The dagger/asterisk rule is capped at warn for the same reason. The †/* system comes from the ICD-10 Volume 2 instruction manual († marks a condition classified here, * a manifestation classified elsewhere), and the pairing requirement is a structural consequence of that system — but the official Chinese text of Volume 2 was not obtainable online for verbatim quotation. IC-003 therefore states in its own note that its basis is a principle and that the clause should be upgraded to direct once an authoritative text is secured. The comparison table ships empty too: the table version must match the coder's catalogue.

Compatibility

SurfaceStatus
HarnessPeer range >=0.1.2-rc.1 <0.2.0 || >=0.2.0-0 <0.3.0 — verified to accept both 0.2.0-rc.2 and 0.2.1-rc.2. engines.dsh is declared as >=0.2.1-0 <0.3.0 and is enforced by the host since 0.2.1
Node`^22.19.0
PlatformsAll (plain ESM; no native code, no network, no model call)
Tool modeWorks in native and ptc; for a batch of records use ptc

What it does

Registers the icd_rule_check tool. It reads one coded episode — principal diagnosis, other diagnoses, principal procedure, other procedures — applies a versioned rule pack, and returns a report whose every finding names the clause it came from.

RuleCheckSeverityBasis kind
IC-001every diagnosis code has ICD-10 form (markers stripped first)errordirect
IC-002the same diagnosis code is not listed twicewarnprinciple
IC-003an asterisk code has its dagger partner in the same episodeerrordirect
IC-004a diagnosis still uses the asterisk form (switch, off by default)infolocal
IC-005the principal procedure groups with the principal diagnosis (table, off by default)warndirect
IC-006a diagnosis flagged "not present on admission" is not the principal diagnosiswarnprinciple
IC-007every procedure code has ICD-9-CM-3 formerrordirect
IC-008the chief complaint and the diagnosis names share a literal fragmentinfoprinciple
IC-009a principal diagnosis is presenterrordirect
IC-010diagnoses carry names, not only codes (switch, off by default)infolocal

Every switch that depends on a code catalogue is off by default and reports itself in skipped until configured, so an unfilled table can never read as "nothing wrong".

Configuration

KeyTypeDefaultDescription
rulesFilestringrules/icd-rule-check.yamlRule-pack path, relative to the package root
disabledRulesstring[][]Rule ids to stop running; each appears in skipped
onlyRulesstring[][]Run only these rule ids; empty runs every rule
skipNotesstring""Note appended to every skipped reason
timeoutMsnumber120000Cooperative tool timeout budget

Rule-level parameters worth knowing:

  • IC-003 pairs — your dagger↔asterisk table, as [{ dagger, asterisk }]. Empty means the check cannot run and says so.
  • IC-005 correspondence — your diagnosis→procedure groupings, as [{ diagnosis: [I21], procedures: [36.06, 36.07] }]. An empty procedures list means "this group should carry no principal procedure".
  • IC-004 flagAsteriskUse and IC-010 requireNames — off until you enable them for your catalogue and reporting rules.
  • IC-006 flagCode — the admission-condition code that means "not present on admission". Defaults to 4.

Material format

The tool accepts JSON or YAML. Every field is optional at the reader level and validated by the check engine, so a partial export produces findings about the missing parts instead of a crash.

principalDiagnosis: { code: "I21.900", name: 急性心肌梗死 }
otherDiagnoses:
  - { code: "I10", name: 高血压 }
principalProcedure: { code: "36.0600", name: 冠状动脉支架植入术 }
otherProcedures: []
chiefComplaint: 突发心肌梗死样胸痛 3 小时
admissionCondition:
  "I21.900": "1"     # drives IC-006

An entry may also be a bare code string (principalDiagnosis: I21.900), and a diagnosis or procedure may carry the ICD-10 markers (A18.1†, N51.0*) — they are stripped before the format check, so a marker never trips IC-001.

Rule sources

Rule data lives in rules/icd-rule-check.yaml. Every rule carries a document, a document number, a clause in the source's own numbering, a verbatim excerpt and the URL the excerpt was read from. The loader enforces that an excerpt is a real quotation of at least eight characters, and that a check resting only on a general principle or a local policy can never be declared error.

The clauses that are quoted come from 《住院病案首页数据填写质量规范(暂行)》 and 《住院病案首页数据质量管理与控制指标(2016版)》(国卫办医发〔2016〕24号) and from 《医疗保障基金结算清单填写规范(试行)》(医保办发〔2020〕20号). Two research findings shaped the pack and are recorded in it:

  1. No quotable clause was found for combined coding, so no combined-code rule exists here. The honest output of that investigation is a parameterised hook that is empty by default, not a rule with an invented clause number.
  2. The asterisk form's standing depends on the catalogue version. The national clinical version and the insurance version treat it differently, so IC-004 is a switch rather than a rule.

Troubleshooting

  • IC-003 or IC-005 reports itself as skipped. The table they need is empty. Fill in pairs or correspondence with the version your encoders use.
  • A code you know is valid is reported as malformed. IC-001 checks form only; if your catalogue uses a spelling outside ^[A-Z][0-9]{2}(\.[0-9A-Z]{1,4})?$, change the pattern in the rule pack.
  • IC-008 fires on a clinically sensible record. It compares a chief complaint against diagnosis names by literal fragment, which is a string operation, not a coding judgement. Add the name you use or disable the rule.
  • The plugin installs but the tool never appears. Check that main resolves to lib/index.mjs and that pnpm run build produced it; a wrong main makes the loader skip the entry silently.
  • dsh plugin add refuses the package as incompatible. The peer range covers 0.1.x and 0.2.x; if your runtime sits outside it, grant an explicit exemption: dsh plugin --profile <name> allow-version dsh-icd-rule-check@0.1.0 --dsh-version <runtime> --accept-risk
  • check reports manifest-peers as failed. The static checker compares against a hard-coded peer range that predates the 0.2 line. The runtime enforces peer compatibility at install time, so the declared range is the correct one; this is a known upstream issue in dsh-plugin-dev.

Development

pnpm install
pnpm run typecheck   # tsc --noEmit
pnpm test            # vitest, paired fixtures per rule
pnpm run build       # tsdown -> lib/index.mjs + lib/index.d.mts
node ../scripts/sync-shared.mjs dsh-icd-rule-check   # refresh src/shared from ../_shared

PerryLink DSH Plugin Family

Full family index: choose a checker by material and all plugins. This repository is one of them.

License

Apache License 2.0 © 2026 dsh-icd-rule-check contributors.