{% extends 'front.html.twig' %}
{% block title %}Type of Beds in {{ beds[0].department }} ({{ beds[0].facility }}){% endblock %}
{% block content %}
<div class="kt-subheader kt-grid__item"></div>
<div class="kt-container kt-grid__item kt-grid__item--fluid">
<div class="kt-portlet kt-portlet--mobile">
<div class="kt-portlet__head kt-portlet__head--lg">
<div class="kt-portlet__head-label">
<h3 class="kt-portlet__head-title">Type of Beds in {{ beds[0].department }} ({{ beds[0].facility }})</h3>
</div>
</div>
<div class="kt-portlet__body">
<table class="table">
<thead>
<tr>
<th>Hospital</th>
<th>Address</th>
<th>Phone No.</th>
<th class="text-right">Beds Sanctioned</th>
<th class="text-right">Occupied Yesterday</th>
<th class="text-right">Admitted Today</th>
<th class="text-right">Discharged Today</th>
<th class="text-right">Vacant Beds</th>
<th class="text-right text-nowrap">Bed Occupancy %</th>
</tr>
</thead>
<tbody>
{% for bed in beds %}
<tr>
<td>{{ bed.facility }}</td>
<td>{{ bed.address ? bed.address ~ ', ' : '' ~ bed.village }}</td>
<td>{{ bed.phone }}</td>
<td class="text-right">{{ bed.sanc }}</td>
<td class="text-right">{{ bed.yesterday }}</td>
<td class="text-right">{{ bed.today }}</td>
<td class="text-right">{{ bed.discharged }}</td>
<td class="text-right">{{ bed.sanc - bed.occupied }}</td>
<td class="text-right">{{ ((bed.occupied * 100) / bed.sanc)|number_format(2) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}