← 返回 Skills 市场
unisound-llm

unisound-surgery-sufficiency-review

作者 Unisound-LLM · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
68
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install unisound-surgery-sufficiency-review
功能描述
手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表,输出依据充分性审核结果。
使用说明 (SKILL.md)

手术/操作依据充分性审核

概述

给定结构化病案 record 和待审核手术/操作列表,本技能从手术/操作依据充分性规则库读取指南,核对病历文书证据,输出手术/操作依据是否充分。

本技能会:

  • surgery_sufficiency_guidelines 读取手术/操作依据充分性审核指南。
  • 按手术/操作 role 区分主要手术和其他手术,分别匹配指南适用范围。
  • 优先按用户提供的 surgeries 候选列表审核;未提供时,默认审核 record.surgery.primarySurgeryrecord.surgery.otherSurgeries 中的全部手术/操作。
  • 调用 skill 内置的 review_surgery_sufficiency_record function 完成审核。
  • 通过 scripts/run.py 提供统一 CLI 入口;不转发、不调用当前项目已有 API 服务,也不导入当前项目 app.* 模块。

数据安全、隐私与伦理声明

  • 最小必要原则:仅处理审核所需的病案文书、手术/操作编码和名称。
  • 严格脱敏:调用方应在传入前完成姓名、证件号、手机号、详细地址等可识别身份信息的脱敏。
  • 不做本地持久化:本技能不把请求体、中间结果或审核结果写入本地文件或数据库。
  • 数据库用途:数据库仅用于读取手术/操作依据充分性规则库。
  • 模型调用说明:默认使用内部医疗大模型生成依据充分性判断;鉴权 appkey 必须由调用方传入。如需完全离线规则回退,可传 use_llm=false
  • 医疗边界:输出为医保编码审核辅助信息,不构成医疗诊断或治疗建议。

输入格式

统一入口支持 pdf/doc/docx/xls/xlsx/csv/txt/json。JSON 可为结构化病案;其他格式会先预处理为一份完整病历文书。未显式传入 surgeries 时,会自动审核结构化病案中的主手术/操作和全部其他手术/操作;普通病历文件需要通过参数传入待审核手术/操作列表。

{
  "record": {
    "hospitalId": "988",
    "serialNum": "0001861856",
    "docs": [
      {
        "docName": "手术记录",
        "fileName": "手术记录",
        "docClassName": "手术记录",
        "content": "..."
      }
    ],
    "surgery": {
      "primarySurgery": {"name": "阑尾切除术", "code": "47.0101"},
      "otherSurgeries": []
    }
  },
  "surgeries": [
    {"role": "primary", "code": "47.0101", "name": "阑尾切除术"}
  ],
  "appkey": "由平台分配的鉴权 key",
  "model": "",
  "use_llm": true
}

字段说明:

  • record必填。结构化病案 JSON。
  • surgeries:可选。待审核手术/操作候选数组;每项包含 rolecodename
  • roleprimary 表示主要手术/操作;其他值按其他手术/操作处理。
  • appkey必填。内部医疗大模型鉴权 key,由平台分配;调用时使用 Bearer 鉴权。
  • model:可选。内部医疗大模型名称,默认 u1-insuremed
  • use_llm:可选,默认 true。传 false 时不调用模型,仅使用本地回退审核逻辑。

