Compare commits

..

5 Commits

Author SHA1 Message Date
Ambulance Clerc
e430117d40 Changement de la longueur de l'HUID de 15 à 10 en raison de bug Winbiz 2023-03-01 18:56:40 +01:00
Ambulance Clerc
5060490ac4 Ajout d'un script pour compter les caractères du projet 2023-03-01 18:55:34 +01:00
Ambulance Clerc
d4e5ff6f1b nettoyage du code débiteur 2023-01-24 16:12:08 +01:00
Ambulance Clerc
894a8bbfbb nettoyage du code débiteur 2023-01-24 15:47:51 +01:00
Ambulance Clerc
4d2e2f2351 supression de "(facturation)" 2023-01-24 15:10:03 +01:00
4 changed files with 29 additions and 4 deletions

16
counter.py Normal file
View File

@@ -0,0 +1,16 @@
import os
def count_chars_in_folder(folder_path):
total_chars = 0
for filename in os.listdir(folder_path):
filepath = os.path.join(folder_path, filename)
if os.path.isfile(filepath):
with open(filepath, 'r') as file:
content = file.read()
total_chars += len(content)
print(f"fichier {filepath} = { len(content)}")
return total_chars
folder_path = '.' # mettre le chemin absolu vers le dossier ici
total_chars = count_chars_in_folder(folder_path)
print(f"Le nombre total de caractères dans les fichiers du dossier {folder_path} est : {total_chars}")

View File

@@ -1 +1 @@
20230103-1618
20230301-1856

13
main.py
View File

@@ -1,4 +1,5 @@
import csv
import re
import json
import os
import logging
@@ -353,6 +354,14 @@ class ClercAttrib2Biz():
data.Debtor["street"] = data.Debtor["street"].strip()
if data.data["comments"] is not None:
data.data["comments"] = data.data["comments"].strip().replace("\n",'')
if data.Debtor["code"] is not None:
data.Debtor["code"] = data.Debtor["code"].strip()
data.Debtor["code"] = re.sub(r'[^0-9]', '', data.Debtor["code"])
if "name" in data.Debtor.keys() and data.Debtor["name"] is not None:
data.Debtor["name"] = data.Debtor["name"].replace("(facturation)","")
data.Debtor["name"] = data.Debtor["name"].strip()
def check_code_validity(self, code,data):
ret = True
@@ -832,8 +841,8 @@ class ClercAttrib2Biz():
self.logger.warning(f"Complément 22 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]
if data.Patient['insurance_policy_number'] == None:#Génération d'un code UUID pour remplacer le numéro AVS pour les patients étranger ou AVS inconu
data.Patient['insurance_policy_number'] = f"{uuid.uuid4()}"[:10]

View File

@@ -1 +1 @@
VERSION = "20230103-1618"
VERSION = "20230301-1856"