From 248e49bf4be0987e8299129c8f9a28e69fc74095 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Fri, 18 Oct 2024 13:39:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E9=A1=B9=E8=B5=84=E6=96=99=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E6=95=88=E6=9E=9C=E4=B8=8D=E4=BD=B3=EF=BC=8C=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E5=81=9C=E7=94=A8=E3=80=82=E6=8C=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=82=A8=E6=9D=A5=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/auto_photo_review.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/photo_review/auto_photo_review.py b/photo_review/auto_photo_review.py index f32ca47..c4561e6 100644 --- a/photo_review/auto_photo_review.py +++ b/photo_review/auto_photo_review.py @@ -146,21 +146,21 @@ def information_extraction(phrec, pk_phhd): ocr_result += tmp_ocr_result tmp_ocr_text = common_util.ocr_result_to_text(ocr_result) - 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': '基本医保结算单', - '3': '出院记录', - '4': '费用清单', - } - tmp_rec_type = rec_dict.get(phrec.cRectype) + # 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': '基本医保结算单', + '3': '出院记录', + '4': '费用清单', + } + tmp_rec_type = rec_dict.get(phrec.cRectype) if tmp_rec_type == '基本医保结算单': tmp_info_extract = model_util.ie_settlement(rotated_img, common_util.ocr_result_to_layout(ocr_result)) elif tmp_rec_type == '出院记录':