<meta charset="utf8">
<style>
    #mainDiv 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: #c1c1c1;
    }
</style>
<div class="page-content-wrapper">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12" id="gprinModel">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-user"></i>التثقيف الصحى للمريض / الأسرة
                        </div>
                        <div class="actions">
                            {if isset($is_add)}
                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=complete_one&&show={$show}&&patientid={$patientId}&&id={$educate_health.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=educate_show&&patientid={$patientId}"
                                class="btn btn-default btn-sm">
                                Show </a>

                            <a class="btn btn-default btn-sm assessmentFormPrint" data-id="{$educate_health.id}"
                                data-fn="educate_print">
                                <i class="fa fa-print"></i> </a>
                        </div>
                    </div>
                    <div class="portlet-body all rtl">
                        <!---======================================================== tab1============================================================================================ ----->
                        <div class="row">
                            <div id="mainDiv">
                                <div class="row">
                                    <div class="portlet-body form">
                                        <form>
                                            <div class="form-body">
                                                <table>
                                                    <thead>
                                                        <tr>
                                                            <th class="wds12"> تاريخ الدخول </th>
                                                            <td>
                                                                <input type="text"
                                                                    class="form-control datepicker updateElement"
                                                                    data-colName="educate_date"
                                                                    value="{$educate_health.educate_date}"
                                                                    data-tableName="educate_health"
                                                                    data-id="{$educate_health.id}" />
                                                            </td>
                                                            <th class="wds10"> ملاحظات </th>
                                                            <td>
                                                                <textarea class="form-control updateElement amrpop"
                                                                    rows="2" placeholder="ملاحظات" data-colName="notes"
                                                                    data-id="{$educate_health.id}"
                                                                    data-tableName="educate_health">{$educate_health.notes}
                                                                </textarea>
                                                            </td>
                                                        </tr>
                                                    </thead>
                                                </table>
                                                <div class="clearfix"></div>
                                                <hr>
                                                <table>
                                                    <tr>
                                                        <td class="wds12">التعليم </td>
                                                        <td>
                                                            <select class="form-control select2me updateElement"
                                                                id="edu" data-val="{$educate_health.education}"
                                                                data-colName="education" data-id="{$educate_health.id}"
                                                                data-tableName="educate_health">
                                                                <option value="">اختر</option>
                                                                <option value="1" {if $educate_health.education eq 1 }
                                                                    selected {/if}>
                                                                    مؤهل عالي </option>
                                                                <option value="2" {if $educate_health.education eq 2 }
                                                                    selected{/if}>
                                                                    مؤهل متوسط </option>
                                                                <option value="3" {if $educate_health.education eq 3 }
                                                                    selected{/if}>
                                                                    يقرأ ويكتب</option>
                                                                <option value="4" {if $educate_health.education eq 4 }
                                                                    selected{/if}>
                                                                    أمي</option>
                                                            </select>
                                                        </td>
                                                        <td class="wds12">الحالة النفسية والقابلية للتعلم </td>
                                                        <td>
                                                            <select class="form-control select2me updateElement"
                                                                id="educate_ability"
                                                                data-val="{$educate_health.educate_ability}"
                                                                data-colName="educate_ability"
                                                                data-id="{$educate_health.id}"
                                                                data-tableName="educate_health">
                                                                <option value="">اختر</option>
                                                                <option value="1" {if $educate_health.educate_ability eq
                                                                    1 } selected {/if}>
                                                                    يريد ويستجيب </option>
                                                                <option value="2" {if $educate_health.educate_ability eq
                                                                    2 } selected{/if}>
                                                                    لا يريد ولا يستجيب </option>
                                                            </select>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="wds12">عوائق للتثقيف </td>
                                                        <td>
                                                            <select class="form-control select2me updateElement"
                                                                id="obstacles" data-val="{$educate_health.obstacles}"
                                                                data-colName="obstacles" data-id="{$educate_health.id}"
                                                                data-tableName="educate_health">
                                                                <option value="">اختر</option>
                                                                <option value="1" {if $educate_health.obstacles eq 1 }
                                                                    selected {/if}>
                                                                    عضوية ( السمع – الكلام )</option>
                                                                <option value="2" {if $educate_health.obstacles eq 2 }
                                                                    selected{/if}>
                                                                    اللغة</option>
                                                                <option value="3" {if $educate_health.obstacles eq 3 }
                                                                    selected{/if}>
                                                                    معرفية (مستوى الذكاء والاستيعاب)</option>
                                                            </select>
                                                        </td>
                                                        <td class="wds12">اللغة</td>
                                                        <td>
                                                            <select
                                                                class="form-control slctWAdd language updateElement allupdateselect"
                                                                id="language" data-val="{$educate_health.language}"
                                                                name="language" select-tableName="language"
                                                                data-colName="language" data-id="{$educate_health.id}"
                                                                data-tableName="educate_health">
                                                                <option value="">اختر</option>
                                                                {foreach $allLanguage as $data}
                                                                <option value="{$data.id}" {if $data.id eq
                                                                    $educate_health.language } selected {/if}>
                                                                    {$data.name}
                                                                </option>
                                                                {/foreach}
                                                                <option value="-2" class="deleteoptincompo">
                                                                    Delete</option>
                                                            </select>
                                                        </td>
                                                    </tr>

                                                    <tr>
                                                        <td colspan="2">بناءاً على المعلومات السابقة سيتم تقديم التثقيف
                                                            لـ </td>
                                                        <td colspan="2">
                                                            <input type="checkbox" class="md-check updateCheckbox"
                                                                id="educatePatient" name="educate_for"
                                                                data-tableName="educate_health"
                                                                data-colName="educate_patient"
                                                                data-id="{$educate_health.id}" {if
                                                                $educate_health.educate_patient eq 1}checked{/if} />
                                                            <label for="educatePatient">
                                                                <span></span>
                                                                <span class="check"></span>
                                                                <span class="box"></span>
                                                                المريض</label>

                                                            <input type="checkbox" class="md-check updateCheckbox"
                                                                id="educateFamily" name="educate_for"
                                                                data-tableName="educate_health"
                                                                data-colName="educate_family"
                                                                data-id="{$educate_health.id}" {if
                                                                $educate_health.educate_family eq 1}checked{/if} />
                                                            <label for="educateFamily">
                                                                <span></span>
                                                                <span class="check"></span>
                                                                <span class="box"></span>
                                                                الأسرة </label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>طريقة التثقيف </td>
                                                        <td>
                                                            <input type="checkbox" class="md-check updateCheckbox"
                                                                id="educateTypeOral" name="educate_type"
                                                                data-tableName="educate_health"
                                                                data-colName="educate_type_oral"
                                                                data-id="{$educate_health.id}" {if
                                                                $educate_health.educate_type_oral eq 1}checked{/if} />
                                                            <label for="educateTypeOral">
                                                                <span></span>
                                                                <span class="check"></span>
                                                                <span class="box"></span>
                                                                شفاهة</label>

                                                            <input type="checkbox" class="md-check updateCheckbox"
                                                                id="educateTypeWritten" name="educate_type"
                                                                data-tableName="educate_health"
                                                                data-colName="educate_type_written"
                                                                data-id="{$educate_health.id}" {if
                                                                $educate_health.educate_type_written eq
                                                                1}checked{/if} />
                                                            <label for="educateTypeWritten">
                                                                <span></span>
                                                                <span class="check"></span>
                                                                <span class="box"></span>
                                                                مكتوبة </label>
                                                            <input type="checkbox" class="md-check updateCheckbox"
                                                                id="educateTypeVisual" name="educate_type"
                                                                data-tableName="educate_health"
                                                                data-colName="educate_type_visual"
                                                                data-id="{$educate_health.id}" {if
                                                                $educate_health.educate_type_visual eq 1}checked{/if} />
                                                            <label for="educateTypeVisual">
                                                                <span></span>
                                                                <span class="check"></span>
                                                                <span class="box"></span>
                                                                مسموعه / مرئية </label>
                                                        </td>
                                                        <td>
                                                            أخرى
                                                        </td>
                                                        <td><input type="text" class="form-control updateElement"
                                                                data-colName="other_educate_type"
                                                                value="{$educate_health.other_educate_type}"
                                                                data-tableName="educate_health"
                                                                data-id="{$educate_health.id}" /></td>
                                                    </tr>
                                                </table>
                                                <div class="clearfix"></div>
                                                <hr>
                                                <table>
                                                    <thead>
                                                        <tr>
                                                            <th>شرح من قبل الفريق الطبي</th>
                                                            <th>تم</th>
                                                        </tr>
                                                        <tr>
                                                            <th colspan="2">شرح من قبل الطبيب</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <tr>
                                                            <td>شرح التشخيص الطبي والحالة الحالية للمريض</td>
                                                            <td>
                                                                <input type="checkbox" class="md-check updateCheckbox"
                                                                    id="diagnos_explain" name="diagnos_explain"
                                                                    data-tableName="educate_health"
                                                                    data-colName="diagnos_explain"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.diagnos_explain eq 1}checked{/if} />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>شرح الاجراءات أو الفحوصات المطلوبة قبل إجراءها</td>
                                                            <td>
                                                                <input type="checkbox" class="md-check updateCheckbox"
                                                                    id="procedure_explain" name="procedure_explain"
                                                                    data-tableName="educate_health"
                                                                    data-colName="procedure_explain"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.procedure_explain eq
                                                                    1}checked{/if} />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>شرح خطة العلاج والاثار الجانبية والبدائل</td>
                                                            <td>
                                                                <input type="checkbox" class="md-check updateCheckbox "
                                                                    id="treatment_plan" name="treatment_plan"
                                                                    data-tableName="educate_health"
                                                                    data-colName="treatment_plan"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.treatment_plan eq 1}checked{/if} />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>الادوية المستخدمة أن وجد</td>
                                                            <td><input type="checkbox" class="md-check updateCheckbox "
                                                                    id="drugs_used" name="drugs_used"
                                                                    data-tableName="educate_health"
                                                                    data-colName="drugs_used"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.drugs_used eq 1}checked{/if} /></td>
                                                        </tr>
                                                        <tr>
                                                            <td>تعليمات ما بعد الاجراء</td>
                                                            <td><input type="checkbox" class="md-check updateCheckbox "
                                                                    id="instructions_after" name="instructions_after"
                                                                    data-tableName="educate_health"
                                                                    data-colName="instructions_after"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.instructions_after eq
                                                                    1}checked{/if} /></td>
                                                        </tr>
                                                        <tr>
                                                            <td>مواضيع اخرى </td>
                                                            <td><input type="checkbox" class="md-check updateCheckbox "
                                                                    id="other_topics" name="other_topics"
                                                                    data-tableName="educate_health"
                                                                    data-colName="other_topics"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.other_topics eq 1}checked{/if} />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <th colspan="2">شرح من قبل هيئه التمريض</th>
                                                        </tr>
                                                        <tr>
                                                            <td>التأكيد على حقوق وواجبات المرضى</td>
                                                            <td><input type="checkbox" class="md-check updateCheckbox "
                                                                    id="patients_rights" name="patients_rights"
                                                                    data-tableName="educate_health"
                                                                    data-colName="patients_rights"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.patients_rights eq 1}checked{/if} />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>تقييم الألم</td>
                                                            <td><input type="checkbox" class="md-check updateCheckbox "
                                                                    id="pain_evaluation" name="pain_evaluation"
                                                                    data-tableName="educate_health"
                                                                    data-colName="pain_evaluation"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.pain_evaluation eq 1}checked{/if} />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>تعليمات ما بعد الأجراء</td>
                                                            <td><input type="checkbox" class="md-check updateCheckbox "
                                                                    id="nursing_instructions_after"
                                                                    name="nursing_instructions_after"
                                                                    data-tableName="educate_health"
                                                                    data-colName="nursing_instructions_after"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.nursing_instructions_after eq
                                                                    1}checked{/if} /></td>
                                                        </tr>
                                                        <tr>
                                                            <td>اجراءات الوقاية من مخاطر السقوط </td>
                                                            <td><input type="checkbox" class="md-check updateCheckbox "
                                                                    id="protection_procedures"
                                                                    name="protection_procedures"
                                                                    data-tableName="educate_health"
                                                                    data-colName="protection_procedures"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.protection_procedures eq
                                                                    1}checked{/if} /></td>
                                                        </tr>
                                                        <tr>
                                                            <td>الإجراءات التمريضية المتبعه بالمنزل</td>
                                                            <td><input type="checkbox" class="md-check updateCheckbox "
                                                                    id="nursing_procedures" name="nursing_procedures"
                                                                    data-tableName="educate_health"
                                                                    data-colName="nursing_procedures"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.nursing_procedures eq
                                                                    1}checked{/if} /></td>
                                                        </tr>
                                                        <tr>
                                                            <td>مواضيع اخرى </td>
                                                            <td><input type="checkbox" class="md-check updateCheckbox "
                                                                    id="nursing_other_topics"
                                                                    name="nursing_other_topics"
                                                                    data-tableName="educate_health"
                                                                    data-colName="nursing_other_topics"
                                                                    data-id="{$educate_health.id}" {if
                                                                    $educate_health.nursing_other_topics eq
                                                                    1}checked{/if} /></td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="clearfix"></div>
<div id="vvv"></div>
<input type="hidden" id="controllName" value="{$controllname}">
<input type="hidden" id="patientId" value="{$patientid}" />

<div id="forPrint"></div>
<!----#########################################################################  model ##############################################################################################################--->
<div class="all">
    <!--------------------------------------------------------------------------- add Present History Model-------------------------------------------------------------------------------------->
    <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="addpresentHistoryName wds95" id="presentHistoryName"
                                            data-select="" data-tablename="" data-id="" data-mainTable="" 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>
    <!--------------------------------------------------------------------------- edit Present History  Model-------------------------------------------------------------------------------------->
    <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">
                                <!------===========================================------->
                                <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>
</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>