{% extends "layouts/base.html" %} {% load i18n %} {% block title %}{% trans "Predictive Insights" %} — PX360{% endblock %} {% block content %}
{# ── Header ── #}

{% trans "Predictive Insights" %}

{% trans "AI-detected patterns, anomalies, and early warnings" %}

{% trans "Total" %}: {{ total_insights }} {% if critical_insights %} {% trans "Critical" %}: {{ critical_insights }} {% endif %} {% if high_insights %} {% trans "High" %}: {{ high_insights }} {% endif %} {% trans "New" %}: {{ new_insights }}
{# ── Collapsible Filters ── #}
{% if available_hospitals %}
{% endif %}
{% if current_filters.severity or current_filters.status or current_filters.insight_type or current_filters.hospital %} {% endif %}
{# ── Insights List ── #}
{% for insight in insights %}
{{ insight.get_severity_display }} {{ insight.get_insight_type_display }} · {{ insight.created_at|timesince }} {% trans "ago" %} {% if insight.status == 'acknowledged' %} {% trans "Acknowledged" %} {% endif %}

{{ insight.title_en }}

{{ insight.description_en|truncatewords:40 }}

{% if insight.recommendation_en %}

{% trans "AI Recommendation" %}

{{ insight.recommendation_en }}

{% endif %}
{% if insight.hospital %}{{ insight.hospital.name }}{% endif %} {% if insight.department %}{{ insight.department.name }}{% endif %} {% if insight.confidence_score %}{% trans "Confidence" %}: {{ insight.confidence_score|floatformat:0 }}%{% endif %}
{% if insight.status == 'new' %}
{% endif %}
{% empty %}

{% trans "No Insights Match" %}

{% trans "Try adjusting your filters" %}

{% endfor %}
{# ── Pagination ── #} {% if page_obj.has_other_pages %}
{% if page_obj.has_previous %} {% trans "First" %} {% trans "Previous" %} {% endif %} {% trans "Page" %} {{ page_obj.number }} / {{ page_obj.paginator.num_pages }} {% if page_obj.has_next %} {% trans "Next" %} {% trans "Last" %} {% endif %}
{% endif %}
{% endblock %} {% block extra_js %} {% endblock %}