<!-- 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">Consent</label>
                                            <div class="col-md-12">
                                                <textarea class="form-control" name="consent" rows="3"
                                                          placeholder="Consent" required="required">{$template_data->consent}</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">Preparation</label>
                                            <div class="col-md-12">
                                                <textarea class="form-control" name="preparation" rows="3"
                                                          placeholder="Preparation" required="required">{$template_data->preparation}</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">Instrument</label>
                                            <div class="col-md-12">
                                                <input type="text" class="form-control" name="instrument"
                                                       placeholder="Instrument" required="required" value="{$template_data->instrument}">
                                            </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">
                                                <input type="text" class="form-control" name="anesthesia"
                                                       placeholder="Anesthesia" required="required" value="{$template_data->anesthesia}">
                                            </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">Preparation</label>
                                            <div class="col-md-12">
                                                <textarea class="form-control" name="preparation_2" rows="3"
                                                          placeholder="Preparation" required="required">{$template_data->preparation_2}</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">Withdrawal time</label>
                                            <div class="col-md-12">
                                                <input type="text" class="form-control" name="withdrawal_time"
                                                       placeholder="Withdrawal time" required="required" value="{$template_data->withdrawal_time}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">DRE</label>
                                            <div class="col-md-12">
                                                <input type="text" class="form-control" name="dre"
                                                       placeholder="DRE" required="required" value="{$template_data->dre}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px;">
                                        <div class="form-group">
                                            <label class="col-md-12 control-label txtl">Findings</label>
                                            <div class="col-md-12">
                                                <textarea class="form-control" name="findings" rows="3"
                                                          placeholder="Findings" required="required">{$template_data->findings}</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">PLan</label>
                                            <div class="col-md-12">
                                                <textarea class="form-control" name="plan" rows="3"
                                                          placeholder="Plan" required="required">{$template_data->plan}</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">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 -->