{% extends "layouts/base.html" %} {% load i18n %} {% load static %} {% block title %}Complaint #{{ complaint.id|slice:":8" }} - PX360{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{{ _("Back to Complaints")}}

{{ complaint.title }}

{{ complaint.get_status_display }} {{ complaint.get_severity_display }}

{{ _("ID") }}: {{ complaint.id|slice:":8" }} | {{ _("Patient") }}: {{ complaint.patient.get_full_name }} ({{ _("MRN") }}: {{ complaint.patient.mrn }})

{{ _("Hospital") }}: {{ complaint.hospital.name_en }} {% if complaint.department %} | {{ _("Department") }}: {{ complaint.department.name_en }} {% endif %}

{{ _("SLA Deadline")}}

{{ complaint.due_at|date:"M d, Y H:i" }}

{% if complaint.is_overdue %}
{{ _("OVERDUE") }}
{% else %} {{ complaint.due_at|timeuntil }} {{ _("remaining") }} {% endif %}
{% trans "Complaint Details" %}
{{ _("Category") }}
{{ complaint.get_category_display }} {% if complaint.subcategory %} / {{ complaint.subcategory }} {% endif %}
{{ _("Source") }}
{{ complaint.get_source_display }}
{{ _("Priority") }}
{{ complaint.get_priority_display }}
{{ _("Encounter ID")}}
{% if complaint.encounter_id %} {{ complaint.encounter_id }} {% else %} {{ _("N/A")}} {% endif %}
{% if complaint.physician %}
{{ _("Physician") }}
Dr. {{ complaint.physician.first_name }} {{ complaint.physician.last_name }} ({{ complaint.physician.specialty }})
{% endif %}
{{ _("Description") }}

{{ complaint.description|linebreaks }}

{% if complaint.resolution %}
{{ _("Resolution") }}

{{ complaint.resolution|linebreaks }}

{{ _("Resolved by")}} {{ complaint.resolved_by.get_full_name }} {{ _("on") }} {{ complaint.resolved_at|date:"M d, Y H:i" }}
{% endif %}
{{ _("Created") }}
{{ complaint.created_at|date:"M d, Y H:i" }}
{{ _("Last Updated")}}
{{ complaint.updated_at|date:"M d, Y H:i" }}
{% trans "Activity Timeline" %}
{% if timeline %}
{% for update in timeline %}
{{ update.get_update_type_display }} {% if update.created_by %} by {{ update.created_by.get_full_name }} {% endif %}
{{ update.created_at|date:"M d, Y H:i" }}

{{ update.message }}

{% if update.old_status and update.new_status %}
{{ update.old_status }} {{ update.new_status }}
{% endif %}
{% endfor %}
{% else %}

{{ _("No timeline entries yet")}}

{% endif %}
{% trans "Attachments" %}
{% if attachments %}
{% for attachment in attachments %}
{{ attachment.filename }}
Uploaded by {{ attachment.uploaded_by.get_full_name }} on {{ attachment.created_at|date:"M d, Y H:i" }} ({{ attachment.file_size|filesizeformat }}) {% if attachment.description %}
{{ attachment.description }} {% endif %}
{% endfor %}
{% else %}

{{ _("No attachments")}}

{% endif %}
{% trans "Related PX Actions" %}
{% if px_actions %} {% for action in px_actions %}
{{ action.title }}

{{ action.description|truncatewords:20 }}

{{ action.get_status_display }} {{ action.get_priority_display }}
{{ _("View") }}
{% endfor %} {% else %}

{{ _("No PX actions created yet")}}

{% endif %}
{% if can_edit %}
{% trans "Quick Actions" %}
{% csrf_token %}
{% csrf_token %}
{% endif %}
{% trans "Add Note" %}
{% csrf_token %}
{% trans "Assignment Info" %}
{{ _("Assigned To")}}
{% if complaint.assigned_to %} {{ complaint.assigned_to.get_full_name }}
Assigned {{ complaint.assigned_at|date:"M d, Y H:i" }} {% else %} {{ _("Unassigned") }} {% endif %}
{% if complaint.resolved_by %}
{{ _("Resolved By")}}
{{ complaint.resolved_by.get_full_name }}
{{ complaint.resolved_at|date:"M d, Y H:i" }}
{% endif %} {% if complaint.closed_by %}
{{ _("Closed By")}}
{{ complaint.closed_by.get_full_name }}
{{ complaint.closed_at|date:"M d, Y H:i" }}
{% endif %}
{% if complaint.resolution_survey %}
{% trans "Resolution Survey" %}

{{ _("Status") }}: {{ complaint.resolution_survey.get_status_display }}

{% if complaint.resolution_survey.score %}

{{ _("Score") }}: {{ complaint.resolution_survey.score }}/100

{% endif %} {{ _("View Survey")}}
{% endif %}
{% endblock %}