98 lines
3.3 KiB
PHP
98 lines
3.3 KiB
PHP
{{-- filepath: resources/views/Frontend/pages/cetakdiagnosa.blade.php --}}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Cetak Diagnosa</title>
|
|
<link rel="stylesheet" href="{{ URL::to('vendor/bootstrap5/css/bootstrap.min.css') }}">
|
|
<style>
|
|
@media print {
|
|
body { background: #fff; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container my-4">
|
|
<h3 class="text-center mb-4">Hasil Diagnosa</h3>
|
|
|
|
<h6 class="text-custom">*) Detail Pengunjung</h6>
|
|
<table class="table table-bordered" style="width: 100%">
|
|
|
|
<colgroup>
|
|
<col span="1" style="width: 15%;">
|
|
<col span="1" style="width: 85%;">
|
|
</colgroup>
|
|
<tr>
|
|
<td>Nama Pengunjung</td>
|
|
<td>{{ $dataDiagnosa['nama'] }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Alamat</td>
|
|
<td>{{ $dataDiagnosa['alamat'] }}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h6 class="text-custom mt-4">*) Gejala yang dialami</h6>
|
|
<table class="table table-bordered" style="width: 100%">
|
|
<thead>
|
|
<tr class="text-center">
|
|
<th>No.</th>
|
|
<th>Kode Gejala.</th>
|
|
<th>Nama Gejala.</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@php $i = 1; @endphp
|
|
@foreach ($hasilDiagnosa->Gejala_Penyakit as $gejalaYangDipilih)
|
|
<tr>
|
|
<td class="text-center">{{ $i }}</td>
|
|
<td class="text-center">{{ $gejalaYangDipilih->kode_gejala }}</td>
|
|
<td>{{ $gejalaYangDipilih->nama_gejala }}</td>
|
|
</tr>
|
|
@php $i++; @endphp
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
<h6 class="text-custom mt-4">*) Detail Penyakit</h6>
|
|
<table class="table table-bordered" style="width: 100%">
|
|
<tr>
|
|
<td>
|
|
@php
|
|
$kode = $hasilDiagnosa->Nama_Penyakit->kode_penyakit ?? '';
|
|
@endphp
|
|
@if($kode >= 'P014' && $kode <= 'P024')
|
|
Nama Hama
|
|
@else
|
|
Nama Penyakit
|
|
@endif
|
|
</td>
|
|
<td class="text-center">:</td>
|
|
<td class="fw-bold">
|
|
{{ $hasilDiagnosa->Nama_Penyakit->nama_penyakit }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Nilai Kepercayaan</td>
|
|
<td class="text-center">:</td>
|
|
<td>{!! '<b>' . $hasilDiagnosa->Persentase_Penyakit . '</b>' . ' / (' . $hasilDiagnosa->Nilai_Belief_Penyakit . ')' !!}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h6 class="text-custom mt-4">*) Solusi Penyakit</h6>
|
|
<table class="table table-bordered" style="width: 100%">
|
|
<tbody>
|
|
@foreach (json_decode($hasilDiagnosa->Solusi_Penyakit->solusi) as $solusi)
|
|
<tr>
|
|
<td>{{ $solusi }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<script>
|
|
window.print();
|
|
</script>
|
|
|
|
</body>
|
|
</html> |