Changement sur la comparaison d'adresse.

This commit is contained in:
Ambulance Clerc
2023-04-20 20:44:38 +02:00
parent e430117d40
commit 3ff3416b39
2 changed files with 16 additions and 11 deletions

19
main.py
View File

@@ -267,8 +267,8 @@ class ClercAttrib2Biz():
o_addresse.lastName = row[9]
o_addresse.firstName = row[10]
o_addresse.birth = row[38]
o_addresse.street = row[11]
o_addresse.street_cpl = row[12]
o_addresse.street = row[12]
o_addresse.street_cpl = row[11]
o_addresse.npa = row[13]
o_addresse.city = row[15]
self.addresses.add_addresse(o_addresse)
@@ -390,7 +390,8 @@ class ClercAttrib2Biz():
return False
if datetime.strptime(new['birthdate'], "%Y-%m-%d").strftime("%d.%m.%Y") != old.birth:
return False
if f"{new['street']} {new['street_number']}" != old.street:
if f"{new['street'].strip()} {new['street_number'].strip()}" != f"{old.street.strip()}":
print(f"({new['street'].strip()} {new['street_number'].strip()}) != [" + old.street.strip()+"]")
return False
if f"{new['postal_code']} {new['city']}" != f"{old.npa} {old.city}":
return False
@@ -514,12 +515,13 @@ class ClercAttrib2Biz():
if data.Patient["complement"] != None:
'''
Désactivé, plus utile
if data.Patient["complement"] != None :
self.a_listings["to_check"].append(data.Patient["fip_number"])
print(data.Patient["complement"])
self.logger.warning(f"Complément patient: facture N°: {data.data['id']} / {data.Patient['fip_number']}")
'''
if data.Patient['insurance_policy_number'] == None:
data.Patient['insurance_policy_number'] = f"{uuid.uuid4()}"[:15]
@@ -758,7 +760,10 @@ class ClercAttrib2Biz():
csv_col.data[116] = self.ifNotNull(data.Patient["category"]) + " - " + self.ifNotNull(data.Intervention["type"])
csv_col.data[118] = data.Intervention["kilometers"]
csv_col.data[135] = data.Intervention["base_name"]
csv_col.data[136] = 3 if data.Debtor["code"] != "101" else "EBILL" #code présentation de facture
if data.Debtor["code"] == "100" or data.Debtor["code"] == "101":
csv_col.data[136] = "EBILL" #code présentation de facture
else:
csv_col.data[136] = 3 #code présentation de facture
csv_col.data[146] = 3 #Code méthode de payement définit à 3
csv_col.data[168] = 1 if data.Intervention["team_name"] == "Planification" else 2
csv_col.data[169] = data.Patient['insurance_policy_number']