<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>Intra-operative Anaesthesia Sheet
                        </div>
                        <div class="actions">
                            {if isset($is_add)}
                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=complete_one&&show={$show}&&patientid={$patientId}&&id={$intra_anaesthetic.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=intra_show&&patientid={$patientId}" 
                               class="btn btn-default btn-sm">
                                Show </a>

                            <a class="btn btn-default btn-sm intraPrint" data-id="{$intra_anaesthetic.id}">
                                <i class="fa fa-print"></i> </a>

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

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

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

                                <div class="row">
                                    <input type="hidden" id="patient_history" value="1"/>
                                    <div class="portlet-body form">
                                        <form>
                                            <div class="form-body">

                                                <table>
                                                    <thead>
                                                        <tr>
                                                            <th class="wds17">      Pre-Operative Diagnosis   </th>
                                                            <td>
                                                                {$pre_diagnoses}
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Operation  </th>
                                                            <td>{if $operation_category == 1} Elective  {else if  $operation_category == 2} Emergency {/if} </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Posture  </th>
                                                            <td>
                                                                <select class="form-control posture  updateElement "  id="posture"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="posture" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $posture as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.posture} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Introduction  </th>
                                                            <td>
                                                                <select class="form-control introduction  updateElement "  id="introduction"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="introduction" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $introduction as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.introduction} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Maintenance  </th>
                                                            <td>
                                                                <select class="form-control maintenance  updateElement "  id="maintenance"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="maintenance" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $maintenance as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.maintenance} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Ventilation  </th>
                                                            <td>
                                                                <select class="form-control ventilation  updateElement "  id="ventilation"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="ventilation" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $ventilation as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.ventilation} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Endotracheal Tube  </th>
                                                            <td>
                                                                <select class="form-control endotracheal_tube  updateElement "  id="endotracheal_tube"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="endotracheal_tube" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $endotracheal_tube as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.endotracheal_tube} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Mention  </th>
                                                            <td>
                                                                <select class="form-control mention  updateElement "  id="mention"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="mention" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $mention as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.mention} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th class="wds17">      Size   </th>
                                                            <td>
                                                                <input type="text" class="form-control   updateElement"   
                                                                       data-colName="size" 
                                                                       value="{$intra_anaesthetic.size}"  data-tableName="intra_anaesthetic" 
                                                                       data-id="{$intra_anaesthetic.id}"/>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>        </th>
                                                            <td>
                                                                <select class="form-control no_title  updateElement "  id="no_title"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="no_title" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $no_title as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.no_title} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>     M.Relaxants  </th>
                                                            <td>
                                                                <select class="form-control m_relaxants  updateElement "  id="m_relaxants"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="m_relaxants" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $m_relaxants as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.m_relaxants} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>     Antidotes  </th>
                                                            <td>
                                                                <select class="form-control antidotes  updateElement "  id="antidotes"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="antidotes" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $antidotes as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.antidotes} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Complications  </th>
                                                            <td>
                                                                <select class="form-control complications  updateElement "  id="complications"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="complications" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $complications as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.complications} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Infusions  </th>
                                                            <td>
                                                                <select class="form-control infusions  updateElement "  id="infusions"   
                                                                        data-placeholder="Select..." data-id="{$intra_anaesthetic.id}"   
                                                                        data-colName="infusions" data-tableName="intra_anaesthetic">
                                                                    <option></option>
                                                                    {foreach  $infusions as $data}
                                                                    <option value="{$data.id}" {if $data.id == $intra_anaesthetic.infusions} selected {/if}>{$data.name}</option>
                                                                    {/foreach}
                                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                                </select>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <th>      Remarks   </th>
                                                            <td>
                                                                <textarea class="form-control updateElement amrpop" rows="3" 
                                                                          placeholder="Enter more text" data-colName="remarks" 
                                                                          data-id="{$intra_anaesthetic.id}"   data-tableName="intra_anaesthetic" >
                                                                    {$intra_anaesthetic.remarks}
                                                                </textarea>
                                                            </td>
                                                        </tr>


                                                    </thead>
                                                </table>

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

                                            </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}">
<div id="forPrint"></div>

<script>




    $(".amrpop,input[type='text']:not(.datepicker):not(.notPop),textarea:not(.notPop)").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>