{"id":"1e303ab0-3f8a-4545-9be5-0b8b4582a93b","entityType":"agent","slug":"clawhub-unisound-llm-unisound-diagnosis-sufficiency-review","name":"unisound-diagnosis-sufficiency-review","canonicalUrl":"https://www.xpersona.co/agent/clawhub-unisound-llm-unisound-diagnosis-sufficiency-review","canonicalPath":"/agent/clawhub-unisound-llm-unisound-diagnosis-sufficiency-review","generatedAt":"2026-10-14T16:36:07.525Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T20:51:39.146Z","emptyReason":null},"description":"诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。 Skill: unisound-diagnosis-sufficiency-review Owner: unisound-llm Summary: 诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T02:35:55.572Z | user - 默认大模型名称由 u1-insuremed 更新为 u2-med。 - 移除 skill-card.md 介绍文件，不影响主要功能与使用说明。 - 其他功能和审核规则未发生变化。 v1.0.1 | 2026-05-28T11:14:04.293Z | user - Removed the file skill-card.md from the skill package. - Updated SKILL.md to reflect","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 994 downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s1770nyybxj4gn0vk38n6wr6k584x8ea:unisound-diagnosis-sufficiency-review","sourceUrl":"https://clawhub.ai/unisound-llm/unisound-diagnosis-sufficiency-review","homepage":"https://clawhub.ai/unisound-llm/skills/unisound-diagnosis-sufficiency-review","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/unisound-llm/unisound-diagnosis-sufficiency-review","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/unisound-llm/skills/unisound-diagnosis-sufficiency-review","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。 Skill: unisound-diagnosis-sufficiency-review Owner: unisound-llm Summary: 诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T20:51:39.146Z","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-11T20:51:39.146Z","emptyReason":null},"stars":null,"forks":null,"downloads":994,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.2","tractionLabel":"994 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T20:51:39.134Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T20:51:39.146Z","lastCrawledAt":"2026-10-11T20:51:39.134Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T20:51:39.134Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.2","createdAt":"2026-07-16T02:35:55.572Z","changelog":"- 默认大模型名称由 `u1-insuremed` 更新为 `u2-med`。 - 移除 skill-card.md 介绍文件，不影响主要功能与使用说明。 - 其他功能和审核规则未发生变化。","fileCount":5,"zipByteSize":17646},{"version":"1.0.1","createdAt":"2026-05-28T11:14:04.293Z","changelog":"- Removed the file skill-card.md from the skill package. - Updated SKILL.md to reflect that the \"诊断依据充分性规则库\" is now accessed via an API, not a direct database connection. - Clarified in SKILL.md: rules/guideline data are obtained through API endpoints, configured via environment variables (`GUIDELINE_API_BASE`), with optional API key (`GUIDELINE_API_KEY`). - Adjusted external service dependencies: removed explicit PostgreSQL requirement; switched rule retrieval to an \"ICD/DRG 规则库 API\". - Dropped Python psycopg/psycopg2 requirement from runtime dependencies. - Updated data security section and remarks to match the new API-based rule source and configuration method.","fileCount":5,"zipByteSize":17746},{"version":"1.0.0","createdAt":"2026-05-15T08:45:54.812Z","changelog":"- Initial release of the med-diagnosis-sufficiency-review skill for structured medical record diagnosis sufficiency audits. - Accepts structured medical records and candidate diagnosis lists, checking sufficiency of evidence based on configurable guidelines. - Supports both model-based and rule-based sufficiency review; allows LLM usage to be toggled. - Ensures data privacy: requires de-identified input, no local persistence, uses database only for rule access. - Provides a unified CLI (`scripts/run.py`) supporting multiple input formats (json, pdf, docx, xls, etc.). - Outputs clear and concise sufficiency verdicts for each diagnosis candidate.","fileCount":5,"zipByteSize":17705}]},"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-sufficiency-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-sufficiency-review/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-sufficiency-review/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-sufficiency-review/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-sufficiency-review/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-sufficiency-review/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-sufficiency-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-14T16:36:07.525Z"}},"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-sufficiency-review/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-sufficiency-review/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-sufficiency-review/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-diagnosis-sufficiency-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-11T20:51:39.146Z","emptyReason":null},"readme":"Skill: unisound-diagnosis-sufficiency-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:55.572Z | user\n\n- 默认大模型名称由 `u1-insuremed` 更新为 `u2-med`。\n- 移除 skill-card.md 介绍文件，不影响主要功能与使用说明。\n- 其他功能和审核规则未发生变化。\n\nv1.0.1 | 2026-05-28T11:14:04.293Z | user\n\n- Removed the file skill-card.md from the skill package.\n- Updated SKILL.md to reflect that the \"诊断依据充分性规则库\" is now accessed via an API, not a direct database connection.\n- Clarified in SKILL.md: rules/guideline data are obtained through API endpoints, configured via environment variables (`GUIDELINE_API_BASE`), with optional API key (`GUIDELINE_API_KEY`).\n- Adjusted external service dependencies: removed explicit PostgreSQL requirement; switched rule retrieval to an \"ICD/DRG 规则库 API\".\n- Dropped Python psycopg/psycopg2 requirement from runtime dependencies.\n- Updated data security section and remarks to match the new API-based rule source and configuration method.\n\nv1.0.0 | 2026-05-15T08:45:54.812Z | user\n\n- Initial release of the med-diagnosis-sufficiency-review skill for structured medical record diagnosis sufficiency audits.\n- Accepts structured medical records and candidate diagnosis lists, checking sufficiency of evidence based on configurable guidelines.\n- Supports both model-based and rule-based sufficiency review; allows LLM usage to be toggled.\n- Ensures data privacy: requires de-identified input, no local persistence, uses database only for rule access.\n- Provides a unified CLI (`scripts/run.py`) supporting multiple input formats (json, pdf, docx, xls, etc.).\n- Outputs clear and concise sufficiency verdicts for each diagnosis candidate.\n\nArchive index:\n\nArchive v1.0.2: 5 files, 17646 bytes\n\nFiles: _meta.json (156b), scripts/diagnosis_sufficiency_review.py (30041b), scripts/run.py (9186b), skill-card.md (2338b), SKILL.md (8885b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: med-diagnosis-sufficiency-review\ndescription: 诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🩺\"\n      }\n  }\n---\n\n# 诊断依据充分性审核\n\n概述\n----\n给定结构化病案 `record` 和待审核诊断列表，本技能从诊断依据充分性规则库读取指南，核对病历文书证据，输出诊断依据是否充分。\n\n本技能会：\n- 从 `diagnosis_sufficiency_guidelines` 读取诊断依据充分性审核指南。\n- 按诊断 `role` 区分主诊断和其他诊断，分别匹配指南适用范围。\n- 优先按用户提供的 `diagnoses` 候选列表审核；未提供时，默认审核 `record.diagnosis.primaryDiagnosis` 和 `record.diagnosis.otherDiagnoses` 中的全部诊断。\n- 调用 skill 内置的 `review_diagnosis_sufficiency_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 边界**：严重合并症或并发症、一般合并症或并发症、无合并症或并发症的边界必须由病历明确支持；不能用模型常识或编码父类自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-sufficiency-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-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-sufficiency-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型糖尿病`，病程记录、检验结果和治疗经过均支持本次住院围绕糖尿病诊疗，可输出 `依据充分`。\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_sufficiency_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-sufficiency-review\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1784169355572\n}\n\nFile v1.0.2:skill-card.md\n\n## Description:\n\n诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。\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\nDevelopers and healthcare operations teams use this skill to review whether structured medical-record evidence sufficiently supports listed primary and other diagnoses for ICD/DRG audit workflows. It returns concise auxiliary review results and is 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 excerpts may be sent to guideline and model services.\n\nMitigation: Use only de-identified inputs, restrict outbound network access to approved endpoints, and prefer offline review with --no-llm when external transmission is not appropriate.\n\nRisk: Bearer credentials may be sent to configurable network endpoints.\n\nMitigation: Provide credentials through managed secret handling and avoid arbitrary --base values unless the endpoint is approved.\n\nRisk: Record-derived data can be written to disk when prepared-text or output-file options are used.\n\nMitigation: Avoid --save-prepared and output-file options unless the destination is access-controlled and retention is managed.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/skills/unisound-diagnosis-sufficiency-review)\n- [Publisher profile](https://clawhub.ai/user/unisound-llm)\n- [Internal medical LLM API endpoint](https://maas-api.hivoice.cn/v1/chat/completions)\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 依据充分, 依据不充分, or 待人工复核; reasoning is concise and does not expose chain-of-thought.]\n\n## Skill Version(s):\n\n1.0.2 (source: evidence.release.version)\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, 17746 bytes\n\nFiles: _meta.json (156b), scripts/diagnosis_sufficiency_review.py (30047b), scripts/run.py (9186b), skill-card.md (2706b), SKILL.md (8897b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: med-diagnosis-sufficiency-review\ndescription: 诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🩺\"\n      }\n  }\n---\n\n# 诊断依据充分性审核\n\n概述\n----\n给定结构化病案 `record` 和待审核诊断列表，本技能从诊断依据充分性规则库读取指南，核对病历文书证据，输出诊断依据是否充分。\n\n本技能会：\n- 从 `diagnosis_sufficiency_guidelines` 读取诊断依据充分性审核指南。\n- 按诊断 `role` 区分主诊断和其他诊断，分别匹配指南适用范围。\n- 优先按用户提供的 `diagnoses` 候选列表审核；未提供时，默认审核 `record.diagnosis.primaryDiagnosis` 和 `record.diagnosis.otherDiagnoses` 中的全部诊断。\n- 调用 skill 内置的 `review_diagnosis_sufficiency_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 边界**：严重合并症或并发症、一般合并症或并发症、无合并症或并发症的边界必须由病历明确支持；不能用模型常识或编码父类自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-sufficiency-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-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-sufficiency-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型糖尿病`，病程记录、检验结果和治疗经过均支持本次住院围绕糖尿病诊疗，可输出 `依据充分`。\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_sufficiency_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-sufficiency-review\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1779966844293\n}\n\nFile v1.0.1:skill-card.md\n\n## Description: <br>\n诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。 <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>\nMedical coding, reimbursement audit, and hospital record review workflows use this skill to check whether candidate diagnoses are sufficiently supported by structured case records and ICD/DRG guideline evidence. The output 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 medical record text can be sent to configurable remote services. <br>\nMitigation: Run only in an approved medical-record processing environment, de-identify records before use, restrict the LLM base URL and guideline API endpoint, and enable LLM calls only for contractually approved endpoints. <br>\nRisk: Prepared case text or JSON review output can be written locally when optional output flags are used. <br>\nMitigation: Avoid --save-prepared and output file options on shared, synced, or backed-up storage, and apply local retention controls when file output is required. <br>\nRisk: The skill's review is an audit aid and may be incomplete when guidelines or record evidence are missing. <br>\nMitigation: Route 待人工复核, missing-guideline cases, and high-impact decisions to qualified human review before operational use. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/unisound-diagnosis-sufficiency-review) <br>\n- [ClawHub publisher profile](https://clawhub.ai/user/unisound-llm) <br>\n- [Configured medical LLM endpoint](https://maas-api.hivoice.cn/v1/chat/completions) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [json, text, 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:** [The final decision is one of 依据充分, 依据不充分, or 待人工复核; optional file outputs are created only when the caller supplies output paths or save-prepared options.] <br>\n\n## Skill Version(s): <br>\n1.0.1 (source: server release evidence; artifact _meta.json reports package metadata 1.0.0) <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, 17705 bytes\n\nFiles: _meta.json (156b), scripts/diagnosis_sufficiency_review.py (30034b), scripts/run.py (9186b), skill-card.md (2371b), SKILL.md (8882b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: med-diagnosis-sufficiency-review\ndescription: 诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🩺\"\n      }\n  }\n---\n\n# 诊断依据充分性审核\n\n概述\n----\n给定结构化病案 `record` 和待审核诊断列表，本技能从诊断依据充分性规则库读取指南，核对病历文书证据，输出诊断依据是否充分。\n\n本技能会：\n- 从 `diagnosis_sufficiency_guidelines` 读取诊断依据充分性审核指南。\n- 按诊断 `role` 区分主诊断和其他诊断，分别匹配指南适用范围。\n- 优先按用户提供的 `diagnoses` 候选列表审核；未提供时，默认审核 `record.diagnosis.primaryDiagnosis` 和 `record.diagnosis.otherDiagnoses` 中的全部诊断。\n- 调用 skill 内置的 `review_diagnosis_sufficiency_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 边界**：严重合并症或并发症、一般合并症或并发症、无合并症或并发症的边界必须由病历明确支持；不能用模型常识或编码父类自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-sufficiency-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-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-sufficiency-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型糖尿病`，病程记录、检验结果和治疗经过均支持本次住院围绕糖尿病诊疗，可输出 `依据充分`。\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_sufficiency_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_sufficiency_review.py` 的 `HARDCODED_DATABASE`。\n- `scripts/run.py` 是唯一对外入口，复用 `scripts/diagnosis_sufficiency_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-sufficiency-review\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1778834754812\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nReviews whether structured medical records provide sufficient evidence for candidate diagnoses and returns a diagnosis sufficiency result. <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, reimbursement, and medical-record review teams use this skill to check whether the record evidence supports candidate primary and other diagnoses. It is intended as audit support 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 medical-record data may be processed by the skill. <br>\nMitigation: Run it only in an environment approved for medical-record processing and provide de-identified inputs. <br>\nRisk: The skill uses a hardcoded PostgreSQL connection configuration. <br>\nMitigation: Replace database settings with a least-privilege secret before use. <br>\nRisk: Default LLM mode may send case content to a remote model endpoint. <br>\nMitigation: Disable LLM mode or restrict the base URL to an endpoint approved for patient data. <br>\nRisk: Non-JSON medical-record inputs rely on an external shared preprocessor. <br>\nMitigation: Review and approve the preprocessor in the deployment environment before processing records. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/unisound-diagnosis-sufficiency-review) <br>\n- [Unisound-LLM publisher profile](https://clawhub.ai/user/unisound-llm) <br>\n- [Hivoice MaaS API base](https://maas-api.hivoice.cn/v1) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [analysis, json, guidance] <br>\n**Output Format:** [JSON with final_decision and reasoning fields] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [final_decision is one of: 依据充分, 依据不充分, 待人工复核.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: release evidence and artifact 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-sufficiency-review Owner: unisound-llm Summary: 诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T02:35:55.572Z | user - 默认大模型名称由 u1-insuremed 更新为 u2-med。 - 移除 skill-card.md 介绍文件，不影响主要功能与使用说明。 - 其他功能和审核规则未发生变化。 v1.0.1 | 2026-05-28T11:14:04.293Z | user - Removed the file skill-card.md from the skill package. - Updated SKILL.md to reflect ","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-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-sufficiency-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-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-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-sufficiency-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-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-sufficiency-review\ndescription: 诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🩺\"\n      }\n  }\n---\n\n# 诊断依据充分性审核\n\n概述\n----\n给定结构化病案 `record` 和待审核诊断列表，本技能从诊断依据充分性规则库读取指南，核对病历文书证据，输出诊断依据是否充分。\n\n本技能会：\n- 从 `diagnosis_sufficiency_guidelines` 读取诊断依据充分性审核指南。\n- 按诊断 `role` 区分主诊断和其他诊断，分别匹配指南适用范围。\n- 优先按用户提供的 `diagnoses` 候选列表审核；未提供时，默认审核 `record.diagnosis.primaryDiagnosis` 和 `record.diagnosis.otherDiagnoses` 中的全部诊断。\n- 调用 skill 内置的 `review_diagnosis_sufficiency_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 边界**：严重合并症或并发症、一般合并症或并发症、无合并症或并发症的边界必须由病历明确支持；不能用模型常识或编码父类自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主诊断和全部其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/diagnosis-sufficiency-review/example/10109_A5204171_1.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核诊断，可重复传入主诊断和其他诊断\npython3 doctor/icd-drg/diagnosis-sufficiency-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，或包含"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7ft98qwhxyrgcy7b7rzdhrrd8366k6\",\n  \"slug\": \"unisound-diagnosis-sufficiency-review\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1784169355572\n}"},{"path":"skill-card.md","content":"## Description:\n\n诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。\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\nDevelopers and healthcare operations teams use this skill to review whether structured medical-record evidence sufficiently supports listed primary and other diagnoses for ICD/DRG audit workflows. It returns concise auxiliary review results and is 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 excerpts may be sent to guideline and model services.\n\nMitigation: Use only de-identified inputs, restrict outbound network access to approved endpoints, and prefer offline review with --no-llm when external transmission is not appropriate.\n\nRisk: Bearer credentials may be sent to configurable network endpoints.\n\nMitigation: Provide credentials through managed secret handling and avoid arbitrary --base values unless the endpoint is approved.\n\nRisk: Record-derived data can be written to disk when prepared-text or output-file options are used.\n\nMitigation: Avoid --save-prepared and output-file options unless the destination is access-controlled and retention is managed.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/skills/unisound-diagnosis-sufficiency-review)\n- [Publisher profile](https://clawhub.ai/user/unisound-llm)\n- [Internal medical LLM API endpoint](https://maas-api.hivoice.cn/v1/chat/completions)\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 依据充分, 依据不充分, or 待人工复核; reasoning is concise and does not expose chain-of-thought.]\n\n## Skill Version(s):\n\n1.0.2 (source: evidence.release.version)\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-sufficiency-review Owner: unisound-llm Summary: 诊断依据充分性审核。输入结构化病案 record 与待审核诊断列表，输出诊断依据充分性审核结果。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T02:35:55.572Z | user - 默认大模型名称由 u1-insuremed 更新为 u2-med。 - 移除 skill-card.md 介绍文件，不影响主要功能与使用说明。 - 其他功能和审核规则未发生变化。 v1.0.1 | 2026-05-28T11:14:04.293Z | user - Removed the file skill-card.md from the skill package. - Updated SKILL.md to reflect","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":915,"uniquenessScore":55,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T20:51:39.146Z","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-11T20:51:39.146Z","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-14T16:36:07.525Z","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"}]}}}