
<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>Follow up
                        </div>

                        <div class="actions">

                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=index&&patientid={$patientId}" class="btn btn-default btn-sm">
                                Show </a>

                        </div>
                    </div>
                    <div class="portlet-body all">
                        <input type="hidden" id="patientId" value="{$patientId}"/>
                        <input type="hidden" value="1" id="ovum_transfer">

                        <input type="hidden" id="preItr" value="{$preItr}"/>
                        <input type="hidden" id="postItr" value="{$postItr}"/>

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

                        <div class="row">
                            <div class="portlet-body form">
                                <form action="{$hosturl}/controllers/{$controllname}.php?ac=addFollowUp&patientid={$patientId}" method="POST"   id="payStudent">

                                    <div class="form-body row">

                                        <div class="col-md-3">
                                            <div class="form-group">
                                                <label class="col-md-3 control-label">Date:</label>
                                                <div class="col-md-8">
                                                    <input type="text" class="form-control  datepicker updateElement" id="op_date"  value="{$followup->op_date}" name="op_date" readonly data-id="{$followup->id}" data-colName="op_date" data-tableName="followup_operation" />
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-3">
                                            <div class="form-group">
                                                <label class="col-md-3 control-label">Day:</label>
                                                <div class="col-md-8">
                                                    <input type="text" class="form-control" id="op_day"  value="{$followup->op_day}" name="day" readonly  />
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-md-2 control-label">Operation:</label>
                                                <div class="col-md-10">
                                                    <select class="form-control  updateElement " id="operation_follow" name="operation" data-placeholder="Select..." data-id="{$followup->id}"  data-colName="operationid" data-tableName="followup_operation">
                                                        <option></option>
                                                        {foreach  $operation_other_th as $one}
                                                        <option value="{$one->id}" {if $one->id == $followup->operationid} selected {/if}>{$one->name}</option>
                                                        {/foreach}
                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>


                                        <div class="clearfix" style="    margin-bottom: 20px;"></div>

                                        <div class="col-md-8">
                                            <div class="form-group">
                                                <label class="col-md-2 control-label">Diagnosis:</label>
                                                <div class="col-md-10">
                                                    <select multiple="" size="1" class="form-control select2me diagnosis updateDiagnosis" id="diagnosis" data-id="{$followup->id}" data-colName="diagnosis" data-tableName="followup_operation">
                                                        <option value="">choose</option>

                                                        {foreach $alldiagnosis as $data}
                                                        <option value="{$data->id}" {if $data->id|in_array:$followup->diagnosis}selected="selected"{/if}>{$data->name}</option>
                                                        {/foreach}
                                                        <option value="-1" class="addDiagnosis">Add</option>
                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>                 


                                        <div class="col-md-4">
                                            <div class="btn-group ">
                                                <a class="btn blue  btn-sm" href="javascript:;" data-toggle="dropdown">
                                                    TTT <i class="fa fa-angle-down"></i>
                                                </a>
                                                <ul class="dropdown-menu pull-right" style="width: 100%;">
                                                    <li>
                                                        <a href="javascript:;" id="followAddTTT" data-id="{$followup->id}">
                                                            Add </a>
                                                    </li>
                                                    <li>
                                                        <a href="javascript:;" id="followShowTTT" data-id="{$followup->id}">
                                                            Show </a>
                                                    </li>
                                                </ul>
                                            </div>

                                            <a href="javascript:;" class="btn blue btn-sm"  id="follow_print_sheet"  
                                               data-id="{$followup->id}" > print sheet </a>
                                            {if $programesetting->case_summary == 1 }
                                            <a href="javascript:;" class="btn blue btn-sm" id="case_print" data-followup="{$followup->id}">  Case Summary  </a>
                                            {/if}
                                        </div>

                                        <div class="clearfix" style="    margin-bottom: 20px;"></div>

                                        <div class="col-md-12" id="surgeonDiv"  {if $programesetting->surgeon == 1 } style="display: none;" {/if}>
                                            <div class="col-md-4">
                                                <div class="form-group">
                                                    <label class="col-md-3 control-label">Surgeon :</label>
                                                    <div class="col-md-9">
                                                        <select class="form-control select2me  updateElement "  id="surgeon"   data-placeholder="Select..." data-id="{$followup->id}"  data-colName="surgeon" data-tableName="followup_operation">
                                                            <option></option>
                                                            {foreach  $doctors as $data}
                                                            <option value="{$data.user_id}" {if $data.user_id == $followup->surgeon} selected {/if}>{$data.name}</option>
                                                            {/foreach}
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>    

                                            <div class="col-md-4">
                                                <div class="form-group">
                                                    <label class="col-md-3 control-label">Assistant :</label>
                                                    <div class="col-md-9">
                                                        <select class="form-control select2me  updateElement "  id="assistant"   data-placeholder="Select..." data-id="{$followup->id}"  data-colName="assistant" data-tableName="followup_operation">
                                                            <option></option>
                                                            {foreach  $doctors as $data}
                                                            <option value="{$data.user_id}" {if $data.user_id == $followup->assistant} selected {/if}>{$data.name}</option>
                                                            {/foreach}
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>  


                                            <div class="col-md-4">
                                                <div class="form-group">
                                                    <label class="col-md-4 control-label">Anaesthetist :</label>
                                                    <div class="col-md-8">
                                                        <select class="form-control select2me  updateElement "  id="anaesthetist"   data-placeholder="Select..." data-id="{$followup->id}"  data-colName="anaesthetist" data-tableName="followup_operation">
                                                            <option></option>
                                                            {foreach  $anaesthetists as $data}
                                                            <option value="{$data.user_id}" {if $data.user_id == $followup->anaesthetist} selected {/if}>{$data.name}</option>
                                                            {/foreach}
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>  


                                        </div>

                                        <div class="col-md-12">
                                            <table class="table table-striped table-hover table-bordered">
                                                <caption class="txtc h3">Pre-Operative
                                                    <a class="btn green btn-xs addPre" data-id="{$followup->id}" 
                                                       style=" width: 5%;" data-tableName="follow_pre" data-count="preItr"> 
                                                        <i class="fa fa-plus"></i>
                                                    </a>
                                                </caption>
                                                <thead>
                                                    <tr >
                                                        <th style="width: 15%;background: #DDD;" rowspan="2">    الطبيب  </th>
                                                        <th style="width: 14%;background: #DDD;" rowspan="2">     الممرضة   </th>
                                                        <th style="background: #DDD;" colspan="4">    التحاليل المسحوبة  </th>
                                                        <th style="background: #DDD;" colspan="4">     العلامات الحيوية   </th>
                                                        <th style="background: #DDD;" rowspan="2">       التوقيت   </th>
                                                        <th style="width: 1%;background: #DDD;" rowspan="2">   </th>
                                                    </tr>
                                                    <tr>
                                                        <th style="width: 10%;background: #DDD;">    ABO-RH  </th>
                                                        <th style="width: 6%;background: #DDD;">    Hb  </th>
                                                        <th style="width: 7%;background: #DDD;">    PLT  </th>
                                                        <th style="width: 7%;background: #DDD;">    RBS  </th>
                                                        <th style="width: 7%;background: #DDD;">    BP  </th>
                                                        <th style="width:7%;background: #DDD;">    Pulse  </th>
                                                        <th style="width: 6%;background: #DDD;">    Temp  </th>
                                                        <th style="width: 4%;background: #DDD;">    So2  </th>
                                                    </tr>
                                                </thead>
                                                <tbody id="follow_pre_div">
                                                    {foreach $follow_pres as $obj}
                                                    <tr>
                                                        <td>
                                                            <select class="form-control select2me  updateElement "  id="doctorid{$obj->id}"   data-placeholder="Select..." data-id="{$obj->id}"  data-colName="doctorid" data-tableName="follow_pre">
                                                                <option></option>
                                                                {foreach  $doctors as $data}
                                                                <option value="{$data.user_id}" {if $data.user_id == $obj->doctorid} selected {/if}>{$data.name}</option>
                                                                {/foreach}
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control select2me  updateElement "  id="nurseid{$obj->id}"   data-placeholder="Select..." data-id="{$obj->id}"  data-colName="nurseid" data-tableName="follow_pre">
                                                                <option></option>
                                                                {foreach  $nurses as $data}
                                                                <option value="{$data.user_id}" {if $data.user_id == $obj->nurseid} selected {/if}>{$data.name}</option>
                                                                {/foreach}
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control select2me  updateElement " id="aborh{$obj->id}"   data-placeholder="Select..." data-id="{$obj->id}"  data-colName="aborh" data-tableName="follow_pre">
                                                                <option></option>
                                                                {foreach $bloodtypes as $data}
                                                                <option value="{$data->id}" {if $obj->aborh ==  $data->id }selected{/if} > {$data->title} </option>
                                                                {/foreach}
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="hb" 
                                                                   data-tableName="follow_pre" value="{$obj->hb}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->hb}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="plt" 
                                                                   data-tableName="follow_pre" value="{$obj->plt}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->plt}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="rbs" 
                                                                   data-tableName="follow_pre" value="{$obj->rbs}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->rbs}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control bp_mask updateElement" data-id="{$obj->id}" data-colName="bp" 
                                                                   data-tableName="follow_pre" value="{$obj->bp}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->bp}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="pulse" 
                                                                   data-tableName="follow_pre" value="{$obj->pulse}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->pulse}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="temp" 
                                                                   data-tableName="follow_pre" value="{$obj->temp}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->temp}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="so2" 
                                                                   data-tableName="follow_pre" value="{$obj->so2}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->so2}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement datetimepicker " data-id="{$obj->id}" data-colName="timing" 
                                                                   data-tableName="follow_pre" value="{$obj->timing}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->timing}" data-date-format="mm/dd HH:ii p" /> 
                                                        </td>
                                                        <td>
                                                            <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$obj->id}" style=" float: left;" 
                                                               href="#" data-link="ovumpickupembryotrans" data-fn="delPre" data-tableName="follow_pre">
                                                                <i class="fa fa-close"></i>
                                                            </a>
                                                        </td>
                                                    </tr>
                                                    {/foreach}
                                                </tbody>
                                            </table>
                                        </div>

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

                                        <div class="col-md-12">
                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody>
                                                    <tr>
                                                        <th class="wds25">
                                                            {if $programesetting->notes == 1 } 
                                                            Notes
                                                            {else}
                                                            Operative Notes 
                                                            {/if}

                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control  updateElement" 
                                                                   data-id="{$followup->id}"  value="{$followup->pre_note}"
                                                                   data-colName="pre_note" data-tableName="followup_operation" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>

                                        <div class="col-md-12" {if $programesetting->notes == 1 } style="display: none;" {/if}>
                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody>
                                                    <tr>
                                                        <th class="wds25">Post Operative Instructions  </th>
                                                        <td>
                                                            <input type="text" class="form-control  updateElement" 
                                                                   data-id="{$followup->id}"  value="{$followup->post_instruction}"
                                                                   data-colName="post_instruction" data-tableName="followup_operation" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>

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

                                        <div class="col-md-12">
                                            <table class="table table-striped table-hover table-bordered">
                                                <caption class="txtc h3">Post-Operative
                                                    <a class="btn green btn-xs addPre" data-id="{$followup->id}" 
                                                       style=" width: 5%;" data-tableName="follow_post" data-count="postItr"> 
                                                        <i class="fa fa-plus"></i>
                                                    </a>
                                                </caption>
                                                <thead>
                                                    <tr >
                                                        <th style="width: 15%;background: #DDD;" rowspan="2">    الطبيب  </th>
                                                        <th style="width: 14%;background: #DDD;" rowspan="2">     الممرضة   </th>
                                                        <th style="background: #DDD;" colspan="4">    التحاليل المسحوبة  </th>
                                                        <th style="background: #DDD;" colspan="4">     العلامات الحيوية   </th>
                                                        <th style="background: #DDD;" rowspan="2">       التوقيت   </th>
                                                        <th style="width: 1%;background: #DDD;" rowspan="2">   </th>
                                                    </tr>
                                                    <tr>
                                                        <th style="width: 8%;background: #DDD;">    U.O.P  </th>
                                                        <th style="width: 8%;background: #DDD;">    Drain  </th>
                                                        <th style="width: 8%;background: #DDD;">    V.pack  </th>
                                                        <th style="width: 6%;background: #DDD;">    RBS  </th>
                                                        <th style="width: 7%;background: #DDD;">    BP  </th>
                                                        <th style="width:6%;background: #DDD;">    Pulse  </th>
                                                        <th style="width: 6%;background: #DDD;">    Temp  </th>
                                                        <th style="width: 6%;background: #DDD;">    So2  </th>
                                                    </tr>
                                                </thead>
                                                <tbody id="follow_post_div">
                                                    {assign var=itr value=1}
                                                    {foreach $follow_posts as $obj}
                                                    <tr>
                                                        <td>
                                                            <select class="form-control select2me  updateElement " id="doctorid{$obj->id}"  data-placeholder="Select..." data-id="{$obj->id}"  data-colName="doctorid" data-tableName="follow_post">
                                                                <option></option>
                                                                {foreach  $doctors as $data}
                                                                <option value="{$data.user_id}" {if $data.user_id == $obj->doctorid} selected {/if}>{$data.name}</option>
                                                                {/foreach}
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control select2me  updateElement " id="nurseid{$obj->id}"   data-placeholder="Select..." data-id="{$obj->id}"  data-colName="nurseid" data-tableName="follow_post">
                                                                <option></option>
                                                                {foreach  $nurses as $data}
                                                                <option value="{$data.user_id}" {if $data.user_id == $obj->nurseid} selected {/if}>{$data.name}</option>
                                                                {/foreach}
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control  updateElement " id="uop{$itr}" data-itr="{$itr}" name="uop" data-placeholder="Select..." data-id="{$obj->id}"  data-colName="uop" data-tableName="follow_post">
                                                                <option></option>
                                                                {foreach  $follow_uop as $data}
                                                                <option value="{$data->id}" {if $data->id == $obj->uop} selected {/if}>{$data->name}</option>
                                                                {/foreach}
                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control  updateElement " id="drain{$itr}" data-itr="{$itr}"   name="drain" data-placeholder="Select..." data-id="{$obj->id}"  data-colName="drain" data-tableName="follow_post">
                                                                <option></option>
                                                                {foreach  $follow_drain as $data}
                                                                <option value="{$data->id}" {if $data->id == $obj->drain} selected {/if}>{$data->name}</option>
                                                                {/foreach}
                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control  updateElement " id="vpack{$itr}" data-itr="{$itr}"   name="vpack" data-placeholder="Select..." data-id="{$obj->id}"  data-colName="vpack" data-tableName="follow_post">
                                                                <option></option>
                                                                {foreach  $follow_vpack as $data}
                                                                <option value="{$data->id}" {if $data->id == $obj->vpack} selected {/if}>{$data->name}</option>
                                                                {/foreach}
                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="rbs" 
                                                                   data-tableName="follow_post" value="{$obj->rbs}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->rbs}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control bp_mask  updateElement" data-id="{$obj->id}" data-colName="bp" 
                                                                   data-tableName="follow_post" value="{$obj->bp}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->bp}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="pulse" 
                                                                   data-tableName="follow_post" value="{$obj->pulse}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->pulse}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="temp" 
                                                                   data-tableName="follow_post" value="{$obj->temp}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->temp}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" data-id="{$obj->id}" data-colName="so2" 
                                                                   data-tableName="follow_post" value="{$obj->so2}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->so2}"/>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control updateElement datetimepicker " data-id="{$obj->id}" data-colName="timing" 
                                                                   data-tableName="follow_post" value="{$obj->timing}" data-toggle="popover" data-trigger="hover" 
                                                                   data-placement="bottom" data-content="{$obj->timing}" data-date-format="mm/dd HH:ii p" />
                                                        </td>
                                                        <td>
                                                            <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$obj->id}" style=" float: left;" 
                                                               href="#" data-link="ovumpickupembryotrans" data-fn="delPre" data-tableName="follow_post">
                                                                <i class="fa fa-close"></i>
                                                            </a>
                                                        </td>
                                                    </tr>
                                                    {capture assign=itr}{$itr+1}{/capture}
                                                    {/foreach}
                                                </tbody>
                                            </table>
                                        </div>

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

                                        <div class="col-md-12">
                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody>
                                                    <tr>
                                                        <th>Notes </th>
                                                        <td>
                                                            <input type="text" class="form-control  updateElement" 
                                                                   data-id="{$followup->id}"  value="{$followup->post_note}"
                                                                   data-colName="post_note" data-tableName="followup_operation" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>


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

                                        <div class="col-md-6" {if $programesetting->triggering == 1 } style="display: none;" {/if} >
                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody>
                                                    <tr>
                                                        <th>Duration Of Infertility :</th>
                                                        <td>
                                                            <input type="text" class="form-control  datepicker updateElement" id="infertility_duration"  
                                                                   value="{$followup->infertility_duration}" name="infertility_duration" readonly data-id="{$followup->id}" 
                                                                   data-colName="infertility_duration" data-tableName="followup_operation" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>


                                        </div>



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

                                        <div class="col-md-12" id="triggeringDiv" {if $programesetting->triggering == 1 } style="display: none;" {/if}>
                                            <table class="table table-striped table-hover table-bordered">
                                                <caption class="txtc h3">Triggering</caption>
                                                <tbody>
                                                    <tr>
                                                        <th class="col-md-2">Operator:</th>
                                                        <td>
                                                            <select class="form-control  select2me updateElement "  name="operator" data-placeholder="Select..." data-id="{$followup->id}"  data-colName="operator" data-tableName="followup_operation">
                                                                <option></option>
                                                                {foreach  $doctors as $data}
                                                                <option value="{$data.user_id}" {if $data.user_id == $followup->operator} selected {/if}>{$data.name}</option>
                                                                {/foreach}
                                                            </select>
                                                        </td>
                                                    </tr>

                                                    <tr>
                                                        <th class="col-md-2">HCG on / h :</th>
                                                        <td>
                                                            <div class="col-md-6">
                                                                <div class="form-group">
                                                                    <label class="col-md-4 control-label">Day :</label>
                                                                    <div class="col-md-8">
                                                                        <select class="form-control  select2me updateElement "  name="day" data-placeholder="Select..." data-id="{$followup->id}"  data-colName="day" data-tableName="followup_operation">
                                                                            <option></option>
                                                                            {foreach  $days as $day}
                                                                            <option value="{$day}" {if $day == $followup->day} selected {/if}>{$day}</option>
                                                                            {/foreach}
                                                                        </select>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-6">
                                                                <div class="form-group">
                                                                    <label class="col-md-4 control-label">Time :</label>
                                                                    <div class="col-md-8">
                                                                        <input type="text" class="form-control  timepicker  updateElement" id="ontime"  
                                                                               value="{$followup->ontime}" readonly data-id="{$followup->id}" data-colName="ontime" 
                                                                               data-tableName="followup_operation" data-date-format="hh:ii" />
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </td>
                                                    </tr>

                                                    <tr>
                                                        <th class="col-md-2">Drug:</th>
                                                        <td>
                                                            <select multiple="" size="1" class="form-control select2me follow_drugs updateDiagnosis" id="follow_drugs" data-id="{$followup->id}" data-colName="drugs" data-tableName="followup_operation">
                                                                <option value="">choose</option>

                                                                {foreach $follow_drugs as $data}
                                                                <option value="{$data->id}" {if $data->id|in_array:$followup->drugs}selected="selected"{/if}>{$data->name}</option>
                                                                {/foreach}
                                                                <option value="-1" class="addDiagnosis">Add</option>
                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                            </select>


                                                        </td>
                                                    </tr>

                                                    <tr>
                                                        <th class="col-md-2">Rout:</th>
                                                        <td>
                                                            <select class="form-control  updateElement " id="follow_rout" name="rout" data-placeholder="Select..." data-id="{$followup->id}"  data-colName="rout" data-tableName="followup_operation">
                                                                <option></option>
                                                                {foreach  $follow_rout as $one}
                                                                <option value="{$one->id}" {if $one->id == $followup->rout} selected {/if}>{$one->name}</option>
                                                                {/foreach}
                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                            </select>
                                                        </td>
                                                    </tr>

                                                    <tr>
                                                        <th class="col-md-2">Semen:</th>
                                                        <td>
                                                            <select class="form-control  updateElement " id="follow_semen" name="semen" data-placeholder="Select..." data-id="{$followup->id}"  data-colName="semen" data-tableName="followup_operation">
                                                                <option></option>
                                                                {foreach  $follow_semen as $one}
                                                                <option value="{$one->id}" {if $one->id == $followup->semen} selected {/if}>{$one->name}</option>
                                                                {/foreach}
                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                            </select>
                                                        </td>
                                                    </tr>

                                                </tbody>
                                            </table>


                                        </div>

                                        <div class="form-actions">
                                            <div class="row">

                                                <input type="hidden" id="id" name="id"   value="{$followup->id}"/>
                                                <input type="hidden" id="controllName" value="{$controllname}"/>

                                                <div class="col-md-offset-2 col-md-10">
                                                    {if $patientId}
                                                    <a class="btn default" href="{$hosturl}/controllers/{$controllname}.php?ac=index&patientid={$patientId}">Cancel</a>
                                                    {else}
                                                    <a class="btn default" href="{$hosturl}/controllers/{$controllname}.php?ac=index">Cancel</a>
                                                    {/if}



                                                    {if $edit != 1 }     <button type="submit" class="btn blue">Finish</button>   {/if}

                                                    <a href="javascript:;" class="btn green"  id="follow_print"  data-id="{$followup->id}" > print  </a>

                                                    <label class="bold" style="font-size: 16px;">Husband 
                                                        <input type="checkbox" id="forHusbandF" name="forHusband"  value="1" >
                                                    </label>

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


                <div id="printSheetDiv"></div>


            </div>
        </div>
    </div>
