<footer class="main-footer">
    <div class="pull-right hidden-xs">
        <b>V2</b>
    </div>
    <strong>Klinik Abdul Radjak &copy; 2022</strong>
</footer>

<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
    <!-- Create the tabs -->
    <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
        <li>
            <a href="#control-sidebar-home-tab" data-toggle="tab">
                <i class="fa fa-home"></i>
            </a>
        </li>
        <li>
            <a href="#control-sidebar-settings-tab" data-toggle="tab">
                <i class="fa fa-gears"></i>
            </a>
        </li>
    </ul>
    <!-- Tab panes -->
    <div class="tab-content">
        <!-- Home tab content -->
        <div class="tab-pane" id="control-sidebar-home-tab">
            <h3 class="control-sidebar-heading">Recent Activity</h3>
            <ul class="control-sidebar-menu">
                <li>
                    <a href="javascript::;">
                        <i class="menu-icon fa fa-birthday-cake bg-red"></i>
                        <div class="menu-info">
                            <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>
                            <p>Will be 23 on April 24th</p>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="javascript::;">
                        <i class="menu-icon fa fa-user bg-yellow"></i>
                        <div class="menu-info">
                            <h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>
                            <p>New phone +1(800)555-1234</p>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="javascript::;">
                        <i class="menu-icon fa fa-envelope-o bg-light-blue"></i>
                        <div class="menu-info">
                            <h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>
                            <p>nora@example.com</p>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="javascript::;">
                        <i class="menu-icon fa fa-file-code-o bg-green"></i>
                        <div class="menu-info">
                            <h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>
                            <p>Execution time 5 seconds</p>
                        </div>
                    </a>
                </li>
            </ul>
            <!-- /.control-sidebar-menu -->

            <h3 class="control-sidebar-heading">Tasks Progress</h3>
            <ul class="control-sidebar-menu">
                <li>
                    <a href="javascript::;">
                        <h4 class="control-sidebar-subheading">
                            Custom Template Design
                            <span class="label label-danger pull-right">70%</span>
                        </h4>
                        <div class="progress progress-xxs">
                            <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="javascript::;">
                        <h4 class="control-sidebar-subheading">
                            Update Resume
                            <span class="label label-success pull-right">95%</span>
                        </h4>
                        <div class="progress progress-xxs">
                            <div class="progress-bar progress-bar-success" style="width: 95%"></div>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="javascript::;">
                        <h4 class="control-sidebar-subheading">
                            Laravel Integration
                            <span class="label label-warning pull-right">50%</span>
                        </h4>
                        <div class="progress progress-xxs">
                            <div class="progress-bar progress-bar-warning" style="width: 50%"></div>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="javascript::;">
                        <h4 class="control-sidebar-subheading">
                            Back End Framework
                            <span class="label label-primary pull-right">68%</span>
                        </h4>
                        <div class="progress progress-xxs">
                            <div class="progress-bar progress-bar-primary" style="width: 68%"></div>
                        </div>
                    </a>
                </li>
            </ul>
            <!-- /.control-sidebar-menu -->

        </div>
        <!-- /.tab-pane -->
        <!-- Stats tab content -->
        <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
        <!-- /.tab-pane -->
        <!-- Settings tab content -->
        <div class="tab-pane" id="control-sidebar-settings-tab">
            <form method="post">
                <h3 class="control-sidebar-heading">General Settings</h3>
                <div class="form-group">
                    <label class="control-sidebar-subheading">
                        Report panel usage
                        <input type="checkbox" class="pull-right" checked="checked">
                    </label>
                    <p>
                        Some information about this general settings option
                    </p>
                </div>
                <!-- /.form-group -->

                <div class="form-group">
                    <label class="control-sidebar-subheading">
                        Allow mail redirect
                        <input type="checkbox" class="pull-right" checked="checked">
                    </label>
                    <p>
                        Other sets of options are available
                    </p>
                </div>
                <!-- /.form-group -->

                <div class="form-group">
                    <label class="control-sidebar-subheading">
                        Expose author name in posts
                        <input type="checkbox" class="pull-right" checked="checked">
                    </label>
                    <p>
                        Allow the user to show his name in blog posts
                    </p>
                </div>
                <!-- /.form-group -->

                <h3 class="control-sidebar-heading">Chat Settings</h3>

                <div class="form-group">
                    <label class="control-sidebar-subheading">
                        Show me as online
                        <input type="checkbox" class="pull-right" checked="checked">
                    </label>
                </div>
                <!-- /.form-group -->

                <div class="form-group">
                    <label class="control-sidebar-subheading">
                        Turn off notifications
                        <input type="checkbox" class="pull-right">
                    </label>
                </div>
                <!-- /.form-group -->

                <div class="form-group">
                    <label class="control-sidebar-subheading">
                        Delete chat history
                        <a href="javascript::;" class="text-red pull-right">
                            <i class="fa fa-trash-o"></i>
                        </a>
                    </label>
                </div>
                <!-- /.form-group -->
            </form>
        </div>
        <!-- /.tab-pane -->
    </div>
