<?php
$caseID = $this->uri->segment(3);
$cekid = $this->db->query("select* from erm_ssc 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/cetakssc/' . $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>
                            SSC Poli Umum
                        </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/Prosessimpanssc/' . $this->uri->segment(3)); ?>" method="post">
                    <p style="text-align: center;"><b>SIGN IN (Sebelum Anestesi)</b></p>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="from-group">
                                <label for="">Perawat</label>
                                <input type="text" name="perawat" class="form-control" value="" placeholder="Perawat">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="from-group">
                                <label for="">Dokter</label>
                                <input type="text" name="dokter" class="form-control" value="" placeholder="Dokter">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="from-group">
                                <label for="">Prosedur Oprasi</label>
                                <input type="text" name="prosedureop" class="form-control" value="" placeholder="Prosedur Oprasi">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label>Konfirmasi/Verifikasi</label><br>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="verif" class="flat-red" style="position: absolute; opacity: 0;" value="Identitas Pasien"> Identitas Pasien</td>
                                        <td><input type="checkbox" id="" name="verif" class="flat-red" style="position: absolute; opacity: 0;" value="Nama Oprasi"> Nama Oprasi</td>
                                        <td><input type="checkbox" id="" name="verif" class="flat-red" style="position: absolute; opacity: 0;" value="Lokasi Oprasi"> Lokasi Oprasi</td>
                                        <td><input type="checkbox" id="" name="verif" class="flat-red" style="position: absolute; opacity: 0;" value="Informed Consent"> Informed Consent</td>
                                        <td><input type="checkbox" id="" name="verif" class="flat-red" style="position: absolute; opacity: 0;" value="Diagnosa"> Diagnosa</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label>Menandai daerah operasi</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="tandaoprasi" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya</td>
                                        <td><input type="checkbox" id="" name="tandaoprasi" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak Perlu"> Tidak Perlu</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label>Apakah anestesi, alat kesehatan steril, BMHP (Bahan Medis Habis Pakai) telah tersedia lengkap</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="bmhptersedia" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="">Apakah pasien memiliki Riwayat asma</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="riwayat" class="flat-red" style="position: absolute; opacity: 0;" value="Ada"> Ada, terakhir kambuh <input type="date" name="kambuh" value="">
                                            &nbsp;&nbsp;<input type="checkbox" id="" name="riwayat" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak Ada"> Tidak Ada</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="">Apakah memiliki risiko kesulitan jalan napas</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="riwayatjalaan" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya, dan alat/bantuan sudah tersedia &nbsp;&nbsp;<input type="checkbox" id="" name="riwayatjalaan" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak Ada"> Tidak Ada</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="">Riwayat Alergi</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="riwayatalergi" class="flat-red" style="position: absolute; opacity: 0;" value="Ada"> Ada, jenis <input type="text" name="jenisalergi" placeholder="Jenis Alergi"> &nbsp;&nbsp;<input type="checkbox" id="" name="riwayatalergi" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak Ada"> Tidak Ada</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="">Risiko kehilangan darah >500 cc (7cc/kg BB pada anak)
                                </label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="resiko" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya, IV akses memadai/cairan direncanakan
                                            &nbsp;&nbsp;<input type="checkbox" id="" name="resiko" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak Ada"> Jam diberikan</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="">Rencana Pemasangan Implant
                                </label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="implan" class="flat-red" style="position: absolute; opacity: 0;" value="Ada"> Ada <input type="text" name="keteranganimplan" value="" placeholder="Keterangan">
                                            &nbsp;&nbsp;<input type="checkbox" id="" name="implan" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak Ada"> Tidak ada</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Tanggal</label>
                                <input type="date" class="form-control" name="tgl" value="">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Jam Verifikasi</label>
                                <input type="time" class="form-control" name="time" value="">
                            </div>
                        </div>
                    </div>
                    <hr>
                    <p style="text-align: center;"><b>TIME OUT (sebelum Incisi Kulit)</b></p>
                    <hr>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="">Kelengkapan Tim Operasi
                                </label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="tim" class="flat-red" style="position: absolute; opacity: 0;" value="Lengkap"> Lengkap
                                            &nbsp;&nbsp;<input type="checkbox" id="" name="tim" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak lengkap"> Tidak lengkap <input type="text" name="keterangantidaklengkap" value="" placeholder="Keterangantimop"> </td>
                                        <td><input type="checkbox" id="" name="tim" class="flat-red" style="position: absolute; opacity: 0;" value="Menyebutkan nama dan peran tim opserai"> Menyebutkan nama dan peran tim opserai</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label>Membacakan secara verbal</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="membacakan" class="flat-red" style="position: absolute; opacity: 0;" value="Tanggal operasi"> Tanggal operasi</td>
                                        <td><input type="checkbox" id="" name="membacakan" class="flat-red" style="position: absolute; opacity: 0;" value="Nama lengkap dan tanggal lahir pasien"> Nama lengkap dan tanggal lahir pasien</td>
                                        <td><input type="checkbox" id="" name="membacakan" class="flat-red" style="position: absolute; opacity: 0;" value="Prosedur operasi dan diagnosa"> Prosedur operasi dan diagnosa</td>
                                        <td><input type="checkbox" id="" name="membacakan" class="flat-red" style="position: absolute; opacity: 0;" value="Posisi pasien"> Posisi pasien</td>
                                        <td><input type="checkbox" id="" name="membacakan" class="flat-red" style="position: absolute; opacity: 0;" value="Informed consent"> Informed consent</td>
                                        <td><input type="checkbox" id="" name="membacakan" class="flat-red" style="position: absolute; opacity: 0;" value="Lokasi operasi"> Lokasi operasi</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label>Mengantisipasi peristiwa kritis Dokter</label>
                                <table style="width:100%">
                                    <tr>
                                        <td>Apakah tindakan yang dilakukan berisiko tinggi ?</td>
                                        <td><input type="checkbox" id="" name="resikotinggi" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya</td>
                                        <td><input type="checkbox" id="" name="resikotinggi" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak"> Tidak</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Berapa lama tindakan ini akan dilakukan? </label>
                                <select name="berapajam" id="" class="form-control">
                                    <option value="">-- Pilih --</option>
                                    <?php for ($x = 1; $x <= 24; $x++) { ?>
                                        <option value="<?= $x; ?> Jam"><?= $x; ?> Jam</option>
                                    <?php } ?>
                                </select>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Apakah sudah diantisipasi pendarahan ?</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="antisipasidarah" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya</td>
                                        <td><input type="checkbox" id="" name="antisipasidarah" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak"> Tidak</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Pasien ASA berapa</label>
                                <input type="text" name="asa" class="form-control" value="">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Apakah ada perhatian/kekhawatiran pada pasien ini ?</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="perhatian" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya</td>
                                        <td><input type="checkbox" id="" name="perhatian" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak"> Tidak</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Apakah ada peralatan yang perlu disediakan (darah)? </label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="peralatan" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya</td>
                                        <td><input type="checkbox" id="" name="peralatan" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak"> Tidak</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Apakah sudah mengecek sterilisasi alat ?</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="seteril" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya</td>
                                        <td><input type="checkbox" id="" name="seteril" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak"> Tidak</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="">Apakah ada kesiapan alat yang harus diperhatikan ?</label>
                                <input type="text" name="kesiapanalat" class="form-control" placeholder="Ya/Tidak (Jika Ya Sebutkan)">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Foto radiologi yang penting sudah dipasang ? </label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="fotorad" class="flat-red" style="position: absolute; opacity: 0;" value="Dipasang"> Dipasang</td>
                                        <td><input type="checkbox" id="" name="fotorad" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak Dipasang"> Tidak Dipasang</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Antibiotik profilaksis sudah diberikan 1 jam sebelumnya ?</label>
                                <input type="text" class="form-control" name="antibiotik" placeholder="Ya/Tidak (Jika Ya Sebutkan Jenis..)">
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="">Hal yang harus diperhatikan </label>
                                <input type="text" class="form-control" name="halygperluperhatikan" placeholder="Hal yang perlu diperhatikan">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Jenis Anastesi</label>
                                <input type="text" class="form-control" name="jenisanastesi" placeholder="Jenis Anastesi..">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Dosis</label>
                                <input type="text" class="form-control" name="dosis" placeholder="Dosis..">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                    <div class="col-md-12">
                            <div class="form-group">
                                <label for="">Cara Pemakaian </label>
                                <textarea name="carapemakaian" id="" class="form-control" placeholder="Cara Pemakaian.."></textarea>
                            </div>
                        </div>
                    </div>
                    <p style="text-align: center;"><b>TIME OUT (sebelum Incisi Kulit)</b></p>
                    <hr>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Secara verbal perawat memastikan</label>
                                <label for="">Nama Tindakan</label>
                                <input type="text" name="perawatanverbal" value="" class="form-control">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Kelengkapan alat</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="kelengkapan" class="flat-red" style="position: absolute; opacity: 0;" value="Instrumen"> Instrumen</td>
                                        <td><input type="checkbox" id="" name="kelengkapan" class="flat-red" style="position: absolute; opacity: 0;" value="Kassa"> Kassa</td>
                                        <td><input type="checkbox" id="" name="kelengkapan" class="flat-red" style="position: absolute; opacity: 0;" value="Jarum"> Jarum</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Pelabelan specimen (baca specimen dan nama pasien dengan keras) ? </label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="bacaspecimen" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya</td>
                                        <td><input type="checkbox" id="" name="bacaspecimen" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak"> Tidak</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">Apakah ada masalah peralatan yang perlu disampaikan untuk Dokter ?</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="masalahalat" class="flat-red" style="position: absolute; opacity: 0;" value="Ya"> Ya</td>
                                        <td><input type="checkbox" id="" name="masalahalat" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak"> Tidak</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>THROAT PACK</label>
                                <input type="text" class="form-control" name="throat" placeholder="Ada/Tidak (Jika Ada Sebutkan Jenis..)">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="">JARINGAN ATAU CAIRAN TUBUH ?</label>
                                <table style="width:100%">
                                    <tr>
                                        <td><input type="checkbox" id="" name="cairantubuh" class="flat-red" style="position: absolute; opacity: 0;" value="Ada Jaringan"> Ada Jaringan / Cairan Tubuh</td>
                                        <td><input type="checkbox" id="" name="cairantubuh" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak"> Sudah Di Berikan Identitas</td>
                                        <td><input type="checkbox" id="" name="cairantubuh" class="flat-red" style="position: absolute; opacity: 0;" value="Tidak Ada"> Tidak Ada Jaringan</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="from-group">
                                <label for="">KETERANGAN</label>
                                <textarea name="keterangan" class="form-control" id="" placeholder="Keterangan"></textarea>
                            </div>
                        </div>
                    </div>
                    <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>