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

242 lines
6.4 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() == 4)
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>
<tr>
<td>
<strong>Paciente:</strong>
</td>
<td>
<strong>Prontuário:</strong>
</td>
</tr>
<tr>
<td>
{{ $paciente_nome }}
</td>
<td>
{{ $prontuario }}
</td>
</tr>
</table>
<table>
<thead>
<tr>
@foreach ($colunas as $coluna)
<th>
<strong>{{ is_array($coluna) ? ($coluna['label'] ?? $coluna) : $coluna }}</strong>
</th>
@endforeach
</tr>
</thead>
<tbody>
<tr>
<td>
@foreach ($agendamentos as $agendamento)
<table>
<thead>
<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'] }}
- Data de nascimento: {{ $agendamento['paciente_nascimento'] }}
- CNS: {{$agendamento['paciente_cns']}}
- CPF: {{$agendamento['paciente_cpf']}}
</strong>
</th>
</tr>
<tr>
@foreach ($colunas as $coluna)
<th><strong>{{ is_array($coluna) ? ($coluna['label'] ?? $coluna) : $coluna }}</strong></th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($agendamento['exames'] as $item)
<tr>
@foreach ($colunas as $coluna)
@php
$key = is_array($coluna) ? ($coluna['key'] ?? $coluna) : $coluna;
@endphp
<td class="background-white">{{ $item[$key] ?? '-' }}</td>
@endforeach
</tr>
@endforeach
<tr>
<th class="table-td"></th>
<th colspan="{{ $colunas->count() - 3 }}">
<strong>Total de exames: {{ $agendamento['total']['quantidade'] }}</strong>
</th>
<th>
<strong>Total médio: {{ $agendamento['total']['valor_medio'] }}</strong>
</th>
<th>
<strong>Total: {{ $agendamento['total']['valor_total'] }}</strong>
</th>
</tr>
<tr><td colspan="{{ $colunas->count() }}"></td></tr>
</tbody>
</table>
@endforeach
</td>
</tr>
<tr>
<td>
<table>
<tr>
<th colspan="{{ $status->count() }}">
<strong>Total</strong>
</th>
</tr>
<tr>
<td>
Exames: {{ $total['quantidade'] }}
</td>
</tr>
<tr>
<td>
Valor médio: {{ $total['valor_medio'] }}
</td>
</tr>
<tr>
<td>
Valor total: {{ $total['valor_total'] }}
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>