{% 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>
<h2 class="report-header" style="width: 120%;"><strong>{{ page_title }}</strong></h2>
<table class="report-data" width="120%">
    <thead class="header">
    <tr>
        <th>Patient</th>
        <th>Referring Physician</th>
        <th>Interpreting Physician</th>
        <th>Letter Type</th>
        <th>Letter Status</th>
        <th>Letter Request Date</th>
        <th>Date of letter initiation</th>
        <th>Letter audited</th>
        <th>Date Sent</th>
        <th>Fax Confirmation</th>
        <th>Created By</th>
        <th>Assigned To</th>
        <th>Link to Letter</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>
            <td>{{ record.patientName }}</td>
            <td>{{ record.referringPhysician }}</td>
            <td>{{ record.hsatInProvider }}</td>
            <td>{{ record.letterType }}</td>
            <td>{{ record.letterStatus }}</td>
            <td>{{ record.requestDate }}</td>
            <td>{{ record.startedAndCompletedDate }}</td>
            <td>{{ record.reviewBy ? record.reviewBy~' ('~record.reviewAt~')' : '' }}</td>
            <td>{{ record.sentBy ? record.sentBy~' ('~record.sentAt~')' : '' }}</td>
            <td></td>
            <td>{{ record.createdBy }}</td>
            <td>{{ record.assignTo }}</td>
            <td>{{ record.photoDesc }}</td>
        </tr>
    {% endfor %}
</table>
<div>Total Records: {{ totalCount }}</div>
</body>
</html>