三项资料分类效果不佳,暂时停用。按数据库存储来分类
This commit is contained in:
@@ -146,21 +146,21 @@ def information_extraction(phrec, pk_phhd):
|
|||||||
ocr_result += tmp_ocr_result
|
ocr_result += tmp_ocr_result
|
||||||
tmp_ocr_text = common_util.ocr_result_to_text(ocr_result)
|
tmp_ocr_text = common_util.ocr_result_to_text(ocr_result)
|
||||||
|
|
||||||
if any(key in tmp_ocr_text for key in ['出院记录', '出院小结', '死亡记录']):
|
# if any(key in tmp_ocr_text for key in ['出院记录', '出院小结', '死亡记录']):
|
||||||
tmp_rec_type = '出院记录'
|
# tmp_rec_type = '出院记录'
|
||||||
elif any(key in tmp_ocr_text for key in ['费用汇总清单', '费用清单', '费用明细', '结账清单', '费用小项统计']):
|
# elif any(key in tmp_ocr_text for key in ['费用汇总清单', '费用清单', '费用明细', '结账清单', '费用小项统计']):
|
||||||
tmp_rec_type = '费用清单'
|
# tmp_rec_type = '费用清单'
|
||||||
elif any(key in tmp_ocr_text for key in ['住院收费票据', '结算单', '财政部监制', '结算凭证']):
|
# elif any(key in tmp_ocr_text for key in ['住院收费票据', '结算单', '财政部监制', '结算凭证']):
|
||||||
tmp_rec_type = '基本医保结算单'
|
# tmp_rec_type = '基本医保结算单'
|
||||||
else:
|
# else:
|
||||||
tmp_rec_type = model_util.clas_text(tmp_ocr_text) if tmp_ocr_text else None
|
# tmp_rec_type = model_util.clas_text(tmp_ocr_text) if tmp_ocr_text else None
|
||||||
if not tmp_rec_type:
|
# if not tmp_rec_type:
|
||||||
rec_dict = {
|
rec_dict = {
|
||||||
'1': '基本医保结算单',
|
'1': '基本医保结算单',
|
||||||
'3': '出院记录',
|
'3': '出院记录',
|
||||||
'4': '费用清单',
|
'4': '费用清单',
|
||||||
}
|
}
|
||||||
tmp_rec_type = rec_dict.get(phrec.cRectype)
|
tmp_rec_type = rec_dict.get(phrec.cRectype)
|
||||||
if tmp_rec_type == '基本医保结算单':
|
if tmp_rec_type == '基本医保结算单':
|
||||||
tmp_info_extract = model_util.ie_settlement(rotated_img, common_util.ocr_result_to_layout(ocr_result))
|
tmp_info_extract = model_util.ie_settlement(rotated_img, common_util.ocr_result_to_layout(ocr_result))
|
||||||
elif tmp_rec_type == '出院记录':
|
elif tmp_rec_type == '出院记录':
|
||||||
|
|||||||
Reference in New Issue
Block a user