</aside>
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed immediately after the
control sidebar -->
<div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- jQuery 2.1.4 -->
<script src="<?= base_url('vendor/'); ?>plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="<?= base_url('vendor/'); ?>bootstrap/js/bootstrap.min.js"></script>
<!-- Select2 -->
<script src="<?= base_url('vendor/'); ?>plugins/select2/select2.full.min.js"></script>
<!-- InputMask -->
<script src="<?= base_url('vendor/'); ?>plugins/input-mask/jquery.inputmask.js"></script>
<script
src="<?= base_url('vendor/'); ?>plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script
src="<?= base_url('vendor/'); ?>plugins/input-mask/jquery.inputmask.extensions.js"></script>
<!-- date-range-picker -->
<script
src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
<script
src="<?= base_url('vendor/'); ?>plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap color picker -->
<script
src="<?= base_url('vendor/'); ?>plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<!-- bootstrap time picker -->
<script
src="<?= base_url('vendor/'); ?>plugins/timepicker/bootstrap-timepicker.min.js"></script>
<!-- DataTables -->
<script
src="<?= base_url('vendor/'); ?>plugins/datatables/jquery.dataTables.min.js"></script>
<script
src="<?= base_url('vendor/'); ?>plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll 1.3.0 -->
<script
src="<?= base_url('vendor/'); ?>plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- iCheck 1.0.1 -->
<script src="<?= base_url('vendor/'); ?>plugins/iCheck/icheck.min.js"></script>
<!-- FastClick -->
<script src="<?= base_url('vendor/'); ?>plugins/fastclick/fastclick.min.js"></script>
<!-- AdminLTE App -->
<script src="<?= base_url('vendor/'); ?>dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?= base_url('vendor/'); ?>dist/js/demo.js"></script>
<!-- Page script -->
<script>

var tabLabIsActive = "<?php if(isset($tabLab)) {echo $tabLab;}else{echo '';};?>"
if (tabLabIsActive == "active") {
    $('.nav-tabs a[href="#tab_6"]').tab('show');
}

$(document).ready(function () {
    $('#alergiType').change(function () {
        var type = $(this).val();
        $.ajax({
            url: "<?php echo base_url();?>Pendaftaran/GetAlergi",
            method: "POST",
            data: {
                type: type
            },
            async: false,
            dataType: 'json',
            success: function (data) {
                var html = '';
                var i;
                for (i = 0; i < data.length; i++) {
                    html += '<option value=' + data[i].kdAlergi + '-' + data[i].nmAlergi + '>' + data[i].nmAlergi + '</option>';
                }
                //alert(html);
                $('#subAlergi').html(html);
                //document.getElementById("subAlergi").style.display = "block";

            }
        });
    });
});