审核规则

  • 候选优先:只审核输入候选或病案首页中已有手术/操作,不自由生成候选列表外的名称或编码。
  • 实施证据优先:依据充分必须来自手术记录、麻醉记录、术后首次病程记录、出院记录等文书明确支持;不能把病案首页手术列表本身当作充分实施依据。
  • 主要手术边界:主要手术/操作应与本次住院主要治疗目的、资源消耗或 DRG 分组核心操作一致;仅有附带操作或低资源操作时不能自动作为主要手术。
  • 其他手术边界:其他手术/操作应有明确实施记录、部位、术式或服务内容;仅医嘱、计划、术前讨论或取消操作不构成充分依据。
  • 父类/子类边界:父类术式证据不能自动证明子类入路、部位、器械、范围、材料或复杂程度成立;缺少细分证据时输出 待人工复核依据不充分
  • 组套项目边界:组套名称不能自动拆成多个操作;一项操作也不能自动扩展为组套,除非文书逐项明确记录。
  • 一对一/一对多边界:候选只支持一个明确操作时,不推断相关附加操作;多个候选共享同一证据时,应分别核对是否均有实施记录。
  • 模糊保守:字面相似但核心用途不同、仅见“拟行/计划/取消”、耗材用途不明或服务对象不明时,不应判为依据充分。
  • DRG 边界:涉及 DRG 分组、手术级别或严重/一般合并症并发症边界时,必须由病历明确支持;不能用模型常识自动升级。

快速开始

# JSON 结构化病历;未显式传入候选时审核主手术和全部其他手术
python3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \
  --input doctor/icd-drg/surgery-sufficiency-review/example/10110_48738508.json \
  --appkey \x3Cyour-appkey> \
  --no-llm

# TXT/PDF 等普通病历文件;必须传入待审核手术/操作,可重复传入主手术和其他手术
python3 doctor/icd-drg/surgery-sufficiency-review/scripts/run.py \
  --input /path/to/record.txt \
  --appkey \x3Cyour-appkey> \
  --surgery 'primary|32.4100x002|胸腔镜下肺叶切除术' \
  --surgery 'other|34.5100x001|胸腔镜下胸腔粘连松解术' \
  --save-prepared

参数说明

  • --input PATH必填。结构化病案 JSON,或包含 record 的请求体 JSON。
  • --input-type auto|pdf|doc|docx|xls|xlsx|csv|txt|json:输入类型,默认 auto
  • --sheet STRING:读取 Excel 时指定 sheet(可选)。
  • --encoding STRINGtxt/csv 编码,默认 utf-8
  • --surgery STRING:待审核手术/操作,格式 role|code|namecode|name;可重复。
  • --surgeries-json STRING:待审核手术/操作 JSON 字符串或文件路径。
  • 普通 txt/pdf/doc/docx/xls/xlsx/csv 文件不会自动知道待审核手术/操作,必须传 --surgery--surgeries-json
  • --appkey STRING必填。内部医疗大模型鉴权 key,由平台分配;调用时使用 Bearer 鉴权。
  • --base URL:内部大模型 base URL,默认 https://maas-api.hivoice.cn/v1
  • --model STRING:模型名称,默认 u1-insuremed
  • --timeout SECONDS:HTTP 超时秒数;0 表示一直等待,默认 0
  • --no-llm:可选。禁用 LLM,仅使用本地回退逻辑。
  • --output-json PATH:可选。保存响应 JSON;同时传 --output 时优先使用该参数。
  • --output PATH:可选。兼容旧调用方式,等同于 --output-json
  • --save-prepared:可选。保存预处理后的病历文本到 doctor/icd-drg/runs/surgery-sufficiency-review/ 或输出文件所在目录;路径提示输出到 stderr。

输出约定

CLI 只输出 JSON,不输出 Markdown、序号或额外提示语。响应结构:

{
  "final_decision": "依据充分",
  "reasoning": "47.0101 阑尾切除术:依据充分。病历文书存在可支撑该手术/操作的明确实施依据。"
}

final_decision 只能为 依据充分依据不充分待人工复核reasoning 只写面向用户的简洁依据,不展示内部 chain-of-thought。

示例

  • 正例:候选 47.0101 阑尾切除术,手术记录明确记载已实施阑尾切除术,可输出 依据充分
  • 正例:候选其他操作在手术记录或术后病程中有明确实施记录、部位和目的,可输出 依据充分
  • 多项审核例:结构化病案包含 primarySurgery 和多个 otherSurgeries 时,未传 --surgery 也会审核主手术和全部其他手术;普通文件需用多个 --surgery 显式列出。
  • 边界例:文书只记载父类术式,未明确候选子类所需入路、部位、器械或范围,应输出 待人工复核
  • 不应匹配例:仅病案首页手术列表出现候选名称,正文无手术记录、术后记录或实施证据,不应直接判为依据充分。

依赖

运行环境

  • Python 3.11+
  • psycopg[binary]psycopg2

外部服务

  • PostgreSQL:读取 surgery_sufficiency_guidelines
  • 内部医疗大模型:https://maas-api.hivoice.cn/v1/chat/completions

测试命令

skills 根目录执行:

python3 self_tests/med-icd-drg-review/self_test_icd_drg_review.py

备注

  • 数据库连接配置硬编码在 scripts/surgery_sufficiency_review.pyHARDCODED_DATABASE
  • scripts/run.py 是唯一对外入口,复用 scripts/surgery_sufficiency_review.py 的核心审核逻辑。
  • LLM 鉴权 appkey 由用户在调用时传入,脚本不硬编码。
  • 发布目录只保留 SKILL.md_meta.jsonscripts/;示例输入、运行输出、自测脚本放在 skill 包外。
安全使用建议
Install only if you trust the publisher and can verify the source. Confirm that no real database secret is embedded, require secrets to be supplied through a managed mechanism, de-identify patient records before use, avoid `--save-prepared` unless local storage is acceptable, and use `--no-llm` when medical record text must remain offline.
功能分析
Type: OpenClaw Skill Name: unisound-surgery-sufficiency-review Version: 1.0.0 The skill bundle is designed for medical surgery sufficiency reviews but contains hardcoded internal infrastructure details, including a PostgreSQL database host (10.10.20.15) and a specific LLM API endpoint (maas-api.hivoice.cn) in scripts/surgery_sufficiency_review.py. While these appear to be functional requirements for an internal tool, hardcoding internal network addresses and database schemas is a security vulnerability that could facilitate unauthorized internal network access or lateral movement. The script processes sensitive medical records and transmits them to the hardcoded API endpoint, which, although requiring a user-provided appkey, represents a high-risk data flow.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The advertised function is coherent: it reviews surgery/operation sufficiency from structured records, guideline data, and an internal medical LLM. The capability necessarily handles sensitive clinical record text.
Instruction Scope
The documentation says the skill does not persist request, intermediate, or result data locally, but it also documents and demonstrates options that write prepared medical text and output JSON to disk.
Install Mechanism
The embedded _meta.json owner/slug/publishedAt do not match the registry metadata, and the runtime imports a shared preprocessing module outside the package despite no install spec.
Credentials
The skill uses a hardcoded PostgreSQL host/database/user/password block and requires a model appkey, while the registry declares no primary credential or required environment variables.
Persistence & Privilege
There is no evidence of background persistence, but optional --save-prepared can persist full prepared medical records, and database account scope is not declared or user-configurable.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install unisound-surgery-sufficiency-review
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /unisound-surgery-sufficiency-review 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
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.
元数据
Slug unisound-surgery-sufficiency-review
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

unisound-surgery-sufficiency-review 是什么?

手术/操作依据充分性审核。输入结构化病案 record 与待审核手术/操作列表,输出依据充分性审核结果。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 68 次。

如何安装 unisound-surgery-sufficiency-review?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install unisound-surgery-sufficiency-review」即可一键安装,无需额外配置。

unisound-surgery-sufficiency-review 是免费的吗?

是的,unisound-surgery-sufficiency-review 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

unisound-surgery-sufficiency-review 支持哪些平台?

unisound-surgery-sufficiency-review 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 unisound-surgery-sufficiency-review?

由 Unisound-LLM(@unisound-llm)开发并维护,当前版本 v1.0.0。

💬 留言讨论