<?php
  $caseID = $this->uri->segment(3);
  $cekid = $this->db->query("select* from erm_monitoringbedah where case_id = '$caseID'")->row_array();
?>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            Form Monitoring Anastesi dan Bedah 
            <?php
                if($cekid > 0 ){
            ?>
            - <a href="<?= base_url('Form/cetakmonitoringbedah/'.$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/Simpanmonitoringbedah/' .$this->uri->segment(3)); ?>" method="post">
                <b>1. Pre Anestesi</b><br><br>
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Gcs</label>
                            <input type="text" class="form-control" name="Gcs" placeholder="Gcs ...">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>TD</label>
                            <input type="text" class="form-control" name="Td" placeholder="TD ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>N</label>
                            <input type="text" class="form-control" name="N" placeholder="N ...">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>RR</label>
                            <input type="text" class="form-control" name="RR" placeholder="RR ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Tax</label>
                            <input type="text" class="form-control" name="Tax" placeholder="TAX ...">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Nyeri</label>
                            <input type="text" class="form-control" name="Nyeri" placeholder="NYERI ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Lain - Lain</label>
                           <textarea class="form-control" name="Lain2" placeholder="Lain-lain..."></textarea>
                        </div>
                    </div>
                </div>
                <b>2. Durante Anestesi</b><br><br>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                           <textarea class="form-control" name="Tindakan" placeholder="Durante Anestesi..."></textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label for="">Jenis Pemberian Anastesi</label>
                           <input type="text" name="jenisanastesi" class="form-control" placeholder="Jenis Anastesi..">
                        </div>
                    </div>
                </div>
                <b>3. Post Anestesi</b><br><br>
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Gcs</label>
                            <input type="text" class="form-control" name="Gcsp" placeholder="Gcs ...">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>TD</label>
                            <input type="text" class="form-control" name="Tdp" placeholder="TD ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>N</label>
                            <input type="text" class="form-control" name="Np" placeholder="N ...">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>RR</label>
                            <input type="text" class="form-control" name="RRp" placeholder="RR ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Tax</label>
                            <input type="text" class="form-control" name="Taxp" placeholder="TAX ...">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Nyeri</label>
                            <input type="text" class="form-control" name="Nyerip" placeholder="NYERI ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Gcs</label>
                            <input type="text" class="form-control" name="Gcs" placeholder="Gcs ...">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>TD</label>
                            <input type="text" class="form-control" name="Td" placeholder="TD ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>N</label>
                            <input type="text" class="form-control" name="N" placeholder="N ...">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>RR</label>
                            <input type="text" class="form-control" name="RR" placeholder="RR ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Tax</label>
                            <input type="text" class="form-control" name="Tax" placeholder="TAX ...">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Nyeri</label>
                            <input type="text" class="form-control" name="Nyeri" placeholder="NYERI ...">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Lain - Lain</label>
                           <textarea class="form-control" name="Lainlain" placeholder="Lain-lain..."></textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Pre Pembedahan</label>
                           <textarea class="form-control" name="Tindakan1" placeholder="Description.."></textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Durante Pembedahan</label>
                           <textarea class="form-control" name="Tindakan2" placeholder="Description.."></textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Post Pembedahan</label>
                           <textarea class="form-control" name="Tindakan3" placeholder="Description..."></textarea>
                        </div>
                    </div>
                </div>

                            <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><br><br>
                                </td>
                                </tr>
                                <tr>
                                    <td>
                                    <?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 } ?>
                                    </td>
                                </tr>
                            </table><br><br>
                </form>
            </div>
        </div>
    </section>
</div>