
<div class="card card-statistics h-100 m-b-30">
    <div class="card-header d-flex align-items-center justify-content-between">
        <div class="card-heading">
            <h4 class="card-title">Patients List</h4>
        </div>
        <div class="dropdown">
            <a class="btn btn-round btn-inverse-primary btn-xs" href="/patient/addnew">Add New </a>          
        </div>
    </div>
    <div class="card-body scrollbar scroll_dark pt-0" style="max-height: 630px;">
        <div class="datatable-wrapper table-responsive">
            <table id="datatable" class="table table-borderless table-striped">
                <thead>
                    <tr>
                        <th style="width:10px;">#</th>
                        <th style="width:40px;">Select</th>
                        <th>Name</th>
                        <th>Gender</th>
                        <th>Age</th>
                        <th  style="width:40px;">DOB</th>
                        <th>Phone</th>
                        <th style="width:20px;">Status</th>
                        <!--th>Action</!--th-->
                    </tr>
                </thead>
                <tbody>
                    <?php
                    $darr = array();
                    $patient_list = isset($patient_list) ? $patient_list : $darr;
//print_r($patient_list);
                    $icc = 0;
                    foreach ($patient_list as $prow) {
                        $icc++;
                        ?>

                        <tr>
                            <td><?= $icc ?></td>
                            <td><a href="/patient/selectPatient/<?= $prow->patient_id ?>"><button type="button" class="btn btn-info btn-sm">Select</button></a></td>
                            <td><?= $prow->firstname ?> <?= $prow->lastname ?></td>
                            <td><?= $prow->gender ?></td>
                            <td><?= $prow->dob ?></td>
                            <td><?= $prow->dob ?></td>
                            <td><?= $prow->phone ?></td>
                            <td><span class="badge badge-success-inverse">Active</span></td>
                            <!--td> <a class="mr-3" href="javascript:void(0);" onclick="selectPatient(<?= $prow->patient_id ?>)" ><i class="fe fe-edit"></i></a><a href="javascript:void(0);" onclick="calendarPatient(<?= $prow->patient_id ?>)"><i class="fe fe-calendar"></i></a></td -->
                        </tr>
                        <?
                    }
                    ?>



                </tbody>
                <tfoot>
                    <tr>
                      <th style="width:10px;">#</th>
                        <th style="width:40px;">Select</th>
                        <th>Name</th>
                        <th>Gender</th>
                        <th>Age</th>
                        <th>DOB</th>
                        <th>Phone</th>
                        <th>Status</th>
                        <!--th>Action</!--th-->
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>
</div>
