&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label style='font-size:12px;font-weight:bold; text-align:center'><?= $abdulradjak['NamaPerusahaan']; ?></label>
<p style="margin-top: 0px; text-align:center;"><?= $abdulradjak['AlamatPerusahaan']; ?></p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label style="text-align:center;">Telp. <?= $abdulradjak['TeleponPerusahaan']; ?>, Fax : <?= $abdulradjak['FaxPerusahaan']; ?></label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label style="text-align:center;">Whatsapp <?= $abdulradjak['Whatsapp']; ?></label>
<hr>
<?php
date_default_timezone_set("Asia/Jakarta");
$tgll = date('Y-m-d', strtotime(@$id['TTL']));
$tanggal_lahir = new DateTime($tgll);
$sekarang = new DateTime("today");
if ($tanggal_lahir > $sekarang) {
    $thn = "0";
    $bln = "0";
    $tgl = "0";
}
$thn = $sekarang->diff($tanggal_lahir)->y;
$bln = $sekarang->diff($tanggal_lahir)->m;
$tgl = $sekarang->diff($tanggal_lahir)->d;

$c = $id['CompanyCode'];
$com = $this->db->query("SELECT * FROM Company WHERE CompanyCode = '$c'")->row_array();
$case = $id['ID'];
$idS = $this->uri->segment(3);
$dList = $this->db->query("SELECT Description,Qty,AA.[Dosis] FROM [Activity Drugs] AA, Pharmacy PC WHERE AA.[DrugsID]=PC.PharmacyCode AND [TransactionID] = '$idS'")->result_array();
?>
<table border="0" style="border-collapse: collapse; width:100mm; margin-right:30%;">
    <tr>
        <td  style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Case ID / No.MR</td>
        <td  style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp; </td>
        <td  style='font-size:10px'><?= $id['ID']; ?> / <?= $id['MR']; ?></td>
    </tr>
    <tr>
        <td  style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Nama</td>
        <td  style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp; </td>
        <td  style='font-size:10px'><?= $id['Nama']; ?></td>
    </tr>
    <tr>
    <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Tanggal Lahir/Umur</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= date('d-m-Y', strtotime($id['TTL'])); ?> / <?= $thn . ' thn '; ?></td>
    </tr>
    <tr>
        <td  style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Tanggal Kunjungan</td>
        <td  style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp; </td>
        <td  style='font-size:10px'><?= date('d-m-Y', strtotime($id['Kunjungan'])); ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Dokter</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp; </td>
        <td style='font-size:10px'><?= $id['Dokter']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Penjamin</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $com['CompanyName']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Diagnosa</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpreksa['DESCRPTION']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Berat Badan</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpemeriksaan['BeratBadan']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Tinggi Badan</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpemeriksaan['TinggiBadan']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;RespRate</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpemeriksaan['respRate']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Suhu</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpemeriksaan['Suhu']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Tensi</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpemeriksaan['Tensi']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Diastole</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpemeriksaan['Diastole']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;HeartRate</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpemeriksaan['heartRate']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Keluhan</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpemeriksaan['Keluhan']; ?></td>
    </tr>
    <tr>
        <td style='font-size:10px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;Poli</td>
        <td style='font-size:10px'>&nbsp;:&nbsp;&nbsp;&nbsp;</td>
        <td style='font-size:10px'><?= $hasilpemeriksaan['Unit']; ?> </td>
    </tr>
</table>
<hr>
<table border="0" style="border-collapse: collapse;">
    <tr>
        <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nama Obat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
        <th>&nbsp;&nbsp;Qty&nbsp;&nbsp;&nbsp;</th>
        <th>Dosis</th>
        <!-- <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Catatan</th> -->
    </tr>
    <?php
    foreach ($dList as $data) :
    ?>
        <tr>
            <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label style="font-size:7pt"><?= $data['Description']; ?></label> </td>
            <td align="center"><label style="font-size:7pt"><?= $data['Qty']; ?></label></td>
            <td align="center"><label style="font-size:7pt"><?= $data['Dosis']; ?></label></td>
        </tr>
    <?php
    endforeach;
    ?>
</table>
<br>
<table align="center" border="1" style="border-collapse:collapse;">
<tr>
    <th  style='font-size:9px;text-align:center;'>ASPEK TELAAH</th>
    <th style="width: 20%;font-size:9px;text-align:center;">Telaah 1</th>
    <th style="width: 20%;font-size:9px;text-align:center;">Telaah 2</th>
</tr>
<tr>
    <td style='font-size:9px'>Benar Nama Paien</td>
    <td style='font-size:9px'></td>
    <td style='font-size:9px'></td>
</tr>
<tr>
    <td style='font-size:9px'>Benar Obat</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td style='font-size:9px'>Benar Dosis Obat</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td style='font-size:9px'>Benar Cara Pemberian</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td style='font-size:9px'>Benar Waktu Pemberian</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td style='font-size:9px'>Benar Informasi Obat</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td style='font-size:9px'>Benar Dokumentasi</td>
    <td></td>
    <td></td>
</tr>
</table>
<br>
<table align="center" border="1" style="border-collapse:collapse;">
<tr>
    <th  style='font-size:9px;text-align:center;' colspan="3">EDUKASI</th>
</tr>
<tr>
    <th  style='font-size:9px;text-align:center;'>MATERI</th>
    <th style="width: 20%;font-size:9px;text-align:center">TTD</th>
    <th style="width: 20%;font-size:9px;text-align:center">TTD</th>
</tr>
<tr>
    <td style='font-size:9px'>Cara Pakai Obat</td>
    <td style='font-size:9px'></td>
    <td style='font-size:9px'></td>
</tr>
<tr>
    <td style='font-size:9px'>Kadaluarsa</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td style='font-size:9px'>Peringatan</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td style='font-size:9px'>Penyimpanan Obat</td>
    <td></td>
    <td></td>
</tr>
</table>
<br>
<table align="center" border="1"  style="border-collapse:collapse; width:100mm">
    <tr>
        <td style='font-size:11px'>Petugas</td>
        <td style='font-size:11px'>Pasien</td>
    </tr>
    <tr style="height:1100px">
        <td><br><br><br><br>...............................</td>
        <td><br><br><br><br>...............................</td>
    </tr>
    <tr>
        <td colspan="2"><small><i>**cetak <?= date('d-m-Y H:i:s'); ?></i></small></td>
    </tr>
</table>