{% extends "base.html" %} {% load static %} {% block title %}Delete Surgical Case - Operating Theatre{% endblock %} {% block content %}

Delete Surgical Case Confirmation Required

Confirm Case Deletion

Warning

You are about to delete this surgical case. This action cannot be undone and will significantly impact patient care, surgical scheduling, and hospital operations.

Case Details:
Case Number: {{ object.case_number }}
Patient: {{ object.patient.get_full_name }}
Patient ID: {{ object.patient.patient_id }}
Procedure: {{ object.procedure_name }}
Primary Surgeon: {{ object.primary_surgeon.get_full_name }}
Operating Room: {{ object.operating_room.name }}
Priority: {{ object.get_priority_display }}
Status: {{ object.get_status_display }}
Scheduling Information:
{% if object.actual_start_time %} {% endif %} {% if object.actual_end_time %} {% endif %}
Scheduled Date: {{ object.scheduled_start_time|date:"M d, Y" }}
Scheduled Time: {{ object.scheduled_start_time|time:"H:i" }} - {{ object.scheduled_end_time|time:"H:i" }}
Duration: {{ object.estimated_duration }} minutes
Surgery Type: {{ object.get_surgery_type_display }}
Created: {{ object.created_at|date:"M d, Y H:i" }}
Started: {{ object.actual_start_time|date:"M d, Y H:i" }}
Completed: {{ object.actual_end_time|date:"M d, Y H:i" }}
Impact Assessment
  • Patient Care: Surgery scheduling and patient preparation will be affected
  • Surgical Team: {{ object.surgical_team.count|add:"2" }} team members will be impacted
  • Operating Room: Room {{ object.operating_room.name }} schedule will be freed
  • Equipment: {{ object.equipment_required.count }} equipment reservations will be cancelled
  • Supplies: {{ object.supplies_required.count }} supply allocations will be released
  • Billing: Associated billing records and insurance pre-authorizations will be affected
  • Audit Trail: Case history and documentation will be permanently lost
{% if object.status == 'IN_PROGRESS' %}
Surgery In Progress Warning

This surgery is currently in progress. Deleting it will:

  • Disrupt ongoing surgical procedures
  • Create confusion in the operating room
  • Potentially compromise patient safety
  • Violate surgical documentation requirements
  • Impact real-time monitoring and tracking
{% endif %} {% if object.status == 'COMPLETED' %}
Completed Surgery Warning

This surgery has been completed. Deleting it will:

  • Remove critical surgical documentation
  • Impact medical record integrity and continuity of care
  • Affect quality assurance and outcome tracking
  • Potentially violate regulatory and accreditation requirements
  • Compromise billing and insurance claim processing
  • Remove important data for surgical statistics and reporting
{% endif %} {% if object.priority == 'EMERGENCY' %}
Emergency Surgery Warning

This is an emergency surgery case. Deleting emergency cases may violate hospital protocols and regulatory requirements for emergency care documentation.

{% endif %} {% if object.priority == 'URGENT' %}
Urgent Surgery Warning

This is an urgent surgery case. Deleting urgent cases may significantly impact patient care timelines and should only be done in exceptional circumstances.

{% endif %} {% if object.surgical_team.count > 0 %}
Surgical Team Impact

This case involves {{ object.surgical_team.count|add:"2" }} team members:

  • Primary Surgeon: {{ object.primary_surgeon.get_full_name }}
  • {% if object.anesthesiologist %}
  • Anesthesiologist: {{ object.anesthesiologist.get_full_name }}
  • {% endif %} {% for team_member in object.surgical_team.all %}
  • {{ team_member.role }}: {{ team_member.staff_member.get_full_name }}
  • {% endfor %}

All team members will need to be notified of the cancellation.

{% endif %} {% if object.equipment_required.count > 0 or object.supplies_required.count > 0 %}
Equipment & Supplies Impact
{% if object.equipment_required.count > 0 %}

Equipment ({{ object.equipment_required.count }} items):

    {% for equipment in object.equipment_required.all|slice:":5" %}
  • {{ equipment.name }}
  • {% endfor %} {% if object.equipment_required.count > 5 %}
  • +{{ object.equipment_required.count|add:"-5" }} more items...
  • {% endif %}
{% endif %} {% if object.supplies_required.count > 0 %}

Supplies ({{ object.supplies_required.count }} items):

    {% for supply in object.supplies_required.all|slice:":5" %}
  • {{ supply.item.name }} ({{ supply.quantity }})
  • {% endfor %} {% if object.supplies_required.count > 5 %}
  • +{{ object.supplies_required.count|add:"-5" }} more items...
  • {% endif %}
{% endif %}
{% endif %}
{{ object.surgical_team.count|add:"2" }}
Team Members
{{ object.equipment_required.count }}
Equipment Items
{{ object.supplies_required.count }}
Supply Items
{{ object.estimated_duration }}
Minutes
Alternative Actions

Consider these alternatives instead of deletion:

{% csrf_token %}
Deletion Confirmation
{% if object.status == 'IN_PROGRESS' %}
{% endif %} {% if object.status == 'COMPLETED' %}
{% endif %} {% if object.priority == 'EMERGENCY' %}
{% endif %}
{% endblock %} {% block js %} {% endblock %}