优化医院的匹配
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
x-env:
|
x-env:
|
||||||
&template
|
&template
|
||||||
image: fcb_photo_review:1.12.5
|
image: fcb_photo_review:1.12.6
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ HOSPITAL_ALIAS = {
|
|||||||
"江阴": ["江阴市"],
|
"江阴": ["江阴市"],
|
||||||
"溧阳": ["溧阳市"],
|
"溧阳": ["溧阳市"],
|
||||||
"六合": ["六合区"],
|
"六合": ["六合区"],
|
||||||
|
"沐阳": ["沭阳"],
|
||||||
|
"连水": ["涟水"],
|
||||||
|
"中医医院": ["中医院"],
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -245,6 +245,9 @@ def discharge_task(pk_phhd, discharge_record, identity):
|
|||||||
for hospital in hospitals:
|
for hospital in hospitals:
|
||||||
parsed_hospitals = parse_hospital(hospital)
|
parsed_hospitals = parse_hospital(hospital)
|
||||||
for parsed_hospital in parsed_hospitals:
|
for parsed_hospital in parsed_hospitals:
|
||||||
|
hospital_index = parsed_hospital.find("医院")
|
||||||
|
if hospital_index != -1 and hospital_index != len(parsed_hospital) - 2:
|
||||||
|
parsed_hospital = parsed_hospital[:hospital_index + 2] + "%" + parsed_hospital[hospital_index + 2:]
|
||||||
hospital_like_conditions.append(BdYljg.name.like(f'%{parsed_hospital}%'))
|
hospital_like_conditions.append(BdYljg.name.like(f'%{parsed_hospital}%'))
|
||||||
for hospital_alias_key in HOSPITAL_ALIAS.keys():
|
for hospital_alias_key in HOSPITAL_ALIAS.keys():
|
||||||
if hospital_alias_key in parsed_hospital:
|
if hospital_alias_key in parsed_hospital:
|
||||||
|
|||||||
Reference in New Issue
Block a user