<table class="table table-striped table-hover table-bordered" >
    <thead>
        <tr>
            <th> # </th>
            <th> Disease</th>
            <th> Notes</th>
        </tr>
    </thead>
    <tbody>

        {assign var=i value=1}
        {foreach $allpastmedical as $myallpastmedical}
        <tr>
            <td>{$i} </td>
            <td> {$myallpastmedical->diseasename}</td>
            <td> {$myallpastmedical->medicalnote} </td>

        </tr>

        {capture assign=i}{$i+1}{/capture}
        {/foreach}

    </tbody>

</table>