From 30c1f66f86874e425ba4644f2f036b9f263348f8 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Wed, 12 Jun 2024 09:07:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8C=BB=E4=BF=9D=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=A4=84=E7=90=86=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/photo_review.py | 6 ++++-- photo_review/util/data_util.py | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/photo_review/photo_review.py b/photo_review/photo_review.py index 955e6c9..09261f8 100644 --- a/photo_review/photo_review.py +++ b/photo_review/photo_review.py @@ -17,7 +17,8 @@ from photo_review.entity.zx_ie_settlement import ZxIeSettlement from photo_review.entity.zx_ocr import ZxOcr from photo_review.entity.zx_phhd import ZxPhhd from photo_review.entity.zx_phrec import ZxPhrec -from photo_review.util.data_util import handle_date, handle_decimal, handle_department, handle_name +from photo_review.util.data_util import handle_date, handle_decimal, handle_department, handle_name, \ + handle_insurance_type from photo_review.util.ucloud import get_private_url from photo_review.util.util import get_default_datetime @@ -130,7 +131,8 @@ def photo_review(pk_phhd): "personal_cash_payment_str": get_best_value_in_keys(settlement_list_ie_result, PERSONAL_CASH_PAYMENT), "personal_account_payment_str": get_best_value_in_keys(settlement_list_ie_result, PERSONAL_ACCOUNT_PAYMENT), "personal_funded_amount_str": get_best_value_in_keys(settlement_list_ie_result, PERSONAL_FUNDED_AMOUNT), - "medical_insurance_type": get_best_value_in_keys(settlement_list_ie_result, MEDICAL_INSURANCE_TYPE) + "medical_insurance_type": handle_insurance_type( + get_best_value_in_keys(settlement_list_ie_result, MEDICAL_INSURANCE_TYPE)) } settlement_data["admission_date"] = handle_date(settlement_data["admission_date_str"]) settlement_data["admission_date"] = handle_date(settlement_data["admission_date_str"]) diff --git a/photo_review/util/data_util.py b/photo_review/util/data_util.py index 750d974..e94b32e 100644 --- a/photo_review/util/data_util.py +++ b/photo_review/util/data_util.py @@ -81,3 +81,10 @@ def handle_name(string): if not string: return "" return re.sub(r'[^⺀-鿿·]', '', string) + + +# 处理医保类型数据 +def handle_insurance_type(string): + if not string: + return "" + return string.replace(":", "").replace(":", "")