<?php
  $caseID = $this->uri->segment(3);
  $cekid = $this->db->query("select* from erm_asesmentoprasi where case_id = '$caseID'")->row_array();
?>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            Form Asesment PraBedah
            <?php
                if($cekid > 0 ){
            ?>
            - <a href="<?= base_url('Form/cetakasesmentbedah/'.$this->uri->segment(3)) ?>" target="_blank" class="btn btn-primary"><i class="fa fa-print"></i> Cetak </a><br>
            <?php }else{ ?>
            
            <?php } ?>
        </h1>
        <ol class="breadcrumb">
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">


        <div class="card" style="padding: 15px; background-color: white;border-radius: 5px;">
            <div class="card-body">
                <div class="row text-center">
                    <div class="col-md-2"></div>
                    <div class="col-md-2">
                        <img src="<?= base_url('images/logo.png'); ?>" height="80px">
                    </div>
                    <div class="col-md-6">
                        <h4 style="font-weight: bold;">
                            <?= $unit['NamaPerusahaan']; ?><br>
                            ASESMENT PRA BEDAH
                        </h4>
                    </div>
                    <div class="col-md-2"></div>
                </div>
                <div class="row text-center">
                    <div class="col-md-2"></div>
                    <div class="col-md-8">
                        <hr>
                    </div>
                    <div class="col-md-2"></div>
                </div>
                <div class="row text-center">
                    <div class="col-md-2"></div>
                    <div class="col-md-8">
                        <h4 style="font-weight: bolder;">

                        </h4>
                    </div>
                    <div class="col-md-2"></div>
                </div>
                <form action="<?= base_url('Form/prosesAsesmentPrabedah/' .$this->uri->segment(3)); ?>" method="post">
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Jam</label>
                            <input type="text" class="form-control timepicker" name="jam" placeholder="Jam ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Data Subjektif</label>
                            <textarea name="subjektif" id="" class="form-control" placeholder="Data Subjektif .."></textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Data Objektif</label>
                            <textarea name="objektif" id="" class="form-control" placeholder="Data Subjektif .."></textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Estimasi Waktu yang di butuhkan</label>
                            <select name="estimasi" id="" class="form-control">
                                <option>-- Pilih Waktu --</option>
                                <option value="1 Jam">1 Jam</option>
                                <option value="2 Jam">2 Jam</option>
                                <option value="3 Jam">3 Jam</option>
                                <option value="4 Jam">4 Jam</option>
                                <option value="5 Jam">5 Jam</option>
                                <option value="6 Jam">6 Jam</option>
                                <option value="7 Jam">7 Jam</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Rencana Operasi</label>
                            <textarea name="rencanaoprasi" id="" class="form-control" placeholder="Data Subjektif .."></textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label for="">Tandai Pada bagian tubuh menggunakan balpoin untuk hasil setelah di cetak*</label>
                            <img src="<?= base_url('images/manekin.jpg'); ?>">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Atau Deskripsikan secara singkat</label>
                            <textarea name="deskripsi" id="" class="form-control" placeholder="Data Subjektif .."></textarea>
                        </div>
                    </div>
                </div>
                <table>
                    <tr>
                        <td colspan="3" style="text-align: center;">

                            <table width="100%">
                                <tr>
                                    <td width="50%" align="center">
                                        Petugas Yang Membuat * <br><br>
                                        <div class="form-group">
                                            <div id="sig3"></div>
                                            <textarea id="signature64_3" required name="TtdYangMenyatakan" style="display: none"></textarea>
                                        </div>
                                        <input type="text" required placeholder="nama jelas" name="ttd1" class="form-control" style="margin-bottom: 5px;width: 80%">
                                        <button style="width: 80%" class="btn btn-danger btn-block" id="clear_3">Reset</button>
                                    </td>
                                    <td width="60%">
                                        Pasien/Keluarga :<br> <br>
                                        <table width="100%">
                                            <tr>
                                                <td width="50%" align="center">
                                                    <div class="form-group">
                                                        <div id="sig5"></div>
                                                        <textarea id="signature64_5" required name="TtdSaksi2" style="display: none"></textarea>
                                                    </div>
                                                    <input type="text" required placeholder="nama jelas" name="ttd2" class="form-control" style="margin-bottom: 5px; width: 80%;">
                                                    <button class="btn btn-danger btn-block" id="clear_5" style="width: 80%;">Reset</button>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <br>
                <div class="row">
                    <div class="col-md-12">
                    <?php
                        if($cekid > 0 ){
                    ?>
                     <button type="submit" class="btn btn-sm btn-danger" style="width: 100%;" disabled>Data Sudah Di Input</button> 
                    <?php }else{ ?>
                        <button onclick="return confirm('Apakah pengisian sudah benar?')" type="submit" class="btn btn-sm btn-primary" style="width: 100%;">Simpan</button>                 
                    <?php } ?>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </section>
</div>