Files
rkm-conectasus-ci-sandbox/api/resources/views/exportacoes/exame-laboratorial/exame-solicitado-status.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

273 lines
8.8 KiB
PHP

<table>
<tr>
<td style="text-align: center" colspan="{{ $colunas->count() }}">
<strong>{{ $title }}</strong>
</td>
</tr>
<tr>
<td>
<strong>Período:</strong>
</td>
<td>
<strong>Exame:</strong>
</td>
</tr>
<tr>
<td>
De {{ $periodo['start'] }} até{{ $periodo['end'] }}
</td>
<td>
{{ $exame_grupo }}
</td>
</tr>
<tr>
<td>
<strong>Status:</strong>
</td>
<td>
<strong>Prontuário:</strong>
</td>
</tr>
<tr>
<td>
@if ($status->count() == 7)
TODOS
@else
@foreach ($status as $statusNome)
@if ($loop->last)
{{ $statusNome['nome'] }}.
@else
{{ $statusNome['nome'] }},
@endif
@endforeach
@endif
</td>
<td>
{{ $prontuario }}
</td>
</tr>
<tr>
<td>
<strong>Unidade Solicitante:</strong>
</td>
<td>
<strong>Local de atendimento:</strong>
</td>
</tr>
<tr>
<td>
{{ $unidade_nome }}
</td>
<td>
{{ $infraestrutura_nome }}
</td>
</tr>
<tr>
<td>
<strong>Unidade de coleta:</strong>
</td>
<td>
<strong>Local de atendimento:</strong>
</td>
</tr>
<tr>
<td>
{{ $coleta_unidade_nome }}
</td>
<td>
{{ $coleta_infraestrutura_nome }}
</td>
</tr>
<tr>
<td>
<strong>Laboratório:</strong>
</td>
<td>
<strong>Local de atendimento:</strong>
</td>
</tr>
<tr>
<td>
{{ $laboratorio_nome }}
</td>
<td>
{{ $laboratorio_infraestrutura_nome }}
</td>
</tr>
</table>
<table>
<thead>
<tr>
@foreach ($colunas as $coluna)
<th>
<strong>{{ $coluna['label'] }}</strong>
</th>
@endforeach
</tr>
</thead>
<tbody>
<tr>
<td>
@foreach ($unidade_coleta as $coleta)
@foreach ($coleta['agendamentos'] as $agendamento)
<table>
<thead>
@if ($loop->first)
<tr>
<th colspan="{{ $colunas->count() }}">
<strong>
Unidade de coleta: {{ $coleta['coleta_nome_fantasia'] }}
- Local de atendimento: {{ $coleta['coleta_infraestrutura_nome'] }}
</strong>
</th>
</tr>
@endif
<tr>
<th colspan="{{ $colunas->count() }}">
<strong>
Paciente: {{ $agendamento['paciente_nome'] }}
@if (!empty($agendamento['paciente_nome_social']))
({{ $agendamento['paciente_nome_social'] }})
@endif
- Prontuário: {{ $agendamento['paciente_prontuario'] }}
- Agendamento: {{ $agendamento['agendamento_numero'] }}
</strong>
</th>
</tr>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}"><strong>{{ $coluna['label'] }}</strong></th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($agendamento['exames'] as $item)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }} background-white">{{ $item[$coluna['key']] ?? '-' }}</td>
@endforeach
</tr>
@endforeach
<tr>
<th colspan="{{ $colunas->count() }}" style="text-align: right">
<strong>Total de exames: {{ $agendamento['exames']->count() }}</strong>
</th>
</tr>
@if ($loop->last)
<tr>
<th colspan="{{ $colunas->count() }}">
<strong>
Total de exames da unidade de coleta: {{ $coleta['coleta_nome_fantasia'] }}
- Local de atendimento: {{ $coleta['coleta_infraestrutura_nome'] }}: {{$coleta['total_exames']}}
</strong>
</th>
</tr>
@endif
</tbody>
</table>
@endforeach
@endforeach
</td>
</tr>
<tr>
<td>
<table>
<tr>
<th colspan="{{ $status->count() }}">
<strong>Status dos exames</strong>
</th>
</tr>
@if (in_array(\App\Enums\ExameLaboratorial\StatusAgendamento::AGENDADO, $total_status))
<tr>
<td class="col-2 text-center">
<strong>Agendado: {{ $agendado }}</strong>
</td>
</tr>
@endif
@if (in_array(\App\Enums\ExameLaboratorial\StatusAgendamento::NAO_REALIZADO, $total_status))
<tr>
<td class="col-2 text-center">
<strong>Não coletado: {{ $nao_coletado }}</strong>
</td>
</tr>
@endif
@if (in_array(\App\Enums\ExameLaboratorial\StatusAgendamento::REALIZADO, $total_status))
<tr>
<td class="col-2 text-center">
<strong>Coleta realizada: {{ $coleta_realizada }}</strong>
</td>
</tr>
@endif
@if (in_array(\App\Enums\ExameLaboratorial\StatusAgendamento::PENDENTE_ASSINATURA, $total_status))
<tr>
<td class="col-2 text-center">
<strong>Pendente de assinatura: {{ $pendente_assinatura }}</strong>
</td>
</tr>
@endif
@if (in_array(\App\Enums\ExameLaboratorial\StatusAgendamento::ASSINADO, $total_status))
<tr>
<td class="col-2 text-center">
<strong>Pendente de impressão: {{ $pendente_impressao }}</strong>
</td>
</tr>
@endif
@if (in_array(\App\Enums\ExameLaboratorial\StatusAgendamento::PENDENTE_ENTREGA, $total_status))
<tr>
<td class="col-2 text-center">
<strong>Pendente de entrega: {{ $pendente_entrega }}</strong>
</td>
</tr>
@endif
@if (in_array(\App\Enums\ExameLaboratorial\StatusAgendamento::ENTREGUE, $total_status))
<tr>
<td class="col-2 text-center">
<strong>Entregue: {{ $entregue }}</strong>
</td>
</tr>
@endif
</table>
</td>
</tr>
</tbody>
</table>