{% extends "base.html" %} {% load static %} {% block title %}Delete Operating Room - {{ object.room_number }} - {{ block.super }}{% endblock %} {% block content %}

Delete Operating Room

Critical Action Required

You are about to permanently delete an operating room. This action cannot be undone and may have significant operational impact.

Operating Room to be Deleted
Room Number: {{ object.room_number }}
Room Name: {{ object.room_name }}
Room Type: {{ object.get_room_type_display }}
Current Status: {{ object.get_status_display }}
Floor: Floor {{ object.floor_number }}
Building: {{ object.building|default:"Not specified" }}
Active Status: {% if object.is_active %} Active {% else %} Inactive {% endif %}
Emergency Cases: {% if object.accepts_emergency %} Accepts {% else %} Does not accept {% endif %}
Impact Assessment
{% if object.current_case %}
Cannot Delete - Active Case

This operating room currently has an active surgical case:

  • Case: {{ object.current_case.case_number }}
  • Patient: {{ object.current_case.patient.get_full_name }}
  • Procedure: {{ object.current_case.primary_procedure }}
  • Status: {{ object.current_case.get_status_display }}

Please complete or transfer the current case before attempting to delete this room.

{% endif %} {% if future_blocks %}
Future Bookings Affected

This room has {{ future_blocks|length }} future booking(s) that will be affected:

{% for block in future_blocks %} {% endfor %}
Date Time Surgeon Service Cases
{{ block.date }} {{ block.start_time }} - {{ block.end_time }} {{ block.primary_surgeon.get_full_name }} {{ block.get_service_display }} {{ block.surgical_cases.count }}
{% endif %}
{{ historical_stats.total_cases|default:0 }}
Total Cases Performed
{{ historical_stats.total_hours|default:0 }}
Total Operating Hours
{{ historical_stats.utilization|default:0 }}%
Average Utilization
Data Handling Options

Choose how to handle the data associated with this operating room:

{% csrf_token %}
Confirmation Requirements
{% if not object.current_case %} {% else %} {% endif %}
Alternative Actions

Consider these alternatives to deletion:

Modify room settings instead of deleting
Temporarily disable without deleting
{% endblock %}