# Endobest Dashboard - One Page Reference --- ## 🚀 DĂ©marrage (3 commandes) ```bash python eb_dashboard.py # Collecte complĂšte (2-5 min) python eb_dashboard.py --excel-only # Export rapide (5-15 sec) python eb_dashboard.py --check-only # Validation uniquement (5-10 sec) ``` --- ## 📊 Flux Principal ``` AUTHENTIFICATION → ORGANISATIONS → INCLUSIONS PATIENTS → QUALITÉ → EXPORT JSON+EXCEL (2-3s) (5-8s) (2-4 min) (10-15s) (3-20s) ``` --- ## ⚙ Configuration (Fichier: `config/Endobest_Dashboard_Config.xlsx`) | Feuille | Purpose | Quand modifier | |---------|---------|---| | **Inclusions_Mapping** | Champs Ă  extraire | Ajouter/modifier champs | | **Excel_Workbooks** | Classeurs Excel | CrĂ©er nouveaux rapports | | **Excel_Sheets** | Contenu + filtres/tris | Modifier rapports | | **Regression_Check** | RĂšgles validation | Adapter rĂšgles qualitĂ© | --- ## 🔄 Traitement Champ (RĂ©capitulatif) ``` Source (questionnaire/record/inclusion/request/calculated) ↓ Extraction (JSON path + wildcards) ↓ Condition (optionnelle) ↓ Transformations (labels/templates/boolĂ©ens) ↓ Stockage (nested JSON structure) ``` --- ## 📁 Fichiers Sortie | Fichier | Taille | Contenu | |---------|--------|---------| | `endobest_inclusions.json` | 6-7 MB | DonnĂ©es patients | | `endobest_organizations.json` | 17-20 KB | Stats organisations | | `[Excel files]` | Variable | Rapports configurĂ©s | | `dashboard.log` | Variable | Logs exĂ©cution | --- ## ✅ ContrĂŽles QualitĂ© | Type | Teste | SĂ©vĂ©ritĂ© | |------|-------|----------| | **CohĂ©rence** | API stats vs donnĂ©es rĂ©elles | ⚠ Warning / 🔮 Critical | | **RĂ©gression** | Changements vs exĂ©cution prĂ©cĂ©dente | ⚠ Warning / 🔮 Critical | --- ## đŸ§” Multithreading - **Organisations:** 20 workers (parallĂ©le) - **Patients (async):** 40 workers (non-bloquant) - **Questionnaires:** ⚡ 1 appel optimisĂ© par patient (4-5x plus rapide!) --- ## 🔑 APIs UtilisĂ©es ``` IAM → Authentification (login) RC → Organizations, Inclusions, Records, Questionnaires GDD (Lab) → RequĂȘtes lab & rĂ©sultats ``` --- ## đŸ›Ąïž Gestion Erreurs | Erreur | RĂ©action | |--------|----------| | **401 (Token expirĂ©)** | Refresh automatique + Retry | | **Network error** | Retry aprĂšs 0.5 sec (10x max) | | **Fichier config manquant** | Erreur claire + Exit | | **ProblĂšmes critiques qualitĂ©** | Confirmation utilisateur | --- ## 📈 Performance Typique ``` Petit (50 orgs) : 5-10 min Moyen (100+ orgs) : 10-20 min Grand (200+ orgs) : 20-30 min ``` **Mode `--excel_only`:** 5-15 sec (indĂ©pendant des donnĂ©es) --- ## 🎯 Cas d'Usage Rapides | Besoin | Commande | |--------|----------| | Collecte rĂ©guliĂšre | `python eb_dashboard.py` | | Reconfigurer rapports | `python eb_dashboard.py --excel_only` | | VĂ©rifier donnĂ©es | `python eb_dashboard.py --check-only` | | DĂ©boguer | `python eb_dashboard.py --debug` | --- ## 📚 Documentation | Document | DurĂ©e | Pour qui | |----------|-------|----------| | **QUICK_START_GUIDE** | 5 min | Tous | | **SUMMARY_ARCHITECTURE** | 30 min | Devs/Admins | | **DOCUMENTATION_99_CONFIG** | 20 min | Admins | | **DOCUMENTATION_02_FIELD_MAPPING** | 45 min | Config avancĂ©e | | **DOCUMENTATION_03_QUALITY_CHECKS** | 45 min | QA advanced | | **DOCUMENTATION_04_EXCEL_EXPORT** | 30 min | Rapports Excel | | **DOCUMENTATION_01_ARCHITECTURE** | 60 min | Deep technical | | **DOCUMENTATION_98_USER_GUIDE** | 15 min | FAQ + Support | | **VISUAL_FLOWCHART** | 15 min | Flux diagrammĂ©s | | **INDEX_DOCUMENTATION** | 5 min | Navigation | --- ## 🔧 Fonctions PersonnalisĂ©es (4 Built-in) ```python search_in_fields_using_regex # Recherche pattern extract_parentheses_content # Extrait texte (...) append_terminated_suffix # Ajoute suffixe si terminĂ© if_then_else # Logique conditionnelle (8 opĂ©rateurs) ``` --- ## 📝 Checklist DĂ©marrage - [ ] Python 3.7+ installĂ© - [ ] `pip install httpx openpyxl questionary tqdm rich` - [ ] `config/Endobest_Dashboard_Config.xlsx` prĂ©sent - [ ] Identifiants Ziwig disponibles - [ ] ExĂ©cuter: `python eb_dashboard.py` --- ## 🔐 SĂ©curitĂ© Basique ⚠ **DonnĂ©es patients:** Traiter selon protocoles Ă©tablis ⚠ **JSON files:** Stocker en lieu sĂ»r ⚠ **Logs:** Peuvent contenir infos sensibles ✅ **Token refresh:** Automatique et thread-safe ✅ **Backups:** Fichiers `_old` créés auto --- ## 🆘 ProblĂšmes Courants | ProblĂšme | Solution | |----------|----------| | Login Ă©choue | VĂ©rifier identifiants & connexion internet | | Template not found | VĂ©rifier `config/templates/` | | Pas de donnĂ©es Excel | Filtres trop stricts? | | Slow script | Augmenter threads jusqu'Ă  20 | | Erreur config | Valider JSON dans Excel | **→ Plus d'aide:** `dashboard.log` + `--debug` flag --- ## 📑 Fichiers Principaux ``` eb_dashboard.py Orchestrateur (57.5 KB) ├─ eb_dashboard_utils.py Utilitaires (6.4 KB) ├─ eb_dashboard_quality_checks.py Validation (58.5 KB) └─ eb_dashboard_excel_export.py Excel (32 KB) config/ ├─ Endobest_Dashboard_Config.xlsx ← Configuration ├─ eb_org_center_mapping.xlsx ← Optional enrichment └─ templates/ ← Excel templates ``` --- ## ⚡ Performance Tips 1. Threads = Plus rapide (mais utilise plus rĂ©seau) 2. Mode `--excel_only` = Test configurations rapidement 3. `--check-only` = Valide avant distribution 4. `dashboard.log` = Debug errors --- ## 🎓 Apprendre Plus **5 min:** [DOCUMENTATION_32_QUICK_START.md](DOCUMENTATION_32_QUICK_START.md) **30 min:** [DOCUMENTATION_30_ARCHITECTURE_SUMMARY.md](DOCUMENTATION_30_ARCHITECTURE_SUMMARY.md) **60 min:** [DOCUMENTATION_10_ARCHITECTURE.md](DOCUMENTATION_10_ARCHITECTURE.md) **→ Tous les docs:** [DOCUMENTATION_35_NAVIGATION_INDEX.md](DOCUMENTATION_35_NAVIGATION_INDEX.md) --- ## 💡 ClĂ©: 100% Configuration Excel ✅ Ajouter champ → Éditer `Inclusions_Mapping` ✅ Modifier rapport → Éditer `Excel_Sheets` ✅ Adapter validation → Éditer `Regression_Check` **ZĂ©ro modification code** 🎉 --- **Status:** ✅ Production Ready **Version:** 1.0 (2025-11-08) **Questions?** Voir [DOCUMENTATION_35_NAVIGATION_INDEX.md](DOCUMENTATION_35_NAVIGATION_INDEX.md)