Files
rkm-conectasus-ci-sandbox/api/resources/views/impressoes/template/pronto-atendimento/atendimento-medico/prescricao-interna.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

197 lines
7.5 KiB
PHP

@extends('impressoes.layout.impressao')
@section('conteudo')
<div class="table-grid-margin-bottom">
<table class="table-grid">
<tbody>
<tr>
<td colspan="5">
<table class="table-grid-inner">
<thead>
<tr>
<th class="no-background-color">
{{ $paciente['nome'] }}
@if (!is_null($paciente['nome_social']))
({{ $paciente['nome_social'] }})
@endif
</th>
<th class="col-min no-text-transform no-background-color font-size-default">
<strong>Prontuário: {{ $paciente['prontuario'] }}</strong>
</th>
</tr>
</thead>
</table>
</td>
</tr>
<tr>
<td class="col-4">
<strong>CNS:</strong> {{ $paciente['cns'] }}
</td>
<td>
<strong>CPF:</strong> {{ $paciente['cpf'] }}
</td>
<td>
<strong>Sexo:</strong> {{ $paciente['sexo'] }}
</td>
<td>
<strong>Peso:</strong> {{ $avaliacaoAntropometrica['massa'] }}
</td>
<td>
<strong>Altura:</strong> {{ $avaliacaoAntropometrica['altura'] }}
</td>
</tr>
<tr>
<td>
<strong>Data de nascimento:</strong> {{ $paciente['data_nascimento'] }}
</td>
<td colspan="{{ $paciente['idade_gestacional'] ? 3 : 4 }}">
<strong>Idade:</strong> {{ $paciente['idade'] }}
</td>
@if (!is_null($paciente['idade_gestacional']))
<td>
Gestante a {{ $paciente['idade_gestacional'] }}
</td>
@endif
</tr>
<tr>
<td colspan="5">
<strong>Nome da mãe:</strong> {{ $paciente['nome_mae'] }}
</td>
</tr>
<tr>
<td colspan="5">
<strong>Endereço:</strong> {{ $paciente['endereco'] }}
</td>
</tr>
<tr>
<td colspan="5">
<strong>Contato:</strong>
@if (empty($paciente['telefones']))
NÃO INFORMADO
@else
@foreach ($paciente['telefones'] as $i => $telefone)
<div style="display: inline; padding: {{ $i > 0 ? '0 2px' : '0 2px 0 0' }};">
{{ $telefone }}
</div>
@endforeach
@endif
</td>
</tr>
</tbody>
</table>
</div>
<div>
@foreach($prescricoesInternas as $prescricaoInterna)
<div class="text-left mt-1 border-bottom" style="margin-bottom:3px;">
<strong>Data/Hora: </strong><span class="font-small mr-1">{{ $prescricaoInterna['dataHora'] }}</span>
<strong>Médico(a): </strong><span class="font-small">{{ $prescricaoInterna['profissional']['nome'] }} - {{ $prescricaoInterna['profissional']['cbo'] }}</span>
</div>
<table class="table text-left">
<thead>
<tr>
<th class="text-left col-4">Medicamento</th>
<th class="text-left col-2">Quantidade</th>
<th class="text-left col-3">Forma farmacêutica</th>
<th class="text-left col-3">Administrar</th>
</tr>
</thead>
<tbody>
@foreach ($prescricaoInterna['medicamentos'] as $medicamento)
<tr>
<td>{{ $medicamento['nome'] }}</td>
<td>{{ $medicamento['quantidade'] }}</td>
<td>{{ $medicamento['formaFarmaceutica'] }}</td>
<td>{{ $medicamento['administracao'] }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-1">
@if($prescricaoInterna['doseUnica'])
<strong>Dose única</strong>
@else
<strong>Frequência: </strong><span>{{ $prescricaoInterna['frequencia'] }}</span>
@endif
</div>
<div class="mt-1 text-left border-bottom">
<strong>Observações: </strong>
<span class="font-small mr-1">{{ $prescricaoInterna['observacoes'] }}</span>
</div>
@endforeach
</div>
<div style="margin-top: 80px"></div>
<div class="area text-right">
{{ $_data['cliente']['municipio']['nome'] }} - {{ $_data['cliente']['municipio']['estado']['uf'] }}, {{ $_data['dataAtual']['porExtenso'] }}.
</div>
<div style="margin-top: 80px"></div>
<table class="table-grid no-border">
<tbody>
@php
$vistosNomesCBO = [];
$contadorAssinaturas = 0;
@endphp
<tr>
@foreach ($prescricoesInternas as $i => $assinatura)
@if (!isset($vistosNomesCBO[$assinatura['profissional']['nome']][$assinatura['profissional']['cbo']]))
@php
$vistosNomesCBO[$assinatura['profissional']['nome']][$assinatura['profissional']['cbo']] = true;
@endphp
<td class="no-border col-{{ count($prescricoesInternas) === 1 ? 12 : 6 }}" style="padding: 20px 10px 0 10px;">
@include('impressoes.components.assinatura', [
'props' => [
'class' => 'center ' . (count($prescricoesInternas) === 1 ? 'col-6' : '')
],
'data' => [
'info' => [
"<strong>{$assinatura['profissional']['nome']}</strong>",
$assinatura['profissional']['cbo'],
]
],
])
</td>
@php
$contadorAssinaturas++;
@endphp
@if ($contadorAssinaturas % 2 === 0 || $i === (count($prescricoesInternas) - 1))
</tr>
@if ($i !== (count($prescricoesInternas) - 1))
<tr>
@endif
@php
$contadorAssinaturas = 0;
@endphp
@endif
@endif
@endforeach
</tbody>
</table>
@endsection