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 == '出院记录':