$(function () {
    //Initialize Select2 Elements
    $(".select2").select2();

    //Datemask dd/mm/yyyy
    $("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"});
    //Datemask2 mm/dd/yyyy
    $("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"});
    //Money Euro
    $("[data-mask]").inputmask();

    //Date range picker
    $('#reservation').daterangepicker();
    //Date range picker with time picker
    $('#reservationtime').daterangepicker(
        {timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A'}
    );
    //Date range as a button
    $('#daterange-btn').daterangepicker({
        ranges: {
            'Today': [
                moment(), moment()
            ],
            'Yesterday': [
                moment().subtract(1, 'days'),
                moment().subtract(1, 'days')
            ],
            'Last 7 Days': [
                moment().subtract(6, 'days'),
                moment()
            ],
            'Last 30 Days': [
                moment().subtract(29, 'days'),
                moment()
            ],
            'This Month': [
                moment().startOf('month'), moment().endOf('month')
            ],
            'Last Month': [
                moment()
                    .subtract(1, 'month')
                    .startOf('month'),
                moment()
                    .subtract(1, 'month')
                    .endOf('month')
            ]
        },
        startDate: moment().subtract(29, 'days'),
        endDate: moment()
    }, function (start, end) {
        $('#reportrange span').html(
            start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')
        );
    });

    //iCheck for checkbox and radio inputs
    $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck(
        {checkboxClass: 'icheckbox_minimal-blue', radioClass: 'iradio_minimal-blue'}
    );
    //Red color scheme for iCheck
    $('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck(
        {checkboxClass: 'icheckbox_minimal-red', radioClass: 'iradio_minimal-red'}
    );
    //Flat red color scheme for iCheck
    $('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck(
        {checkboxClass: 'icheckbox_flat-green', radioClass: 'iradio_flat-green'}
    );

    //Colorpicker
    $(".my-colorpicker1").colorpicker();
    //color picker with addon
    $(".my-colorpicker2").colorpicker();

    //Timepicker
    $(".timepicker").timepicker({showInputs: false});
});
</script>
<!-- page script -->
<script>
$(function () {
    $("#example1").DataTable();
    $("#example3").DataTable();
    $('#example2').DataTable({
        "paging": true,
        "lengthChange": false,
        "searching": false,
        "ordering": true,
        "info": true,
        "autoWidth": false
    });
});
</script>
<!-- CK Editor -->
<script src="https://cdn.ckeditor.com/4.4.3/standard/ckeditor.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script>
$(function () {
    // Replace the <textarea id="editor1"> with a CKEditor instance, using default
    // configuration.
    CKEDITOR.replace('editor1');
    CKEDITOR.replace('editor2');
    CKEDITOR.replace('editor3');
    CKEDITOR.replace('editor4');
    CKEDITOR.replace('editor5');
    CKEDITOR.replace('editor6');
    //bootstrap WYSIHTML5 - text editor
    $(".textarea").wysihtml5();
});
</script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js"></script>
<script>
$('.teanganData').selectpicker();
</script>
<script src="<?= base_url('aset/alert/sweetalert2.all.min.js'); ?>"></script>
<script>
<?php if ($this->session->flashdata("success")) { ?>
var isi =
<?php echo json_encode($this->session->flashdata("success")) ?>; Swal.fire({ title: 'Berhasil', text: isi, icon: 'success' })
<?php } ?>

<?php if ($this->session->flashdata("error")) { ?>
var isi =
<?php echo json_encode($this->session->flashdata("error")) ?>; Swal.fire({ title: 'Ooops', text: isi, icon: 'error' })
<?php } ?>

