<table class="table table-hover portlet light bg-inverse" id="repTable">
    <caption class="txtc bg-blue bold "> Total  Drug Repeats = {$drugsCount} </caption>
    <thead>
        <tr>
            <th style="width: 75px !important;">#</th>
            <th style="width: 150px !important;">Patient Number</th>
            <th>   Patient Name </th>
            <th style="width: 150px !important;">Repeats</th>
        </tr>
    </thead>
    <tbody>
        {assign var="i" value="1"}
        {foreach $allData as $data}
        <tr class="odd ">
            <td>{$i}</td>
             <td>{$data.statusno}</td>
            <td>
                <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data.id}" target="_new">{$data.name}</a>
            </td>
           <td>{$data.drugsCount}</td>
        </tr>
        {assign var="i" value={$i+1}}
        {/foreach}
    </tbody>
</table>


{literal}
<script type="text/javascript" >
    $('#repTable').dataTable();
</script>
{/literal}