{% extends 'base.html' %} {% load static %} {% block title %}OR Block - {{ block.operating_room.name }}{% endblock %} {% block css %} {% endblock %} {% block content %}

OR Block Details

Back {% if block.status == 'available' %} Edit {% endif %}

{{ block.operating_room.name }}

Date: {{ block.date|date:"l, F d, Y" }}
Time: {{ block.start_time|date:"H:i" }} - {{ block.end_time|date:"H:i" }}
Duration: {{ block.duration_hours }} hours
Block Type: {{ block.get_block_type_display }}
Assigned Surgeon: {% if block.assigned_surgeon %} {{ block.assigned_surgeon.get_full_name }} {% else %} Unassigned {% endif %}
Created: {{ block.created_at|date:"M d, Y H:i" }}
{% if block.status == 'available' %} Available {% elif block.status == 'booked' %} Booked {% elif block.status == 'in_progress' %} In Progress {% elif block.status == 'completed' %} Completed {% elif block.status == 'cancelled' %} Cancelled {% endif %}
{{ block.utilization_percentage }}%
Utilization
Block Utilization
{{ block.total_minutes }}
Total Minutes
{{ block.scheduled_minutes }}
Scheduled
{{ block.available_minutes }}
Available
{{ block.turnover_minutes }}
Turnover
Scheduled Cases ({{ block.scheduled_cases.count }}) {% if block.status == 'available' %}
{% endif %}
{% for case in block.scheduled_cases.all %}
{{ case.patient.get_full_name }}
{{ case.scheduled_start_time|date:"H:i" }} - {{ case.estimated_end_time|date:"H:i" }}
{% if case.status == 'scheduled' %} Scheduled {% elif case.status == 'in_progress' %} In Progress {% elif case.status == 'completed' %} Completed {% elif case.status == 'cancelled' %} Cancelled {% endif %}
Procedure
{{ case.procedure_name }}
Surgeon
{{ case.primary_surgeon.get_full_name }}
Estimated Duration
{{ case.estimated_duration }} minutes
Priority
{% if case.priority == 'emergency' %} Emergency {% elif case.priority == 'urgent' %} Urgent {% else %} Routine {% endif %}
View {% if case.status == 'scheduled' %} Edit {% endif %}
{% if case.status == 'scheduled' %} {% elif case.status == 'in_progress' %} {% endif %}
{% empty %}

No cases scheduled for this block

{% if block.status == 'available' %} {% endif %}
{% endfor %}
Block Details
Operating Room
{{ block.operating_room.name }}
Room Type
{{ block.operating_room.get_room_type_display }}
Capacity
{{ block.operating_room.capacity }} people
Equipment Level
{{ block.operating_room.get_equipment_level_display }}
{% if block.notes %}
Notes
{{ block.notes }}
{% endif %}
{% if block.assigned_surgeon or block.assigned_anesthesiologist or block.assigned_nurses.exists %}
Assigned Team
{% if block.assigned_surgeon %}
Primary Surgeon
{{ block.assigned_surgeon.get_full_name }}
{% endif %} {% if block.assigned_anesthesiologist %}
Anesthesiologist
{{ block.assigned_anesthesiologist.get_full_name }}
{% endif %} {% if block.assigned_nurses.exists %}
Nursing Team
{% for nurse in block.assigned_nurses.all %}
{{ nurse.get_full_name }}
{% endfor %}
{% endif %}
{% endif %}
Activity Timeline
{% for activity in block.activities.all %}
{{ activity.action }}
{{ activity.created_at|date:"M d, Y H:i" }}
{% if activity.notes %}
{{ activity.notes }}
{% endif %}
{% empty %}

No activity recorded

{% endfor %}
{% endblock %} {% block js %} {% endblock %}