dsh-medrec-qc 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+
3
+ ## 0.2.2
4
+
5
+ - Ship `CHANGELOG.md` and `SECURITY.md` inside the package. `files` is an
6
+ allowlist and neither was on it, so no release note had ever reached anyone
7
+ who installed this package, and npm had no changelog section to show.
8
+ ## 0.2.1
9
+
10
+ - Citation pass: every `excerpt` was checked against this repository's own
11
+ `rules/evidence/` record, and the record was completed for the clauses the
12
+ rules quote.
13
+ - Adds `rules/citations-baseline.json`, which the `check:citations` gate reads:
14
+ it lists any excerpt not yet traceable to the evidence, and that list can
15
+ only shrink.
16
+ ## 0.2.0
17
+
18
+ - Release infrastructure brought to the family standard: `verify:self-contained`,
19
+ `check:lockfile`, `check:readmes` and `check:citations` gates, a `prepublishOnly` that
20
+ re-runs the whole chain, SECURITY.md, dependabot, and the OpenSSF Scorecard workflow.
21
+ - `check:citations` enforces the rule this pack's own header states: every `excerpt`
22
+ must be a verbatim quotation, findable in `rules/evidence/`. Rules that are not
23
+ traceable yet are listed in `rules/citations-baseline.json`, and that file can only
24
+ shrink - anything new has to be sourced before it can land.
25
+ - The README install command now names the published package instead of a local tarball.
26
+ - Five-language READMEs hold the same section count and the same configuration keys.
27
+ - Rule pack: 15 rules across MR-001..MR-015.
28
+ - Licensed Apache-2.0.
package/SECURITY.md ADDED
@@ -0,0 +1,39 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ Please report security vulnerabilities **privately** through GitHub's private
6
+ vulnerability reporting:
7
+
8
+ **Security → Report a vulnerability** at
9
+ https://github.com/PerryLink/dsh-medrec-qc/security/advisories/new
10
+
11
+ Do **not** open a public issue for security findings.
12
+
13
+ Before reporting, **sanitize everything you paste**: remove tokens, API keys,
14
+ credentials, authorization headers, session contents, and personal data. Logs
15
+ without secrets only.
16
+
17
+ ## Scope note
18
+
19
+ This plugin is an offline checker. It reads the material you hand it and
20
+ compares it against a versioned rule pack; it makes no network calls and no
21
+ model calls, and it stores nothing.
22
+
23
+ ## What to include
24
+
25
+ - affected package version (and DeepSeek Harness runtime version)
26
+ - a minimal reproduction
27
+ - your impact assessment
28
+
29
+ ## Response expectations
30
+
31
+ - acknowledgement within **7 days**
32
+ - status updates at least every **14 days** until resolution
33
+ - coordinated disclosure: the fix and advisory are prepared first; the finding
34
+ is disclosed publicly after the fix ships
35
+
36
+ ## Credits and disclosure
37
+
38
+ - reporters are credited in the advisory and CHANGELOG unless they ask to stay anonymous
39
+ - advisories follow GitHub's advisory workflow and are published together with the fix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-medrec-qc",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "病案首页形式质控与逻辑矛盾提示(依据国卫办医发〔2016〕24号等公开文件,仅提示差异,不作出定性结论)",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",
@@ -23,7 +23,9 @@
23
23
  "README-hi.md",
24
24
  "locale/*.json",
25
25
  "icon.svg",
26
- "rules"
26
+ "rules",
27
+ "CHANGELOG.md",
28
+ "SECURITY.md"
27
29
  ],
28
30
  "scripts": {
29
31
  "build": "tsdown",
@@ -32,7 +34,7 @@
32
34
  "verify:self-contained": "node scripts/verify-self-contained.mjs",
33
35
  "check:lockfile": "node scripts/check-lockfile-drift.mjs",
34
36
  "check:readmes": "node scripts/check-readme-sync.mjs",
35
- "prepublishOnly": "pnpm run typecheck && pnpm test && pnpm run build && pnpm run verify:self-contained && pnpm run check:readmes && pnpm run check:citations",
37
+ "prepublishOnly": "pnpm run typecheck && pnpm test && pnpm run build && pnpm run verify:self-contained && pnpm run check:lockfile && pnpm run check:readmes && pnpm run check:citations",
36
38
  "prepare": "tsdown",
37
39
  "check:citations": "node scripts/check-citations.mjs"
38
40
  },
@@ -1,6 +1,4 @@
1
1
  {
2
2
  "note": "Excerpt segments that are not yet traceable to this repository's rules/evidence/ record. The check:citations gate fails on anything new and on any entry that has become traceable, so this list can only shrink.",
3
- "untraceable": [
4
- "MR-014:ec7e8ee1e000"
5
- ]
3
+ "untraceable": []
6
4
  }
