<table class="table table-hover portlet light bg-inverse" >
    <tr>
        <th>Total Patients</th>
        <td>{count($allPatients)}</td>
        <th>Total Result</th>
        <td>{count($allData)}</td>
        <th>Percentage</th>
        <td>{$percentage}%</td>
    </tr>
</table>
<table class="table table-hover portlet light bg-inverse" id="repTable">
    <thead>
        <tr>
            <th>#</th>
            <th>
                Patient Name
            </th>
            <th>Patient Number</th>
            <th>Husband Name</th>
            <th>
                Age
            </th>

        </tr>
    </thead>
    <tbody>
        {assign var="i" value="1"}
        {foreach $allData as $data}
        <tr class="odd gradeX">
            <td>{$i}</td>
            <td>
                <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data.patientid}" target="_new">{$data.wifename}</a>
            </td>
            <td>{$data.patientid}</td>
            <td>{$data.husdandname}</td>
            <td>
                {$data.wifeage}
            </td>

        </tr>
        {assign var="i" value={$i+1}}
        {/foreach}
    </tbody>
</table>




<div id="long" class="modal fade modal-scroll" tabindex="-1" data-replace="true">
    <div class="modal-dialog wds75">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close hidden-print" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"></h4>
            </div>
            <div class="modal-body printtable" id="printd">
                <center><h4 class="modal-title">Combined Report</h4></center>
                <div class="clearfix"></div>
                <table class="table table-hover portlet light bg-inverse" >
                    <tr>
                        <th>Search By </th>
                        <td colspan="5">{if !empty($fAge)} from age: {$fAge}    --{/if}{if !empty($toage)} to age: {$toage}  -- {/if}{if !empty($operation)} operation: {$operation}   -- {/if}{if !empty($termination)} termination: {$termination}   --  {/if}{if !empty($diagnosis)}diagnosis: {$diagnosis}    -- {/if}{if !empty($diagnosisant)}diagnosis antenal: {$diagnosisant}{/if}</td>
                    </tr>
                    <tr>
                        <th>Total Patients</th>
                        <td>{count($allPatients)}</td>
                        <th>Total Result</th>
                        <td>{count($allData)}</td>
                        <th>Percentage</th>
                        <td>{$percentage}%</td>
                    </tr>
                </table>
                <center><h4 class="modal-title">Patients</h4></center>
                <table class="table table-hover portlet light bg-inverse" id="controllpropr">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>
                                Patient Name
                            </th>
                            <th>Patient Number</th>
                            <th>Husband Name</th>
                            <th>
                                Age
                            </th>

                        </tr>
                    </thead>
                    <tbody>
                        {assign var="i" value="1"}
                        {foreach $allData as $data}
                        <tr class="odd gradeX">
                            <td>{$i}</td>
                            <td>
                                {$data.wifename}
                            </td>
                            <td>{$data.patientid}</td>
                            <td>{$data.husdandname}</td>
                            <td>
                                {$data.wifeage}
                            </td>

                        </tr>
                        {assign var="i" value={$i+1}}
                        {/foreach}
                </table>
            </div>
        </div>
    </div>
</div>



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