{% extends '@RxConnexion/Admin/global.html.twig' %}
{% block body %}
    <h5 class="report-header">{{ page_title }}</h5>
    <table class="report-data" width="100%">
        <thead class="header">
        <tr>
            <th>Referral Date</th>
            <th>Patient Name</th>
            <th>Previous Branch</th>
            <th>Latest Branch</th>
        </tr>
        </thead>
        <tbody>
        {% for record in records %}
            <tr>
                <td>{{ record.referralDate }}</td>
                <td><a href="{{ path('patient_detail', {patient_id:record.id|base64Encode}) }}">{{ record.patientName }}</a></td>
                <td>{{ record.latestHealthFacility }}</td>
                <td>{{ record.prevHealthFacility }}</td>
            </tr>
        {% endfor %}
    </table>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script>
        //<![CDATA[
        jQ(document).ready(function(){
            report_preview.init();
        });
        //]]>
    </script>
{% endblock %}