This commit is contained in:
@@ -0,0 +1,196 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center">
|
||||
<strong>{{ $title }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Período</strong></td>
|
||||
<td><strong>Unidade</strong></td>
|
||||
<td><strong>Local de atendimento</strong></td>
|
||||
<td><strong>Equipe</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@if($quadrimestre)
|
||||
Quadrimestre {{ $quadrimestre }}
|
||||
@else
|
||||
De {{ $inicio }} até {{ $fim }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $unidade }}</td>
|
||||
<td>{{ $infraestrutura }}</td>
|
||||
<td>{{ $equipe }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Sexo</strong></td>
|
||||
<td><strong>Paciente</strong></td>
|
||||
<td><strong>Busca Ativa</strong></td>
|
||||
<td><strong>Boas Práticas</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@php
|
||||
$feiInicial = collect([
|
||||
isset($faixaEtariaInicial['anos']) ? $faixaEtariaInicial['anos'].'a' : null,
|
||||
isset($faixaEtariaInicial['meses']) ? $faixaEtariaInicial['meses'].'m' : null,
|
||||
isset($faixaEtariaInicial['dias']) ? $faixaEtariaInicial['dias'].'d' : null,
|
||||
])->filter()->implode(' ');
|
||||
$feiFinal = collect([
|
||||
isset($faixaEtariaFinal['anos']) ? $faixaEtariaFinal['anos'].'a' : null,
|
||||
isset($faixaEtariaFinal['meses']) ? $faixaEtariaFinal['meses'].'m' : null,
|
||||
isset($faixaEtariaFinal['dias']) ? $faixaEtariaFinal['dias'].'d' : null,
|
||||
])->filter()->implode(' ');
|
||||
@endphp
|
||||
<td>{{ $sexo }}</td>
|
||||
<td>{{ $paciente }}</td>
|
||||
<td>{{ $buscaAtiva ? 'Sim' : 'Não' }}</td>
|
||||
<td>{{ implode(', ', $boasPraticasSelecionadas) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Faixa Etária Inicial</strong></td>
|
||||
<td><strong>Faixa Etária Final</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $feiInicial ?: '-' }}</td>
|
||||
<td>{{ $feiFinal ?: '-' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
{{-- Totalizadores --}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Pacientes</strong></th>
|
||||
<th><strong>Equipes</strong></th>
|
||||
<th><strong>Microáreas</strong></th>
|
||||
<th><strong>Denominador (D)</strong></th>
|
||||
<th><strong>Numerador (N)</strong></th>
|
||||
<th><strong>Resultado (%)</strong></th>
|
||||
@foreach($boasPraticasSelecionadas as $pratica)
|
||||
<th><strong>% Boa Prática {{ $pratica }}</strong></th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ $totalizadores['totalPacientes'] }}</td>
|
||||
<td>{{ $totalizadores['totalEquipes'] }}</td>
|
||||
<td>{{ $totalizadores['totalMicroareas'] }}</td>
|
||||
<td>{{ $totalizadores['denominador'] }}</td>
|
||||
<td>{{ $totalizadores['numerador'] }}</td>
|
||||
<td>{{ $totalizadores['resultado'] }}%</td>
|
||||
@foreach($boasPraticasSelecionadas as $pratica)
|
||||
<td>{{ $totalizadores['boasPraticas'][$pratica]['percentual'] ?? '-' }}%</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
{{-- Resultado por Equipe --}}
|
||||
@if(!empty($resultadoPorEquipe))
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Unidade</strong></th>
|
||||
<th><strong>Equipe</strong></th>
|
||||
<th><strong>Denominador (D)</strong></th>
|
||||
<th><strong>Numerador (N)</strong></th>
|
||||
<th><strong>Resultado (%)</strong></th>
|
||||
<th><strong>Classificação</strong></th>
|
||||
@foreach($boasPraticasSelecionadas as $pratica)
|
||||
<th><strong>% Prática {{ $pratica }}</strong></th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($resultadoPorEquipe as $item)
|
||||
<tr>
|
||||
<td>{{ $item['unidadeNomeFantasia'] }}</td>
|
||||
<td>{{ $item['equipeDescricao'] }}</td>
|
||||
<td>{{ $item['denominador'] }}</td>
|
||||
<td>{{ $item['numerador'] }}</td>
|
||||
<td>{{ $item['resultado'] }}%</td>
|
||||
<td>{{ $item['classificacao'] }}</td>
|
||||
@foreach($boasPraticasSelecionadas as $pratica)
|
||||
<td>{{ $item['percentual' . $pratica] ?? '-' }}%</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
|
||||
{{-- Busca Ativa --}}
|
||||
@if(!empty($buscaAtivaDados))
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Unidade</strong></th>
|
||||
<th><strong>Equipe</strong></th>
|
||||
<th><strong>Paciente</strong></th>
|
||||
<th><strong>Sexo</strong></th>
|
||||
<th><strong>Idade</strong></th>
|
||||
<th><strong>Usuário Responsável</strong></th>
|
||||
@if(in_array('pacienteDataNascimento', $selectedColsBuscaAtiva))
|
||||
<th><strong>Data de Nascimento</strong></th>
|
||||
@endif
|
||||
@if(in_array('pacienteTelefone', $selectedColsBuscaAtiva))
|
||||
<th><strong>Telefone</strong></th>
|
||||
@endif
|
||||
@if(in_array('pacienteEndereco', $selectedColsBuscaAtiva))
|
||||
<th><strong>Endereço</strong></th>
|
||||
@endif
|
||||
@if(in_array('areaMicroareaDomicilio', $selectedColsBuscaAtiva))
|
||||
<th><strong>Area/Microarea do Domicilio</strong></th>
|
||||
@endif
|
||||
@foreach($boasPraticasSelecionadas as $pratica)
|
||||
<th><strong>Prática {{ $pratica }}</strong></th>
|
||||
@endforeach
|
||||
<th><strong>Pontuação Total</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($buscaAtivaDados as $pacienteItem)
|
||||
<tr>
|
||||
<td>{{ $pacienteItem['unidadeNomeFantasia'] }}</td>
|
||||
<td>{{ $pacienteItem['equipeDescricao'] }}</td>
|
||||
<td>{{ $pacienteItem['pacienteNome'] }}</td>
|
||||
<td>{{ $pacienteItem['pacienteSexo'] }}</td>
|
||||
<td>{{ $pacienteItem['idadeCompleta'] }}</td>
|
||||
<td>{{ $pacienteItem['usuarioResponsavelNome'] }}</td>
|
||||
@if(in_array('pacienteDataNascimento', $selectedColsBuscaAtiva))
|
||||
<td>{{ $pacienteItem['pacienteDataNascimento'] }}</td>
|
||||
@endif
|
||||
@if(in_array('pacienteTelefone', $selectedColsBuscaAtiva))
|
||||
<td>{{ $pacienteItem['pacienteTelefone'] }}</td>
|
||||
@endif
|
||||
@if(in_array('pacienteEndereco', $selectedColsBuscaAtiva))
|
||||
<td>{{ $pacienteItem['pacienteEndereco'] }}</td>
|
||||
@endif
|
||||
@if(in_array('areaMicroareaDomicilio', $selectedColsBuscaAtiva))
|
||||
<td>{{ $pacienteItem['areaMicroareaDomicilio'] }}</td>
|
||||
@endif
|
||||
@foreach($boasPraticasSelecionadas as $pratica)
|
||||
@php $campo = 'indicador' . $pratica; @endphp
|
||||
<td>
|
||||
@if($pacienteItem[$campo] ?? false)
|
||||
Sim
|
||||
@elseif($pratica === 'D' && ($pacienteItem['areaTipoId'] ?? null) == 5)
|
||||
N/C
|
||||
@else
|
||||
Não
|
||||
@endif
|
||||
</td>
|
||||
@endforeach
|
||||
<td>{{ $pacienteItem['pontuacaoTotal'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
Reference in New Issue
Block a user