Files
rkm-conectasus-ci-sandbox/api/resources/views/impressoes/template/exame-imagem/historico-exame.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

362 lines
9.2 KiB
PHP

@extends('impressoes.layout1.content')
@section('conteudo')
<fieldset>
<legend>Dados do Paciente</legend>
<div class="row">
<div class="col-4">
<strong>Nome:</strong>
</div>
<div class="col-4">
<strong>Data nascimento:</strong>
</div>
<div class="col-4">
<strong>Número prontuário:</strong>
</div>
</div>
<div class="row">
<div class="col-4">
{{ $params->paciente_nome }}
@if (!empty($params->nome_social))
<strong>({{ $params->nome_social }})</strong>
@endif
</div>
<div class="col-4">
{{$params->data_nascimento}}
</div>
<div class="col-4">
{{$params->prontuario}}
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Sexo:</strong>
</div>
<div class="col-4">
<strong>Nome da mãe:</strong>
</div>
<div class="col-4">
<strong>Unidade referência:</strong>
</div>
</div>
<div class="row">
<div class="col-4">
{{$params->sexo}}
</div>
<div class="col-4">
{{$params->nome_mae}}
</div>
<div class="col-4">
{{$params->unidade_referencia}}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th colspan="6" style="text-align: center">EXAMES AGENDADOS</th>
</tr>
<tr>
<th>Data</th>
<th>Horário</th>
<th>Exames</th>
<th>Unidade executante</th>
<th>Profissional</th>
</tr>
</thead>
@php
use App\Enums\ExameImagem\Fechamento\Status as StatusEnum;
@endphp
@foreach ($historico->filter(function($value){
return count($value['exames_incluidos']->whereIn('status_id',
[StatusEnum::AGENDADO, StatusEnum::REAGENDADO])) > 0 ||
count($value['exames_incluidos']->whereNull('status_id')) > 0;
}) as $agendados)
<tbody>
@foreach($agendados['exames_incluidos'] as $exame)
<tr>
<td class="text-left">{{$agendados['data']}}</td>
<td class="text-left">{{$agendados['hora_exame']}}</td>
<td class="text-left">
{{$exame['nome']}}
</td>
<td class="text-left">{{$agendados['nome_fantasia']}}</td>
<td class="text-left">{{$agendados['profissional_nome']}}</td>
</tr>
@endforeach
</tbody>
@endforeach
</table>
<br />
@php
$realizadosFiltrados = $historico->filter(function($value) {
return $value['exames_incluidos']->whereIn('status_id', [StatusEnum::REALIZADO, StatusEnum::RESULTADO])->count() > 0;
});
@endphp
@if($realizadosFiltrados->count() > 0)
<table class="table">
<thead>
<tr>
<th colspan="6" style="text-align: center">EXAMES REALIZADOS</th>
</tr>
<tr>
<th>Data</th>
<th>Horário</th>
<th>Exames</th>
<th>Unidade executante</th>
<th>Profissional</th>
<th>Status</th>
</tr>
</thead>
@foreach ($realizadosFiltrados as $realizados)
<tbody>
@foreach($realizados['exames_incluidos']->whereIn('status_id', [StatusEnum::REALIZADO, StatusEnum::RESULTADO]) as $exame)
<tr>
<td class="text-left">{{$realizados['data']}}</td>
<td class="text-left">{{$realizados['hora_exame']}}</td>
<td class="text-left">{{$exame['nome']}}</td>
<td class="text-left">{{$realizados['nome_fantasia']}}</td>
<td class="text-left">{{$realizados['profissional_nome']}}</td>
<td class="text-left">
@if($exame['status_id'] == StatusEnum::REALIZADO)
Realizado
@elseif($exame['status_id'] == StatusEnum::RESULTADO)
Resultado Lançado
@endif
</td>
</tr>
@endforeach
</tbody>
@endforeach
</table>
@endif
<br />
@php
$faltasFiltradas = $historico->filter(function($value) {
return $value['exames_incluidos']->whereIn('status_id', [StatusEnum::FALTOU, StatusEnum::FALTA_MEDICA])->count() > 0;
});
@endphp
@if($faltasFiltradas->count() > 0)
<table class="table">
<thead>
<tr>
<th colspan="6" style="text-align: center">FALTAS</th>
</tr>
<tr>
<th>Data</th>
<th>Horário</th>
<th>Exames</th>
<th>Unidade executante</th>
<th>Profissional</th>
<th>Status</th>
</tr>
</thead>
@foreach ($faltasFiltradas as $faltas)
<tbody>
@foreach($faltas['exames_incluidos']->whereIn('status_id', [StatusEnum::FALTOU, StatusEnum::FALTA_MEDICA]) as $exame)
<tr>
<td class="text-left">{{$faltas['data']}}</td>
<td class="text-left">{{$faltas['hora_exame']}}</td>
<td class="text-left">{{$exame['nome']}}</td>
<td class="text-left">{{$faltas['nome_fantasia']}}</td>
<td class="text-left">{{$faltas['profissional_nome']}}</td>
<td class="text-left">
@if($exame['status_id'] == StatusEnum::FALTOU)
Faltou
@elseif($exame['status_id'] == StatusEnum::FALTA_MEDICA)
Falta Médica
@endif
</td>
</tr>
@endforeach
</tbody>
@endforeach
</table>
@endif
<br />
@php
$canceladosFiltrados = $historico->filter(function($value) {
return $value['exames_incluidos']->where('status_id', StatusEnum::CANCELADO)->count() > 0;
});
@endphp
@if($canceladosFiltrados->count() > 0)
<table class="table">
<thead>
<tr>
<th colspan="6" style="text-align: center">EXAMES CANCELADOS</th>
</tr>
<tr>
<th>Data</th>
<th>Horário</th>
<th>Exames</th>
<th>Unidade executante</th>
<th>Profissional</th>
<th>Status</th>
</tr>
</thead>
@foreach ($canceladosFiltrados as $cancelados)
<tbody>
@foreach($cancelados['exames_incluidos']->where('status_id', StatusEnum::CANCELADO) as $exame)
<tr>
<td class="text-left">{{$cancelados['data']}}</td>
<td class="text-left">{{$cancelados['hora_exame']}}</td>
<td class="text-left">{{$exame['nome']}}</td>
<td class="text-left">{{$cancelados['nome_fantasia']}}</td>
<td class="text-left">{{$cancelados['profissional_nome']}}</td>
<td class="text-left">
Cancelado
</td>
</tr>
@endforeach
</tbody>
@endforeach
</table>
@endif
<style>
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
strong {
font-size: 14px;
}
fieldset {
display: block;
margin-inline-start: 2px;
margin-inline-end: 2px;
padding-block-start: 0.35em;
padding-inline-start: 0.75em;
padding-inline-end: 0.75em;
padding-block-end: 0.625em;
min-inline-size: min-content;
border-width: 2px;
border-style: groove;
border-color: rgb(192, 192, 192);
border-image: initial;
}
legend {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: 100 !important;
}
.mt-10 {
margin-top: 10px;
}
.text-titulo {
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: 600;
text-align: center !important;
}
.text-left {
text-align: left !important;
}
.checkbox {
width: 1em;
height: 1em;
margin-top: 0.25em;
vertical-align: top;
border: 2px solid rgba(0, 0, 0, .25);
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
h3 {
padding: 0;
margin: 0;
}
p {
padding: 0;
margin: 0;
font-size: 13px;
letter-spacing: 1px
}
.dados {
background-color: #f1f1f1;
}
table {
text-align: center;
border: 1px solid #000000;
}
table tr {
text-align: center;
background-color: #ffffff;
border: 1px solid #000000;
}
table td {
text-align: center;
background-color: #ffffff;
border: 1px solid #000000;
}
table th {
text-align: center !important;
}
footer {
color: #222222;
display: block;
font-family: Helvetica;
font-size: 12px;
padding-top: 5mm;
width: 450px;
line-height: 32px;
}
.footer {
border-top: 2px solid #000000;
width: 450px;
}
.footer-left {
text-align: left;
}
.footer-right {
line-height: 10px;
text-align: right;
}
</style>
@endsection