调整信息抽取方法的生成位置
This commit is contained in:
@@ -19,8 +19,7 @@ from sqlalchemy import update
|
||||
from config.keys import PATIENT_NAME, ADMISSION_DATE, DISCHARGE_DATE, MEDICAL_EXPENSES, PERSONAL_CASH_PAYMENT, \
|
||||
PERSONAL_ACCOUNT_PAYMENT, PERSONAL_FUNDED_AMOUNT, MEDICAL_INSURANCE_TYPE, HOSPITAL, DEPARTMENT, DOCTOR
|
||||
from config.mysql import MysqlSession
|
||||
from config.photo_review import PHHD_BATCH_SIZE, SLEEP_MINUTES
|
||||
from photo_review import settlement_ie, discharge_ie, cost_ie
|
||||
from config.photo_review import PHHD_BATCH_SIZE, SLEEP_MINUTES, SETTLEMENT_IE, DISCHARGE_IE, COST_IE
|
||||
from photo_review.entity.bd_yljg import BdYljg
|
||||
from photo_review.entity.bd_ylks import BdYlks
|
||||
from photo_review.entity.zx_ie_cost import ZxIeCost
|
||||
@@ -220,7 +219,7 @@ def photo_review(pk_phhd):
|
||||
elif phrec.cRectype == "4":
|
||||
cost_list.append(phrec)
|
||||
|
||||
settlement_list_ie_result = information_extraction(settlement_ie, settlement_list)
|
||||
settlement_list_ie_result = information_extraction(SETTLEMENT_IE, settlement_list)
|
||||
settlement_data = {
|
||||
"pk_phhd": pk_phhd,
|
||||
"name": handle_name(get_best_value_in_keys(settlement_list_ie_result, PATIENT_NAME)),
|
||||
@@ -246,7 +245,7 @@ def photo_review(pk_phhd):
|
||||
settlement_data["personal_funded_amount"] = handle_decimal(settlement_data["personal_funded_amount_str"])
|
||||
save_or_update_ie(ZxIeSettlement, pk_phhd, settlement_data)
|
||||
|
||||
discharge_record_ie_result = information_extraction(discharge_ie, discharge_record)
|
||||
discharge_record_ie_result = information_extraction(DISCHARGE_IE, discharge_record)
|
||||
discharge_data = {
|
||||
"pk_phhd": pk_phhd,
|
||||
"hospital": get_best_value_in_keys(discharge_record_ie_result, HOSPITAL),
|
||||
@@ -283,7 +282,7 @@ def photo_review(pk_phhd):
|
||||
discharge_data["department"] = ylks.name
|
||||
save_or_update_ie(ZxIeDischarge, pk_phhd, discharge_data)
|
||||
|
||||
cost_list_ie_result = information_extraction(cost_ie, cost_list)
|
||||
cost_list_ie_result = information_extraction(COST_IE, cost_list)
|
||||
cost_data = {
|
||||
"pk_phhd": pk_phhd,
|
||||
"name": handle_name(get_best_value_in_keys(cost_list_ie_result, PATIENT_NAME)),
|
||||
|
||||
Reference in New Issue
Block a user