<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={$internal_discharge_data.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=internal_discharge_show&patientid={$patientId}"
                                class="btn btn-default btn-sm">
                                Show </a>

                            <a class="btn btn-default btn-sm assessmentFormPrint"
                                data-id="{$internal_discharge_data.id}" data-fn="internal_discharge_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>الرقم القومي</th>
                                                            <td>
                                                                <input type="text" class="form-control"
                                                                    value="{$nationalid}" readonly />
                                                            </td>
                                                            <th>السن</th>
                                                            <td>
                                                                <input type="text" class="form-control" value="{$age}"
                                                                    readonly />
                                                            </td>
                                                        </tr>
                                                    </thead>
                                                </table>
                                                <div class="clearfix"></div>
                                                <hr>
                                                <table>

                                                    <tr>
                                                        <th>العنوان</th>
                                                        <td>
                                                            <input type="text" class="form-control" value="{$address}"
                                                                readonly />
                                                        </td>
                                                        <th>المركز</th>
                                                        <td>
                                                            <input type="text" class="form-control" value="{$city}"
                                                                readonly />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <th>رقم التليفون</th>
                                                        <td>
                                                            <input type="text" class="form-control" value="{$phone}"
                                                                readonly />
                                                        </td>
                                                        <th>المحافظة</th>
                                                        <td>
                                                            <input type="text" class="form-control"
                                                                value="{$governorate}" readonly />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <th> تاريخ الدخول </th>
                                                        <td colspan="3">
                                                            <input type="text" class="form-control"
                                                                value="{$internal_discharge_data.visitdate}" readonly />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <th class="wds12">التشخيص</th>
                                                        <td colspan="3">
                                                            <textarea class="form-control" rows="2" readonly
                                                                placeholder="التشخيص">{$internal_discharge_data.diagnosis}
                                                        </textarea>
                                                        </td>
                                                    </tr>
                                                </table>
                                                <div class="clearfix"></div>
                                                <hr>
                                                <table>
                                                    <tr>
                                                        <th class="wds12">الطبيب المعالج</th>
                                                        <td colspan="3">
                                                            <input type="text" class="form-control" readonly
                                                                value="{$internal_discharge_data.docName}" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <th> تاريخ الخروج </th>
                                                        <td colspan="3">
                                                            <input type="text"
                                                                class="form-control datepicker updateElement"
                                                                data-colName="discharge_date"
                                                                value="{$internal_discharge_data.discharge_date}"
                                                                data-tableName="internal_patient_discharge"
                                                                data-id="{$internal_discharge_data.id}" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <th class="wds12">التوصية</th>
                                                        <td colspan="3">
                                                            <textarea class="form-control updateElement" rows="2"
                                                                placeholder="التوصية" data-colName="recommendation"
                                                                data-id="{$internal_discharge_data.id}"
                                                                data-tableName="internal_patient_discharge">{$internal_discharge_data.recommendation}
                                                        </textarea>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="wds12">موجه إلى</td>
                                                        <td colspan="3">
                                                            <select
                                                                class="form-control slctWAdd internal_report_to updateElement allupdateselect"
                                                                id="internal_report_to"
                                                                data-val="{$internal_discharge_data.internal_report_to}"
                                                                name="internal_report_to"
                                                                select-tableName="internal_report_to"
                                                                data-colName="internal_report_to"
                                                                data-id="{$internal_discharge_data.id}"
                                                                data-tableName="internal_patient_discharge">
                                                                <option value="">اختر</option>
                                                                {foreach $allTo as $data}
                                                                <option value="{$data.id}" {if $data.id eq
                                                                    $internal_discharge_data.internal_report_to }
                                                                    selected {/if}>
                                                                    {$data.name}
                                                                </option>
                                                                {/foreach}
                                                                <option value="-2" class="deleteoptincompo">
                                                                    Delete</option>
                                                            </select>
                                                        </td>
                                                    </tr>
                                                </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 ##############################################################################################################--->
<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>