                                 {assign var="i" value="1"}
                                 {foreach $patients 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 2|in_array:$data.detections || 3|in_array:$data.detections}   style="background-color: #ffb87d ;" {/if}>
                                        {if 2|in_array:$data.detections || 3|in_array:$data.detections}
                                        <input type="checkbox"     checked disabled >
                                       {/if}
                                    </td>

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

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

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

                                    <td   {if 11|in_array:$data.detections} style="background-color: #8775a7 ;"  {/if}>
                                         {if 11|in_array:$data.detections}
                                        <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}