{"id":"7bfeb5c5-aeb1-4839-8fae-672c484d8463","entityType":"agent","slug":"clawhub-unisound-llm-unisound-surgery-sufficiency-review","name":"unisound-surgery-sufficiency-review","canonicalUrl":"https://www.xpersona.co/agent/clawhub-unisound-llm-unisound-surgery-sufficiency-review","canonicalPath":"/agent/clawhub-unisound-llm-unisound-surgery-sufficiency-review","generatedAt":"2026-10-14T22:27:37.562Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-12T01:29:14.353Z","emptyReason":null},"description":"手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。 Skill: unisound-surgery-sufficiency-review Owner: unisound-llm Summary: 手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T06:05:17.619Z | user - Removed redundant file skill-card.md to streamline project files. - Updated default medical model name from u1-insuremed to u2-med in documentation and CLI parameters. - No functional logic changes; only documentatio","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 961 downloads reported by the source. Last updated 10/12/2026.","installCommand":"clawhub skill install s1770nyybxj4gn0vk38n6wr6k584x8ea:unisound-surgery-sufficiency-review","sourceUrl":"https://clawhub.ai/unisound-llm/unisound-surgery-sufficiency-review","homepage":"https://clawhub.ai/unisound-llm/skills/unisound-surgery-sufficiency-review","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/unisound-llm/unisound-surgery-sufficiency-review","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/unisound-llm/skills/unisound-surgery-sufficiency-review","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。 Skill: unisound-surgery-sufficiency-review Owner: unisound-llm Summary: 手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-12T01:29:14.353Z","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-12T01:29:14.353Z","emptyReason":null},"stars":null,"forks":null,"downloads":961,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.2","tractionLabel":"961 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-12T01:29:14.279Z","emptyReason":null},"lastUpdatedAt":"2026-10-12T01:29:14.353Z","lastCrawledAt":"2026-10-12T01:29:14.279Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-13T01:29:14.279Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.2","createdAt":"2026-07-16T06:05:17.619Z","changelog":"- Removed redundant file skill-card.md to streamline project files. - Updated default medical model name from u1-insuremed to u2-med in documentation and CLI parameters. - No functional logic changes; only documentation and packaging were affected in this version.","fileCount":5,"zipByteSize":17703},{"version":"1.0.1","createdAt":"2026-05-28T11:14:28.070Z","changelog":"- Removed the file: `skill-card.md`. - Updated data安全说明，新增规则库访问改为 API 服务，数据库相关描述删除。 - 审核前提中的“数据库”相关表述改为“规则库 API”并补充环境变量配置说明。 - 依赖环境不再要求 psycopg。运行环境只需 Python 3.11+。 - 明确只能通过环境变量如 `GUIDELINE_API_BASE` 指定规则库地址。 - 文档描述保持审核逻辑和调用方式不变，细节对齐为“API+环境变量”新方案。","fileCount":5,"zipByteSize":17812},{"version":"1.0.0","createdAt":"2026-05-15T08:44:09.215Z","changelog":"Initial release of Surgery/Procedure Sufficiency Review skill. - Supports sufficiency review of surgical/procedural evidence based on structured medical records and candidate surgeries. - Reads review guidelines from the surgery_sufficiency_guidelines rule base, distinguishing between primary and other surgeries for tailored guideline matching. - Offers CLI (`scripts/run.py`) for unified entry: supports JSON (structured records) as well as PDF/DOC/XLS/CSV/TXT, with automatic or manual surgery candidate selection. - Enforces data privacy: only minimal necessary data processed, strict de-identification required, no local results persistence. - Relies on internal medical LLM for sufficiency judgment (with `appkey` required); fully offline rule-based fallback available via `--no-llm`. - Provides decision outputs as JSON: `final_decision` (`依据充分`, `依据不充分`, `待人工复核`) with user-facing concise reasoning. - Includes clear boundaries for sufficiency, candidate selection, DRG, and documentation requirements.","fileCount":5,"zipByteSize":17969}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s1770nyybxj4gn0vk38n6wr6k584x8ea:unisound-surgery-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-surgery-sufficiency-review/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-sufficiency-review/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-sufficiency-review/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-sufficiency-review/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-sufficiency-review/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-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-14T22:27:37.561Z"}},"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-surgery-sufficiency-review/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-sufficiency-review/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-sufficiency-review/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-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-12T01:29:14.353Z","emptyReason":null},"readme":"Skill: unisound-surgery-sufficiency-review\n\nOwner: unisound-llm\n\nSummary: 手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。\n\nTags: latest:1.0.2\n\nVersion history:\n\nv1.0.2 | 2026-07-16T06:05:17.619Z | user\n\n- Removed redundant file skill-card.md to streamline project files.\n- Updated default medical model name from u1-insuremed to u2-med in documentation and CLI parameters.\n- No functional logic changes; only documentation and packaging were affected in this version.\n\nv1.0.1 | 2026-05-28T11:14:28.070Z | user\n\n- Removed the file: `skill-card.md`.\n- Updated data安全说明，新增规则库访问改为 API 服务，数据库相关描述删除。\n- 审核前提中的“数据库”相关表述改为“规则库 API”并补充环境变量配置说明。\n- 依赖环境不再要求 psycopg。运行环境只需 Python 3.11+。\n- 明确只能通过环境变量如 `GUIDELINE_API_BASE` 指定规则库地址。\n- 文档描述保持审核逻辑和调用方式不变，细节对齐为“API+环境变量”新方案。\n\nv1.0.0 | 2026-05-15T08:44:09.215Z | user\n\nInitial release of Surgery/Procedure Sufficiency Review skill.\n\n- Supports sufficiency review of surgical/procedural evidence based on structured medical records and candidate surgeries.\n- Reads review guidelines from the surgery_sufficiency_guidelines rule base, distinguishing between primary and other surgeries for tailored guideline matching.\n- Offers CLI (`scripts/run.py`) for unified entry: supports JSON (structured records) as well as PDF/DOC/XLS/CSV/TXT, with automatic or manual surgery candidate selection.\n- Enforces data privacy: only minimal necessary data processed, strict de-identification required, no local results persistence.\n- Relies on internal medical LLM for sufficiency judgment (with `appkey` required); fully offline rule-based fallback available via `--no-llm`.\n- Provides decision outputs as JSON: `final_decision` (`依据充分`, `依据不充分`, `待人工复核`) with user-facing concise reasoning.\n- Includes clear boundaries for sufficiency, candidate selection, DRG, and documentation requirements.\n\nArchive index:\n\nArchive v1.0.2: 5 files, 17703 bytes\n\nFiles: _meta.json (154b), scripts/run.py (9195b), scripts/surgery_sufficiency_review.py (30513b), skill-card.md (2161b), SKILL.md (9210b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: med-surgery-sufficiency-review\ndescription: 手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🏥\"\n      }\n  }\n---\n\n# 手术/操作依据充分性审核\n\n概述\n----\n给定结构化病案 `record` 和待审核手术/操作列表，本技能从手术/操作依据充分性规则库读取指南，核对病历文书证据，输出手术/操作依据是否充分。\n\n本技能会：\n- 从 `surgery_sufficiency_guidelines` 读取手术/操作依据充分性审核指南。\n- 按手术/操作 `role` 区分主要手术和其他手术，分别匹配指南适用范围。\n- 优先按用户提供的 `surgeries` 候选列表审核；未提供时，默认审核 `record.surgery.primarySurgery` 和 `record.surgery.otherSurgeries` 中的全部手术/操作。\n- 调用 skill 内置的 `review_surgery_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 可为结构化病案；其他格式会先预处理为一份完整病历文书。未显式传入 `surgeries` 时，会自动审核结构化病案中的主手术/操作和全部其他手术/操作；普通病历文件需要通过参数传入待审核手术/操作列表。\n\n```json\n{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001861856\",\n    \"docs\": [\n      {\n        \"docName\": \"手术记录\",\n        \"fileName\": \"手术记录\",\n        \"docClassName\": \"手术记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"surgery\": {\n      \"primarySurgery\": {\"name\": \"阑尾切除术\", \"code\": \"47.0101\"},\n      \"otherSurgeries\": []\n    }\n  },\n  \"surgeries\": [\n    {\"role\": \"primary\", \"code\": \"47.0101\", \"name\": \"阑尾切除术\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}\n```\n\n字段说明：\n- `record`：**必填**。结构化病案 JSON。\n- `surgeries`：可选。待审核手术/操作候选数组；每项包含 `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- **主要手术边界**：主要手术/操作应与本次住院主要治疗目的、资源消耗或 DRG 分组核心操作一致；仅有附带操作或低资源操作时不能自动作为主要手术。\n- **其他手术边界**：其他手术/操作应有明确实施记录、部位、术式或服务内容；仅医嘱、计划、术前讨论或取消操作不构成充分依据。\n- **父类/子类边界**：父类术式证据不能自动证明子类入路、部位、器械、范围、材料或复杂程度成立；缺少细分证据时输出 `待人工复核` 或 `依据不充分`。\n- **组套项目边界**：组套名称不能自动拆成多个操作；一项操作也不能自动扩展为组套，除非文书逐项明确记录。\n- **一对一/一对多边界**：候选只支持一个明确操作时，不推断相关附加操作；多个候选共享同一证据时，应分别核对是否均有实施记录。\n- **模糊保守**：字面相似但核心用途不同、仅见“拟行/计划/取消”、耗材用途不明或服务对象不明时，不应判为依据充分。\n- **DRG 边界**：涉及 DRG 分组、手术级别或严重/一般合并症并发症边界时，必须由病历明确支持；不能用模型常识自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-sufficiency-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --surgery 'primary|32.4100x002|胸腔镜下肺叶切除术' \\\n  --surgery 'other|34.5100x001|胸腔镜下胸腔粘连松解术' \\\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- `--surgery STRING`：待审核手术/操作，格式 `role|code|name` 或 `code|name`；可重复。\n- `--surgeries-json STRING`：待审核手术/操作 JSON 字符串或文件路径。\n- 普通 `txt/pdf/doc/docx/xls/xlsx/csv` 文件不会自动知道待审核手术/操作，必须传 `--surgery` 或 `--surgeries-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/surgery-sufficiency-review/` 或输出文件所在目录；路径提示输出到 stderr。\n\n输出约定\n--------\nCLI 只输出 JSON，不输出 Markdown、序号或额外提示语。响应结构：\n\n```json\n{\n  \"final_decision\": \"依据充分\",\n  \"reasoning\": \"47.0101 阑尾切除术：依据充分。病历文书存在可支撑该手术/操作的明确实施依据。\"\n}\n```\n\n`final_decision` 只能为 `依据充分`、`依据不充分`、`待人工复核`。`reasoning` 只写面向用户的简洁依据，不展示内部 chain-of-thought。\n\n示例\n----\n- 正例：候选 `47.0101 阑尾切除术`，手术记录明确记载已实施阑尾切除术，可输出 `依据充分`。\n- 正例：候选其他操作在手术记录或术后病程中有明确实施记录、部位和目的，可输出 `依据充分`。\n- 多项审核例：结构化病案包含 `primarySurgery` 和多个 `otherSurgeries` 时，未传 `--surgery` 也会审核主手术和全部其他手术；普通文件需用多个 `--surgery` 显式列出。\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/surgery_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-surgery-sufficiency-review\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1784181917619\n}\n\nFile v1.0.2:skill-card.md\n\n## Description:\n\nReviews whether documented medical-record evidence is sufficient to support specified surgeries or procedures.\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, audit, and engineering teams use this skill to review structured records and candidate surgery or procedure codes for evidence sufficiency. It returns an assistive review result for insurance coding workflows and does not provide diagnosis or treatment advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive medical record text and the supplied model credential may be sent to a caller-selected LLM endpoint.\n\nMitigation: Use a fixed trusted HTTPS endpoint, de-identify records before use, protect the appkey, and avoid passing a custom --base value from untrusted input.\n\nRisk: Medical record text may be retained locally when prepared text is saved for debugging.\n\nMitigation: Avoid --save-prepared unless local retention of medical text is acceptable for the operating environment.\n\nRisk: LLM-assisted review can produce incorrect or incomplete audit conclusions.\n\nMitigation: Treat outputs as insurance coding audit assistance, keep human review in the workflow, and use --no-llm for offline fallback review when external model use is not appropriate.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/skills/unisound-surgery-sufficiency-review)\n\n## Skill Output:\n\n**Output Type(s):** [text, json, guidance]\n\n**Output Format:** [JSON]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs final_decision and concise reasoning; final_decision is one of: 依据充分, 依据不充分, 待人工复核.]\n\n## Skill Version(s):\n\n1.0.2 (source: server-resolved release metadata)\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, 17812 bytes\n\nFiles: _meta.json (154b), scripts/run.py (9195b), scripts/surgery_sufficiency_review.py (30519b), skill-card.md (2446b), SKILL.md (9222b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: med-surgery-sufficiency-review\ndescription: 手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🏥\"\n      }\n  }\n---\n\n# 手术/操作依据充分性审核\n\n概述\n----\n给定结构化病案 `record` 和待审核手术/操作列表，本技能从手术/操作依据充分性规则库读取指南，核对病历文书证据，输出手术/操作依据是否充分。\n\n本技能会：\n- 从 `surgery_sufficiency_guidelines` 读取手术/操作依据充分性审核指南。\n- 按手术/操作 `role` 区分主要手术和其他手术，分别匹配指南适用范围。\n- 优先按用户提供的 `surgeries` 候选列表审核；未提供时，默认审核 `record.surgery.primarySurgery` 和 `record.surgery.otherSurgeries` 中的全部手术/操作。\n- 调用 skill 内置的 `review_surgery_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 可为结构化病案；其他格式会先预处理为一份完整病历文书。未显式传入 `surgeries` 时，会自动审核结构化病案中的主手术/操作和全部其他手术/操作；普通病历文件需要通过参数传入待审核手术/操作列表。\n\n```json\n{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001861856\",\n    \"docs\": [\n      {\n        \"docName\": \"手术记录\",\n        \"fileName\": \"手术记录\",\n        \"docClassName\": \"手术记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"surgery\": {\n      \"primarySurgery\": {\"name\": \"阑尾切除术\", \"code\": \"47.0101\"},\n      \"otherSurgeries\": []\n    }\n  },\n  \"surgeries\": [\n    {\"role\": \"primary\", \"code\": \"47.0101\", \"name\": \"阑尾切除术\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}\n```\n\n字段说明：\n- `record`：**必填**。结构化病案 JSON。\n- `surgeries`：可选。待审核手术/操作候选数组；每项包含 `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- **主要手术边界**：主要手术/操作应与本次住院主要治疗目的、资源消耗或 DRG 分组核心操作一致；仅有附带操作或低资源操作时不能自动作为主要手术。\n- **其他手术边界**：其他手术/操作应有明确实施记录、部位、术式或服务内容；仅医嘱、计划、术前讨论或取消操作不构成充分依据。\n- **父类/子类边界**：父类术式证据不能自动证明子类入路、部位、器械、范围、材料或复杂程度成立；缺少细分证据时输出 `待人工复核` 或 `依据不充分`。\n- **组套项目边界**：组套名称不能自动拆成多个操作；一项操作也不能自动扩展为组套，除非文书逐项明确记录。\n- **一对一/一对多边界**：候选只支持一个明确操作时，不推断相关附加操作；多个候选共享同一证据时，应分别核对是否均有实施记录。\n- **模糊保守**：字面相似但核心用途不同、仅见“拟行/计划/取消”、耗材用途不明或服务对象不明时，不应判为依据充分。\n- **DRG 边界**：涉及 DRG 分组、手术级别或严重/一般合并症并发症边界时，必须由病历明确支持；不能用模型常识自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-sufficiency-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --surgery 'primary|32.4100x002|胸腔镜下肺叶切除术' \\\n  --surgery 'other|34.5100x001|胸腔镜下胸腔粘连松解术' \\\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- `--surgery STRING`：待审核手术/操作，格式 `role|code|name` 或 `code|name`；可重复。\n- `--surgeries-json STRING`：待审核手术/操作 JSON 字符串或文件路径。\n- 普通 `txt/pdf/doc/docx/xls/xlsx/csv` 文件不会自动知道待审核手术/操作，必须传 `--surgery` 或 `--surgeries-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/surgery-sufficiency-review/` 或输出文件所在目录；路径提示输出到 stderr。\n\n输出约定\n--------\nCLI 只输出 JSON，不输出 Markdown、序号或额外提示语。响应结构：\n\n```json\n{\n  \"final_decision\": \"依据充分\",\n  \"reasoning\": \"47.0101 阑尾切除术：依据充分。病历文书存在可支撑该手术/操作的明确实施依据。\"\n}\n```\n\n`final_decision` 只能为 `依据充分`、`依据不充分`、`待人工复核`。`reasoning` 只写面向用户的简洁依据，不展示内部 chain-of-thought。\n\n示例\n----\n- 正例：候选 `47.0101 阑尾切除术`，手术记录明确记载已实施阑尾切除术，可输出 `依据充分`。\n- 正例：候选其他操作在手术记录或术后病程中有明确实施记录、部位和目的，可输出 `依据充分`。\n- 多项审核例：结构化病案包含 `primarySurgery` 和多个 `otherSurgeries` 时，未传 `--surgery` 也会审核主手术和全部其他手术；普通文件需用多个 `--surgery` 显式列出。\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/surgery_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-surgery-sufficiency-review\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1779966868070\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, billing, and review teams use this skill to compare structured inpatient records and candidate surgery or procedure codes against sufficiency guidance. It returns whether the supporting record evidence is sufficient, insufficient, or requires human review. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill processes medical record text and may send sensitive case content to configurable external services. <br>\nMitigation: Install only in environments approved for PHI handling; use --no-llm or use_llm=false unless the model endpoint is contractually approved, and configure GUIDELINE_API_BASE to a trusted service. <br>\nRisk: The CLI can save prepared patient text locally when --save-prepared is used. <br>\nMitigation: Do not use --save-prepared with real patient data unless local retention, access controls, and cleanup are explicitly managed. <br>\nRisk: Changing the --base model endpoint can route sensitive content to an unapproved service. <br>\nMitigation: Avoid arbitrary --base values and restrict endpoint configuration to approved services. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/unisound-surgery-sufficiency-review) <br>\n- [Publisher profile](https://clawhub.ai/user/unisound-llm) <br>\n- [Internal medical model 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 concise reasoning fields] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [final_decision is one of 依据充分, 依据不充分, or 待人工复核.] <br>\n\n## Skill Version(s): <br>\n1.0.1 (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>\n\nArchive v1.0.0: 5 files, 17969 bytes\n\nFiles: _meta.json (154b), scripts/run.py (9195b), scripts/surgery_sufficiency_review.py (30500b), skill-card.md (2687b), SKILL.md (9196b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: med-surgery-sufficiency-review\ndescription: 手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🏥\"\n      }\n  }\n---\n\n# 手术/操作依据充分性审核\n\n概述\n----\n给定结构化病案 `record` 和待审核手术/操作列表，本技能从手术/操作依据充分性规则库读取指南，核对病历文书证据，输出手术/操作依据是否充分。\n\n本技能会：\n- 从 `surgery_sufficiency_guidelines` 读取手术/操作依据充分性审核指南。\n- 按手术/操作 `role` 区分主要手术和其他手术，分别匹配指南适用范围。\n- 优先按用户提供的 `surgeries` 候选列表审核；未提供时，默认审核 `record.surgery.primarySurgery` 和 `record.surgery.otherSurgeries` 中的全部手术/操作。\n- 调用 skill 内置的 `review_surgery_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 可为结构化病案；其他格式会先预处理为一份完整病历文书。未显式传入 `surgeries` 时，会自动审核结构化病案中的主手术/操作和全部其他手术/操作；普通病历文件需要通过参数传入待审核手术/操作列表。\n\n```json\n{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001861856\",\n    \"docs\": [\n      {\n        \"docName\": \"手术记录\",\n        \"fileName\": \"手术记录\",\n        \"docClassName\": \"手术记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"surgery\": {\n      \"primarySurgery\": {\"name\": \"阑尾切除术\", \"code\": \"47.0101\"},\n      \"otherSurgeries\": []\n    }\n  },\n  \"surgeries\": [\n    {\"role\": \"primary\", \"code\": \"47.0101\", \"name\": \"阑尾切除术\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}\n```\n\n字段说明：\n- `record`：**必填**。结构化病案 JSON。\n- `surgeries`：可选。待审核手术/操作候选数组；每项包含 `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- **主要手术边界**：主要手术/操作应与本次住院主要治疗目的、资源消耗或 DRG 分组核心操作一致；仅有附带操作或低资源操作时不能自动作为主要手术。\n- **其他手术边界**：其他手术/操作应有明确实施记录、部位、术式或服务内容；仅医嘱、计划、术前讨论或取消操作不构成充分依据。\n- **父类/子类边界**：父类术式证据不能自动证明子类入路、部位、器械、范围、材料或复杂程度成立；缺少细分证据时输出 `待人工复核` 或 `依据不充分`。\n- **组套项目边界**：组套名称不能自动拆成多个操作；一项操作也不能自动扩展为组套，除非文书逐项明确记录。\n- **一对一/一对多边界**：候选只支持一个明确操作时，不推断相关附加操作；多个候选共享同一证据时，应分别核对是否均有实施记录。\n- **模糊保守**：字面相似但核心用途不同、仅见“拟行/计划/取消”、耗材用途不明或服务对象不明时，不应判为依据充分。\n- **DRG 边界**：涉及 DRG 分组、手术级别或严重/一般合并症并发症边界时，必须由病历明确支持；不能用模型常识自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-sufficiency-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --surgery 'primary|32.4100x002|胸腔镜下肺叶切除术' \\\n  --surgery 'other|34.5100x001|胸腔镜下胸腔粘连松解术' \\\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- `--surgery STRING`：待审核手术/操作，格式 `role|code|name` 或 `code|name`；可重复。\n- `--surgeries-json STRING`：待审核手术/操作 JSON 字符串或文件路径。\n- 普通 `txt/pdf/doc/docx/xls/xlsx/csv` 文件不会自动知道待审核手术/操作，必须传 `--surgery` 或 `--surgeries-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/surgery-sufficiency-review/` 或输出文件所在目录；路径提示输出到 stderr。\n\n输出约定\n--------\nCLI 只输出 JSON，不输出 Markdown、序号或额外提示语。响应结构：\n\n```json\n{\n  \"final_decision\": \"依据充分\",\n  \"reasoning\": \"47.0101 阑尾切除术：依据充分。病历文书存在可支撑该手术/操作的明确实施依据。\"\n}\n```\n\n`final_decision` 只能为 `依据充分`、`依据不充分`、`待人工复核`。`reasoning` 只写面向用户的简洁依据，不展示内部 chain-of-thought。\n\n示例\n----\n- 正例：候选 `47.0101 阑尾切除术`，手术记录明确记载已实施阑尾切除术，可输出 `依据充分`。\n- 正例：候选其他操作在手术记录或术后病程中有明确实施记录、部位和目的，可输出 `依据充分`。\n- 多项审核例：结构化病案包含 `primarySurgery` 和多个 `otherSurgeries` 时，未传 `--surgery` 也会审核主手术和全部其他手术；普通文件需用多个 `--surgery` 显式列出。\n- 边界例：文书只记载父类术式，未明确候选子类所需入路、部位、器械或范围，应输出 `待人工复核`。\n- 不应匹配例：仅病案首页手术列表出现候选名称，正文无手术记录、术后记录或实施证据，不应直接判为依据充分。\n\n依赖\n----\n### 运行环境\n- Python 3.11+\n- `psycopg[binary]` 或 `psycopg2`\n\n### 外部服务\n- PostgreSQL：读取 `surgery_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/surgery_sufficiency_review.py` 的 `HARDCODED_DATABASE`。\n- `scripts/run.py` 是唯一对外入口，复用 `scripts/surgery_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-surgery-sufficiency-review\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1778834649215\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nReviews whether medical record evidence is sufficient to support listed surgeries or procedures. <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>\nAuthorized medical coding, insurance review, and hospital documentation teams use this skill to check structured records or prepared clinical documents against candidate surgery and procedure codes. It returns a concise sufficiency decision for each review without providing diagnosis or treatment advice. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill processes sensitive medical records and may call configured model services. <br>\nMitigation: Use it only when authorized, de-identify patient records before use, and trust the configured model endpoint before sending records. <br>\nRisk: Local copies of prepared records or outputs can be created when optional save or output flags are used. <br>\nMitigation: Avoid save and output-file options unless local retention is intentional and governed by the deployment environment. <br>\nRisk: Database configuration and external service settings can expose operational or credential handling concerns. <br>\nMitigation: Replace hardcoded database settings with controlled configuration or secret management before production deployment. <br>\nRisk: Generated sufficiency decisions may be incomplete or require review for ambiguous clinical documentation. <br>\nMitigation: Use the offline fallback when records must remain local and route uncertain or high-impact decisions to qualified manual reviewers. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/unisound-surgery-sufficiency-review) <br>\n- [Internal medical LLM API endpoint](https://maas-api.hivoice.cn/v1/chat/completions) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [JSON, Analysis, Shell commands, Guidance] <br>\n**Output Format:** [JSON with a final_decision field and concise user-facing reasoning] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Decisions are constrained to evidence sufficient, evidence insufficient, or needs manual review.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: server release metadata 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-surgery-sufficiency-review Owner: unisound-llm Summary: 手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T06:05:17.619Z | user - Removed redundant file skill-card.md to streamline project files. - Updated default medical model name from u1-insuremed to u2-med in documentation and CLI parameters. - No functional logic changes; only documentatio","codeSnippets":[],"executableExamples":[{"language":"json","snippet":"{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001861856\",\n    \"docs\": [\n      {\n        \"docName\": \"手术记录\",\n        \"fileName\": \"手术记录\",\n        \"docClassName\": \"手术记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"surgery\": {\n      \"primarySurgery\": {\"name\": \"阑尾切除术\", \"code\": \"47.0101\"},\n      \"otherSurgeries\": []\n    }\n  },\n  \"surgeries\": [\n    {\"role\": \"primary\", \"code\": \"47.0101\", \"name\": \"阑尾切除术\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}"},{"language":"bash","snippet":"# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-sufficiency-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --surgery 'primary|32.4100x002|胸腔镜下肺叶切除术' \\\n  --surgery 'other|34.5100x001|胸腔镜下胸腔粘连松解术' \\\n  --save-prepared"},{"language":"json","snippet":"{\n  \"final_decision\": \"依据充分\",\n  \"reasoning\": \"47.0101 阑尾切除术：依据充分。病历文书存在可支撑该手术/操作的明确实施依据。\"\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\": \"0001861856\",\n    \"docs\": [\n      {\n        \"docName\": \"手术记录\",\n        \"fileName\": \"手术记录\",\n        \"docClassName\": \"手术记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"surgery\": {\n      \"primarySurgery\": {\"name\": \"阑尾切除术\", \"code\": \"47.0101\"},\n      \"otherSurgeries\": []\n    }\n  },\n  \"surgeries\": [\n    {\"role\": \"primary\", \"code\": \"47.0101\", \"name\": \"阑尾切除术\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}"},{"language":"bash","snippet":"# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-sufficiency-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --surgery 'primary|32.4100x002|胸腔镜下肺叶切除术' \\\n  --surgery 'other|34.5100x001|胸腔镜下胸腔粘连松解术' \\\n  --save-prepared"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: med-surgery-sufficiency-review\ndescription: 手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🏥\"\n      }\n  }\n---\n\n# 手术/操作依据充分性审核\n\n概述\n----\n给定结构化病案 `record` 和待审核手术/操作列表，本技能从手术/操作依据充分性规则库读取指南，核对病历文书证据，输出手术/操作依据是否充分。\n\n本技能会：\n- 从 `surgery_sufficiency_guidelines` 读取手术/操作依据充分性审核指南。\n- 按手术/操作 `role` 区分主要手术和其他手术，分别匹配指南适用范围。\n- 优先按用户提供的 `surgeries` 候选列表审核；未提供时，默认审核 `record.surgery.primarySurgery` 和 `record.surgery.otherSurgeries` 中的全部手术/操作。\n- 调用 skill 内置的 `review_surgery_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 可为结构化病案；其他格式会先预处理为一份完整病历文书。未显式传入 `surgeries` 时，会自动审核结构化病案中的主手术/操作和全部其他手术/操作；普通病历文件需要通过参数传入待审核手术/操作列表。\n\n```json\n{\n  \"record\": {\n    \"hospitalId\": \"988\",\n    \"serialNum\": \"0001861856\",\n    \"docs\": [\n      {\n        \"docName\": \"手术记录\",\n        \"fileName\": \"手术记录\",\n        \"docClassName\": \"手术记录\",\n        \"content\": \"...\"\n      }\n    ],\n    \"surgery\": {\n      \"primarySurgery\": {\"name\": \"阑尾切除术\", \"code\": \"47.0101\"},\n      \"otherSurgeries\": []\n    }\n  },\n  \"surgeries\": [\n    {\"role\": \"primary\", \"code\": \"47.0101\", \"name\": \"阑尾切除术\"}\n  ],\n  \"appkey\": \"由平台分配的鉴权 key\",\n  \"model\": \"\",\n  \"use_llm\": true\n}\n```\n\n字段说明：\n- `record`：**必填**。结构化病案 JSON。\n- `surgeries`：可选。待审核手术/操作候选数组；每项包含 `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- **主要手术边界**：主要手术/操作应与本次住院主要治疗目的、资源消耗或 DRG 分组核心操作一致；仅有附带操作或低资源操作时不能自动作为主要手术。\n- **其他手术边界**：其他手术/操作应有明确实施记录、部位、术式或服务内容；仅医嘱、计划、术前讨论或取消操作不构成充分依据。\n- **父类/子类边界**：父类术式证据不能自动证明子类入路、部位、器械、范围、材料或复杂程度成立；缺少细分证据时输出 `待人工复核` 或 `依据不充分`。\n- **组套项目边界**：组套名称不能自动拆成多个操作；一项操作也不能自动扩展为组套，除非文书逐项明确记录。\n- **一对一/一对多边界**：候选只支持一个明确操作时，不推断相关附加操作；多个候选共享同一证据时，应分别核对是否均有实施记录。\n- **模糊保守**：字面相似但核心用途不同、仅见“拟行/计划/取消”、耗材用途不明或服务对象不明时，不应判为依据充分。\n- **DRG 边界**：涉及 DRG 分组、手术级别或严重/一般合并症并发症边界时，必须由病历明确支持；不能用模型常识自动升级。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-sufficiency-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \\\n  --input /path/to/record.txt \\\n  --appkey <your-appkey> \\\n  --surgery 'primary|32.4100x002|胸腔镜下肺叶切除术' \\\n"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7ft98qwhxyrgcy7b7rzdhrrd8366k6\",\n  \"slug\": \"unisound-surgery-sufficiency-review\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1784181917619\n}"},{"path":"skill-card.md","content":"## Description:\n\nReviews whether documented medical-record evidence is sufficient to support specified surgeries or procedures.\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, audit, and engineering teams use this skill to review structured records and candidate surgery or procedure codes for evidence sufficiency. It returns an assistive review result for insurance coding workflows and does not provide diagnosis or treatment advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive medical record text and the supplied model credential may be sent to a caller-selected LLM endpoint.\n\nMitigation: Use a fixed trusted HTTPS endpoint, de-identify records before use, protect the appkey, and avoid passing a custom --base value from untrusted input.\n\nRisk: Medical record text may be retained locally when prepared text is saved for debugging.\n\nMitigation: Avoid --save-prepared unless local retention of medical text is acceptable for the operating environment.\n\nRisk: LLM-assisted review can produce incorrect or incomplete audit conclusions.\n\nMitigation: Treat outputs as insurance coding audit assistance, keep human review in the workflow, and use --no-llm for offline fallback review when external model use is not appropriate.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/skills/unisound-surgery-sufficiency-review)\n\n## Skill Output:\n\n**Output Type(s):** [text, json, guidance]\n\n**Output Format:** [JSON]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs final_decision and concise reasoning; final_decision is one of: 依据充分, 依据不充分, 待人工复核.]\n\n## Skill Version(s):\n\n1.0.2 (source: server-resolved release metadata)\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-surgery-sufficiency-review Owner: unisound-llm Summary: 手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表，输出依据充分性审核结果。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T06:05:17.619Z | user - Removed redundant file skill-card.md to streamline project files. - Updated default medical model name from u1-insuremed to u2-med in documentation and CLI parameters. - No functional logic changes; only documentatio","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":967,"uniquenessScore":53,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-12T01:29:14.353Z","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-12T01:29:14.353Z","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-14T22:27:37.562Z","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"}]}}}