148 lines
6.7 KiB
PHP
148 lines
6.7 KiB
PHP
@extends('Frontend.layouts.main')
|
|
|
|
@section('content-wrapper')
|
|
<div class="container-fluid p-0 m-0 my-5">
|
|
<h3 class="text-center mb-5 text-custom">Hasil Diagnosa</h3>
|
|
<div class="card border shadow-lg bg-white rounded-3 mb-3">
|
|
<div class="card-header fw-bold text-white border-0" style="background-color: #4888db;">
|
|
Hasil Konsultasi
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="container-fluid p-0 m-0 my-5 print-area">
|
|
{{-- Detail Pengunjung --}}
|
|
<div class="container-fluid">
|
|
<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>
|
|
<tbody>
|
|
<tr>
|
|
<td>Nama Pengunjung</td>
|
|
<td>{{ $dataDiagnosa['nama'] }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Alamat</td>
|
|
<td>{{ $dataDiagnosa['alamat'] }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{{-- Gejala yang dialami --}}
|
|
<div class="container-fluid">
|
|
<h6 class="text-custom">*) Gejala yang dialami</h6>
|
|
<table class="table table-bordered " style="width: 100%">
|
|
<colgroup>
|
|
<col span="1" style="width: 3%;">
|
|
<col span="1" style="width: 12%;">
|
|
<col span="1" style="width: 85%;">
|
|
</colgroup>
|
|
<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>
|
|
</div>
|
|
|
|
{{-- Detail Penyakit --}}
|
|
<div class="container-fluid">
|
|
<h6 class="text-custom">*) Detail Penyakit</h6>
|
|
<table class="table table-bordered " style="width: 100%">
|
|
<colgroup>
|
|
<col span="1" style="width: 15%;">
|
|
<col span="1" style="width: 5%;">
|
|
<col span="1" style="width: 80%;">
|
|
</colgroup>
|
|
<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>Deskripsi Penyakit</td>
|
|
<td class="text-center">:</td>
|
|
<td>{{ $hasilDiagnosa->Nama_Penyakit->deskripsi }}</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>
|
|
</div>
|
|
|
|
{{-- Solusi Penyakit --}}
|
|
<div class="container-fluid">
|
|
<h6 class="text-custom">*) 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>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer"></div>
|
|
</div>
|
|
<a href="{{ route('diagnosa.cetak', $dataDiagnosa['id_hasil']) }}" target="_blank" class="btn btn-success mb-3">
|
|
<i class="fa-solid fa-print me-1"></i> Cetak Diagnosa
|
|
</a>
|
|
{{-- <a href="#" onclick="window.print()" class="btn btn-success mb-3 no-print">
|
|
<i class="fa-solid fa-print me-1"></i> Cetak Diagnosa
|
|
</a> --}}
|
|
<a href="{{ URL::to('diagnosa') }}" class="btn no-print">
|
|
<i class="fa-solid fa-arrow-left me-1"></i> Kembali ke Halaman Diagnosa
|
|
</a>
|
|
</div>
|
|
|
|
<style>
|
|
@media print {
|
|
body * {
|
|
visibility: hidden;
|
|
}
|
|
.print-area, .print-area * {
|
|
visibility: visible;
|
|
}
|
|
.print-area {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
}
|
|
.btn, .card-footer, a, nav, .navbar, .sidebar {
|
|
display: none !important;
|
|
}
|
|
}
|
|
</style>
|
|
@endsection |