<style>
    table {
        font-family: arial, sans-serif;
        border-collapse: collapse;
        width: 100%;
        table-layout: fixed
    }

    td, th {
        border: 1px solid #000000;
        text-align: center;
        padding: 2px;
    }

    tr:nth-child(even) {
        background-color: #dddddd;
    }
</style>
<div class="page-content-wrapper">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12 clinick invz" id="gprinModel">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-user"></i>Semen Processing for Intrauterine Insemination (IUI)
                        </div>
                        <div class="actions">
                            {if isset($is_add)}
                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=complete_one&&show={$show}&&patientid={$patientId}&&id={$semen_processing.id}&&tname={$tableName}" 
                               class="btn btn-default btn-sm pull-left" style="margin-right: 5px;">
                                save </a>
                            {/if}
                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=processing_show&&patientid={$patientId}" class="btn btn-default btn-sm">
                                Show </a>

                        </div>
                    </div>
                    <div class="portlet-body all">

                        <!---======================================================== tab1============================================================================================ ----->

                        <div class="row">
                            <div id="ultrasoundgynaDiv">

                                <div class="row">

                                    <div class="portlet-body form">
                                        <form>
                                            <div class="form-body">

                                                <table>
                                                    <thead>
                                                        <tr>
                                                            <th>      Referred Dr :  </th>
                                                            <td>
                                                                <input type="text" class="form-control "  value="{$ref_dr}"  readonly/>
                                                            </td>
                                                            <th>      Date :  </th>
                                                            <td>
                                                                <input type="text" class="form-control  datepicker updateElement"   data-colName="semen_date" 
                                                                       value="{$semen_processing.semen_date}"  data-tableName="semen_processing" 
                                                                       data-id="{$semen_processing.id}"/>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Clinician :  </th>
                                                            <td>
                                                                <input type="hidden" class="form-control updateElement"    id="clinician_id" 
                                                                       data-colName="clinician" data-tableName="semen_processing" data-id="{$semen_processing.id}" >
                                                                <input type="hidden" class="form-control"    id="clinician_id_value"  
                                                                       value="{$semen_processing.clinician}" >
                                                                <input type="hidden" class="form-control"    id="clinician_name"  
                                                                       value="{$semen_processing.clinician_name}" >
                                                            </td>
                                                            <th>      Embryologist :  </th>
                                                            <td>
                                                                <input type="hidden" class="form-control updateElement"    id="embryologist_id" 
                                                                       data-colName="embryologist" data-tableName="semen_processing"  data-id="{$semen_processing.id}">
                                                                <input type="hidden" class="form-control"    id="embryologist_id_value"  
                                                                       value="{$semen_processing.embryologist}" >
                                                                <input type="hidden" class="form-control"    id="embryologist_name"  
                                                                       value="{$semen_processing.embryologist_name}" >
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <th>      Catheter  :  </th>
                                                            <td>
                                                                <select id="catheter_select{$semen_processing.id}"  class="form-control selectCatherSelect updateElement" data-rowid="{$semen_processing.id}" 
                                                                        name="catheter" select-tableName="embryo_catheter_select" data-colName="catheter"  data-id="{$semen_processing.id}"
                                                                        data-tableName="semen_processing" >
                                                                    <option value="">choose</option>
                                                                    {foreach  $embryo_catheter_select as $one}
                                                                    <option value="{$one->id}"{if $semen_processing.catheter eq $one->id}selected{/if}>{$one->name}</option>
                                                                    {/foreach}

                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                            <th colspan="2"></th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="4">
                                                                <div class="form-group form-md-line-input" style="padding-top: 0px;">
                                                                    <div class="col-md-12">
                                                                        <div class="md-checkbox-inline">
                                                                            <div class="md-checkbox">
                                                                                <input type="checkbox" id="swim" class="md-check updateElementCheck" 
                                                                                       data-tableName="semen_processing"  data-colName="swim" 
                                                                                       data-id="{$semen_processing.id}"
                                                                                       {if $semen_processing.swim eq 1}checked{/if}  >
                                                                                <label for="swim">
                                                                                    <span></span>
                                                                                    <span class="check"></span>
                                                                                    <span class="box"></span>
                                                                                    Swim up </label>
                                                                            </div>

                                                                            <div class="md-checkbox">
                                                                                <input type="checkbox" id="mini_swim" class="md-check updateElementCheck"
                                                                                       data-tableName="semen_processing"  data-colName="mini_swim" 
                                                                                       data-id="{$semen_processing.id}"
                                                                                       {if $semen_processing.mini_swim eq 1}checked{/if}  >
                                                                                <label for="mini_swim">
                                                                                    <span></span>
                                                                                    <span class="check"></span>
                                                                                    <span class="box"></span>
                                                                                    Mini Swim up </label>
                                                                            </div>

                                                                            <div class="md-checkbox">
                                                                                <input type="checkbox" id="sperm_gradient" class="md-check updateElementCheck" 
                                                                                       data-tableName="semen_processing"  data-colName="sperm_gradient" 
                                                                                       data-id="{$semen_processing.id}"
                                                                                       {if $semen_processing.sperm_gradient eq 1}checked{/if}  >
                                                                                <label for="sperm_gradient">
                                                                                    <span></span>
                                                                                    <span class="check"></span>
                                                                                    <span class="box"></span>
                                                                                    Sperm gradient  </label>
                                                                            </div>

                                                                            <div class="md-checkbox">
                                                                                <input type="checkbox" id="sperm_wash" class="md-check updateElementCheck"
                                                                                       data-tableName="semen_processing"  data-colName="sperm_wash" 
                                                                                       data-id="{$semen_processing.id}"
                                                                                       {if $semen_processing.sperm_wash eq 1}checked{/if}  >
                                                                                <label for="sperm_wash">
                                                                                    <span></span>
                                                                                    <span class="check"></span>
                                                                                    <span class="box"></span>
                                                                                    Sperm wash  </label>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </thead>
                                                </table>

                                                <div class="clearfix"></div>
                                                <hr>
                                                <div class="caption font-green-haze col-md-6">
                                                    <span class="caption-subject bold uppercase">  Physical Parameter : </span>
                                                </div>

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

                                                <table id="scoringTable">
                                                    <thead>

                                                        <tr>
                                                            <th>      Parameter  </th>
                                                            <th>      Value  </th>
                                                            <th>      Reference  </th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <tr>
                                                            <td>Volume</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="volume" 
                                                                       value="{$semen_processing.volume}" data-colName="volume"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25">ml</span>
                                                            </td>
                                                            <td>   2-6 ml </td>
                                                        </tr>

                                                        <tr>
                                                            <td>PH</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="ph" 
                                                                       value="{$semen_processing.ph}" data-colName="ph"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25"></span>
                                                            </td>
                                                            <td>   7.2-7.6</td>
                                                        </tr>

                                                        <tr>
                                                            <td>Liquefaction</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="liquefaction" 
                                                                       value="{$semen_processing.liquefaction}" data-colName="liquefaction"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25"></span>
                                                            </td>
                                                            <td>   </td>
                                                        </tr>

                                                        <tr>
                                                            <td>Viscosity</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="viscosity" 
                                                                       value="{$semen_processing.viscosity}" data-colName="viscosity"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25"></span>
                                                            </td>
                                                            <td>   Average </td>
                                                        </tr>
                                                    </tbody>
                                                </table>

                                                <div class="clearfix"></div>
                                                <hr>
                                                <div class="caption font-green-haze col-md-6">
                                                    <span class="caption-subject bold uppercase">  Microscopic Examination : </span>
                                                </div>

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

                                                <table>
                                                    <thead>
                                                        <tr>
                                                            <th>      Parameter  </th>
                                                            <th>      Value  </th>
                                                            <th>      Reference  </th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <tr>
                                                            <td>Sperm Count (mill/ml)</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="sperm_count" 
                                                                       value="{$semen_processing.sperm_count}" data-colName="sperm_count"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25">mill/ml</span>
                                                            </td>
                                                            <td>    20mill/ml</td>
                                                        </tr>

                                                        <tr>
                                                            <td>Total Motility (%)</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="mobility" 
                                                                       value="{$semen_processing.mobility}" data-colName="mobility"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25">%</span>
                                                            </td>
                                                            <td>    >60 %</td>
                                                        </tr>

                                                        <tr>
                                                            <td>Grade A (%)</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="grade_a" 
                                                                       value="{$semen_processing.grade_a}" data-colName="grade_a"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25">%</span>
                                                            </td>
                                                            <td>  >25 % </td>
                                                        </tr>

                                                        <tr>
                                                            <td>Grade B (%)</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="grade_b" 
                                                                       value="{$semen_processing.grade_b}" data-colName="grade_b"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25">%</span>
                                                            </td>
                                                            <td>   >25 % </td>
                                                        </tr>

                                                        <tr>
                                                            <td>Grade A+B (%)</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="grade_ab" 
                                                                       value="{$semen_processing.grade_ab}" data-colName="grade_ab"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25">%</span>
                                                            </td>
                                                            <td>  >50 % </td>
                                                        </tr>

                                                        <tr>
                                                            <td>Grade C (%)</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="grade_c" 
                                                                       value="{$semen_processing.grade_c}" data-colName="grade_c"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25">%</span>
                                                            </td>
                                                            <td>   </td>
                                                        </tr>

                                                        <tr>
                                                            <td>Grade D (%)</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="grade_d" 
                                                                       value="{$semen_processing.grade_d}" data-colName="grade_d"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25">%</span>
                                                            </td>
                                                            <td>   </td>
                                                        </tr>

                                                        <tr>
                                                            <td>Morphology (Nor. %)</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="morphology" 
                                                                       value="{$semen_processing.morphology}" data-colName="morphology"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25">%</span>
                                                            </td>
                                                            <td>    >15 % </td>
                                                        </tr>

                                                        <tr>
                                                            <td>Agglutination</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="agglutination" 
                                                                       value="{$semen_processing.agglutination}" data-colName="agglutination"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25"></span>
                                                            </td>
                                                            <td>   <10 % </td>
                                                        </tr>

                                                        <tr>
                                                            <td>Pus Cells (HPF)_</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="pus_cells" 
                                                                       value="{$semen_processing.pus_cells}" data-colName="pus_cells"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25"></span>
                                                            </td>
                                                            <td>   2-3</td>
                                                        </tr>

                                                        <tr>
                                                            <td>Spermatogenic Cells (HPF)</td>
                                                            <td>
                                                                <input type="text" class="form-control updateElement wds75" name="spermatogenic" 
                                                                       value="{$semen_processing.spermatogenic}" data-colName="spermatogenic"  style="display: inline;"
                                                                       data-tableName="semen_processing" data-id="{$semen_processing.id}">
                                                                <span class="wds25"></span>
                                                            </td>
                                                            <td>1-2  </td>
                                                        </tr>
                                                    </tbody>
                                                </table>

                                                <table   class="noborder wds50 fright" style="    margin-top: 15px;" >
                                                    <tr>
                                                        <td>
                                                            <h4>
                                                                <span style="float: left;    margin-left: 41%;font-weight: bold;">Lab Director   </span>
                                                            </h4>
                                                        </td>
                                                    </tr>
                                                    <tr style="    background-color: #fdfdfd;">
                                                        <td>
                                                            <h4>
                                                                <span style="float: left;    margin-left: 41%;font-weight: bold;">Dr. Mohamed Elzayat </span>
                                                            </h4>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <h4 >
                                                                <span style="float: left;    margin-left: 45%;font-weight: bold;">Thanks </span>
                                                            </h4>
                                                        </td>
                                                    </tr>
                                                </table>

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

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

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

            <div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="edit_model">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                            <h4 class="modal-title"> Edit </h4>
                        </div>
                        <div class="modal-body">
                            <div class="portlet-body form">
                                <form action="" method="post" class="form-horizontal emptyform">
                                    <div class="form-body">
                                        <!------===========================================------->
                                        <div>
                                            <div id="alldatadiv" class=""> </div>
                                        </div>

                                        <!------===========================================------->
                                        <!--                            <div class="form-group">
                                                                        <label class="col-md-3 control-label"> Name</label>
                                                                        <div class="col-md-8">
                                                                            <input type="hidden" class="form-control"  id="newitem_id" name="newamount_id" >
                                                                            <input type="text" class="form-control"  id="newitem_name" name="newamount_name" style="text-align:left;" >
                                                                            <div id="divsucess1" style="color:red; display:none;"></div>
                                                                        </div>
                                                                    </div>-->
                                        <!------===========================================------->
                                        <div class="modal-footer">
                                            <!--                                <button type="button" class="btn green" id="editmodel_submit"> Update </button>-->
                                            <button type="button" id="amountcloseinput"   class="btn default" data-dismiss="modal">Close</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>
<div class="clearfix"></div>
<div id="vvv"></div>
<input type="hidden" id="controllName" value="{$controllname}">
<input type="hidden" id="embroSelects" value="1">
<input type="hidden" id="embryoslab" value="1">

<script>


    $(".amrpop,input[type='text']:not(.datepicker),textarea").hover(function () {
        var pop_value = $(this).val();
        $(this).attr({
            "data-toggle": "popover",
            "data-trigger": "hover",
            "data-placement": "bottom",
            "data-content": pop_value
        });
        $(this).popover("show");
    });

</script>