{% extends 'layouts/base.html' %} {% load i18n %} {% block title %}{% trans "Inquiry" %} #{{ inquiry.reference_number|truncatechars:15 }} - PX360{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% if source_user %} {% trans "My Inquiries" %} {% else %} {% trans "Inquiries" %} {% endif %} {{ inquiry.reference_number|truncatechars:15 }} {{ inquiry.get_status_display }} {% if inquiry.priority %} {{ inquiry.get_priority_display }} {% endif %} {% if not inquiry.sent_to_department %} {% trans "Not Sent to Dept" %} {% endif %}

{{ inquiry.subject }}

{{ inquiry.created_at|date:"Y-m-d" }} {% if can_respond %} {% endif %}

{{ inquiry.message|linebreaks }}

{% if inquiry.short_description_en or inquiry.emotion %}
{% trans "AI Analysis" %}
{% if can_respond and not inquiry.short_description_en %} {% endif %}
{% if inquiry.emotion and inquiry.emotion != 'neutral' %}
{{ inquiry.get_emotion_display }} {% trans "Confidence" %}: {{ inquiry.emotion_confidence_percent|floatformat:0 }}% · {% trans "Intensity" %}: {{ inquiry.emotion_intensity|floatformat:2 }}/1.0
{% endif %}
{% if inquiry.short_description_en %}

{{ inquiry.short_description_en }}

{% if inquiry.short_description_ar %}

{{ inquiry.short_description_ar }}

{% endif %} {% else %}

{% trans "AI analysis is running. Please refresh the page shortly." %}

{% endif %}
{% endif %}

{% trans "Contact Information" %}

  • {% trans "Name" %} {{ inquiry.contact_name|default:"-" }}
  • {% trans "Phone" %} {{ inquiry.contact_phone|default:"-" }}
  • {% trans "Email" %} {{ inquiry.contact_email|default:"-" }}

{% trans "Organization" %}

  • {% trans "Hospital" %} {{ inquiry.hospital.name }}
  • {% if inquiry.department %}
  • {% trans "Department" %} {{ inquiry.department.name }}
  • {% endif %} {% if inquiry.legacy_location %}
  • {% trans "Location" %} {{ inquiry.legacy_location.name }}
  • {% endif %} {% if inquiry.legacy_main_section %}
  • {% trans "Section" %} {{ inquiry.legacy_main_section.name }}
  • {% endif %} {% if inquiry.legacy_subsection %}
  • {% trans "Subsection" %} {{ inquiry.legacy_subsection.name }}
  • {% endif %}
  • {% trans "Category" %} {{ inquiry.get_category_display|default:"-" }}
  • {% if inquiry.taxonomy_domain or inquiry.taxonomy_category or inquiry.taxonomy_subcategory or inquiry.taxonomy_classification %}
  • {% trans "SHCT Taxonomy" %} {{ inquiry.taxonomy_domain.name_en|default:"" }} {% if inquiry.taxonomy_category %} > {{ inquiry.taxonomy_category.name_en }}{% endif %} {% if inquiry.taxonomy_subcategory %} > {{ inquiry.taxonomy_subcategory.name_en }}{% endif %} {% if inquiry.taxonomy_classification %} > {{ inquiry.taxonomy_classification.name_en }}{% endif %}
  • {% endif %} {% if inquiry.outgoing_department %}
  • {% trans "Transferred Dept" %} {{ inquiry.outgoing_department.get_localized_name }} {% if not inquiry.department_responded_at %} {% trans "Awaiting" %} {% else %} {% trans "Responded" %} {% endif %}
  • {% endif %} {% if inquiry.timeline_sla %}
  • {% trans "SLA" %} {{ inquiry.get_timeline_sla_display }}
  • {% endif %}

{% trans "Quick Actions" %}

{% if inquiry.status == 'open' and not inquiry.activated_at %} {% if can_edit %}
{% csrf_token %}
{% csrf_token %}
{% else %}

{% trans "Activate this inquiry to perform actions" %}

{% endif %} {% else %} {% if can_respond %} {% endif %} {% if inquiry.status == 'resolved' or inquiry.status == 'closed' %} {% if can_respond %}
{% csrf_token %}
{% endif %} {% endif %} {% if can_respond %} {% endif %} {% if can_edit and inquiry.status != 'closed' %} {% endif %} {% if can_edit and inquiry.status != 'closed' %} {% trans "Edit" %} {% endif %} {% if can_edit %} {% trans "RCA" %} {% endif %} {% trans "QI Project" %} {% if can_respond %} {% endif %} {% if can_edit and inquiry.status != 'closed' and inquiry.status != 'cancelled' %} {% endif %} {% endif %}
{% if can_edit and inquiry.status != 'closed' %} {% endif %}
{% include "components/send_to_modal.html" with users=assignable_users departments=hospital_departments %} {% include "components/department_response_modal.html" %} {% endblock %}