130 lines
3.2 KiB
PHP
130 lines
3.2 KiB
PHP
<table>
|
|
<tr>
|
|
<td style="text-align: center" colspan="{{ $colunas->count() }}">
|
|
<strong>{{ $title }}</strong>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<strong>Período de envio DRS:</strong>
|
|
</td>
|
|
|
|
<td colspan="2">
|
|
<strong>Unidade:</strong>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
De {{ $inicio }} até {{ $fim }}
|
|
</td>
|
|
|
|
<td colspan="2">
|
|
{{ $unidade }}
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<strong>Local de atendimento:</strong>
|
|
</td>
|
|
|
|
<td>
|
|
<strong>Setor:</strong>
|
|
</td>
|
|
|
|
<td>
|
|
<strong>Tipo:</strong>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
{{ $infraestrutura }}
|
|
</td>
|
|
|
|
<td>
|
|
{{ $setor }}
|
|
</td>
|
|
|
|
<td>
|
|
{{ $tipo }}
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<strong>Subtipo:</strong>
|
|
</td>
|
|
|
|
<td colspan="2">
|
|
<strong>Paciente:</strong>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
{{ $subtipo }}
|
|
</td>
|
|
|
|
<td colspan="2">
|
|
{{ $paciente }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
@foreach ($colunas as $coluna)
|
|
<th>
|
|
<strong>{{ $coluna['label'] }}</strong>
|
|
</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
@foreach ($itens as $item)
|
|
@if ($item->materiais->count() > 1)
|
|
@foreach ($item->materiais as $i => $material)
|
|
<tr>
|
|
@foreach ($colunas as $coluna)
|
|
@if (in_array($coluna['key'], ['material_descricao', 'quantidade_solicitada']))
|
|
<td>{{ $material->{$coluna['key']} }}</td>
|
|
@elseif ($i === 0)
|
|
<td rowspan="{{ $item->materiais->count() }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
|
|
@endif
|
|
@endforeach
|
|
</tr>
|
|
@endforeach
|
|
@else
|
|
<tr>
|
|
@foreach ($colunas as $coluna)
|
|
@if (in_array($coluna['key'], ['material_descricao', 'quantidade_solicitada']))
|
|
<td>
|
|
@foreach ($item->materiais as $material)
|
|
{{ $material->{$coluna['key']} }}
|
|
@endforeach
|
|
</td>
|
|
@else
|
|
<td>{{ $item->{$coluna['key']} ?? '-' }}</td>
|
|
@endif
|
|
@endforeach
|
|
</tr>
|
|
@endif
|
|
@endforeach
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<th><strong>Total de pacientes: {{ $totalizadores->pacientes }}</strong></th>
|
|
<th></th>
|
|
<th><strong>Total de processos: {{ $totalizadores->processos }}</strong></th>
|
|
<th></th>
|
|
<th><strong>Total de medicamentos: {{ $totalizadores->medicamentos }}</strong></th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|