Files
rkm-conectasus-ci-sandbox/api/resources/views/exportacoes/atencao-basica/relatorio-cuidado-pessoa-com-diabete.blade.php
Antonio Lopes dos Santos afec302c3e
All checks were successful
build-api-image / build (push) Successful in 51s
init commit
2026-08-04 16:52:02 -03:00

245 lines
8.7 KiB
PHP

<table>
<tr>
<td style="text-align: center" colspan="2">
<strong>{{$title}}</strong>
</td>
</tr>
<tr>
@if ($periodo['inicio'] && $periodo['fim'])
<td><strong>Período</strong></td>
@else
<td><strong>Ano/Quadrimestre</strong></td>
@endif
<td><strong>Unidade</strong></td>
</tr>
<tr>
@if ($periodo['inicio'] && $periodo['fim'])
<td>De {{$periodo['inicio']}} até {{$periodo['fim']}}</td>
@else
<td>{{$ano}}/{{$quadrimestre}}</td>
@endif
<td>{{$unidade}}</td>
</tr>
<tr>
<td><strong>Equipe</strong></td>
<td><strong>Sexo</strong></td>
</tr>
<tr>
<td>{{$equipe}}</td>
<td>{{$sexo}}</td>
</tr>
<tr>
<td><strong>Idade mínima (anos)</strong></td>
<td><strong>Idade máxima (anos)</strong></td>
</tr>
<tr>
<td>{{$idade_anos_minimo}}</td>
<td>{{$idade_anos_maximo}}</td>
</tr>
<tr>
<td colspan="2"><strong>Paciente</strong></td>
</tr>
<tr>
<td colspan="2">{{$paciente}}</td>
</tr>
<tr>
<td colspan="2"><strong>Fora de Área</strong></td>
</tr>
<tr>
<td colspan="2">{{$fora_area ? 'Sim' : 'Não'}}</td>
</tr>
</table>
<table>
<thead>
<tr>
<th style="text-align: center" colspan="2">
<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>
<th><strong>% Boa prática A</strong></th>
<th><strong>% Boa prática B</strong></th>
<th><strong>% Boa prática C</strong></th>
<th><strong>% Boa prática D</strong></th>
<th><strong>% Boa prática E</strong></th>
<th><strong>% Boa prática F</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>{{$itens['totalizadores']['pacientes']}}</td>
<td>{{$itens['totalizadores']['equipes']}}</td>
<td>{{$itens['totalizadores']['microareas']}}</td>
<td>{{$itens['totalizadores']['denominador']}}</td>
<td>{{$itens['totalizadores']['numerador']}}</td>
<td>{{$itens['totalizadores']['resultado']}}%</td>
<td>{{$itens['totalizadores']['percentual_boas_praticas_a']}}%</td>
<td>{{$itens['totalizadores']['percentual_boas_praticas_b']}}%</td>
<td>{{$itens['totalizadores']['percentual_boas_praticas_c']}}%</td>
<td>{{$itens['totalizadores']['percentual_boas_praticas_d']}}%</td>
<td>{{$itens['totalizadores']['percentual_boas_praticas_e']}}%</td>
<td>{{$itens['totalizadores']['percentual_boas_praticas_f']}}%</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th style="text-align: center" colspan="2">
<strong>Resultado por equipe</strong>
</th>
</tr>
<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 (in_array('A', $boas_praticas))
<th><strong>% Boa prática A</strong></th>
@endif
@if (in_array('B', $boas_praticas))
<th><strong>% Boa prática B</strong></th>
@endif
@if (in_array('C', $boas_praticas))
<th><strong>% Boa prática C</strong></th>
@endif
@if (in_array('D', $boas_praticas))
<th><strong>% Boa prática D</strong></th>
@endif
@if (in_array('E', $boas_praticas))
<th><strong>% Boa prática E</strong></th>
@endif
@if (in_array('F', $boas_praticas))
<th><strong>% Boa prática F</strong></th>
@endif
</tr>
</thead>
<tbody>
@foreach($itens['itens_agrupados'] 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']}}</td>
@if (in_array('A', $boas_praticas))
<td>{{$item['percentual_boas_praticas_a']}}%</td>
@endif
@if (in_array('B', $boas_praticas))
<td>{{$item['percentual_boas_praticas_b']}}%</td>
@endif
@if (in_array('C', $boas_praticas))
<td>{{$item['percentual_boas_praticas_c']}}%</td>
@endif
@if (in_array('D', $boas_praticas))
<td>{{$item['percentual_boas_praticas_d']}}%</td>
@endif
@if (in_array('E', $boas_praticas))
<td>{{$item['percentual_boas_praticas_e']}}%</td>
@endif
@if (in_array('F', $boas_praticas))
<td>{{$item['percentual_boas_praticas_f']}}%</td>
@endif
</tr>
@endforeach
</tbody>
</table>
@if ($busca_ativa)
<table>
<thead>
<tr>
<th style="text-align: center" colspan="2">
<strong>Busca ativa por paciente</strong>
</th>
</tr>
<tr>
<th><strong>Unidade</strong></th>
<th><strong>Equipe</strong></th>
<th><strong>Área/Microárea do Domicílio</strong></th>
<th><strong>Paciente</strong></th>
<th><strong>Sexo</strong></th>
<th><strong>Data de nascimento</strong></th>
<th><strong>Idade</strong></th>
@if (in_array('A', $boas_praticas))
<th><strong>Boa prática A</strong></th>
@endif
@if (in_array('B', $boas_praticas))
<th><strong>Boa prática B</strong></th>
@endif
@if (in_array('C', $boas_praticas))
<th><strong>Boa prática C</strong></th>
@endif
@if (in_array('D', $boas_praticas))
<th><strong>Boa prática D</strong></th>
@endif
@if (in_array('E', $boas_praticas))
<th><strong>Boa prática E</strong></th>
@endif
@if (in_array('F', $boas_praticas))
<th><strong>Boa prática F</strong></th>
@endif
<th><strong>Pontuação total</strong></th>
</tr>
</thead>
<tbody>
@foreach($itens['itens_desagrupados'] as $item)
<tr>
<td>{{$item['unidade_nome_fantasia']}}</td>
<td>{{$item['equipe_descricao']}}</td>
<td>{{$item['area_microarea_domicilio']}}</td>
<td>{{$item['paciente_nome']}}</td>
<td>{{$item['paciente_sexo_descricao']}}</td>
<td>{{$item['paciente_data_nascimento']}}</td>
<td>{{$item['paciente_idade']}}</td>
@if (in_array('A', $boas_praticas))
<td>{{$item['boa_pratica_a'] ? 'Sim' : 'Não'}}</td>
@endif
@if (in_array('B', $boas_praticas))
<td>{{$item['boa_pratica_b'] ? 'Sim' : 'Não'}}</td>
@endif
@if (in_array('C', $boas_praticas))
<td>{{$item['boa_pratica_c'] ? 'Sim' : 'Não'}}</td>
@endif
@if (in_array('D', $boas_praticas))
<td>{{$item['area_tipo_id'] == 5 && !$item['boa_pratica_d'] ? 'N/C' : ($item['boa_pratica_d'] ? 'Sim' : 'Não')}}</td>
@endif
@if (in_array('E', $boas_praticas))
<td>{{$item['boa_pratica_e'] ? 'Sim' : 'Não'}}</td>
@endif
@if (in_array('F', $boas_praticas))
<td>{{$item['boa_pratica_f'] ? 'Sim' : 'Não'}}</td>
@endif
<td>{{$item['pontuacao_total']}}</td>
</tr>
@endforeach
</tbody>
</table>
@endif