init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,239 @@
<table>
<tr>
<td style="text-align: center" colspan="5">
<strong>{{$title}}</strong>
</td>
</tr>
<tr>
<td><strong>Período</strong></td>
<td><strong>Ano</strong></td>
<td><strong>Quadrimestre</strong></td>
<td colspan="2"><strong>Unidade</strong></td>
</tr>
<tr>
<td>De {{ $periodoDe }} até {{ $periodoAte }}</td>
<td>{{ $quadrimestreAno }}</td>
<td>{{ $quadrimestre }}</td>
<td colspan="2">{{ $unidade }}</td>
</tr>
<tr>
<td colspan="3"><strong>Equipe</strong></td>
<td><strong>Boas práticas</strong></td>
<td><strong>Busca ativa</strong></td>
</tr>
<tr>
<td colspan="3">{{ $equipe }}</td>
<td>{{ $boasPraticas }}</td>
<td>{{ $buscaAtiva }}</td>
</tr>
<tr>
<td><strong>Sexo</strong></td>
<td><strong>Idade mínima</strong></td>
<td><strong>Idade máxima</strong></td>
<td colspan="2"><strong>Paciente</strong></td>
</tr>
<tr>
<td>{{ $sexo }}</td>
<td>{{ $idadeMinima }}</td>
<td>{{ $idadeMaxima }}</td>
<td colspan="2">{{ $paciente }}</td>
</tr>
</table>
<table>
<thead>
<tr>
<th colspan="6" style="text-align: center"><strong>Totalizadores</strong></th>
</tr>
<tr>
<th><strong>Total de pacientes</strong></th>
<th><strong>Total de equipes</strong></th>
<th><strong>Total de microáreas</strong></th>
<th><strong>Denominador</strong></th>
<th><strong>Numerador</strong></th>
<th><strong>Resultado</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ $totalizadores->total_pacientes }}</td>
<td>{{ $totalizadores->total_equipes }}</td>
<td>{{ $totalizadores->total_microareas }}</td>
<td>{{ $totalizadores->denominador }}</td>
<td>{{ $totalizadores->numerador }}</td>
<td>{{ $totalizadores->resultado }}%</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<th><strong>Boa prática A</strong></th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th><strong>Boa prática B</strong></th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th><strong>Boa prática C</strong></th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th><strong>Boa prática D</strong></th>@endif
@if($boasPraticasSelecionadas->contains('E'))<th><strong>Boa prática E</strong></th>@endif
@if($boasPraticasSelecionadas->contains('F'))<th><strong>Boa prática F</strong></th>@endif
@if($boasPraticasSelecionadas->contains('G'))<th><strong>Boa prática G</strong></th>@endif
@if($boasPraticasSelecionadas->contains('H'))<th><strong>Boa prática H</strong></th>@endif
@if($boasPraticasSelecionadas->contains('I'))<th><strong>Boa prática I</strong></th>@endif
@if($boasPraticasSelecionadas->contains('J'))<th><strong>Boa prática J</strong></th>@endif
@if($boasPraticasSelecionadas->contains('K'))<th><strong>Boa prática K</strong></th>@endif
</tr>
</thead>
<tbody>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<td>{{ $totalizadores->boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td>{{ $totalizadores->boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td>{{ $totalizadores->boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td>{{ $totalizadores->boa_pratica_d }}%</td>@endif
@if($boasPraticasSelecionadas->contains('E'))<td>{{ $totalizadores->boa_pratica_e }}%</td>@endif
@if($boasPraticasSelecionadas->contains('F'))<td>{{ $totalizadores->boa_pratica_f }}%</td>@endif
@if($boasPraticasSelecionadas->contains('G'))<td>{{ $totalizadores->boa_pratica_g }}%</td>@endif
@if($boasPraticasSelecionadas->contains('H'))<td>{{ $totalizadores->boa_pratica_h }}%</td>@endif
@if($boasPraticasSelecionadas->contains('I'))<td>{{ $totalizadores->boa_pratica_i }}%</td>@endif
@if($boasPraticasSelecionadas->contains('J'))<td>{{ $totalizadores->boa_pratica_j }}%</td>@endif
@if($boasPraticasSelecionadas->contains('K'))<td>{{ $totalizadores->boa_pratica_k }}%</td>@endif
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th><strong>Unidade</strong></th>
<th><strong>Equipe</strong></th>
<th><strong>Denominador</strong></th>
<th><strong>Numerador</strong></th>
<th><strong>Resultado</strong></th>
<th><strong>Classificação</strong></th>
@if($boasPraticasSelecionadas->contains('A'))<th><strong>A</strong></th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th><strong>B</strong></th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th><strong>C</strong></th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th><strong>D</strong></th>@endif
@if($boasPraticasSelecionadas->contains('E'))<th><strong>E</strong></th>@endif
@if($boasPraticasSelecionadas->contains('F'))<th><strong>F</strong></th>@endif
@if($boasPraticasSelecionadas->contains('G'))<th><strong>G</strong></th>@endif
@if($boasPraticasSelecionadas->contains('H'))<th><strong>H</strong></th>@endif
@if($boasPraticasSelecionadas->contains('I'))<th><strong>I</strong></th>@endif
@if($boasPraticasSelecionadas->contains('J'))<th><strong>J</strong></th>@endif
@if($boasPraticasSelecionadas->contains('K'))<th><strong>K</strong></th>@endif
</tr>
</thead>
<tbody>
@foreach ($equipes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
<td>{{ $item->denominador }}</td>
<td>{{ $item->numerador }}</td>
<td>{{ $item->resultado }}%</td>
<td>{{ $item->classificacao_resultado }}</td>
@if($boasPraticasSelecionadas->contains('A'))<td>{{ $item->boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td>{{ $item->boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td>{{ $item->boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td>{{ $item->boa_pratica_d }}%</td>@endif
@if($boasPraticasSelecionadas->contains('E'))<td>{{ $item->boa_pratica_e }}%</td>@endif
@if($boasPraticasSelecionadas->contains('F'))<td>{{ $item->boa_pratica_f }}%</td>@endif
@if($boasPraticasSelecionadas->contains('G'))<td>{{ $item->boa_pratica_g }}%</td>@endif
@if($boasPraticasSelecionadas->contains('H'))<td>{{ $item->boa_pratica_h }}%</td>@endif
@if($boasPraticasSelecionadas->contains('I'))<td>{{ $item->boa_pratica_i }}%</td>@endif
@if($boasPraticasSelecionadas->contains('J'))<td>{{ $item->boa_pratica_j }}%</td>@endif
@if($boasPraticasSelecionadas->contains('K'))<td>{{ $item->boa_pratica_k }}%</td>@endif
</tr>
@endforeach
</tbody>
</table>
@if($isBuscaAtiva)
<table>
<thead>
<tr>
@php
$colspan = 8;
if($colunasPacientes->contains('data_nascimento')) $colspan++;
if($colunasPacientes->contains('telefone_principal')) $colspan++;
if($colunasPacientes->contains('endereco')) $colspan++;
if($colunasPacientes->contains('microarea_descricao')) $colspan++;
if($colunasPacientes->contains('area_microarea_domicilio')) $colspan++;
if($boasPraticasSelecionadas->contains('A')) $colspan++;
if($boasPraticasSelecionadas->contains('B')) $colspan++;
if($boasPraticasSelecionadas->contains('C')) $colspan++;
if($boasPraticasSelecionadas->contains('D')) $colspan++;
if($boasPraticasSelecionadas->contains('E')) $colspan++;
if($boasPraticasSelecionadas->contains('F')) $colspan++;
if($boasPraticasSelecionadas->contains('G')) $colspan++;
if($boasPraticasSelecionadas->contains('H')) $colspan++;
if($boasPraticasSelecionadas->contains('I')) $colspan++;
if($boasPraticasSelecionadas->contains('J')) $colspan++;
if($boasPraticasSelecionadas->contains('K')) $colspan++;
@endphp
<th colspan="{{ $colspan }}" style="text-align: center"><strong>Busca ativa por paciente</strong></th>
</tr>
<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>Responsável pelo cadastro</strong></th>
@if($colunasPacientes->contains('data_nascimento'))<th><strong>Data de nascimento</strong></th>@endif
@if($colunasPacientes->contains('telefone_principal'))<th><strong>Telefone</strong></th>@endif
@if($colunasPacientes->contains('endereco'))<th><strong>Endereço</strong></th>@endif
@if($colunasPacientes->contains('microarea_descricao'))<th><strong>Microárea</strong></th>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<th><strong>Área/Microárea do Domicílio</strong></th>@endif
@if($boasPraticasSelecionadas->contains('A'))<th><strong>A</strong></th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th><strong>B</strong></th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th><strong>C</strong></th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th><strong>D</strong></th>@endif
@if($boasPraticasSelecionadas->contains('E'))<th><strong>E</strong></th>@endif
@if($boasPraticasSelecionadas->contains('F'))<th><strong>F</strong></th>@endif
@if($boasPraticasSelecionadas->contains('G'))<th><strong>G</strong></th>@endif
@if($boasPraticasSelecionadas->contains('H'))<th><strong>H</strong></th>@endif
@if($boasPraticasSelecionadas->contains('I'))<th><strong>I</strong></th>@endif
@if($boasPraticasSelecionadas->contains('J'))<th><strong>J</strong></th>@endif
@if($boasPraticasSelecionadas->contains('K'))<th><strong>K</strong></th>@endif
<th><strong>Pontuação total</strong></th>
</tr>
</thead>
<tbody>
@foreach ($pacientes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
<td>{{ $item->paciente_nome }}</td>
<td>{{ $item->sexo_descricao }}</td>
<td>{{ $item->idade }}</td>
<td>{{ $item->usuario_cadastro_nome }}</td>
@if($colunasPacientes->contains('data_nascimento'))<td>{{ $item->data_nascimento }}</td>@endif
@if($colunasPacientes->contains('telefone_principal'))<td>{{ $item->telefone_principal }}</td>@endif
@if($colunasPacientes->contains('endereco'))<td>{{ $item->endereco }}</td>@endif
@if($colunasPacientes->contains('microarea_descricao'))<td>{{ $item->microarea_descricao }}</td>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<td>{{ $item->area_microarea_domicilio }}</td>@endif
@if($boasPraticasSelecionadas->contains('A'))<td>{{ $item->boa_pratica_a ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td>{{ $item->boa_pratica_b ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td>{{ $item->boa_pratica_c ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td>{{ $item->boa_pratica_d ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('E'))<td>{{ $item->area_tipo_id == 5 && !$item->boa_pratica_e ? 'N/C' : ($item->boa_pratica_e ? 'x' : '') }}</td>@endif
@if($boasPraticasSelecionadas->contains('F'))<td>{{ $item->boa_pratica_f ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('G'))<td>{{ $item->boa_pratica_g ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('H'))<td>{{ $item->boa_pratica_h ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('I'))<td>{{ $item->boa_pratica_i ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('J'))<td>{{ $item->area_tipo_id == 5 && !$item->boa_pratica_j ? 'N/C' : ($item->boa_pratica_j ? 'x' : '') }}</td>@endif
@if($boasPraticasSelecionadas->contains('K'))<td>{{ $item->boa_pratica_k ? 'x' : '' }}</td>@endif
<td>{{ $item->pontuacao_total }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif