Install
openclaw skills install @unisound-llm/med-chronic-disease-review门诊慢病审核(糖尿病/高血压)。输入 OCR 结果数组 JSON,输出审核结论与原因(原始 JSON + 自然语言结论)。
openclaw skills install @unisound-llm/med-chronic-disease-review给定一份 OCR 结果数组(每项包含 fileName/page/docType/ocrText),本技能会:
输入必须是 JSON 数组(list),示例:
[
{"fileName":"xxx.pdf","page":1,"docType":"出院记录","ocrText":"..."},
{"fileName":"xxx.pdf","page":2,"docType":"检验报告","ocrText":"..."}
]
也支持通过统一入口 scripts/run.py 直接输入 pdf/doc/docx/xls/xlsx/csv/txt/json。
预处理成功后,会先归一化为 ocr_array.json(每项含 fileName/page/docType/ocrText),再调用本 skill 的原始审核逻辑。
从 skills 目录执行:
# 糖尿病
python3 scripts/run.py \
--disease-code diabetes \
--input data/med-chronic-disease-review/糖尿病_ocr_task_result.json
# 高血压
python3 scripts/run.py \
--disease-code hypertension \
--input data/med-chronic-disease-review/高血压_ocr_task_result.json
# 或继续直接使用原始 OCR 数组入口
python3 scripts/chronic_disease_review.py \
--disease-code diabetes \
--input data/med-chronic-disease-review/糖尿病_ocr_task_result.json
# 高血压
python3 scripts/chronic_disease_review.py \
--disease-code hypertension \
--input data/med-chronic-disease-review/高血压_ocr_task_result.json
--disease-code STRING:必填。糖尿病/高血压(也支持 diabetes/hypertension/dm/htn 别名)。本 skill 每次只审核一个病种。--review-type STRING:可选。默认 慢病审核(也可传 大病审核 等服务支持的值)。--input PATH:OCR 数组 JSON(UTF-8)。--base URL:后端 base(默认:http://10.10.20.15:9011)。--llm-model STRING:可选。模型名。--timeout SECONDS:HTTP 超时;0 表示一直等待(默认:0)。--output-json PATH:保存原始返回 JSON(默认:../runs/med-chronic-disease-review/{scenario}_resp.json)。--output-text PATH:保存自然语言摘要(默认:../runs/med-chronic-disease-review/{scenario}_resp.txt)。scripts/run.py)--input-type auto|pdf|doc|docx|xls|xlsx|csv|txt|json:输入类型;默认 auto。--sheet STRING:读取 Excel 时指定 sheet(可选)。--encoding STRING:txt/csv 编码(默认:utf-8)。--save-prepared:保存预处理后的 OCR 数组 JSON,便于调试。final_decision:通过/不通过reasoning:原因(可选)https://shangbao.yunzhisheng.cn/skills/chronic-disease
/api/v1/review/flow/by-ocrshangbao.yunzhisheng.cn| 包名 | 用途 | 必要条件 |
|---|---|---|
openpyxl | 读取 .xlsx 文件 | 输入为 xlsx 时必须 |
pypdf | 提取 PDF 文本 | 输入为 pdf 时必须(或用 pdftotext 替代) |
安装:pip install openpyxl pypdf
| 工具 | 用途 | 必要条件 |
|---|---|---|
LibreOffice (soffice) | 转换 .doc / .xls 为文本 | 输入为 doc/xls 时必须 |
pdftotext(poppler-utils) | 提取 PDF 文本 | 输入为 pdf 且未安装 pypdf 时必须 |
tesseract(含 chi_sim+eng 语言包) | 图片 OCR | 输入为 png/jpg/bmp/tif 等图片时必须 |
安装(Ubuntu/Debian):sudo apt-get install libreoffice poppler-utils tesseract-ocr tesseract-ocr-chi-sim
仅使用 JSON 输入时,无需安装任何第三方包或外部工具。
../data/、../runs/、../self_tests/),skill 目录内仅保留可发布的核心文件(scripts/、SKILL.md、_meta.json)。