Commit Graph

2 Commits

Author SHA1 Message Date
dom
56c38c3d98 feat(pmsi): add SynthesePMSI + anti-comorbidity + motif fallback
- SynthesePMSI model + PreuveSynthese in config.py
- SYNTHESE_PMSI prompt template with anti-comorbidity rules
- generate_synthese_pmsi() LLM call + structured parsing
- _postprocess_synthese() deterministic anti-comorbidity correction
- _COMORBIDITES_BANALES (8 patterns with negative lookaheads)
- _PEC_MARKERS_RE (decompensation, urgency markers)
- _build_motif() 3-level cascade (mode_entree → section → lexical fallback)
- 36 tests: anti-comorb, PEC markers, acute problem, postprocess, motif

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 00:01:51 +01:00
dom
aa501789fd feat: scoring DP déterministe + parser CPAM nouveau format + sections CRH
- Nouveau module dp_scoring.py : shortlist, scoring multi-critères, select_dp,
  LLM one-shot fallback avec garde-fous (négation, comorbidité, Z/R-codes)
- Parser CPAM : auto-détection format legacy/ucr_extract, 6 nouveaux champs
  ControleCPAM (codes_etablissement, libelle, codes_retenus, ghm_ghs)
- CRH parser : 3 nouvelles sections (diag_sortie, diag_principal, synthese)
- Prompt DP_LLM_ONESHOT externalisé dans templates.py
- Propagation dp_selection dans fusion.py
- 808 tests passent (dont 21 nouveaux CPAM + 77 dp_scoring + 8 CRH)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:28:59 +01:00