<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ $periksa->nmpasien }} ({{ $periksa->noregister }} - {{ $periksa->nofoto }})</title>
</head>
<body>
    @php 
        $data               = [];
        $data['keterangan'] = $periksa->keterangan;

        if (!empty($komponens)) {
            foreach ($komponens as $rows) {
                $key = trim($rows->komponen);
                if (!empty($key)) {
                    if ($key == 'keterangan') {
                    } else {
                        $data[$key] = $rows->isidata;
                    }
                }
            }
        }
    @endphp
    <table cellpadding="0" cellspacing="0" width="800" border="0">
        @if ($kopsurat == '')
            <tr>
                <td width="45" height="200">&nbsp;</td>
                <td width="173" valign="top">&nbsp;</td>
                <td width="12" valign="top">&nbsp;</td>
                <td width="165" valign="top">&nbsp;</td>
                <td width="115" valign="top">&nbsp;</td>
                <td width="12" valign="top">&nbsp;</td>
                <td width="128" valign="top">&nbsp;</td>
                <td width="254" valign="top">&nbsp;</td>
            </tr>
        @else 
            <tr>
                <td colspan="8"><img src="{!! $kopsurat !!}" width="100%" /></td>
            </tr>
        @endif
        <tr>
            <td colspan="8" align="center"><p><strong><u>HASIL PEMERIKSAAN MIKROBIOLOGI KLINIK</u></strong></p></td>
        </tr>
        <tr>
            <td valign="top" width="45">&nbsp;</td>
            <td valign="top" width="173">No. Laboratorium</td>
            <td valign="top" width="12">:</td>
            <td valign="top" width="165">{{ $periksa->nofoto }}</td>
            <td valign="top" width="115">Tanggal MRS</td>
            <td valign="top" width="12">:</td>
            <td valign="top" colspan="2">{!! $periksa->mulai !!}</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td valign="top">Nama Pasien</td>
            <td valign="top">:</td>
            <td valign="top">{{ $periksa->nmpasien }}</td>
            <td valign="top">Ruang Pengirim</td>
            <td valign="top">:</td>
            <td valign="top" colspan="2">{!! $periksa->asalpasien !!}</td>
        </tr>
        <tr>
            <td valign="top">&nbsp;</td>
            <td valign="top">Jenis Kelamin</td>
            <td valign="top">:</td>
            <td valign="top">{{ $periksa->jkpasien }}</td>
            <td valign="top">Diagnosa</td>
            <td valign="top">:</td>
            <td valign="top" colspan="2">{!! $periksa->klinis !!}</td>
        </tr>

        <tr>
            <td valign="top">&nbsp;</td>
            <td valign="top">Usia</td>
            <td valign="top">:</td>
            <td valign="top">{{ $periksa->usia }}</td>
            <td valign="top">Jenis Pemeriksaan</td>
            <td valign="top">:</td>
            <td valign="top" colspan="2">{!! $periksa->reques !!}</td>
        </tr>

        <tr>
            <td valign="top">&nbsp;</td>
            <td valign="top">Tanggal Kirim Sample</td>
            <td valign="top">:</td>
            <td valign="top">{{ $periksa->daftar }}</td>
            <td valign="top">&nbsp;</td>
            <td valign="top">&nbsp;</td>
            <td valign="top" colspan="2">&nbsp;</td>
        </tr>

        <tr>
            <td valign="top">&nbsp;</td>
            <td valign="top">Tanggal Selesai Hasil</td>
            <td valign="top">:</td>
            <td valign="top">{{ $periksa->verifikasi }}</td>
            <td valign="top">&nbsp;</td>
            <td valign="top">&nbsp;</td>
            <td valign="top" colspan="2">&nbsp;</td>
        </tr>
        <tr><td colspan="8">&nbsp;</td></tr>
        <tr>
            <td width="45">&nbsp;</td>
            <td valign="top" colspan="7" width="755">
                <h1>HASIL PEMERIKSAAN LABORATORIUM MIKROBIOLOGI KLINIK</h1>
            </td>
        </tr>
        <tr>
            <td width="45">&nbsp;</td>
            <td valign="top" colspan="7" width="755">
                @if (isset($data['vl_parameter01']) && $data['vl_parameter01'] == 'TCM-HCV VL')
                    <strong>Pemeriksaan TCM-HCV Viral Load</strong>
                @else 
                    <strong>Pemeriksaan PCR-HIV Viral Load</strong>
                @endif
                <table cellpadding="0" cellspacing="0" width="100%" border="1">
                    <tr>
                        <td align="center" width="5%"><strong>No</strong></td>
                        <td align="center" width="25%"><strong>Parameter</strong></td>
                        <td align="center" width="25%"><strong>HASIL</strong></td>
                        <td align="center" width="20%"><strong>Satuan</strong></td>
                        <td align="center" width="25%"><strong>Nilai Rujukan</strong></td>
                    </tr>
                    <tr>
                        <td align="center">1</td>
                        <td align="center">
                            @if (isset($data['vl_parameter01']))
                                {!! $data['vl_parameter01'] !!}
                            @endif
                        </td>
                        <td align="center">
                            @if (isset($data['vl_hasil01']))
                                {!! $data['vl_hasil01'] !!}
                            @endif
                        </td>
                        <td align="center">
                            @if (isset($data['vl_satuan01']))
                                {!! $data['vl_satuan01'] !!}
                            @endif
                        </td>
                        <td align="center">
                            @if (isset($data['vl_rujukan01']))
                                {!! $data['vl_rujukan01'] !!}
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td align="center">2</td>
                        <td align="center">
                            @if (isset($data['vl_parameter02']))
                                {!! $data['vl_parameter02'] !!}
                            @endif
                        </td>
                        <td align="center">
                            @if (isset($data['vl_hasil02']))
                                {!! $data['vl_hasil02'] !!}
                            @endif
                        </td>
                        <td align="center">
                            @if (isset($data['vl_satuan02']))
                                {!! $data['vl_satuan02'] !!}
                            @endif
                        </td>
                        <td align="center">
                            @if (isset($data['vl_rujukan02']))
                                {!! $data['vl_rujukan02'] !!}
                            @endif
                        </td>
                    </tr>
                </table>
                Komentar:<br />
                @if (isset($data['viralload']))
                    {!! $data['viralload'] !!}
                @endif
                @if (isset($data['keterangan']))
                    {!! $data['keterangan'] !!}
                @endif
            </td>
        </tr>
        <tr><td colspan="8">&nbsp;</td></tr>
        <tr><td colspan="8">&nbsp;</td></tr>
        <tr>
            <td width="45">&nbsp;</td>
            <td valign="top" colspan="4" align="center">ATLM</td>
            <td valign="top" colspan="3" align="center">Malang, {!! $tanggal !!}<br />Dokter Laboratorium</td>
        </tr>
        <tr>
            <td width="45">&nbsp;</td>
            <td valign="top" colspan="4" align="center">{!! $ttdanalis !!}</td>
            <td colspan="3" align="center" valign="top">{!! $tandatangan !!}</td>
        </tr>
        <tr><td colspan="8">&nbsp;</td></tr>
        <tr>
            <td width="45">&nbsp;</td>
            <td valign="top" colspan="4" align="left">{{ $periksa->nmanalis }}<br />{!! $ppds !!}</td>
            <td valign="top" colspan="3" align="center">{{ $periksa->nmdokter }}</td>
        </tr>
    </table>
</body>
</html>
