<div class="row">

    {if $doctorsCount > 0 }
        <div class="col-sm-4">
            {assign var=i value=1}
            {foreach $doctors as $doctor}
                <table class="table table-striped table-hover " id="todayTable">
                    <thead>
                        <tr class=" bg-info">  <th>{$doctor.for_doctor_name} </th> </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>
                                <ul>
                                    {foreach $doctor.drVisits as $value}
                                        <li>  {$value->patientName}  </li>
                                        {/foreach}
                                </ul>
                            </td>
                        </tr>
                    </tbody>
                </table>
            {capture assign=i}{$i+1}{/capture}
        {/foreach}
    </div>
{else}
    <div class="col-sm-4">
        <table class="table table-striped table-hover " id="todayTable">
            <thead>
                <tr class=" bg-info">  <th> Today's List </th> </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                        <ul>

                        </ul>
                    </td>
                </tr>
            </tbody>
        </table>
    </div> 

{/if}


<div class="col-sm-8">
    {assign var=i value=1}
    {foreach $roles as $role}
        <table class="table table-striped table-hover ">
            <thead>
                <tr  class=" bg-blue-chambray">  
                    <th style="width:50%; text-align: right; padding-right: 5% !important;" > {$role->doctor_name} </th>
                    <th  style="width:50%; text-align: left; padding-left: 5% !important;"> {$role->name} </th>
                </tr>
                <tr colspan="2" style=" background-color: #bdd5e8;">  <th colspan="2" style="color: black;"> {$role->roleCurrentPatient} </th> </tr>
            </thead>

            <tbody>
                <tr  colspan="2">
                    <td  colspan="2">
                        <ul>
                            {foreach $role->visits as $value}
                                <li>  {$value->patientName}  </li>
                                {/foreach}
                        </ul>
                    </td>
                </tr>
            </tbody>
        </table>
    {capture assign=i}{$i+1}{/capture}
{/foreach}
</div>
</div>