<table class="table table-striped table-hover table-bordered rtl" style=" width: 98%;" >
    <thead>
        <tr>
            <th> اسم المريض </th>
            <th>  تاريخ الزيارة </th>
        </tr>
    </thead>
    <tbody>
        {assign var=m value=1}
        {foreach $requests as $single}
        <tr>
            <td>
                <a class="patientLabDtails"   href="javascript:;" style=" float: right;"   data-visitId="{$single.visitId}" >
                    {if  $single.for_husband == 1 }
                    {$single.husbandName}
                    {else if  $single.for_husband == 2}

                    {if $single.child_name != ''  && $single.child_name != null } 
                    {$single.child_name}  /  {$single.wifeName}
                    {else}
                    {if $single.child_gender eq 1} طفل {else} طفلة  {/if}     /  {$single.wifeName}
                    {/if} 

                    {else}
                    {$single.wifeName}
                    {/if}
                </a>
            </td>
            <td>{$single.visitDate}</td>
        </tr> 
        {capture assign=m}{$m+1}{/capture}
        {/foreach}
    </tbody>
</table>