<!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>
    <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">
                @php 
                    $lsg_selepitel              = '';
                    $lsg_selradang              = '';
                    $lsg_mikroorganisme         = '';
                    $lsg_mikroorganismeoptional = '';
                    $lsg_pewarnaanziehlnielsen  = '';
                    $lsg_pewarnaankoh           = '';
                    $lsg_pewarnaanneisser       = '';
                    $lsg_pewarnaannegatif       = '';
                    $lsg_pewarnaangiesma        = '';
                    $lsg_pewarnaanspora         = '';
                    $lsg_pewarnaanlain          = '';
                    $lsg_ditemukanmorfologi     = '';
                    $keterangan                 = $periksa->keterangan;
                    if (!empty($komponens)){
                        foreach($komponens as $rows){
                            if (trim($rows->komponen) == 'lsg_selepitel') {$lsg_selepitel = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_selradang') {$lsg_selradang = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_mikroorganisme') {$lsg_mikroorganisme = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_mikroorganismeoptional') {$lsg_mikroorganismeoptional = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_pewarnaanziehlnielsen') {$lsg_pewarnaanziehlnielsen = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_pewarnaankoh') {$lsg_pewarnaankoh = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_pewarnaanneisser') {$lsg_pewarnaanneisser = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_pewarnaannegatif') {$lsg_pewarnaannegatif = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_pewarnaangiesma') {$lsg_pewarnaangiesma = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_pewarnaanspora') {$lsg_pewarnaanspora = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_pewarnaanlain') {$lsg_pewarnaanlain = $rows->isidata; }
                            if (trim($rows->komponen) == 'lsg_ditemukanmorfologi') {$lsg_ditemukanmorfologi = $rows->isidata; }
                        }
                    }
                @endphp
                <table style="width:100%">
                    <tr><td colspan="3">Pewarnaan Gram :</td></tr>
                    <tr>
                        <td valign="top" style="width:20%">Sel epithel</td>
                        <td valign="top" style="width:5%">:</td>
                        <td valign="top" style="width:75%">{!! $lsg_selepitel !!}</td>
                    </tr>
                    <tr>
                        <td valign="top">Sel radang</td>
                        <td valign="top">:</td>
                        <td valign="top">{!! $lsg_selradang !!}</td>
                    </tr>
                    <tr>
                        <td valign="top">Mikroorganisme</td>
                        <td valign="top">:</td>
                        <td valign="top">
                            {!! $lsg_mikroorganisme !!}
                            @if ($lsg_mikroorganismeoptional != '')
                                <br /> {!! $lsg_mikroorganismeoptional !!}
                            @endif
                        </td>
                    </tr>
                    @if (isset($data['lsg_pewarnaanziehlnielsen']))
                    <tr><td colspan="3">&nbsp;</td></tr>
                    <tr>
                        <td valign="top">Pewarnaan Ziehl Neelsen</td>
                        <td valign="top">:</td>
                        <td valign="top">{!! $lsg_pewarnaanziehlnielsen !!}</td>
                    </tr>
                    @endif
                    @if (isset($data['lsg_pewarnaankoh']))
                    <tr><td colspan="3">&nbsp;</td></tr>
                    <tr>
                        <td valign="top">Pewarnaan KOH</td>
                        <td valign="top">:</td>
                        <td valign="top">{!! $lsg_pewarnaankoh !!}</td>
                    </tr>
                    @endif
                    @if (isset($data['lsg_pewarnaanneisser']))
                    <tr><td colspan="3">&nbsp;</td></tr>
                    <tr>
                        <td valign="top">Pewarnaan Neisser</td>
                        <td valign="top">:</td>
                        <td valign="top">{!! $lsg_pewarnaanneisser !!}</td>
                    </tr>
                    @endif
                    @if (isset($data['lsg_pewarnaannegatif']))
                    <tr><td colspan="3">&nbsp;</td></tr>
                    <tr>
                        <td valign="top">Pewarnaan Negatif</td>
                        <td valign="top">:</td>
                        <td valign="top">{!! $lsg_pewarnaannegatif !!}</td>
                    </tr>
                    @endif
                    @if (isset($data['lsg_pewarnaangiesma']))
                    <tr><td colspan="3">&nbsp;</td></tr>
                    <tr>
                        <td valign="top">Pewarnaan Giemsa</td>
                        <td valign="top">:</td>
                        <td valign="top">{!! $lsg_pewarnaangiesma !!}</td>
                    </tr>
                    @endif
                    @if (isset($data['lsg_pewarnaanspora']))
                    <tr><td colspan="3">&nbsp;</td></tr>
                    <tr>
                        <td valign="top">Pewarnaan Spora</td>
                        <td valign="top">:</td>
                        <td valign="top">{!! $lsg_pewarnaanspora !!}</td>
                    </tr>
                    @endif
                    @if (isset($data['lsg_pewarnaanlain']))
                    <tr><td colspan="3">&nbsp;</td></tr>
                    <tr>
                        <td valign="top">Pewarnaan Lain-lain</td>
                        <td valign="top">:</td>
                        <td valign="top">{!! $lsg_pewarnaanlain !!}</td>
                    </tr>
                    @endif
                    @if (isset($data['lsg_ditemukanmorfologi']))
                    <tr>
                        <td valign="top">Ditemukan morfologi</td>
                        <td valign="top">:</td>
                        <td valign="top">{!! $lsg_ditemukanmorfologi !!}</td>
                    </tr>
                    @endif
                </table>
                @if ($keterangan != '')
                    Komentar: <br /> {!! $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">&nbsp;</td>
            <td valign="top" colspan="3" align="center">RSUD dr. Saiful Anwar <br />Dokter PJ Pemeriksaan Lab</td>
        </tr>
        <tr>
            <td width="45">&nbsp;</td>
            <td valign="top" colspan="4" align="center">&nbsp;</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 }}</td>
            <td valign="top" colspan="3" align="center">{{ $periksa->nmdokter }}</td>
        </tr>
    </table>
</body>
</html>
