URGENT - Second SLA Reminder - Complaint #{{ complaint.id|slice:":8" }}

Dear {{ recipient.get_full_name }},

{% if is_unassigned %}
CRITICAL ALERT: This is an URGENT reminder about an UNASSIGNED complaint that requires IMMEDIATE attention.

This complaint has NOT been assigned to anyone and is about to breach its SLA deadline. As a Hospital Administrator or PX Staff, you must take immediate action.

This is the FINAL reminder before automatic escalation.

URGENT ACTION REQUIRED:
1. ASSIGN this complaint to an appropriate staff member IMMEDIATELY
2. ENSURE the assigned person is aware of the critical deadline
3. MONITOR progress continuously until resolved

Failure to assign and address this complaint may result in automatic escalation to higher management.
{% else %}
This is the second and final reminder that you have an assigned complaint approaching its SLA deadline.
{% endif %}

COMPLAINT DETAILS:
- ID: #{{ complaint.id|slice:":8" }}
- Title: {{ complaint.title }}
- Severity: {{ complaint.get_severity_display }}
- Priority: {{ complaint.get_priority_display }}
- Category: {% if complaint.category %}{{ complaint.category.name_en }}{% else %}N/A{% endif %}
- Department: {% if complaint.department %}{{ complaint.department.name }}{% else %}N/A{% endif %}
- Patient: {% if complaint.patient %}{{ complaint.patient.get_full_name }} (MRN: {{ complaint.patient.mrn }}){% else %}N/A{% endif %}

SLA INFORMATION:
- Due Date: {{ due_date|date:"F d, Y H:i" }}
- Time Remaining: {{ hours_remaining }} hours
- Current Status: {{ complaint.get_status_display }}

{% if not is_unassigned %}
URGENT ACTION REQUIRED:
This complaint is {{ hours_remaining }} hours from breaching its SLA deadline. 
Please review and take immediate action to avoid escalation and SLA breach consequences.

If this complaint cannot be resolved within the remaining time, please:
1. Update the complaint status to reflect current progress
2. Add a timeline update explaining the delay
3. Contact your department manager if additional resources are needed
{% endif %}

You can view the complaint at: {{ site_url }}/complaints/{{ complaint.id }}/

This is an automated message. Please do not reply directly to this email.

---
PX360 Patient Experience Management System
