<?php
$id = $this->uri->segment(3);
$erm = $this->db->query("Select * from CaseDetail where [Case ID] = $id")->row_array();
?>
<table style="margin-top: -7px; width: 100%;">
    <tr>
        <td style="margin-top: -10px; width: 20%;"><img src="<?= base_url('images/logo.png'); ?>" width="70" height="50"></td>
        <td style="margin-top: -10px; width: 80%; text-align:center;">
            <b style='font-size:18px;'><?= $abdulradjak['NamaPerusahaan']; ?></b><br>
            <?= $abdulradjak['AlamatPerusahaan']; ?><br>
            <small>Telp. <?= $abdulradjak['TeleponPerusahaan']; ?>, Fax : <?= $abdulradjak['FaxPerusahaan']; ?></small>
        </td>
    </tr>
</table>
<hr>
<h3 style="text-align: center;"><u>FORM ASESMENT ANASTESI </u></h3>
<table class="table table-striped table-hover" id="example1" style="border-collapse: collapse; width:100%;">
<tr>
    <td>Nama</td>
    <td>:</td>
    <td><?= $data['Description']; ?></td>
    <td>Mr</td>
    <td>:</td>
    <td><?= $data['PatientCode']; ?></td>
    <td>Tanggal Lahir</td>
    <td>:</td>
    <td><?= date('d-m-Y', strtotime($data['DOB'])); ?></td>
</tr>
<tr>
    <td>Tanggal</td>
    <td>:</td>
    <td><?= $data['Tanggal']; ?> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; Tinggi : <?= $erm['TinggiBadan']; ?></td>
    <td>Diagnosa Prabedah</td>
    <td>:</td>
    <td><?= $data['Diagnosa']; ?></td>
</tr>
<tr>
    <td>Jam</td>
    <td>:</td>
    <td><?= date('H:i', strtotime($data['Jam'])); ?>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Berat : <?= $erm['BeratBadan']; ?> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; Suhu : <?= $erm['Suhu']; ?>C</td>
    <td>Rencana Oprasi</td>
    <td>:</td>
    <td><?= $data['Rencanaop']; ?></td>
</tr>
</table>
<hr>
<table class="table table-striped table-hover" border="1" id="example1" style="width: 50%;" align="center">
<tr>
    <td colspan="3" style="text-align: center;"><b>Riwayat Medis</b></td>
    <td colspan="3" style="text-align: center;"><b>Problem Saat Ini</b></td>
</tr>
<tr>
    <td>Medikasi</td>
    <td>:</td>
    <td><?= $data['Medikasi']; ?></td>

    <td>Kardiovaskular</td>
    <td>:</td>
    <td><?= $data['Kardiovaskular']; ?></td>
</tr>
<tr>
    <td>Alergi</td>
    <td>:</td>
    <td><?= $data['Alergi']; ?></td>

    <td>Pernafasan</td>
    <td>:</td>
    <td><?= $data['pernafasan']; ?></td>
</tr>
<tr>
    <td>Pemakaian obat-obatan</td>
    <td>:</td>
    <td><?= $data['Obatobatan']; ?></td>

    <td>Diabetes</td>
    <td>:</td>
    <td><?= $data['diabetes']; ?></td>
</tr>
<tr>
    <td>Perokok</td>
    <td>:</td>
    <td><?= $data['Perokok']; ?></td>

    <td>Neurologis</td>
    <td>:</td>
    <td><?= $data['neurologis']; ?></td>
</tr>
<tr>
    <td>Riwayat Anastesi</td>
    <td>:</td>
    <td><?= $data['tgl1']; ?> Tgl <?= $data['tgl2']; ?></td>

    <td>Artritis/otot & rangka</td>
    <td>:</td>
    <td><?= $data['artritis']; ?></td>
</tr>
<tr>
    <td colspan="2"></td>
    <td><?= $data['tgl3']; ?> Tgl <?= $data['tgl4']; ?></td>

    <td>Ginjal</td>
    <td>:</td>
    <td><?= $data['ginjal']; ?></td>
