{% 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') }}" />
    <style>
        /*table { table-layout: fixed; }*/
        /*table th, table td { overflow: hidden; }*/
        table td { border : 1px solid grey !important; }
    </style>
</head>
<body>
<h2><strong>{{ page_title }}</strong></h2>
<h5 class="report-header">{{ page_title }}</h5>
<table class="report-data" width="100%">
    <thead class="header">
    <tr>
        <th>Patient</th>
        <th>Encounter Type</th>
        <th>Encounter Date</th>
        <th>Encounter Status</th>
        <th>Note</th>
    </tr>
    </thead>
    <tbody>
    {% set totalCount = 0 %}
    {% for record in records %}
        {% set trC = loop.index > 1 and loop.index % 2 == 0 ? 'even' : 'odd' %}
        {% set totalCount = totalCount + 1 %}
        <tr class="{{ trC }}">
            {% if record.rowPatient is defined %}
                <td rowspan="{{ record.rowPatient.rowspan }}"><a href="{{ path('patient_detail', {patient_id : record.patientId|base64Encode}) }}" target="_blank">{{ record.patientName }}</a></td>
            {% endif %}
            <td>{{ record.chartType }}</td>
            <td>{{ record.chartDate }}</td>
            <td>{{ record.chartStatus }}</td>
            <td>{{ record.note|raw }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>
</body>
</html>