tw22
This commit is contained in:
@@ -13,7 +13,7 @@ from datetime import datetime
|
|||||||
# ==============================
|
# ==============================
|
||||||
TOKEN_PATH = Path("token.txt")
|
TOKEN_PATH = Path("token.txt")
|
||||||
CLINIC_SLUG = "mudr-buzalkova"
|
CLINIC_SLUG = "mudr-buzalkova"
|
||||||
BASE_DIR = Path(r"u:\Dropbox\!!!Days\Downloads Z230\Medevio_přílohy")
|
BASE_DIR = Path(r"d:\Dropbox\ordinace\Dokumentace_ke_zpracování\Medevio_přílohy")
|
||||||
BASE_DIR.mkdir(parents=True, exist_ok=True)
|
BASE_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
DB_CONFIG = {
|
DB_CONFIG = {
|
||||||
@@ -129,9 +129,16 @@ def main():
|
|||||||
print(f"\n[{i}/{len(rows)}] 📂 {patient_dir.relative_to(BASE_DIR)}")
|
print(f"\n[{i}/{len(rows)}] 📂 {patient_dir.relative_to(BASE_DIR)}")
|
||||||
|
|
||||||
attachments = fetch_attachments(headers, req_id)
|
attachments = fetch_attachments(headers, req_id)
|
||||||
|
|
||||||
|
|
||||||
if not attachments:
|
if not attachments:
|
||||||
print(" ⚠️ No attachments")
|
print(" ⚠️ No attachments")
|
||||||
|
attachmentspocet = " (0)"
|
||||||
continue
|
continue
|
||||||
|
else:
|
||||||
|
attachmentspocet = " ("+str(len(attachments))+")"
|
||||||
|
|
||||||
|
patient_dir=patient_dir+attachmentspocet
|
||||||
|
|
||||||
for a in attachments:
|
for a in attachments:
|
||||||
m = a.get("medicalRecord") or {}
|
m = a.get("medicalRecord") or {}
|
||||||
|
|||||||
Reference in New Issue
Block a user