function searchpatientcancel() { var id = $("#case_id").val(); $.ajax({ type:
"GET", url: "<?= base_url('pasien/searchpatient') ?>",
    data: { case_id: id }, success: function(s) { var data = JSON.parse(s); if (data
    != null) { $("#mr_id").val(data.PatientCode);
    $("#nama_pasien").val(data.Description); $("#tanggal_masuk").val(data['Intake
    Date']); $("#status").val(data['Case Status']);
    $("#kategori").val(data.Category); $("#no_sep").val(data.NoSEP);
    $("#note").val(data.Note); $('#btncancel').removeAttr("disabled"); } else {
    window.alert('Pasien Tidak Ditemukan!'); } } }); }
</script>

<script>
$('#txtCariDiagnosa').on('click', function () {
    $('#ModalCariDiagnosa').modal('show');
});

function ListDiagnosa(cari) {
    $.ajax({
        type: 'POST',
        url: '<?= base_url('Pendaftaran/DaftarDiagnosa') ?>',
        async: true,
        dataType: 'json',
        data: {
            cari: cari
        },
        success: function (data) {
            var html = '';
            var i;
            for (i = 0; i < data.length; i++) {
                html += '<tr><td>' + data[i].ICD_CODE + '</td><td>' + data[i].DESCRPTION + '</td><td><b' +
                        'utton class="btn btn-primary btn-pilih-pasien-diagnosa" data-kodediagnosa="' +
                        data[i].ICD_CODE + '" data-namadiagnosa="' + data[i].DESCRPTION + '">Pilih</but' +
                        'ton></td></tr>';
            }
            $('#ListDiagnosa').html(html);
        }

    });
}

$('#ListDiagnosa').on('click', '.btn-pilih-pasien-diagnosa', function () {
    var Kodediagnosa = $(this).data('kodediagnosa');
    var namaDiagnosa = $(this).data('namadiagnosa');
    $('#txtCariIdDiagnosa').val(Kodediagnosa);
    $('#txtCariDiagnosa').val(namaDiagnosa);
    $('#ModalCariDiagnosa').modal('hide');
});

$('#btnFilter').on('click', function () {
    var cari = $("#textCariDiagnosa").val();
    if (cari != '') {
        ListDiagnosa(cari);
    } else {
        Swal.fire('Gagal Filter', 'Form Diagnosa Tidak Boleh Kosong!', 'error');
    }
});
</script>

<script>
$('#txtCariDiagnosa13').on('click', function () {
    $('#ModalCariDiagnosa13').modal('show');
});

function ListDiagnosa13(cari) {
    $.ajax({
        type: 'POST',
        url: '<?= base_url('Pendaftaran/DaftarDiagnosa1') ?>',
        async: true,
        dataType: 'json',
        data: {
            cari: cari
        },
        success: function (data) {
            var html = '';
            var i;
            for (i = 0; i < data.length; i++) {
                html += '<tr><td>' + data[i].ICD_CODE + '</td><td>' + data[i].DESCRPTION + '</td><td><b' +
                        'utton class="btn btn-primary btn-pilih-pasien-diagnosa13" data-kodediagnosa="' +
                        data[i].ICD_CODE + '" data-namadiagnosa="' + data[i].DESCRPTION + '">Pilih</but' +
                        'ton></td></tr>';
            }
            $('#ListDiagnosa13').html(html);
        }

    });
}

$('#ListDiagnosa13').on('click', '.btn-pilih-pasien-diagnosa13', function () {
    var kodeDiagnosa = $(this).data('kodediagnosa');
    var namaDiagnosa = $(this).data('namadiagnosa');
    $('#txtCariIdDiagnosa13').val(kodeDiagnosa);
    $('#txtCariDiagnosa13').val(namaDiagnosa);
    $('#ModalCariDiagnosa13').modal('hide');
});

$('#btnFilter13').on('click', function () {
    var cari = $("#textCariDiagnosa13").val();
    if (cari != '') {
        ListDiagnosa13(cari);
    } else {
        Swal.fire('Gagal Filter', 'Form Diagnosa Tidak Boleh Kosong!', 'error');
    }
});
</script>
<script>
$('#txtCariTindakan').on('click', function () {
    $('#ModalCariTindakan').modal('show');
});

function ListTindakan(cari, category) {
    $.ajax({
        type: 'POST',
        url: '<?= base_url('Transaction/DaftarTindakan') ?>',
        async: true,
        dataType: 'json',
        data: {
            cari: cari,
            category: category
        },
        success: function (data) {
            var html = '';
            var i;
            for (i = 0; i < data.length; i++) {
                html += '<tr><td>' + data[i].ProcedureCode + '</td><td>' + data[i].Description + '</td>' +
                        '<td>' + data[i].Price + '</td><td>' + data[i].COA + '</td><td><button class="b' +
                        'tn btn-primary btn-pilih-pasien-tindakan" data-kodetindakan="' + data[i].ProcedureCode +
                        '" data-namatindakan="' + data[i].Description + '" data-harga="' + data[i].Price +
                        '" data-kdcoa="' + data[i].COA + '">Pilih</button></td></tr>';
            }
            $('#ListTindakan').html(html);
        }

    });
}

$('#ListTindakan').on('click', '.btn-pilih-pasien-tindakan', function () {
    var ProcedureCode = $(this).data('kodetindakan');
    var Description = $(this).data('namatindakan');
    var Price = $(this).data('harga');
    var COA = $(this).data('kdcoa');
    $('#txtKodeTindakan').val(ProcedureCode);
    $('#txtCariTindakan').val(Description);
    $('#txtHarga').val(Price);
    $('#txtHargaa').val(Price);
    $('#txtCoa').val(COA);
    $('#ModalCariTindakan').modal('hide');
});

$('#textCaritindakan').keyup(function () {
    var cari = $("#textCaritindakan").val();
    var category = $("#textCategory").val();
    if (cari != '') {
        ListTindakan(cari, category);
    } else {
        Swal.fire('Gagal Filter', 'Form Diagnosa Tidak Boleh Kosong!', 'error');
    }
});
</script>

<script>
$('#txtCariDiagnosa1').on('click', function () {
    $('#ModalCariDiagnosa1').modal('show');
    //ListDiagnosa1();
});

function ListDiagnosa1(cari) {
    $.ajax({
        type: 'POST',
        url: '<?= base_url('Pendaftaran/DaftarDiagnosa1') ?>',
        async: true,
        dataType: 'json',
        data: {
            cari: cari
        },
        success: function (data) {
            var html = '';
            var i;
            for (i = 0; i < data.length; i++) {
                html += '<tr><td>' + data[i].ICD_CODE + '</td><td>' + data[i].DESCRPTION + '</td><td><b' +
                        'utton class="btn btn-primary btn-pilih-pasien-diagnosa" data-kdDiagnosa="' +
                        data[i].ICD_CODE + '" data-namadiagnosa="' + data[i].DESCRPTION + '">Pilih</but' +
                        'ton></td></tr>';
            }
            $('#ListDiagnosa1').html(html);
        }

    });
}

$('#ListDiagnosa1').on('click', '.btn-pilih-pasien-diagnosa', function () {
    var Kodediagnosa = $(this).data('kodediagnosa');
    var namaDiagnosa = $(this).data('namadiagnosa');
    $('#txtCariIdDiagnosa1').val(Kodediagnosa);
    $('#txtCariDiagnosa1').val(namaDiagnosa);
    $('#ModalCariDiagnosa1').modal('hide');
});

$('#btnFilter1').on('click', function () {
    var cari = $("#textCariDiagnosa1").val();
    if (cari != '') {
        ListDiagnosa1(cari);
    } else {
        Swal.fire('Gagal Filter', 'Form Diagnosa Tidak Boleh Kosong!', 'error');
    }
});
</script>

<script>
$('#txtCariDiagnosa2').on('click', function () {
    $('#ModalCariDiagnosa2').modal('show');
    ListDiagnosa2();
});

function ListDiagnosa2(cari) {
    $.ajax({
        type: 'POST',
        url: '<?= base_url(' Pendaftaran / PelayananDiagnosa2 ') ?>',
        async: true,
        dataType: 'json',
        data: {
            cari: cari
        },
        success: function (data) {
            var html = '';
            var i;
            for (i = 0; i < data.length; i++) {
                html += '<tr><td>' + data[i].ICD_CODE + '</td><td>' + data[i].DESCRPTION + '</td><td><b' +
                        'utton class="btn btn-primary btn-pilih-pasien-diagnosa" data-kdDiagnosa="' +
                        data[i].ICD_CODE + '" data-namadiagnosa="' + data[i].DESCRPTION + '">Pilih</but' +
                        'ton></td></tr>';
            }
            $('#ListDiagnosa2').html(html);
        }

    });
}

$('#ListDiagnosa2').on('click', '.btn-pilih-pasien-diagnosa', function () {
    var namaDiagnosa = $(this).data('namadiagnosa');
    var kdiagnosa = $(this).data('kdDiagnosa');
    $('#txtCariIdDiagnosa2').val(kdiagnosa);
    $('#txtCariDiagnosa2').val(namaDiagnosa);
    $('#ModalCariDiagnosa2').modal('hide');
});

$('#textCariDiagnosa2').keyup(function () {
    var cari = $(this).val();
    if (cari != '') {
        ListDiagnosa2(cari);
    } else {
        ListDiagnosa2();
    }
});
</script>

<script>
$('#txtCariDiagnosa3').on('click', function () {
    $('#ModalCariDiagnosa3').modal('show');
    ListDiagnosa3();
});

function ListDiagnosa3(cari) {
    $.ajax({
        type: 'POST',
        url: '<?= base_url(' Pendaftaran / PelayananDiagnosa3 ') ?>',
        async: true,
        dataType: 'json',
        data: {
            cari: cari
        },
        success: function (data) {
            var html = '';
            var i;
            for (i = 0; i < data.length; i++) {
                html += '<tr><td>' + data[i].ICD_CODE + '</td><td>' + data[i].DESCRPTION + '</td><td><b' +
                        'utton class="btn btn-primary btn-pilih-pasien-diagnosa" data-kdDiagnosa="' +
                        data[i].ICD_CODE + '" data-namadiagnosa="' + data[i].DESCRPTION + '">Pilih</but' +
                        'ton></td></tr>';
            }
            $('#ListDiagnosa3').html(html);
        }

    });
}

$('#ListDiagnosa3').on('click', '.btn-pilih-pasien-diagnosa', function () {
    var namaDiagnosa = $(this).data('namadiagnosa');
    var kdiagnosa = $(this).data('kdDiagnosa');
    $('#txtCariIdDiagnosa3').val(kdiagnosa);
    $('#txtCariDiagnosa3').val(namaDiagnosa);
    $('#ModalCariDiagnosa3').modal('hide');
});

$('#textCariDiagnosa3').keyup(function () {
    var cari = $(this).val();
    if (cari != '') {
        ListDiagnosa3(cari);
    } else {
        ListDiagnosa3();
    }
});
</script>

<!-- FOR E-SIGN -->
<script
type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script
type="text/javascript"
src="<?= base_url('template/'); ?>e-sign/js/jquery.signature.min.js"></script>
<script
type="text/javascript"
src="<?= base_url('template/'); ?>e-sign/js/jquery.ui.touch-punch.min.js"></script>
<script type="text/javascript">
// sign1
var sig = $('#sig').signature({syncField: '#signature64', syncFormat: 'PNG'});
$('#clear').click(function (e) {
    e.preventDefault();
    sig.signature('clear');
    $("#signature64").val('');
});

// sign2
var sig2 = $('#sig2').signature(
    {syncField: '#signature64_2', syncFormat: 'PNG'}
);
$('#clear_2').click(function (e) {
    e.preventDefault();
    sig2.signature('clear');
    $("#signature64_2").val('');
});

// sign3
var sig3 = $('#sig3').signature(
    {syncField: '#signature64_3', syncFormat: 'PNG'}
);
$('#clear_3').click(function (e) {
    e.preventDefault();
    sig3.signature('clear');
    $("#signature64_3").val('');
});

// sign4
var sig4 = $('#sig4').signature(
    {syncField: '#signature64_4', syncFormat: 'PNG'}
);
$('#clear_4').click(function (e) {
    e.preventDefault();
    sig4.signature('clear');
    $("#signature64_4").val('');
});

// sign5
var sig5 = $('#sig5').signature(
    {syncField: '#signature64_5', syncFormat: 'PNG'}
);
$('#clear_5').click(function (e) {
    e.preventDefault();
    sig5.signature('clear');
    $("#signature64_5").val('');
});

$('#patien_code').focus();

function justNumber(evt) {
    var ASCIICode = (evt.which)
        ? evt.which
        : evt.keyCode
    if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57)) 
        return false;
    return true;
}
</script>
<!-- END FOR E-SIGN -->

</body>

</html>