@role('Admin|superadmin') @endrole @role('Puskesmas|Pihak Wajib Pajak') @endrole @php // Initialize totals $totalBaru = 0; $totalArv = 0; @endphp @role('Admin|superadmin') @foreach ($unit_kerja as $key => $item) @php // Retrieve values $baru = $item->unitKerjaAmbil('filterOdhiv', Session::get('year'), 'baru')["total"]; $arv = $item->unitKerjaAmbil('filterOdhiv', Session::get('year'), 'arv')["total"]; $percentage = $arv > 0 ? number_format($baru / $arv * 100, 2) : 0; // Add to totals $totalBaru += $baru; $totalArv += $arv; @endphp @endforeach @php // Calculate total percentage $totalPercentage = $totalArv > 0 ? number_format($totalBaru / $totalArv * 100, 2) : 0; @endphp @endrole @role('Puskesmas|Pihak Wajib Pajak') @foreach ($desa as $key => $item) @if($item->filterOdhiv(Session::get('year'))) @php // Retrieve values $baru = $item->filterOdhiv(Session::get('year'))->baru; $arv = $item->filterOdhiv(Session::get('year'))->arv; $percentage = $arv > 0 ? number_format($baru / $arv * 100, 2) : 0; // Add to totals $totalBaru += $baru; $totalArv += $arv; @endphp @endif @endforeach @php // Calculate total percentage $totalPercentage = $totalArv > 0 ? number_format($totalBaru / $totalArv * 100, 2) : 0; @endphp @endrole
PRESENTASE ODHIV BARU MENDAPATKAN PENGOBATAN MENURUT KECAMATAN DAN PUSKESMAS
Kabupaten/Kota Kutai Timur
Tahun {{Session::get('year')}}
KecamatanPuskesmasDesaODHIV Baru Ditemukan ODHIV Baru Ditemukan dan Mendapatkan Pengobatan ARV Persentase ODHIV Baru Mendapat Pengobatan ARV
{{$item->kecamatan}} {{$item->nama}} {{$item->unitKerjaAmbil('filterOdhiv', Session::get('year'), 'baru')["total"]}} {{$item->unitKerjaAmbil('filterOdhiv', Session::get('year'), 'arv')["total"]}} {{$item->unitKerjaAmbil('filterOdhiv', Session::get('year'), 'arv')["total"] > 0? number_format($item->unitKerjaAmbil('filterOdhiv', Session::get('year'), 'baru')["total"] /$item->unitKerjaAmbil('filterOdhiv', Session::get('year'), 'arv')["total"] * 100, 2 ):0}}
Total {{ $totalBaru }} {{ $totalArv }} {{ $totalPercentage }}
{{$item->UnitKerja->kecamatan}} {{$item->nama}} {{$item->filterOdhiv(Session::get('year'))->baru}} {{$item->filterOdhiv(Session::get('year'))->arv}} {{$item->filterOdhiv(Session::get('year'))->arv>0? number_format($item->filterOdhiv(Session::get('year'))->baru /$item->filterOdhiv(Session::get('year'))->arv * 100, 2):0}}
Total {{ $totalBaru }} {{ $totalArv }} {{ $totalPercentage }}