{{-- normes/synthesis.blade.php — Phase 6.4 (aggregate synthesis) --}} @extends('layouts.app') @section('content') {{-- Aggregate summary --}} {{-- Per-study breakdown --}} @foreach($synthesis['per_study'] as $studyId => $row) @php $s = $row['study']; $sample = $row['sample']; $notes = $row['notes']; $prodCount = count($notes['products'] ?? []); $weightedSum = 0.0; $weightedN = 0; foreach ($notes['products'] ?? [] as $p) { if (($p['n'] ?? 0) > 0 && $p['avg'] !== null) { $weightedSum += (float)$p['avg'] * (int)$p['n']; $weightedN += (int)$p['n']; } } $avg = $weightedN > 0 ? $weightedSum / $weightedN : null; @endphp @endforeach @if(count($synthesis['per_study']) === 0) @endif
Total panel Hommes Femmes Note Moy. Note Min Note Max
{{ $synthesis['total_sample'] }} {{ $synthesis['sex']['H'] }} {{ $synthesis['sex']['F'] }} {{ $synthesis['note_avg'] !== null ? number_format($synthesis['note_avg'], 2) : '-' }} {{ $synthesis['note_min'] ?? '-' }} {{ $synthesis['note_max'] ?? '-' }}
Étude N H F Produits notés Moy. notes
{{ $s->Code }} — {{ $s->Name }} {{ $sample['total'] }} {{ $sample['sex']['H'] }} {{ $sample['sex']['F'] }} {{ $prodCount }} {{ $avg !== null ? number_format($avg, 2) : '-' }}
Aucune étude IN dans cette norme.
« Retour au détail
@endsection