This commit is contained in:
Duidev Software House
2025-10-30 13:09:35 +07:00
parent c0c7c1b5fd
commit 34d324c886
17 changed files with 7963 additions and 8650 deletions

No files matched your search

@@ -302,64 +302,12 @@
@php
$nomor++;
@endphp
@if (isset($data['id_bakteri01']) OR isset($data['id_bakteri02']))
@if (isset($data['id_biakankultur']))
<tr>
<td valign="top">{{$nomor}}. Biakan Kultur (Aerob / Anaerob)</td>
<td valign="top">:</td>
<td valign="top">
@if (isset($data['id_biakankultur']))
{!! $data['id_biakankultur'] !!}
@endif
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td width="20%">Bakteri I</td>
<td width="5%">:</td>
<td width="75%">
@if (isset($data['id_bakteri01']))
<i>{!! $data['id_bakteri01'] !!}</i>
@endif
@if (isset($data['id_bakterisir01']))
( {!! $data['id_bakterisir01'] !!} )
@endif
</td>
</tr>
<tr>
<td>Hitung Koloni</td>
<td>:</td>
<td>
@if (isset($data['id_bakterihitungkol01']) AND $data['id_bakterihitungkol01'] != 'lainnya')
{!! $data['id_bakterihitungkol01'] !!}
@endif
@if (isset($data['id_bakterihitungkolteks01']))
{!! $data['id_bakterihitungkolteks01'] !!}
@endif
</td>
</tr>
<tr>
<td>Bakteri II</td>
<td>:</td>
<td>
@if (isset($data['id_bakteri02']))
<i>{!! $data['id_bakteri02'] !!}</i>
@endif
@if (isset($data['id_bakterisir02']))
( {!! $data['id_bakterisir02'] !!} )
@endif
</td>
</tr>
<tr>
<td>Hitung Koloni</td>
<td>:</td>
<td>
@if (isset($data['id_bakterihitungkol02']) AND $data['id_bakterihitungkol02'] != 'lainnya')
{!! $data['id_bakterihitungkol02'] !!}
@endif
@if (isset($data['id_bakterihitungkolteks02']))
{!! $data['id_bakterihitungkolteks02'] !!}
@endif
</td>
</tr>
</table>
{!! $data['id_biakankultur'] !!}
</td>
</tr>
@endif
@@ -369,76 +317,104 @@
@endphp
@if (!isset($cekketerangan[1]) && isset($antibiotiks) && $antibiotiks->isNotEmpty())
@if (isset($data['bakteri']))
<p>Bakteri Yang ditemukan : <strong><i>{{$data['bakteri']}}</i></strong> {{$data['bakterisir'] ?? ''}}</p>
@endif
@php
// Filter antibiotik yang printrow == true
$filtered = $antibiotiks->filter(function($row) {
return $row->printrow;
})->values(); // reset index
$total = $filtered->count();
$half = ceil($total / 2);
$left = $filtered->slice(0, $half)->values();
$right = $filtered->slice($half)->values();
@php
// Kelompokkan antibiotik berdasarkan nama kuman
$grouped = $antibiotiks->filter(function ($row) {
return $row->printrow; // hanya yang perlu dicetak
})->groupBy('kuman');
@endphp
<table style="width:100%" border="1" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th><strong>No</strong></th>
<th><strong>Antibiotik</strong></th>
<th><strong>Value</strong></th>
<th><strong>Interpretation</strong></th>
<th>&nbsp;</th>
<th><strong>No</strong></th>
<th><strong>Antibiotik</strong></th>
<th><strong>Value</strong></th>
<th><strong>Interpretation</strong></th>
</tr>
</thead>
<tbody>
@for ($i = 0; $i < $half; $i++)
<tr>
{{-- Kolom kiri --}}
@if (isset($left[$i]))
<td>{{ $i + 1 }}</td>
<td>{{ $left[$i]->antibiotic }}</td>
@if (isset($left[$i]->printcol) && $left[$i]->printcol == 1)
<td>{{ $left[$i]->value }}</td>
@else
<td>&nbsp;</td>
@endif
<td align="center">{{ $left[$i]->interpretation }}</td>
@else
<td colspan="4">&nbsp;</td>
@endif
{{-- Loop tiap kuman --}}
@foreach ($grouped as $kuman => $items)
@php
$cetakjudul = false;
@endphp
@if (isset($data['bakteri']) AND $data['bakteri'] == $kuman)
<p>Bakteri Yang ditemukan : <strong><i>{{ $data['bakteri'] }}</i></strong> {{ $data['bakterisir'] ?? '' }}</p>
@if (isset($data['id_bakterihitungkol']))
<p>Jumlah Koloni : <strong><i>{{ $data['id_bakterihitungkol'] }}</i></strong></p>
@endif
@php
$cetakjudul = true;
@endphp
@endif
@if (isset($data['id_bakteri01']) AND $data['id_bakteri01'] == $kuman)
<p>Bakteri Yang ditemukan : <strong><i>{{ $data['id_bakteri01'] }}</i></strong> {{ $data['id_bakterisir01'] ?? '' }}</p>
@if (isset($data['id_bakterihitungkol01']))
<p>Jumlah Koloni : <strong><i>{{ $data['id_bakterihitungkol01'] }}</i></strong></p>
@endif
@php
$cetakjudul = true;
@endphp
@endif
@if (isset($data['id_bakteri02']) AND $data['id_bakteri02'] == $kuman)
<p>Bakteri Yang ditemukan : <strong><i>{{ $data['id_bakteri02'] }}</i></strong> {{ $data['id_bakterisir02'] ?? '' }}</p>
@if (isset($data['id_bakterihitungkol02']))
<p>Jumlah Koloni : <strong><i>{{ $data['id_bakterihitungkol02'] }}</i></strong></p>
@endif
@php
$cetakjudul = true;
@endphp
@endif
@php
$total = $items->count();
$half = ceil($total / 2);
$left = $items->slice(0, $half)->values();
$right = $items->slice($half)->values();
@endphp
@if ($cetakjudul)
<table style="width:100%; border-collapse: collapse;" border="1" cellpadding="3" cellspacing="0">
<thead>
<tr style="background-color: #f2f2f2;">
<th>No</th>
<th>Antibiotik</th>
<th>Value</th>
<th>Interpretation</th>
<th>&nbsp;</th>
<th>No</th>
<th>Antibiotik</th>
<th>Value</th>
<th>Interpretation</th>
</tr>
</thead>
<tbody>
@for ($i = 0; $i < $half; $i++)
<tr>
{{-- Kolom kiri --}}
@if (isset($left[$i]))
<td>{{ $i + 1 }}</td>
<td>{{ $left[$i]->antibiotic }}</td>
<td>{{ $left[$i]->printcol == 1 ? $left[$i]->value : '' }}</td>
<td align="center">{{ $left[$i]->interpretation }}</td>
@else
<td colspan="4">&nbsp;</td>
@endif
<td>&nbsp;</td> {{-- Spacer kolom tengah --}}
<td>&nbsp;</td> {{-- Pemisah tengah --}}
{{-- Kolom kanan --}}
@if (isset($right[$i]))
<td>{{ $i + 1 + $half }}</td>
<td>{{ $right[$i]->antibiotic }}</td>
@if (isset($right[$i]->printcol) && $right[$i]->printcol == 1)
<td>{{ $right[$i]->value }}</td>
@else
<td>&nbsp;</td>
@endif
<td align="center">{{ $right[$i]->interpretation }}</td>
@else
<td colspan="4">&nbsp;</td>
@endif
</tr>
@endfor
</tbody>
</table>
{{-- Kolom kanan --}}
@if (isset($right[$i]))
<td>{{ $i + 1 + $half }}</td>
<td>{{ $right[$i]->antibiotic }}</td>
<td>{{ $right[$i]->printcol == 1 ? $right[$i]->value : '' }}</td>
<td align="center">{{ $right[$i]->interpretation }}</td>
@else
<td colspan="4">&nbsp;</td>
@endif
</tr>
@endfor
</tbody>
</table>
@endif
@endforeach
@endif
@if (isset($data['keterangan']))
Komentar:<br />
{!! nl2br(e($data['keterangan'])) !!}
{!! $data['keterangan'] !!}
@endif
</td>
</tr>