{% extends "base.html" %} {% block title %}Accueil{% endblock %} {% block sidebar %} {% for group_name, items in groups.items() %}
{{ group_name }}
{% for item in items %} {{ item.name }} {% endfor %} {% endfor %} {% endblock %} {% block content %}

Dossiers médicaux traités

{% if not groups %}

Aucun dossier trouvé dans output/structured/.

Lancez le pipeline avec python -m src.main pour générer des fichiers.

{% endif %} {% for group_name, items in groups.items() %}
{% set ns = namespace(total=0.0, count=0) %} {% for item in items %} {% if item.dossier.processing_time_s is not none %} {% set ns.total = ns.total + item.dossier.processing_time_s %} {% set ns.count = ns.count + 1 %} {% endif %} {% endfor %} {% set stats = group_stats.get(group_name, {}) %}

{{ group_name }} {{ items|length }} fichier(s){% if ns.count %} — total : {{ ns.total|round(1) }}s{% endif %} {% if stats %} {{ stats.das_count }} DAS {{ stats.actes_count }} actes {% if stats.alertes_count %}{{ stats.alertes_count }} alertes{% endif %} {% if stats.cma_count %}{{ stats.cma_count }} CMA{% endif %} {% endif %}

{% if items|length > 1 %} {% for item in items if 'fusionne' in item.name %} {% if loop.first %}
Vue patient fusionnée
{% endif %} {% endfor %} {% endif %}
{% for item in items %}
{{ item.name }}
{% if item.dossier.document_type %} {{ item.dossier.document_type }} {% endif %} {% if item.dossier.source_files %}fusionné{% endif %} {% if item.dossier.diagnostics_associes %}{{ item.dossier.diagnostics_associes|length }} DAS{% endif %} {% if item.dossier.actes_ccam %}{{ item.dossier.actes_ccam|length }} actes{% endif %} {% if item.dossier.alertes_codage %}{{ item.dossier.alertes_codage|length }} alertes{% endif %}
{% if item.dossier.diagnostic_principal %}
DP : {{ item.dossier.diagnostic_principal.texte[:80] }}{% if item.dossier.diagnostic_principal.texte|length > 80 %}…{% endif %}
{% if item.dossier.diagnostic_principal.cim10_suggestion %}
{{ item.dossier.diagnostic_principal.cim10_suggestion }} {{ item.dossier.diagnostic_principal.cim10_confidence | confidence_badge }}
{% endif %} {% endif %} {% if item.dossier.processing_time_s is not none %}
Traitement : {{ item.dossier.processing_time_s }}s
{% endif %}
{% endfor %}
{% endfor %} {% endblock %}