{% set absUrl = app.request.getSchemeAndHttpHost() ~ app.request.baseUrl|replace({'/app_dev.php': ''}) %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="{{ absUrl ~ asset('bundles/rxconnexion/admin/css/report/report_wkpdf.css') }}" />
</head>
<body>
<h5 class="report-header" style=" width:100%">{{ page_title }}</h5>
{% for record in records %}
<div>
    <h4 style="background-color: #4ccfdd"><strong style="color: #0a0a0a;">{{ record.description }}</strong></h4>
</div>
<table>
    <thead>
    <tr>
        <th style="background-color: #b2b2b2"><span style="color: #000000"></span></th>
        {% for referringProvider in record.referringProviders %}
            <th style="background-color: #b2b2b2"><span style="color: #000000">{{ referringProvider.name }}</span></th>
        {% endfor %}
        {#<th style="background-color: #b2b2b2"><span style="color: #000000">Total</span></th>#}
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>Patients:</td>
        {% for rp in record.referringProviders %}
            {% set hasTD = false %}
            {% for patientTotal in record.total if rp.id == patientTotal.id %}
                {% set hasTD = true %}
                <td>{{ patientTotal.count }}</td>
            {% endfor %}
            {% if not hasTD %}
                <td>0</td>
            {% endif %}
        {% endfor %}
    </tr>
    </tbody>
</table>
{% endfor %}
</body>
</html>