dsh-hazchem-check
核对危险化学品台账的内部自洽性:每种物质是否载明危险性类别、储存量能否解析、是否记录临界量、重大危险源判定与该储存量相对台账自述临界量的关系是否一致、是否载明安全技术说明书编号、CAS 号是否重复。只列出差异供人复核,不判定某单元是否构成重大危险源。
安装
dsh plugin --profile web add dsh-hazchem-check
沙箱测试结果
| 阶段 | 结果 |
|---|---|
| 1 安装 | ✓ |
| 2 列装 | ✓ |
| 3 挂载 | ✓ |
| 4 启动 | — |
四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。
README
dsh-hazchem-check — Hazardous chemical register and major hazard source identification check
[English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
<!-- topblock:v1 -->
What it is — Hazardous chemical register and major hazard source identification check. It returns a list of what is inconsistent, where, and what to fix.
Who it is for — safety and hazardous-chemicals managers; 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 "Safety Compliance Suite" in WorkBuddy / Coze (this check is one part of it; availability as listed); or:
dsh plugin --profile <name> add dsh-hazchem-check
<!-- /topblock:v1 -->


dsh-hazchem-check reads one hazardous-chemical register with its major-hazard-source identification record — the site header plus one row per substance — and checks that register's own completeness and arithmetic: that each substance carries a name and a hazard class, that the stored quantity parses as a number, that a threshold is recorded, that the “major hazard source” verdict agrees with how the stored quantity compares with the threshold the register itself states, that a stored substance records its safety data sheet number, that no CAS number is repeated, that the header declares the identification basis, and that no template placeholder survives in the name column.
Install
dsh plugin --profile <name> add dsh-hazchem-check dsh --profile <name> --dump-config | grep 'dsh-hazchem-check'
What it looks like
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 hazchem_check
Input
~~~json
{"rows":[{"化学品名称":"甲醇","最大储存量":"满罐","计量单位":"t"}]}
~~~
Output
~~~json
{
"id": "dsh-hazchem-check.HZ-002.de09b5a6",
"ruleId": "HZ-002",
"severity": "warn",
"locator": {
"field": "maxStorage",
"row": 1
},
"found": "第 1 行「maxStorage」的值「满罐」无法解析为数字",
"expected": "「maxStorage」应填写数字",
"fix": "储存量应填写数值;本条只核对可解析性,不判断数量是否真实"
}
~~~
Observed from tests/fixtures/HZ-002/HZ-002-unsafe.json (cases.json expects HZ-002 count 1); run via lib/index.mjs rules/hazchem-check.yaml
You ask · What it answers
The register says “no”, but the stored quantity is above the threshold written beside it — is that caught? · Yes. HZ-003 compares the two numbers the register itself carries and reports the row when the verdict disagrees with them. It does not decide whether the unit really is a major hazard source.
A row has no threshold at all. Does the check say anything? · Yes. HZ-004 requires the threshold column to be filled on every row. It checks that a value is present, not that it is the right value for that substance — a 0 passes.
The chemical name is filled in but the hazard class is blank. · HZ-001 requires both on each row and reports the row missing either one. It does not judge whether the class is correct.
The quantity column reads 1,500 kg — will that still be read? · Yes. HZ-002 takes the numeric part; only a quantity it cannot parse is reported. Whether the figure is true, or taken at the design maximum, is not checked.
Which rows must carry a safety data sheet number? · HZ-006: every row that has a stored quantity. The rule checks that the number is filled in, not that the sheet is complete or belongs to that substance.
The same CAS number appears twice, in two warehouses. · HZ-007 reports a repeated CAS number, because it defeats both de-duplication and the quantity total. One substance split across warehouses is a legitimate shape: distinguish it in the storage-location column, or disable the rule. With no CAS column the rule reports that it could not run instead of passing silently.
Standards it follows
Document · Number · Cited by rules
《危险化学品安全管理条例》 · 国务院令第591号(2002年1月26日国务院令第344号公布,2011年2月16日国务院第144次常务会议修订通过,自2011年12月1日起施行) · HZ-001, HZ-002, HZ-003, HZ-004, HZ-006, HZ-008
《危险化学品重大危险源辨识》 · GB 18218—2018(2018-11-19发布,2019-03-01实施;全部技术内容为强制性;代替GB 18218—2009) · HZ-002, HZ-003
《危险化学品重大危险源辨识》 · GB 18218—2018(本次未取得条文) · HZ-005
《危险化学品安全管理条例》 · 国务院令第591号(本次未取得条文) · HZ-007
Boundary: this plugin checks a 危险化学品台账与重大危险源辨识记录 for completeness and arithmetic — that
each chemical names itself and its hazard class, that the stored quantity parses, that a threshold is recorded,
that **the major-hazard-source verdict agrees with how the stored quantity compares to the threshold the register
states**, that a stored chemical records its safety data sheet number, that CAS numbers are not duplicated, that
the register declares its identification basis, and that no placeholder survives. It does not decide whether a
unit constitutes a major hazard source, whether it must be registered, whether a safety assessment is required, or
whether it is a major hidden danger.
### ⚠️ What the standard says, and the four errors this plugin cannot find
GB 18218—2018 was obtained and read verbatim (see `rules/evidence/clause-veri
…(truncated)
以上内容来自 npm 上的 README,我们只做格式化,不改内容。
版本
npm 上共发布:10,最后更新 2026-11-04