Version fonctionnelle
This commit is contained in:
232
DOCUMENTATION/DOCUMENTATION_33_QUICK_REFERENCE.md
Normal file
232
DOCUMENTATION/DOCUMENTATION_33_QUICK_REFERENCE.md
Normal file
@@ -0,0 +1,232 @@
|
||||
# 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)
|
||||
Reference in New Issue
Block a user