{% endif %}
{% if dossier.processing_time_s is not none %}
{{ dossier.processing_time_s }}s
{% endif %}
{# ---- Séjour ---- #}
{% set s = dossier.sejour %}
{% if s.sexe or s.age or s.date_entree or s.date_sortie or s.duree_sejour is not none or s.imc or s.poids or s.taille %}
Séjour
{% if s.sexe %}
{{ s.sexe }}
{% endif %}
{% if s.age is not none %}
{{ s.age }} ans
{% endif %}
{% if s.date_entree %}
{{ s.date_entree }}
{% endif %}
{% if s.date_sortie %}
{{ s.date_sortie }}
{% endif %}
{% if s.duree_sejour is not none %}
{{ s.duree_sejour }} jour(s)
{% endif %}
{% if s.mode_entree %}
{{ s.mode_entree }}
{% endif %}
{% if s.mode_sortie %}
{{ s.mode_sortie }}
{% endif %}
{% if s.poids %}
{{ s.poids }} kg
{% endif %}
{% if s.taille %}
{{ s.taille }} cm
{% endif %}
{% if s.imc %}
{{ s.imc }}
{% endif %}
{% endif %}
{# ---- Diagnostic principal ---- #}
{% if dossier.diagnostic_principal %}
{% set dp = dossier.diagnostic_principal %}
Diagnostic principal
{{ dp.texte }}
{% if dp.cim10_suggestion %}
{{ dp.cim10_suggestion }}
{{ dp.cim10_confidence | confidence_badge }}
{% endif %}
{% if dp.justification %}
{{ dp.justification }}
{% endif %}
{% if dp.sources_rag %}
Sources RAG ({{ dp.sources_rag|length }})
{% for src in dp.sources_rag %}
{{ src.document }}{% if src.code %} — {{ src.code }}{% endif %}{% if src.page %} [p.{{ src.page }}]{% endif %}
{{ src.extrait or '' }}