Compare commits
5 Commits
20230103-1
...
20230301-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e430117d40 | ||
|
|
5060490ac4 | ||
|
|
d4e5ff6f1b | ||
|
|
894a8bbfbb | ||
|
|
4d2e2f2351 |
16
counter.py
Normal file
16
counter.py
Normal 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}")
|
||||||
@@ -1 +1 @@
|
|||||||
20230103-1618
|
20230301-1856
|
||||||
13
main.py
13
main.py
@@ -1,4 +1,5 @@
|
|||||||
import csv
|
import csv
|
||||||
|
import re
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
@@ -353,6 +354,14 @@ class ClercAttrib2Biz():
|
|||||||
data.Debtor["street"] = data.Debtor["street"].strip()
|
data.Debtor["street"] = data.Debtor["street"].strip()
|
||||||
if data.data["comments"] is not None:
|
if data.data["comments"] is not None:
|
||||||
data.data["comments"] = data.data["comments"].strip().replace("\n",'')
|
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):
|
def check_code_validity(self, code,data):
|
||||||
ret = True
|
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']}")
|
self.logger.warning(f"Complément 22 patient: facture N°: {data.data['id']} / {data.Patient['fip_number']}")
|
||||||
|
|
||||||
|
|
||||||
if data.Patient['insurance_policy_number'] == None:
|
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()}"[:15]
|
data.Patient['insurance_policy_number'] = f"{uuid.uuid4()}"[:10]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
VERSION = "20230103-1618"
|
VERSION = "20230301-1856"
|
||||||
Reference in New Issue
Block a user