{"id":"e41e1cd8-96e5-4273-95cf-3b9a753668a1","entityType":"agent","slug":"clawhub-unisound-llm-unisound-diagnosis-review","name":"unisound-diagnosis-review","canonicalUrl":"https://www.xpersona.co/agent/clawhub-unisound-llm-unisound-diagnosis-review","canonicalPath":"/agent/clawhub-unisound-llm-unisound-diagnosis-review","generatedAt":"2026-10-14T20:41:53.935Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T23:30:04.302Z","emptyReason":null},"description":"诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。 Skill: unisound-diagnosis-review Owner: unisound-llm Summary: 诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T02:35:20.808Z | user - Removed the file skill-card.md. - Updated the default model name from u1-insuremed to u2-med in documentation and CLI parameter descriptions. - No functional changes to code or CLI behavior; change is documentation-only. - Ski","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 976 downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s1770nyybxj4gn0vk38n6wr6k584x8ea:unisound-diagnosis-review","sourceUrl":"https://clawhub.ai/unisound-llm/unisound-diagnosis-review","homepage":"https://clawhub.ai/unisound-llm/skills/unisound-diagnosis-review","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/unisound-llm/unisound-diagnosis-review","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/unisound-llm/skills/unisound-diagnosis-review","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。 Skill: unisound-diagnosis-review Owner: unisound-llm Summary: 诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T23:30:04.302Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T23:30:04.302Z","emptyReason":null},"stars":null,"forks":null,"downloads":976,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.2","tractionLabel":"976 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T23:30:04.289Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T23:30:04.302Z","lastCrawledAt":"2026-10-11T23:30:04.289Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T23:30:04.289Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.2","createdAt":"2026-07-16T02:35:20.808Z","changelog":"- Removed the file skill-card.md. - Updated the default model name from u1-insuremed to u2-med in documentation and CLI parameter descriptions. - No functional changes to code or CLI behavior; change is documentation-only. - Skill continues to provide diagnosis coding audit with structure and usage as before.","fileCount":5,"zipByteSize":18617},{"version":"1.0.1","createdAt":"2026-05-28T11:12:53.504Z","changelog":"- Removed the file skill-card.md from the package. - Updated dependency and服务说明：规则库访问从本地 PostgreSQL，更改为通过 ICD/DRG 规则库 API，需用环境变量 GUIDELINE_API_BASE 配置访问；如有鉴权另需 GUIDELINE_API_KEY。 - SKILL.md 数据安全部分将“数据库用途”表述改为“规则库服务用途”，并明确由 API 读取规则，不再连接本地数据库。 - 依赖说明中已不再列出 psycopg，Python 依赖精简为 3.11+。 - 外部服务说明同步调整为调用 ICD/DRG 规则库 API。 - 其它命令行入口、审核流程和输出接口不变，用户调用习惯无影响。","fileCount":5,"zipByteSize":18860},{"version":"1.0.0","createdAt":"2026-05-15T08:46:27.444Z","changelog":"- Initial release of med-diagnosis-review skill for structured medical record diagnosis code audit. - Supports CLI-based audit using structured JSON records or common file formats (PDF, DOC, XLS, etc.) with candidate diagnoses input. - Uses internal diagnosis coding guideline database; integrates with internal medical LLM for audit explanations (toggleable via parameter). - Enforces strict evidence, candidate-only, and medical content matching rules; full privacy/ethical handling—no local data persistence. - Clear JSON outputs: final audit decision (\"通过\" / \"不通过\" / \"待人工复核\") and concise reasoning. - Simple CLI interface with detailed parameter documentation and example commands.","fileCount":5,"zipByteSize":19097}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s1770nyybxj4gn0vk38n6wr6k584x8ea:unisound-diagnosis-review","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-14T20:41:53.935Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-review/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T23:30:04.302Z","emptyReason":null},"readme":"Skill: unisound-diagnosis-review\n\nOwner: unisound-llm\n\nSummary: 诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。\n\nTags: latest:1.0.2\n\nVersion history:\n\nv1.0.2 | 2026-07-16T02:35:20.808Z | user\n\n- Removed the file skill-card.md.\n- Updated the default model name from u1-insuremed to u2-med in documentation and CLI parameter descriptions.\n- No functional changes to code or CLI behavior; change is documentation-only.\n- Skill continues to provide diagnosis coding audit with structure and usage as before.\n\nv1.0.1 | 2026-05-28T11:12:53.504Z | user\n\n- Removed the file skill-card.md from the package.\n- Updated dependency and服务说明：规则库访问从本地 PostgreSQL，更改为通过 ICD/DRG 规则库 API，需用环境变量 GUIDELINE_API_BASE 配置访问；如有鉴权另需 GUIDELINE_API_KEY。\n- SKILL.md 数据安全部分将“数据库用途”表述改为“规则库服务用途”，并明确由 API 读取规则，不再连接本地数据库。\n- 依赖说明中已不再列出 psycopg，Python 依赖精简为 3.11+。\n- 外部服务说明同步调整为调用 ICD/DRG 规则库 API。\n- 其它命令行入口、审核流程和输出接口不变，用户调用习惯无影响。\n\nv1.0.0 | 2026-05-15T08:46:27.444Z | user\n\n- Initial release of med-diagnosis-review skill for structured medical record diagnosis code audit.\n- Supports CLI-based audit using structured JSON records or common file formats (PDF, DOC, XLS, etc.) with candidate diagnoses input.\n- Uses internal diagnosis coding guideline database; integrates with internal medical LLM for audit explanations (toggleable via parameter).\n- Enforces strict evidence, candidate-only, and medical content matching rules; full privacy/ethical handling—no local data persistence.\n- Clear JSON outputs: final audit decision (\"通过\" / \"不通过\" / \"待人工复核\") and concise reasoning.\n- Simple CLI interface with detailed parameter documentation and example commands.\n\nArchive index:\n\nArchive v1.0.2: 5 files, 18617 bytes\n\nFiles: _meta.json (144b), scripts/diagnosis_review.py (35869b), scripts/run.py (9129b), skill-card.md (1931b), SKILL.md (8588b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: med-diagnosis-review\ndescription: 诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🩺\"\n      }\n  }\n---\n\n# 诊断编码审核\n\n概述\n----\n给定结构化病案 `record` 和待审核诊断列表，本技能从诊断编码审核规则库读取规则，核对病历文书证据，输出诊断编码审核结果。\n\n本技能会：\n- 从 `diagnosis_audit_guidelines` 读取诊断编码审核规则。\n- 优先按用户提供的 `diagnoses` 候选列表审核；未提供时，默认审核 `record.diagnosis.primaryDiagnosis` 和 `record.diagnosis.otherDiagnoses` 中的全部诊断。\n- 调用 skill 内置的 `review_diagnosis_record` function 完成审核。\n- 通过 `scripts/run.py` 提供统一 CLI 入口；不转发、不调用当前项目已有 API 服务，也不导入当前项目 `app.*` 模块。\n\n数据安全、隐私与伦理声明\n------------------------\n- **最小必要原则**：仅处理审核所需的病案文书、诊断编码和诊断名称。\n- **严格脱敏**：调用方应在传入前完成姓名、证件号、手机号、详细地址等可识别身份信息的脱敏。\n- **不做本地持久化**：本技能不把请求体、中间结果或审核结果写入本地文件或数据库。\n- **规则库服务用途**：规则库 API 仅用于读取诊断编码审核规则。\n- **模型调用说明**：默认使用内部医疗大模型生成审核说明；鉴权 `appkey` 必须由调用方传入。如需完全离线规则回退，可传 `use_llm=false`。\n- **医疗边界**：输出为医保编码审核辅助信息，不构成医疗诊断或治疗建议。\n\n输入格式\n--------\n统一入口支持 `pdf/doc/docx/xls/xlsx/csv/txt/json`。JSON 可为结构化病案；其他格式会先预处理为一份完整病历文书。未显式传入 `diagnoses` 时，会自动审核结构化病案中的主诊断和全部其他诊断；普通病历文件需要通过参数传入待审核诊断列表。\n\n```json\n{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001092574\",\n    \"docs\": [\n      {\n        \"docName\": \"出院记录\",\n        \"fileName\": \"出院记录\",\n        \"docClassName\": \"出院记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"diagnosis\": {\n      \"primaryDiagnosis\": {\"name\": \"2型糖尿病\", \"code\": \"E11.901\"},\n      \"otherDiagnoses\": []\n    }\n  },\n  \"diagnoses\": [\n    {\"role\": \"primary\", \"code\": \"E11.901\", \"name\": \"2型糖尿病\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}\n```\n\n字段说明：\n- `record`：**必填**。结构化病案 JSON。\n- `diagnoses`：可选。待审核诊断候选数组；每项包含 `role`、`code`、`name`。\n- `role`：`primary` 表示主诊断；其他值按其他诊断处理。\n- `appkey`：**必填**。内部医疗大模型鉴权 key，由平台分配；调用时使用 Bearer 鉴权。\n- `model`：可选。内部医疗大模型名称，默认 `u2-med`。\n- `use_llm`：可选，默认 `true`。传 `false` 时不调用模型，仅使用本地回退审核逻辑。\n\n审核规则\n--------\n- **候选优先**：只审核输入候选或病案首页中已有诊断，不自由生成候选列表外的诊断名称或编码。\n- **医学内涵优先**：匹配依据以医学内涵、医保目录归类、编码规则和诊疗目的为准，不能只看字面相似。\n- **证据优先**：审核结论必须基于病历文书明确支持的信息；不能把病历中未明确支持的信息当作事实。\n- **角色边界**：主诊断优先核对本次住院主要诊疗原因；其他诊断核对是否有明确并存、影响诊疗或资源消耗的依据。\n- **父类/子类边界**：编码可按规则库从细到粗检索，但父类规则不能自动证明子类编码成立；细分部位、病因、并发症、分型不明确时应输出 `待人工复核`。\n- **同义词/简称边界**：仅当简称、同义词与候选诊断在医学内涵和编码归类上明确一致时可视为匹配。\n- **模糊保守**：字面相似但医学内涵不同、疑似/排除诊断、仅有既往史或家族史、缺少直接证据时，不强行通过。\n- **DRG/CC 边界**：涉及 DRG 分组或严重合并症/并发症、一般合并症/并发症、无合并症/并发症判断时，必须有病历明确支持；不能用模型常识自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --diagnosis 'primary|E11.901|2型糖尿病' \\\n  --diagnosis 'other|I10.x00|高血压' \\\n  --save-prepared\n```\n\n参数说明\n--------\n- `--input PATH`：**必填**。结构化病案 JSON，或包含 `record` 的请求体 JSON。\n- `--input-type auto|pdf|doc|docx|xls|xlsx|csv|txt|json`：输入类型，默认 `auto`。\n- `--sheet STRING`：读取 Excel 时指定 sheet（可选）。\n- `--encoding STRING`：`txt/csv` 编码，默认 `utf-8`。\n- `--diagnosis STRING`：待审核诊断，格式 `role|code|name` 或 `code|name`；可重复。\n- `--diagnoses-json STRING`：待审核诊断 JSON 字符串或文件路径。\n- 普通 `txt/pdf/doc/docx/xls/xlsx/csv` 文件不会自动知道待审核诊断，必须传 `--diagnosis` 或 `--diagnoses-json`。\n- `--appkey STRING`：**必填**。内部医疗大模型鉴权 key，由平台分配；调用时使用 Bearer 鉴权。\n- `--base URL`：内部大模型 base URL，默认 `https://maas-api.hivoice.cn/v1`。\n- `--model STRING`：模型名称，默认 `u2-med`。\n- `--timeout SECONDS`：HTTP 超时秒数；`0` 表示一直等待，默认 `0`。\n- `--no-llm`：可选。禁用 LLM，仅使用本地回退逻辑。\n- `--output-json PATH`：可选。保存响应 JSON；同时传 `--output` 时优先使用该参数。\n- `--output PATH`：可选。兼容旧调用方式，等同于 `--output-json`。\n- `--save-prepared`：可选。保存预处理后的病历文本到 `doctor/icd-drg/runs/diagnosis-review/` 或输出文件所在目录；路径提示输出到 stderr。\n\n输出约定\n--------\nCLI 只输出 JSON，不输出 Markdown、序号或额外提示语。响应结构：\n\n```json\n{\n  \"final_decision\": \"通过\",\n  \"reasoning\": \"E11.901 2型糖尿病：通过。病历文书存在可支撑该诊断编码的明确依据。\"\n}\n```\n\n`final_decision` 只能为 `通过`、`不通过`、`待人工复核`。`reasoning` 只写面向用户的简洁依据，不展示内部 chain-of-thought。\n\n示例\n----\n- 正例：候选 `E11.901 2型糖尿病`，出院记录和检验记录明确记载 2 型糖尿病及相关诊疗依据，可输出 `通过`。\n- 正例：候选主诊断与规则库编码精确命中，入院记录、首次病程记录和出院记录均支持本次住院主要诊疗原因，可输出 `通过`。\n- 多项审核例：结构化病案包含 `primaryDiagnosis` 和多个 `otherDiagnoses` 时，未传 `--diagnosis` 也会审核主诊断和全部其他诊断；普通文件需用多个 `--diagnosis` 显式列出。\n- 边界例：候选为细分子类编码，但文书只支持父类诊断，未明确分型、部位或并发症，应输出 `待人工复核`。\n- 不应匹配例：候选名称与文书关键词字面相似，但医学内涵不同，或仅见“排除/疑似/既往史”，不得强行通过，应输出 `不通过` 或 `待人工复核`。\n\n依赖\n----\n### 运行环境\n- Python 3.11+\n\n### 外部服务\n- ICD/DRG 规则库 API：读取诊断编码审核规则。\n- 内部医疗大模型：`https://maas-api.hivoice.cn/v1/chat/completions`\n\n测试命令\n--------\n从 `skills` 根目录执行：\n\n```bash\npython3 self_tests/med-icd-drg-review/self_test_icd_drg_review.py\n```\n\n备注\n----\n- 规则库访问必须通过环境变量配置：`GUIDELINE_API_BASE`；如平台启用鉴权，可配置 `GUIDELINE_API_KEY`。\n- `scripts/run.py` 是唯一对外入口，复用 `scripts/diagnosis_review.py` 的核心审核逻辑。\n- LLM 鉴权 `appkey` 由用户在调用时传入，脚本不硬编码。\n- 发布目录只保留 `SKILL.md`、`_meta.json`、`scripts/`；示例输入、运行输出、自测脚本放在 skill 包外。\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7ft98qwhxyrgcy7b7rzdhrrd8366k6\",\n  \"slug\": \"unisound-diagnosis-review\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1784169320808\n}\n\nFile v1.0.2:skill-card.md\n\n## Description:\n\nReviews structured medical records and candidate diagnoses to report diagnosis-coding rule matches, supporting record evidence, and an audit conclusion.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[unisound-llm](https://clawhub.ai/user/unisound-llm)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nHealthcare coding reviewers and developers use this skill to audit supplied diagnosis codes against medical-record evidence and diagnosis audit rules. Its output is coding-audit assistance and not medical diagnosis or treatment advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive medical-record content and bearer credentials can be sent to an LLM endpoint.\n\nMitigation: Use only approved healthcare endpoints and keep LLM use disabled unless that endpoint and data flow are authorized.\n\nRisk: Untrusted callers can select the LLM base URL.\n\nMitigation: Do not allow untrusted callers to set --base or payload.base; restrict execution to approved endpoint configuration.\n\nRisk: Prepared record text can be persisted when requested.\n\nMitigation: Avoid --save-prepared for PHI and pass only authorized, de-identified patient data.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/skills/unisound-diagnosis-review)\n\n## Skill Output:\n\n**Output Type(s):** [text, JSON, guidance]\n\n**Output Format:** [JSON object with final_decision and reasoning fields]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [final_decision is one of: 通过, 不通过, 待人工复核.]\n\n## Skill Version(s):\n\n1.0.2 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.1: 5 files, 18860 bytes\n\nFiles: _meta.json (144b), scripts/diagnosis_review.py (35875b), scripts/run.py (9129b), skill-card.md (2547b), SKILL.md (8600b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: med-diagnosis-review\ndescription: 诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🩺\"\n      }\n  }\n---\n\n# 诊断编码审核\n\n概述\n----\n给定结构化病案 `record` 和待审核诊断列表，本技能从诊断编码审核规则库读取规则，核对病历文书证据，输出诊断编码审核结果。\n\n本技能会：\n- 从 `diagnosis_audit_guidelines` 读取诊断编码审核规则。\n- 优先按用户提供的 `diagnoses` 候选列表审核；未提供时，默认审核 `record.diagnosis.primaryDiagnosis` 和 `record.diagnosis.otherDiagnoses` 中的全部诊断。\n- 调用 skill 内置的 `review_diagnosis_record` function 完成审核。\n- 通过 `scripts/run.py` 提供统一 CLI 入口；不转发、不调用当前项目已有 API 服务，也不导入当前项目 `app.*` 模块。\n\n数据安全、隐私与伦理声明\n------------------------\n- **最小必要原则**：仅处理审核所需的病案文书、诊断编码和诊断名称。\n- **严格脱敏**：调用方应在传入前完成姓名、证件号、手机号、详细地址等可识别身份信息的脱敏。\n- **不做本地持久化**：本技能不把请求体、中间结果或审核结果写入本地文件或数据库。\n- **规则库服务用途**：规则库 API 仅用于读取诊断编码审核规则。\n- **模型调用说明**：默认使用内部医疗大模型生成审核说明；鉴权 `appkey` 必须由调用方传入。如需完全离线规则回退，可传 `use_llm=false`。\n- **医疗边界**：输出为医保编码审核辅助信息，不构成医疗诊断或治疗建议。\n\n输入格式\n--------\n统一入口支持 `pdf/doc/docx/xls/xlsx/csv/txt/json`。JSON 可为结构化病案；其他格式会先预处理为一份完整病历文书。未显式传入 `diagnoses` 时，会自动审核结构化病案中的主诊断和全部其他诊断；普通病历文件需要通过参数传入待审核诊断列表。\n\n```json\n{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001092574\",\n    \"docs\": [\n      {\n        \"docName\": \"出院记录\",\n        \"fileName\": \"出院记录\",\n        \"docClassName\": \"出院记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"diagnosis\": {\n      \"primaryDiagnosis\": {\"name\": \"2型糖尿病\", \"code\": \"E11.901\"},\n      \"otherDiagnoses\": []\n    }\n  },\n  \"diagnoses\": [\n    {\"role\": \"primary\", \"code\": \"E11.901\", \"name\": \"2型糖尿病\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}\n```\n\n字段说明：\n- `record`：**必填**。结构化病案 JSON。\n- `diagnoses`：可选。待审核诊断候选数组；每项包含 `role`、`code`、`name`。\n- `role`：`primary` 表示主诊断；其他值按其他诊断处理。\n- `appkey`：**必填**。内部医疗大模型鉴权 key，由平台分配；调用时使用 Bearer 鉴权。\n- `model`：可选。内部医疗大模型名称，默认 `u1-insuremed`。\n- `use_llm`：可选，默认 `true`。传 `false` 时不调用模型，仅使用本地回退审核逻辑。\n\n审核规则\n--------\n- **候选优先**：只审核输入候选或病案首页中已有诊断，不自由生成候选列表外的诊断名称或编码。\n- **医学内涵优先**：匹配依据以医学内涵、医保目录归类、编码规则和诊疗目的为准，不能只看字面相似。\n- **证据优先**：审核结论必须基于病历文书明确支持的信息；不能把病历中未明确支持的信息当作事实。\n- **角色边界**：主诊断优先核对本次住院主要诊疗原因；其他诊断核对是否有明确并存、影响诊疗或资源消耗的依据。\n- **父类/子类边界**：编码可按规则库从细到粗检索，但父类规则不能自动证明子类编码成立；细分部位、病因、并发症、分型不明确时应输出 `待人工复核`。\n- **同义词/简称边界**：仅当简称、同义词与候选诊断在医学内涵和编码归类上明确一致时可视为匹配。\n- **模糊保守**：字面相似但医学内涵不同、疑似/排除诊断、仅有既往史或家族史、缺少直接证据时，不强行通过。\n- **DRG/CC 边界**：涉及 DRG 分组或严重合并症/并发症、一般合并症/并发症、无合并症/并发症判断时，必须有病历明确支持；不能用模型常识自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --diagnosis 'primary|E11.901|2型糖尿病' \\\n  --diagnosis 'other|I10.x00|高血压' \\\n  --save-prepared\n```\n\n参数说明\n--------\n- `--input PATH`：**必填**。结构化病案 JSON，或包含 `record` 的请求体 JSON。\n- `--input-type auto|pdf|doc|docx|xls|xlsx|csv|txt|json`：输入类型，默认 `auto`。\n- `--sheet STRING`：读取 Excel 时指定 sheet（可选）。\n- `--encoding STRING`：`txt/csv` 编码，默认 `utf-8`。\n- `--diagnosis STRING`：待审核诊断，格式 `role|code|name` 或 `code|name`；可重复。\n- `--diagnoses-json STRING`：待审核诊断 JSON 字符串或文件路径。\n- 普通 `txt/pdf/doc/docx/xls/xlsx/csv` 文件不会自动知道待审核诊断，必须传 `--diagnosis` 或 `--diagnoses-json`。\n- `--appkey STRING`：**必填**。内部医疗大模型鉴权 key，由平台分配；调用时使用 Bearer 鉴权。\n- `--base URL`：内部大模型 base URL，默认 `https://maas-api.hivoice.cn/v1`。\n- `--model STRING`：模型名称，默认 `u1-insuremed`。\n- `--timeout SECONDS`：HTTP 超时秒数；`0` 表示一直等待，默认 `0`。\n- `--no-llm`：可选。禁用 LLM，仅使用本地回退逻辑。\n- `--output-json PATH`：可选。保存响应 JSON；同时传 `--output` 时优先使用该参数。\n- `--output PATH`：可选。兼容旧调用方式，等同于 `--output-json`。\n- `--save-prepared`：可选。保存预处理后的病历文本到 `doctor/icd-drg/runs/diagnosis-review/` 或输出文件所在目录；路径提示输出到 stderr。\n\n输出约定\n--------\nCLI 只输出 JSON，不输出 Markdown、序号或额外提示语。响应结构：\n\n```json\n{\n  \"final_decision\": \"通过\",\n  \"reasoning\": \"E11.901 2型糖尿病：通过。病历文书存在可支撑该诊断编码的明确依据。\"\n}\n```\n\n`final_decision` 只能为 `通过`、`不通过`、`待人工复核`。`reasoning` 只写面向用户的简洁依据，不展示内部 chain-of-thought。\n\n示例\n----\n- 正例：候选 `E11.901 2型糖尿病`，出院记录和检验记录明确记载 2 型糖尿病及相关诊疗依据，可输出 `通过`。\n- 正例：候选主诊断与规则库编码精确命中，入院记录、首次病程记录和出院记录均支持本次住院主要诊疗原因，可输出 `通过`。\n- 多项审核例：结构化病案包含 `primaryDiagnosis` 和多个 `otherDiagnoses` 时，未传 `--diagnosis` 也会审核主诊断和全部其他诊断；普通文件需用多个 `--diagnosis` 显式列出。\n- 边界例：候选为细分子类编码，但文书只支持父类诊断，未明确分型、部位或并发症，应输出 `待人工复核`。\n- 不应匹配例：候选名称与文书关键词字面相似，但医学内涵不同，或仅见“排除/疑似/既往史”，不得强行通过，应输出 `不通过` 或 `待人工复核`。\n\n依赖\n----\n### 运行环境\n- Python 3.11+\n\n### 外部服务\n- ICD/DRG 规则库 API：读取诊断编码审核规则。\n- 内部医疗大模型：`https://maas-api.hivoice.cn/v1/chat/completions`\n\n测试命令\n--------\n从 `skills` 根目录执行：\n\n```bash\npython3 self_tests/med-icd-drg-review/self_test_icd_drg_review.py\n```\n\n备注\n----\n- 规则库访问必须通过环境变量配置：`GUIDELINE_API_BASE`；如平台启用鉴权，可配置 `GUIDELINE_API_KEY`。\n- `scripts/run.py` 是唯一对外入口，复用 `scripts/diagnosis_review.py` 的核心审核逻辑。\n- LLM 鉴权 `appkey` 由用户在调用时传入，脚本不硬编码。\n- 发布目录只保留 `SKILL.md`、`_meta.json`、`scripts/`；示例输入、运行输出、自测脚本放在 skill 包外。\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7ft98qwhxyrgcy7b7rzdhrrd8366k6\",\n  \"slug\": \"unisound-diagnosis-review\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1779966773504\n}\n\nFile v1.0.1:skill-card.md\n\n## Description: <br>\nReviews diagnosis codes against ICD/DRG guideline rules and clinical-record evidence, returning pass, fail, or manual-review outcomes for provided diagnoses. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[unisound-llm](https://clawhub.ai/user/unisound-llm) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nClinical coding, claims, and hospital operations teams can use this skill to check whether candidate diagnosis codes are supported by structured case records and guideline rules. It is an audit aid and does not provide medical diagnosis or treatment advice. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive clinical record content may be sent to external LLM and guideline-service endpoints. <br>\nMitigation: Use only approved or allowlisted endpoints, require consent and redaction controls before off-system processing, and confirm organizational policy permits the data flow. <br>\nRisk: The skill requires sensitive credentials such as the model appkey and optional guideline API key. <br>\nMitigation: Manage credentials through approved secret-handling workflows, avoid exposing secrets in shell history or logs, and restrict access to the minimum required users and environments. <br>\nRisk: Prepared-text debug exports can create plaintext copies of clinical records. <br>\nMitigation: Do not use plaintext prepared exports with real patient data unless the content is redacted and stored under approved retention and access controls. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/unisound-diagnosis-review) <br>\n- [Publisher profile](https://clawhub.ai/user/unisound-llm) <br>\n- [External medical LLM API endpoint](https://maas-api.hivoice.cn/v1/chat/completions) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, JSON, Guidance] <br>\n**Output Format:** [JSON object with final_decision and reasoning fields] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [final_decision is one of \"通过\", \"不通过\", or \"待人工复核\"; reasoning is concise and user-facing.] <br>\n\n## Skill Version(s): <br>\n1.0.1 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.0: 5 files, 19097 bytes\n\nFiles: _meta.json (144b), scripts/diagnosis_review.py (36078b), scripts/run.py (9129b), skill-card.md (2701b), SKILL.md (8582b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: med-diagnosis-review\ndescription: 诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🩺\"\n      }\n  }\n---\n\n# 诊断编码审核\n\n概述\n----\n给定结构化病案 `record` 和待审核诊断列表，本技能从诊断编码审核规则库读取规则，核对病历文书证据，输出诊断编码审核结果。\n\n本技能会：\n- 从 `diagnosis_audit_guidelines` 读取诊断编码审核规则。\n- 优先按用户提供的 `diagnoses` 候选列表审核；未提供时，默认审核 `record.diagnosis.primaryDiagnosis` 和 `record.diagnosis.otherDiagnoses` 中的全部诊断。\n- 调用 skill 内置的 `review_diagnosis_record` function 完成审核。\n- 通过 `scripts/run.py` 提供统一 CLI 入口；不转发、不调用当前项目已有 API 服务，也不导入当前项目 `app.*` 模块。\n\n数据安全、隐私与伦理声明\n------------------------\n- **最小必要原则**：仅处理审核所需的病案文书、诊断编码和诊断名称。\n- **严格脱敏**：调用方应在传入前完成姓名、证件号、手机号、详细地址等可识别身份信息的脱敏。\n- **不做本地持久化**：本技能不把请求体、中间结果或审核结果写入本地文件或数据库。\n- **数据库用途**：数据库仅用于读取诊断编码审核规则库。\n- **模型调用说明**：默认使用内部医疗大模型生成审核说明；鉴权 `appkey` 必须由调用方传入。如需完全离线规则回退，可传 `use_llm=false`。\n- **医疗边界**：输出为医保编码审核辅助信息，不构成医疗诊断或治疗建议。\n\n输入格式\n--------\n统一入口支持 `pdf/doc/docx/xls/xlsx/csv/txt/json`。JSON 可为结构化病案；其他格式会先预处理为一份完整病历文书。未显式传入 `diagnoses` 时，会自动审核结构化病案中的主诊断和全部其他诊断；普通病历文件需要通过参数传入待审核诊断列表。\n\n```json\n{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001092574\",\n    \"docs\": [\n      {\n        \"docName\": \"出院记录\",\n        \"fileName\": \"出院记录\",\n        \"docClassName\": \"出院记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"diagnosis\": {\n      \"primaryDiagnosis\": {\"name\": \"2型糖尿病\", \"code\": \"E11.901\"},\n      \"otherDiagnoses\": []\n    }\n  },\n  \"diagnoses\": [\n    {\"role\": \"primary\", \"code\": \"E11.901\", \"name\": \"2型糖尿病\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}\n```\n\n字段说明：\n- `record`：**必填**。结构化病案 JSON。\n- `diagnoses`：可选。待审核诊断候选数组；每项包含 `role`、`code`、`name`。\n- `role`：`primary` 表示主诊断；其他值按其他诊断处理。\n- `appkey`：**必填**。内部医疗大模型鉴权 key，由平台分配；调用时使用 Bearer 鉴权。\n- `model`：可选。内部医疗大模型名称，默认 `u1-insuremed`。\n- `use_llm`：可选，默认 `true`。传 `false` 时不调用模型，仅使用本地回退审核逻辑。\n\n审核规则\n--------\n- **候选优先**：只审核输入候选或病案首页中已有诊断，不自由生成候选列表外的诊断名称或编码。\n- **医学内涵优先**：匹配依据以医学内涵、医保目录归类、编码规则和诊疗目的为准，不能只看字面相似。\n- **证据优先**：审核结论必须基于病历文书明确支持的信息；不能把病历中未明确支持的信息当作事实。\n- **角色边界**：主诊断优先核对本次住院主要诊疗原因；其他诊断核对是否有明确并存、影响诊疗或资源消耗的依据。\n- **父类/子类边界**：编码可按规则库从细到粗检索，但父类规则不能自动证明子类编码成立；细分部位、病因、并发症、分型不明确时应输出 `待人工复核`。\n- **同义词/简称边界**：仅当简称、同义词与候选诊断在医学内涵和编码归类上明确一致时可视为匹配。\n- **模糊保守**：字面相似但医学内涵不同、疑似/排除诊断、仅有既往史或家族史、缺少直接证据时，不强行通过。\n- **DRG/CC 边界**：涉及 DRG 分组或严重合并症/并发症、一般合并症/并发症、无合并症/并发症判断时，必须有病历明确支持；不能用模型常识自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --diagnosis 'primary|E11.901|2型糖尿病' \\\n  --diagnosis 'other|I10.x00|高血压' \\\n  --save-prepared\n```\n\n参数说明\n--------\n- `--input PATH`：**必填**。结构化病案 JSON，或包含 `record` 的请求体 JSON。\n- `--input-type auto|pdf|doc|docx|xls|xlsx|csv|txt|json`：输入类型，默认 `auto`。\n- `--sheet STRING`：读取 Excel 时指定 sheet（可选）。\n- `--encoding STRING`：`txt/csv` 编码，默认 `utf-8`。\n- `--diagnosis STRING`：待审核诊断，格式 `role|code|name` 或 `code|name`；可重复。\n- `--diagnoses-json STRING`：待审核诊断 JSON 字符串或文件路径。\n- 普通 `txt/pdf/doc/docx/xls/xlsx/csv` 文件不会自动知道待审核诊断，必须传 `--diagnosis` 或 `--diagnoses-json`。\n- `--appkey STRING`：**必填**。内部医疗大模型鉴权 key，由平台分配；调用时使用 Bearer 鉴权。\n- `--base URL`：内部大模型 base URL，默认 `https://maas-api.hivoice.cn/v1`。\n- `--model STRING`：模型名称，默认 `u1-insuremed`。\n- `--timeout SECONDS`：HTTP 超时秒数；`0` 表示一直等待，默认 `0`。\n- `--no-llm`：可选。禁用 LLM，仅使用本地回退逻辑。\n- `--output-json PATH`：可选。保存响应 JSON；同时传 `--output` 时优先使用该参数。\n- `--output PATH`：可选。兼容旧调用方式，等同于 `--output-json`。\n- `--save-prepared`：可选。保存预处理后的病历文本到 `doctor/icd-drg/runs/diagnosis-review/` 或输出文件所在目录；路径提示输出到 stderr。\n\n输出约定\n--------\nCLI 只输出 JSON，不输出 Markdown、序号或额外提示语。响应结构：\n\n```json\n{\n  \"final_decision\": \"通过\",\n  \"reasoning\": \"E11.901 2型糖尿病：通过。病历文书存在可支撑该诊断编码的明确依据。\"\n}\n```\n\n`final_decision` 只能为 `通过`、`不通过`、`待人工复核`。`reasoning` 只写面向用户的简洁依据，不展示内部 chain-of-thought。\n\n示例\n----\n- 正例：候选 `E11.901 2型糖尿病`，出院记录和检验记录明确记载 2 型糖尿病及相关诊疗依据，可输出 `通过`。\n- 正例：候选主诊断与规则库编码精确命中，入院记录、首次病程记录和出院记录均支持本次住院主要诊疗原因，可输出 `通过`。\n- 多项审核例：结构化病案包含 `primaryDiagnosis` 和多个 `otherDiagnoses` 时，未传 `--diagnosis` 也会审核主诊断和全部其他诊断；普通文件需用多个 `--diagnosis` 显式列出。\n- 边界例：候选为细分子类编码，但文书只支持父类诊断，未明确分型、部位或并发症，应输出 `待人工复核`。\n- 不应匹配例：候选名称与文书关键词字面相似，但医学内涵不同，或仅见“排除/疑似/既往史”，不得强行通过，应输出 `不通过` 或 `待人工复核`。\n\n依赖\n----\n### 运行环境\n- Python 3.11+\n- `psycopg[binary]` 或 `psycopg2`\n\n### 外部服务\n- PostgreSQL：读取 `diagnosis_audit_guidelines`\n- 内部医疗大模型：`https://maas-api.hivoice.cn/v1/chat/completions`\n\n测试命令\n--------\n从 `skills` 根目录执行：\n\n```bash\npython3 self_tests/med-icd-drg-review/self_test_icd_drg_review.py\n```\n\n备注\n----\n- 数据库连接配置硬编码在 `scripts/diagnosis_review.py` 的 `HARDCODED_DATABASE`。\n- `scripts/run.py` 是唯一对外入口，复用 `scripts/diagnosis_review.py` 的核心审核逻辑。\n- LLM 鉴权 `appkey` 由用户在调用时传入，脚本不硬编码。\n- 发布目录只保留 `SKILL.md`、`_meta.json`、`scripts/`；示例输入、运行输出、自测脚本放在 skill 包外。\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7ft98qwhxyrgcy7b7rzdhrrd8366k6\",\n  \"slug\": \"unisound-diagnosis-review\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1778834787444\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nAudits candidate diagnosis codes against structured medical-record evidence and diagnosis coding rules, returning rule matches, supporting evidence, and a review conclusion. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[unisound-llm](https://clawhub.ai/user/unisound-llm) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal developers and medical coding reviewers use this skill to review submitted diagnosis codes against structured records, coding rules, and documented clinical evidence. The output is auxiliary coding-audit guidance and is not medical diagnosis or treatment advice. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive medical-record text may be sent to network services when model-backed review is enabled. <br>\nMitigation: Run only in an environment approved for medical-record processing, de-identify records before use, and prefer the offline rule fallback unless the model endpoint is approved for the data. <br>\nRisk: Credentials and patient text may be exposed if an unapproved model endpoint is configured. <br>\nMitigation: Use only approved endpoints, avoid custom base URLs unless reviewed, and handle appkey values through approved secret-management procedures. <br>\nRisk: Prepared text or JSON outputs can persist patient-record content when save or output options are used. <br>\nMitigation: Do not save prepared text or output files unless local storage of patient content is permitted and access controls are in place. <br>\nRisk: Database connectivity settings require deployment review before use. <br>\nMitigation: Review or replace database settings during deployment and restrict database access to the minimum required rule tables. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/unisound-diagnosis-review) <br>\n- [HiVoice medical LLM API base](https://maas-api.hivoice.cn/v1) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [JSON, Analysis, Guidance] <br>\n**Output Format:** [JSON object with final_decision and reasoning fields] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [final_decision is one of 通过, 不通过, or 待人工复核; reasoning is concise and excludes chain-of-thought.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>","readmeExcerpt":"Skill: unisound-diagnosis-review Owner: unisound-llm Summary: 诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T02:35:20.808Z | user - Removed the file skill-card.md. - Updated the default model name from u1-insuremed to u2-med in documentation and CLI parameter descriptions. - No functional changes to code or CLI behavior; change is documentation-only. - Ski","codeSnippets":[],"executableExamples":[{"language":"json","snippet":"{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001092574\",\n    \"docs\": [\n      {\n        \"docName\": \"出院记录\",\n        \"fileName\": \"出院记录\",\n        \"docClassName\": \"出院记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"diagnosis\": {\n      \"primaryDiagnosis\": {\"name\": \"2型糖尿病\", \"code\": \"E11.901\"},\n      \"otherDiagnoses\": []\n    }\n  },\n  \"diagnoses\": [\n    {\"role\": \"primary\", \"code\": \"E11.901\", \"name\": \"2型糖尿病\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}"},{"language":"bash","snippet":"# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --diagnosis 'primary|E11.901|2型糖尿病' \\\n  --diagnosis 'other|I10.x00|高血压' \\\n  --save-prepared"},{"language":"json","snippet":"{\n  \"final_decision\": \"通过\",\n  \"reasoning\": \"E11.901 2型糖尿病：通过。病历文书存在可支撑该诊断编码的明确依据。\"\n}"},{"language":"bash","snippet":"python3 self_tests/med-icd-drg-review/self_test_icd_drg_review.py"},{"language":"json","snippet":"{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001092574\",\n    \"docs\": [\n      {\n        \"docName\": \"出院记录\",\n        \"fileName\": \"出院记录\",\n        \"docClassName\": \"出院记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"diagnosis\": {\n      \"primaryDiagnosis\": {\"name\": \"2型糖尿病\", \"code\": \"E11.901\"},\n      \"otherDiagnoses\": []\n    }\n  },\n  \"diagnoses\": [\n    {\"role\": \"primary\", \"code\": \"E11.901\", \"name\": \"2型糖尿病\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}"},{"language":"bash","snippet":"# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --diagnosis 'primary|E11.901|2型糖尿病' \\\n  --diagnosis 'other|I10.x00|高血压' \\\n  --save-prepared"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: med-diagnosis-review\ndescription: 诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🩺\"\n      }\n  }\n---\n\n# 诊断编码审核\n\n概述\n----\n给定结构化病案 `record` 和待审核诊断列表，本技能从诊断编码审核规则库读取规则，核对病历文书证据，输出诊断编码审核结果。\n\n本技能会：\n- 从 `diagnosis_audit_guidelines` 读取诊断编码审核规则。\n- 优先按用户提供的 `diagnoses` 候选列表审核；未提供时，默认审核 `record.diagnosis.primaryDiagnosis` 和 `record.diagnosis.otherDiagnoses` 中的全部诊断。\n- 调用 skill 内置的 `review_diagnosis_record` function 完成审核。\n- 通过 `scripts/run.py` 提供统一 CLI 入口；不转发、不调用当前项目已有 API 服务，也不导入当前项目 `app.*` 模块。\n\n数据安全、隐私与伦理声明\n------------------------\n- **最小必要原则**：仅处理审核所需的病案文书、诊断编码和诊断名称。\n- **严格脱敏**：调用方应在传入前完成姓名、证件号、手机号、详细地址等可识别身份信息的脱敏。\n- **不做本地持久化**：本技能不把请求体、中间结果或审核结果写入本地文件或数据库。\n- **规则库服务用途**：规则库 API 仅用于读取诊断编码审核规则。\n- **模型调用说明**：默认使用内部医疗大模型生成审核说明；鉴权 `appkey` 必须由调用方传入。如需完全离线规则回退，可传 `use_llm=false`。\n- **医疗边界**：输出为医保编码审核辅助信息，不构成医疗诊断或治疗建议。\n\n输入格式\n--------\n统一入口支持 `pdf/doc/docx/xls/xlsx/csv/txt/json`。JSON 可为结构化病案；其他格式会先预处理为一份完整病历文书。未显式传入 `diagnoses` 时，会自动审核结构化病案中的主诊断和全部其他诊断；普通病历文件需要通过参数传入待审核诊断列表。\n\n```json\n{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001092574\",\n    \"docs\": [\n      {\n        \"docName\": \"出院记录\",\n        \"fileName\": \"出院记录\",\n        \"docClassName\": \"出院记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"diagnosis\": {\n      \"primaryDiagnosis\": {\"name\": \"2型糖尿病\", \"code\": \"E11.901\"},\n      \"otherDiagnoses\": []\n    }\n  },\n  \"diagnoses\": [\n    {\"role\": \"primary\", \"code\": \"E11.901\", \"name\": \"2型糖尿病\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}\n```\n\n字段说明：\n- `record`：**必填**。结构化病案 JSON。\n- `diagnoses`：可选。待审核诊断候选数组；每项包含 `role`、`code`、`name`。\n- `role`：`primary` 表示主诊断；其他值按其他诊断处理。\n- `appkey`：**必填**。内部医疗大模型鉴权 key，由平台分配；调用时使用 Bearer 鉴权。\n- `model`：可选。内部医疗大模型名称，默认 `u2-med`。\n- `use_llm`：可选，默认 `true`。传 `false` 时不调用模型，仅使用本地回退审核逻辑。\n\n审核规则\n--------\n- **候选优先**：只审核输入候选或病案首页中已有诊断，不自由生成候选列表外的诊断名称或编码。\n- **医学内涵优先**：匹配依据以医学内涵、医保目录归类、编码规则和诊疗目的为准，不能只看字面相似。\n- **证据优先**：审核结论必须基于病历文书明确支持的信息；不能把病历中未明确支持的信息当作事实。\n- **角色边界**：主诊断优先核对本次住院主要诊疗原因；其他诊断核对是否有明确并存、影响诊疗或资源消耗的依据。\n- **父类/子类边界**：编码可按规则库从细到粗检索，但父类规则不能自动证明子类编码成立；细分部位、病因、并发症、分型不明确时应输出 `待人工复核`。\n- **同义词/简称边界**：仅当简称、同义词与候选诊断在医学内涵和编码归类上明确一致时可视为匹配。\n- **模糊保守**：字面相似但医学内涵不同、疑似/排除诊断、仅有既往史或家族史、缺少直接证据时，不强行通过。\n- **DRG/CC 边界**：涉及 DRG 分组或严重合并症/并发症、一般合并症/并发症、无合并症/并发症判断时，必须有病历明确支持；不能用模型常识自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --diagnosis 'primary|E11.901|2型糖尿病' \\\n  --diagnosis 'other|I10.x00|高血压' \\\n  --save-prepared\n```\n\n参数说明\n--------\n- `--input PATH`：**必填**。结构化病案 JSON，或包含 `record` 的请求体 JSON。\n- `--input-type auto|pdf|doc|docx|xls|xlsx|csv|txt|json`：输入类型，默认 `auto`。\n- `--sheet STRING`：读取 Excel 时指定 sheet（可选）。\n- `--encoding STR"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7ft98qwhxyrgcy7b7rzdhrrd8366k6\",\n  \"slug\": \"unisound-diagnosis-review\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1784169320808\n}"},{"path":"skill-card.md","content":"## Description:\n\nReviews structured medical records and candidate diagnoses to report diagnosis-coding rule matches, supporting record evidence, and an audit conclusion.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[unisound-llm](https://clawhub.ai/user/unisound-llm)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nHealthcare coding reviewers and developers use this skill to audit supplied diagnosis codes against medical-record evidence and diagnosis audit rules. Its output is coding-audit assistance and not medical diagnosis or treatment advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive medical-record content and bearer credentials can be sent to an LLM endpoint.\n\nMitigation: Use only approved healthcare endpoints and keep LLM use disabled unless that endpoint and data flow are authorized.\n\nRisk: Untrusted callers can select the LLM base URL.\n\nMitigation: Do not allow untrusted callers to set --base or payload.base; restrict execution to approved endpoint configuration.\n\nRisk: Prepared record text can be persisted when requested.\n\nMitigation: Avoid --save-prepared for PHI and pass only authorized, de-identified patient data.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/skills/unisound-diagnosis-review)\n\n## Skill Output:\n\n**Output Type(s):** [text, JSON, guidance]\n\n**Output Format:** [JSON object with final_decision and reasoning fields]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [final_decision is one of: 通过, 不通过, 待人工复核.]\n\n## Skill Version(s):\n\n1.0.2 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。 Skill: unisound-diagnosis-review Owner: unisound-llm Summary: 诊断编码审核。输入结构化病案 record 与待审核诊断列表，输出诊断编码规则命中、病历证据和审核结论。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T02:35:20.808Z | user - Removed the file skill-card.md. - Updated the default model name from u1-insuremed to u2-med in documentation and CLI parameter descriptions. - No functional changes to code or CLI behavior; change is documentation-only. - Ski","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":880,"uniquenessScore":55,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T23:30:04.302Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T23:30:04.302Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-14T20:41:53.935Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}