</tr>
<tr>
    <td>Keluarga</td>
    <td>:</td>
    <td><?= $data['Keluarga']; ?></td>

    <td>Lainya</td>
    <td>:</td>
    <td><?= $data['lainya1']; ?></td>
</tr>
<tr>
    <td>Makan Minum Terakhir</td>
    <td>:</td>
    <td colspan="4"><?= $data['Makan']; ?></td>
</tr>
<tr>
    <td colspan="3" style="text-align: center;"><b>Pemeriksaan Fisik</b></td>
    <td>RR</td>
    <td>:</td>
    <td>x/menit</td>
</tr>
<tr>
    <td>TD</td>
    <td>:</td>
    <td>mmHg <?= $data['td']; ?>  N: <?= $data['n']; ?></td>

    <td>Ekstremitas</td>
    <td>:</td>
    <td><?= $data['Ekstremitas']; ?></td>
</tr>
<tr>
    <td>Jantung</td>
    <td>:</td>
    <td><?= $data['jantung']; ?></td>

    <td>Neurologis</td>
    <td>:</td>
    <td><?= $data['neurologis']; ?><</td>
</tr>
<tr>
    <td>Paru</td>
    <td>:</td>
    <td><?= $data['paru']; ?></td>

    <td>Lain-Lain</td>
    <td>:</td>
    <td><?= $data['lainya2']; ?></td>
</tr>
<tr>
    <td>Jalan Nafas</td>
    <td>:</td>
    <td colspan="4"><?= $data['nafas']; ?></td>
</tr>
<tr>
    <td colspan="6" style="text-align: center;"><b>Dosis</b></td>
</tr>
<tr>
    <td colspan="2" style="text-align: center;">Dosis</td>
    <td colspan="2" style="text-align: center;">Jenis Anastesi</td>
    <td colspan="2" style="text-align: center;">Cara Pemakaian</td>
</tr>
<tr>
    <td colspan="2" style="text-align: center;"><?= $data['dosis']; ?></td>
    <td colspan="2" style="text-align: center;"><?= $data['jenisanastesi']; ?></td>
    <td colspan="2" style="text-align: center;"><?= $data['carapemakaian']; ?></td>
</tr>
<tr>
    <td style="text-align: center;" colspan="6"><b>Penunjang</b></td>
</tr>
<tr>
    <td>EKG</td>
    <td>:</td>
    <td colspan="4"><?= $data['ekg']; ?></td>
</tr>
<tr>
    <td>X-Foto</td>
    <td>:</td>
    <td colspan="4"><?= $data['xfoto']; ?></td>
</tr>
<tr>
    <td>Lain-Lain</td>
    <td>:</td>
    <td colspan="4"><?= $data['lainya3']; ?></td>
</tr>
<tr>
    <td>Monitor Invasive</td>
    <td>:</td>
    <td><?= $data['invasive']; ?></td>

    <td colspan="3" style="text-align: center;">Dokter</td>
</tr>
<tr>
    <td>Tehnik Khusus</td>
    <td>:</td>
    <td><?= $data['tehnik']; ?></td>

    <td rowspan="4" colspan="3" > <center><img width="176" height="147" src="<?= base_url('images/uploadsign/anastesi/' . $data['tandatangan_1']); ?>" alt=""></center></td>
</tr>
<tr>
    <td>Klasifikasi ASA</td>
    <td>:</td>
    <td><?= $data['asa']; ?></td>
</tr>
<tr>
    <td>Rencana</td>
    <td>:</td>
    <td><?= $data['rencana']; ?></td>
</tr>
</table>
<script>
        window.onload = function() {
            window.print();
            setTimeout(window.close, 500);
        };
</script>
<!-- <label for=""><small style="aligen-text:right;"><i>**cetak <?= date('d-m-Y H:i:s'); ?></i></small></label> -->