
<div class="page-content-wrapper">
    <div class="page-content all">
        <div class="row">
            <div class="col-md-12">
                <div class="portlet box blue">
                    <div class="portlet-title" style="height: 5px">
                        <div class="caption">
                            <i class="fa fa-edit"></i> Lab Requests
                        </div>
                        <div class="actions">
                            <a class="btn btn-success btn-xs printResults "  href="javascript:;" style=" float: right;"  >
                                <i class="fa fa-print"></i> print
                            </a>

                            <a class="btn btn-default btn-xs" href="{$hosturl}/controllers/{$controllname}.php?ac=index" style=" float: right;"  >
                                <i class="fa fa-backward"></i> عرض الكل 
                            </a>
                        </div>
                    </div>
                    <div class="portlet-body" >

                        <input type="hidden" id="visitId" value="{$visit->id}" name="visitId"/>
                        <input type="hidden" id="patientNo" value="{$patientNo}" name="patientNo"/>


                        <table class="table table-striped table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th class="bold col-md-1"> <div align="center">For </div></th>
                                    <td class="bold"> <div align="center">{$patientName} </div></td>
                                </tr>
                            </thead>
                        </table>

                        <table class="table table-striped table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th class="bold"> <div align="center">investigations </div></th>
                                </tr>
                            </thead>
                            <tbody>

                                <tr>
                                    <td>

                                        {if $normalCount > 0}
                                        <table class="table table-striped table-hover table-bordered">
                                            <thead>
                                                <tr>
                                                    <th class="bold col-md-3"> <div align="center">Name </div></th>
                                                    <th class="bold col-md-2"> <div align="center">Result </div></th>
                                                    <th class="bold col-md-4"> <div align="center">Range </div></th>
                                                    <td class="col-md-1 wds3 txtc"> F </td>
                                                    <td class="col-md-1 wds3 txtc"> V </td>
                                                    <td class="col-md-1 wds3 txtc"> P </td>
                                                    <td class="col-md-1 wds3 txtc"> D </td>
                                                </tr>
                                            </thead>
                                            <tbody>

                                                {foreach $normal as $inv}

                                                <tr>
                                                    <td>
                                                        <label class=" control-label bold txtl" style="margin-left: 4px;float: left;" >{$inv->invname}
                                                            <span style="float: left;">
                                                                <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                            </span>
                                                        </label>
                                                    </td>

                                                    <td>
                                                        <div class="col-md-6">
                                                            <input type="text" {if $archive == 1 } disabled="" {/if} class="form-control updateInvest notPop " 
                                                                   data-colName="investresult" data-id="{$inv->id}"  data-tableName="{$inv->tableName}" 
                                                                   value="{$inv->investresult}">
                                                        </div>

                                                        {if  $inv->hasPdf== 1 }
                                                        <div class="col-md-4" style="text-align: right;">
                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                        </div>   

                                                        <div class="col-md-2" style="text-align: right;" >
                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                <i class="fa fa-download"></i>
                                                            </a>

                                                            {else}
                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                <i class="fa fa-download"></i>
                                                            </a>
                                                            {/if}
                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                        </div>   



                                                        {/if}
                                                    </td>

                                                    <td>
                                                        <select       class="form-control select2h updateInvest" data-colName="rangeid" data-id="{$inv->id}"  data-tableName="{$inv->tableName}"    id="ranges{$inv->id}" >
                                                            <option value=""></option>
                                                            {foreach  $inv->ranges as $rang}
                                                            <option value="{$rang->id}" {if $rang->id == $inv->rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                            {/foreach}
                                                        </select>
                                                    </td>

                                                    <td>
                                                        {if  $inv->filled == 1 }
                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                           data-id="{$inv->id}" 
                                                           style="color: #119866;font-size: 20px;margin-top: 25%;"></i> 
                                                        {else}
                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                           data-id="{$inv->id}" 
                                                           style="color: red;font-size: 20px;margin-top: 25%;"></i> 
                                                        {/if}
                                                    </td>

                                                    <td>
                                                        {if  $inv->verified == 1 }
                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                           data-id="{$inv->id}" 
                                                           style="color: #119866;font-size: 20px;margin-top: 25%;"></i> 
                                                        {else}
                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                           data-id="{$inv->id}"  
                                                           style="color: red;font-size: 20px;margin-top: 25%;"></i> 
                                                        {/if}
                                                    </td>

                                                    <td>
                                                        {if  $inv->printed == 1 }
                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0"     id="invPrinted{$inv->id}" 
                                                           data-id="{$inv->id}" 
                                                           style="color: #119866;font-size: 20px;margin-top: 25%;"></i> 
                                                        {else}
                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1"     id="invPrinted{$inv->id}" 
                                                           data-id="{$inv->id}"  
                                                           style="color: red;font-size: 20px;margin-top: 25%;"></i> 
                                                        {/if}
                                                    </td>

                                                    <td>
                                                        {if  $inv->delivered == 1 }
                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                           data-id="{$inv->id}"    data-paid="{$paid}"  
                                                           style="color: #119866;font-size: 20px;margin-top: 25%;"></i> 
                                                        {else}
                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                           data-id="{$inv->id}"   data-paid="{$paid}" 
                                                           style="color: red;font-size: 20px;margin-top: 25%;"></i> 
                                                        {/if}
                                                    </td>
                                                </tr>

                                                {/foreach}

                                            </tbody>
                                        </table>

                                        {/if}

                                        <div class="form-group " style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;"></div>

                                        <div id="accordion">                          
                                            {foreach $special as $inv}

                                            {if $inv->special_inv_type == 2  }  
                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="urineInvest" value="1" />
                                                <div class="card-header txtl">
                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>

                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>

                                                                <tr>
                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"     data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>

                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">

                                                                                <div class="form-group col-md-4 " style="margin-left: 30%;">
                                                                                    <h4 style="font-weight: bold;background: #DDD;padding:5px; ">Physical Examination :  </h4>   
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Volume:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_volume"     class="form-control updateInvest  urine_volume"  
                                                                                                    data-colName="volume"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_volume"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_volume as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->volume ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Aspect:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_aspect"     class="form-control updateInvest  urine_aspect" 
                                                                                                    data-colName="aspect"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_aspect"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_aspect as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->aspect ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Color:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_color"     class="form-control updateInvest  urine_color" 
                                                                                                    data-colName="color"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_color"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_color as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->color ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Deposit:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_deposit"     class="form-control updateInvest  urine_deposit" 
                                                                                                    data-colName="deposit"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_deposit"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_deposit as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->deposit ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Odor:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_odor"     class="form-control updateInvest  urine_odor" 
                                                                                                    data-colName="odor"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_odor"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_odor as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->odor ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-4 " style="margin-left: 30%;">
                                                                                    <h4 style="font-weight: bold;background: #DDD;padding:5px; ">Chemical Examination :  </h4>   
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Reaction:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_reaction"     class="form-control updateInvest  urine_reaction" 
                                                                                                    data-colName="reaction"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_reaction"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_reaction as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->reaction ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Specific Gravity:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_gravity"     class="form-control updateInvest  urine_gravity" 
                                                                                                    data-colName="gravity"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_gravity"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_gravity as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->gravity ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Protein:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_protein"     class="form-control updateInvest  urine_protein" 
                                                                                                    data-colName="protein"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_protein"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_protein as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->protein ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>



                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Bilirubin:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_bilirubin"     class="form-control updateInvest  urine_bilirubin" 
                                                                                                    data-colName="bilirubin"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_bilirubin"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_bilirubin as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->bilirubin ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Sugar:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_sugar"     class="form-control updateInvest  urine_sugar" 
                                                                                                    data-colName="sugar"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_sugar"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_sugar as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->sugar ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Urobilinigen:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_urobilinigen"     class="form-control updateInvest  urine_urobilinigen" 
                                                                                                    data-colName="urobilinigen"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_urobilinigen"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_urobilinigen as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->urobilinigen ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Acetone:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_acetone"     class="form-control updateInvest  urine_acetone" 
                                                                                                    data-colName="acetone"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_acetone"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_acetone as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->acetone ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Leucocytes:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_leucocytes"     class="form-control updateInvest  urine_leucocytes" 
                                                                                                    data-colName="leucocytes"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_leucocytes"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_leucocytes as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->leucocytes ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Nitrite:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_nitrite"     class="form-control updateInvest  urine_nitrite" 
                                                                                                    data-colName="nitrite"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_nitrite"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_nitrite as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->nitrite ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Blood:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_blood"     class="form-control updateInvest  urine_blood" 
                                                                                                    data-colName="blood"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_blood"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_blood as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->blood ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>



                                                                                <div class="form-group col-md-4 " style="margin-left: 30%;">
                                                                                    <h4 style="font-weight: bold;background: #DDD;padding:5px; ">Microscopic Examination :  </h4>   
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Pus Cells:</label>
                                                                                    <div class="col-md-2 wds23">
                                                                                        <select     select-colName="name"    select-tableName="urine_pus"     class="form-control updateInvest  urine_pus" 
                                                                                                    data-colName="pus"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_pus"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_pus as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->pus ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                    <div class="col-md-2 wds4">
                                                                                        - 
                                                                                    </div>

                                                                                    <div class="col-md-2 wds23">
                                                                                        <select     select-colName="name"    select-tableName="urine_pus2"     class="form-control updateInvest  urine_pus2" 
                                                                                                    data-colName="pus2"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_pus2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_pus2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->pus2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Amorphous:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_amorphous"     class="form-control updateInvest  urine_amorphous" 
                                                                                                    data-colName="amorphous"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_amorphous"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_amorphous as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->amorphous ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                    <div class="col-md-2" style="float: right;">
                                                                                        <select     select-colName="name"    select-tableName="urine_amorphous2"     class="form-control updateInvest  urine_amorphous2" 
                                                                                                    data-colName="amorphous2"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_amorphous2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_amorphous2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->amorphous2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">R.B.Cs:</label>
                                                                                    <div class="col-md-2 wds23">
                                                                                        <select     select-colName="name"    select-tableName="urine_pbcs"     class="form-control updateInvest  urine_pbcs" 
                                                                                                    data-colName="pbcs"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_pbcs"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_pbcs as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->pbcs ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>

                                                                                    <div class="col-md-2 wds4">
                                                                                        - 
                                                                                    </div>

                                                                                    <div class="col-md-2 wds23">
                                                                                        <select     select-colName="name"    select-tableName="urine_pbcs2"     class="form-control updateInvest  urine_pbcs2" 
                                                                                                    data-colName="pbcs2"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_pbcs2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_pbcs2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->pbcs2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>


                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Ova:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_ova"     class="form-control updateInvest  urine_ova" 
                                                                                                    data-colName="ova"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_ova"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_ova as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->ova ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Epithelial Cells: :</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_epithelial"     class="form-control updateInvest  urine_epithelial" 
                                                                                                    data-colName="epithelial"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_epithelial"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_epithelial as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->epithelial ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>



                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Trophazite:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_trophazite"     class="form-control updateInvest  urine_trophazite" 
                                                                                                    data-colName="trophazite"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_trophazite"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_trophazite as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->trophazite ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>



                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Casts:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_casts"     class="form-control updateInvest  urine_casts" 
                                                                                                    data-colName="casts"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_casts"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_casts as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->casts ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>






                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Mucus:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_mucus"     class="form-control updateInvest  urine_mucus" 
                                                                                                    data-colName="mucus"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_mucus"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_mucus as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->mucus ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_casts2"     class="form-control updateInvest  urine_casts2" 
                                                                                                    data-colName="casts2"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_casts2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_casts2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->casts2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Urine Artifacts:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_artifacts"     class="form-control updateInvest  urine_artifacts" 
                                                                                                    data-colName="artifacts"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_artifacts"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_artifacts as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->artifacts ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Crystal:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_crystal"     class="form-control updateInvest  urine_crystal" 
                                                                                                    data-colName="crystal"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_crystal"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_crystal as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->crystal ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Fungi:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_fungi"     class="form-control updateInvest  urine_fungi" 
                                                                                                    data-colName="fungi"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_fungi"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_fungi as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->fungi ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_crystal2"     class="form-control updateInvest  urine_crystal2" 
                                                                                                    data-colName="crystal2"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_crystal2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_crystal2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->crystal2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>



                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Bacteria:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="urine_bacteria"     class="form-control updateInvest  urine_bacteria" 
                                                                                                    data-colName="bacteria"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_bacteria"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_bacteria as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->bacteria ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>

                                                                                    <div class="col-md-2" style="float: right;">
                                                                                        <select     select-colName="name"    select-tableName="urine_bacteria2"     class="form-control updateInvest  urine_bacteria2" 
                                                                                                    data-colName="bacteria2"   data-id="{$inv->urine->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="urine_bacteria2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $urine_bacteria2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->urine->bacteria2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>


                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left; ">
                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                                                                    <div class="col-md-10">
                                                                                        <textarea class="form-control updateInvest txtc notPop" rows="2" data-id="{$inv->urine->id}" data-colName="comment" 
                                                                                                  data-tableName="{$inv->tableName}" placeholder="Enter more text">
                                                                                            {$inv->urine->comment}
                                                                                        </textarea>
                                                                                    </div>
                                                                                </div>


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

                                            </div>

                                            {else if $inv->special_inv_type == 3  }  
                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="stoolInvest" value="1" />


                                                <div class="card-header txtl">
                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>

                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>

                                                                <tr>
                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"    data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">


                                                                                <div class="form-group col-md-4 " style="margin-left: 30%;">
                                                                                    <h4 style="font-weight: bold;background: #DDD;padding:5px; ">Physical Examination :  </h4>   
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Color:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_color"     class="form-control updateInvest  stool_color" 
                                                                                                    data-colName="color"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_color"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_color as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->color ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Consistency:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_consistency"     class="form-control updateInvest  stool_consistency" 
                                                                                                    data-colName="consistency"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_consistency"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_consistency as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->consistency ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Reaction:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_reaction"     class="form-control updateInvest  stool_reaction" 
                                                                                                    data-colName="reaction"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_reaction"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_reaction as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->reaction ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Food Particles:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_food"     class="form-control updateInvest  stool_food" 
                                                                                                    data-colName="food"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_food"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_food as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->food ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Odor:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_odor"     class="form-control updateInvest  stool_odor" 
                                                                                                    data-colName="odor"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_odor"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_odor as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->odor ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Blood:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_blood"     class="form-control updateInvest  stool_blood" 
                                                                                                    data-colName="blood"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_blood"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_blood as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->blood ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Mucus :</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_mucus"     class="form-control updateInvest  stool_mucus" 
                                                                                                    data-colName="mucus"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_mucus"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_mucus as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->mucus ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-4 " style="margin-left: 30%;">
                                                                                    <h4 style="font-weight: bold;background: #DDD;padding:5px; ">Microscopic  Examination :  </h4>   
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">WBCs:</label>
                                                                                    <div class="col-md-2 wds23">
                                                                                        <select     select-colName="name"    select-tableName="stool_wbc"     class="form-control updateInvest  stool_wbc" 
                                                                                                    data-colName="wbc"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_wbc"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_wbc as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->wbc ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                    <div class="col-md-2 wds4">
                                                                                        - 
                                                                                    </div>

                                                                                    <div class="col-md-2 wds23">
                                                                                        <select     select-colName="name"    select-tableName="stool_wbc2"     class="form-control updateInvest  stool_wbc2" 
                                                                                                    data-colName="wbc2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_wbc2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_wbc2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->wbc2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Proglottids:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_prog"     class="form-control updateInvest  stool_prog" 
                                                                                                    data-colName="prog"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_prog"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_prog as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->prog ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">RBCs:</label>
                                                                                    <div class="col-md-2 wds23">
                                                                                        <select     select-colName="name"    select-tableName="stool_rbc"     class="form-control updateInvest  stool_rbc" 
                                                                                                    data-colName="rbc"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_rbc"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_rbc as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->rbc ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                    <div class="col-md-2 wds4">
                                                                                        - 
                                                                                    </div>

                                                                                    <div class="col-md-2 wds23">
                                                                                        <select     select-colName="name"    select-tableName="stool_rbc2"     class="form-control updateInvest  stool_rbc2" 
                                                                                                    data-colName="rbc2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_rbc2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_rbc2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->rbc2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_prog2"     class="form-control updateInvest  stool_prog2" 
                                                                                                    data-colName="prog2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_prog2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_prog2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->prog2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Trophozoite:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_trophozoite"     class="form-control updateInvest  stool_trophozoite" 
                                                                                                    data-colName="trophozoite"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_trophozoite"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_trophozoite as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->trophozoite ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>

                                                                                    <div class="col-md-2" style="float: right;">
                                                                                        <select     select-colName="name"    select-tableName="stool_trophozoite2"     class="form-control updateInvest  stool_trophozoite2" 
                                                                                                    data-colName="trophozoite2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_trophozoite2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_trophozoite2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->trophozoite2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>


                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Flagellates:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_flagellates"     class="form-control updateInvest  stool_flagellates" 
                                                                                                    data-colName="flagellates"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_flagellates"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_flagellates as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->flagellates ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_trophozoite3"     class="form-control updateInvest  stool_trophozoite3" 
                                                                                                    data-colName="trophozoite3"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_trophozoite3"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_trophozoite3 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->trophozoite3 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_flagellates2"     class="form-control updateInvest  stool_flagellates2" 
                                                                                                    data-colName="flagellates2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_flagellates2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_flagellates2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->flagellates2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Cysts:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_cysts"     class="form-control updateInvest  stool_cysts" 
                                                                                                    data-colName="cysts"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_cysts"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_cysts as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->cysts ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Ciliate:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_ciliate"     class="form-control updateInvest  stool_ciliate" 
                                                                                                    data-colName="ciliate"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_ciliate"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_ciliate as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->ciliate ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_cysts2"     class="form-control updateInvest  stool_cysts2" 
                                                                                                    data-colName="cysts2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_cysts2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_cysts2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->cysts2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Undigested Food:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_undigested"     class="form-control updateInvest  stool_undigested" 
                                                                                                    data-colName="undigested"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_undigested"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_undigested as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->undigested ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>

                                                                                    <div class="col-md-2" style="float: right;">
                                                                                        <select     select-colName="name"    select-tableName="stool_undigested2"     class="form-control updateInvest  stool_undigested2" 
                                                                                                    data-colName="undigested2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_undigested2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_undigested2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->undigested2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>


                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Ova:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_ova"     class="form-control updateInvest  stool_ova" 
                                                                                                    data-colName="ova"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_ova"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_ova as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->ova ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_undigested3"     class="form-control updateInvest  stool_undigested3" 
                                                                                                    data-colName="undigested3"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_undigested3"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_undigested3 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->undigested3 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_ova2"     class="form-control updateInvest  stool_ova2" 
                                                                                                    data-colName="ova2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_ova2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_ova2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->ova2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_undigested4"     class="form-control updateInvest  stool_undigested4" 
                                                                                                    data-colName="undigested4"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_undigested4"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_undigested4 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->undigested4 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Larva:</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_larva"     class="form-control updateInvest  stool_larva" 
                                                                                                    data-colName="larva"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_larva"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_larva as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->larva ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Parasitology Artifacts: :</label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_parasitology"     class="form-control updateInvest  stool_parasitology" 
                                                                                                    data-colName="parasitology"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_parasitology"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_parasitology as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->parasitology ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_larva2"     class="form-control updateInvest  stool_larva2" 
                                                                                                    data-colName="larva2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_larva2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_larva2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->larva2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-6 " style=" float: left; ">
                                                                                    <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;"></label>
                                                                                    <div class="col-md-6">
                                                                                        <select     select-colName="name"    select-tableName="stool_parasitology2"     class="form-control updateInvest  stool_parasitology2" 
                                                                                                    data-colName="parasitology2"   data-id="{$inv->stool->id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="stool_parasitology2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $stool_parasitology2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->stool->parasitology2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left; ">
                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                                                                    <div class="col-md-10">
                                                                                        <textarea class="form-control updateInvest txtc notPop" rows="2" data-id="{$inv->stool->id}" data-colName="comment" 
                                                                                                  data-tableName="{$inv->tableName}" placeholder="Enter more text" >
                                                                                            {$inv->stool->comment}
                                                                                        </textarea>
                                                                                    </div>
                                                                                </div>




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


                                            </div>


                                            {else if $inv->special_inv_type == 1  }  
                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="bPictureInvest" value="1" />



                                                <div class="card-header txtl">
                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>

                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class="btn btn-xs blue fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>

                                                                <tr>
                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"    data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">



                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;">Hgb  : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest blood bloodCalc  notPop    positivefloat" data-colName="hgb"  data-target="hgb"    
                                                                                               data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->hgb}"  id="hgb_blood"
                                                                                               data-level="1"  {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  data-colName="hgb_calc"  class="form-control  notPop    updateInvest positivefloat   " 
                                                                                               value="{$inv->blood->hgb_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                               id="hgb_calc"  {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="hgb_level"  class="form-control  notPop   " value="   {if $inv->blood->hgb_low == 1 } L  {else if $inv->blood->hgb_high == 1 } H   {/if}  ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest blood" data-colName="hgb_rangeid" 
                                                                                                       data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}"   data-target="hgb"   
                                                                                                       id="hgb_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->blood->hgb_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->blood->hgb_rangeid} selected {/if} > {$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units}</option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>



                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;">RBC : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest blood bloodCalc   notPop    positivefloat" data-colName="rbc"  data-target="rbc"    
                                                                                               data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->rbc}"  id="rbc_blood"
                                                                                               data-level="2" {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  data-colName="rbc_calc"  class="form-control updateInvest  notPop    positivefloat  " 
                                                                                               value="{$inv->blood->rbc_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                               id="rbc_calc"  {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="rbc_level"  class="form-control  notPop   " value=" {if $inv->blood->rbc_range_txt == Null || $inv->blood->rbc_range_txt  == ''}   {if $inv->blood->rbc_low == 1 } L  {else if $inv->blood->rbc_high == 1 } H   {/if} {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest blood" data-colName="rbc_rangeid" 
                                                                                                       data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}"   data-target="rbc"   
                                                                                                       id="rbc_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->blood->rbc_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->blood->rbc_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units}</option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;">WBC : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest blood positivefloat absCalcAll  notPop   " data-colName="wbc"  data-target="wbc"    
                                                                                               data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->wbc}"  id="wbc_blood"
                                                                                               data-level="5" {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  data-colName="wbc_calc"  class="form-control updateInvest   notPop    positivefloat  " 
                                                                                               value="{$inv->blood->wbc_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                               id="wbc_calc"   {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="wbc_level"  class="form-control  notPop   " value=" {if $inv->blood->wbc_range_txt == Null || $inv->blood->wbc_range_txt  == ''}   {if $inv->blood->wbc_low == 1 } L  {else if $inv->blood->wbc_high == 1 } H   {/if} {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest blood" data-colName="wbc_rangeid" 
                                                                                                       data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}"   data-target="wbc"   
                                                                                                       id="wbc_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->blood->wbc_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->blood->wbc_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units}</option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;">Plt : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest blood positivefloat  notPop   " data-colName="plt"  data-target="plt"    
                                                                                               data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->plt}"  id="plt_blood"
                                                                                               data-level="13" {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  data-colName="plt_calc"  class="form-control updateInvest  positivefloat   notPop    " 
                                                                                               value="{$inv->blood->plt_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                               id="plt_calc"  {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="plt_level"  class="form-control  notPop   " value=" {if $inv->blood->plt_range_txt == Null || $inv->blood->plt_range_txt  == ''}   {if $inv->blood->plt_low == 1 } L  {else if $inv->blood->plt_high == 1 } H   {/if} {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest blood" data-colName="plt_rangeid" 
                                                                                                       data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}"   data-target="plt"   
                                                                                                       id="plt_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->blood->plt_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->blood->plt_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units}</option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">
                                                                                    <div class="form-group  wds35 " style=" float: left; margin-top: 5px; ">

                                                                                    </div>
                                                                                    <div class="form-group wds14 " style=" float: left; margin-top: 5px;margin-left: 4%; ">
                                                                                        Relative Count
                                                                                    </div>

                                                                                    <div class="form-group wds17 " style=" float: left; margin-top: 5px;margin-left: 1%;">
                                                                                        Absolute Count
                                                                                    </div>

                                                                                </div>

                                                                                <div class="form-group col-md-3 " style=" float: left; margin-top: 5px; ">

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-6 control-label bold txtl" style=" font-size: 16px;">Hct : </label>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  class="form-control updateInvest bloodCalc   notPop     positivefloat" data-colName="hct"  data-target="hct"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->hct}"  id="hct_blood"
                                                                                                   data-level="3" {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  data-colName="hct_calc"  class="form-control  notPop    updateInvest positivefloat  "  id="hct_calc" 
                                                                                                   value="{$inv->blood->hct_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>


                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-6 control-label bold txtl" style=" font-size: 16px;">MCV : </label>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  data-colName="mcv_calc"  class="form-control updateInvest   notPop   positivefloat  "   id="mcv_calc" 
                                                                                                   value="{$inv->blood->mcv_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   disabled="" >
                                                                                        </div>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  class="form-control updateInvest  positivefloat  notPop   " data-colName="mcv"  data-target="mcv"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->mcv}"  id="mcv_blood"
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>


                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-6 control-label bold txtl" style=" font-size: 16px;">MCH : </label>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  data-colName="mch_calc"  class="form-control  notPop    updateInvest positivefloat  "   id="mch_calc" 
                                                                                                   value="{$inv->blood->mch_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   disabled="" >
                                                                                        </div>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  class="form-control updateInvest   notPop    positivefloat" data-colName="mch"  data-target="mch"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->mch}"  id="mch_blood"
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>


                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-6 control-label bold txtl" style=" font-size: 16px;">MCHC : </label>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  data-colName="mchc_calc"  class="form-control   notPop   updateInvest positivefloat  "  id="mchc_calc"   
                                                                                                   value="{$inv->blood->mchc_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   disabled="" >
                                                                                        </div>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  class="form-control updateInvest   notPop    positivefloat" data-colName="mchc"  data-target="mchc"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->mchc}"  id="mchc_blood"
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>


                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-6 control-label bold txtl" style=" font-size: 16px;">RDW : </label>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  class="form-control updateInvest  positivefloat  notPop   " data-colName="rdw"  data-target="rdw"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->rdw}"  id="rdw_blood"
                                                                                                   data-level="4" {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  data-colName="rdw_calc"  class="form-control updateInvest positivefloat  notPop     "  id="rdw_calc"   
                                                                                                   value="{$inv->blood->rdw_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>


                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-6 control-label bold txtl" style=" font-size: 16px;">Hgb % : </label>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  class="form-control updateInvest  positivefloat  notPop   " data-colName="hgbpercent"  data-target="hgbpercent"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->hgbpercent}"  id="hgbpercent_blood"
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  data-colName="hgbpercent_calc"  class="form-control updateInvest  positivefloat  notPop     "   id="hgbpercent_calc"    
                                                                                                   value="{$inv->blood->hgbpercent_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>


                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-6 control-label bold txtl" style=" font-size: 16px;">Mentzer Index % : </label>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  class="form-control updateInvest  positivefloat  notPop   " data-colName="mindex"  data-target="mindex"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->mindex}"  id="mindex_blood"
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                        <div class="col-md-3">
                                                                                            <input type="text"  data-colName="mindex_calc"  class="form-control updateInvest positivefloat   notPop     "   id="mindex_calc"     
                                                                                                   value="{$inv->blood->mindex_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>


                                                                                </div>


                                                                                <div class="form-group col-md-3 " style=" float: left; margin-top: 5px;    margin-left: 3%; ">


                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-5 control-label bold txtl" style=" font-size: 16px;">Neutrophil : </label>

                                                                                        <div class="col-md-5">
                                                                                            <input type="text"  class="form-control  positivefloat absCalc cells_calc  notPop    " data-colName="neutrophil_r"  
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->neutrophil_r}" 
                                                                                                   data-level="6"   id="neutrophil_r_blood" data-target="neutrophil_abs" {if $archive == 1 } disabled="" {/if}    >
                                                                                        </div>

                                                                                        <div class="col-md-2">
                                                                                            <input type="text"   class="form-control   notPop   "  value="%"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-5 control-label bold txtl" style=" font-size: 16px;">Lymphocytes : </label>

                                                                                        <div class="col-md-5">
                                                                                            <input type="text"  class="form-control  positivefloat absCalc cells_calc   notPop   " data-colName="lymphocytes_r"  
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->lymphocytes_r}" 
                                                                                                   data-level="9"  id="lymphocytes_r_blood" data-target="lymphocytes_abs" {if $archive == 1 } disabled="" {/if}    >
                                                                                        </div>

                                                                                        <div class="col-md-2">
                                                                                            <input type="text"   class="form-control  notPop    "  value="%"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-5 control-label bold txtl" style=" font-size: 16px;">Monocytes : </label>

                                                                                        <div class="col-md-5">
                                                                                            <input type="text"  class="form-control  positivefloat absCalc  cells_calc  notPop   " data-colName="monocytes_r"  
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->monocytes_r}" 
                                                                                                   data-level="10"   id="monocytes_r_blood" data-target="monocytes_abs" {if $archive == 1 } disabled="" {/if}    >
                                                                                        </div>

                                                                                        <div class="col-md-2">
                                                                                            <input type="text"   class="form-control  notPop   "  value="%"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-5 control-label bold txtl" style=" font-size: 16px;">Eosinophils : </label>

                                                                                        <div class="col-md-5">
                                                                                            <input type="text"  class="form-control  positivefloat absCalc cells_calc  notPop    " data-colName="eosinophils_r"  
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->eosinophils_r}" 
                                                                                                   data-level="11"   id="eosinophils_r_blood" data-target="eosinophils_abs" {if $archive == 1 } disabled="" {/if}    >
                                                                                        </div>

                                                                                        <div class="col-md-2">
                                                                                            <input type="text"   class="form-control  notPop    "  value="%"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-5 control-label bold txtl" style=" font-size: 16px;">Basophils : </label>

                                                                                        <div class="col-md-5">
                                                                                            <input type="text"  class="form-control  positivefloat absCalc cells_calc  notPop    " data-colName="basophils_r"  
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->basophils_r}" 
                                                                                                   data-level="12"  id="basophils_r_blood" data-target="basophils_abs" {if $archive == 1 } disabled="" {/if}    >
                                                                                        </div>

                                                                                        <div class="col-md-2">
                                                                                            <input type="text"   class="form-control  notPop    "  value="%"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-5 control-label bold txtl" style=" font-size: 16px;">Other Cells : </label>

                                                                                        <div class="col-md-7">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="othercells"  
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->othercells}" 
                                                                                                   id="othercells_blood" disabled=""  >
                                                                                        </div>
                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-5 control-label bold txtl" style=" font-size: 16px;">Segmented  : </label>

                                                                                        <div class="col-md-5">
                                                                                            <input type="text"  class="form-control  positivefloat   notPop    " data-colName="segmented"  
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->segmented}" 
                                                                                                   data-level="7"  id="segmented_blood"  {if $archive == 1 } disabled="" {/if}    >
                                                                                        </div>
                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-5 control-label bold txtl" style=" font-size: 16px;">Band  : </label>

                                                                                        <div class="col-md-5">
                                                                                            <input type="text"  class="form-control  positivefloat   notPop    " data-colName="band"  
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->band}" 
                                                                                                   data-level="8"  id="band_blood"  {if $archive == 1 } disabled="" {/if}    >
                                                                                        </div>
                                                                                    </div>


                                                                                </div>

                                                                                <div class="form-group col-md-2 " style=" float: left; margin-top: 5px;     margin-left: 1%;">

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">
                                                                                        <div class="col-md-8">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="neutrophil_abs"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->neutrophil_abs}" 
                                                                                                   id="neutrophil_abs_blood"    disabled=""   >
                                                                                        </div>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"   class="form-control  notPop    "  value="K/uL"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">
                                                                                        <div class="col-md-8">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat   notPop   " data-colName="lymphocytes_abs"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->lymphocytes_abs}" 
                                                                                                   id="lymphocytes_abs_blood"    disabled=""   >
                                                                                        </div>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"   class="form-control   notPop   "  value="K/uL"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">
                                                                                        <div class="col-md-8">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="monocytes_abs"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->monocytes_abs}" 
                                                                                                   id="monocytes_abs_blood"    disabled=""   >
                                                                                        </div>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"   class="form-control  notPop    "  value="K/uL"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">
                                                                                        <div class="col-md-8">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="eosinophils_abs"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->eosinophils_abs}" 
                                                                                                   id="eosinophils_abs_blood"    disabled=""   >
                                                                                        </div>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"   class="form-control   notPop   "  value="K/uL"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">
                                                                                        <div class="col-md-8">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="basophils_abs"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->basophils_abs}" 
                                                                                                   id="basophils_abs_blood"    disabled=""   >
                                                                                        </div>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"   class="form-control   notPop   "  value="K/uL"    disabled=""  >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px;height: 30px; "></div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">
                                                                                        <div class="col-md-8">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="segmented1"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->segmented1}" 
                                                                                                   id="segmented1_blood"     {if $archive == 1 } disabled="" {/if}    >
                                                                                        </div>
                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">
                                                                                        <div class="col-md-8">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="band1"    
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->band1}" 
                                                                                                   id="band1_blood"   {if $archive == 1 } disabled="" {/if}    >
                                                                                        </div>
                                                                                    </div>


                                                                                </div>

                                                                                <div class="form-group col-md-3 " style=" float: left; margin-top: 5px;     margin-left: 3%;">

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">Pct : </label>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="pct"     
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->pct}"  id="pct_blood"
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   "  data-colName="pct_calc"    id="pct_calc" 
                                                                                                   value="{$inv->blood->pct_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">MPV : </label>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="mpv"     
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->mpv}"  id="mpv_blood"
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   "  data-colName="mpv_calc"    id="mpv_calc" 
                                                                                                   value="{$inv->blood->mpv_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;">PDW : </label>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="pdw"     
                                                                                                   data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->pdw}"  id="pdw_blood"
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                        <div class="col-md-4">
                                                                                            <input type="text"  class="form-control updateInvest positivefloat  notPop   "  data-colName="pdw_calc"    id="pdw_calc" 
                                                                                                   value="{$inv->blood->pdw_calc}" data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" 
                                                                                                   {if $archive == 1 } disabled="" {/if} >
                                                                                        </div>

                                                                                    </div>

                                                                                    <div class="form-group col-md-12 " style="border: 1px solid black; margin-top: 5px;">

                                                                                        <div class="form-group col-md-12 " style=" float: left; margin-top: 5px;  margin-left:  5px; ">

                                                                                            <div class="col-md-4" style="margin-right: 9px;">
                                                                                                <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="nrbc"     
                                                                                                       data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->nrbc}"  id="nrbc_blood"
                                                                                                       {if $archive == 1 } disabled="" {/if} >
                                                                                            </div>

                                                                                            <label class="col-md-7 control-label bold txtl" style=" font-size: 16px;">NRBC / 100 WBC  </label>


                                                                                        </div>

                                                                                        <div class="form-group col-md-12 " style=" float: left; margin-top: 5px;margin-left:  5px;  ">

                                                                                            <div class="col-md-4" style="margin-right: 9px;">
                                                                                                <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="promyelocyte"     
                                                                                                       data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->promyelocyte}"  id="promyelocyte_blood"
                                                                                                       {if $archive == 1 } disabled="" {/if} >
                                                                                            </div>

                                                                                            <label class="col-md-7 control-label bold txtl" style=" font-size: 16px;">Promyelocyte  </label>


                                                                                        </div>

                                                                                        <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; margin-left:  5px; ">

                                                                                            <div class="col-md-4" style="margin-right: 9px;">
                                                                                                <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="myelocyte"     
                                                                                                       data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->myelocyte}"  id="myelocyte_blood"
                                                                                                       {if $archive == 1 } disabled="" {/if} >
                                                                                            </div>

                                                                                            <label class="col-md-7 control-label bold txtl" style=" font-size: 16px;">Myelocytes  </label>


                                                                                        </div>

                                                                                        <div class="form-group col-md-12 " style=" float: left; margin-top: 5px;margin-left:  5px;  ">

                                                                                            <div class="col-md-4" style="margin-right: 9px;">
                                                                                                <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="juvenile"     
                                                                                                       data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->juvenile}"  id="juvenile_blood"
                                                                                                       {if $archive == 1 } disabled="" {/if} >
                                                                                            </div>

                                                                                            <label class="col-md-7 control-label bold txtl" style=" font-size: 16px;">Juvenile  </label>


                                                                                        </div>

                                                                                        <div class="form-group col-md-12 " style=" float: left; margin-top: 5px;margin-left:  5px; margin-bottom:5px; ">

                                                                                            <div class="col-md-4" style="margin-right: 9px;">
                                                                                                <input type="text"  class="form-control updateInvest positivefloat  notPop   " data-colName="blast"     
                                                                                                       data-id="{$inv->blood->id}"  data-tableName="{$inv->tableName}" value="{$inv->blood->blast}"  id="blast_blood"
                                                                                                       {if $archive == 1 } disabled="" {/if} >
                                                                                            </div>

                                                                                            <label class="col-md-7 control-label bold txtl" style=" font-size: 16px;">Blast  </label>


                                                                                        </div>

                                                                                    </div>


                                                                                </div>


                                                                                <div class="form-group col-md-12 " style=" float: left;margin-top :  5px; ">
                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                                                                    <div class="col-md-10">
                                                                                        <textarea class="form-control updateInvest txtc   notPop   " rows="2" data-id="{$inv->blood->id}" data-colName="comment" 
                                                                                                  data-tableName="{$inv->tableName}" placeholder="Enter more text" >
                                                                                            {$inv->blood->comment}
                                                                                        </textarea>
                                                                                    </div>
                                                                                </div>



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


                                            </div>

                                            {else if $inv->special_inv_type == 4  }  
                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="cultureInvest" value="1" />
                                                <div class="card-header txtl">


                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>

                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>


                                                                <tr>

                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"    data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">



                                                                                <div class="tabbable tabbable-custom tabbable-noborder">

                                                                                    <ul class="nav nav-tabs">
                                                                                        <li class="aw_3d_list active"> <a href="#tab_1" data-toggle="tab"> Culture </a> </li>
                                                                                        <li class="aw_3d_list"  > <a href="#tab_2" data-toggle="tab"> Sensitivity </a> </li>
                                                                                    </ul>

                                                                                    <div class="tab-content">

                                                                                        <div class="tab-pane active" id="tab_1">
                                                                                            <div class="row all nolabel" style="border-bottom:  1px solid black;">
                                                                                                <div class="col-md-6">
                                                                                                    <div class="portlet-title tbox col-md-6">
                                                                                                        <div class="caption font-green-haze col-md-12">
                                                                                                            <span class="caption-subject bold uppercase"> Culture :  </span>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Sample : </label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="culture_sample"     class="form-control updateInvest  culture_sample" 
                                                                                                                        data-colName="sample"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_sample"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $culture_sample as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.sample ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Organism A : </label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="culture_organism_a"     class="form-control updateInvest  culture_organism_a" 
                                                                                                                        data-colName="organism_a"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_organism_a"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $culture_organism_a as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.organism_a ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Organism B : </label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="culture_organism_b"     class="form-control updateInvest  culture_organism_b" 
                                                                                                                        data-colName="organism_b"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_organism_b"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $culture_organism_b as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.organism_b ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Organism C : </label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="culture_organism_c"     class="form-control updateInvest  culture_organism_c" 
                                                                                                                        data-colName="organism_c"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_organism_c"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $culture_organism_c as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.organism_c ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Culture Condition : </label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="culture_condition"     class="form-control updateInvest  culture_condition" 
                                                                                                                        data-colName="condition"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_condition"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $culture_condition as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.condition ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;"></label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="culture_condition1"     class="form-control updateInvest  culture_condition1" 
                                                                                                                        data-colName="condition1"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_condition1"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $culture_condition1 as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.condition1 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>


                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Colony Count : </label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="culture_colony_count"     class="form-control updateInvest  culture_colony_count" 
                                                                                                                        data-colName="colony_count"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_colony_count"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $culture_colony_count as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.colony_count ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                </div>
                                                                                                <div class="col-md-6" style="border-left:  1px solid black;padding-left: 20px;">
                                                                                                    <div class="portlet-title tbox col-md-6">
                                                                                                        <div class="caption font-green-haze col-md-12">
                                                                                                            <span class="caption-subject bold uppercase"> Urine Examination :  </span>
                                                                                                        </div>
                                                                                                    </div>


                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Reaction:</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_reaction"     class="form-control updateInvest  culture_reaction" 
                                                                                                                        data-colName="reaction"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_reaction"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_reaction as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.reaction ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>



                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Pus Cells:</label>
                                                                                                        <div class="col-md-3">
                                                                                                            <select     select-colName="name"    select-tableName="urine_pus"     class="form-control updateInvest  culture_pus" 
                                                                                                                        data-colName="pus"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_pus"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_pus as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.pus ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                        <div class="col-md-1">
                                                                                                            - 
                                                                                                        </div>

                                                                                                        <div class="col-md-3">
                                                                                                            <select     select-colName="name"    select-tableName="urine_pus2"     class="form-control updateInvest  culture_pus2" 
                                                                                                                        data-colName="pus2"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_pus2"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_pus2 as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.pus2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>



                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">R.B.Cs:</label>
                                                                                                        <div class="col-md-3">
                                                                                                            <select     select-colName="name"    select-tableName="urine_pbcs"     class="form-control updateInvest  culture_pbcs" 
                                                                                                                        data-colName="pbcs"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_pbcs"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_pbcs as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.pbcs ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>

                                                                                                        <div class="col-md-1">
                                                                                                            - 
                                                                                                        </div>

                                                                                                        <div class="col-md-3">
                                                                                                            <select     select-colName="name"    select-tableName="urine_pbcs2"     class="form-control updateInvest  culture_pbcs2" 
                                                                                                                        data-colName="pbcs2"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_pbcs2"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_pbcs2 as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.pbcs2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>


                                                                                                    </div>




                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Epithelial Cells: :</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_epithelial"     class="form-control updateInvest  culture_epithelial" 
                                                                                                                        data-colName="epithelial"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_epithelial"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_epithelial as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.epithelial ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>



                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Crystal:</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_crystal"     class="form-control updateInvest  culture_crystal" 
                                                                                                                        data-colName="crystal"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_crystal"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_crystal as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.crystal ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Fungi:</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_fungi"     class="form-control updateInvest  culture_fungi" 
                                                                                                                        data-colName="fungi"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_fungi"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_fungi as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.fungi ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>




                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Bacteria:</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_bacteria"     class="form-control updateInvest  culture_bacteria" 
                                                                                                                        data-colName="bacteria"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_bacteria"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_bacteria as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.bacteria ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Others : </label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_other"     class="form-control updateInvest  culture_other" 
                                                                                                                        data-colName="other"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_other"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_other as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.other ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Others :</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_other1"     class="form-control updateInvest  culture_other1" 
                                                                                                                        data-colName="other1"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_other1"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_other1 as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.other1 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Others :</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_other2"     class="form-control updateInvest  culture_other2" 
                                                                                                                        data-colName="other2"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_other2"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_other2 as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.other2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Others :</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_other3"     class="form-control updateInvest  culture_other3" 
                                                                                                                        data-colName="other3"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_other3"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_other3 as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.other3 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Others :</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_other4"     class="form-control updateInvest  culture_other4" 
                                                                                                                        data-colName="other4"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_other4"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_other4 as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.other4 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">Gram stain film  :</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_gram"     class="form-control updateInvest  culture_gram" 
                                                                                                                        data-colName="gram"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_gram"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_gram as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.gram ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <label class="col-md-4 control-label bold txtl" style=" font-size: 16px;margin-left: 4px;">ZN film  :</label>
                                                                                                        <div class="col-md-7">
                                                                                                            <select     select-colName="name"    select-tableName="urine_zn_film"     class="form-control updateInvest  culture_zn_film" 
                                                                                                                        data-colName="zn_film"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_zn_film"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $urine_zn_film as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.zn_film ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>


                                                                                                </div>
                                                                                            </div>

                                                                                            <div class="form-group col-md-12 " style=" float: left;margin-top :  5px; ">
                                                                                                <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                                                                                <div class="col-md-10">
                                                                                                    <textarea class="form-control updateInvest txtc" rows="2" data-id="{$inv->culture.id}" data-colName="comment" 
                                                                                                              data-tableName="{$inv->tableName}" placeholder="Enter more text" data-toggle="popover" 
                                                                                                              data-trigger="hover" data-placement="bottom" data-content="{$inv->culture.comment}">
                                                                                                        {$inv->culture.comment}
                                                                                                    </textarea>
                                                                                                </div>
                                                                                            </div>
                                                                                            <div class="clearfix"></div>
                                                                                        </div>

                                                                                        <!-------------------------------------------------------------------------------------------------------------------->

                                                                                        <div class="tab-pane" id="tab_2">
                                                                                            <div class="row all nolabel" style="border-bottom:  1px solid black;">
                                                                                                <div class="col-md-6">
                                                                                                    <div class="portlet-title tbox col-md-6">
                                                                                                        <div class="caption font-green-haze col-md-12">
                                                                                                            <span class="caption-subject bold uppercase"> Sensitivity :  </span>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-4 " style=" float: left;padding: 8px 3px; ">
                                                                                                        <div class="col-md-12">
                                                                                                            <select     select-colName="name"    select-tableName="culture_sensitivity_cat"     class="form-control updateInvest  culture_sensitivity_cat" 
                                                                                                                        data-colName="sensitivity_cat"   data-id="{$inv->culture.id}"  data-tableName="{$inv->tableName}"
                                                                                                                        id="culture_sensitivity_cat"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                <option value=""></option>
                                                                                                                {foreach $culture_sensitivity_cat as $data}
                                                                                                                <option value="{$data->id}" {if $inv->culture.sensitivity_cat ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                                {/foreach}
                                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                                            </select>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <input type="hidden" id="activeTab" value="hs" />

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">

                                                                                                        <div class="tabbable tabbable-custom tabbable-noborder">

                                                                                                            <ul class="nav nav-tabs">
                                                                                                                <li class="aw_3d_list active" style="padding: 0px 5px !important;"> <a class="activeTab" data-tab="hs" href="#tab_2_1" data-toggle="tab"> Highly For </a> </li>
                                                                                                                <li class="aw_3d_list"  style="padding: 0px 5px !important;" > <a class="activeTab" data-tab="ms" href="#tab_2_2" data-toggle="tab"> Moderate For  </a> </li>
                                                                                                                <li class="aw_3d_list"  style="padding: 0px 5px !important;" > <a class="activeTab" data-tab="ls" href="#tab_2_3" data-toggle="tab"> Low For  </a> </li>
                                                                                                                <li class="aw_3d_list"  style="padding: 0px 5px !important;" > <a class="activeTab" data-tab="rs" href="#tab_2_4" data-toggle="tab"> Resistant For  </a> </li>
                                                                                                            </ul>

                                                                                                            <div class="tab-content">

                                                                                                                <div class="tab-pane active" id="tab_2_1">
                                                                                                                    <div class="row nolabel" style="border:  1px solid black;">
                                                                                                                        <div class="col-md-12">
                                                                                                                            <table class="table table-striped table-hover table-bordered">
                                                                                                                                <thead>
                                                                                                                                    <tr>
                                                                                                                                        <th class="bold col-md-1"> <div align="center">No </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Abbr </div></th>
                                                                                                                                        <th class="bold"> <div align="center">Scientific Name </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Sensit. </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Sensitivity </div></th>
                                                                                                                                        <th class="wds3"></th>
                                                                                                                                    </tr>
                                                                                                                                </thead>
                                                                                                                                <tbody id="hsContainer">
                                                                                                                                    {assign var=i value=1}
                                                                                                                                    {foreach $inv->culture.investigationresults_culture_hs as $data}
                                                                                                                                    <tr>
                                                                                                                                        <td> {$i} </td>
                                                                                                                                        <td>{$data.abbr}</td>
                                                                                                                                        <td>{$data.scientific_name}</td>
                                                                                                                                        <td>
                                                                                                                                            <input type="text"  class="form-control updateInvest  notPop   " data-colName="sensitive"     
                                                                                                                                                   data-id="{$data.id}"  data-tableName="investigationresults_culture_hs" 
                                                                                                                                                   value="{$data.sensitive}"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                                        </td>
                                                                                                                                        <td>{$data.sensitivity}</td>
                                                                                                                                        <td>
                                                                                                                                            <a class=" btn-warning btn-xs wds3 deleteMAbbr "  href="javascript:;"  data-culture="{$inv->culture.id}"
                                                                                                                                               data-id="{$data.id}"  data-tableName="investigationresults_culture_hs"   >
                                                                                                                                                <i class="fa fa-close"></i> 
                                                                                                                                            </a>
                                                                                                                                        </td>
                                                                                                                                    </tr>
                                                                                                                                    {capture assign=i}{$i+1}{/capture}
                                                                                                                                    {/foreach}
                                                                                                                                </tbody>
                                                                                                                            </table>
                                                                                                                        </div>
                                                                                                                    </div>
                                                                                                                    <div class="clearfix"></div>
                                                                                                                </div>


                                                                                                                <div class="tab-pane" id="tab_2_2">
                                                                                                                    <div class="row  nolabel" style="border:  1px solid black;">
                                                                                                                        <div class="col-md-12">
                                                                                                                            <table class="table table-striped table-hover table-bordered">
                                                                                                                                <thead>
                                                                                                                                    <tr>
                                                                                                                                        <th class="bold col-md-1"> <div align="center">No </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Abbr </div></th>
                                                                                                                                        <th class="bold"> <div align="center">Scientific Name </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Sensit. </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Sensitivity </div></th>
                                                                                                                                        <th class="wds3"></th>
                                                                                                                                    </tr>
                                                                                                                                </thead>
                                                                                                                                <tbody id="msContainer">
                                                                                                                                    {assign var=i value=1}
                                                                                                                                    {foreach $inv->culture.investigationresults_culture_ms as $data}
                                                                                                                                    <tr>
                                                                                                                                        <td> {$i} </td>
                                                                                                                                        <td>{$data.abbr}</td>
                                                                                                                                        <td>{$data.scientific_name}</td>
                                                                                                                                        <td>
                                                                                                                                            <input type="text"  class="form-control updateInvest  notPop   " data-colName="sensitive"     
                                                                                                                                                   data-id="{$data.id}"  data-tableName="investigationresults_culture_ms" 
                                                                                                                                                   value="{$data.sensitive}"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                                        </td>
                                                                                                                                        <td>{$data.sensitivity}</td>
                                                                                                                                        <td>
                                                                                                                                            <a class=" btn-warning btn-xs wds3 deleteMAbbr "  href="javascript:;"  data-culture="{$inv->culture.id}"
                                                                                                                                               data-id="{$data.id}"  data-tableName="investigationresults_culture_ms"   >
                                                                                                                                                <i class="fa fa-close"></i> 
                                                                                                                                            </a>
                                                                                                                                        </td>
                                                                                                                                    </tr>
                                                                                                                                    {capture assign=i}{$i+1}{/capture}
                                                                                                                                    {/foreach}
                                                                                                                                </tbody>
                                                                                                                            </table>
                                                                                                                        </div>
                                                                                                                    </div>
                                                                                                                    <div class="clearfix"></div>
                                                                                                                </div>



                                                                                                                <div class="tab-pane" id="tab_2_3">
                                                                                                                    <div class="row  nolabel" style="border:  1px solid black;">
                                                                                                                        <div class="col-md-12">
                                                                                                                            <table class="table table-striped table-hover table-bordered">
                                                                                                                                <thead>
                                                                                                                                    <tr>
                                                                                                                                        <th class="bold col-md-1"> <div align="center">No </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Abbr </div></th>
                                                                                                                                        <th class="bold"> <div align="center">Scientific Name </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Sensit. </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Sensitivity </div></th>
                                                                                                                                        <th class="wds3"></th>
                                                                                                                                    </tr>
                                                                                                                                </thead>
                                                                                                                                <tbody id="lsContainer">
                                                                                                                                    {assign var=i value=1}
                                                                                                                                    {foreach $inv->culture.investigationresults_culture_ls as $data}
                                                                                                                                    <tr>
                                                                                                                                        <td> {$i} </td>
                                                                                                                                        <td>{$data.abbr}</td>
                                                                                                                                        <td>{$data.scientific_name}</td>
                                                                                                                                        <td>
                                                                                                                                            <input type="text"  class="form-control updateInvest  notPop   " data-colName="sensitive"     
                                                                                                                                                   data-id="{$data.id}"  data-tableName="investigationresults_culture_ls" 
                                                                                                                                                   value="{$data.sensitive}"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                                        </td>
                                                                                                                                        <td>{$data.sensitivity}</td>
                                                                                                                                        <td>
                                                                                                                                            <a class=" btn-warning btn-xs wds3 deleteMAbbr "  href="javascript:;"  data-culture="{$inv->culture.id}"
                                                                                                                                               data-id="{$data.id}"  data-tableName="investigationresults_culture_ls"   >
                                                                                                                                                <i class="fa fa-close"></i> 
                                                                                                                                            </a>
                                                                                                                                        </td>
                                                                                                                                    </tr>
                                                                                                                                    {capture assign=i}{$i+1}{/capture}
                                                                                                                                    {/foreach}
                                                                                                                                </tbody>
                                                                                                                            </table>
                                                                                                                        </div>
                                                                                                                    </div>
                                                                                                                    <div class="clearfix"></div>
                                                                                                                </div>

                                                                                                                <div class="tab-pane" id="tab_2_4">
                                                                                                                    <div class="row  nolabel" style="border:  1px solid black;">
                                                                                                                        <div class="col-md-12">
                                                                                                                            <table class="table table-striped table-hover table-bordered">
                                                                                                                                <thead>
                                                                                                                                    <tr>
                                                                                                                                        <th class="bold col-md-1"> <div align="center">No </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Abbr </div></th>
                                                                                                                                        <th class="bold"> <div align="center">Scientific Name </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Sensit. </div></th>
                                                                                                                                        <th class="bold col-md-2"> <div align="center">Sensitivity </div></th>
                                                                                                                                        <th class="wds3"></th>
                                                                                                                                    </tr>
                                                                                                                                </thead>
                                                                                                                                <tbody id="rsContainer">
                                                                                                                                    {assign var=i value=1}
                                                                                                                                    {foreach $inv->culture.investigationresults_culture_rs as $data}
                                                                                                                                    <tr>
                                                                                                                                        <td> {$i} </td>
                                                                                                                                        <td>{$data.abbr}</td>
                                                                                                                                        <td>{$data.scientific_name}</td>
                                                                                                                                        <td>
                                                                                                                                            <input type="text"  class="form-control updateInvest  notPop   " data-colName="sensitive"     
                                                                                                                                                   data-id="{$data.id}"  data-tableName="investigationresults_culture_rs" 
                                                                                                                                                   value="{$data.sensitive}"  {if $archive == 1 } disabled="" {/if} >
                                                                                                                                        </td>
                                                                                                                                        <td>{$data.sensitivity}</td>
                                                                                                                                        <td>
                                                                                                                                            <a class=" btn-warning btn-xs wds3 deleteMAbbr "  href="javascript:;"  data-culture="{$inv->culture.id}"
                                                                                                                                               data-id="{$data.id}"  data-tableName="investigationresults_culture_rs"   >
                                                                                                                                                <i class="fa fa-close"></i> 
                                                                                                                                            </a>
                                                                                                                                        </td>
                                                                                                                                    </tr>
                                                                                                                                    {capture assign=i}{$i+1}{/capture}
                                                                                                                                    {/foreach}
                                                                                                                                </tbody>
                                                                                                                            </table>
                                                                                                                        </div>
                                                                                                                    </div>
                                                                                                                    <div class="clearfix"></div>
                                                                                                                </div>


                                                                                                            </div>


                                                                                                        </div>




                                                                                                    </div>

                                                                                                </div>


                                                                                                <div class="col-md-6" style="padding-left: 20px;">
                                                                                                    <div class="col-md-6" style="padding: 10px 3px;margin: 3px 0px; height: 37px;">
                                                                                                        <div class="caption font-green-haze col-md-12">
                                                                                                            <span class="caption-subject bold uppercase">  </span>
                                                                                                        </div>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <div class="col-md-2">
                                                                                                            <div class="form-group  form-md-floating-label has-info">
                                                                                                                <label for="abbr" class="txtc">Abbr</label>
                                                                                                                <input type="text"  class="form-control  notPop   "   id="abbr" >
                                                                                                            </div>
                                                                                                        </div>

                                                                                                        <div class="col-md-6">
                                                                                                            <div class="form-group  form-md-floating-label has-info">
                                                                                                                <label for="scientific_name" class="txtc">Scientific Name</label>
                                                                                                                <input type="text"  class="form-control  notPop   "   id="scientific_name" >
                                                                                                            </div>
                                                                                                        </div>

                                                                                                        <div class="col-md-3">
                                                                                                            <div class="form-group  form-md-floating-label has-info">
                                                                                                                <label for="sensitivity" class="txtc">Sensitivity</label>
                                                                                                                <input type="text"  class="form-control  notPop   "   id="sensitivity" >
                                                                                                            </div>
                                                                                                        </div>

                                                                                                        <a class="btn btn-success btn-xs " id="AddAbbr"  href="javascript:;"  data-culture="{$inv->culture.id}" 
                                                                                                           style=" float: right;margin-right: 0px; margin-top: 25px;"  >
                                                                                                            <i class="fa fa-plus"></i> </a>
                                                                                                    </div>

                                                                                                    <div class="form-group col-md-12 " style=" float: left; ">
                                                                                                        <table class="table table-striped table-hover table-bordered">
                                                                                                            <thead>
                                                                                                                <tr>
                                                                                                                    <th class="wds5"></th>
                                                                                                                    <th class="bold"> <div align="center">Abbr </div></th>
                                                                                                                    <th class="bold"> <div align="center">Scientific Name </div></th>
                                                                                                                    <th class="bold"> <div align="center">Sensitivity </div></th>
                                                                                                                </tr>
                                                                                                            </thead>
                                                                                                            <tbody id="abbrContainer">
                                                                                                                {foreach $antibiotic_sensitivity as $data}
                                                                                                                <tr>
                                                                                                                    <td>
                                                                                                                        <a class=" btn-success btn-xs moveAbbr "  href="javascript:;" data-id="{$data.id}" data-culture="{$inv->culture.id}" >
                                                                                                                            <i class="fa fa-arrow-left"></i> </a>
                                                                                                                    </td>
                                                                                                                    <td>{$data.abbr}</td>
                                                                                                                    <td>{$data.scientific_name}</td>
                                                                                                                    <td>{$data.sensitivity}</td>
                                                                                                                </tr>
                                                                                                                {/foreach}
                                                                                                            </tbody>
                                                                                                        </table>
                                                                                                    </div>

                                                                                                </div>
                                                                                            </div>

                                                                                            <div class="clearfix"></div>
                                                                                        </div>



                                                                                    </div>


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


                                            </div>

                                            {else if $inv->special_inv_type == 5  }  
                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="esrInvest" value="1" />
                                                <div class="card-header txtl">
                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>

                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>

                                                                <tr>
                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"    data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">


                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;">ESR 1st Hour : </label>

                                                                                    <div class="col-md-2">
                                                                                        <select     select-colName="name"    select-tableName="esr_hour1"     class="form-control updateInvest  esr_hour1 esr "     data-target="hour1"   
                                                                                                    data-colName="hour1"   data-id="{$inv->esr.id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="esr_hour1"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $esr_hour1 as $data}
                                                                                            <option value="{$data->id}" {if $inv->esr.hour1 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="hour1_unit"  class="form-control  notPop   " value="{$inv->esr.hour1_unit}">
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="hour1_level"  class="form-control  notPop   " value=" {if $inv->esr.hour1_range_txt == Null || $inv->esr.hour1_range_txt  == ''}   {if $inv->esr.hour1_low == 1 } L  {else if $inv->esr.hour1_high == 1 } H   {/if} {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest esr" data-colName="hour1_rangeid" 
                                                                                                       data-id="{$inv->esr.id}"  data-tableName="{$inv->tableName}"   data-target="hour1"   
                                                                                                       id="hour1_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->esr.hour1_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->esr.hour1_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units}</option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>



                                                                                <div class="form-group col-md-12 " style=" float: left;  margin-top :  5px;">

                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;">ESR 2nd Hour : </label>

                                                                                    <div class="col-md-2">
                                                                                        <select     select-colName="name"    select-tableName="esr_hour2"     class="form-control updateInvest  esr_hour2 esr" 
                                                                                                    data-colName="hour2"   data-id="{$inv->esr.id}"  data-tableName="{$inv->tableName}" data-target="hour2"  
                                                                                                    id="esr_hour2"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $esr_hour2 as $data}
                                                                                            <option value="{$data->id}" {if $inv->esr.hour2 ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="hour2_unit"  class="form-control  notPop   " value="{$inv->esr.hour2_unit}">
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="hour2_level"  class="form-control  notPop   " value=" {if $inv->esr.hour2_range_txt == Null || $inv->esr.hour2_range_txt  == ''}   {if $inv->esr.hour2_low == 1 } L  {else if $inv->esr.hour2_high == 1 } H   {/if} {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest esr" data-colName="hour2_rangeid"  data-target="hour2" 
                                                                                                       data-id="{$inv->esr.id}"  data-tableName="{$inv->tableName}"   
                                                                                                       id="hour2_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->esr.hour2_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->esr.hour2_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units}</option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left;margin-top :  5px; ">
                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                                                                    <div class="col-md-10">
                                                                                        <textarea class="form-control updateInvest txtc   notPop   " rows="2" data-id="{$inv->esr.id}" data-colName="comment" 
                                                                                                  data-tableName="{$inv->tableName}" placeholder="Enter more text" >
                                                                                            {$inv->esr.comment}
                                                                                        </textarea>
                                                                                    </div>
                                                                                </div>


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

                                                </div>

                                            </div>
                                            {else if $inv->special_inv_type == 6  }  
                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="crossInvest" value="1" />
                                                <div class="card-header txtl">
                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>

                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>

                                                                <tr>
                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"    data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">



                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 wds20 control-label bold txtl" style=" font-size: 16px;">The Patient  : </label>

                                                                                    <div class="col-md-2 wds8">
                                                                                        <select     select-colName="name"    select-tableName="cross_abo"     class="form-control updateInvest  cross_abo"  
                                                                                                    data-colName="abo"   data-id="{$inv->cross.id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="cross_abo"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $cross_abo as $data}
                                                                                            <option value="{$data->id}" {if $inv->cross.abo ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>


                                                                                    <div class="col-md-4 wds12">
                                                                                        <select     select-colName="name"    select-tableName="cross_rh"     class="form-control updateInvest  cross_rh"  
                                                                                                    data-colName="rh"   data-id="{$inv->cross.id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="cross_rh"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $cross_rh as $data}
                                                                                            <option value="{$data->id}" {if $inv->cross.rh ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>




                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; background-color: #ddd; ">
                                                                                    <input type="hidden" id="crossDonnersItr" value="{$inv->cross.donnersItr}" />

                                                                                    <label class=" col-md-2 wds20 control-label bold txtl" style=" font-size: 16px;">The Donors  : 
                                                                                        {if $archive != 1 }
                                                                                        <a class=" btn-success btn-xs " id="AddDonor"  href="javascript:;"  data-cross="{$inv->cross.id}" 
                                                                                           style="margin-right: 0px;"  >
                                                                                            <i class="fa fa-plus"></i> </a>
                                                                                        {/if}
                                                                                    </label>
                                                                                    <div class="col-md-2 wds8">ABO</div>
                                                                                    <div class="col-md-2 wds12">Rh</div>
                                                                                    <div class="col-md-2 wds15">Compatibility</div>
                                                                                    <div class="col-md-2 wds15">HCV</div>
                                                                                    <div class="col-md-2 wds15">HBsAg</div>
                                                                                    <div class="col-md-2 wds15">HV</div>
                                                                                </div>

                                                                                <div id="donorsDiv">        
                                                                                    {assign var=i value=1}
                                                                                    {foreach $inv->cross.donners as $donner}

                                                                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                        <div class="col-md-2 wds20">

                                                                                            <input type="text"  class="form-control updateInvest   notPop   " data-colName="name"     
                                                                                                   data-id="{$donner.id}"  data-tableName="investigationresults_cross_donners" 
                                                                                                   value="{$donner.name}"  {if $archive == 1 } disabled="" {/if} >

                                                                                        </div>

                                                                                        <div class="col-md-2 wds8">
                                                                                            <select     select-colName="name"    select-tableName="cross_abo"     class="form-control updateInvest  cross_abo"  
                                                                                                        data-colName="abo"   data-id="{$donner.id}"  data-tableName="investigationresults_cross_donners"
                                                                                                        id="donner_abo{$i}" data-itr="{$i}"  {if $archive == 1 } disabled="" {/if} >
                                                                                                <option value=""></option>
                                                                                                {foreach $cross_abo as $data}
                                                                                                <option value="{$data->id}" {if $donner.abo ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                {/foreach}
                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                            </select>
                                                                                        </div>


                                                                                        <div class="col-md-2 wds12">
                                                                                            <select     select-colName="name"    select-tableName="cross_rh"     class="form-control updateInvest  cross_rh"  
                                                                                                        data-colName="rh"   data-id="{$donner.id}"  data-tableName="investigationresults_cross_donners"
                                                                                                        id="donner_rh{$i}" data-itr="{$i}"   {if $archive == 1 } disabled="" {/if} >
                                                                                                <option value=""></option>
                                                                                                {foreach $cross_rh as $data}
                                                                                                <option value="{$data->id}" {if $donner.rh ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                {/foreach}
                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                            </select>
                                                                                        </div>


                                                                                        <div class="col-md-2 wds15">
                                                                                            <select     select-colName="name"    select-tableName="cross_compatibility"     class="form-control updateInvest  cross_compatibility"  
                                                                                                        data-colName="compatibility"   data-id="{$donner.id}"  data-tableName="investigationresults_cross_donners"
                                                                                                        id="cross_compatibility{$i}" data-itr="{$i}"   {if $archive == 1 } disabled="" {/if} >
                                                                                                <option value=""></option>
                                                                                                {foreach $cross_compatibility as $data}
                                                                                                <option value="{$data->id}" {if $donner.compatibility ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                {/foreach}
                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                            </select>
                                                                                        </div>


                                                                                        <div class="col-md-2 wds15">
                                                                                            <select     select-colName="name"    select-tableName="cross_hcv"     class="form-control updateInvest  cross_hcv"  
                                                                                                        data-colName="hcv"   data-id="{$donner.id}"  data-tableName="investigationresults_cross_donners"
                                                                                                        id="cross_hcv{$i}" data-itr="{$i}"   {if $archive == 1 } disabled="" {/if} >
                                                                                                <option value=""></option>
                                                                                                {foreach $cross_hcv as $data}
                                                                                                <option value="{$data->id}" {if $donner.hcv ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                {/foreach}
                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                            </select>
                                                                                        </div>


                                                                                        <div class="col-md-2 wds15">
                                                                                            <select     select-colName="name"    select-tableName="cross_hbsag"     class="form-control updateInvest  cross_hbsag"  
                                                                                                        data-colName="hbsag"   data-id="{$donner.id}"  data-tableName="investigationresults_cross_donners"
                                                                                                        id="cross_hbsag{$i}" data-itr="{$i}"   {if $archive == 1 } disabled="" {/if} >
                                                                                                <option value=""></option>
                                                                                                {foreach $cross_hbsag as $data}
                                                                                                <option value="{$data->id}" {if $donner.hbsag ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                {/foreach}
                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                            </select>
                                                                                        </div>


                                                                                        <div class="col-md-2 wds15">
                                                                                            <select     select-colName="name"    select-tableName="cross_hv"     class="form-control updateInvest  cross_hv"  
                                                                                                        data-colName="hv"   data-id="{$donner.id}"  data-tableName="investigationresults_cross_donners"
                                                                                                        id="cross_hv{$i}" data-itr="{$i}"   {if $archive == 1 } disabled="" {/if} >
                                                                                                <option value=""></option>
                                                                                                {foreach $cross_hv as $data}
                                                                                                <option value="{$data->id}" {if $donner.hv ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                                {/foreach}
                                                                                                <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                            </select>
                                                                                        </div>


                                                                                    </div>

                                                                                    {capture assign=i}{$i+1}{/capture}
                                                                                    {/foreach}

                                                                                </div>





                                                                                <div class="form-group col-md-12 " style=" float: left;margin-top :  5px; ">
                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                                                                    <div class="col-md-10">
                                                                                        <textarea class="form-control updateInvest txtc   notPop   " rows="2" data-id="{$inv->cross.id}" data-colName="comment" 
                                                                                                  data-tableName="{$inv->tableName}" placeholder="Enter more text" >
                                                                                            {$inv->cross.comment}
                                                                                        </textarea>
                                                                                    </div>
                                                                                </div>


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

                                            </div>
                                            {else if $inv->special_inv_type == 7  }  
                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="hbsagInvest" value="1" />
                                                <div class="card-header txtl">
                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>
                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>

                                                                <tr>
                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"    data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">





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

                                            </div>
                                            {else if $inv->special_inv_type == 8  }  
                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="clothingInvest" value="1" />
                                                <div class="card-header txtl">
                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>

                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>

                                                                <tr>
                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"    data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">


                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;">Bleeding Time  : </label>

                                                                                    <div class="col-md-1 wds16 ">
                                                                                        <input type="text"  class="form-control updateInvest clothing   notPop     positivefloat" data-colName="bleeding"  data-target="bleeding"     
                                                                                               data-id="{$inv->clothing->id}"  data-tableName="{$inv->tableName}" value="{$inv->clothing->bleeding}"  id="bleeding_clothing"
                                                                                               {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-1 wds4">
                                                                                        <input type="text"   class="form-control  notPop    "  value="min"    disabled=""  >
                                                                                    </div>

                                                                                    <div class="col-md-1 wds16">
                                                                                        <input type="text"    class="form-control updateInvest positivefloat   notPop     "  data-colName="bleeding_sec"
                                                                                               value="{$inv->clothing->bleeding_sec}" data-id="{$inv->clothing->id}"  data-tableName="{$inv->tableName}" 
                                                                                               {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-1 wds4 ">
                                                                                        <input type="text"   class="form-control  notPop    "  value="sec"    disabled=""  >
                                                                                    </div>

                                                                                    <div class="col-md-2 wds10">
                                                                                        <input type="text" disabled="" id="bleeding_level"  class="form-control  notPop   " value="   {if $inv->clothing->bleeding_low == 1 } L  {else if $inv->clothing->bleeding_high == 1 } H   {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest clothing" data-colName="bleeding_rangeid" 
                                                                                                       data-id="{$inv->clothing->id}"  data-tableName="{$inv->tableName}"   data-target="bleeding"   
                                                                                                       id="bleeding_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->clothing->bleeding_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->clothing->bleeding_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;">Clothing Time  : </label>

                                                                                    <div class="col-md-1 wds16 ">
                                                                                        <input type="text"  class="form-control updateInvest clothing   positivefloat  notPop   " data-colName="clothing"  data-target="clothing"     
                                                                                               data-id="{$inv->clothing->id}"  data-tableName="{$inv->tableName}" value="{$inv->clothing->clothing}"  id="clothing_clothing"
                                                                                               {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-1 wds4">
                                                                                        <input type="text"   class="form-control  notPop    "  value="min"    disabled=""  >
                                                                                    </div>

                                                                                    <div class="col-md-1 wds16">
                                                                                        <input type="text"    class="form-control updateInvest positivefloat   notPop     "  data-colName="clothing_sec"
                                                                                               value="{$inv->clothing->clothing_sec}" data-id="{$inv->clothing->id}"  data-tableName="{$inv->tableName}" 
                                                                                               {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-1 wds4 ">
                                                                                        <input type="text"   class="form-control   notPop   "  value="sec"    disabled=""  >
                                                                                    </div>

                                                                                    <div class="col-md-2 wds10">
                                                                                        <input type="text" disabled="" id="clothing_level"  class="form-control  notPop   " value="   {if $inv->clothing->clothing_low == 1 } L  {else if $inv->clothing->clothing_high == 1 } H   {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest clothing" data-colName="clothing_rangeid" 
                                                                                                       data-id="{$inv->clothing->id}"  data-tableName="{$inv->tableName}"   data-target="clothing"   
                                                                                                       id="clothing_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->clothing->clothing_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->clothing->clothing_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left;margin-top :  5px; ">
                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                                                                    <div class="col-md-10">
                                                                                        <textarea class="form-control updateInvest notPop" rows="2" data-id="{$inv->clothing->id}" data-colName="comment" 
                                                                                                  data-tableName="{$inv->tableName}" placeholder="Enter more text" >
                                                                                            {$inv->clothing->comment}
                                                                                        </textarea>
                                                                                    </div>
                                                                                </div>

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

                                            </div>
                                            {else if $inv->special_inv_type == 9  }  
                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="ptInvest" value="1" />
                                                <div class="card-header txtl">
                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>

                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>

                                                                <tr>
                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"    data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">
                                                                                <a class="btn btn-success btn-xs fright  " id="calculator"  href="javascript:;" data-invResId="{$inv->id}"  >
                                                                                    Factors
                                                                                </a>

                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold" style="text-align: center !important;background: #DDD;padding: 5px; margin-right:  21.66666667%;">PT</label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"   class="form-control   notPop   "  value="Control's Time"    disabled=""  >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="control_time_pt"  class="form-control  notPop   " value="{$inv->pt->control_time}">
                                                                                    </div>

                                                                                    <div class="col-md-1 wds4">
                                                                                        <input type="text"   class="form-control   notPop   "  value="sec"    disabled=""  >
                                                                                    </div>

                                                                                    <div class="col-md-1 wds4">
                                                                                        <input type="text"   class="form-control  notPop    "  value="ISI"    disabled=""  >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="isi_pt"  class="form-control  notPop   " value="{$inv->pt->isi}">
                                                                                    </div>

                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">Patient's Time  : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest pt   notPop     positivefloat" data-colName="patient_time"  data-target="patient_time"    
                                                                                               data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->patient_time}"  id="patient_time_pt"
                                                                                               {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="patient_time_unit"  class="form-control  notPop   " value="{$inv->pt->patient_time_invest_units}">
                                                                                    </div>

                                                                                    <div class="col-md-2 wds10">
                                                                                        <input type="text" disabled="" id="patient_time_level"  class="form-control  notPop   " value="   {if $inv->pt->patient_time_low == 1 } L  {else if $inv->pt->patient_time_high == 1 } H   {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest pt" data-colName="patient_time_rangeid" 
                                                                                                       data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="patient_time"   
                                                                                                       id="patient_time_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->pt->patient_time_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->pt->patient_time_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">Concentration  : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest pt   positivefloat  notPop   " data-colName="concentration"  data-target="concentration"    
                                                                                               data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->concentration}"  id="concentration_pt"
                                                                                               disabled=""  >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="concentration_unit"  class="form-control  notPop   " value="{$inv->pt->concentration_invest_units}">
                                                                                    </div>

                                                                                    <div class="col-md-2 wds10">
                                                                                        <input type="text" disabled="" id="concentration_level"  class="form-control  notPop   " value="   {if $inv->pt->concentration_low == 1 } L  {else if $inv->pt->concentration_high == 1 } H   {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest pt" data-colName="concentration_rangeid" 
                                                                                                       data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="concentration"   
                                                                                                       id="concentration_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->pt->concentration_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->pt->concentration_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">I.N.R  : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest pt   positivefloat  notPop   " data-colName="inr"  data-target="inr"    
                                                                                               data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->inr}"  id="inr_pt"
                                                                                               disabled="" >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="inr_unit"  class="form-control  notPop   " value="{$inv->pt->inr_invest_units}">
                                                                                    </div>

                                                                                    <div class="col-md-2 wds10">
                                                                                        <input type="text" disabled="" id="inr_level"  class="form-control  notPop   " value="   {if $inv->pt->inr_low == 1 } L  {else if $inv->pt->inr_high == 1 } H   {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest pt" data-colName="inr_rangeid" 
                                                                                                       data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="inr"   
                                                                                                       id="inr_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->pt->inr_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->pt->inr_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">Ratio  : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest pt   positivefloat  notPop   " data-colName="ratio"  data-target="ratio"    
                                                                                               data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->ratio}"  id="ratio_pt"
                                                                                               {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="ratio_unit"  class="form-control  notPop   " value="{$inv->pt->ratio_invest_units}">
                                                                                    </div>

                                                                                    <div class="col-md-2 wds10">
                                                                                        <input type="text" disabled="" id="ratio_level"  class="form-control  notPop   " value="   {if $inv->pt->ratio_low == 1 } L  {else if $inv->pt->ratio_high == 1 } H   {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest pt" data-colName="ratio_rangeid" 
                                                                                                       data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="ratio"   
                                                                                                       id="ratio_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->pt->ratio_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->pt->ratio_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5%; ">

                                                                                    <label class="col-md-2 control-label bold" style="text-align: center !important;background: #DDD;padding: 5px; margin-right:  21.66666667%;">APTT</label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"   class="form-control   notPop   "  value="Control's Time"    disabled=""  >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="control_time1_pt"  class="form-control  notPop   " value="{$inv->pt->control_time1}">
                                                                                    </div>

                                                                                    <div class="col-md-1 wds4">
                                                                                        <input type="text"   class="form-control   notPop   "  value="sec"    disabled=""  >
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">Patient's Time  : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest pt   positivefloat  notPop   " data-colName="patient_time1"  data-target="patient_time1"    
                                                                                               data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->patient_time1}"  id="patient_time1_pt"
                                                                                               {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="patient_time1_unit"  class="form-control  notPop   " value="{$inv->pt->patient_time1_invest_units}">
                                                                                    </div>

                                                                                    <div class="col-md-2 wds10">
                                                                                        <input type="text" disabled="" id="patient_time1_level"  class="form-control  notPop   " value="   {if $inv->pt->patient_time1_low == 1 } L  {else if $inv->pt->patient_time1_high == 1 } H   {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest pt" data-colName="patient_time1_rangeid" 
                                                                                                       data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="patient_time1"   
                                                                                                       id="patient_time1_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->pt->patient_time1_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->pt->patient_time1_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold" style="margin-right: 5%;background: #DDD;padding: 5px;">Fibrinogen  : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest pt   notPop     positivefloat" data-colName="fibrinogen"  data-target="fibrinogen"    
                                                                                               data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->fibrinogen}"  id="fibrinogen_pt"
                                                                                               {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="fibrinogen_unit"  class="form-control  notPop   " value="{$inv->pt->fibrinogen_invest_units}">
                                                                                    </div>

                                                                                    <div class="col-md-2 wds10">
                                                                                        <input type="text" disabled="" id="fibrinogen_level"  class="form-control  notPop   " value="   {if $inv->pt->fibrinogen_low == 1 } L  {else if $inv->pt->fibrinogen_high == 1 } H   {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest pt" data-colName="fibrinogen_rangeid" 
                                                                                                       data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="fibrinogen"   
                                                                                                       id="fibrinogen_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->pt->fibrinogen_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->pt->fibrinogen_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2 control-label bold" style="margin-right: 5%;background: #DDD;padding: 5px;">FDP  : </label>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text"  class="form-control updateInvest pt   notPop     positivefloat" data-colName="fdp"  data-target="fdp"    
                                                                                               data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->fdp}"  id="fdp_pt"
                                                                                               {if $archive == 1 } disabled="" {/if} >
                                                                                    </div>

                                                                                    <div class="col-md-2">
                                                                                        <input type="text" disabled="" id="fdp_unit"  class="form-control  notPop   " value="{$inv->pt->fdp_invest_units}">
                                                                                    </div>

                                                                                    <div class="col-md-2 wds10">
                                                                                        <input type="text" disabled="" id="fdp_level"  class="form-control  notPop   " value="   {if $inv->pt->fdp_low == 1 } L  {else if $inv->pt->fdp_high == 1 } H   {/if} ">
                                                                                    </div>

                                                                                    <div class="col-md-4">
                                                                                        <select        class="form-control select2h updateInvest pt" data-colName="fdp_rangeid" 
                                                                                                       data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="fdp"   
                                                                                                       id="fdp_rangeid" >
                                                                                            <option value=""></option>
                                                                                            {foreach  $inv->pt->fdp_ranges as $rang}
                                                                                            <option value="{$rang->id}" {if $rang->id == $inv->pt->fdp_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                                                            {/foreach}
                                                                                        </select>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="form-group col-md-12 " style=" float: left;margin-top :  5px; ">
                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                                                                    <div class="col-md-10">
                                                                                        <textarea class="form-control updateInvest   notPop   " rows="2" data-id="{$inv->pt->id}" data-colName="comment" 
                                                                                                  data-tableName="{$inv->tableName}" placeholder="Enter more text" >
                                                                                            {$inv->pt->comment}
                                                                                        </textarea>
                                                                                    </div>
                                                                                </div>

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




                                                </div>

                                            </div>


                                            {else if $inv->special_inv_type == 10  }  

                                            <div class="card" style="margin-bottom: 1%;">
                                                <input type="hidden" id="aborhInvest" value="1" />
                                                <div class="card-header txtl">
                                                    <div class="fright wds100">
                                                        <table class="table" style="width: 100%">
                                                            <tbody>
                                                                <tr>
                                                                    <td rowspan="2">   
                                                                        <span style="float: left;">
                                                                            <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                                                                        </span>

                                                                        <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                                                            {$inv->invname}
                                                                        </a>

                                                                        {if  $inv->hasPdf== 1 }
                                                                        <div class="col-md-10" style="text-align: right;">
                                                                            <a href="#" onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" />Add PDF</a>
                                                                            <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                                                                                   class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                                                                        </div>   

                                                                        <div class="col-md-1" style="text-align: right;" >
                                                                            {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>

                                                                            {else}
                                                                            <a class=" btn-xs  fright" download="{$inv->invname}_{$patientNo}" 
                                                                               id="pdfDownload{$inv->id}" style="display: none;" >
                                                                                <i class="fa fa-download"></i>
                                                                            </a>
                                                                            {/if}
                                                                            <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                                                                        </div>   
                                                                        {/if}

                                                                    </td>
                                                                    <th class="wds5 txtc"> F </th>
                                                                    <th class="wds5 txtc"> V </th>
                                                                    <th class="wds5 txtc"> P </th>
                                                                    <th class="wds5 txtc"> D </th>
                                                                </tr>

                                                                <tr>
                                                                    <td>
                                                                        {if  $inv->filled == 1 }
                                                                        <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->verified == 1 }
                                                                        <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->printed == 1 }
                                                                        <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0" 
                                                                           data-id="{$inv->id}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1" 
                                                                           data-id="{$inv->id}"  
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>

                                                                    <td>
                                                                        {if  $inv->delivered == 1 }
                                                                        <i class="fa fa-check invReDeliver"  data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"    data-paid="{$paid}" 
                                                                           style="color: #119866;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {else}
                                                                        <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                                                                           data-id="{$inv->id}"  data-paid="{$paid}" 
                                                                           style="color: red;font-size: 20px;margin-top: 5%;margin-bottom: 10%;"></i> 
                                                                        {/if}
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="5">
                                                                        <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                                                            <div class="card-body">



                                                                                <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                                                                    <label class="col-md-2  control-label bold txtl" style=" font-size: 16px;">ABO System : </label>

                                                                                    <div class="col-md-3">
                                                                                        <select     select-colName="name"    select-tableName="cross_abo"     class="form-control updateInvest  cross_abo"  
                                                                                                    data-colName="abo"   data-id="{$inv->aborh.id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="aborh_abo"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $cross_abo as $data}
                                                                                            <option value="{$data->id}" {if $inv->aborh.abo ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>

                                                                                    <label class="col-md-2  control-label bold txtl" style=" font-size: 16px;margin-left: 2%;">Blood Rh : </label>
                                                                                    <div class="col-md-4">
                                                                                        <select     select-colName="name"    select-tableName="cross_rh"     class="form-control updateInvest  cross_rh"  
                                                                                                    data-colName="rh"   data-id="{$inv->aborh.id}"  data-tableName="{$inv->tableName}"
                                                                                                    id="aborh_rh"  {if $archive == 1 } disabled="" {/if} >
                                                                                            <option value=""></option>
                                                                                            {foreach $cross_rh as $data}
                                                                                            <option value="{$data->id}" {if $inv->aborh.rh ==    $data->id }selected{/if}>{$data->name}</option>
                                                                                            {/foreach}
                                                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="form-group col-md-12 " style=" float: left;margin-top :  5px; ">
                                                                                    <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                                                                    <div class="col-md-10">
                                                                                        <textarea class="form-control updateInvest txtc   notPop   " rows="2" data-id="{$inv->aborh.id}" data-colName="comment" 
                                                                                                  data-tableName="{$inv->tableName}" placeholder="Enter more text" >
                                                                                            {$inv->aborh.comment}
                                                                                        </textarea>
                                                                                    </div>
                                                                                </div>


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

                                            </div>
                                            {/if}
                                            {/foreach}
                                        </div>

                                    </td>
                                </tr>
                            </tbody>

                        </table>


                        <a class="btn btn-success btn-xs printResults "  href="javascript:;" style=" float: right;"  >
                            <i class="fa fa-print"></i> print
                        </a>

                    </div>
                </div>
            </div>
        </div>
    </div>

</div>

<input type="hidden" id="controllName" value="invsdept"/>


<div id="printDiv"></div>
<div id="calculatorDiv"></div>
<div id="editModalDiv"></div>





