{"id":"4929f136-5e1a-49dc-b2f5-9a526ef00e34","entityType":"agent","slug":"clawhub-unisound-llm-unisound-surgery-review","name":"unisound-surgery-review","canonicalUrl":"https://www.xpersona.co/agent/clawhub-unisound-llm-unisound-surgery-review","canonicalPath":"/agent/clawhub-unisound-llm-unisound-surgery-review","generatedAt":"2026-10-11T17:45:55.897Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T14:24:04.852Z","emptyReason":null},"description":"手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。 Skill: unisound-surgery-review Owner: unisound-llm Summary: 手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T02:38:36.767Z | user - Default model changed from \"u1-insuremed\" to \"u2-med\" in both input field and CLI parameter documentation. - Outdated file skill-card.md removed from the package. - No API or CLI behaviors were changed; only documentation an","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s1770nyybxj4gn0vk38n6wr6k584x8ea:unisound-surgery-review","sourceUrl":"https://clawhub.ai/unisound-llm/unisound-surgery-review","homepage":"https://clawhub.ai/unisound-llm/skills/unisound-surgery-review","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/unisound-llm/unisound-surgery-review","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/unisound-llm/skills/unisound-surgery-review","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。 Skill: unisound-surgery-review Owner: unisound-llm Summary: 手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T14:24:04.852Z","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-11T14:24:04.852Z","emptyReason":null},"stars":null,"forks":null,"downloads":1050,"packageName":null,"latestVersion":"1.0.2","tractionLabel":"1.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T14:24:04.789Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T14:24:04.852Z","lastCrawledAt":"2026-10-11T14:24:04.789Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T14:24:04.789Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.2","createdAt":"2026-07-16T02:38:36.767Z","changelog":"- Default model changed from \"u1-insuremed\" to \"u2-med\" in both input field and CLI parameter documentation. - Outdated file skill-card.md removed from the package. - No API or CLI behaviors were changed; only documentation and packaging were updated.","fileCount":5,"zipByteSize":18403},{"version":"1.0.1","createdAt":"2026-05-28T11:13:33.274Z","changelog":"- Removed the sample file skill-card.md. - 文档数据源从 Postgres 数据库调整为 ICD/DRG 规则库 API，相关说明已更新。 - 删除了运行时 Postgres 依赖，仅保留 Python 3.11+ 要求。 - 强调通过环境变量（GUIDELINE_API_BASE, GUIDELINE_API_KEY）配置规则库连接。 - 细化数据安全说明，明确“规则库服务用途”及环境变量配置方式。 - 其余功能、调用方式、输入输出接口保持不变。","fileCount":5,"zipByteSize":18464},{"version":"1.0.0","createdAt":"2026-05-15T08:44:47.761Z","changelog":"- Initial release of the surgery/operation code review skill. - Supports audit of surgery/operation codes based on structured medical records and candidate surgery lists. - Reads audit rules from the surgery audit guidelines rule base, uses in-record evidence, and outputs coding decisions with concise reasoning. - Provides a unified CLI (`scripts/run.py`) for all supported input formats (json, txt, pdf, doc, xlsx, etc). - Ensures minimum necessary data use, strict de-identification, no local data persistence; uses LLMs if enabled with user-provided appkey. - Clearly defines output, boundary rules, and dependency requirements for integration.","fileCount":5,"zipByteSize":18826}]},"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-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-review/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-review/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-review/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-review/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-review/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-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-11T17:45:55.896Z"}},"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-review/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-review/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-review/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-unisound-llm-unisound-surgery-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-11T14:24:04.852Z","emptyReason":null},"readme":"Skill: unisound-surgery-review\n\nOwner: unisound-llm\n\nSummary: 手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。\n\nTags: latest:1.0.2\n\nVersion history:\n\nv1.0.2 | 2026-07-16T02:38:36.767Z | user\n\n- Default model changed from \"u1-insuremed\" to \"u2-med\" in both input field and CLI parameter documentation.\n- Outdated file skill-card.md removed from the package.\n- No API or CLI behaviors were changed; only documentation and packaging were updated.\n\nv1.0.1 | 2026-05-28T11:13:33.274Z | user\n\n- Removed the sample file skill-card.md.\n- 文档数据源从 Postgres 数据库调整为 ICD/DRG 规则库 API，相关说明已更新。\n- 删除了运行时 Postgres 依赖，仅保留 Python 3.11+ 要求。\n- 强调通过环境变量（GUIDELINE_API_BASE, GUIDELINE_API_KEY）配置规则库连接。\n- 细化数据安全说明，明确“规则库服务用途”及环境变量配置方式。\n- 其余功能、调用方式、输入输出接口保持不变。\n\nv1.0.0 | 2026-05-15T08:44:47.761Z | auto\n\n- Initial release of the surgery/operation code review skill.\n- Supports audit of surgery/operation codes based on structured medical records and candidate surgery lists.\n- Reads audit rules from the surgery audit guidelines rule base, uses in-record evidence, and outputs coding decisions with concise reasoning.\n- Provides a unified CLI (`scripts/run.py`) for all supported input formats (json, txt, pdf, doc, xlsx, etc).\n- Ensures minimum necessary data use, strict de-identification, no local data persistence; uses LLMs if enabled with user-provided appkey.\n- Clearly defines output, boundary rules, and dependency requirements for integration.\n\nArchive index:\n\nArchive v1.0.2: 5 files, 18403 bytes\n\nFiles: _meta.json (142b), scripts/run.py (9138b), scripts/surgery_review.py (35378b), skill-card.md (2126b), SKILL.md (8887b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: med-surgery-review\ndescription: 手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🏥\"\n      }\n  }\n---\n\n# 手术/操作编码审核\n\n概述\n----\n给定结构化病案 `record` 和待审核手术/操作列表，本技能从手术编码审核规则库读取规则，核对病历文书证据，输出手术/操作编码审核结果。\n\n本技能会：\n- 从 `surgery_audit_guidelines` 读取手术/操作编码审核规则。\n- 优先按用户提供的 `surgeries` 候选列表审核；未提供时，默认审核 `record.surgery.primarySurgery` 和 `record.surgery.otherSurgeries` 中的全部手术/操作。\n- 调用 skill 内置的 `review_surgery_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- **证据优先**：审核结论必须基于手术记录、术后首次病程记录、出院记录等文书明确支持的信息。\n- **角色边界**：主要手术/操作优先核对与本次住院主要治疗目的、资源消耗和病案首页主要手术选择一致性；其他手术/操作核对是否有明确实施证据。\n- **父类/子类边界**：编码可按规则库从细到粗检索，但父类规则不能自动证明子类编码成立；入路、部位、器械、范围、术式细节不明确时应输出 `待人工复核`。\n- **组套项目边界**：组套名称不能自动拆成多个操作；一项操作也不能自动扩展为组套，除非文书逐项明确记录。\n- **一对一/一对多边界**：候选只支持一个明确操作时，不推断相关附加操作；多个候选共享同一证据时，应分别核对是否均有实施记录。\n- **模糊保守**：字面相似但核心用途不同、仅有术前计划、拟行操作、取消操作或缺少实施记录时，不强行通过。\n- **DRG 边界**：涉及 DRG 分组或手术级别影响时，必须有病历明确支持；不能用模型常识自动升级主要手术。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-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-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_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-review\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1784169516767\n}\n\nFile v1.0.2:skill-card.md\n\n## Description:\n\nReviews structured medical record data and candidate surgery or procedure codes to return matched coding rules, record evidence, and an audit conclusion.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[unisound-llm](https://clawhub.ai/user/unisound-llm)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, medical coding reviewers, and healthcare workflow developers use this skill to audit surgery and procedure coding candidates against rule-library guidance and supporting medical-record evidence.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Medical records and bearer credentials can be sent to configurable guideline and LLM endpoints.\n\nMitigation: Use only approved HTTPS endpoints, avoid caller-supplied base URLs, and use --no-llm when records cannot leave the host.\n\nRisk: Inputs may contain real patient identifiers or other sensitive health information.\n\nMitigation: Redact names, identity numbers, phone numbers, detailed addresses, and other identifiers before invoking the skill.\n\nRisk: The --save-prepared option can write plaintext prepared record text to local storage.\n\nMitigation: Do not enable --save-prepared unless local plaintext retention is explicitly approved and protected.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/skills/unisound-surgery-review)\n- [Internal medical LLM endpoint](https://maas-api.hivoice.cn/v1/chat/completions)\n\n## Skill Output:\n\n**Output Type(s):** [analysis, 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:** [Decision values are limited to pass, fail, or manual review; reasoning is concise and user-facing.]\n\n## Skill Version(s):\n\n1.0.2 (source: server 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, 18464 bytes\n\nFiles: _meta.json (142b), scripts/run.py (9138b), scripts/surgery_review.py (35384b), skill-card.md (2442b), SKILL.md (8899b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: med-surgery-review\ndescription: 手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🏥\"\n      }\n  }\n---\n\n# 手术/操作编码审核\n\n概述\n----\n给定结构化病案 `record` 和待审核手术/操作列表，本技能从手术编码审核规则库读取规则，核对病历文书证据，输出手术/操作编码审核结果。\n\n本技能会：\n- 从 `surgery_audit_guidelines` 读取手术/操作编码审核规则。\n- 优先按用户提供的 `surgeries` 候选列表审核；未提供时，默认审核 `record.surgery.primarySurgery` 和 `record.surgery.otherSurgeries` 中的全部手术/操作。\n- 调用 skill 内置的 `review_surgery_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- **证据优先**：审核结论必须基于手术记录、术后首次病程记录、出院记录等文书明确支持的信息。\n- **角色边界**：主要手术/操作优先核对与本次住院主要治疗目的、资源消耗和病案首页主要手术选择一致性；其他手术/操作核对是否有明确实施证据。\n- **父类/子类边界**：编码可按规则库从细到粗检索，但父类规则不能自动证明子类编码成立；入路、部位、器械、范围、术式细节不明确时应输出 `待人工复核`。\n- **组套项目边界**：组套名称不能自动拆成多个操作；一项操作也不能自动扩展为组套，除非文书逐项明确记录。\n- **一对一/一对多边界**：候选只支持一个明确操作时，不推断相关附加操作；多个候选共享同一证据时，应分别核对是否均有实施记录。\n- **模糊保守**：字面相似但核心用途不同、仅有术前计划、拟行操作、取消操作或缺少实施记录时，不强行通过。\n- **DRG 边界**：涉及 DRG 分组或手术级别影响时，必须有病历明确支持；不能用模型常识自动升级主要手术。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-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-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_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-review\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1779966813274\n}\n\nFile v1.0.1:skill-card.md\n\n## Description: <br>\nReviews surgery and procedure coding against ICD/DRG audit rules using structured medical records, candidate procedures, record evidence, and rule matches. <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 reviewers and health insurance operations teams use this skill to check proposed surgery or procedure codes against ICD/DRG audit rules and supporting record evidence. It returns an assistive coding-review conclusion, not diagnosis or treatment advice. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill handles sensitive medical records through external and user-configurable services. <br>\nMitigation: Install only in an environment approved for sensitive medical data, configure the guideline API and LLM base URL to trusted services, redact identifiers before input, and use the no-LLM mode when remote processing is not allowed. <br>\nRisk: Prepared medical record text can be persisted when the save-prepared option is used. <br>\nMitigation: Avoid saving prepared text unless stored PHI is explicitly permitted and protected by the deployment environment. <br>\nRisk: The output is an assistive medical coding review and may require expert judgment. <br>\nMitigation: Treat pass, fail, and manual-review conclusions as coding-review support and keep human review in the workflow for ambiguous or high-impact cases. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/unisound-surgery-review) <br>\n- [Publisher profile](https://clawhub.ai/user/unisound-llm) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [JSON, Analysis, Guidance] <br>\n**Output Format:** [JSON object with final_decision and reasoning fields] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [The decision is constrained to pass, fail, or manual review, with concise evidence-oriented reasoning.] <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, 18826 bytes\n\nFiles: _meta.json (142b), scripts/run.py (9138b), scripts/surgery_review.py (35576b), skill-card.md (2558b), SKILL.md (8870b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: med-surgery-review\ndescription: 手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🏥\"\n      }\n  }\n---\n\n# 手术/操作编码审核\n\n概述\n----\n给定结构化病案 `record` 和待审核手术/操作列表，本技能从手术编码审核规则库读取规则，核对病历文书证据，输出手术/操作编码审核结果。\n\n本技能会：\n- 从 `surgery_audit_guidelines` 读取手术/操作编码审核规则。\n- 优先按用户提供的 `surgeries` 候选列表审核；未提供时，默认审核 `record.surgery.primarySurgery` 和 `record.surgery.otherSurgeries` 中的全部手术/操作。\n- 调用 skill 内置的 `review_surgery_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- **证据优先**：审核结论必须基于手术记录、术后首次病程记录、出院记录等文书明确支持的信息。\n- **角色边界**：主要手术/操作优先核对与本次住院主要治疗目的、资源消耗和病案首页主要手术选择一致性；其他手术/操作核对是否有明确实施证据。\n- **父类/子类边界**：编码可按规则库从细到粗检索，但父类规则不能自动证明子类编码成立；入路、部位、器械、范围、术式细节不明确时应输出 `待人工复核`。\n- **组套项目边界**：组套名称不能自动拆成多个操作；一项操作也不能自动扩展为组套，除非文书逐项明确记录。\n- **一对一/一对多边界**：候选只支持一个明确操作时，不推断相关附加操作；多个候选共享同一证据时，应分别核对是否均有实施记录。\n- **模糊保守**：字面相似但核心用途不同、仅有术前计划、拟行操作、取消操作或缺少实施记录时，不强行通过。\n- **DRG 边界**：涉及 DRG 分组或手术级别影响时，必须有病历明确支持；不能用模型常识自动升级主要手术。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-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-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_audit_guidelines`\n- 内部医疗大模型：`https://maas-api.hivoice.cn/v1/chat/completions`\n\n测试命令\n--------\n从 `skills` 根目录执行：\n\n```bash\npython3 self_tests/med-icd-drg-review/self_test_icd_drg_review.py\n```\n\n备注\n----\n- 数据库连接配置硬编码在 `scripts/surgery_review.py` 的 `HARDCODED_DATABASE`。\n- `scripts/run.py` 是唯一对外入口，复用 `scripts/surgery_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-review\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1778834687761\n}\n\nFile v1.0.0: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 reviewers and integration developers use this skill to audit candidate surgery or operation codes against structured medical-record evidence and surgery audit guidelines. It supports coding review decisions 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: The skill handles sensitive patient-record data. <br>\nMitigation: De-identify inputs before use and run only in environments approved for the relevant patient-data handling requirements. <br>\nRisk: Default operation can send prepared record evidence to a remote LLM endpoint. <br>\nMitigation: Use only approved LLM endpoints and credentials, or run with LLM use disabled when remote processing is not authorized. <br>\nRisk: Optional output and prepared-text flags can write plaintext medical data locally. <br>\nMitigation: Avoid local save flags unless local storage of the prepared record and review output is approved and protected. <br>\nRisk: The artifact includes hardcoded database connection settings for the audit-guideline store. <br>\nMitigation: Replace hardcoded database configuration with deployment-specific secret management before use. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill release page](https://clawhub.ai/unisound-llm/unisound-surgery-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, Guidance] <br>\n**Output Format:** [JSON object with final_decision and reasoning fields] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [final_decision is limited to 通过, 不通过, or 待人工复核; reasoning should be concise and should not expose chain-of-thought.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: server release metadata and artifact _meta.json) <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-review Owner: unisound-llm Summary: 手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T02:38:36.767Z | user - Default model changed from \"u1-insuremed\" to \"u2-med\" in both input field and CLI parameter documentation. - Outdated file skill-card.md removed from the package. - No API or CLI behaviors were changed; only documentation an","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-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-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-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-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-review\ndescription: 手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"🏥\"\n      }\n  }\n---\n\n# 手术/操作编码审核\n\n概述\n----\n给定结构化病案 `record` 和待审核手术/操作列表，本技能从手术编码审核规则库读取规则，核对病历文书证据，输出手术/操作编码审核结果。\n\n本技能会：\n- 从 `surgery_audit_guidelines` 读取手术/操作编码审核规则。\n- 优先按用户提供的 `surgeries` 候选列表审核；未提供时，默认审核 `record.surgery.primarySurgery` 和 `record.surgery.otherSurgeries` 中的全部手术/操作。\n- 调用 skill 内置的 `review_surgery_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- **证据优先**：审核结论必须基于手术记录、术后首次病程记录、出院记录等文书明确支持的信息。\n- **角色边界**：主要手术/操作优先核对与本次住院主要治疗目的、资源消耗和病案首页主要手术选择一致性；其他手术/操作核对是否有明确实施证据。\n- **父类/子类边界**：编码可按规则库从细到粗检索，但父类规则不能自动证明子类编码成立；入路、部位、器械、范围、术式细节不明确时应输出 `待人工复核`。\n- **组套项目边界**：组套名称不能自动拆成多个操作；一项操作也不能自动扩展为组套，除非文书逐项明确记录。\n- **一对一/一对多边界**：候选只支持一个明确操作时，不推断相关附加操作；多个候选共享同一证据时，应分别核对是否均有实施记录。\n- **模糊保守**：字面相似但核心用途不同、仅有术前计划、拟行操作、取消操作或缺少实施记录时，不强行通过。\n- **DRG 边界**：涉及 DRG 分组或手术级别影响时，必须有病历明确支持；不能用模型常识自动升级主要手术。\n\n快速开始\n--------\n\n```bash\n# JSON 结构化病历；未显式传入候选时审核主手术和全部其他手术\npython3 doctor/icd-drg/surgery-review/scripts/run.py \\\n  --input doctor/icd-drg/surgery-review/example/10110_48738508.json \\\n  --appkey <your-appkey> \\\n  --no-llm\n\n# TXT/PDF 等普通病历文件；必须传入待审核手术/操作，可重复传入主手术和其他手术\npython3 doctor/icd-drg/surgery-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 a"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7ft98qwhxyrgcy7b7rzdhrrd8366k6\",\n  \"slug\": \"unisound-surgery-review\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1784169516767\n}"},{"path":"skill-card.md","content":"## Description:\n\nReviews structured medical record data and candidate surgery or procedure codes to return matched coding rules, record evidence, and an audit conclusion.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[unisound-llm](https://clawhub.ai/user/unisound-llm)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users, medical coding reviewers, and healthcare workflow developers use this skill to audit surgery and procedure coding candidates against rule-library guidance and supporting medical-record evidence.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Medical records and bearer credentials can be sent to configurable guideline and LLM endpoints.\n\nMitigation: Use only approved HTTPS endpoints, avoid caller-supplied base URLs, and use --no-llm when records cannot leave the host.\n\nRisk: Inputs may contain real patient identifiers or other sensitive health information.\n\nMitigation: Redact names, identity numbers, phone numbers, detailed addresses, and other identifiers before invoking the skill.\n\nRisk: The --save-prepared option can write plaintext prepared record text to local storage.\n\nMitigation: Do not enable --save-prepared unless local plaintext retention is explicitly approved and protected.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/unisound-llm/skills/unisound-surgery-review)\n- [Internal medical LLM endpoint](https://maas-api.hivoice.cn/v1/chat/completions)\n\n## Skill Output:\n\n**Output Type(s):** [analysis, 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:** [Decision values are limited to pass, fail, or manual review; reasoning is concise and user-facing.]\n\n## Skill Version(s):\n\n1.0.2 (source: server 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-review Owner: unisound-llm Summary: 手术/操作编码审核。输入结构化病案 record 与待审核手术/操作列表，输出编码规则命中、病历证据和审核结论。 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-16T02:38:36.767Z | user - Default model changed from \"u1-insuremed\" to \"u2-med\" in both input field and CLI parameter documentation. - Outdated file skill-card.md removed from the package. - No API or CLI behaviors were changed; only documentation an","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":867,"uniquenessScore":57,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T14:24:04.852Z","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-11T14:24:04.852Z","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-11T17:45:55.897Z","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"}]}}}