{% load i18n %} PX360 {{ period_label }} Digest

PX360 {% if period == 'weekly' %}Weekly{% else %}Monthly{% endif %} Digest

{{ period_label }}

{% if hospital_name %}

{{ hospital_name }}

{% endif %}
{% if summary %}

🤖 AI Executive Summary

{{ summary.summary_en }}

{% if summary.key_findings_en %}
{% for f in summary.key_findings_en %}
{{ f }}
{% endfor %}
{% endif %} {% if summary.risk_level %}
{{ summary.risk_level|title }} Risk
{% endif %}
{% endif %}

📊 Key Metrics

{{ metrics.total_complaints|default:"—" }}
Complaints
{{ metrics.sla_compliance|default:"—" }}%
SLA Compliance
{{ metrics.nps_score|default:"—" }}
NPS Score
{{ metrics.avg_survey_score|default:"—" }}
Avg Survey
{{ metrics.total_actions|default:"—" }}
Actions
{{ metrics.avg_resolution_hours|default:"—" }}h
Avg Resolution
{% if early_warnings %}

⚠️ Early Warning Alerts

{% for dept in early_warnings %} {% endfor %}
Department Risk Level Signals
{{ dept.department_name }} {{ dept.risk_score }}% {% if dept.risk_level == 'critical' %}🔴 Critical {% elif dept.risk_level == 'high' %}🟠 High {% elif dept.risk_level == 'medium' %}🟡 Medium {% else %}🟢 Low{% endif %} {{ dept.active_signals }}/5
{% endif %} {% if recommendations %}

💡 AI Recommendations

{% for rec in recommendations %}
{% if rec.priority == 'critical' %}🔴{% elif rec.priority == 'high' %}🟠{% elif rec.priority == 'medium' %}🟡{% else %}🟢{% endif %} {{ rec.category }} ({{ rec.complaint_count }} complaints)

{{ rec.problem_summary_en }}

{% if rec.recommended_actions_en %} {% for action in rec.recommended_actions_en %}
→ {{ action }}
{% endfor %} {% endif %}
{% endfor %}
{% endif %} {% if summary and summary.summary_ar %}

الملخص العربي

{{ summary.summary_ar }}

{% if summary.key_findings_ar %}
{% for f in summary.key_findings_ar %}
{{ f }}
{% endfor %}
{% endif %}
{% endif %}