<style>
        .tdDetail {
        border-bottom: 0.5px dotted gray;
        padding: 8px;
    }

      .ttd {
            width: 100%;
            margin-top: 20px;
        }

        .ttd td {
            vertical-align: top;
            text-align: center;
            font-size: 11pt;
        }
</style>
<table style="width: 100%; font-size:10pt;">
    <tr>
        <td align="center" style="width: 30%;"><img src="<?= FCPATH . 'images/logoYayasan.png'; ?>"
                style="width: 100px;"> <br><b><?= strtoupper($utama['NamaPerusahaan']); ?></b></td>
        <td style="width: 20%;"></td>
        <td style="width: 50%;">
            <table style="font-size:9pt;width: 100%;">
                <tr>
                    <td style="width: 30%;">Nomor RM</td>
                    <td style="width: 5%;">:</td>
                    <td style="width: 65%;"><?= $mcu['PatientCode']; ?></td>
                </tr>
                <tr>
                    <td style="width: 30%;">Nama</td>
                    <td style="width: 5%;">:</td>
                    <td style="width: 65%;"><?= $mcu['Description']; ?></td>
                </tr>
                <?php
                // tanggal lahir
                $dob = date('Y-m-d', strtotime($mcu['DOB']));
                $tanggal = new DateTime($dob);

                // tanggal hari ini
                $today = new DateTime('today');

                // tahun
                $y = $today->diff($tanggal)->y;

                // bulan
                $m = $today->diff($tanggal)->m;

                // hari
                $d = $today->diff($tanggal)->d;
                ?>
                <tr>
                    <td style="width: 30%;">Tanggal Lahir</td>
                    <td style="width: 5%;">:</td>
                    <td style="width: 65%;"><?= date('d F Y', strtotime($mcu['DOB'])) . ' (' . $y . ' Thn)'; ?>
                    </td>
                </tr>
                <?php
                if ($mcu['Sex'] == 1) {
                    $jk = "Perempuan";
                } else {
                    $jk = "Laki-laki";
                }
                ?>
                <tr>
                    <td style="width: 30%;">Jenis Kelamin</td>
                    <td style="width: 5%;">:</td>
                    <td style="width: 65%;"><?= $jk; ?></td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<hr>
<div style="margin-top: 30px; text-align: center; font-weight: bold;">MCU <?= strtoupper($utama['NamaPerusahaan']); ?></div>
<br>
<table style="margin-top: 7px; width: 100%;">

    <tr>
        <td style="width:25%">Tanggal Pemeriksaan</td>
        <td style="width:5%">:</td>
        <td style="width:70%"><?= date('d F Y', strtotime($listDetail['Intake Date'])); ?></td>
    </tr>
    <tr>
        <td style="width:25%">Nama</td>
        <td style="width:5%">:</td>
        <td style="width:70%"><?= $listDetail['Description']; ?></td>
    </tr>
    <tr>
        <td style="width:25%">No KTP</td>
        <td style="width:5%">:</td>
        <td style="width:70%"><?= $mcu['NIK']; ?></td>
    </tr>
    <tr>
        <td style="width:25%">Alamat</td>
        <td style="width:5%">:</td>
        <td style="width:70%"><?= $mcu['HomeAddress1']; ?></td>
    </tr>
    <tr>
        <td style="width:25%">No. Hp</td>
        <td style="width:5%">:</td>
        <td style="width:70%"><?= $mcu['CellPhone']; ?></td>
    </tr>
    <tr>
        <td style="width:25%">Riwayat Kesehatan Sebelum</td>
        <td style="width:5%">:</td>
        <td style="width:70%"><?= $listDetail['RiwayatSebelum']; ?></td>
    </tr>
</table>
  <hr class="tdDetail">
<table class="table table-bordered table-striped table-condensed">
    <tbody>
        <tr valign="top">
            <td style="width: 35%;">Suhu</td>
            <td style="width: 5%;">:</td>
            <td><span id="suhu"><?= $listDetail['Suhu']; ?> C</span></td>
        </tr>
        <tr valign="top">
            <td>Tekanan Darah</td>
            <td>:</td>
            <td><span id="td"><?= $listDetail['Tensi'] .'/'. $listDetail['Diastole']; ?> mmHg</span></td>
        </tr>
        <tr valign="top">
            <td>Nafas</td>
            <td>:</td>
            <td><span id="nafas"><?= $listDetail['respRate']; ?> x/mnt</span></td>
        </tr>
        <tr valign="top">
            <td>Nadi</td>
            <td>:</td>
            <td><span id="nadi"><?= $listDetail['heartRate']; ?> x/mnt</span></td>
        </tr>
        <tr valign="top">
            <td>Tinggi Badan</td>
            <td>:</td>
            <td><span id="bb"><?= $listDetail['TinggiBadan']; ?> cm</span></td>
        </tr>
        <tr valign="top">
            <td>Berat Badan</td>
            <td>:</td>
            <td><span id="bb"><?= $listDetail['BeratBadan']; ?> kg</span></td>
        </tr>
        <tr valign="top">
            <td>Lingkar Perut</td>
            <td>:</td>
            <td><span id="bb"><?= $listDetail['lingkarperut']; ?> cm</span></td>
        </tr>
        <tr valign="top">
            <td>BMI</td>
            <td>:</td>
            <td><span id="bb"><?= $listDetail['bmi']; ?></span></td>
        </tr>
        <tr valign="top">
            <td>Buta Warna</td>
            <td>:</td>
            <td><span id="bb"><?= $listDetail['ButaWarna']; ?></span></td>
        </tr>
        <tr valign="top">
            <td>Riwayat Kesehatan</td>
            <td>:</td>
            <td><span id="bb"><?= $listDetail['RiwayatSekarang']; ?></span></td>
        </tr>
    </tbody>
</table>
<br><br><br><br><br><br><br>
<table style="width:100%;">
    <tr>
        <td style="width:60%;"></td>
        <td style="width:40%; text-align:right; padding-right:60px;">
            Jakarta, <?= date('d-M-Y'); ?><br>
            Pemeriksa, <br><br><br><br><br>

            ( <?= $id['Dokter']; ?> )
        </td>
    </tr>
</table>