@@ -0,0 +1,77 @@
1
+ # 条文核查报告 —— dsh-medrec-qc(病案质控核对)
2
+
3
+ - **核查日期**:2026-10-07
4
+ - **核查对象**:`MR-014` 引用的国家医疗保障局智能监管"两库"知识点
5
+ - **核查方法**:取回**发布机关本站**(国家医疗保障局)页面及其**附件**,逐字复制表头。
6
+ - **结论**:**取得逐字内容**,并**把来源从未经核实的转载页换成发布机关本站**。
7
+
8
+ ---
9
+
10
+ ## 一、本轮更正:来源换成了发布机关
11
+
12
+ `MR-014` 原先的 `source` 指向 `http://ywc.jlu.edu.cn/info/1037/1405.htm`
13
+ (**某高校学院转载页**),而这条引文的实际出处是**国家医疗保障局**公开发布的"两库"知识点明细。
14
+
15
+ 已换为发布机关本站:
16
+
17
+ - **公告页**:<https://www.nhsa.gov.cn/art/2026/9/8/art_109_22052.html>
18
+ 《国家医保局发布第二十一批智能监管"两库"规则和知识点》
19
+ - **知识点明细附件(xlsx)**:
20
+ <https://www.nhsa.gov.cn/module/download/downfile.jsp?classid=0&filename=c16ad58707df4d4cb93f685d04e57a78.xlsx>
21
+
22
+ **版本事实**:索引号 `2026-04-00085`,发布日期 **2026-09-08**,发布机构**国家医疗保障局**。
23
+ 公告说明本次公开的是"诊断与患者性别不符"规则下"某些传染病和寄生虫病"等 **9 章**的对应知识点明细;
24
+ 并载明《国家医保基金智能监管知识库、规则库(2025 年版)》已出版发行。
25
+
26
+ ---
27
+
28
+ ## 二、已取得逐字内容的文件
29
+
30
+ ### 第二十一批"诊断与患者性别不符"规则对应知识点明细(xlsx 附件)
31
+
32
+ - **表头(逐字,`MR-014` 所引)**:
33
+ > 序号 | 诊断代码(ICD-10医保2.0版)| 诊断名称(ICD-10医保2.0版)| 限定性别 | 检出逻辑 | 逻辑依据
34
+
35
+ (附件中该表头单元格内含换行,原文为
36
+ `诊断代码\n(ICD-10医保2.0版)` 与 `诊断名称\n(ICD-10医保2.0版)`。)
37
+
38
+ - **数据行示例(逐字)**:
39
+ > A06.800x003 | 阿米巴精囊炎 | 男 | 与限定性别不符 | 男性泌尿生殖器官疾病相关诊断
40
+ > A06.800x004+N51.2* | 阿米巴龟头炎 | 男 | …
41
+
42
+ - **取得方式**:下载附件 xlsx → 解包 `xl/sharedStrings.xml` → 提取字符串表,逐字复制。
43
+
44
+ ⚠️ 该附件为**结构化数据表**(768 条字符串、含大量诊断编码),本插件**不内置该表**;
45
+ 本记录只证明 `MR-014` 所引表头与"与限定性别不符"这一检出逻辑确有官方出处。
46
+
47
+ ---
48
+
49
+ ## 三、边界说明(沿用并确认)
50
+
51
+ 本插件核对的是**病案首页与结算清单的字段齐备与代码形式自洽**,
52
+ **不判定某条诊断在临床上是否正确、是否应当计入**。
53
+
54
+ "两库"知识点本身是**医保基金智能监管规则**,其适用主体是**定点医药机构的事前提醒与自查自纠**;
55
+ 把它读成"临床诊断规范"即为越界。
56
+
57
+ ⚠️ 本规则库的 `kind`、`severity`、`excerpt` **一律未改动**(`excerpt` 本就是逐字表头)。
58
+
59
+ ## 四、仍未取得的部分(如实标注)
60
+
61
+ | 文件 | 状态 |
62
+ |---|---|
63
+ | 《国家医保基金智能监管知识库、规则库(2025年版)》 | **未取得**;公告称已出版发行,本插件不内置。 |
64
+ | 本批其余 8 章的知识点明细 | 已随附件取得,但本插件规则未逐项引用,故不全录。 |
65
+ | 同页 PDF 附件 | **未取得**(本轮以 xlsx 为准,二者应内容一致但未逐页比对)。 |
66
+
67
+ ## 五、复现方法
68
+
69
+ ```sh
70
+ # 公告页
71
+ curl -sL -A 'Mozilla/5.0' 'https://www.nhsa.gov.cn/art/2026/9/8/art_109_22052.html' \
72
+ | sed 's/<[^>]*>//g' | tr -s ' ' | grep -o '第二十一批[^。]*'
73
+ # 附件表头
74
+ curl -sL -o kp.xlsx -A 'Mozilla/5.0' \
75
+ 'https://www.nhsa.gov.cn/module/download/downfile.jsp?classid=0&filename=c16ad58707df4d4cb93f685d04e57a78.xlsx'
76
+ unzip -p kp.xlsx xl/sharedStrings.xml | sed 's/<[^>]*>/\n/g' | grep -A1 -B1 '限定性别'
77
+ ```