Files
rkm-conectasus-ci-sandbox/api/resources/views/impressoes/template/atencao-basica/relatorio-acesso-cuidado-programado.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

152 lines
4.6 KiB
PHP

@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período</strong>
<div>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>Equipe</strong>
<div>
{{ $equipe }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
<div class="col-6">
<strong>Visualizar por</strong>
<div>
{{ $tipo_visualizacao === 'equipe' ? 'Equipe' : 'Profissional' }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@php
$totalColunas = 5;
if (is_null($unidade_id)) $totalColunas++;
if (is_null($equipe_id)) $totalColunas++;
if (is_null($usuario_id) && $tipo_visualizacao === 'usuario') $totalColunas++;
@endphp
<th colspan="{{ $totalColunas }}">Totalizadores</th>
</tr>
<tr>
<th>Programados</th>
<th>Espontâneos</th>
<th>Total</th>
<th>% Programados</th>
<th>% Espontâneos</th>
@if(is_null($unidade_id))
<th>Total de unidades</th>
@endif
@if(is_null($equipe_id))
<th>Total de equipes</th>
@endif
@if(is_null($usuario_id) && $tipo_visualizacao === 'usuario')
<th>Total de profissionais</th>
@endif
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">{{ $totalizadores['total_programados'] }}</td>
<td class="text-center">{{ $totalizadores['total_espontaneos'] }}</td>
<td class="text-center">{{ $totalizadores['total'] }}</td>
<td class="text-center">{{ $totalizadores['percentual_programados'] }}</td>
<td class="text-center">{{ $totalizadores['percentual_espontaneos'] }}</td>
@if(is_null($unidade_id))
<td class="text-center">{{ $totalizadores['total_unidades'] }}</td>
@endif
@if(is_null($equipe_id))
<td class="text-center">{{ $totalizadores['total_equipes'] }}</td>
@endif
@if(is_null($usuario_id) && $tipo_visualizacao === 'usuario')
<td class="text-center">{{ $totalizadores['total_profissionais'] }}</td>
@endif
</tr>
</tbody>
</table>
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Equipe</th>
@if ($tipo_visualizacao === 'usuario')
<th>Profissional</th>
@endif
<th>Programados</th>
<th style="white-space: nowrap;">% Programados</th>
<th>Espontâneos</th>
<th style="white-space: nowrap;">% Espontâneos</th>
<th>Total</th>
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->infraestrutura_nome }}</td>
<td>{{ $item->equipe_descricao }}</td>
@if ($tipo_visualizacao === 'usuario')
<td>{{ $item->usuario_nome }}</td>
@endif
<td class="text-center">{{ $item->total_atendimento_demanda_programada }}</td>
<td class="text-center">{{ $item->porcentagem_atendimento_demanda_programada }}%</td>
<td class="text-center">{{ $item->total_atendimento_demanda_espontanea }}</td>
<td class="text-center">{{ $item->porcentagem_atendimento_demanda_espontanea }}%</td>
<td class="text-center">{{ $item->total_atendimento }}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection