{assign var="i" value="1"}
{foreach $clinics as $data}
<tr>  
   <td>{$i}</td>
   <td>{if $data.for_husband == 1 }{$data.husdandname} {else} {$data.wifename}{/if}</td>
   <td> {$data.doctorName}  </td>
   {if $organizations != 1 }   <td> {$data.organizationName}  </td>   {/if}

   <td {if $data.detectionid== 2 || $data.detectionid== 3  }  style="background-color: #ffb87d ;" {/if}>
       {if $data.detectionid == 2 || $data.detectionid == 3 }
       <input type="checkbox"     checked disabled >
      {/if}
   </td>

   <td {if $data.detectionid== 7  }  style="background-color: #c2e49f ;" {/if}>
       {if $data.detectionid== 7  }
       <input type="checkbox"     checked disabled >
      {/if}
   </td>

   <td {if $data.detectionid== 8  } style="background-color: #892727 ;" {/if}>
       {if $data.detectionid== 8  }
       <input type="checkbox"     checked disabled >
      {/if}
   </td>

   <td {if $data.detectionid== 9  } style="background-color: #83a3e4 ;"  {/if}>
       {if $data.detectionid== 9  }
       <input type="checkbox"     checked disabled >
      {/if}
   </td>

   <td {if $data.detectionid== 11  } style="background-color: #8775a7 ;"  {/if}>
       {if $data.detectionid== 11  }
       <input type="checkbox"     checked disabled >
      {/if}
   </td>

   <td {if $data.leave== 1  } style="background-color: #dce254 ;"  {/if}> </td>
</tr>
{assign var="i" value={$i+1}}
{/foreach}