<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content clinick">
        <div class="row">
            <div class="col-md-12">
                <div class="portlet box blue">
                    <div class="portlet-title" style="height: 5px">
                        <div class="caption">
                            <i class="fa fa-edit"></i> Examination
                        </div>
                    </div>
                    <div class="portlet-body" >
                        <!-- END PAGE HEADER-->
                        <!-- BEGIN PAGE CONTENT-->
                        <div class="row all">

                            <div class="portlet-title tbox">
                                <div class="caption font-green-haze col-md-6">
                                    <span class="caption-subject bold uppercase"> Examination </span>
                                </div>
                                <div class="actions col-md-6">
                                    <button type="button" class="btn btn-xs blue fright" id="btn_exmination"> Add</button>
                                </div>
                            </div>

                            <input type="hidden" id="patientId" value="{$patientId}"/>
                            <input type="hidden" id="controllName" value="examination"/>
                            <input type="hidden" id="examscrt" value="122"/>
                            <input type="hidden" id="exam_itr" value="{$allexminationcount}" />

                            {if $ProgramesettingData->head != 1}
                            <input type="hidden" id="headSelect" value="1"/>
                            {/if}
                            {if $ProgramesettingData->chest != 1}
                            <input type="hidden" id="chestSelect" value="1"/>
                            {/if}
                            {if $ProgramesettingData->abdomen != 1}
                            <input type="hidden" id="abdomenSelect" value="1"/>
                            {/if}
                            {if $ProgramesettingData->pelvis != 1}
                            <input type="hidden" id="pelvisSelect" value="1"/>
                            {/if}
                            {if $ProgramesettingData->extremitis != 1}
                            <input type="hidden" id="extremitisSelect" value="1"/>
                            {/if}
                            <div id="div_exmination">
                                {assign var=i value=1}
                                {foreach $allexmination as $myallexmination}
                                <div>
                                    <div class="row clinick ltr" >

                                        <div class="col-md-1">
                                            <div class="">
                                                <label class="control-label col-md-2 ">{if $ProgramesettingData->displaydoctorname eq 1}{$myallexmination->username}{/if}</label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row clinick ltr" >
                                        <div class="col-md-1 wds9">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                <input type="text" class="form-control updateElement datepicker" name="examinationdate" data-colName="examinationdate"  data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->examinationdate}"/>
                                                <!--<label for="date">Date</label>-->
                                            </div>
                                        </div>


                                        <div class="col-md-2 anamez wds12">


                                            <div class="input-group">
                                                <span class="input-group-addon" style="padding: 6px 6px;">
                                                    WT.
                                                </span>
                                                <input type="text" class="form-control updateElement txtc calcbm positivefloat" name="weight" data-colName="weight"  id="weight{$myallexmination->id}"  data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->weight}"/>

                                                <span class="input-group-addon" style="padding: 6px 6px;">
                                                    KG
                                                </span>
                                            </div>

                                        </div>



                                        <div class="col-md-2 anamez wds12">
                                            <div class="input-group">
                                                <span class="input-group-addon" style="padding: 6px 6px;">HT.</span>
                                                <input type="text" class="form-control updateElement txtc calcbm positivefloat" name="height" data-colName="height" id="height{$myallexmination->id}"  data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->height}"/>
                                                <label for="form_control_1"></label>
                                                <span class="input-group-addon" style="padding: 6px 6px;">M</span>
                                            </div>
                                        </div>




                                        <div class="col-md-2 anamez wds15">
                                            <div class="input-group">
                                                <span class="input-group-addon" style="padding: 6px 6px;">BMI</span>
                                                <input type="text" class="form-control updateElement txtc positiveNo" name="bmi"  data-colName="bmi"  id="bmi{$myallexmination->id}"   data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->bmi}" readonly=""/>
                                                <label for="form_control_1"></label>
                                                <span class="input-group-addon" style="padding: 6px 6px;">Kg/ m²</span>

                                            </div>
                                        </div>




                                        <div class="col-md-2 anamez wds25">
                                            <div class="input-group">
                                                <span class="input-group-addon" style="padding: 6px 6px;">BP1</span>
                                                <input type="text" class="form-control updateElement bp_mask txtc" name="bP" data-colName="bP"   data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->bP}"/>
                                                <label for="form_control_1"></label>
                                                <span class="input-group-addon" style="padding: 6px 6px;">BP2</span>
                                                <input type="text" class="form-control updateElement bp_mask txtc" name="bp2" data-colName="bp2"   data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->bp2}"/>
                                                <label for="form_control_1"></label>
                                                <span class="input-group-addon" style="padding: 6px 6px;">mmHg</span>


                                            </div>
                                        </div>



                                        <div class="col-md-2 anamez wds14">
                                            <div class="input-group">
                                                <span class="input-group-addon" style="padding: 6px 6px;">Pulse</span>
                                                <input type="text" class="form-control updateElement txtc" name="pulse" data-colName="pulse"   data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->pulse}"/>
                                                <label for="form_control_1"></label>
                                                <span class="input-group-addon" style="padding: 6px 6px;">/min</span>


                                            </div>
                                        </div>

                                        <div class="col-md-2 anamez wds13">
                                            <div class="input-group">
                                                <span class="input-group-addon" style="padding: 6px 6px;">RGB </span>
                                                <input type="text" class="form-control updateElement txtc" name="rgb" data-colName="rgb" data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->rgb}"/>
                                                <label for="form_control_1"></label>
                                                <span class="input-group-addon" style="padding: 6px 6px;">mg/dl</span>
                                            </div>
                                        </div>



                                        <div class="col-md-12">
                                            <div class="col-md-2 wds20">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    {if $ProgramesettingData->head eq 1}
                                                    <input type="text" class="form-control updateElement"  name="headandneck" data-colName="headandneck"  data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->headandneck}" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="{$myallexmination->headandneck}"/>
                                                    {else}

                                                    <select class="form-control  updateElement  headandneck  allupdateselect" id="examinationhead{$i}" data-itr="{$i}" data-val="{$myallexmination->headandneck}"  name="headandneck" data-colName="headandneck" select-tableName="examinationhead"  data-id="{$myallexmination->id}" data-tableName="examination" >
                                                        <option value="">choose</option>
                                                        {foreach  $examinationhead as $data}
                                                        <option value="{$data->id}" {if {$data->id} eq {$myallexmination->headandneck} } selected {/if}>{$data->name} </option>
                                                        {/foreach}

                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                    {/if}
                                                    <label for="headandneck">Head and neck:</label>
                                                </div>
                                            </div>
                                            <div class="col-md-2 wds20">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    {if $ProgramesettingData->chest eq 1}
                                                    <input type="text" class="form-control updateElement  "  name="chestandheart" data-colName="chestandheart"  data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->chestandheart}"  data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="{$myallexmination->chestandheart}"/>
                                                    {else}

                                                    <select class="form-control  updateElement  allupdateselect chestandheart" id="examinationchest{$i}" data-itr="{$i}" data-val="{$myallexmination->chestandheart}"  name="chestandheart" data-colName="chestandheart" select-tableName="examinationchest"  data-id="{$myallexmination->id}" data-tableName="examination" >
                                                        <option value="">choose</option>
                                                        {foreach  $examinationchest as $data}
                                                        <option value="{$data->id}" {if {$data->id} eq {$myallexmination->chestandheart} } selected {/if}>{$data->name} </option>
                                                        {/foreach}

                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                    {/if}
                                                    <label for="chestandheart">Chest and heart:</label>
                                                </div>
                                            </div>
                                            <div class="col-md-2 wds20">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    {if $ProgramesettingData->abdomen eq 1}
                                                    <input type="text" class="form-control updateElement "  name="abdomen" data-colName="abdomen"  data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->abdomen}"  data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="{$myallexmination->abdomen}"/>
                                                    {else}

                                                    <select class="form-control  updateElement  allupdateselect abdomen" id="examinationabdomen{$i}" data-itr="{$i}" data-val="{$myallexmination->abdomen}"  name="abdomen" data-colName="abdomen" select-tableName="examinationabdomen"  data-id="{$myallexmination->id}" data-tableName="examination" >
                                                        <option value="">choose</option>
                                                        {foreach  $examinationabdomen as $data}
                                                        <option value="{$data->id}" {if {$data->id} eq {$myallexmination->abdomen} } selected {/if}>{$data->name} </option>
                                                        {/foreach}

                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                    {/if}
                                                    <label for="Abdomen">Abdomen</label>
                                                </div>
                                            </div>

                                            <div class="col-md-2 wds20">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    {if $ProgramesettingData->pelvis eq 1}
                                                    <input type="text" class="form-control updateElement "  name="pelvis" data-colName="pelvis"   data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->pelvis}"  data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="{$myallexmination->pelvis}"/>
                                                    {else}

                                                    <select class="form-control  updateElement  allupdateselect pelvis" id="examinationpelvis{$i}" data-itr="{$i}" data-val="{$myallexmination->pelvis}"  name="pelvis" data-colName="pelvis" select-tableName="examinationpelvis"  data-id="{$myallexmination->id}" data-tableName="examination" >
                                                        <option value="">choose</option>
                                                        {foreach  $examinationpelvis as $data}
                                                        <option value="{$data->id}" {if {$data->id} eq {$myallexmination->pelvis} } selected {/if}>{$data->name} </option>
                                                        {/foreach}

                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                    {/if}
                                                    <label for="examinationpelvis{$i}">Neck us</label>
                                                </div>
                                            </div>


                                            <div class="col-md-2 wds20">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    {if $ProgramesettingData->extremitis eq 1}
                                                    <input type="text" class="form-control updateElement "  name="extremitis" data-colName="extremitis"   data-id="{$myallexmination->id}" data-tableName="examination" value="{$myallexmination->extremitis}"  data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="{$myallexmination->extremitis}" />
                                                    {else}

                                                    <select class="form-control  updateElement  allupdateselect extremitis" id="examinationextremitis{$i}" data-itr="{$i}" data-val="{$myallexmination->extremitis}"  name="extremitis" data-colName="extremitis" select-tableName="examinationextremitis"  data-id="{$myallexmination->id}" data-tableName="examination" >
                                                        <option value="">choose</option>
                                                        {foreach  $examinationextremitis as $data}
                                                        <option value="{$data->id}" {if {$data->id} eq {$myallexmination->extremitis} } selected {/if}>{$data->name} </option>
                                                        {/foreach}

                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                    {/if}
                                                    <label for="Extremitis">Extremities</label>
                                                </div>
                                            </div>



                                            <button type="button" class="btn btn-xs red fright deleteExamination axedelete"  data-id="{$myallexmination->id}" data-tableName="examination"><i class="fa fa-close"></i></button>

                                        </div>


                                    </div>
                                </div>
                                {capture assign=i}{$i+1}{/capture}
                                {/foreach}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- END PAGE CONTENT-->

<!-- END CONTENT -->


<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="button" id="amountcloseinput"   class="btn default" data-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
    </div>
</div>