From 77010f0598480b6061168302daac673776294bee Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Thu, 10 Oct 2024 14:08:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=87=BA=E9=99=A2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=BC=BA=E9=A1=B5=E5=85=B3=E9=94=AE=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/auto_photo_review.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/photo_review/auto_photo_review.py b/photo_review/auto_photo_review.py index 9960999..a2832cf 100644 --- a/photo_review/auto_photo_review.py +++ b/photo_review/auto_photo_review.py @@ -458,10 +458,20 @@ def photo_review(pk_phhd, name): review_result['has_cost'] = bool(cost_result) # 三项资料缺页判断 page_description = [] - # todo:关键词需根据实际情况调整 - discharge_key = ['入院诊断', '入院日期', '出院日期', '出院诊断', '入院情况', '诊疗经过', '出院情况', '出院医嘱'] - if not all(key in discharge_text for key in discharge_key): - page_description.append('《出院记录》缺页') + discharge_key = { + '入院诊断': ['入院诊断'], + '入院情况': ['入院情况', '入院时情况', '入院时主要症状'], + '入院日期': ['入院日期', '入院时间'], + '诊疗经过': ['诊疗经过', '住院经过', '治疗经过'], + '出院诊断': ['出院诊断'], + '出院情况': ['出院情况', '出院时情况'], + '出院日期': ['出院日期', '出院时间'], + '出院医嘱': ['出院医嘱'] + } + for discharge_item in discharge_key: + if not all(key in discharge_text for key in discharge_key[discharge_item]): + page_description.append(f"《出院记录》缺{discharge_item}") + break cost_missing_page = {} if cost_data['page_nums']: