init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,257 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
* {
font-size: 12px;
}
label { font-weight: bold; }
.table-pagina th { text-align: center; }
.col-min { width: 1%; }
</style>
<fieldset>
<legend>Dados</legend>
<div class="row">
<div class="col-2">
<label>Número</label>
<div>
{{ $numero }}
</div>
</div>
<div class="col-3">
<label>Data de abertura</label>
<div>
{{ $abertoEm }}
</div>
</div>
<div class="col-3">
<label>Livro</label>
<div>
{{ $livroRegistro }}
</div>
</div>
<div class="col-2">
<label>Tipo</label>
<div>
{{ $livroRegistroTipo }}
</div>
</div>
<div class="col-2">
<label>Quantidade de páginas</label>
<div>
{{ $quantidadePaginas }}
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>Termo de abertura</legend>
<div class="row">
<div class="col-3">
<label>Registro</label>
<div>
{{ $registro }}
</div>
</div>
<div class="col-3">
<label>Da firma</label>
<div>
{{ $firma }}
</div>
</div>
@if($isLivroTalidomida)
<div class="col-3">
<label>Farmácia</label>
<div>
{{ $farmacia }}
</div>
</div>
@endif
<div class="col-{{ $isLivroTalidomida ? 3 : 6 }}">
<label>Farmacêutico</label>
<div>
{{ $usuarioFarmaceutico }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<label>Estabelecido à</label>
<div>
{{ $endereco }}
</div>
</div>
<div class="col-3">
<label>Inscrição estadual</label>
<div>
{{ $inscricaoEstadual }}
</div>
</div>
<div class="col-3">
<label>Autoridade sanitária</label>
<div>
{{ $autoridadeSanitaria }}
</div>
</div>
</div>
</fieldset>
@foreach($paginas as $i => $pagina)
@php($colspan = $isLivroTalidomidaABase ? 15 : ($isLivroTalidomidaEspecifico ? 10 : 7))
<table class="table table-pagina" style="{{ $i < count($paginas) - 1 ? 'margin-bottom: 15px;' : '' }}">
<thead>
<tr>
<th
colspan="{{ $colspan }}"
style="text-align: left !important;"
>
<span>Página: {{ $pagina->numero }}</span>
<span style="margin-left:15px;">Medicamento: {{ $pagina->material }}</span>
</th>
</tr>
@isset($pagina->estorno_message)
<tr>
<th colspan="{{ $colspan }}">
{{ $pagina->estorno_message }}
</th>
</tr>
@endisset
@isset($pagina->transferido_de)
<tr>
<th colspan="{{ $colspan }}">
{{ $pagina->transferido_de }}
</th>
</tr>
@endisset
@if($isLivroTalidomidaABase)
<tr>
<th rowspan="2" class="col-min">Data da movimentação</th>
<th colspan="3">Movimentação</th>
<th rowspan="2" class="col-min">Estoque final</th>
<th rowspan="2" class="col-min">Número da documentação comprobatória</th>
<th rowspan="2" class="col-min">Número da notificação</th>
<th colspan="2">Paciente</th>
<th colspan="2">Médico</th>
<th colspan="2">Doença</th>
<th rowspan="2" style="width: 110px;">Assinatura do reponsável pela dispensação</th>
<th rowspan="2" style="width: 110px;">Número de registro no conselho de classe</th>
</tr>
<tr>
<th class="col-min">Entrada</th>
<th class="col-min">Saída</th>
<th class="col-min">Perdas</th>
<th class="col-min">Data de nascimento</th>
<th class="col-min">Sexo</th>
<th>Nome</th>
<th class="col-min">CRM</th>
<th>Nome</th>
<th class="col-min">CID</th>
</tr>
@elseif($isLivroTalidomidaEspecifico)
<tr>
<th rowspan="2" class="col-min">Data da movimentação</th>
<th rowspan="2">Histórico</th>
<th colspan="3">Movimento</th>
<th rowspan="2" class="col-min">Estoque final</th>
<th rowspan="2" style="width: 110px;">Assinatura do reponsável técnico</th>
<th rowspan="2" style="width: 110px;">Número de registro no conselho de classe</th>
<th rowspan="2" class="col-min">Número da documentação comprobatória</th>
<th rowspan="2">Observações</th>
</tr>
<tr>
<th class="col-min">Entrada</th>
<th class="col-min">Saída</th>
<th class="col-min">Perdas</th>
</tr>
@else
<tr>
<th rowspan="2" class="col-min">Data da movimentação</th>
<th rowspan="2">Histórico</th>
<th colspan="3">Movimento</th>
<th rowspan="2" class="col-min">Estoque</th>
<th rowspan="2" style="width: 110px;">Assinatura do reponsável técnico</th>
</tr>
<tr>
<th class="col-min">Entrada</th>
<th class="col-min">Saída</th>
<th class="col-min">Perdas</th>
</tr>
@endif
</thead>
<tbody>
@foreach($pagina->linhas as $linha)
<tr>
@if($isLivroTalidomidaABase)
<td class="text-center">{{ $linha->data_movimentacao }}</td>
<td class="text-center">{{ $linha->entrada }}</td>
<td class="text-center">{{ $linha->saida }}</td>
<td class="text-center">{{ $linha->perda }}</td>
<td class="text-center">{{ $linha->estoque }}</td>
<td class="text-center">{{ $linha->numero_documento }}</td>
<td class="text-center">{{ $linha->numero_notificacao }}</td>
<td class="text-center">{{ $linha->paciente_data_nascimento }}</td>
<td class="text-center">{{ $linha->paciente_sexo }}</td>
<td>{{ $linha->medico_nome }}</td>
<td class="text-center">{{ $linha->medico_crm }}</td>
<td>{{ $linha->cid_nome }}</td>
<td class="text-center">{{ $linha->cid_codigo }}</td>
<td></td>
<td class="text-center">{{ $linha->numero_registro }}</td>
@elseif($isLivroTalidomidaEspecifico)
<td class="text-center">{{ $linha->data_movimentacao }}</td>
<td>{{ $linha->historico }}</td>
<td class="text-center">{{ $linha->entrada }}</td>
<td class="text-center">{{ $linha->saida }}</td>
<td class="text-center">{{ $linha->perda }}</td>
<td class="text-center">{{ $linha->estoque }}</td>
<td></td>
<td class="text-center">{{ $linha->numero_registro }}</td>
<td class="text-center">{{ $linha->numero_documento }}</td>
<td>{{ $linha->observacoes }}</td>
@else
<td class="text-center">{{ $linha->data_movimentacao }}</td>
<td>{{ $linha->historico }}</td>
<td class="text-center">{{ $linha->entrada }}</td>
<td class="text-center">{{ $linha->saida }}</td>
<td class="text-center">{{ $linha->perda }}</td>
<td class="text-center">{{ $linha->estoque }}</td>
<td></td>
@endif
</tr>
@endforeach
</tbody>
<tfoot>
@isset($pagina->transferido_para)
<tr>
<th colspan="{{ $colspan }}">
{{ $pagina->transferido_para }}
</th>
</tr>
@endisset
</tfoot>
</table>
@endforeach
@endsection

View File

@@ -0,0 +1,145 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
label { font-weight: bold };
</style>
<fieldset>
<legend>Dados</legend>
<div class="row">
<div class="col-2">
<label>Número</label>
<div>
{{ $numero }}
</div>
</div>
<div class="col-3">
<label>Data de fechamento</label>
<div>
{{ $fechadoEm }}
</div>
</div>
<div class="col-3">
<label>Livro</label>
<div>
{{ $livroRegistro }}
</div>
</div>
<div class="col-2">
<label>Tipo</label>
<div>
{{ $livroRegistroTipo }}
</div>
</div>
<div class="col-2">
<label>Quantidade de páginas</label>
<div>
{{ $quantidadePaginas }}
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>Termo de fechamento</legend>
<div class="row">
<div class="col-6">
<label>Registro</label>
<div>
{{ $registro }}
</div>
</div>
<div class="col-6">
<label>Da firma</label>
<div>
{{ $firma }}
</div>
</div>
</div>
@if($isLivroTalidomida)
<div class="row">
<div class="col-6">
<label>Farmácia</label>
<div>
{{ $farmacia }}
</div>
</div>
<div class="col-6">
<label>Farmacêutico</label>
<div>
{{ $usuarioFarmaceutico }}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<label>Estabelecido à</label>
<div>
{{ $endereco }}
</div>
</div>
</div>
@else
<div class="row">
<div class="col-6">
<label>Farmacêutico</label>
<div>
{{ $usuarioFarmaceutico }}
</div>
</div>
<div class="col-6">
<label>Estabelecido à</label>
<div>
{{ $endereco }}
</div>
</div>
</div>
@endif
<div class="row">
<div class="col-6">
<label>Inscrição estadual</label>
<div>
{{ $inscricaoEstadual }}
</div>
</div>
<div class="col-6">
<label>Autoridade sanitária</label>
<div>
{{ $autoridadeSanitaria }}
</div>
</div>
</div>
</fieldset>
<div class="row" style="margin-top: 100px;">
<div class="col-6" style="padding: 15px">
<div style="width: 100%; border-bottom: 1px solid black;"></div>
<div style="widows: 100%; text-align: center; padding-top: 5px;">
<strong>{{ $usuarioFarmaceutico }}</strong><br/>
Farmacêutico responsável
</div>
</div>
<div class="col-6" style="padding: 15px">
<div style="width: 100%; border-bottom: 1px solid black;"></div>
<div style="widows: 100%; text-align: center; padding-top: 5px;">
<strong>{{ $autoridadeSanitaria }}</strong><br/>
Autoridade sanitária
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,236 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.text-center { text-align: center !important; }
.assinatura {
margin: 0 auto;
padding-top: 80px;
page-break-inside: avoid;
text-align: center;
width: 400px;
}
.assinatura-linha {
border-top: 2px solid #000000;
margin-bottom: 5px;
}
</style>
<fieldset>
<legend>Identificação do estabelecimento</legend>
<div class="row">
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $estabelecimento['unidade'] }}
</div>
</div>
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $estabelecimento['infraestrutura'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-10">
<strong>Endereço</strong>
<div>
{{ $estabelecimento['endereco'] }}
</div>
</div>
<div class="col-2">
<strong>Telefone</strong>
<div>
{{ $estabelecimento['telefone'] }}
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>Identificação do paciente</legend>
<div class="row">
<div class="col-6">
<strong>Nome</strong>
<div>
{{ $paciente['nome'] }}
</div>
</div>
<div class="col-6">
<strong>Nome social</strong>
<div>
{{ $paciente['nome_social'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Data de nascimento</strong>
<div>
{{ $paciente['data_nascimento'] }}
</div>
</div>
<div class="col-4">
<strong>Prontuário</strong>
<div>
{{ $paciente['prontuario'] }}
</div>
</div>
<div class="col-4">
<strong>CNS</strong>
<div>
{{ $paciente['cns'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Endereço</strong>
<div>
<strong>{{ $paciente['endereco'] }}</strong>
</div>
</div>
</div>
<div class="row">
<div class="col-min" style="white-space: nowrap;">
<strong>Telefone(s)</strong>
<div>
<strong>{{ $paciente['telefones']->join(' / ') }}</strong>
</div>
</div>
<div class="col-12">
<strong>Unidade de referência</strong>
<div>
{{ $paciente['unidade_referencia'] }}
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>Dados da receita</legend>
<div class="row">
<div class="col-12">
<table class="table" style="font-size: 12px;">
<thead>
<tr>
<th class="text-center">Data/hora dispensação</th>
<th class="text-center">Medicamento</th>
<th class="text-center">Lote</th>
<th class="text-center">Validade</th>
<th class="text-center">Quantidade entregue</th>
<th class="text-center">Posologia</th>
<th class="text-center">Validade da receita</th>
<th class="text-center">Data da próxima entrega</th>
<th class="text-center">Observação</th>
<th class="text-center">Operador</th>
</tr>
</thead>
<tbody>
@foreach ($receita['entregas'] as $entrega)
<tr>
<td class="text-center">
{{ $entrega->data_hora_dispensacao }}
</td>
<td>
{{ $entrega->material }}
</td>
<td class="text-center">
@foreach ($entrega->lotes as $lote)
<div>{{ $lote->lote ?? '-' }}</div>
@endforeach
</td>
<td class="text-center">
@foreach ($entrega->lotes as $lote)
<div>{{ $lote->validade ?? '-' }}</div>
@endforeach
</td>
<td class="text-center">
{{ $entrega->quantidade_entregue }}
</td>
<td>
{{ $entrega->posologia }}
</td>
<td class="text-center">
<strong>{{ $entrega->validade_receita }}</strong>
</td>
<td class="text-center">
<strong>{{ $entrega->data_proxima_entrega }}</strong>
</td>
<td>
<strong>{{ $entrega->observacao }}</strong>
</td>
<td>
{{ $entrega->operador }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@isset ($receita['observacao'])
<div class="row" style="margin-top: 10px;">
<div class="col-12">
<strong>Observação</strong>
<div>
{{ $receita['observacao'] }}
</div>
</div>
</div>
@endisset
<div class="row">
<div class="col-6">
<div class="assinatura">
<div class="assinatura-linha"></div>
<div>
<strong>Assinatura do paciente</strong>
</div>
</div>
</div>
<div class="col-6">
<div class="assinatura">
<div class="assinatura-linha"></div>
<div>
<strong>Data/hora da entrega</strong>
</div>
</div>
</div>
</div>
</fieldset>
@endsection

View File

@@ -0,0 +1,143 @@
@extends('impressoes.layout.impressao')
@section('conteudo')
<div class="fieldset">
<div class="legend">
<strong>PACIENTE</strong>
</div>
<div>
<h3>
{{ $receita->nome_paciente }}
@if(!empty($receita->nome_social_paciente))
({{ $receita->nome_social_paciente }})
@endif
</h3>
</div>
<div>
<strong>Data de nascimento:</strong>
<span>{{ $receita->data_nascimento_paciente }}</span>
</div>
<div>
<strong>Prontuário:</strong>
<span>{{ $receita->prontuario_paciente }}</span>
</div>
<div>
<strong>Operador(es):</strong>
@foreach($receita->operadores as $operador)
<p>{{ $operador }}</p>
@endforeach
</div>
</div>
<div class="fieldset">
<div class="legend">
Receita
</div>
<div>
<p>Médico solicitante: {{ $receita->nome_medico_solicitante }}</p>
<p>Entrega: {{ $receita->dispensado_em }}</p>
<p>Reimpressão: {{ $receita->data_reimpressao }}</p>
<p>Horário do atendimento: {{ $receita->hora_atendimento }}hrs</p>
</div>
<div class="mt-20 table">
<table>
<tr>
<th class="text-center">
Dispensação
</th>
<th class="col-4">
Medicamento
</th>
<th class="text-center">
Lote
</th>
<th class="text-center">
Vencimento
</th>
<th class="text-center">
Entregue
</th>
<th class="text-center">
Próxima retirada
</th>
</tr>
@foreach($receita->itens as $item)
<tr>
<td class="text-center">
{{ $item->dispensado_em }}
</td>
<td>
{{ $item->material_descricao }}
</td>
<td class="text-center" style="white-space: nowrap;">
@if(empty($item->lotes))
-
@else
@foreach($item->lotes as $lote)
<div>{{ $lote }}</div>
@endforeach
@endif
</td>
<td class="text-center">
{{ $item->vencimento_receita }}
</td>
<td class="text-center">
{{ $item->retirado }}
</td>
<td class="text-center">
{{ $item->proxima_retirada }}
</td>
</tr>
@endforeach
</table>
</div>
</div>
<div>
@include('impressoes.components.assinatura', [
'props' => [
'class' => 'col-4'
],
'data' => [
'info' => [
"<strong>Assinatura do paciente</strong>",
]
],
])
</div>
<style>
.mt-20 {
margin-top: 20px;
}
.mt-40 {
margin-top: 40px;
}
.text-center {
text-align: center;
}
h3 {
padding: 0;
margin: 0;
}
p {
padding: 0;
margin: 0;
}
table th {
text-align: left;
}
</style>
@endsection

View File

@@ -0,0 +1,115 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.text-center {
text-align: center !important;
}
.margin-top {
margin-top: 15px;
}
.col-min {
width: 1%;
}
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $start_date }} até {{ $end_date }}
</div>
<div class="col-6">
{{ $unidade_nome_fantasia }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Setor:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura_nome }}
</div>
<div class="col-6">
{{ $setor_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional solicitante:</strong>
</div>
<div class="col-6">
<strong>Medicamento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $usuario_nome }}
</div>
<div class="col-6">
{{ $material_descricao }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@foreach ($columns as $column)
<th class="{{ $column['class'] }}">{{ $column['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens['dispensacoes'] as $item)
<tr>
@foreach ($columns as $column)
<td class="{{ $column['class'] }}">{{ $item->{$column['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
<table class="table">
<thead>
<tr>
<th class="text-center">
<span>
Total de pacientes: <span class="font-normal">{{ $itens['totalizadores']->pacientes }}</span>
</span>
<span style="margin-left: 10px;">
Total de medicamentos: <span class="font-normal">{{ $itens['totalizadores']->medicamentos }}</span>
</span>
</th>
</tr>
</thead>
</table>
@endsection

View File

@@ -0,0 +1,93 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-relatorio > thead > tr > th,
.table-relatorio > tfoot > tr > th { text-align: center; white-space: nowrap; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período de solicitação:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $inicio }} até {{ $fim }}
</div>
<div class="col-6">
{{ $unidade }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Setor:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $setor }}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>CID:</strong>
</div>
</div>
<div class="row">
<div class="col-12">
{{ $cid }}
</div>
</div>
</fieldset>
<table class="table table-relatorio">
<thead>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th colspan="{{ $colunas->count() - 1 }}"></th>
<th>{{ $totalizadores->quantidade_processos }}</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,119 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-relatorio { border: 1px solid #222222; }
.table-relatorio td,
.table-relatorio th { border: 1px solid #222; padding: 5px; vertical-align: middle; }
.table-relatorio th { background: rgba(0,0,0,0.2); text-align: center; }
.row-even { background: rgba(0,0,0,0.1) }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Unidade:</strong>
</div>
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $unidade }}
</div>
<div class="col-6">
{{ $infraestrutura }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor:</strong>
</div>
<div class="col-6">
<strong>Material:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $setor }}
</div>
<div class="col-6">
{{ $material }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Paciente:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $paciente }}
</div>
</div>
</fieldset>
<table class="table-relatorio">
<thead>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $key => $item)
@php
$rowClass = $key % 2 === 0 ? 'row-even' : 'row-odd';
$rowspanPaciente = 0;
$item->materiais->each(function ($material) use (&$rowspanPaciente) {
$rowspanPaciente += $material->retiradas->count();
});
@endphp
@foreach ($item->materiais as $i => $material)
<tr class="{{ $rowClass }}">
@if ($i == 0)
<td rowspan="{{ $rowspanPaciente }}">{{ $item->paciente_nome }}</td>
@if(!is_null($colunas->where('key', 'paciente_prontuario')->first()))
<td rowspan="{{ $rowspanPaciente }}" class="text-center">{{ $item->paciente_prontuario }}</td>
@endif
@if(!is_null($colunas->where('key', 'paciente_prontuario_unidade')->first()))
<td rowspan="{{ $rowspanPaciente }}" class="text-center">{{ $item->paciente_prontuario_unidade ?? '-' }}</td>
@endif
@endif
<td rowspan="{{ $material->retiradas->count() }}" class="text-center">{{ $material->data_primeira_retirada }}</td>
<td rowspan="{{ $material->retiradas->count() }}">{{ $material->material_descricao }}</td>
<td class="text-center">{{ $material->retiradas[0] }}</td>
</tr>
@foreach ($material->retiradas as $j => $retirada)
@if ($j > 0)
<tr class="{{ $rowClass }}">
<td class="text-center">{{ $retirada }}</td>
</tr>
@endif
@endforeach
@endforeach
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,129 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-relatorio > thead > tr > th,
.table-relatorio > tfoot > tr > th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
.paciente_cpf, .paciente_cns { white-space: nowrap !important; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período de envio DRS:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $inicio }} até {{ $fim }}
</div>
<div class="col-6">
{{ $unidade }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-3">
<strong>Setor:</strong>
</div>
<div class="col-3">
<strong>Tipo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-3">
{{ $setor }}
</div>
<div class="col-3">
{{ $tipo }}
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Subtipo:</strong>
</div>
<div class="col-9">
<strong>Paciente:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{ $subtipo }}
</div>
<div class="col-9">
{{ $paciente }}
</div>
</div>
</fieldset>
<table class="table table-relatorio">
<thead>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
@foreach ($colunas as $coluna)
@if (in_array($coluna['key'], ['material_descricao', 'quantidade_solicitada']))
<td class="{{ $coluna['class'] }}">
@foreach ($item->materiais as $material)
<div>{{ $material->{$coluna['key']} }}</div>
@endforeach
</td>
@else
<td class="{{ $coluna['class'] }} {{ $coluna['key'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
@endif
@endforeach
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th colspan="{{ count($colunas) }}">
<span>
Total de pacientes: <span style="font-weight: normal;">{{ $totalizadores->pacientes }}</span>
</span>
<span style="margin-left: 10px;">
Total de processos: <span style="font-weight: normal;">{{ $totalizadores->processos }}</span>
</span>
<span style="margin-left: 10px;">
Total de medicamentos: <span style="font-weight: normal;">{{ $totalizadores->medicamentos }}</span>
</span>
</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,102 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-relatorio > thead > tr > th,
.table-relatorio > tfoot > tr > th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-2">
<strong>Data:</strong>
</div>
<div class="col-4">
<strong>Período de solicitação:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-2">
{{ $periodoTipo }}
</div>
<div class="col-4">
De {{ $inicio }} até {{ $fim }}
</div>
<div class="col-6">
{{ $unidade }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Setor:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $setor }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Paciente:</strong>
</div>
<div class="col-6">
<strong>Medicamento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $paciente }}
</div>
<div class="col-6">
{{ $material }}
</div>
</div>
</fieldset>
<table class="table table-relatorio">
<thead>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,107 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.text-center {
text-align: center !important;
}
.margin-top {
margin-top: 15px;
}
.col-min {
width: 1%;
}
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $start_date }} até {{ $end_date }}
</div>
<div class="col-6">
{{ $unidade_nome_fantasia }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Tipo de receita:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura_nome }}
</div>
<div class="col-6">
{{ $receita_tipo }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Paciente:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $paciente_nome }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@foreach ($columns as $column)
<th class="{{ $column['class'] }}">{{ $column['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens['dispensacoes'] as $item)
<tr>
@foreach ($columns as $column)
<td class="{{ $column['class'] }}">{{ $item->{$column['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
<table class="table">
<thead>
<tr>
<th class="text-center">
<span>
Total de pacientes: <span class="font-normal">{{ $itens['totalizadores']->pacientes }}</span>
</span>
<span style="margin-left: 10px;">
Total de medicamentos: <span class="font-normal">{{ $itens['totalizadores']->medicamentos }}</span>
</span>
</th>
</tr>
</thead>
</table>
@endsection

View File

@@ -0,0 +1,229 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.text-center {
text-align: center !important;
}
.margin-top {
margin-top: 15px;
}
.margin-left {
margin-left: 15px;
}
.font-normal {
font-weight: normal;
}
.table {
font-size: 12px;
}
.col-min {
width: 1%;
}
.page-break {
page-break-inside: avoid;
}
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $start_date }} até {{ $end_date }}
</div>
<div class="col-6">
{{ $unidade_nome_fantasia }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Profissional:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura_nome }}
</div>
<div class="col-6">
{{ $profissional_prescritor_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Tipo de receita:</strong>
</div>
<div class="col-6">
<strong>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $receita_tipo_nome }}
</div>
<div class="col-6">
{{ $grupo_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
<div class="col-6">
<strong>Medicamento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $subgrupo_nome }}
</div>
<div class="col-6">
{{ $material_descricao }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Paciente:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $paciente_nome }}
</div>
</div>
</fieldset>
@foreach ($itens['pacientes'] as $key => $item)
<table class="table {{ $key > 0 ? 'margin-top' : '' }}">
<thead>
<tr>
<th colspan="{{ $columns->count() }}">
<div>
<span>
Paciente: <span class="font-normal">{{ $item->paciente_nome }}</span>
</span>
<span style="margin-left: 10px;">
Prontuário: <span class="font-normal">{{ $item->paciente_prontuario }}</span>
</span>
<span style="margin-left: 10px;">
Data de nascimento: <span class="font-normal">{{ $item->paciente_data_nascimento }}</span>
</span>
<span style="margin-left: 10px;">
CNS: <span class="font-normal">{{ $item->paciente_cns }}</span>
</span>
</div>
<div>
<span>
Endereço: <span class="font-normal">{{ $item->paciente_endereco }}</span>
</span>
</div>
</th>
</tr>
</thead>
<tbody>
<tr class="page-break">
@foreach ($columns as $column)
<th class="{{ $column['class'] }}">{{ $column['label'] }}</th>
@endforeach
</tr>
@foreach ($item->entregas as $entrega)
<tr>
@foreach ($columns as $column)
@if (in_array($column['key'], ['quantidade', 'lote', 'data_validade', 'valor_unitario']))
<td class="{{ $column['class'] }}">
@foreach ($entrega->lotes as $lote)
<div>{{ $lote->{$column['key']} }}</div>
@endforeach
</td>
@else
<td class="{{ $column['class'] }}">{{ $entrega->{$column['key']} ?? '-' }}</td>
@endif
@endforeach
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th class="text-center" colspan="{{ $columns->count() }}">
<span>
Total de atendimentos: <span class="font-normal">{{ $item->atendimentos }}</span>
<span>
<span class="margin-left">
Total de medicamentos: <span class="font-normal">{{ $item->medicamentos }}</span>
</span>
<span class="margin-left">
Valor total: <span class="font-normal">{{ $item->valor_total }}</span>
</span>
</th>
</tr>
</tfoot>
</table>
@endforeach
<table class="table margin-top">
<thead>
<tr>
<th class="text-center">
<span>
Total de pacientes: <span class="font-normal">{{ $itens['totalizadores']->pacientes }}</span>
</span>
<span style="margin-left: 10px;">
Total de atendimentos: <span class="font-normal">{{ $itens['totalizadores']->atendimentos }}</span>
</span>
<span style="margin-left: 10px;">
Total de medicamentos: <span class="font-normal">{{ $itens['totalizadores']->medicamentos }}</span>
</span>
<span style="margin-left: 10px;">
Valor total: <span class="font-normal">{{ $itens['totalizadores']->valor_total }}</span>
</span>
</th>
</tr>
</thead>
</table>
@endsection

View File

@@ -0,0 +1,85 @@
@extends('impressoes.layout1.content')
<style>
* {
font-size: 14px;
}
</style>
@section('conteudo')
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{$periodo['inicio'] }} até {{ $periodo['fim']}}
</div>
<div class="col-6">
{{$unidade}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Medicamento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$infraestrutura}}
</div>
<div class="col-6">
{{$material}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Paciente:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$paciente}}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@foreach ($columns as $column)
<th class="{{$column['class']}}">{{$column['label']}}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
@foreach ($columns as $column)
<td class="{{$column['class']}}">{{$item->{$column['key']} ?? '-'}}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,129 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-relatorio > thead > tr > th,
.table-relatorio > tfoot > tr > th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $inicio }} até {{ $fim }}
</div>
<div class="col-6">
{{ $unidade }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Setor:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $setor }}
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Médico solicitante:</strong>
</div>
<div class="col-2">
<strong>Tipo da receita:</strong>
</div>
<div class="col-6">
<strong>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-4">
{{ $usuarioSolicitante }}
</div>
<div class="col-2">
{{ $tipoReceita }}
</div>
<div class="col-6">
{{ $grupo }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
<div class="col-6">
<strong>Medicamento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $subgrupo }}
</div>
<div class="col-6">
{{ $material }}
</div>
</div>
</fieldset>
<table class="table table-relatorio">
<thead>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th colspan="{{ $colunas->count() - 1 }}"></th>
<th>{{ $totalizadores->quantidade }}</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,67 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $start_date }} até {{ $end_date }}
</div>
<div class="col-6">
{{ $unidade_nome_fantasia }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Medicamento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura_nome }}
</div>
<div class="col-6">
{{ $material_descricao }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@foreach ($columns as $column)
<th class="{{ $column['class'] }}">{{ $column['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
@foreach ($columns as $column)
<td class="{{ $column['class'] }}">{{ $item->{$column['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,98 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-relatorio > thead > tr > th,
.table-relatorio > tfoot > tr > th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $inicio }} até {{ $fim }}
</div>
<div class="col-6">
{{ $unidade }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Setor:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $setor }}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Medicamento:</strong>
</div>
</div>
<div class="row">
<div class="col-12">
{{ $material }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
</thead>
</table>
<table class="table table-relatorio">
<thead>
<tr>
<th colspan="{{ count($colunas) }}" style="text-align: right;">
<span><strong>Estoque anterior:</strong> <span style="font-weight: normal;">{{ $estoqueAnterior }}</span></span>
</th>
</tr>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,138 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.text-center {
text-align: center !important;
}
.margin-top {
margin-top: 15px;
}
.margin-left {
margin-left: 15px;
}
.font-normal {
font-weight: normal;
}
.table {
font-size: 12px;
}
.col-min {
width: 1%;
}
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $start_date }} até {{ $end_date }}
</div>
<div class="col-6">
{{ $unidade_nome_fantasia }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura_nome }}
</div>
<div class="col-6">
{{ $grupo_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Medicamento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $material_descricao }}
</div>
</div>
</fieldset>
@foreach ($itens['pacientes'] as $key => $item)
<table class="table {{ $key > 0 ? 'margin-top' : '' }}">
<thead>
<tr>
<th colspan="{{ $columns->count() }}">
<div>
<span>
Paciente: <span class="font-normal">{{ $item->paciente_nome }}</span>
</span>
<span style="margin-left: 10px;">
Prontuário: <span class="font-normal">{{ $item->paciente_prontuario }}</span>
</span>
</div>
</th>
</tr>
<tr>
@foreach ($columns as $column)
<th class="{{ $column['class'] }}">{{ $column['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($item->entregas as $entrega)
<tr>
@foreach ($columns as $column)
<td class="{{ $column['class'] }}">{{ $entrega->{$column['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th class="text-center" colspan="{{ $columns->count() }}">
<span class="margin-left">
Total de dispensações: <span class="font-normal">{{ $item->dispensacoes }}</span>
</span>
</th>
</tr>
</tfoot>
</table>
@endforeach
<table class="table margin-top">
<thead>
<tr>
<th class="text-center">
<span style="margin-left: 10px;">
Total de medicamentos: <span class="font-normal">{{ $itens['totalizadores']->dispensacoes }}</span>
</span>
</th>
</tr>
</thead>
</table>
@endsection

View File

@@ -0,0 +1,113 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-relatorio > thead > tr > th,
.table-relatorio > tfoot > tr > th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $inicio }} até {{ $fim }}
</div>
<div class="col-6">
{{ $unidade }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento:</strong>
</div>
<div class="col-6">
<strong>Setor:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $setor }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Grupo:</strong>
</div>
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $grupo }}
</div>
<div class="col-6">
{{ $subgrupo }}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Medicamento:</strong>
</div>
</div>
<div class="row">
<div class="col-12">
{{ $material }}
</div>
</div>
</fieldset>
<table class="table table-relatorio">
<thead>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th colspan="{{ $colunas->count() - 1 }}"></th>
<th>{{ $totalizadores->quantidade }}</th>
</tr>
</tfoot>
</table>
@endsection