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

OR Block Schedule

{{ current_date|date:"l, F d, Y" }}

Total Blocks: {{ stats.total_blocks }}
Active Blocks: {{ stats.active_blocks }}
Scheduled Cases: {{ stats.scheduled_cases }}
Available Slots: {{ stats.available_slots }}
Overall Utilization: {{ stats.utilization_percentage }}%
Emergency Slots: {{ stats.emergency_slots }}
Clear
{% for block in blocks %}
{{ block.operating_room.name }}
{{ block.start_time|date:"H:i" }} - {{ block.end_time|date:"H:i" }}
{% if block.status == 'available' %} Available {% elif block.status == 'booked' %} Booked {% elif block.status == 'in_progress' %} In Progress {% elif block.status == 'completed' %} Completed {% endif %}
Assigned Surgeon
{% if block.assigned_surgeon %} {{ block.assigned_surgeon.get_full_name }} {% else %} Unassigned {% endif %}
Block Type
{{ block.get_block_type_display }}
Duration
{{ block.duration_hours }} hours
Utilization
{{ block.utilization_percentage }}%
{% if block.scheduled_cases.exists %}
Scheduled Cases ({{ block.scheduled_cases.count }})
{% for case in block.scheduled_cases.all %}
{{ case.scheduled_start_time|date:"H:i" }}
{{ case.patient.get_full_name }}
{{ case.procedure_name }}
{% if case.status == 'scheduled' %} Scheduled {% elif case.status == 'in_progress' %} In Progress {% elif case.status == 'completed' %} Completed {% elif case.status == 'cancelled' %} Cancelled {% endif %}
{% endfor %}
{% else %}

No cases scheduled

{% endif %}
View {% if block.status == 'available' %} Edit {% endif %}
{% if block.status == 'available' %} {% endif %}
{% empty %}
No blocks scheduled

No OR blocks are scheduled for the selected date and filters.

Create First Block
{% endfor %}
{% if is_paginated %} {% include 'partial/pagination.html' %} {% endif %}
{% endblock %} {% block js %} {% endblock %}