<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-->
        <h3 class="page-title">
            {$shcontrollname}
        </h3>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <div class="portlet light bg-inverse">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="icon-plus font-red-sunglo"></i>
                            <span class="caption-subject font-red-sunglo bold uppercase">Add New In  {$shcontrollname}</span>
                        </div>
                        <div class="actions">
                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=show&patientid={$patientId}" data-container="body" data-placement="top"
                               data-original-title="{$smarty.const.ad_lang_back_btn}" class="btn btn-sm blue tooltips">
                                <i class="fa fa-list"></i>Back </a>
                        </div>
                    </div>
                    <div class="portlet-body form">
                        <!-- BEGIN FORM-->
                        <form action="{$hosturl}/controllers/{$controllname}.php?ac=add" method="post" class="form-horizontal awval"
                              enctype="multipart/form-data">
                            <div class="form-body">
                                <div class="alert alert-danger display-hide">
                                    <button class="close" data-close="alert"></button>
                                    {$smarty.const.ad_lang_message_error}
                                </div>
                                <div class="alert alert-success display-hide">
                                    <button class="close" data-close="alert"></button>
                                    {$smarty.const.ad_lang_message_success}
                                </div>

                                <div class="row">

                                    <div class="col-md-12">
                                        <table class="table">
                                            <tr>
                                                <th>Patient name</th>
                                                <th>ID</th>
                                                <th>Age</th>
                                                <th>Sex</th>
                                                <th>Exam date</th>
                                                <th>Referral</th>
                                            </tr>
                                            <tr>
                                                <td>{$patientInfo->wifename}</td>
                                                <td>{$patientInfo->statusno}</td>
                                                <td>{$new_age_calc}</td>
                                                <td>-</td>
                                                <td><input type="text" class="form-control datepicker" required="required" value="{'today'|date_format:'Y/m/d'}" name="exam_date" readonly/></td>
                                                <td>{$refer_doctor->name}</td>
                                            </tr>
                                        </table>
                                    </div>

                                    <input type="hidden" name="patient_id" value="{$patientId}">

                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Indication</label>
                                            <div class="col-md-12">
                                                <input type="text" class="form-control" name="indication"
                                                       placeholder="Indication" required="required" value="{$template_data->indication}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Anesthesia</label>
                                            <div class="col-md-12">
                                                <textarea class="form-control" name="anesthesia" rows="3"
                                                          placeholder="Anesthesia" required="required">{$template_data->anesthesia}</textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Procedure</label>
                                            <div class="col-md-12">
                                                <textarea class="form-control" name="procedure" rows="3"
                                                          placeholder="Procedure" required="required">{$template_data->procedure}</textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">esophagus</label>
                                            <div class="col-md-12">
                                                <input type="text" class="form-control" name="esophagus"
                                                       placeholder="Esophagus" required="required" value="{$template_data->esophagus}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Cardio Esophageal Junction</label>
                                            <div class="col-md-12">
                                                <input type="text" class="form-control" name="cardio_esophageal_junction"
                                                       placeholder="Cardio Esophageal Junction" required="required" value="{$template_data->cardio_esophageal_junction}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Stomach</label>
                                            <div class="col-md-12">
                                                <textarea class="form-control" name="stomach" rows="3"
                                                          placeholder="Stomach" required="required">{$template_data->stomach}</textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Pylorus</label>
                                            <div class="col-md-12">
                                                <textarea class="form-control" name="pylorus" rows="3"
                                                          placeholder="Pylorus" required="required">{$template_data->pylorus}</textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Duodenum</label>
                                            <div class="col-md-12">
                                                <input type="text" class="form-control" name="duodenum"
                                                       placeholder="Duodenum" required="required" value="{$template_data->duodenum}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Conclusion</label>
                                            <div class="col-md-12">
                                                <input type="text" class="form-control" name="conclusion"
                                                       placeholder="Conclusion"  value="{$template_data->conclusion}">
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Signature</label>
                                            <div class="col-md-12">
                                                <input type="text" class="form-control" name="signature"
                                                       placeholder="Signature" required="required" value="">
                                            </div>
                                        </div>
                                    </div>

                                </div>
                            </div>

                            <div class="form-actions">
                                <div class="row">
                                    <div class="col-md-offset-3 col-md-4">
                                        <button type="submit" class="btn green">Save</button>
                                        <button type="button" class="btn default rtn-show-patient" data-patient-id="{$patientId}" data-control="{$controllname}">Cancel</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <!-- END FORM-->
                    </div>
                </div>
            </div>
        </div>
        <!-- END PAGE CONTENT-->
    </div>
</div>
<!-- END CONTENT -->