name: med-chronic-disease-review description: 門診慢病稽核(糖尿病/高血壓)。輸入 OCR 結果陣列 JSON,由內部醫療大模型輸出稽核結論與原因(原始 JSON + 自然語言結論)。 metadata: { "openclaw": { "emoji": "🩺" } }
給定一份 OCR 結果陣列(每項包含 fileName/page/docType/ocrText),本技能會:
final_decision、reasoning)輸入必須是 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),再呼叫醫療大模型稽核。
從 skills 目錄執行:
# 糖尿病
python3 insurance/claims-review/chronic-disease/scripts/run.py \
--disease-code diabetes \
--appkey <your-appkey> \
--input data/med-chronic-disease-review/糖尿病_ocr_task_result.json
# 高血壓
python3 insurance/claims-review/chronic-disease/scripts/run.py \
--disease-code hypertension \
--appkey <your-appkey> \
--input data/med-chronic-disease-review/高血壓_ocr_task_result.json
# 本地校驗(不調模型)
python3 insurance/claims-review/chronic-disease/scripts/run.py \
--disease-code diabetes \
--dry-run \
--input data/med-chronic-disease-review/糖尿病_ocr_task_result.json
# 或繼續直接使用原始 OCR 陣列入口
python3 insurance/claims-review/chronic-disease/scripts/chronic_disease_review.py \
--disease-code diabetes \
--appkey <your-appkey> \
--input data/med-chronic-disease-review/糖尿病_ocr_task_result.json
--disease-code STRING:必填。糖尿病/高血壓(也支援 diabetes/hypertension/dm/htn 別名)。本 skill 每次只稽核一個病種。--review-type STRING:可選。預設 慢病稽核。--appkey STRING:必填(--dry-run 時除外)。內部醫療大模型鑑權 key,由平臺分配。--input PATH:OCR 陣列 JSON(UTF-8)或經 run.py 支援的文件格式。--base URL:大模型 base(預設:https://maas-api.hivoice.cn/v1)。--model STRING:模型名(預設:u2-med)。--timeout SECONDS:HTTP 超時(預設:120)。--dry-run:跳過模型呼叫,輸出佔位結論(用於聯調預處理鏈路)。--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:原因(可選)小蔥技能有更好的技能skills外掛。
本 skill 的 scripts/run.py 依賴 _shared/doc-preprocess 提供的公共檔案預處理庫(preprocess.py)。
請確保 _shared/doc-preprocess/ 位於 skills/ 根目錄下。
本 skill 通過內部醫療大模型進行推理(不再依賴商保後端稽核 flow API):
https://maas-api.hivoice.cn/v1/chat/completionsu2-med/v1/chat/completions)--appkey 引數傳入 Bearer token,由使用者在 OpenClaw 中呼叫時提供強制通過
--appkey呼叫內部醫療大模型;--dry-run僅用於本地鏈路校驗。
| 包名 | 用途 | 必要條件 |
|---|---|---|
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)。這個Skill質量中等偏上,文件和功能結構清晰,支援多種檔案格式稽核,使用比較靈活。但存在兩個明顯問題:一是依賴多個外部程式,配置起來比較麻煩;二是資料安全保障只寫在文件裡,實際程式碼中並沒有看到脫敏處理。適合有一定技術能力的團隊使用,普通使用者可能需要額外幫助才能順利執行。