{% extends 'layouts/base.html' %} {% load i18n %} {% load static %} {% block title %}Inquiry #{{ inquiry.id|slice:":8" }} - PX360{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% if source_user %} {% trans "Back to My Inquiries" %} {% else %} {% trans "Back to Inquiries" %} {% endif %}

{{ inquiry.subject }}

{% trans "Inquiry" %} {% if inquiry.status == 'open' %} {% trans "Open" %} {% elif inquiry.status == 'in_progress' %} {% trans "In Progress" %} {% elif inquiry.status == 'resolved' %} {% trans "Resolved" %} {% elif inquiry.status == 'closed' %} {% trans "Closed" %} {% endif %} {% if inquiry.priority %} {% if inquiry.priority == 'low' %} {% trans "Low" %} {% elif inquiry.priority == 'medium' %} {% trans "Medium" %} {% elif inquiry.priority == 'high' %} {% trans "High" %} {% elif inquiry.priority == 'urgent' %} {% trans "Urgent" %} {% endif %} {% endif %}

{% trans "ID" %}: {{ inquiry.id|slice:":8" }} {% if inquiry.patient %} | {% trans "Patient" %}: {{ inquiry.patient.get_full_name }} ({% trans "MRN" %}: {{ inquiry.patient.mrn }}) {% else %} | {% trans "Contact" %}: {{ inquiry.contact_name|default:inquiry.contact_email }} {% endif %}

{% trans "Hospital" %}: {{ inquiry.hospital.name_en }} {% if inquiry.department %} | {% trans "Department" %}: {{ inquiry.department.name_en }} {% endif %}

{% if inquiry.due_date %}
{% trans "Due Date" %}

{{ inquiry.due_date|date:"M d, Y H:i" }}

{% if inquiry.is_overdue %}
{% trans "OVERDUE" %}
{% else %} {{ inquiry.due_date|timeuntil }} {% trans "remaining" %} {% endif %}
{% endif %}

{% trans "Inquiry Details" %}

{% trans "Category" %}
{{ inquiry.get_category_display }}
{% trans "Source" %}
{% if inquiry.source %} {{ inquiry.get_source_display }} {% else %} {% trans "N/A" %} {% endif %}
{% trans "Channel" %}
{% if inquiry.channel %} {{ inquiry.get_channel_display }} {% else %} {% trans "N/A" %} {% endif %}
{% trans "Assigned To" %}
{% if inquiry.assigned_to %}{{ inquiry.assigned_to.get_full_name }}{% else %}{% trans "Unassigned" %}{% endif %}

{% trans "Message" %}
{{ inquiry.message|linebreaks }}
{% if inquiry.response %}
{% trans "Response" %}

{{ inquiry.response|linebreaks }}

{% trans "Responded by" %} {{ inquiry.responded_by.get_full_name }} {% trans "on" %} {{ inquiry.responded_at|date:"M d, Y H:i" }}
{% endif %}
{% trans "Created" %}
{{ inquiry.created_at|date:"M d, Y H:i" }}
{% trans "Last Updated" %}
{{ inquiry.updated_at|date:"M d, Y H:i" }}
{% if can_edit %}

{% trans "Quick Actions" %}

{% csrf_token %} {% if inquiry.assigned_to and inquiry.assigned_to == user %} {% else %} {% endif %}
{% csrf_token %}
{% endif %}

{% trans "Add Note" %}

{% csrf_token %}
{% if can_edit and inquiry.status != 'resolved' and inquiry.status != 'closed' %}

{% trans "Respond to Inquiry" %}

{% csrf_token %}
{% endif %}

{% trans "Contact Information" %}

{% if inquiry.patient %}
{% trans "Patient" %}
{{ inquiry.patient.get_full_name }}
{% trans "MRN" %}: {{ inquiry.patient.mrn }}
{% if inquiry.patient.phone %}
{% trans "Phone" %}
{{ inquiry.patient.phone }}
{% endif %} {% if inquiry.patient.email %}
{% trans "Email" %}
{{ inquiry.patient.email }}
{% endif %} {% else %} {% if inquiry.contact_name %}
{% trans "Name" %}
{{ inquiry.contact_name }}
{% endif %} {% if inquiry.contact_phone %}
{% trans "Phone" %}
{{ inquiry.contact_phone }}
{% endif %} {% if inquiry.contact_email %}
{% trans "Email" %}
{{ inquiry.contact_email }}
{% endif %} {% endif %}

{% trans "Assignment Info" %}

{% trans "Assigned To" %}
{% if inquiry.assigned_to %}{{ inquiry.assigned_to.get_full_name }}{% else %}{% trans "Unassigned" %}{% endif %}
{% if inquiry.responded_by %}
{% trans "Responded By" %}
{{ inquiry.responded_by.get_full_name }}
{{ inquiry.responded_at|date:"M d, Y H:i" }}
{% endif %} {% if inquiry.resolved_by %}
{% trans "Resolved By" %}
{{ inquiry.resolved_by.get_full_name }}
{{ inquiry.resolved_at|date:"M d, Y H:i" }}
{% endif %}
{% endblock %}