114 lines
4.4 KiB
PHP
114 lines
4.4 KiB
PHP
@php
|
|
$cols = $colunas ?? [];
|
|
$show = fn($key) => in_array($key, $cols);
|
|
$f = $filtros ?? [];
|
|
@endphp
|
|
|
|
<table>
|
|
<tr>
|
|
<td colspan="15" style="text-align:center"><strong>{{ $title }}</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Período</strong></td>
|
|
<td><strong>PSE</strong></td>
|
|
<td><strong>Turno</strong></td>
|
|
<td><strong>Unidade</strong></td>
|
|
<td><strong>Local de Atendimento</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ $f['periodo'] ?? '' }}</td>
|
|
<td>{{ $f['pse'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['turno'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['unidade'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['localAtendimento'] ?? 'Todos' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Profissional</strong></td>
|
|
<td><strong>CBO</strong></td>
|
|
<td><strong>Equipe</strong></td>
|
|
<td><strong>Atividade</strong></td>
|
|
<td><strong>Paciente</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ $f['profissional'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['cbo'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['equipe'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['atividade'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['paciente'] ?? 'Todos' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Público Alvo</strong></td>
|
|
<td><strong>Temas para Saúde</strong></td>
|
|
<td><strong>Práticas em Saúde</strong></td>
|
|
<td><strong>Procedimentos</strong></td>
|
|
<td><strong>INEP</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ $f['publicoAlvo'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['temaSaude'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['praticaSaude'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['procedimentos'] ?? 'Todos' }}</td>
|
|
<td>{{ $f['inep'] ?? 'Todos' }}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Data</th>
|
|
@if($show('unidade')) <th>Unidade</th> @endif
|
|
@if($show('profissional')) <th>Profissional</th> @endif
|
|
@if($show('cbo')) <th>CBO</th> @endif
|
|
@if($show('equipe')) <th>Equipe</th> @endif
|
|
@if($show('atividade')) <th>Atividade</th> @endif
|
|
@if($show('totalParticipantes')) <th>Participantes</th> @endif
|
|
@if($show('totalPessoasAvaliadas')) <th>Pessoas Avaliadas</th> @endif
|
|
@if($show('localAtendimento')) <th>Local de Atendimento</th> @endif
|
|
@if($show('cnes')) <th>CNES</th> @endif
|
|
@if($show('turno')) <th>Turno</th> @endif
|
|
@if($show('publicoAlvo')) <th>Público Alvo</th> @endif
|
|
@if($show('temaSaude')) <th>Temas para Saúde</th> @endif
|
|
@if($show('praticaSaude')) <th>Práticas em Saúde</th> @endif
|
|
@if($show('procedimentosVinculados')) <th>Procedimentos</th> @endif
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($itens as $item)
|
|
<tr>
|
|
<td>{{ \Carbon\Carbon::parse($item->data)->format('d/m/Y') }}</td>
|
|
@if($show('unidade')) <td>{{ $item->unidade }}</td> @endif
|
|
@if($show('profissional')) <td>{{ $item->profissional }}</td> @endif
|
|
@if($show('cbo')) <td>{{ $item->cbo }}</td> @endif
|
|
@if($show('equipe')) <td>{{ $item->equipe }}</td> @endif
|
|
@if($show('atividade')) <td>{{ $item->atividade }}</td> @endif
|
|
@if($show('totalParticipantes')) <td>{{ $item->total_participantes }}</td> @endif
|
|
@if($show('totalPessoasAvaliadas')) <td>{{ $item->total_pessoas_avaliadas }}</td> @endif
|
|
@if($show('localAtendimento')) <td>{{ $item->local_atendimento }}</td> @endif
|
|
@if($show('cnes')) <td>{{ $item->cnes }}</td> @endif
|
|
@if($show('turno')) <td>{{ $item->turno }}</td> @endif
|
|
@if($show('publicoAlvo')) <td>{{ $item->publico_alvo }}</td> @endif
|
|
@if($show('temaSaude')) <td>{{ $item->tema_saude }}</td> @endif
|
|
@if($show('praticaSaude')) <td>{{ $item->pratica_saude }}</td> @endif
|
|
@if($show('procedimentosVinculados')) <td>{{ $item->procedimentos_vinculados }}</td> @endif
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<table>
|
|
<tr>
|
|
<th>Total de Atividades</th>
|
|
<th>Total de Procedimentos</th>
|
|
<th>Total de Pessoas Avaliadas</th>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ $totalizadores['total_atividades'] ?? 0 }}</td>
|
|
<td>{{ $totalizadores['total_procedimentos'] ?? 0 }}</td>
|
|
<td>{{ $totalizadores['total_pessoas_avaliadas'] ?? 0 }}</td>
|
|
</tr>
|
|
</table>
|