<table class="table table-bordered table-striped table-hover rtl dataTable">
    <thead>
        <tr>
            <th class="wds3 txtc">م</th>
            <th class="txtc">اسم الحالة</th>
            <th class="wds5 txtc">رقم الحالة</th>
            {if $programesetting->system_lang  == 1}    
            <th class="txtc"> اسم الزوج </th>
            {/if} 
            <th class="txtc"> العنوان </th>
            <th class="txtc"> التاريخ </th>
            <th class="txtc"> الطبيب </th>
            {if $programesetting->system_lang  == 1}    
            <th class="txtc"> المريض </th>
            {/if} 
            <th class="wds5 txtc">  </th>
        </tr>
    </thead>
    <tbody>
        {assign var=i value=1}
        {foreach $allvisit as $row}
        <tr>
            <td> {$i}</td>
            <td>  {$row->patientName}  </td>
            <td> {$row->patientstatusno}</td>
            {if $programesetting->system_lang  == 1}    
            <td> {$row->husbandname}</td>
            {/if}
            <td> {$row->address}</td>
            <td> {$row->visitdate}</td>
            <td > {$row->for_doctor_name} {if !empty($row->operation_time) }({$row->operation_time}){/if} </td>

            {if $programesetting->system_lang  == 1}    
            <td>
                {if $row->for_husband eq 1} الزوج 
                {else if $row->for_husband eq 2}    
                {if $row->child_gender eq 1} طفل {else} طفلة  {/if}
                {if $row->child_name != ''  && $row->child_name != null }  ({$row->child_name}) {/if} 
                {else} الزوجه{/if}
            </td>
            {/if} 
            {if $programesetting->system_type  == 2}    
            <td> {$row->visitHour}</td>
            {/if} 

            <td>
                <a class=" bg-green dltbtn  printLR" data-visitId="{$row->id}"><i class="fa fa-print"></i></a>
            </td>
        </tr>
        {capture assign=i}{$i+1}{/capture}
        {/foreach}
    </tbody>
</table>


{literal}
<script>
    $('.dataTable').dataTable();
</script>
{/literal}