refactor: réorganisation référentiels, nouveaux modules extraction, nettoyage code obsolète
- Réorganisation data/referentiels/ : pdfs/, dicts/, user/ (structure unifiée) - Fix badges "Source absente" sur page admin référentiels - Ré-indexation COCOA 2025 (555 → 1451 chunks, couverture 94%) - Fix VRAM OOM : embeddings forcés CPU via T2A_EMBED_CPU - Nouveaux modules : document_router, docx_extractor, image_extractor, ocr_engine - Module complétude (quality/completude.py + config YAML) - Template DIM (synthèse dimensionnelle) - Gunicorn config + systemd service t2a-viewer - Suppression t2a_install_rag_cleanup/ (copie obsolète) - Suppression scripts/ et scripts_t2a_v2/ (anciens benchmarks) - Suppression 81 fichiers _doc.txt de test - Cache Ollama : TTL configurable, corrections loader YAML - Dashboard : améliorations templates (base, index, detail, cpam, validation) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -135,46 +135,46 @@ class TestVeto22SameCategory:
|
||||
|
||||
|
||||
# ================================================================
|
||||
# VETO-23 : Exclusions mutuelles
|
||||
# VETO-25 : Exclusions mutuelles (ex-VETO-23, refactorisé via diagnostic_conflicts.yaml)
|
||||
# ================================================================
|
||||
|
||||
class TestVeto23MutualExclusions:
|
||||
class TestVeto25MutualExclusions:
|
||||
def test_e10_e11_mutual(self):
|
||||
"""E10 + E11 = diabète type 1 et 2 → VETO-23."""
|
||||
"""E10 + E11 = diabète type 1 et 2 → VETO-25."""
|
||||
d = _make_dossier(dp_code="E10.9", das_codes=["E11.9", "I10"])
|
||||
report = apply_vetos(d)
|
||||
v23 = [i for i in report.issues if i.veto == "VETO-23"]
|
||||
assert len(v23) == 1
|
||||
assert "Diabète" in v23[0].message
|
||||
v25 = [i for i in report.issues if i.veto == "VETO-25"]
|
||||
assert len(v25) == 1
|
||||
assert "Diabète" in v25[0].message
|
||||
|
||||
def test_i10_i11_mutual(self):
|
||||
"""I10 + I11 = HTA essentielle + secondaire → VETO-23."""
|
||||
"""I10 + I11 = HTA essentielle + secondaire → VETO-25."""
|
||||
d = _make_dossier(dp_code="I10", das_codes=["I11.9"])
|
||||
report = apply_vetos(d)
|
||||
v23 = [i for i in report.issues if i.veto == "VETO-23"]
|
||||
assert len(v23) == 1
|
||||
assert "HTA" in v23[0].message
|
||||
v25 = [i for i in report.issues if i.veto == "VETO-25"]
|
||||
assert len(v25) == 1
|
||||
assert "HTA" in v25[0].message
|
||||
|
||||
def test_i10_i13_mutual(self):
|
||||
"""I10 + I13 (HTA cardiorénale) → VETO-23."""
|
||||
"""I10 + I13 (HTA cardiorénale) → VETO-25."""
|
||||
d = _make_dossier(dp_code="K35.8", das_codes=["I10", "I13.0"])
|
||||
report = apply_vetos(d)
|
||||
v23 = [i for i in report.issues if i.veto == "VETO-23"]
|
||||
assert len(v23) == 1
|
||||
v25 = [i for i in report.issues if i.veto == "VETO-25"]
|
||||
assert len(v25) == 1
|
||||
|
||||
def test_no_mutual_exclusion(self):
|
||||
"""Pas de conflit → pas de VETO-23."""
|
||||
"""Pas de conflit → pas de VETO-25."""
|
||||
d = _make_dossier(dp_code="E11.9", das_codes=["I10", "K35.8"])
|
||||
report = apply_vetos(d)
|
||||
v23 = [i for i in report.issues if i.veto == "VETO-23"]
|
||||
assert len(v23) == 0
|
||||
v25 = [i for i in report.issues if i.veto == "VETO-25"]
|
||||
assert len(v25) == 0
|
||||
|
||||
def test_e10_alone_no_veto(self):
|
||||
"""E10 seul → pas de VETO-23."""
|
||||
"""E10 seul → pas de VETO-25."""
|
||||
d = _make_dossier(dp_code="E10.9", das_codes=["I10"])
|
||||
report = apply_vetos(d)
|
||||
v23 = [i for i in report.issues if i.veto == "VETO-23"]
|
||||
assert len(v23) == 0
|
||||
v25 = [i for i in report.issues if i.veto == "VETO-25"]
|
||||
assert len(v25) == 0
|
||||
|
||||
|
||||
# ================================================================
|
||||
@@ -237,7 +237,7 @@ class TestVerdictIntegration:
|
||||
veto_ids = {i.veto for i in report.issues}
|
||||
# Z45 interdit en DP → VETO-20
|
||||
assert "VETO-20" in veto_ids
|
||||
# E10+E11 → VETO-23
|
||||
assert "VETO-23" in veto_ids
|
||||
# E10+E11 → VETO-25 (ex-VETO-23, via diagnostic_conflicts.yaml)
|
||||
assert "VETO-25" in veto_ids
|
||||
# S72 sans externe → VETO-24
|
||||
assert "VETO-24" in veto_ids
|
||||
|
||||
Reference in New Issue
Block a user