</div>
<div class="clearfix"></div>
<div id="vvv"></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="" id="" method="post" class="form-horizontal  emptyform" >
                        <div class="form-body all" >
                            <!------===========================================------->
                            <div class="form-group">
                                <label class="col-md-1 control-label"> </label>
                                <div class="col-md-10">
                                    <div id="alldatadiv" class="" > </div>
                                </div>
                                <label class="col-md-1 control-label"> </label>
                            </div>

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

                            <!------===========================================------->
                            <div class="modal-footer">

                                <button type="submit" id="amountcloseinput"   class="btn default" data-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
    </div>
</div>


<div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="add_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"> Add New </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <form action="" id="" method="post" class="form-horizontal  emptyform" >
                        <div class="form-body">
                            <!------===========================================------->
                            <div class="form-group">
                                <div class="col-md-1"></div>
                                <label class="col-md-3 control-label txtl"> Name </label>
                                <div class="col-md-8">
                                    <input type="text" class="addDiagnosisName wds95" id="diagnosisName" data-select="" data-tablename="" data-id="" value="">
                                </div>
                            </div>

                            <!------===========================================------->
                            <div class="modal-footer">
                                <button type="button" id="amountcloseinput"   class="btn default" data-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
    </div>
</div>


<div id="tttDisplay"></div>
<div id="forPrint"></div>
<div id="tempModels"></div>