@extends('layouts.app') @push('styles') @endpush @section('content') @auth @php $form = array_merge([ 'clinic' => '', 'period_type' => 'date_range', 'from_date' => '', 'to_date' => '', 'month' => '', 'report' => 'mental_health', ], $form ?? []); @endphp
@csrf

MNE Reports

@error('clinic')
Please select clinic
@enderror
@error('period_type')
Please select timeline
@enderror
@error('month')
Please select month
@enderror
date
@error('from_date')
Please input date
@enderror
date
@error('to_date')
Please input date
@enderror
@error('report')
Please select a report
@enderror
@error('action')
{{ $message }}
@enderror
@if(!empty($preview))

Preview: Mental Health Report

Clinic: {{ $preview_clinic ?? '' }} @if(!empty($preview_from) && !empty($preview_to)) | Dates: {{ $preview_from }} to {{ $preview_to }} @endif

@foreach(($preview_rows ?? []) as $row) @php $counts = $row['counts'] ?? []; $total = (int) ($counts['total'] ?? 0); @endphp @endforeach
Indicator No. Indicator Male Female Total
MSM TGW PWID Other FSW PWID Other
{{ $row['indicator_no'] ?? '' }}
Row {{ $row['row'] }}
{{ $row['label'] }} {{ (($counts['male_msm'] ?? 0) === 0) ? '' : ($counts['male_msm'] ?? 0) }} {{ (($counts['male_tgw'] ?? 0) === 0) ? '' : ($counts['male_tgw'] ?? 0) }} {{ (($counts['male_pwid'] ?? 0) === 0) ? '' : ($counts['male_pwid'] ?? 0) }} {{ (($counts['male_other'] ?? 0) === 0) ? '' : ($counts['male_other'] ?? 0) }} {{ (($counts['female_fsw'] ?? 0) === 0) ? '' : ($counts['female_fsw'] ?? 0) }} {{ (($counts['female_pwid'] ?? 0) === 0) ? '' : ($counts['female_pwid'] ?? 0) }} {{ (($counts['female_other'] ?? 0) === 0) ? '' : ($counts['female_other'] ?? 0) }} {{ $total === 0 ? '' : $total }}
Missing Main Risk from patients: {{ count($missing_main_risk_pids ?? []) }}
Patient IDs: {{ !empty($missing_main_risk_pids) ? implode(', ', $missing_main_risk_pids) : 'None' }}
@endif
@endauth @endsection