From 401954dca03236ad563485c1ae18f4a8917a15f3 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Fri, 18 Oct 2024 13:04:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=89=E9=A1=B9=E8=B5=84?= =?UTF-8?q?=E6=96=99=E5=88=86=E7=B1=BB=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/auto_photo_review.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/photo_review/auto_photo_review.py b/photo_review/auto_photo_review.py index 9cc66b6..f32ca47 100644 --- a/photo_review/auto_photo_review.py +++ b/photo_review/auto_photo_review.py @@ -146,7 +146,14 @@ def information_extraction(phrec, pk_phhd): ocr_result += tmp_ocr_result tmp_ocr_text = common_util.ocr_result_to_text(ocr_result) - tmp_rec_type = model_util.clas_text(tmp_ocr_text) if ocr_text else None + if any(key in tmp_ocr_text for key in ['出院记录', '出院小结', '死亡记录']): + tmp_rec_type = '出院记录' + elif any(key in tmp_ocr_text for key in ['费用汇总清单', '费用清单', '费用明细', '结账清单', '费用小项统计']): + tmp_rec_type = '费用清单' + elif any(key in tmp_ocr_text for key in ['住院收费票据', '结算单', '财政部监制', '结算凭证']): + tmp_rec_type = '基本医保结算单' + else: + tmp_rec_type = model_util.clas_text(tmp_ocr_text) if tmp_ocr_text else None if not tmp_rec_type: rec_dict = { '1': '基本医保结算单',