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,124 @@
@extends('impressoes.layout1.content')
<style>
* {
font-size: 14px;
}
</style>
@section('conteudo')
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Data:</strong>
</div>
<div class="col-6">
<strong>Hora:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{$data['start']}} até {{$data['end']}}
</div>
<div class="col-6">
De {{$hora['start']}} até {{$hora['end']}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Usuário:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$usuario}}
</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>Módulo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$infraestrutura}}
</div>
<div class="col-6">
{{$modulo}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Funcionalidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$funcionalidade}}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Data</th>
<th>Hora</th>
<th>Usuário</th>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Módulo</th>
<th>Funcionalidade</th>
</tr>
</thead>
<tbody>
@foreach($dados['itens'] as $item)
<tr>
<td>{{$item->data}}</td>
<td>{{$item->hora}}</td>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->unidade_nome_fantasia}}</td>
<td>{{$item->infraestrutura_nome}}</td>
<td>{{$item->modulo_nome}}</td>
<td>{{$item->funcionalidade_nome}}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th
colspan="7"
style="text-align: right;"
>
Total: {{$dados['totalizadores']['total_acessos']}}
</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,123 @@
@extends('impressoes.layout1.content')
<style>
* {
font-size: 14px;
}
</style>
@section('conteudo')
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Data:</strong>
</div>
<div class="col-6">
<strong>Hora:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{$data['start']}} até {{$data['end']}}
</div>
<div class="col-6">
De {{$hora['start']}} até {{$hora['end']}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Usuário:</strong>
</div>
<div class="col-6">
<strong>Status:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$usuario}}
</div>
<div class="col-6">
{{$status}}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Data</th>
<th>Hora</th>
<th>Usuário</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach($dados['itens'] as $item)
<tr>
<td>{{Carbon\Carbon::parse($item->data)->format('d/m/Y')}}</td>
<td>{{$item->hora}}</td>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->status_nome}}</td>
</tr>
@endforeach
</tbody>
</table>
<fieldset>
<legend>Totais</legend>
<div class="row">
<div class="col-2">
<strong>Total de acessos:</strong>
</div>
<div class="col-3">
<strong>Total de acessos realizados com sucesso:</strong>
</div>
<div class="col-3">
<strong>Total de usuário e/ou senha incorretos:</strong>
</div>
<div class="col-2">
<strong>Total de usuários bloqueados:</strong>
</div>
<div class="col-2">
<strong>Total de usuários que acessaram o sistema:</strong>
</div>
</div>
<div class="row">
<div class="col-2">
{{$dados['totalizadores']['total_acessos']}}
</div>
<div class="col-3">
{{$dados['totalizadores']['total_acesso_realizado_com_sucesso']}}
</div>
<div class="col-3">
{{$dados['totalizadores']['total_usuario_e_ou_senha_incorretos']}}
</div>
<div class="col-2">
{{$dados['totalizadores']['total_usuario_bloqueado']}}
</div>
<div class="col-2">
{{$dados['totalizadores']['total_usuario_acesso']}}
</div>
</div>
</fieldset>
@endsection

View File

@@ -0,0 +1,119 @@
@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>CBO:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura_nome }}
</div>
<div class="col-6">
{{ $ocupacao_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Papel:</strong>
</div>
<div class="col-6">
<strong>Tipo de ação:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $papel_nome }}
</div>
<div class="col-6">
{{ $historico_acao_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Usuário:</strong>
</div>
<div class="col-6">
<strong>Permitido por:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $usuario_nome }}
</div>
<div class="col-6">
{{ $usuario_responsavel_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 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,139 @@
@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>CBO:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura_nome }}
</div>
<div class="col-6">
{{ $ocupacao_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Módulo:</strong>
</div>
<div class="col-6">
<strong>Funcionalidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $modulo_nome }}
</div>
<div class="col-6">
{{ $funcionalidade_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Permissão para:</strong>
</div>
<div class="col-6">
<strong>Tipo de ação:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $crud_acao_nome }}
</div>
<div class="col-6">
{{ $historico_acao_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Usuário:</strong>
</div>
<div class="col-6">
<strong>Permitido por:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $usuario_nome }}
</div>
<div class="col-6">
{{ $usuario_responsavel_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 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,111 @@
@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>Papel:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $start_date }} até {{ $end_date }}
</div>
<div class="col-6">
{{ $papel_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Módulo:</strong>
</div>
<div class="col-6">
<strong>Funcionalidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $modulo_nome }}
</div>
<div class="col-6">
{{ $funcionalidade_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Permissão para:</strong>
</div>
<div class="col-6">
<strong>Tipo de ação:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $crud_acao_nome }}
</div>
<div class="col-6">
{{ $historico_acao_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Permitido por:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $usuario_responsavel_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 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,33 @@
@extends('impressoes.layout1.content')
<style>
* {
font-size: 14px;
}
</style>
@section('conteudo')
<table class="table">
<thead>
<tr>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Papel</th>
<th>Usuário</th>
<th>CBO</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->unidade_nome_fantasia}}</td>
<td>{{$item->infraestrutura_nome}}</td>
<td>{{$item->papel_nome}}</td>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->ocupacao_nome}}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,35 @@
@extends('impressoes.layout1.content')
<style>
* {
font-size: 14px;
}
</style>
@section('conteudo')
<table class="table">
<thead>
<tr>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Usuário</th>
<th>CBO</th>
<th>Módulo</th>
<th>Funcionalidade</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->unidade_nome_fantasia}}</td>
<td>{{$item->infraestrutura_nome}}</td>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->ocupacao_nome}}</td>
<td>{{$item->modulo_nome}}</td>
<td>{{$item->funcionalidade_nome}}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,29 @@
@extends('impressoes.layout1.content')
<style>
* {
font-size: 14px;
}
</style>
@section('conteudo')
<table class="table">
<thead>
<tr>
<th>Papel</th>
<th>Módulo</th>
<th>Funcionalidade</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->papel_nome}}</td>
<td>{{$item->modulo_nome}}</td>
<td>{{$item->funcionalidade_nome}}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,185 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-baixa > thead > tr > th { text-align: center; white-space: nowrap; }
.col-min { width: 1%; }
</style>
<fieldset>
<legend>Dados</legend>
<div class="row">
<div class="col-6">
<strong>Data</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $data }}
</div>
</div>
<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">
{{ $localAtendimento }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor:</strong>
</div>
<div class="col-6">
<strong>Usuário:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $setor }}
</div>
<div class="col-6">
{{ $usuario }}
</div>
</div>
<div class="row">
<div class="col-10">
<strong>Endereço:</strong>
</div>
<div class="col-2">
<strong>Telefone:</strong>
</div>
</div>
<div class="row">
<div class="col-10">
{{ $endereco }}
</div>
<div class="col-2">
{{ $telefone }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Motivo:</strong>
</div>
@if(!is_null($usuarioSolicitante))
<div class="col-6">
<strong>Usuário solicitante:</strong>
</div>
@endif
</div>
<div class="row">
<div class="col-6">
{{ $motivo }}
</div>
@if(!is_null($usuarioSolicitante))
<div class="col-6">
{{ $usuarioSolicitante }}
</div>
@endif
</div>
@if(!is_null($justificativa))
<div class="row">
<div class="col-12">
<strong>Justificativa:</strong>
</div>
</div>
<div class="row">
<div class="col-12">
{{ $justificativa }}
</div>
</div>
@endif
</fieldset>
<table class="table table-baixa">
<thead>
<tr>
<th>Material</th>
<th class="col-min">Lote</th>
<th class="col-min">Validade</th>
<th class="col-min">Quantidade</th>
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
<td>
{{ $item['material']['descricao'] }}
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['lote'] ?? '-' }}
@endforeach
@else
-
@endif
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['validade_lote'] ?? '-' }}
@endforeach
@else
-
@endif
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['quantidade_saida'] }}
@endforeach
@else
{{ $item['quantidade'] }}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,212 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-balancete > thead > tr > th,
.table-balancete > tfoot > tr > th { text-align: center; white-space: nowrap; }
.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>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{ $inicio }} até {{ $fim }}
</div>
<div class="col-6">
{{ $grupo ?? 'Todos' }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $subgrupo ?? 'Todos' }}
</div>
</div>
</fieldset>
<table class="table table-balancete">
<thead>
<tr>
<th colspan="{{ $colunas->contains('material')
? ($colunas->contains('subgrupo') ? 4 : 3)
: ($colunas->contains('subgrupo') ? 2 : 1)
}}"></th>
<th colspan="{{ $colunas->contains('saldoFisico') && $colunas->contains('saldoFinanceiro') ? 2 : 1 }}">
Saldo anterior
</th>
<th colspan="{{ $colunas->contains('saldoFisico') && $colunas->contains('saldoFinanceiro') ? 2 : 1 }}">
Entrada
</th>
<th colspan="{{ $colunas->contains('saldoFisico') && $colunas->contains('saldoFinanceiro') ? 2 : 1 }}">
Saída
</th>
<th colspan="{{ $colunas->contains('saldoFisico') && $colunas->contains('saldoFinanceiro') ? 2 : 1 }}">
Saldo atual
</th>
</tr>
<tr>
@if($colunas->contains('material'))
<th class="col-min">Código</th>
<th>Material</th>
@endif
<th>Grupo</th>
@if($colunas->contains('subgrupo'))
<th>Subgrupo</th>
@endif
@if($colunas->contains('saldoFisico'))
<th class="col-min">Físico</th>
@endif
@if($colunas->contains('saldoFinanceiro'))
<th class="col-min">Financeiro</th>
@endif
@if($colunas->contains('saldoFisico'))
<th class="col-min">Físico</th>
@endif
@if($colunas->contains('saldoFinanceiro'))
<th class="col-min">Financeiro</th>
@endif
@if($colunas->contains('saldoFisico'))
<th class="col-min">Físico</th>
@endif
@if($colunas->contains('saldoFinanceiro'))
<th class="col-min">Financeiro</th>
@endif
@if($colunas->contains('saldoFisico'))
<th class="col-min">Físico</th>
@endif
@if($colunas->contains('saldoFinanceiro'))
<th class="col-min">Financeiro</th>
@endif
</tr>
</thead>
<tbody>
@foreach ($itens->all() as $item)
<tr>
<tr>
@if($colunas->contains('material'))
<td>{{ $item->material_codigo }}</td>
<td>{{ $item->material_descricao }}</td>
@endif
<td>{{ $item->grupo_nome }}</td>
@if($colunas->contains('subgrupo'))
<td>{{ $item->subgrupo_nome }}</td>
@endif
@if($colunas->contains('saldoFisico'))
<td class="text-center">{{ $item->saldo_anterior_fisico }}</td>
@endif
@if($colunas->contains('saldoFinanceiro'))
<td class="text-center">{{ $item->saldo_anterior_financeiro }}</td>
@endif
@if($colunas->contains('saldoFisico'))
<td class="text-center">{{ $item->saldo_entrada_fisico }}</td>
@endif
@if($colunas->contains('saldoFinanceiro'))
<td class="text-center">{{ $item->saldo_entrada_financeiro }}</td>
@endif
@if($colunas->contains('saldoFisico'))
<td class="text-center">{{ $item->saldo_saida_fisico }}</td>
@endif
@if($colunas->contains('saldoFinanceiro'))
<td class="text-center">{{ $item->saldo_saida_financeiro }}</td>
@endif
@if($colunas->contains('saldoFisico'))
<td class="text-center">{{ $item->saldo_atual_fisico }}</td>
@endif
@if($colunas->contains('saldoFinanceiro'))
<td class="text-center">{{ $item->saldo_atual_financeiro }}</td>
@endif
</tr>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
@if($colunas->contains('material') && $colunas->contains('subgrupo'))
<th colspan="4"></th>
@elseif($colunas->contains('material') && !$colunas->contains('subgrupo'))
<th colspan="3"></th>
@elseif(!$colunas->contains('material') && $colunas->contains('subgrupo'))
<th colspan="2"></th>
@else
<th></th>
@endif
@if($colunas->contains('saldoFisico'))
<th>{{ $totalizadores['saldo_anterior_fisico'] }}</th>
@endif
@if($colunas->contains('saldoFinanceiro'))
<th>{{ $totalizadores['saldo_anterior_financeiro'] }}</th>
@endif
@if($colunas->contains('saldoFisico'))
<th>{{ $totalizadores['saldo_entrada_fisico'] }}</th>
@endif
@if($colunas->contains('saldoFinanceiro'))
<th>{{ $totalizadores['saldo_entrada_financeiro'] }}</th>
@endif
@if($colunas->contains('saldoFisico'))
<th>{{ $totalizadores['saldo_saida_fisico'] }}</th>
@endif
@if($colunas->contains('saldoFinanceiro'))
<th>{{ $totalizadores['saldo_saida_financeiro'] }}</th>
@endif
@if($colunas->contains('saldoFisico'))
<th>{{ $totalizadores['saldo_atual_fisico'] }}</th>
@endif
@if($colunas->contains('saldoFinanceiro'))
<th>{{ $totalizadores['saldo_atual_financeiro'] }}</th>
@endif
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,87 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-inventario > thead > tr > th { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-12">
<strong>Local de atendimento:</strong>
</div>
</div>
<div class="row">
<div class="col-12">
{{ $localAtendimento }}
</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 ?? 'Todos' }}
</div>
<div class="col-6">
{{ $subgrupo ?? 'Todos' }}
</div>
</div>
</fieldset>
<table class="table table-inventario">
<thead>
<tr>
<th>Código</th>
<th>Descrição</th>
<th>Lote</th>
<th>Validade</th>
@if(!isset($grupo))
<th>Grupo</th>
@endif
@if(!isset($subgrupo))
<th>Subgrupo</th>
@endif
<th>Status</th>
<th>Estoque</th>
<th>Contagem</th>
</tr>
</thead>
<tbody>
@foreach ($materiais as $material)
<tr>
<td class="text-center">{{ $material->codigo_material }}</td>
<td>{{ $material->descricao }}</td>
<td class="text-center">{{ $material->lote }}</td>
<td class="text-center">{{ $material->validade_lote }}</td>
@if(!isset($grupo))
<td class="text-center">{{ $material->grupo }}</td>
@endif
@if(!isset($subgrupo))
<td class="text-center">{{ $material->subgrupo }}</td>
@endif
<td class="text-center">{{ $material->is_ativo ? 'ATIVO' : 'INATIVO' }}</td>
<td class="text-center">{{ $material->estoque }}</td>
<td class="text-center">{{ $material->contagem }}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,122 @@
@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-6">
<strong>Material:</strong>
</div>
<div class="col-6">
<strong>Tipo de Documento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $material }}
</div>
<div class="col-6">
{{ $tipo_documento }}
</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() - 2 }}"></th>
<th>{{ $totalizadores['total'] }}</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,154 @@
@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>Unidade requisitante:</strong>
</div>
<div class="col-6">
<strong>Local de atendimento requisitante:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $unidadeRequisitante }}
</div>
<div class="col-6">
{{ $infraestruturaRequisitante }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor requisitante:</strong>
</div>
<div class="col-6">
<strong>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $setorRequisitante }}
</div>
<div class="col-6">
{{ $grupo }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
<div class="col-6">
<strong>Material:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $subgrupo }}
</div>
<div class="col-6">
{{ $material }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Tipo de cálculo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $tipoCalculo }}
</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() - 2 }}"></th>
<th>{{ $totalizadores->total }}</th>
<th>{{ $totalizadores->saldo_atual }}</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,167 @@
@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-6">
<strong>Fornecedor:</strong>
</div>
<div class="col-3">
<strong>Tipo do documento:</strong>
</div>
<div class="col-3">
<strong>Número do documento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $fornecedor }}
</div>
<div class="col-3">
{{ $tipo_documento }}
</div>
<div class="col-3">
{{ $numero_documento }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Material:</strong>
</div>
<div class="col-6">
<strong>Tipo Entrada:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $material }}
</div>
<div class="col-6">
{{ $tipo_entrada }}
</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() - 2 }}"></th>
<th>{{ $totalizadores['valor_unitario'] }}</th>
<th>{{ $totalizadores['total'] }}</th>
</tr>
</tfoot>
</table>
<fieldset>
<h5>Orientações</h5>
<div>
<strong>Data do documento</strong> Data de emissão fiscal do documento (quando aplicável). Movimentos sem documento mostram ‘—’.
</div>
<div>
<strong>Finalizada em</strong> Data em que a entrada foi efetivamente confirmada e contabilizada no estoque e no balancete.
</div>
<div>
<strong>Valor total</strong> Soma do valor unitário x quantidade. Exibido em reais (R$). Linhas com valor 0,00 indicam entradas sem valor financeiro.
</div>
<div>
<strong>Total Quantidade / Total Financeiro</strong> Apresenta o total físico (por unidade de medida) e o total financeiro (R$) do período consultado.
</div>
</fieldset>
@endsection

View File

@@ -0,0 +1,119 @@
@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>Fornecedor:</strong>
</div>
<div class="col-6">
<strong>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $fornecedor }}
</div>
<div class="col-6">
{{ $grupo }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
<div class="col-6">
<strong>Material:</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,127 @@
@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-3">
<strong>Setor:</strong>
</div>
<div class="col-3">
<strong>Tipo de saída:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-3">
{{ $setor }}
</div>
<div class="col-3">
{{ $tipoSaida }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Usuário requisitante:</strong>
</div>
<div class="col-6">
<strong>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $usuarioRequisitante }}
</div>
<div class="col-6">
{{ $grupo }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
<div class="col-6">
<strong>Material:</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,122 @@
@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-3">
<strong>Tipo de movimentação:</strong>
</div>
<div class="col-3">
<strong>Subtipo de movimentação:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{$periodo['start']}} até {{$periodo['end']}}
</div>
<div class="col-3">
{{$movimentacao_tipo}}
</div>
<div class="col-3">
{{$movimentacao_subtipo}}
</div>
</div>
<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>Usuário:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$setor}}
</div>
<div class="col-6">
{{$usuario}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Origem programática:</strong>
</div>
<div>
<strong>Material:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$origem_programatica}}
</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,134 @@
@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; }
.text-danger { color: #dc3545; }
.text-success { color: #28a745; }
.text-warning { color: #ffc107; }
</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_nome_fantasia }}
</div>
<div class="col-6">
{{ $infraestrutura_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor:</strong>
</div>
<div class="col-6">
<strong>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $setor_nome }}
</div>
<div class="col-6">
{{ $grupo_nome }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
<div>
<strong>Material:</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>Status:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $status }}
</div>
</div>
</fieldset>
<table class="table table-relatorio">
<thead>
<tr>
<th colspan="{{ sizeof($colunas) - 4 }}"></th>
<th colspan="4">
Estoque
</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)
@if (in_array($coluna['key'], ['lote', 'validade_lote', 'quantidade']))
<td class="{{ $coluna['class'] }}">
@foreach ($item->lotes as $lote)
<div>{{ $lote->{$coluna['key']} }}</div>
@endforeach
</td>
@elseif ($coluna['key'] == 'status')
<td class="
{{ $coluna['class'] }}
{{ $item->status['value'] == 'abaixo_minimo' ? 'text-danger' : '' }}
{{ $item->status['value'] == 'normal' ? 'text-success' : '' }}
{{ $item->status['value'] == 'acima_maximo' ? 'text-warning' : '' }}
">
{{ $item->status['text'] ?? '-' }}
</td>
@else
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
@endif
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,327 @@
@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; }
.margin-bottom { margin-bottom: 15px; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período:</strong>
</div>
<div class="col-6">
<strong>Unidade (Almoxarifado):</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 (Almoxarifado):</strong>
</div>
<div class="col-6">
<strong>Setor (Almoxarifado):</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>Unidade requisitante:</strong>
</div>
<div class="col-6">
<strong>Local de atendimento requisitante:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $unidadeRequisitante }}
</div>
<div class="col-6">
{{ $infraestruturaRequisitante }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor requisitante:</strong>
</div>
<div class="col-6">
<strong>Usuário requisitante:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $setorRequisitante }}
</div>
<div class="col-6">
{{ $usuarioRequisitante }}
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Status:</strong>
</div>
<div class="col-3">
<strong>Número:</strong>
</div>
<div class="col-6">
<strong>Grupo:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{ $status }}
</div>
<div class="col-3">
{{ $numero }}
</div>
<div class="col-6">
{{ $grupo }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Subgrupo:</strong>
</div>
<div class="col-6">
<strong>Material:</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 ($requisicoes as $requisicao)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }}">{{ $requisicao->{$coluna['key']} ?? '-' }}</td>
@endforeach
</tr>
@if ($withDetails)
<tr>
<td colspan="{{ $colunas->count() }}">
@if ($requisicao->respostas->isNotEmpty())
@foreach ($requisicao->respostas as $k => $resposta)
<table class="table table-relatorio margin-bottom">
<thead>
<tr>
<th colspan="7" style="text-align: left !important;">
<span><strong>{{ $resposta->numero_resposta }}ª resposta</strong></span>
@if (!is_null($resposta->data_hora_envio))
<span><br>Data/hora envio: {{ $resposta->data_hora_envio }} ({{ $resposta->usuario_envio }})</span>
@endif
@if (!is_null($resposta->data_hora_recebimento))
<span><br>Data/hora recebimento: {{ $resposta->data_hora_recebimento }}</span>
@endif
</th>
</tr>
<tr>
<th>Material</th>
<th class="col-min">{{ $resposta->numero_resposta === 1 ? 'Requisitado' : 'Restante requisitado' }}</th>
<th class="col-min">Lote</th>
<th class="col-min">Validade</th>
<th class="col-min">Enviado</th>
<th class="col-min">Recebido</th>
<th style="width: 150px">Motivo da diferença entre solicitado e enviado</th>
</tr>
</thead>
<tbody>
@foreach ($resposta->itens as $item)
<tr>
<td>{{ $item->material }}</td>
<td class="text-center">{{ $item->requisitado }}</td>
<td class="text-center">
@if ($item->possui_entrada_com_lote)
@if ($item->entrada_itens->isNotEmpty())
@foreach ($item->entrada_itens as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote->lote ?? '-' }}
@endforeach
@else
-
@endif
@else
-
@endif
</td>
<td class="text-center">
@if ($item->possui_entrada_com_lote)
@if ($item->entrada_itens->isNotEmpty())
@foreach ($item->entrada_itens as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote->validade_lote ?? '-' }}
@endforeach
@else
-
@endif
@else
-
@endif
</td>
<td class="text-center">
@if ($item->possui_entrada_com_lote)
@if ($item->entrada_itens->isNotEmpty())
@foreach ($item->entrada_itens as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote->enviado ?? '-' }}
@endforeach
@else
0
@endif
@else
{{ $item->enviado }}
@endif
</td>
<td class="text-center">
@if ($item->possui_entrada_com_lote)
@if ($item->entrada_itens->isNotEmpty())
@foreach ($item->entrada_itens as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote->recebido ?? '-' }}
@endforeach
@else
0
@endif
@else
{{ $item->recebido }}
@endif
</td>
<td>
{{ $item->motivo_diferenca ?? '-' }}
</td>
</tr>
@endforeach
</tbody>
@if (!is_null($resposta->observacoes))
<tfoot>
<tr>
<th colspan="7" style="text-align: left !important;">
<span>
<strong>Observações:</strong> <span style="font-weight: normal;">{{ $resposta->observacoes }}</span>
</span>
</th>
</tr>
</tfoot>
@endif
</table>
@endforeach
@else
<table class="table table-relatorio margin-bottom">
<thead>
<tr>
<th>Material</th>
<th class="col-min text-center">Requisitado</th>
<th class="col-min text-center">Lote</th>
<th class="col-min text-center">Validade</th>
<th class="col-min text-center">Enviado</th>
<th class="col-min text-center">Recebido</th>
<th style="width: 150px">Motivo da diferença entre solicitado e enviado</th>
</tr>
</thead>
<tbody>
@foreach ($requisicao->itens as $item)
<tr>
<td>{{ $item->material }}</td>
<td class="col-min text-center">{{ $item->requisitado }}</td>
<td class="col-min text-center">-</td>
<td class="col-min text-center">-</td>
<td class="col-min text-center">-</td>
<td class="col-min text-center">-</td>
<td>-</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</td>
</tr>
@endif
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,189 @@
@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-3">
<strong>Tipo:</strong>
</div>
<div class="col-3">
<strong>Motivo:</strong>
</div>
<div class="col-6">
<strong>Usuário que realizou a saída:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{ $tipo }}
</div>
<div class="col-3">
{{ $motivo }}
</div>
<div class="col-6">
{{ $usuarioSaida }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Unidade requisitante:</strong>
</div>
<div class="col-6">
<strong>Local de atendimento requisitante:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $unidadeRequisitante }}
</div>
<div class="col-6">
{{ $infraestruturaRequisitante }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor requisitante:</strong>
</div>
<div class="col-6">
<strong>Usuário requisitante:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $setorRequisitante }}
</div>
<div class="col-6">
{{ $usuarioRequisitante }}
</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>
<strong>Material:</strong>
</div>
</div>
<div class="row">
<div>
{{ $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>
<tr>
<th colspan="{{ $colunas->count() }}" style="white-space: nowrap">
@foreach ($totalizadores->tipos as $i => $totalizadorTipo)
@if($i > 0)|@endif {{ $totalizadorTipo->nome }}: {{ $totalizadorTipo->quantidade }}
@endforeach
</th>
</tr>
</tfoot>
</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-3">
<strong>Setor:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-3">
{{ $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-6">
<strong>Material:</strong>
</div>
</div>
<div class="row">
<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['total'] }}</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,134 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-inventario > thead > tr > th { text-align: center; white-space: nowrap; }
.col-min { width: 1%; }
.col-lote { width: 15%; }
.d-inline-block { display: inline-block; }
</style>
<div class="row">
<div class="col-2">
<strong>Data da requisição:</strong>
</div>
<div class="col-4">
<strong>Número:</strong>
</div>
</div>
<div class="row">
<div class="col-2">
{{ $data }}
</div>
<div class="col-4">
{{ $numero }}
</div>
</div>
<fieldset>
<legend>Dados do requisitante</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">
{{ $requisitante['unidade'] }}
</div>
<div class="col-6">
{{ $requisitante['local_atendimento'] }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor:</strong>
</div>
<div class="col-6">
<strong>Usuário:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $requisitante['setor'] }}
</div>
<div class="col-6">
{{ $requisitante['usuario'] }}
</div>
</div>
<div class="row">
<div class="col-10">
<strong>Endereço:</strong>
</div>
<div class="col-2">
<strong>Telefone:</strong>
</div>
</div>
<div class="row">
<div class="col-10">
{{ $requisitante['endereco'] }}
</div>
<div class="col-2">
{{ $requisitante['telefone'] }}
</div>
</div>
</fieldset>
<table class="table table-inventario">
<thead>
<tr>
<th class="col-min">Código</th>
<th>Descrição</th>
@if($isPrimeiroEnvio)
<th class="col-min">Requisitado</th>
@else
<th class="col-min">Entregue</th>
<th class="col-min">Restante requisitado</th>
@endif
<th class="col-lote">Lote</th>
<th class="col-min">Validade</th>
<th class="col-min">Conceder</th>
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
<td class="text-center">{{ $item['material']['codigo'] }}</td>
<td>{{ $item['material']['descricao_completa'] }}</td>
@if($isPrimeiroEnvio)
<td class="text-center">{{ $item['requisitado'] }}</td>
@else
<td class="text-center">{{ $item['entregue'] }}</td>
<td class="text-center">{{ $item['restante_requisitado'] }}</td>
@endif
<td class="text-center"></td>
<td class="text-center"></td>
<td class="text-center"></td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,195 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-inventario > thead > tr > th { text-align: center; white-space: nowrap; }
.col-min { width: 1%; }
.d-inline-block { display: inline-block; }
</style>
<div class="row">
<div class="col-2">
<strong>Data da requisição:</strong>
</div>
<div class="col-4">
<strong>Número:</strong>
</div>
</div>
<div class="row">
<div class="col-2">
{{ $data }}
</div>
<div class="col-4">
{{ $numero }}
</div>
</div>
<fieldset>
<legend>Dados do requisitante</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">
{{ $requisitante['unidade'] }}
</div>
<div class="col-6">
{{ $requisitante['local_atendimento'] }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor:</strong>
</div>
<div class="col-6">
<strong>Usuário:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $requisitante['setor'] }}
</div>
<div class="col-6">
{{ $requisitante['usuario'] }}
</div>
</div>
<div class="row">
<div class="col-10">
<strong>Endereço:</strong>
</div>
<div class="col-2">
<strong>Telefone:</strong>
</div>
</div>
<div class="row">
<div class="col-10">
{{ $requisitante['endereco'] }}
</div>
<div class="col-2">
{{ $requisitante['telefone'] }}
</div>
</div>
</fieldset>
<table class="table table-inventario">
<thead>
<tr>
<th class="col-min">Código</th>
<th>Descrição</th>
@if($isPrimeiroEnvio)
<th class="col-min">Requisitado</th>
@else
<th class="col-min">Entregue</th>
<th class="col-min">Restante requisitado</th>
@endif
<th class="col-min">Lote</th>
<th class="col-min">Validade</th>
<th class="col-min">Enviado</th>
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
<td class="text-center">{{ $item['material']['codigo'] }}</td>
<td>{{ $item['material']['descricao_completa'] }}</td>
@if($isPrimeiroEnvio)
<td class="text-center">{{ $item['requisitado'] }}</td>
@else
<td class="text-center">{{ $item['entregue'] }}</td>
<td class="text-center">{{ $item['restante_requisitado'] }}</td>
@endif
@if ($item['entrada_itens']->isEmpty())
@for ($i = 0; $i < 3; $i++)
<td class="text-center">-</td>
@endfor
@else
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['lote'] ?? '-' }}
@endforeach
@else
-
@endif
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['validade_lote'] ?? '-' }}
@endforeach
@else
-
@endif
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['quantidade_saida'] }}
@endforeach
@else
{{ $item['concedido'] }}
@endif
</td>
@endif
</tr>
@endforeach
</tbody>
</table>
<div class="text-center" style="margin-top: 30px">
<div class="d-inline-block">
<strong>Recebido por</strong>
</div>
<div class="d-inline-block" style="border-bottom: 1px solid black; width: 400px;">
&nbsp;
</div>
<div class="d-inline-block">
<strong>Data</strong>
</div>
<div class="d-inline-block">
______/______/______
</div>
</div>
@endsection

View File

@@ -0,0 +1,174 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-saida > thead > tr > th { text-align: center; white-space: nowrap; }
.col-min { width: 1%; }
.d-inline-block { display: inline-block; }
</style>
<div class="row">
<div class="col-2">
<strong>Data da requisição:</strong>
</div>
<div class="col-4">
<strong>Número:</strong>
</div>
</div>
<div class="row">
<div class="col-2">
{{ $data }}
</div>
<div class="col-4">
{{ $numero }}
</div>
</div>
<fieldset>
<legend>Dados do requisitante</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">
{{ $requisitante['unidade'] }}
</div>
<div class="col-6">
{{ $requisitante['local_atendimento'] }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor:</strong>
</div>
<div class="col-6">
<strong>Usuário:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $requisitante['setor'] }}
</div>
<div class="col-6">
{{ $requisitante['usuario'] }}
</div>
</div>
<div class="row">
<div class="col-10">
<strong>Endereço:</strong>
</div>
<div class="col-2">
<strong>Telefone:</strong>
</div>
</div>
<div class="row">
<div class="col-10">
{{ $requisitante['endereco'] }}
</div>
<div class="col-2">
{{ $requisitante['telefone'] }}
</div>
</div>
</fieldset>
<table class="table table-saida">
<thead>
<tr>
<th>Material</th>
<th class="col-min">Lote</th>
<th class="col-min">Validade</th>
<th class="col-min">Quantidade</th>
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
<td>
{{ $item['material']['descricao_completa'] }}
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['lote'] ?? '-' }}
@endforeach
@else
-
@endif
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['validade_lote'] ?? '-' }}
@endforeach
@else
-
@endif
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['quantidade_saida'] }}
@endforeach
@else
{{ $item['quantidade'] }}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="text-center" style="margin-top: 30px">
<div class="d-inline-block">
<strong>Recebido por</strong>
</div>
<div class="d-inline-block" style="border-bottom: 1px solid black; width: 400px;">
&nbsp;
</div>
<div class="d-inline-block">
<strong>Data</strong>
</div>
<div class="d-inline-block">
______/______/______
</div>
</div>
@endsection

View File

@@ -0,0 +1,154 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-transferencia > thead > tr > th { text-align: center; white-space: nowrap; }
.col-min { width: 1%; }
.d-inline-block { display: inline-block; }
</style>
<fieldset>
<legend>Dados do destino</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">
{{ $destino['unidade'] }}
</div>
<div class="col-6">
{{ $destino['local_atendimento'] }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Setor:</strong>
</div>
<div class="col-6">
<strong>Usuário:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $destino['setor'] }}
</div>
<div class="col-6">
{{ $destino['usuario'] }}
</div>
</div>
<div class="row">
<div class="col-10">
<strong>Endereço:</strong>
</div>
<div class="col-2">
<strong>Telefone:</strong>
</div>
</div>
<div class="row">
<div class="col-10">
{{ $destino['endereco'] }}
</div>
<div class="col-2">
{{ $destino['telefone'] }}
</div>
</div>
</fieldset>
<table class="table table-transferencia">
<thead>
<tr>
<th>Material</th>
<th class="col-min">Lote</th>
<th class="col-min">Validade</th>
<th class="col-min">Quantidade</th>
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
<td>
{{ $item['material']['descricao_completa'] }}
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['lote'] ?? '-' }}
@endforeach
@else
-
@endif
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['validade_lote'] ?? '-' }}
@endforeach
@else
-
@endif
</td>
<td class="text-center">
@if ($item['possui_entrada_com_lote'])
@foreach ($item['entrada_itens'] as $i => $lote)
@if ($i > 0)
<br>
@endif
{{ $lote['quantidade_saida'] }}
@endforeach
@else
{{ $item['quantidade'] }}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="text-center" style="margin-top: 30px">
<div class="d-inline-block">
<strong>Recebido por</strong>
</div>
<div class="d-inline-block" style="border-bottom: 1px solid black; width: 400px;">
&nbsp;
</div>
<div class="d-inline-block">
<strong>Data</strong>
</div>
<div class="d-inline-block">
______/______/______
</div>
</div>
@endsection

View File

@@ -0,0 +1,192 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Identificação do paciente</legend>
<div class="row">
<div class="col-3">
<strong>Nome</strong>
<div>
{{ $paciente['nome'] }}
</div>
</div>
<div class="col-3">
<strong>Nome social</strong>
<div>
{{ $paciente['nome_social'] }}
</div>
</div>
<div class="col-3">
<strong>Data de nascimento</strong>
<div>
{{ $paciente['data_nascimento'] }}
</div>
</div>
<div class="col-3">
<strong>Idade</strong>
<div>
{{ $paciente['idade'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Prontuário municipal</strong>
<div>
{{ $paciente['prontuario'] }}
</div>
</div>
<div class="col-3">
<strong>CPF</strong>
<div>
{{ $paciente['cpf'] }}
</div>
</div>
<div class="col-3">
<strong>CNS</strong>
<div>
{{ $paciente['cns'] }}
</div>
</div>
<div class="col-3">
<strong>Nome da mãe</strong>
<div>
{{ $paciente['nome_mae'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Telefone</strong>
<div>
{{ $paciente['telefone'] }}
</div>
</div>
<div class="col-3">
<strong>Município / Estado</strong>
<div>
{{ $paciente['municipio_uf'] }}
</div>
</div>
<div class="col-3">
<strong>Unidade de referência</strong>
<div>
{{ $paciente['unidade_referencia'] }}
</div>
</div>
<div class="col-3">
<strong>Classificação</strong>
<div>
{{ $paciente['classificacao'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Validade do cadastro</strong>
<div>
{{ $paciente['validade_fim'] }}
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período</strong>
<div>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Origem do atendimento</strong>
<div>
{{ $origem }}
</div>
</div>
</div>
</fieldset>
<table class="table" style="margin-bottom: 15px;">
<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>
<table class="table">
<tr>
<th colspan="4">Totais</th>
</tr>
<tr>
<th>Agendado</th>
<th>Realizado</th>
<th>Reagendado pelo paciente</th>
<th>Reagendado pelo médico</th>
</tr>
<tr>
<td class="text-center">{{ $totalizadores->agendado }}</td>
<td class="text-center">{{ $totalizadores->realizado }}</td>
<td class="text-center">{{ $totalizadores->reagendado_pelo_paciente }}</td>
<td class="text-center">{{ $totalizadores->reagendado_pelo_medico }}</td>
</tr>
<tr>
<th>Cancelado pelo paciente</th>
<th>Cancelado pelo médico</th>
<th>Falta do paciente</th>
<th>Falta do médico</th>
</tr>
<tr>
<td class="text-center">{{ $totalizadores->cancelado_pelo_paciente }}</td>
<td class="text-center">{{ $totalizadores->cancelado_pelo_medico }}</td>
<td class="text-center">{{ $totalizadores->falta_paciente }}</td>
<td class="text-center">{{ $totalizadores->falta_medico }}</td>
</tr>
<tr>
<th>Em aberto</th>
<th>Evadido</th>
<th colspan="2">Total geral</th>
</tr>
<tr>
<td class="text-center">{{ $totalizadores->em_aberto }}</td>
<td class="text-center">{{ $totalizadores->evadido }}</td>
<td colspan="2" class="text-center">{{ $totalizadores->geral }}</td>
</tr>
</table>
@endsection

View File

@@ -0,0 +1,157 @@
@extends('impressoes.layout-cupom.content')
@section('conteudo')
<style>
.col-min { width: 1%; }
.rows { margin-top: 5px; }
.text-center { text-align: center; }
.mensagem-especialidade-atencao { margin: 25px 0 25px 0; }
.usuario-agendamento { font-size: 12px; }
</style>
@if ($unidade['nome_fantasia'])
<div class="row rows">
<div class="col-12">
<strong>Unidade de agendamento</strong>
<div>
{{ $unidade['nome_fantasia'] }}
</div>
</div>
</div>
@endif
<div class="row rows">
<div class="col-12">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura['nome'] }}
</div>
</div>
</div>
<div class="row rows">
<div class="col-12">
<strong>Endereço do local de atendimento</strong>
<div>
{{ $infraestrutura['endereco'] }}
</div>
</div>
</div>
<div class="row rows">
<div class="col-12">
<strong>Telefone do local de atendimento</strong>
<div>
{{ $infraestrutura['telefone'] }}
</div>
</div>
</div>
<div class="row rows">
<div class="col-12">
<strong>Paciente</strong>
<div>
{{ $paciente['nome'] }}
@if(isset($paciente['nome_social']))
<strong>({{$paciente['nome_social']}})</strong>
@endif
</div>
</div>
</div>
<div class="row rows">
<div class="col-12">
<strong>Prontuário</strong>
<div>
{{ $paciente['prontuario'] }}
</div>
</div>
</div>
<div class="row rows">
<div class="col-12">
<strong>Tipo</strong>
<div>
{{ $tipo['nome'] }}
</div>
</div>
</div>
<div class="text-center">
<h2>
{{ $data }} ({{ $diaSemana }}) às {{ $horario }}
</h2>
</div>
@if(!empty($observacao))
<div class="row">
<div class="col-12">
<strong>Observação</strong>
<div>
{{ $observacao }}
</div>
</div>
</div>
@endif
<div class="row rows">
<div class="col-12">
<strong>Profissional Solicitante</strong>
<div>
{{ $usuario['nome'] }}
</div>
</div>
</div>
<div class="row rows">
<div class="col-12">
<strong>Especialidade</strong>
<div>
{{ $especialidade['nome'] }}
</div>
</div>
</div>
@if(!empty($regulacaoProtocoloFechamento))
@if (!isset($regulacaoProtocoloFechamento) || $regulacaoProtocoloFechamento === false)
<div class="row rows">
<div class="col-12">
<strong>Protocolo de fechamento</strong>
<div>
{{ $regulacaoProtocoloFechamento }}
</div>
</div>
</div>
@endif
@endif
@if(!empty($especialidade['mensagem_protocolo_agendamento']))
<div class="text-center mensagem-especialidade-atencao">
{{ $especialidade['mensagem_protocolo_agendamento'] }}
</div>
@endif
@if(!empty($regulacaoMensagemComprovanteAgendamento))
<div class="text-center mensagem-especialidade-atencao">
{{ $regulacaoMensagemComprovanteAgendamento }}
</div>
@endif
<div class="text-center mensagem-especialidade-atencao">
<strong>ATENÇÃO</strong>
<p>
Caso não possa comparecer na consulta agendada favor desmarcar com 2 (dois) dias de antecedência para
que possamos encaixar outro paciente nesse horário.
</p>
</div>
<div class="row rows text-center usuario-agendamento">
<div class="col-12">
Agendado por {{ $usuarioAgendamento['nome_social'] ?? $usuarioAgendamento['nome'] }} na data {{ $usuarioAgendamento['data_hora'] }},
na unidade {{ $usuarioAgendamento['unidade'] }}, no local de atendimento {{ $usuarioAgendamento['infraestrutura'] }},
no setor {{ $usuarioAgendamento['setor'] }}.
</div>
</div>
@endsection

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,202 @@
@extends('impressoes.layout1.content')
@php
use App\Enums\Ambulatorio\AtestadoModelo;
@endphp
@section('conteudo')
<style>
.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>
@foreach ($atestados['atestados'] as $atestado)
<div style="page-break-before: always">
@if ($atestado['modelo_id'] === AtestadoModelo::PADRAO)
@if ($atestado['is_atestado_acompanhante'] === true)
<div>
Atesto, para os devidos fins, que o(a) Sr(a) {{$atestado['nome_acompanhante']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
acompanhou o(a) Sr(a) {{$atestado['paciente']['nome']}} na unidade
{{$atestado['unidade']['nome_fantasia']}} no dia {{$atestado['data']}} às {{$atestado['horario']}}.
</div>
@if(!empty($atestado['dias']) && $atestado['dias'] > 0)
<div>
Em decorrência, deverá permanecer em afastamento de suas atividades laborativas
por um período de {{ $atestado['dias'] }} ({{ $atestado['dias_por_extenso'] }})
{{ $atestado['dias'] > 1 ? 'dias' : 'dia' }} a partir desta data.
</div>
@endif
@else
<div>
Atesto, para os devidos fins, que {{$atestado['paciente']['nome']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
passou por atendimento na unidade {{$atestado['unidade']['nome_fantasia']}}
no dia {{$atestado['data']}} às {{$atestado['horario']}}
@if(!empty($atestado['cid']))com diagnóstico segundo CID10 {{$atestado['cid']}}.@endif
Em decorrência, deverá permanecer em afastamento de suas atividades laborativas
por um período de {{$atestado['dias']}} ({{$atestado['dias_por_extenso']}})
{{$atestado['dias'] > 1 ? 'dias' : 'dia'}} a partir desta data.
</div>
@endif
@elseif ($atestado['modelo_id'] === AtestadoModelo::PERIODO_MANHA)
@if ($atestado['is_atestado_acompanhante'] === true)
<div>
Atesto, para os devidos fins, que o(a) Sr(a) {{$atestado['nome_acompanhante']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
acompanhou o(a) Sr(a) {{$atestado['paciente']['nome']}} na unidade
{{$atestado['unidade']['nome_fantasia']}} no dia {{$atestado['data']}}.
</div>
<div>
Em decorrência, deverá permanecer em afastamento do período da manhã da data {{$atestado['data']}}.
</div>
@else
<div>
Atesto, para os devidos fins, que {{$atestado['paciente']['nome']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
passou por atendimento na unidade {{$atestado['unidade']['nome_fantasia']}}
no dia {{$atestado['data']}}
@if(!empty($atestado['cid']))com diagnóstico segundo CID10 {{$atestado['cid']}}.@endif
Em decorrência, deverá permanecer em afastamento do período da manhã da data {{$atestado['data']}}.
</div>
@endif
@elseif ($atestado['modelo_id'] === AtestadoModelo::PERIODO_TARDE)
@if ($atestado['is_atestado_acompanhante'] === true)
<div>
Atesto, para os devidos fins, que o(a) Sr(a) {{$atestado['nome_acompanhante']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
acompanhou o(a) Sr(a) {{$atestado['paciente']['nome']}} na unidade
{{$atestado['unidade']['nome_fantasia']}} no dia {{$atestado['data']}}.
</div>
<div>
Em decorrência, deverá permanecer em afastamento do período da tarde da data {{$atestado['data']}}.
</div>
@else
<div>
Atesto, para os devidos fins, que {{$atestado['paciente']['nome']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
passou por atendimento na unidade {{$atestado['unidade']['nome_fantasia']}}
no dia {{$atestado['data']}}
@if(!empty($atestado['cid']))com diagnóstico segundo CID10 {{$atestado['cid']}}.@endif
Em decorrência, deverá permanecer em afastamento do período da tarde da data {{$atestado['data']}}.
</div>
@endif
@elseif ($atestado['modelo_id'] === AtestadoModelo::PERIODO_NOITE)
@if ($atestado['is_atestado_acompanhante'] === true)
<div>
Atesto, para os devidos fins, que o(a) Sr(a) {{$atestado['nome_acompanhante']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
acompanhou o(a) Sr(a) {{$atestado['paciente']['nome']}} na unidade
{{$atestado['unidade']['nome_fantasia']}} no dia {{$atestado['data']}}.
</div>
<div>
Em decorrência, deverá permanecer em afastamento do período da noite da data {{$atestado['data']}}.
</div>
@else
<div>
Atesto, para os devidos fins, que {{$atestado['paciente']['nome']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
passou por atendimento na unidade {{$atestado['unidade']['nome_fantasia']}}
no dia {{$atestado['data']}}
@if(!empty($atestado['cid']))com diagnóstico segundo CID10 {{$atestado['cid']}}.@endif
Em decorrência, deverá permanecer em afastamento do período da noite da data {{$atestado['data']}}.
</div>
@endif
@elseif ($atestado['modelo_id'] === AtestadoModelo::QUANTIDADE_HORAS)
@if ($atestado['is_atestado_acompanhante'] === true)
<div>
Atesto, para os devidos fins, que o(a) Sr(a) {{$atestado['nome_acompanhante']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
acompanhou o(a) Sr(a) {{$atestado['paciente']['nome']}} na unidade
{{$atestado['unidade']['nome_fantasia']}} no dia {{$atestado['data']}}.
</div>
<div>
Em decorrência, deverá permanecer em afastamento de suas atividades laborativas
por {{$atestado['quantidade_horas']}} ({{ $atestado['quantidade_horas'] > 1 ? 'horas' : 'hora' }})
a partir de {{$atestado['horario_inicial']}} da data {{$atestado['data']}}.
</div>
@else
<div>
Atesto, para os devidos fins, que {{$atestado['paciente']['nome']}},
{{$atestado['documento']['tipo']}} {{$atestado['documento']['numero']}}
passou por atendimento na unidade {{$atestado['unidade']['nome_fantasia']}}
no dia {{$atestado['data']}}
@if(!empty($atestado['cid']))com diagnóstico segundo CID10 {{$atestado['cid']}}.@endif
Em decorrência, deverá permanecer em afastamento de suas atividades laborativas
por {{$atestado['quantidade_horas']}} ({{ $atestado['quantidade_horas'] > 1 ? 'horas' : 'hora' }})
a partir de {{$atestado['horario_inicial']}} da data {{$atestado['data']}}.
</div>
@endif
@else
<div style="page-break-before: always">
<div>{{$atestado['descricao']}}</div>
{{-- Assinatura só deste bloco --}}
<div class="assinatura">
@if (! data_get($atestados, 'paraAssinar', false))
<div class="assinatura-linha"></div>
@endif
<div>{{$atestado['informacoes_administrativas']['usuario_nome']}}</div>
<div>{{$atestado['informacoes_administrativas']['ocupacao_descricao']}}</div>
<div>{{$atestado['informacoes_administrativas']['documento']}}</div>
</div>
</div>
@endif
@if ($atestado['modelo_id'] !== AtestadoModelo::EM_BRANCO)
<div class="assinatura">
@if (! data_get($atestados, 'paraAssinar', false))
<div class="assinatura-linha"></div>
@endif
<div>{{$atestado['informacoes_administrativas']['usuario_nome']}}</div>
<div>{{$atestado['informacoes_administrativas']['ocupacao_descricao']}}</div>
<div>{{$atestado['informacoes_administrativas']['documento']}}</div>
</div>
@endif
@if (!$atestado['is_atestado_acompanhante'] && !empty($atestado['cid']))
<h3 class="text-center" style="margin-top:80px;">AUTORIZAÇÃO</h3>
<div class="text-justify area">
Eu, @include('impressoes.components.paciente-nome', $atestado['paciente']) autorizo o(a) Dr(a). {{$atestado['informacoes_administrativas']['usuario_nome']}}, a registrar o diagnóstico codificado CID ou por
extenso neste atestado médico.
</div>
<div class="assinatura">
@if (! data_get($atestados, 'paraAssinar', false))
<div class="assinatura-linha"></div>
@endif
<div><strong>Assinatura do paciente ou responsável</strong></div>
</div>
@endif
</div>
@endforeach
@endsection

View File

@@ -0,0 +1,189 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.assinatura { margin: 0 auto; width: 400px; text-align: center; padding-top: 80px; page-break-inside: avoid; }
.assinatura-linha { border-top: 2px solid #000000; margin-bottom: 5px; }
.descricao { word-break: break-word; padding: 10px; white-space: pre-wrap; }
</style>
@foreach ($cartasMedicas['cartasMedicas'] as $cartaMedica)
<div style="page-break-before: always">
<fieldset>
<legend>Identificação do emitente</legend>
<div class="row">
<div class="{{$cartaMedica['usuario']['registro_tipo'] ? 'col-6' : 'col-12'}}">
<strong>Nome</strong>
<div>
{{$cartaMedica['usuario']['nome']}}
</div>
</div>
@if ($cartaMedica['usuario']['registro_tipo'])
<div class="col-6">
<strong>{{$cartaMedica['usuario']['registro_tipo']}}</strong>
<div>
{{$cartaMedica['usuario']['registro_numero']}}
</div>
</div>
@endif
</div>
<div class="row">
<div class="col-6">
<strong>Unidade</strong>
<div>
{{$cartaMedica['usuario']['unidade']['nome']}}
</div>
</div>
<div class="col-6">
<strong>Endereço</strong>
<div>
{{$cartaMedica['usuario']['unidade']['endereco']}}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Telefone</strong>
<div>
{{$cartaMedica['usuario']['unidade']['telefone']}}
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>Identificação do paciente</legend>
<div class="row">
<div class="col-6">
<strong>Nome</strong>
<div>
{{$cartaMedica['paciente']['nome']}}
</div>
</div>
<div class="col-6">
<strong>Nome social</strong>
<div>
{{$cartaMedica['paciente']['nome_social']}}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Data de nascimento</strong>
<div>
{{$cartaMedica['paciente']['data_nascimento']}}
</div>
</div>
<div class="col-6">
<strong>Idade</strong>
<div>
{{$cartaMedica['paciente']['idade']}}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Prontuário</strong>
<div>
{{$cartaMedica['paciente']['prontuario']}}
</div>
</div>
<div class="col-6">
<strong>CNS</strong>
<div>
{{$cartaMedica['paciente']['cns']}}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>CPF</strong>
<div>
{{$cartaMedica['paciente']['cpf']}}
</div>
</div>
<div class="col-6">
<strong>RG</strong>
<div>
{{$cartaMedica['paciente']['rg']}}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Sexo</strong>
<div>
{{$cartaMedica['paciente']['sexo']}}
</div>
</div>
<div class="col-6">
<strong>Nome da mãe</strong>
<div>
{{$cartaMedica['paciente']['nome_mae']}}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Telefone</strong>
<div>
{{$cartaMedica['paciente']['telefone']}}
</div>
</div>
<div class="col-6">
<strong>Endereço</strong>
<div>
{{$cartaMedica['paciente']['endereco']}}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Unidade de referência:</strong>
<div>
{{$cartaMedica['paciente']['unidade']}}
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>Descrição</legend>
<div class="row">
<div class="col-4 descricao">
{{$cartaMedica['descricao']}}
</div>
</div>
</fieldset>
</div>
@endforeach
<div class="assinatura">
@if (! data_get($cartasMedicas, 'paraAssinar', false))
<div class="assinatura-linha"></div>
@endif
<div>{{ $cartaMedica['informacoes_administrativas']['usuario_nome'] }}</div>
<div>{{ $cartaMedica['informacoes_administrativas']['ocupacao_descricao'] }}</div>
<div>{{ $cartaMedica['informacoes_administrativas']['documento'] }}</div>
</div>
@endsection

View File

@@ -0,0 +1,46 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.assinatura { margin: 0 auto; width: 400px; text-align: center; padding-top: 80px; page-break-inside: avoid; }
.assinatura-linha { border-top: 2px solid #000000; margin-bottom: 5px; }
</style>
@foreach ($declaracoes['declaracoes'] as $declaracao)
<div style="page-break-before: always">
<div>
<p>
Declaro que {{ $declaracao['paciente']['nome'] }} @if($declaracao['paciente']['nome_social'])<strong>({{$declaracao['paciente']['nome_social']}})</strong>@endif, permaneceu na unidade {{ $declaracao['unidade'] }}{{ $declaracao['infraestrutura'] != $declaracao['unidade'] ? "({$declaracao['infraestrutura']})" : '' }} no dia {{ $declaracao['data'] }}
@if (isset($declaracao['turno']))
no turno da {{ $declaracao['turno'] }}{{ isset($declaracao['nome_acompanhante']) ? '' : '.' }}
@else
das {{ $declaracao['entrada'] }} até às {{ $declaracao['saida'] }}{{ isset($declaracao['nome_acompanhante']) || isset($declaracao['motivo_comparecimento']) ? '' : '.' }}
@endif
@isset ($declaracao['nome_acompanhante'])
com acompanhamento de {{ $declaracao['nome_acompanhante'] }}{{ isset($declaracao['motivo_comparecimento']) ? '' : '.' }}
@endisset
@isset ($declaracao['motivo_comparecimento'])
por motivo de {{ $declaracao['motivo_comparecimento'] }}.
@endisset
</p>
</div>
<div class="assinatura">
@if (! data_get($declaracoes, 'paraAssinar', false))
<div class="assinatura-linha"></div>
@endif
<div>{{ $declaracao['informacoes_administrativas']['usuario_nome'] }}</div>
<div>{{ $declaracao['informacoes_administrativas']['ocupacao_descricao'] }}</div>
<div>{{ $declaracao['informacoes_administrativas']['documento'] }}</div>
</div>
@endforeach
</div>
@endsection

View File

@@ -0,0 +1,639 @@
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>Laudo de Solicitação de Internação</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Arial, sans-serif;
font-size: 15px;
line-height: 1.3;
color: #1b1b1b;
width: 100%;
}
.header-title {
text-align: center;
font-size: 25px;
font-weight: bold;
margin-bottom: 10px;
margin-top: 8px;
text-transform: uppercase;
}
fieldset {
width: 100%;
height: 100%;
box-sizing: border-box;
border: 1px solid #222222;
margin-bottom: 5px;
padding: 5px;
position: relative;
}
legend {
font-weight: bold;
font-size: 16px;
white-space: nowrap;
left:3px;
background: #fff;
position: relative;
z-index: 2;
}
.cell {
border: 1px solid #000;
padding: 2px 4px;
vertical-align: top;
}
.cell-label {
font-size: 15px;
font-weight: bold;
display: block;
margin-bottom: 2px;
}
.cell-value {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
min-height: 19px;
}
.inner-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 6px;
vertical-align: center
}
.inner-table:last-child {
margin-bottom: 0;
}
.causa-options{
display:flex;
flex-direction:column;
justify-content:center;
align-items:flex-start;
font-size:15px;
}
.vinculo-options {
display: block;
padding: 2px 6px;
font-size: 15px;
}
.vinculo-options span {
margin-right: 14px;
white-space: nowrap;
}
.aih-cell {
padding: 4px;
vertical-align: top;
width: 180px;
}
.date-slash {
color: #555;
letter-spacing: 6px;
}
#logotipo {
max-width: 120px;
max-height: 80px;
width: auto;
height: auto;
object-fit: contain;
}
.header-left {
width: 140px;
vertical-align: middle;
}
.cell-value:empty::before {
content: "\00a0";
}
footer {
color: #222222;
display: block;
font-family: Helvetica;
font-size: 14px;
padding-top: 5mm;
}
.footer {
border-top: 2px solid #000000;
width: 100%;
}
.footer-left {
text-align: left;
line-height: 20px;
}
.footer-right {
text-align: right;
line-height: 20px;
font-size: 12px;
}
</style>
</head>
<body>
<table class="header">
<tr>
<td class="header-left">
<img
alt="Logotipo"
id="logotipo"
src="data:image/png;base64, {{ $cliente['logotipo'] }}"
/>
</td>
<td class="header-right">
<p>Prefeitura de {{ $cliente['nome'] }} - Secretaria Municipal de {{ $cliente['ramoAtividade']}}</p>
<p>{{ $cliente['infraestrutura']['nomeUnidade'] }} - {{ $cliente['infraestrutura']['telefone'] }} </p>
<div>
{{$cliente['infraestrutura']['endereco']['tipo']}} {{$cliente['infraestrutura']['endereco']['logradouroNome']}},
@if($cliente['infraestrutura']['endereco']['numero'])
{{ $cliente['infraestrutura']['endereco']['numero']}},
@endif
@if($cliente['infraestrutura']['endereco']['referencia'])
{{ $cliente['infraestrutura']['endereco']['referencia']}},
@endif
{{$cliente['infraestrutura']['endereco']['bairro']}},
{{$cliente['infraestrutura']['endereco']['cep']}},
{{$cliente['infraestrutura']['endereco']['municipio']}} - {{$cliente['infraestrutura']['endereco']['uf']}}
</div>
</td>
</tr>
</table>
<div class="header-title">
{{ $title }}
</div>
<fieldset>
<legend>Identificação do estabelecimento de saúde</legend>
<table class="inner-table">
<tr>
<td style="width:82%">
<fieldset>
<legend>Unidade Solicitante</legend>
<span class="cell-value">{{ $internacao['unidade_solicitante']['nome'] }}</span>
</fieldset>
</td>
<td >
<fieldset>
<legend>CNES</legend>
<span class="cell-value">{{ $internacao['unidade_solicitante']['cnes'] }}</span>
</fieldset>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Identificação do paciente</legend>
<table class="inner-table">
<tr>
<td style="width:82%">
<fieldset>
<legend>Nome</legend>
<span class="cell-value">{{ $paciente['nome'] }}</span>
@if ($paciente['nome_social'])
@if ($paciente['prefere_nome_social'])
<strong>({{ $paciente['nome_social'] }})</strong>
@else
({{ $paciente['nome_social'] }})
@endif
@endif
</fieldset>
</td>
<td >
<fieldset>
<legend>Prontuário</legend>
<span class="cell-value">{{ $paciente['prontuario'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td style="width:24%">
<fieldset>
<legend>CNS</legend>
<span class="cell-value">{{ $paciente['cns'] }}</span>
</fieldset>
</td>
<td style="width:19%">
<fieldset>
<legend>CPF</legend>
<span class="cell-value">{{ $paciente['cpf'] }}</span>
</fieldset>
</td>
<td style="width:16%">
<fieldset>
<legend>Data de nascimento</legend>
<span class="cell-value"> {{ $paciente['data_nascimento'] }}</span>
</fieldset>
</td>
<td style="width:24%">
<fieldset>
<legend>Idade</legend>
<span class="cell-value">{{ $paciente['idade'] }}</span>
</fieldset>
</td>
<td >
<fieldset>
<legend>Sexo</legend>
<span class="cell-value"> {{ $paciente['sexo'] }} </span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td style="width:25%">
<fieldset>
<legend>Raça/Cor</legend>
<span class="cell-value">{{ $paciente['raca_cor'] }}</span>
</fieldset>
</td>
<td >
<fieldset>
<legend>Etnia indígena</legend>
<span class="cell-value"> {{ $paciente['etnia_indigena'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td style="width:82%">
<fieldset>
<legend>Nome da mãe</legend>
<span class="cell-value">{{ $paciente['nome_mae'] }}</span>
</fieldset>
</td>
<td >
<fieldset>
<legend>Contato</legend>
<span class="cell-value"> {{ $paciente['telefone'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td style="width:82%">
<fieldset>
<legend>Endereço</legend>
<span class="cell-value">{{ $paciente['endereco']['completo'] }}</span>
</fieldset>
</td>
<td >
<fieldset>
<legend>Código IBGE</legend>
<span class="cell-value"> {{ $paciente['endereco']['ibge'] }}</span>
</fieldset>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Justificativa da internação</legend>
<table class="inner-table">
<tr>
<td>
<fieldset>
<legend>Principais sinais e sintomas clínicos</legend>
<span class="cell-value">{{ $internacao['principais_sinais_sintomas_clinicos'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td>
<fieldset>
<legend>Condições que justificam a internação</legend>
<span class="cell-value">{{ $internacao['condicoes_que_justificam_internacao'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td>
<fieldset>
<legend>Principais resultados de provas diagnósticas (resultados de exames realizados)</legend>
<span class="cell-value">{{ $internacao['principais_resultados_de_provas_diagnosticas'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td style="width:50%">
<fieldset>
<legend>Diagnóstico inicial</legend>
<span class="cell-value">{{ optional($internacao['cid_principal'])['nome'] ?? '' }}</span>
</fieldset>
</td>
<td style="width:14%">
<fieldset>
<legend>CID principal</legend>
<span class="cell-value"> {{ optional($internacao['cid_principal'])['codigo'] ?? '' }}</span>
</fieldset>
</td>
<td style="width:14%">
<fieldset>
<legend>CID secundário</legend>
<span class="cell-value"> {{ $internacao['cid_secundario'] ?? '' }} </span>
</fieldset>
</td>
<td>
<fieldset>
<legend>CID causas associadas</legend>
<span class="cell-value">{{ $internacao['cid_causas_associadas'] ?? '' }}</span>
</fieldset>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Procedimento solicitado</legend>
<table class="inner-table">
<tr>
<td style="width:76%">
<fieldset>
<legend>Descrição do procedimento solicitado</legend>
<span class="cell-value">{{ $internacao['procedimento']['procedimento_solicitado']['nome'] }}</span>
</fieldset>
</td>
<td >
<fieldset>
<legend>Código do procedimento</legend>
<span class="cell-value">{{ $internacao['procedimento']['procedimento_solicitado']['codigo'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td style="width:37%">
<fieldset>
<legend>Clínica</legend>
<span class="cell-value">{{ $internacao['procedimento']['clinica'] }}</span>
</fieldset>
</td>
<td style="width:37%">
<fieldset>
<legend>Caráter de internação</legend>
<span class="cell-value">{{ $internacao['procedimento']['carater_internacao'] }}</span>
</fieldset>
</td>
<td >
<fieldset>
<legend>{{ $internacao['procedimento']['profissional_assistente_documento']['nome']}}</legend>
<span class="cell-value">{{ $internacao['procedimento']['profissional_assistente_documento']['numero'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td style="width:50%">
<fieldset>
<legend>Nome do profissional solicitante / Assistente</legend>
<span class="cell-value">{{ $internacao['procedimento']['profissional_solicitante_assistente'] }}</span>
</fieldset>
</td>
<td style="width:20%">
<fieldset>
<legend>Data da solicitação</legend>
<span class="cell-value"> {{ $internacao['procedimento']['data_solicitacao'] }}</span>
</fieldset>
</td>
<td >
<fieldset>
<legend>Assinatura e carimbo (Nº do registro do conselho)</legend>
<span class="cell-value">&nbsp;</span>
</fieldset>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Preencher em caso de causas externas (acidentes ou violências)</legend>
<table class="inner-table">
<tr>
<td style="width:35%; vertical-align: top;">
<fieldset style="width:100%; height:105px; box-sizing:border-box;">
<div class="causa-options">
@foreach($causa_externa['causas_externas'] as $id => $nome)
<p><span>({{ $id == $internacao['causas_externas']['causa_externa'] ? 'X': ' '}}) {{ $nome }}</span></p>
@endforeach
</div>
</fieldset>
</td>
<td style="vertical-align: top; padding-left: 6px;">
<table class="inner-table" style="width:100%; table-layout: fixed;">
<tr>
<td style="width:50%">
<fieldset>
<legend>CNPJ da seguradora</legend>
<span class="cell-value">{{ $internacao['causas_externas']['cnpj_seguradora'] }}</span>
</fieldset>
</td>
<td style="width:25%">
<fieldset>
<legend>Nº do bilhete</legend>
<span class="cell-value">{{ $internacao['causas_externas']['numero_bilhete'] }}</span>
</fieldset>
</td>
<td >
<fieldset>
<legend>Série</legend>
<span class="cell-value">{{ $internacao['causas_externas']['serie'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table" style="width:100%; table-layout: fixed;">
<tr>
<td style="width:37%">
<fieldset>
<legend>CNPJ empresa</legend>
<span class="cell-value">{{ $internacao['causas_externas']['cnpj_empresa'] }}</span>
</fieldset>
</td>
<td style="width:37%">
<fieldset>
<legend>CNAE da empresa</legend>
<span class="cell-value">{{ $internacao['causas_externas']['cnae_empresa'] }}</span>
</fieldset>
</td>
<td>
<fieldset>
<legend>CBOR</legend>
<span class="cell-value">{{ $internacao['causas_externas']['cbor'] }}</span>
</fieldset>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td>
<fieldset>
<legend>Vínculo com a previdência</legend>
<div class="vinculo-options">
@foreach($causa_externa['vinculos_previdencia'] as $id => $nome)
<span>({{ $id == $internacao['causas_externas']['vinculo_previdencia'] ? 'X': ' '}}) {{ $nome }}</span>
@endforeach
</div>
</fieldset>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Autorização</legend>
<table>
<tr>
<td style="width:82%; vertical-align: top;">
<table class="inner-table">
<tr>
<td style="width:66%">
<fieldset>
<legend>Nome do profissional autorizador</legend>
<span class="cell-value">{{ $internacao['autorizacao']['profissional_autorizador'] }}</span>
</fieldset>
</td>
<td>
<fieldset>
<legend>Código do órgão emissor</legend>
<span class="cell-value">{{ $internacao['autorizacao']['orgao_codigo_emissor'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td style="width:33%">
<fieldset>
<legend>Documento</legend>
<span class="cell-value">{{ $internacao['autorizacao']['profissional_autorizador_documento']['nome'] }}</span>
</fieldset>
</td>
<td>
<fieldset>
<legend>Nº documento (CNS/CPF) do profissional autorizador</legend>
<span class="cell-value">{{ $internacao['autorizacao']['profissional_autorizador_documento']['numero'] }}</span>
</fieldset>
</td>
</tr>
</table>
<table class="inner-table">
<tr>
<td style="width:160px;">
<fieldset>
<legend>Data da autorização</legend>
<span class="cell-value date-slash">
{{ $internacao['autorizacao']['data_autorizacao'] }}
</span>
</fieldset>
</td>
<td>
<fieldset>
<legend>Assinatura e carimbo (Nº do registro do conselho)</legend>
<span class="cell-value">&nbsp;</span>
</fieldset>
</td>
</tr>
</table>
</td>
<td class="aih-cell" style="height:175px; vertical-align: top;">
<fieldset style="width:100%; height:100%; box-sizing:border-box;">
<legend>Nº da autorização de internação hospitalar</legend>
<span class="cell-value">&nbsp;</span>
</fieldset>
</td>
</tr>
</table>
</fieldset>
<footer>
<table class="footer">
<tr>
<td class="footer-left">
<p>Página 1 de 1</span></p>
</td>
<td class="footer-right">
<p>Impresso por: {{$usuario['nome']}}</p>
<p>Unidade: {{$usuario['unidade']}} </p>
<p>Data/hora da impressão: {{ $usuario['data_hora_impressao']}}</p>
</td>
</tr>
</table>
</footer>
</body>
</html>

View File

@@ -0,0 +1,461 @@
<html lang="pt-BR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
* {
margin: 0;
padding: 0;
}
h2 {
font-size: 24px;
font-weight: normal;
}
h3 {
font-size: 20px;
font-weight: normal;
}
h4 {
font-size: 18px;
font-weight: normal;
}
.float-left {
float: left;
}
.clear {
clear: both;
}
.margin-left {
margin-left: 5px;
}
.margin-bottom-15 {
margin-bottom: 15px;
}
.margin-top-15 {
margin-top: 15px;
}
.margin-top-30 {
margin-top: 30px;
}
.text-center {
text-align: center;
}
.fieldset {
border: 1px solid black;
margin-top: 15px;
padding: 10px;
}
.row {
margin-bottom: 5px;
}
.classificacao-risco {
border: 1px solid black;
padding: 5px;
width: 350px;
text-align: center;
float: right;
}
.checkbox {
border: 1px solid black;
height: 22px;
margin-right: 5px;
width: 22px;
}
.text {
height: 24px;
line-height: 24px;
}
.line {
border-bottom: 1px solid black;
height: 24px;
line-height: 24px;
}
.line-encaminhamento {
width: 865px;
display: block;
white-space: normal;
word-break: break-word;
overflow-wrap: break-word;
line-height: 1.4;
padding: 4px 0 6px 0;
border-bottom: 1px solid #000;
height: auto;
}
.content {
margin: 0 auto;
width: 890px;
}
.page {
page-break-after: always;
position: relative;
height: 100vh;
}
</style>
</head>
<body>
@foreach ($data['encaminhamentos'] as $encaminhamento)
<div class="page">
@php
$quantidadeLinhas = ceil(strlen($encaminhamento['motivo']) / 90);
@endphp
<div class="content">
<header>
<div class="float-left text-center" style="width: 316px;">
<img alt="Logotipo" width="150px" height="150px" src="data:image/png;base64, {{$data['cliente']['logotipo']}}" />
</div>
<div class="float-left margin-top-15 text-center" style="width: 574px;">
<h2 class="margin-bottom-15">PREFEITURA MUNICIPAL DE {{$data['cliente']['nome']}}</h2>
<h4 class="margin-bottom-15">SECRETARIA MUNICIPAL DA SAÚDE</h4>
<h3>SISTEMA DE REFERÊNCIA E CONTRA-REFERÊNCIA</h3>
<h3>FICHA PARA ENCAMINHAMENTO</h3>
</div>
<div class="clear"></div>
</header>
<main>
@if($encaminhamento['classificacao_risco'])
<div class="margin-top-15 classificacao-risco">Classificação de risco: <strong>{{$encaminhamento['classificacao_risco']}}</strong></div>
<div class="clear"></div>
@endif
<div class="margin-top-30">
<div class="float-left text" style="width: 162px;">NOME DO USUÁRIO</div>
<div class="float-left line" style="width: 430px;"><strong>{{$encaminhamento['paciente']['nome']}}</strong></div>
<div class="float-left text" style="width: 118px;">PRONTUÁRIO</div>
<div class="float-left line" style="width: 180px;"><strong>{{$encaminhamento['paciente']['prontuario']}}</strong></div>
<div class="clear"></div>
<div class="float-left text" style="width: 120px;">NOME SOCIAL</div>
<div class="float-left line" style="width: 473px;"><strong>{{$encaminhamento['paciente']['nome_social']}}</strong></div>
<div class="float-left text" style="width: 42px;">CNS</div>
<div class="float-left line" style="width: 255px;"><strong>{{$encaminhamento['paciente']['cns']}}</strong></div>
<div class="clear"></div>
<div class="float-left text" style="width: 40px;">CPF</div>
<div class="float-left line" style="width: 160px;"><strong>{{$encaminhamento['paciente']['cpf']}}</strong></div>
<div class="float-left text" style="width: 35px;">RG</div>
<div class="float-left line" style="width: 160px;"><strong>{{$encaminhamento['paciente']['rg']}}</strong></div>
<div class="float-left text" style="width: 53px;">SEXO</div>
<div class="float-left line" style="width: 145px;"><strong>{{$encaminhamento['paciente']['sexo']}}</strong></div>
<div class="float-left text" style="width: 188px;">DATA DE NASCIMENTO</div>
<div class="float-left line" style="width: 108px;"><strong>{{$encaminhamento['paciente']['data_nascimento']}}</strong></div>
<div class="clear"></div>
<div class="float-left text" style="width: 60px;">IDADE</div>
<div class="float-left line" style="width: 280px;"><strong>{{$encaminhamento['paciente']['idade']}}</strong></div>
<div class="float-left text" style="width: 125px;">NOME DA MÃE</div>
<div class="float-left line" style="width: 425px;"><strong>{{$encaminhamento['paciente']['nome_mae']}}</strong></div>
<div class="clear"></div>
<div class="float-left text" style="width: 95px;">ENDEREÇO</div>
<div class="float-left line" style="width: 600px;"><strong>{{$encaminhamento['paciente']['logradouro']}}, @if ($encaminhamento['paciente']['sem_numero']) S/N @else {{ $encaminhamento['paciente']['numero'] }} @endif @if($encaminhamento['paciente']['complemento'])- {{$encaminhamento['paciente']['complemento']}}@endif</strong></div>
<div class="float-left text" style="width: 35px;">CEP</div>
<div class="float-left line" style="width: 160px;"><strong>{{$encaminhamento['paciente']['cep']}}</strong></div>
<div class="clear"></div>
<div class="float-left text" style="width: 70px;">BAIRRO</div>
<div class="float-left line" style="width: 350px;"><strong>{{$encaminhamento['paciente']['bairro']}}</strong></div>
<div class="float-left text" style="width: 95px;">MUNICÍPIO</div>
<div class="float-left line" style="width: 315px;"><strong>{{$encaminhamento['paciente']['municipio']}}</strong></div>
<div class="float-left text" style="width: 25px;">UF</div>
<div class="float-left line" style="width: 35px;"><strong>{{$encaminhamento['paciente']['uf']}}</strong></div>
<div class="clear"></div>
<div class="float-left text" style="width: 105px;">Código IBGE</div>
<div class="float-left line" style="width: 120px;"><strong>{{$encaminhamento['paciente']['ibge']}}</strong></div>
<div class="float-left text" style="width: 100px;">TELEFONES</div>
<div class="float-left line" style="width: 565px;">
<strong>
@foreach ($encaminhamento['paciente']['telefones'] as $i => $telefone)
{{$telefone . ($i < count($encaminhamento['paciente']['telefones']) - 1 ? ' / ' : '')}}
@endforeach
</strong>
</div>
<div class="clear"></div>
<div class="float-left text" style="width: 215px;">UNIDADE DE REFERÊNCIA</div>
<div class="float-left line" style="width: 675px;"><strong>{{$encaminhamento['paciente']['unidade_referencia']}}</strong></div>
<div class="clear"></div>
</div>
<div class="fieldset">
<h3 class="text-center">ENCAMINHAMENTO PARA</h3>
<div class="row">
<div class="float-left text" style="width: 108px;">INSTITUIÇÃO</div>
<div class="float-left line" style="width: 760px;"><strong>{{$encaminhamento['instituicao']}}</strong></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 94px;">ENDEREÇO</div>
<div class="float-left line" style="width: 774px;"><strong>{{$encaminhamento['endereco']}}</strong></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 320px;">ATENDIMENTO AGENDADO PARA O DIA</div>
<div class="float-left line text-center" style="width: 242px; letter-spacing: 10px;">&nbsp;&nbsp;/&nbsp;&nbsp;/&nbsp;&nbsp;</div>
<div class="float-left text" style="width: 65px;">Horário</div>
<div class="float-left line" style="width: 241px;"></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left checkbox text-center"><strong>{{$encaminhamento['pa'] ? 'X' : ''}}</strong></div>
<div class="float-left text" style="width: 250px;">P.A. (Urgência / Emergência)</div>
<div class="float-left checkbox text-center"><strong>{{$encaminhamento['consulta'] ? 'X' : ''}}</strong></div>
<div class="float-left text" style="width: 202px;">Consulta - Especialidade</div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left line-encaminhamento">
<strong>{{$encaminhamento['especialidade']}}</strong>
</div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 84px;">Programa</div>
<div class="float-left line" style="width: 784px;"><strong>{{$encaminhamento['programa']}}</strong></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left checkbox text-center"><strong>{{$encaminhamento['internacao'] ? 'X' : ''}}</strong></div>
<div class="float-left text" style="width: 100px;">Internação</div>
<div class="float-left checkbox"></div>
<div class="float-left text" style="width: 49px;">SADT</div>
<div class="float-left line" style="width: 660px;"></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left checkbox"></div>
<div class="float-left text" style="width: 74px;">OUTROS</div>
<div class="float-left line" style="width: 400px;"><strong>{{$encaminhamento['outros']}}</strong></div>
<div class="float-left text" style="width: 238px;">COMPARECER AO GUICHE Nº</div>
<div class="float-left line" style="width: 125px;"></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 322px;">Funcionário responsável pela marcação</div>
<div class="float-left line" style="width: 350px;"></div>
<div class="float-left text" style="width: 35px;">Tel.</div>
<div class="float-left line" style="width: 161px;"></div>
<div class="clear"></div>
</div>
</div>
<div class="fieldset">
<h3 class="margin-bottom-15 text-center">INSTITUIÇÃO QUE ESTÁ ENCAMINHANDO</h3>
<div class="row">
<div class="float-left text" style="width: 108px;">INSTITUIÇÃO</div>
<div class="float-left line" style="width: 560px;"><strong>{{$encaminhamento['unidade_origem']['cnes']}} - {{$encaminhamento['unidade_origem']['nome_fantasia']}}</strong></div>
<div class="float-left text" style="width: 35px;">TEL</div>
<div class="float-left line" style="width: 161px;"><strong>{{$encaminhamento['unidade_origem']['telefone']}}</strong></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 290px;">Responsável pelo encaminhamento</div>
<div class="float-left line" style="width: 578px;"><strong>{{$encaminhamento['usuario_origem']['nome']}}</strong></div>
<div class="clear"></div>
<div class="float-left text" style="width: 90px;">Ocupação</div>
<div class="float-left line" style="width: 775px;"><strong>{{ $encaminhamento['usuario_origem']['ocupacao_descricao'] }}</strong></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 130px;">Tipo de registro</div>
<div class="float-left line" style="width: 400px;"><strong>{{ $encaminhamento['usuario_origem']['documento'] }}</strong></div>
<div class="float-left text" style="width: 42px;">Data</div>
<div class="float-left line" style="width: 130px;"><strong>{{$encaminhamento['data']}}</strong></div>
<div class="float-left text" style="width: 64px;">Horário</div>
<div class="float-left line" style="width: 100px;"><strong>{{$encaminhamento['horario']}}</strong></div>
<div class="clear"></div>
</div>
</div>
<div class="fieldset">
<div class="margin-bottom-15 text-center">
<h3 class="float-left" style="width: 234px;">REFERÊNCIA</h3>
<h3 class="float-left" style="width: 634px;">RELATÓRIO MÉDICO / ODONTOLÓGICO</h3>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 145px;">Nome do usuário</div>
<div class="float-left line" style="width: 722px;"><strong>{{$encaminhamento['paciente']['nome']}}</strong> @if($encaminhamento['paciente']['nome_social']) ({{$encaminhamento['paciente']['nome_social']}}) @endif</div>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 230px;">Motivo do encaminhamento:</div>
<div class="clear"></div>
<div>
<div style="width: 868px; line-height: 24px;"><strong>{{ $encaminhamento['motivo'] }}</strong></div>
</div>
</div>
<div class="row">
<div class="float-left text" style="width: 172px;">Hipótese diagnóstica</div>
<div class="float-left line" style="width: 696px;"><strong>{{$encaminhamento['cid']}} @if ($encaminhamento['cid'] && $encaminhamento['ciap'])/ @endif {{$encaminhamento['ciap']}}</strong></div>
<div class="clear"></div>
</div>
<div class="margin-top-30 text-center">
<div class="float-left" style="width: 334px;">
<div class="line" style="margin: 0 auto; width: 234px;"></div>
<div class="text">Data</div>
</div>
<div class="float-left" style="width: 534px;">
<div class="line" style="margin: 0 auto; width: 434px;"></div>
<div>{{ $encaminhamento['usuario_origem']['ocupacao_descricao'] }} - {{ $encaminhamento['usuario_origem']['documento'] }}</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="fieldset" style="margin-top: 133px; page-break-inside: avoid;">
<div class="margin-bottom-15 text-center">
<h3 class="float-left" style="width: 334px;">CONTRA-REFERÊNCIA</h3>
<h3 class="float-left" style="width: 534px;">RELATÓRIO DO ATENDIMENTO</h3>
<div class="clear"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 144px;">Conclusão Clínica</div>
<div class="float-left line" style="width: 724px;"></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 274px;">Exames e tratamentos realizados</div>
<div class="float-left line" style="width: 594px;"></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="float-left text" style="width: 146px;">Conduta proposta</div>
<div class="float-left line" style="width: 722px;"></div>
<div class="clear"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="row">
<div class="line" style="width: 868px;"></div>
</div>
<div class="margin-top-30 text-center">
<div class="float-left" style="width: 334px;">
<div class="line" style="margin: 0 auto; width: 234px;"></div>
<div class="text">Data</div>
</div>
<div class="float-left" style="width: 534px;">
<div class="line" style="margin: 0 auto; width: 434px;"></div>
<div class="text">Médico / Dentista ( Carimbar - Assinar )</div>
</div>
<div class="clear"></div>
</div>
</div>
</main>
<footer>
<div class="margin-top-15">
<div class="float-left" style="width: 580px;">
<p style="font-size: 14px;">
Eximo os Hospitais e/ou as Unidades de Saúde de qualquer responsabilidade.
quanto às informações desta guia. (Art. 46 Código Brasileiro de Doentologia
médica).
</p>
</div>
<div class="float-left text-center" style="width: 288px;">
<div class="line" style="margin: 0 auto; width: 268px;"></div>
<div class="text" style="font-size: 12px;">Assinatura do(a) Paciente ou Resp.</div>
</div>
<div class="clear"></div>
</div>
</footer>
</div>
</div>
@endforeach
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,704 @@
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@include('impressoes.utils.reset-css')
<style type="text/css">
h1 {
font-size: 17px;
text-align: center;
font-weight: bold;
}
fieldset {
margin-top: 10px;
padding-top: 5px;
}
legend {
font-size: 13px;
font-weight: bold;
}
span {
font-size: 11px;
white-space: nowrap;
}
strong {
font-weight: bold;
}
.content {
position: relative;
margin: 0 auto;
width: 890px;
}
.content-header {
position: relative;
padding-top: 10px;
padding-bottom: 5px;
}
.content-header-title {
line-height: 22px;
}
.logo-wrapper {
position: absolute;
top: 10px;
left: 68px;
white-space: nowrap;
}
.logo {
font-size: 20px;
font-weight: bolder;
}
.content-main {
position: relative;
padding: 2px;
}
.page {
page-break-before: always;
}
.page > .content:first-of-type {
padding-bottom: 8px;
}
.page > .content:not(:first-of-type) {
padding-top: 5px;
border-top: 1px dashed #000000;
}
.text-box-group > .text-box-group-row:not(:first-of-type) {
margin-top: 4px;
}
.text-box-group > .text-box-group-row:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.text-box-group-row > .text-box:not(:first-of-type) {
margin-left: 5px;
}
.text-box {
border-left: 1px solid #000000;
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
height: 20px;
}
.text-box:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.text-box-label {
white-space: nowrap;
border-right: 1px solid #000000;
height: 20px;
line-height: 22px;
padding: 0 5px;
font-size: 11px;
}
.text-box-gap-group:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.text-box-gap {
float: left;
width: 22px;
height: 18px;
margin-top: 2px;
text-align: center;
}
.text-box-gap-group > .text-box-gap:not(:first-of-type) {
border-left: 1px solid #000000;
}
.blank-line {
height: 20px;
border-bottom: 1px solid #000000;
}
.checkbox {
width: 14px;
height: 14px;
border-radius: 4px;
border: 1px solid #000000;
}
.float-right {
float: right;
}
.float-left {
float: left;
}
.clear {
clear: both;
}
.text-center {
text-align: center;
}
</style>
</head>
<body>
@php
$requisitante['unidade'] = substr($requisitante['unidade'], 0, 50);
$requisitante['cnes'] = str_split($requisitante['cnes']);
$paciente['data_nascimento'] = str_split($paciente['data_nascimento']);
if (is_null($paciente['sexo_masculino'])) {
$sexoMasculinoCheck = '( )';
$sexoFemininoCheck = '( )';
}
else {
$sexoMasculinoCheck = $paciente['sexo_masculino'] ? '(X)' : '( )';
$sexoFemininoCheck = !$paciente['sexo_masculino'] ? '(X)' : '( )';
}
$paciente['nome'] = str_split(substr($paciente['nome'], 0, 36));
$paciente['rg'] = str_split($paciente['rg']);
$paciente['ibge'] = str_split($paciente['ibge']);
@endphp
@foreach ($solicitacoes as $solicitacao)
@php
$limite = 68;
$solicitacao['justificativa'] = [
substr($solicitacao['justificativa'], 0, $limite),
substr($solicitacao['justificativa'], $limite, $limite),
substr($solicitacao['justificativa'], $limite * 2, $limite),
substr($solicitacao['justificativa'], $limite * 3, $limite),
];
$solicitacao['data'] = explode('/', $solicitacao['data']);
$solicitacao['usuario_origem']['usuario_nome'] = substr($solicitacao['usuario_origem']['usuario_nome']
. ($solicitacao['usuario_origem']['documento'] ? " - {$solicitacao['usuario_origem']['documento']}" : ''), 0, 50);
$solicitacao['usuario_origem']['ocupacao_descricao'] = substr($solicitacao['usuario_origem']['ocupacao_descricao'], 0, 25);
@endphp
@foreach ($solicitacao['itens'] as $item)
@php
$item['codigo'] = str_split($item['codigo']);
@endphp
<div class="page">
@for ($c = 0; $c < 2; $c++)
<div class="content">
<div class="content-header">
<div class="logo-wrapper">
<span class="logo">SUS - SP</span>
</div>
<h1 class="content-header-title">
SISTEMA DE INFORMAÇÕES AMBULATORIAL <br>
FICHA DE REQUISIÇÃO DE SERVIÇOS AUXILIARES DE DIAGOSE E TERAPIA (SADT)
</h1>
</div>
<div class="content-main">
<div class="text-box-group">
<div class="text-box-group-row">
<div class="text-box float-right" style="margin-right: 2px;">
<div class="text-box-label float-left" style="width: 108px;">
Nº DE ORDEM
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 6; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 619px;">
<div class="text-box-label float-left">
NOME DA UNIDADE REQUISITANTE
</div>
<div class="float-left" style="padding: 0 5px; line-height: 21px;">
<span>{{ $requisitante['unidade'] }}</span>
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left" style="width: 85px;">
CÓD. UNIDADE
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 7; $i++)
<div class="text-box-gap">
<span>{{ $requisitante['cnes'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 619px;">
<div class="text-box-label float-left">
ESPECIALISTA
</div>
<div class="float-left" style="padding: 0 5px; line-height: 21px;">
<span>{{ $solicitacao['usuario_origem']['usuario_nome'] }}</span>
</div>
</div>
<div class="text-box float-left">
<div class="text-box-label float-left">
ESPECIALIDADE
</div>
<div class="float-left" style="padding: 0 5px; line-height: 21px; width: 150px">
<span>{{ $solicitacao['usuario_origem']['ocupacao_descricao'] }}</span>
</div>
</div>
</div>
</div>
<fieldset>
<legend>IDENTIFICAÇÃO DO PACIENTE</legend>
<div class="text-box-group">
<div class="text-box-group-row">
<div class="float-left text-center" style="border: 1px solid transparent; width: 160px;">
<span>MATRÍCULA</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 45px;">
<span>EST.</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 183px;">
<span>R.G.</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 22px;">
<span>DC</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 45px;">
<span>SEQ.</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 137px;">
<span>DATA DE NASC.</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 248px;">
<span>SEXO</span>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 7; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 2; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 8; $i++)
<div class="text-box-gap">
<span>{{ $paciente['rg'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
<div class="text-box-gap"></div>
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 2; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 6; $i++)
<div class="text-box-gap">
<span>{{ $paciente['data_nascimento'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
<div class="text-box float-left" style="width: 248px;">
<div class="float-left text-center" style="width: 112px">
<span>12.{{ $sexoMasculinoCheck }} MASC.</span>
</div>
<div class="float-left text-center" style="width: 112px">
<span>25.{{ $sexoFemininoCheck }} FEM.</span>
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left">
<div class="text-box-label float-left" style="width: 44px;">
NOME
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 36; $i++)
<div class="text-box-gap">
<span>{{ $paciente['nome'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left">
<div class="text-box-label float-left" style="width: 90px;">
NOME SOCIAL
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 34; $i++)
<div class="text-box-gap">
<span>{{ $paciente['nome_social'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 678px;">
<div class="text-box-label float-left">
MUNICÍPIO
</div>
<div class="float-left" style="padding: 0 5px;">
<span>{{ $paciente['municipio'] }}</span>
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
MUN
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 7; $i++)
<div class="text-box-gap">
<span>{{ $paciente['ibge'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>SUSPEITA CLÍNICA</legend>
<div class="float-left" style="width: 434px;">
@for ($i = 0; $i < 4; $i++)
<div class="blank-line">
<span>{{ $solicitacao['justificativa'][$i] ?? '' }}</span>
</div>
@endfor
</div>
<div class="float-left" style="width: 434px; margin-left: 15px; padding-top: 3px;">
<div>
<div class="float-left" style="height: 20px;">
<span style="line-height: 28px;">DATA PRIMEIROS SINTOMAS</span>
</div>
<div class="blank-line float-left" style="width: 280px;"></div>
<div class="clear"></div>
</div>
<div>
<div class="float-left" style="height: 20px;">
<div class="checkbox" style="margin-top: 3px"></div>
</div>
<div class="float-left" style="height: 20px; margin-left: 3px;">
<span style="line-height: 28px;">USO DE ATB:</span>
</div>
<div class="blank-line float-left" style="width: 345px;"></div>
<div class="clear"></div>
</div>
<div>
<div class="float-left" style="height: 20px;">
<div class="checkbox" style="margin-top: 3px"></div>
</div>
<div class="float-left" style="height: 20px; margin-left: 3px;">
<span style="line-height: 28px;">OUTRO MEDICAMENTO:</span>
</div>
<div class="blank-line float-left" style="width: 285px;"></div>
<div class="clear"></div>
</div>
<div>
<div class="float-left" style="height: 20px; margin-right: 3px;">
<span style="line-height: 28px;">CASO</span>
</div>
<div class="float-left" style="height: 20px;">
<div class="checkbox" style="margin-top: 3px"></div>
</div>
<div class="float-left" style="height: 20px; margin-left: 50px; margin-right: 3px;">
<span style="line-height: 28px;">COMUNICANTE</span>
</div>
<div class="float-left" style="height: 20px;">
<div class="checkbox" style="margin-top: 3px"></div>
</div>
<div class="float-right" style="height: 20px; margin-right: 2px;">
<span style="line-height: 28px;">DE DOENÇA NOT. COMPULSÓRIA</span>
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</fieldset>
<fieldset style="padding-top: 0;">
<legend style="width: 884px;">
SADT SOLICITADO
<div class="text-box float-right" style="font-weight: normal;">
<div class="text-box-label float-left" style="font-size: 15px; !important">
<strong>CÓDIGO</strong>
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 10; $i++)
<div class="text-box-gap" style="line-height: 18px;">
<strong><span style="font-size: 15px; !important">{{ $item['codigo'][$i] ?? '' }}</span></strong>
</div>
@endfor
</div>
</div>
<div class="clear"></div>
</legend>
<div class="blank-line">
<strong><span style="font-size: 15px; !important">{{ $item['nome'] }}</span></strong>
</div>
<div class="blank-line"></div>
<div style="margin: 5px 0">
<div class="float-left" style="margin-left: 100px; margin-right: 3px;">
<span>DIAGNÓSTICO</span>
</div>
<div class="float-left">
<div class="checkbox"></div>
</div>
<div class="float-left" style="margin-left: 160px; margin-right: 3px;">
<span>CONTROLE</span>
</div>
<div class="float-left">
<div class="checkbox"></div>
</div>
<div class="float-left" style="margin-left: 160px;">
<span>Nº SESSÕES</span>
</div>
<div class="clear"></div>
</div>
</fieldset>
<div>
<div class="float-left" style="height: 20px; margin-right: 6px">
<span style="line-height: 28px;">MATERIAL ENVIADO:</span>
</div>
<div class="blank-line float-left" style="width: 768px;"></div>
<div class="clear"></div>
</div>
<div class="blank-line"></div>
<div style="margin: 10px 0 7px 0">
<div class="float-left" style="margin-right: 15px;">
<span>DATA DA REQUISIÇÃO</span>
</div>
<div class="float-left">
<div class="float-left text-center" style="border-bottom: 1px solid #000000; width: 50px; height: 17px;">
<span>{{ $solicitacao['data'][0] }}</span>
</div>
<div class="float-left">/</div>
<div class="float-left text-center" style="border-bottom: 1px solid #000000; width: 50px; height: 17px;">
<span>{{ $solicitacao['data'][1] }}</span>
</div>
<div class="float-left">/</div>
<div class="float-left text-center" style="border-bottom: 1px solid #000000; width: 50px; height: 17px;">
<span>{{ $solicitacao['data'][2] }}</span>
</div>
<div class="clear"></div>
</div>
<div class="float-left" style="margin-left: 127px; margin-right: 3px;">
<div class="checkbox"></div>
</div>
<div class="float-left">
<span>1ª AMOSTRA</span>
</div>
<div class="float-left" style="margin-left: 152px; margin-right: 3px;">
<div class="checkbox"></div>
</div>
<div class="float-left">
<span>2ª AMOSTRA</span>
</div>
<div class="clear"></div>
</div>
<div style="margin: 7px 0;">
<span>NOME DA UNIDADE QUE REALIZARÁ A SADT</span>
</div>
<div class="text-box-group">
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 645px;">
<div class="text-box-label float-left">
ENCAMINHADO PARA:
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
CÓD. UNIDADE
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 6; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 596px;">
<div class="text-box-label float-left">
ENDEREÇO
</div>
</div>
<div class="text-box float-left text-box-space" style="width: 279px;">
<div class="text-box-label float-left">
TELEFONE
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 643px;">
<div class="text-box-label float-left">
ASSINATURA DO PROFISSIONAL RESPONSÁVEL
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
CR
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 9; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
</div>
</div>
<div>
<div class="float-right" style="margin-right: 6px;">
<span>1 VIA - CLIENTE/ SADT; 2ª VIA - UNIDADE</span>
</div>
<div class="clear"></div>
</div>
</div>
</div>
@endfor
</div>
@endforeach
@endforeach
</body>
</html>

View File

@@ -0,0 +1,987 @@
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@include('impressoes.utils.reset-css')
<style type="text/css">
h1 {
font-size: 17px;
text-align: center;
font-weight: bold;
}
fieldset {
margin-top: 10px;
padding-top: 5px;
}
legend {
font-size: 13px;
font-weight: bold;
}
span {
font-size: 11px;
white-space: nowrap;
}
strong {
font-weight: bold;
}
.content {
position: relative;
margin: 0 auto;
width: 890px;
}
.content-header {
position: relative;
padding-top: 10px;
padding-bottom: 5px;
}
.content-header-title {
line-height: 22px;
}
.logo-wrapper {
position: absolute;
top: 10px;
left: 68px;
white-space: nowrap;
}
.logo {
font-size: 20px;
font-weight: bolder;
}
.content-main {
position: relative;
padding: 2px;
}
.page {
page-break-after: always;
position: relative;
height: 100vh;
}
.page > .content:first-of-type {
padding-bottom: 8px;
}
.text-box-group > .text-box-group-row:not(:first-of-type) {
margin-top: 5px;
}
.text-box-group > .text-box-group-row:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.text-box-group-row > .text-box:not(:first-of-type) {
margin-left: 5px;
}
.text-box {
border-left: 1px solid #000000;
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
height: 20px;
}
.text-box:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.text-box-label {
white-space: nowrap;
border-right: 1px solid #000000;
height: 20px;
line-height: 22px;
padding: 0 5px;
font-size: 11px;
}
.text-box-gap-group:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.text-box-gap {
float: left;
width: 22px;
height: 18px;
margin-top: 2px;
text-align: center;
}
.text-box-gap-group > .text-box-gap:not(:first-of-type) {
border-left: 1px solid #000000;
}
.blank-line {
height: 20px;
border-bottom: 1px solid #000000;
}
.checkbox {
width: 14px;
height: 14px;
border-radius: 4px;
border: 1px solid #000000;
}
.float-right {
float: right;
}
.float-left {
float: left;
}
.clear {
clear: both;
}
.text-center {
text-align: center;
}
.mt-30 {
margin-top: 30px;
}
.assinatura {
margin: 0 auto;
width: 400px;
text-align: center;
padding-top: 80px;
page-break-inside: avoid;
font-size: 12px;
}
.assinatura-linha {
border-top: 2px solid #000000;
margin-bottom: 5px;
}
</style>
</head>
<body>
@php
$requisitante['unidade'] = substr($requisitante['unidade'], 0, 50);
$requisitante['cnes'] = str_split($requisitante['cnes']);
$paciente['data_nascimento'] = str_split($paciente['data_nascimento']);
if (is_null($paciente['sexo_masculino'])) {
$sexoMasculinoCheck = '( )';
$sexoFemininoCheck = '( )';
}
else {
$sexoMasculinoCheck = $paciente['sexo_masculino'] ? '(X)' : '( )';
$sexoFemininoCheck = !$paciente['sexo_masculino'] ? '(X)' : '( )';
}
$paciente['nome'] = str_split(substr($paciente['nome'], 0, 36));
$paciente['rg'] = str_split($paciente['rg']);
$paciente['ibge'] = str_split($paciente['ibge']);
@endphp
@foreach ($solicitacoes as $solicitacao)
@php
$limite = 152;
$justificativa = $solicitacao['justificativa'];
$partes = [];
while (strlen($justificativa) > 0) {
if (strlen($justificativa) <= $limite) {
$partes[] = $justificativa;
break;
}
$parte = substr($justificativa, 0, $limite);
$ultimoEspaco = strrpos($parte, ' ');
if ($ultimoEspaco === false) {
$ultimoEspaco = $limite;
}
$partes[] = substr($justificativa, 0, $ultimoEspaco);
$justificativa = substr($justificativa, $ultimoEspaco + 1);
}
$solicitacao['justificativa'] = $partes;
$linhasJustificativa = count($partes);
$observacao = $solicitacao['observacao'];
$partes = [];
while (strlen($observacao) > 0) {
if (strlen($observacao) <= $limite) {
$partes[] = $observacao;
break;
}
$parte = substr($observacao, 0, $limite);
$ultimoEspaco = strrpos($parte, ' ');
if ($ultimoEspaco === false) {
$ultimoEspaco = $limite;
}
$partes[] = substr($observacao, 0, $ultimoEspaco);
$observacao = substr($observacao, $ultimoEspaco + 1);
}
$solicitacao['observacao'] = $partes;
$linhasObservacao = count($partes);
$solicitacao['data'] = explode('/', $solicitacao['data']);
$solicitacao['usuario_origem']['usuario_nome'] = substr($solicitacao['usuario_origem']['usuario_nome']
. ($solicitacao['usuario_origem']['documento'] ? " - {$solicitacao['usuario_origem']['documento']}" : ''), 0, 50);
$solicitacao['usuario_origem']['ocupacao_descricao'] = substr($solicitacao['usuario_origem']['ocupacao_descricao'], 0, 25);
@endphp
@foreach ($solicitacao['itens'] as $item)
@php
$item['codigo'] = str_split($item['codigo']);
@endphp
<div class="page">
<div class="content">
<div class="content-header">
<div class="logo-wrapper">
<span class="logo">SUS - SP</span>
</div>
<h1 class="content-header-title">
SISTEMA DE INFORMAÇÕES AMBULATORIAL <br>
FICHA DE REQUISIÇÃO DE SERVIÇOS AUXILIARES DE DIAGOSE E TERAPIA (SADT)
</h1>
</div>
<div class="content-main">
<div class="text-box-group">
<div class="text-box-group-row">
<div class="text-box float-right" style="margin-right: 2px;">
<div class="text-box-label float-left" style="width: 108px;">
Nº DE ORDEM
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 6; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 619px;">
<div class="text-box-label float-left">
NOME DA UNIDADE REQUISITANTE
</div>
<div class="float-left" style="padding: 0 5px; line-height: 21px;">
<span>{{ $requisitante['unidade'] }}</span>
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left" style="width: 85px;">
CÓD. UNIDADE
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 7; $i++)
<div class="text-box-gap">
<span>{{ $requisitante['cnes'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 619px;">
<div class="text-box-label float-left">
ESPECIALISTA
</div>
<div class="float-left" style="padding: 0 5px; line-height: 21px;">
<span>{{ $solicitacao['usuario_origem']['usuario_nome'] }}</span>
</div>
</div>
<div class="text-box float-left">
<div class="text-box-label float-left">
ESPECIALIDADE
</div>
<div class="float-left" style="padding: 0 5px; line-height: 21px; width: 150px">
<span>{{ $solicitacao['usuario_origem']['ocupacao_descricao'] }}</span>
</div>
</div>
</div>
</div>
<fieldset>
<legend>IDENTIFICAÇÃO DO PACIENTE</legend>
<div class="text-box-group">
<div class="text-box-group-row">
<div class="float-left text-center" style="border: 1px solid transparent; width: 160px;">
<span>MATRÍCULA</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 45px;">
<span>EST.</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 183px;">
<span>R.G.</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 22px;">
<span>DC</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 45px;">
<span>SEQ.</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 137px;">
<span>DATA DE NASC.</span>
</div>
<div class="float-left text-center" style="margin-left: 5px; border: 1px solid transparent; width: 248px;">
<span>SEXO</span>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 7; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 2; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 8; $i++)
<div class="text-box-gap">
<span>{{ $paciente['rg'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
<div class="text-box-gap"></div>
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 2; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
<div class="text-box float-left">
<div class="text-box-gap-group">
@for ($i = 0; $i < 6; $i++)
<div class="text-box-gap">
<span>{{ $paciente['data_nascimento'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
<div class="text-box float-left" style="width: 248px;">
<div class="float-left text-center" style="width: 112px">
<span>12.{{ $sexoMasculinoCheck }} MASC.</span>
</div>
<div class="float-left text-center" style="width: 112px">
<span>25.{{ $sexoFemininoCheck }} FEM.</span>
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left">
<div class="text-box-label float-left" style="width: 44px;">
NOME
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 36; $i++)
<div class="text-box-gap">
<span>{{ $paciente['nome'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left">
<div class="text-box-label float-left" style="width: 90px;">
NOME SOCIAL
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 34; $i++)
<div class="text-box-gap">
<span>{{ $paciente['nome_social'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 222px;">
<div class="text-box-label float-left">
IDADE
</div>
<div class="float-left" style="padding: 0 5px;">
<span>{{ $paciente['idade'] }}</span>
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
PRONTUÁRIO
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 8; $i++)
<div class="text-box-gap">
<span>{{ $paciente['prontuario'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
CNS
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 15; $i++)
<div class="text-box-gap">
<span>{{ $paciente['cns'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
CPF
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 11; $i++)
<div class="text-box-gap">
<span>{{ $paciente['cpf'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
<div class="text-box float-left" style="width: 590px;">
<div class="text-box-label float-left">
TELEFONES
</div>
<div class="float-left" style="padding: 0 5px;">
<span>
<strong>
@foreach ($paciente['telefones'] as $i => $telefone)
{{$telefone . ($i < count($paciente['telefones']) - 1 ? ' / ' : '')}}
@endforeach
</strong>
</span>
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left">
<div class="text-box-label float-left" style="width: 90px;">
NOME DA MÃE
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 34; $i++)
<div class="text-box-gap">
<span>{{ $paciente['nome_mae'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 622px;">
<div class="text-box-label float-left">
UNIDADE REFERÊNCIA
</div>
<div class="float-left" style="padding: 0 5px;">
<span>{{ $paciente['unidade_referencia'] }}</span>
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
CÓD. UNIDADE
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 7; $i++)
<div class="text-box-gap">
<span>{{ $paciente['unidade_referencia_cnes'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 883px;">
<div class="text-box-label float-left">
ENDEREÇO
</div>
<div class="float-left" style="padding: 0 5px;">
<span>{{$paciente['logradouro']}}, @if ($paciente['sem_numero']) S/N @else {{ $paciente['numero'] }} @endif @if($paciente['complemento'])- {{$paciente['complemento']}}@endif</span>
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
CEP
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 8; $i++)
<div class="text-box-gap">
<span>{{ $paciente['cep'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
<div class="text-box float-left" style="width: 660px;">
<div class="text-box-label float-left">
BAIRRO
</div>
<div class="float-left" style="padding: 0 5px;">
<span>{{$paciente['bairro']}}</span>
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 601px;">
<div class="text-box-label float-left">
MUNICÍPIO
</div>
<div class="float-left" style="padding: 0 5px;">
<span>{{ $paciente['municipio'] }}</span>
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
MUN
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 7; $i++)
<div class="text-box-gap">
<span>{{ $paciente['ibge'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
UF
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 2; $i++)
<div class="text-box-gap">
<span>{{ $paciente['uf'][$i] ?? '' }}</span>
</div>
@endfor
</div>
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>SUSPEITA CLÍNICA</legend>
<div>
<div class="blank-line" style="{{ $solicitacao['ciap'] ? 'height: 40px;' : '' }}">
<span style="font-size: 15px; !important">
<strong>CID10</strong>: {{ $solicitacao['cid'] ?? '' }}
</span>
@if ($solicitacao['ciap'])
<div style="margin-top: 3px;">
<span style="font-size: 15px; !important;">
<strong>CIAP2</strong>: {{ $solicitacao['ciap'] }}
</span>
</div>
@endif
</div>
</div>
<div class="float-left" style="width: 434px;">
<div>
<div class="float-left" style="height: 20px;">
<div class="checkbox" style="margin-top: 3px"></div>
</div>
<div class="float-left" style="height: 20px; margin-left: 3px;">
<span style="line-height: 28px;">USO DE ATB:</span>
</div>
<div class="blank-line float-left" style="width: 345px;"></div>
<div class="clear"></div>
</div>
<div>
<div class="float-left" style="height: 20px;">
<div class="checkbox" style="margin-top: 3px"></div>
</div>
<div class="float-left" style="height: 20px; margin-left: 3px;">
<span style="line-height: 28px;">OUTRO MEDICAMENTO:</span>
</div>
<div class="blank-line float-left" style="width: 285px;"></div>
<div class="clear"></div>
</div>
</div>
<div class="float-left" style="width: 434px; margin-left: 15px; padding-top: 3px;">
<div>
<div class="float-left" style="height: 20px;">
<span style="line-height: 28px;">DATA PRIMEIROS SINTOMAS</span>
</div>
<div class="blank-line float-left" style="width: 280px;"></div>
<div class="clear"></div>
</div>
<div>
<div class="float-left" style="height: 20px; margin-right: 3px;">
<span style="line-height: 28px;">CASO</span>
</div>
<div class="float-left" style="height: 20px;">
<div class="checkbox" style="margin-top: 3px"></div>
</div>
<div class="float-left" style="height: 20px; margin-left: 50px; margin-right: 3px;">
<span style="line-height: 28px;">COMUNICANTE</span>
</div>
<div class="float-left" style="height: 20px;">
<div class="checkbox" style="margin-top: 3px"></div>
</div>
<div class="float-right" style="height: 20px; margin-right: 2px;">
<span style="line-height: 28px;">DE DOENÇA NOT. COMPULSÓRIA</span>
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</fieldset>
<fieldset style="padding-top: 0;">
<legend style="width: 884px;">
SADT SOLICITADO
<div class="text-box float-right" style="font-weight: normal;">
<div class="text-box-label float-left" style="font-size: 15px; !important">
<strong>CÓDIGO</strong>
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 10; $i++)
<div class="text-box-gap" style="line-height: 18px;">
<strong><span style="font-size: 15px; !important">{{ $item['codigo'][$i] ?? '' }}</span></strong>
</div>
@endfor
</div>
</div>
<div class="clear"></div>
</legend>
<div class="blank-line">
<strong><span style="font-size: 15px; !important">{{ $item['nome'] }}</span></strong>
</div>
<div class="blank-line"></div>
<div style="margin: 5px 0">
<div class="float-left" style="margin-left: 100px; margin-right: 3px;">
<span>DIAGNÓSTICO</span>
</div>
<div class="float-left">
<div class="checkbox"></div>
</div>
<div class="float-left" style="margin-left: 160px; margin-right: 3px;">
<span>CONTROLE</span>
</div>
<div class="float-left">
<div class="checkbox"></div>
</div>
<div class="float-left" style="margin-left: 160px;">
<span>Nº SESSÕES</span>
</div>
<div class="clear"></div>
</div>
</fieldset>
<div>
<div class="float-left" style="height: 20px; margin-right: 6px">
<span style="line-height: 28px;">MATERIAL ENVIADO:</span>
</div>
<div class="blank-line float-left" style="width: 768px;"></div>
<div class="clear"></div>
</div>
<div class="blank-line"></div>
<div style="margin: 10px 0 7px 0">
<div class="float-left" style="margin-right: 15px;">
<span>DATA DA REQUISIÇÃO</span>
</div>
<div class="float-left">
<div class="float-left text-center" style="border-bottom: 1px solid #000000; width: 50px; height: 17px;">
<span>{{ $solicitacao['data'][0] }}</span>
</div>
<div class="float-left">/</div>
<div class="float-left text-center" style="border-bottom: 1px solid #000000; width: 50px; height: 17px;">
<span>{{ $solicitacao['data'][1] }}</span>
</div>
<div class="float-left">/</div>
<div class="float-left text-center" style="border-bottom: 1px solid #000000; width: 50px; height: 17px;">
<span>{{ $solicitacao['data'][2] }}</span>
</div>
<div class="clear"></div>
</div>
<div class="float-left" style="margin-left: 127px; margin-right: 3px;">
<div class="checkbox"></div>
</div>
<div class="float-left">
<span>1ª AMOSTRA</span>
</div>
<div class="float-left" style="margin-left: 152px; margin-right: 3px;">
<div class="checkbox"></div>
</div>
<div class="float-left">
<span>2ª AMOSTRA</span>
</div>
<div class="clear"></div>
</div>
<div style="margin: 7px 0;">
<span>NOME DA UNIDADE QUE REALIZARÁ A SADT</span>
</div>
<div class="text-box-group">
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 645px;">
<div class="text-box-label float-left">
ENCAMINHADO PARA:
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
CÓD. UNIDADE
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 6; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 596px;">
<div class="text-box-label float-left">
ENDEREÇO
</div>
</div>
<div class="text-box float-left text-box-space" style="width: 279px;">
<div class="text-box-label float-left">
TELEFONE
</div>
</div>
</div>
<div class="text-box-group-row">
<div class="text-box float-left" style="width: 643px;">
<div class="text-box-label float-left">
ASSINATURA DO PROFISSIONAL RESPONSÁVEL
</div>
</div>
<div class="text-box float-left text-box-space">
<div class="text-box-label float-left">
CR
</div>
<div class="text-box-gap-group float-left">
@for ($i = 0; $i < 9; $i++)
<div class="text-box-gap"></div>
@endfor
</div>
</div>
</div>
</div>
<div class="clear"></div>
<fieldset>
<legend>JUSTIFICATIVA</legend>
<div>
@for ($i = 0; $i < $linhasJustificativa; $i++)
<div class="blank-line">
<span>{{ $solicitacao['justificativa'][$i] ?? '' }}</span>
</div>
@if ($i === 16)
<div class="assinatura">
<div class="assinatura-linha"></div>
<div>{{ $solicitacao['usuario_origem']['usuario_nome'] }}</div>
<div>{{ $solicitacao['usuario_origem']['ocupacao_descricao'] }}</div>
<div>{{ $solicitacao['usuario_origem']['documento'] ?? 'Conselho profissional: NÃO INFORMADO' }}</div>
</div>
<div style="page-break-before: always;"></div>
@endif
@endfor
</div>
<div class="clear"></div>
</fieldset>
<fieldset>
<legend>OBSERVAÇÃO</legend>
<div>
@for ($i = 0; $i < $linhasObservacao; $i++)
<div class="blank-line">
<span>{{ $solicitacao['observacao'][$i] ?? '' }}</span>
</div>
@endfor
</div>
<div class="clear"></div>
</fieldset>
<div class="assinatura">
@if(!$paraAssinar)
<div class="assinatura-linha"></div>
@endif
<div>{{ $solicitacao['usuario_origem']['usuario_nome'] }}</div>
<div>{{ $solicitacao['usuario_origem']['ocupacao_descricao'] }}</div>
<div>{{ $solicitacao['usuario_origem']['documento'] ?? 'Conselho profissional: NÃO INFORMADO' }}</div>
</div>
</div>
</div>
</div>
@endforeach
@endforeach
</body>
</html>

View File

@@ -0,0 +1,42 @@
@extends('impressoes.layout1.content')
@section('conteudo')
@foreach ($laudos as $laudo)
<div style="page-break-before: always">
<table class="table" style="font-size: 14px;">
<thead>
<tr>
<th class="text-center">#</th>
<th>Pergunta</th>
<th class="text-center">Resposta</th>
</tr>
</thead>
<tbody>
@foreach ($laudo['questionario'] as $key => $value)
<tr>
<td class="text-center">{{ $key + 1 }}</td>
<td>{{ $value['pergunta'] }}</td>
<td class="text-center">{{ $value['resposta'] ? 'Sim' : 'Não' }}</td>
</tr>
@endforeach
</tbody>
</table>
<div>
<p>
O M-CHAT-R foi aplicado ao paciente <strong>{{$laudo['paciente_nome']}}</strong> na data de <strong>{{$laudo['data_hora_atendimento']}}</strong>, como parte do processo de triagem do desenvolvimento infantil.
</p>
<p>
Durante a aplicação do questionário, foram consideradas as respostas fornecidas pelo responsável, seguindo os critérios estabelecidos pelo instrumento para avaliação de comportamentos relacionados ao desenvolvimento socioemocional e à comunicação da criança. Após a análise das respostas registradas, foi obtido um score total de <strong>{{$laudo['score']}}</strong> pontos, o qual, de acordo com os parâmetros de classificação do instrumento, corresponde à classificação <strong>{{$laudo['classificacao']}}</strong>.
</p>
<p>
Este resultado refere-se à etapa de triagem realizada pelo questionário e deve ser interpretado dentro do contexto clínico geral do paciente, podendo, quando indicado, orientar a necessidade de acompanhamento, monitoramento do desenvolvimento ou encaminhamento para avaliação complementar por profissional especializado.
</p>
</div>
</div>
@endforeach
@endsection

View File

@@ -0,0 +1,679 @@
@extends('impressoes.layout-laudo-medicamento.impressao', ['paraAssinar' => !$exibirAssinatura])
@section('conteudo')
@foreach($receitas as $receita)
<div class="page">
<div class="row">
<div class="cell col-4 font-small" style="padding-right: 5px">
<div class="fieldset font-tiny" style="height: 20px">
<div class="legend">
<strong>1 - Número do CNES*</strong>
</div>
<div class="row font-size-default" style="line-height:22px">{{$receita['unidade']['cnes']}}</div>
</div>
</div>
<div class="cell col-8 font-small">
<div class="fieldset font-tiny" style="height: 20px">
<div class="legend">
<strong>2 - Nome do estabelicimento de saúde solicitante*</strong>
</div>
<div class="row font-size-default" style="line-height:22px">{{$receita['unidade']['nome']}}</div>
</div>
</div>
</div>
<div class="row">
<div class="cell col-9 font-small" style="padding-right: 5px">
<div class="fieldset font-tiny" style="height: 20px">
<div class="legend">
<strong>3 - Nome completo do paciente*</strong>
</div>
<div class="row font-size-default" style="line-height:22px">{{$receita['paciente']['nome']}}</div>
</div>
</div>
<div class="cell col-3 font-small">
<div class="fieldset font-tiny" style="height: 20px">
<div class="legend">
<strong>5 - Peso do paciente*</strong>
</div>
<div class="row font-size-default text-center" style="line-height:22px">{{$receita['paciente']['peso']}} kg</div>
</div>
</div>
</div>
<div class="row">
<div class="cell col-9 font-small" style="padding-right: 5px">
<div class="fieldset font-tiny" style="height: 20px; margin-bottom:3px;">
<div class="legend">
<strong>4 - Nome da mãe do paciente*</strong>
</div>
<div class="row font-size-default" style="line-height:22px">{{$receita['paciente']['nome_mae']}}</div>
</div>
</div>
<div class="cell col-3 font-small">
<div class="fieldset font-tiny" style="height: 20px; margin-bottom:3px;">
<div class="legend">
<strong>6 - Altura do paciente*</strong>
</div>
<div class="row font-size-default text-center" style="line-height:22px">{{$receita['paciente']['altura']}} cm</div>
</div>
</div>
</div>
<div class="row">
<div class="medicamento">
<table class="card">
<tbody>
<tr class="card-top">
<td class="col-7 text-center border-bottom" style="line-height:24px;" colspan="2">
7 - <strong style="font-size:16px">MEDICAMENTOS</strong>
</td>
<td class="col-5 border-bottom pd-0" style="padding:0px!important;">
<table style="padding:0px!important">
<tr>
<td class="text-center border-bottom border-left" style="border-right:0px!important"><strong>8 - Quantidade solicitada</strong></td>
</tr>
<tr>
<td class="border-left" style="border-right:0px!important">
<table>
<tr>
<td class="quantidade-mes"><strong>1º mês</strong></td>
<td class="border-left quantidade-mes"><strong>2º mês</strong></td>
<td class="border-left quantidade-mes"><strong>3º mês</strong></td>
<td class="border-left quantidade-mes"><strong>4º mês</strong></td>
<td class="border-left quantidade-mes"><strong>5º mês</strong></td>
<td class="border-left quantidade-mes"><strong>6º mês</strong></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
@for ($j = 0; $j < 6; $j++)
<tr class="card-middle">
<td class="text-center border-bottom" style="vertical-align: middle; padding:8px; width:5px">
<strong>{{ $j + 1 }}</strong>
</td>
<td class="border-left border-bottom" style="vertical-align: middle;padding:8px">
<strong>{!! $receita['medicamentos'][$j]['nome'] ?? '' !!}</strong>
</td>
<td class="border-left">
<table>
<tr>
@for ($i = 1; $i <= 6; $i++)
@php
$quantidade = $receita['medicamentos'][$j]['quantidade']['uso_por_mes']['mes_' . $i] ?? '&nbsp;';
$tdClass = 'quantidade-mes text-center';
if ($i > 1) {
$tdClass .= ' border-left';
}
@endphp
<td class="{{ $tdClass }} border-bottom" style="vertical-align: middle; padding:8px">
{!! $quantidade !!}
</td>
@endfor
</tr>
</table>
</td>
</tr>
@endfor
</tbody>
</table>
</div>
</div>
<div class="row" style="margin-top: 8px">
<div class="cell col-3 font-small" style="padding-right: 5px; margin-top: 10px;">
<div class="fieldset font-tiny" style="height: 24px">
<div class="legend">
<strong>9 - CID-10*</strong>
</div>
<div class="row" style="vertical-align: middle; padding:3px 8px">{{$receita['cid']}}</div>
</div>
</div>
<div class="cell col-9 font-small">
<div class="fieldset font-tiny" style="height: 24px">
<div class="legend">
<strong>10 - Diagnóstico*</strong>
</div>
<div class="row" style="vertical-align: middle; padding:3px 8px">{{$receita['diagnostico']}}</div>
</div>
</div>
</div>
<div class="row">
<div class="cell col-12 font-small">
<div class="fieldset font-tiny" style="min-height:60px;">
<div class="legend">
<strong>11 - Anamnese*</strong>
</div>
<div class="row" style="padding-top: 6px;">
{{$receita['anamnese']}}
</div>
</div>
</div>
</div>
<div class="row">
<div class="cell col-12 font-small">
<div class="fieldset font-tiny" style="margin-bottom:3px">
<div class="legend">
<strong>12 - Paciente realizou tratamento prévio ou está em tratamento da doença?*</strong>
</div>
<div class="row" style="padding: 2px 12px;">
<table>
<tr>
<td style="width: 5px; max-width:5px;">
<input
type="checkbox"
name="tratamento_nao"
@if($receita['tratamento_previo']['status'] === false) checked @endif
>
</td>
<td style="width: 10px; max-width:10px; vertical-align: middle; text-align: left;">
<strong>NÃO</strong>
</td>
<td style="width: 5px; max-width:5px;">
<input
type="checkbox"
name="tratamento_sim"
@if($receita['tratamento_previo']['status'] === true) checked @endif
>
</td>
<td style="width: 200px; vertical-align: middle;">
<strong>SIM.</strong> Relatar: {{ $receita['tratamento_previo']['relatar']}}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="medicamento" style="padding:2px 5px 7px 5px">
<table class="card">
<tbody>
<tr class="card-top">
<td class="col-12 text-center" style="line-height:24px;" colspan="2">
13 - <strong style="font-size:16px">Atestado de capacidade* </strong>
</td>
</tr>
<tr>
<td colspan="2">
A solicitação do medicamento deverá ser realizada pelo paciente. Entretanto,
fica dispensada a obrigatoriedade da presença física do paciente considerado incapaz
de acordo com os artigos 3º e 4º do Código Civil. O paciente é considerado incapaz?
</td>
</tr>
<tr>
<td style="width: 50%; padding-top: 5px">
<table>
<tr>
<td style="width: 5px; max-width:5px;"><input type="checkbox" name="tratamento" value="nao"></td>
<td style="width: 10px; max-width:10px; vertical-align: top; text-align: left;"><strong>NÃO</strong></td>
<td style="width: 5px; max-width:5px;"><input type="checkbox" name="tratamento" value="sim"></td>
<td style="width: 200px; vertical-align: top;"><strong>SIM.</strong>
Indicar o nome do responsável pelo paciente, o qual poderá realizar a solicitação do medicamento
</td>
</tr>
</table>
</td>
<td style="width: 50%; padding-top:20px;">
<table>
<tr>
<td style="vertical-align: middle; text-align: center; border-top:1px solid #000; ">Nome do responsável</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="cell col-7 font-small" style="padding-top: 10px; padding-right: 5px">
<div class="row">
<div class="cell col-12 font-small">
<div class="fieldset font-tiny" style="height: 22px">
<div class="legend">
<strong>14- Nome do médico solicitante* </strong>
</div>
<div class="row font-size-default" style="line-height:22px">{{$receita['profissional']['nome']}}</div>
</div>
</div>
</div>
<div class="row">
<div class="cell col-8 font-small" style="padding-right: 5px">
<div class="fieldset font-tiny" style="height: 22px; margin-bottom:5px">
<div class="legend" style="white-space: nowrap;">
<strong>15 - Número do Cartão Nacional de Saúde (CNS) do médico solicitante*</strong>
</div>
<div class="row font-size-default" style="line-height:22px">{{$receita['profissional']['cns']}}</div>
</div>
</div>
<div class="cell col-3 font-small">
<div class="fieldset font-tiny" style="height: 22px; margin-bottom:5px">
<div class="legend" style="white-space: nowrap;">
<strong>16 - Data da solicitação*</strong>
</div>
<div class="row font-size-default text-center" style="line-height:22px">{{$receita['dataCadastro']['data']}}</div>
</div>
</div>
</div>
</div>
<div class="cell col-3 font-small" style="padding-top: 10px">
<div class="fieldset font-tiny" style="height: 55px; margin-bottom:5px">
<div class="legend" style="white-space: nowrap;">
<strong>17 - Assinatura e carimbo do médico*</strong>
</div>
<div class="row"></div>
</div>
</div>
</div>
<div class="row">
<div class="medicamento" style="padding:2px 5px 7px 5px; border:2px solid #000">
<table class="card">
<tbody>
<tr>
<td style="width: 100%;">
<table style="border-collapse: collapse; width: 100%;">
<tr>
<td style="padding-right: 1px; text-align: center; vertical-align: middle;">
18 - <strong style="font-size:10px; white-space: nowrap">CAMPOS ABAIXO PREENCHIDOS POR*</strong>
</td>
<td style="text-align: center; vertical-align: middle; padding-right: 2px;">
<input
type="checkbox"
name="preenchido_por"
value="paciente"
style="vertical-align: middle; margin: 0;"
>
</td>
<td style="padding-right: 8px; vertical-align: middle;">
<strong>Paciente</strong>
</td>
<td style="text-align: center; vertical-align: middle; padding-right: 2px;">
<input
type="checkbox"
name="preenchido_por"
value="mae"
style="vertical-align: middle; margin: 0;"
>
</td>
<td style="padding-right: 8px; vertical-align: middle; white-space: nowrap">
<strong>Mãe do paciente</strong>
</td>
<td style="text-align: center; vertical-align: middle; padding-right: 2px;">
<input
type="checkbox"
name="preenchido_por"
value="responsavel"
style="vertical-align: middle; margin: 0;"
>
</td>
<td style="vertical-align: middle; white-space: nowrap;">
<strong>Responsável</strong>
<span style="font-size: 9px;">
(descrito no item 13)
</span>
</td>
<td style="text-align: center; vertical-align: middle; padding-left: 2px;">
<input
type="checkbox"
name="preenchido_por"
value="medico"
checked
style="vertical-align: middle; margin: 0;"
>
</td>
<td style="vertical-align: middle; white-space: nowrap;">
<strong>Médico solicitante</strong>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width: 100%;">
<table style="border-collapse: collapse; width: 100%;">
<tr>
<td style="padding: 0; text-align: center; vertical-align: middle;">
<input type="checkbox" name="preenchido_por" value="paciente" style="margin-right:5px;">
</td>
<td style="white-space: nowrap; vertical-align: middle;">
Outro, informar nome:
</td>
<td style="padding: 0">
<table>
<tr>
<td style="padding: 0; width:350px; height:20px" >&nbsp;</td>
</tr>
<tr>
<td class="border-top" >&nbsp;</td>
</tr>
</table>
</td>
<td style="white-space: nowrap; vertical-align: middle;">
e CPF
</td>
<td style="padding: 0; text-align: center; vertical-align: middle;">
<input type="text" name="preenchido_por" value="" style="width:200px; height:20px; border: 1px solid #000; border-radius: 5px;">
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="cell col-6 font-small" style="padding-top: 10px; padding-right: 5px">
<div class="row">
<div class="cell col-12 font-small">
<div class="fieldset font-tiny" style="height: 80px">
<div class="legend">
<strong>19- Raça/Cor/Etnia informado pelo paciente ou responsável*</strong>
</div>
<div class="row">
<table style="border-collapse: collapse; width: 100%; padding-top: 10px">
<tr>
<td style="width: 100%;">
<table style="border-collapse: collapse; width: 100%;">
<tr>
<td style="text-align: center; vertical-align: middle; padding-right: 2px;">
<input
type="checkbox"
name="branca"
value="paciente"
style="vertical-align: middle; margin: 0;"
@if ($receita['paciente']['is_raca_cor_branca']) checked @endif
>
</td>
<td style="white-space: nowrap; vertical-align: middle; padding-right: 10px;">
Branca
</td>
<td style="text-align: center; vertical-align: middle; padding-right: 8px;">
<input
type="checkbox"
name="amarela"
value="paciente"
style="vertical-align: middle; margin: 0;"
@if ($receita['paciente']['is_raca_cor_amarela']) checked @endif
>
</td>
<td style="white-space: nowrap; vertical-align: middle;" colspan="2">
Amarela
</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; padding-right: 2px;">
<input
type="checkbox"
name="preta"
value="paciente"
style="vertical-align: middle; margin: 0;"
@if ($receita['paciente']['is_raca_cor_preta']) checked @endif
>
</td>
<td style="white-space: nowrap; vertical-align: middle; padding-right: 10px;">
Preta
</td>
<td style="text-align: center; vertical-align: middle; padding-right: 2px;">
<input
type="checkbox"
name="indigena"
value="paciente"
style="vertical-align: middle; margin: 0;"
@if ($receita['paciente']['is_raca_cor_indigena']) checked @endif
>
</td>
<td style="white-space: nowrap; vertical-align: middle;">
Indígena. Informar Etnia:
</td>
<td style="padding: 0; vertical-align: bottom;">
<table>
<tr>
<td style="padding: 0; width:250px; padding-top:12px">
@if ($receita['paciente']['is_raca_cor_indigena'])
{{$receita['paciente']['etnia_indigena']}}
@endif
</td>
</tr>
<tr>
<td class="border-top">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; padding-right: 8px;">
<input
type="checkbox"
name="preenchido_por"
value="paciente"
style="vertical-align: middle; margin: 0;"
>
</td>
<td style="white-space: nowrap; vertical-align: middle;" colspan="3">
Parda
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="cell col-12 font-small">
<div class="fieldset font-tiny" style="height: 30px;">
<div class="legend">
<strong>21- Número do documento do paciente</strong>
</div>
<div class="row">
<table style="border-collapse: collapse; width: 100%;">
<tr>
<td style="text-align: center; vertical-align: middle; padding-right: 5px;">
<input
type="checkbox"
name="preenchido_por"
value="paciente"
style="vertical-align: middle; margin: 0;"
@if($receita['paciente']['cpf']) checked @endif
>
</td>
<td style="white-space: nowrap; vertical-align: middle; padding-right: 1px;">
CPF ou
</td>
<td style="text-align: center; vertical-align: middle; padding-right: 5px;">
<input
type="checkbox"
name="preenchido_por"
value="paciente"
style="vertical-align: middle; margin: 0;"
@if(!$receita['paciente']['cpf']) checked @endif
>
</td>
<td style="white-space: nowrap; vertical-align: middle; padding-right: 1px;">
CNS
</td>
<td style="padding: 0; vertical-align: bottom;">
<table>
<tr>
<td style="vertical-align: middle; width:300px; padding-top:10px; padding-left:5px;">
@if($receita['paciente']['cpf'])
{{$receita['paciente']['cpf']}}
@else
{{$receita['paciente']['cns']}}
@endif
</td>
</tr>
<tr>
<td class="border-top">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="cell col-12 font-small">
<div class="fieldset font-tiny" style="height: 30px;">
<div class="legend">
<strong>22- Correio eletrônico do paciente</strong>
</div>
<div class="row font-size-default" style="line-height:25px">{!! $receita['paciente']['email'] ?? '&nbsp;' !!}</div>
</div>
</div>
</div>
</div>
<div class="cell col-5 font-small" style="padding-top: 10px">
<div class="fieldset font-tiny" style="height: 80px; margin-bottom:0px">
<div class="legend">
<strong>20 - Telefone(s) para contato do paciente *</strong>
</div>
<div>
<div style="height: 40px; line-height: 30px; border-bottom: 1px solid black;">{!! $receita['paciente']['telefone'] ?? '&nbsp;' !!}</div>
<div style="height: 40px; line-height: 30px;">{!! $receita['paciente']['celular'] ?? '&nbsp;' !!}</div>
</div>
</div>
<div class="fieldset font-tiny" style="height: 71px; margin-top: 7px; white-space: nowrap;">
<div class="legend">
<strong>23 - Assinatura do responsável pelo preenchimento*</strong>
</div>
<div class="row"></div>
</div>
</div>
</div>
<div class="row"><strong>* CAMPOS DE PREENCHIMENTO OBRIGATÓRIO</strong></div>
</div>
@endforeach
<style>
.medicamento {
border: 1px solid #000;
border-radius: 5px;
margin-top: 3px;
font-size: 10px !important;
}
.card td {
padding: 0px 5px;
}
.card-top td { padding-top: 0px; }
.card-bottom td {
padding-bottom: 0px;
}
.mt-12px {
margin-top: 12px;
}
.fieldset {
padding: 0px 5px 2px !important;
}
.data {
height: 22px !important;
}
.manual-line {
height: 18px !important;
border-bottom: 1px solid #000000 !important;
}
.border-bottom {
border-bottom: 1px solid #000000 !important;
}
.border-top {
border-top: 1px solid #000000 !important;
}
.border-left {
border-left: 1px solid #000000 !important;
}
.quantidade-mes {
width: 16.6%
}
</style>
@endsection

View File

@@ -0,0 +1,983 @@
<html lang="pt-BR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
* {
font-size: 11px;
margin: 0;
padding: 0;
}
table,
th,
td {
border: 1px solid black;
border-collapse: collapse;
}
td {
padding: 4px 5px;
vertical-align: middle;
}
fieldset {
border: 1px solid black;
}
legend {
background-color: white;
font-size: 10px;
font-weight: 400;
letter-spacing: -1px;
margin: 0 5px;
padding: 0 5px;
white-space: nowrap;
}
.float-right {
float: right;
}
.float-left {
float: left;
}
.clear {
clear: both;
}
.text-center {
text-align: center;
}
.border {
border: 1px solid black;
}
.border-right {
border-right: 1px solid black;
}
.no-border {
border: 0px;
}
.no-border-right {
border-right: 0px;
}
.no-margin {
margin: 0px;
}
.margin-right {
margin-right: 5px;
}
.no-padding {
padding: 0px;
}
.padding-left {
padding-left: 5px;
}
.padding-right {
padding-right: 5px;
}
.content {
border: 1px solid black;
padding: 10px;
width: 878px;
}
.header {
margin-bottom: 5px;
}
.header-title {
font-style: italic;
font-weight: bold;
text-align: center;
}
.box-title {
background-color: black;
color: white;
font-size: 12px;
font-weight: bold;
padding: 4px;
text-align: center;
}
.box-content {
border: 1px solid black;
padding: 4px 5px 0px 5px;
}
.box-content-line {
margin-bottom: 5px;
}
.box-content-text {
height: 20px;
line-height: 16px;
width: 100%;
overflow: hidden;
}
.box-content-text div {
height: 20px;
}
.legend {
font-size: 10px;
font-weight: 500;
letter-spacing: -1px;
}
</style>
</head>
<body>
@foreach ($solicitacoes as $solicitacao)
<div class="content">
<div class="header">
<div class="header-title text-center">
<div class="float-left border margin-right" style="width: 295px; height: 60px; line-height: 60px; font-size: 20px;">
<img width="290px" height="60px" src="data:image/png;base64, {{$solicitacao['logotipo']}}" />
</div>
<div class="float-left border" style="width: 574px; height: 60px; line-height: 30px; font-size: 20px;">
LAUDO PARA SOLICITAÇÃO/AUTORIZAÇÃO DE PROCEDIMENTO AMBULATORIAL
</div>
<div class="clear"></div>
</div>
</div>
<div class="box">
<div class="box-title">
IDENTIFICAÇÃO DO ESTABELECIMENTO DE SAÚDE (SOLICITANTE)
</div>
<div class="box-content">
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 697px;">
<legend>1-NOME DO ESTABELECIMENTO DE SAÚDE SOLICITANTE</legend>
<div class="box-content-text padding-left">{{$solicitacao['estabelecimento_saude_solicitante']['nome']}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center">
<legend>2-CNES</legend>
<div class="box-content-text">
<div class="float-left border-right" style="width: 22px;">{{$solicitacao['estabelecimento_saude_solicitante']['cnes'][0]}}</div>
<div class="float-left border-right" style="width: 22px;">{{$solicitacao['estabelecimento_saude_solicitante']['cnes'][1]}}</div>
<div class="float-left border-right" style="width: 22px;">{{$solicitacao['estabelecimento_saude_solicitante']['cnes'][2]}}</div>
<div class="float-left border-right" style="width: 22px;">{{$solicitacao['estabelecimento_saude_solicitante']['cnes'][3]}}</div>
<div class="float-left border-right" style="width: 22px;">{{$solicitacao['estabelecimento_saude_solicitante']['cnes'][4]}}</div>
<div class="float-left border-right" style="width: 22px;">{{$solicitacao['estabelecimento_saude_solicitante']['cnes'][5]}}</div>
<div class="float-left" style="width: 22px;">{{$solicitacao['estabelecimento_saude_solicitante']['cnes'][6]}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div class="box">
<div class="box-title">
IDENTIFICAÇÃO DO PACIENTE
</div>
<div class="box-content">
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 520px;">
<legend>3-NOME DO PACIENTE</legend>
<div class="box-content-text padding-left">{{$solicitacao['paciente']['nome']}} @if($solicitacao['paciente']['nome_social'])<strong>({{$solicitacao['paciente']['nome_social']}})</strong>@endif</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center margin-right" style="width: 180px;">
<legend>4-SEXO</legend>
<div class="box-content-text">
<div class="float-left" style="margin-left: 30px;">
<div class="float-left">
<div class="float-left border margin-right" style="width: 14px; height: 14px;">
{{$solicitacao['paciente']['sexo'] === 'M' ? 'X' : ''}}
</div>
<label class="float-left" style="height: 14px; line-height: 16px;">Masc.</label>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<div class="float-right" style="margin-right: 30px;">
<div class="float-left">
<div class="float-left border margin-right" style="width: 14px; height: 14px;">
{{$solicitacao['paciente']['sexo'] === 'F' ? 'X' : ''}}
</div>
<label class="float-left" style="height: 14px; line-height: 16px;">Fem.</label>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset style="width: 150px;">
<legend class="text-center">5-Nº DO PRONTUÁRIO</legend>
<div class="box-content-text padding-left">{{$solicitacao['paciente']['prontuario']}}</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right">
<legend>6-CARTÃO NACIONAL DE SAÚDE (CNS)</legend>
<div class="box-content-text text-center">
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][0]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][1]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][2]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][3]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][4]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][5]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][6]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][7]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][8]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][9]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][10]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][11]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][12]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['paciente']['cns'][13]}}</div>
<div class="float-left" style="width: 26px;">{{$solicitacao['paciente']['cns'][14]}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center margin-right" style="width: 153px;">
<legend>7-DATA DE NASCIMENTO</legend>
<div class="box-content-text">{{$solicitacao['paciente']['data_nascimento']}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center margin-right" style="width: 128px;">
<legend>8-RAÇA/COR</legend>
<div class="box-content-text">{{$solicitacao['paciente']['raca_cor']}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center" style="width: 158px;">
<legend>8.1-Nº DO PRONTUÁRIO</legend>
<div class="box-content-text"></div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 593px;">
<legend>9-NOME DA MÃE</legend>
<div class="box-content-text padding-left">{{$solicitacao['paciente']['nome_mae']}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center">
<legend>10-TELEFONE DE CONTATO</legend>
<div class="box-content-text">
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][0]}}</div>
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][1]}}</div>
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][2]}}</div>
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][3]}}</div>
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][4]}}</div>
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][5]}}</div>
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][6]}}</div>
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][7]}}</div>
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][8]}}</div>
<div class="float-left border-right" style="width: 23px;">{{$solicitacao['paciente']['telefone'][9]}}</div>
<div class="float-left" style="width: 23px;">
@if(!empty($solicitacao['paciente']['telefone']) && strlen($solicitacao['paciente']['telefone']) > 10)
{{ $solicitacao['paciente']['telefone'][10] }}
@endif
</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 593px;">
<legend>11-NOME DO RESPONSÁVEL</legend>
<div class="box-content-text"></div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center">
<legend>12-TELEFONE DE CONTATO</legend>
<div class="box-content-text">
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left border-right" style="width: 23px;"></div>
<div class="float-left" style="width: 23px;"></div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset style="width: 864px;">
<legend>13-ENDEREÇO (RUA, Nº, BAIRRO)</legend>
<div class="box-content-text padding-left">{{$solicitacao['paciente']['rua_numero_bairro']}}</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 480px;">
<legend>14-MUNICÍPIO DE RESIDÊNCIA</legend>
<div class="box-content-text padding-left">{{$solicitacao['paciente']['municipio_residencia']}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center margin-right" style="width: 155px;">
<legend>15-CÓD. IBGE MUNICÍPIO</legend>
<div class="box-content-text padding-left">{{$solicitacao['paciente']['codigo_ibge_municipio']}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="margin-right text-center">
<legend>16-UF</legend>
<div class="box-content-text">
<div class="float-left border-right" style="width: 28px;">{{$solicitacao['paciente']['uf'][0]}}</div>
<div class="float-left" style="width: 28px;">{{$solicitacao['paciente']['uf'][1]}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center">
<legend>17-CEP</legend>
<div class="box-content-text">
<div class="float-left border-right" style="width: 18px;">{{$solicitacao['paciente']['cep'][0]}}</div>
<div class="float-left border-right" style="width: 18px;">{{$solicitacao['paciente']['cep'][1]}}</div>
<div class="float-left border-right" style="width: 18px;">{{$solicitacao['paciente']['cep'][2]}}</div>
<div class="float-left border-right" style="width: 18px;">{{$solicitacao['paciente']['cep'][3]}}</div>
<div class="float-left border-right" style="width: 18px;">{{$solicitacao['paciente']['cep'][4]}}</div>
<div class="float-left border-right" style="width: 18px;">{{$solicitacao['paciente']['cep'][5]}}</div>
<div class="float-left border-right" style="width: 18px;">{{$solicitacao['paciente']['cep'][6]}}</div>
<div class="float-left" style="width: 18px;">{{$solicitacao['paciente']['cep'][7]}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div class="box">
<div class="box-title">
PROCEDIMENTO SOLICITADO
</div>
<div class="box-content">
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right">
<legend>18-CÓDIGO DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text text-center">
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][0]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][1]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][2]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][3]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][4]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][5]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][6]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][7]}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][8]}}</div>
<div class="float-left" style="width: 26px;">{{$solicitacao['itens'][0]['codigo'][9]}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="margin-right" style="width: 485px;">
<legend class="text-center">19-NOME DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text padding-left">{{$solicitacao['itens'][0]['nome']}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center" style="width: 96px;">
<legend>20-QTDE</legend>
<div class="box-content-text">{{$solicitacao['itens'][0]['quantidade']}}</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div class="box">
<div class="box-title">
PROCEDIMENTO(S) SECUNDÁRIO(S)
</div>
<div class="box-content">
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right">
<legend>21-CÓDIGO DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text text-center">
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][0] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][1] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][2] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][3] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][4] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][5] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][6] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][7] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][8] ?? null}}</div>
<div class="float-left" style="width: 26px;">{{$solicitacao['itens'][1]['codigo'][9] ?? null}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="margin-right" style="width: 485px;">
<legend class="text-center">22-NOME DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text padding-left">{{$solicitacao['itens'][1]['nome'] ?? null}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center" style="width: 96px;">
<legend>23-QTDE</legend>
<div class="box-content-text">{{$solicitacao['itens'][1]['quantidade'] ?? null}}</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right">
<legend>24-CÓDIGO DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text text-center">
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][0] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][1] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][2] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][3] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][4] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][5] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][6] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][7] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][8] ?? null}}</div>
<div class="float-left" style="width: 26px;">{{$solicitacao['itens'][2]['codigo'][9] ?? null}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="margin-right" style="width: 485px;">
<legend class="text-center">25-NOME DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text padding-left">{{$solicitacao['itens'][2]['nome'] ?? null}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center" style="width: 96px;">
<legend>26-QTDE</legend>
<div class="box-content-text">{{$solicitacao['itens'][2]['quantidade'] ?? null}}</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right">
<legend>27-CÓDIGO DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text text-center">
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][0] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][1] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][2] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][3] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][4] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][5] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][6] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][7] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][8] ?? null}}</div>
<div class="float-left" style="width: 26px;">{{$solicitacao['itens'][3]['codigo'][9] ?? null}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="margin-right" style="width: 485px;">
<legend class="text-center">28-NOME DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text padding-left">{{$solicitacao['itens'][3]['nome'] ?? null}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center" style="width: 96px;">
<legend>29-QTDE</legend>
<div class="box-content-text">{{$solicitacao['itens'][3]['quantidade'] ?? null}}</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right">
<legend>30-CÓDIGO DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text text-center">
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][0] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][1] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][2] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][3] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][4] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][5] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][6] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][7] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][8] ?? null}}</div>
<div class="float-left" style="width: 26px;">{{$solicitacao['itens'][4]['codigo'][9] ?? null}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="margin-right" style="width: 485px;">
<legend class="text-center">31-NOME DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text padding-left">{{$solicitacao['itens'][4]['nome'] ?? null}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center" style="width: 96px;">
<legend>32-QTDE</legend>
<div class="box-content-text">{{$solicitacao['itens'][4]['quantidade'] ?? null}}</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right">
<legend>33-CÓDIGO DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text text-center">
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][0] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][1] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][2] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][3] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][4] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][5] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][6] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][7] ?? null}}</div>
<div class="float-left border-right" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][8] ?? null}}</div>
<div class="float-left" style="width: 26px;">{{$solicitacao['itens'][5]['codigo'][9] ?? null}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="margin-right" style="width: 485px;">
<legend class="text-center">34-NOME DO PROCEDIMENTO PRINCIPAL</legend>
<div class="box-content-text padding-left">{{$solicitacao['itens'][5]['nome'] ?? null}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center" style="width: 96px;">
<legend>35-QTDE</legend>
<div class="box-content-text">{{$solicitacao['itens'][5]['quantidade'] ?? null}}</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div class="box">
<div class="box-title">
JUSTIFICATIVA DO(S) PROCEDIMENTO(S) SOLICITADO(S)
</div>
<div class="box-content">
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 365px;">
<legend>36-DESCRIÇÃO DO DIAGNÓSTICO</legend>
<div class="box-content-text padding-left">
{{$solicitacao['justificativa_procedimento_solicitado']['cid_nome'] ?? $solicitacao['justificativa_procedimento_solicitado']['ciap_descricao']}}
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center margin-right" style="width: 134px;">
<legend>37-CID 10 PRINCIPAL</legend>
<div class="box-content-text">{{$solicitacao['justificativa_procedimento_solicitado']['cid_codigo']}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center margin-right" style="width: 144px;">
<legend>38-CID 10 SECUNDÁRIO</legend>
<div class="box-content-text"></div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center" style="width: 200px;">
<legend>39-CID 10 CAUSAS ASSOCIADAS</legend>
<div class="box-content-text"></div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset style="width: 864px; height: 206px; white-space: normal;">
<legend>40-OBSERVAÇÕES</legend>
<div class="padding-left padding-right">
{{$solicitacao['justificativa_procedimento_solicitado']['descricao_diagnostico']}}
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div class="box">
<div class="box-title">
SOLICITAÇÃO
</div>
<div class="box-content">
<div class="float-left margin-right">
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 377px;">
<legend>41-NOME DO PROFISSIONAL SOLICITANTE</legend>
<div class="box-content-text padding-left">{{$solicitacao['solicitacao']['nome_profissional_solicitante']}}</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center" style="width: 143px;">
<legend>42-DATA DA SOLICITAÇÃO</legend>
<div class="box-content-text">{{$solicitacao['solicitacao']['data_solicitacao']}}</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="text-center margin-right" style="width: 131px;">
<legend>43-DOCUMENTO</legend>
<div class="box-content-text">
({{$solicitacao['solicitacao']['documento'] === 'cns' ? 'X' : ' '}}) CNS
({{$solicitacao['solicitacao']['documento'] === 'cpf' ? 'X' : ' '}}) CPF
</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center">
<legend>44-Nº DOCUMENTO (CNS/CPF) DO PROFISSIONAL SOLICITANTE</legend>
<div class="box-content-text">
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][0]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][1]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][2]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][3]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][4]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][5]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][6]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][7]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][8]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][9]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][10]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][11]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][12]}}</div>
<div class="float-left border-right" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][13]}}</div>
<div class="float-left" style="width: 25px;">{{$solicitacao['solicitacao']['numero_documento'][14]}}</div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
</div>
<div class="float-left">
<div class="box-content-line">
<fieldset style="width: 330px; height: 71px;">
<legend class="text-center">45-ASSINATURA E CARIMBO (Nº REGISTRO CONSELHO</legend>
</fieldset>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="box">
<div class="box-title">
AUTORIZAÇÃO
</div>
<div class="box-content">
<div class="float-left margin-right">
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 346px;">
<legend>46-NOME DO PROFISSIONAL AUTORIZADOR</legend>
<div class="box-content-text"></div>
</fieldset>
</div>
<div class="float-left">
<fieldset style="width: 176px;">
<legend class="text-center">47-CÓD. ÓRGÃO EMISSOR</legend>
<div class="box-content-text"></div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="text-center margin-right" style="width: 133px;">
<legend>43-DOCUMENTO</legend>
<div class="box-content-text">( ) CNS ( ) CPF</div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center">
<legend>44-Nº DOCUMENTO (CNS/CPF) DO PROFISSIONAL SOLICITANTE</legend>
<div class="box-content-text">
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left border-right" style="width: 25px;"></div>
<div class="float-left" style="width: 25px;"></div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 164px;">
<legend class="text-center">50-DATA DA AUTORIZAÇÃO</legend>
<div class="box-content-text"></div>
</fieldset>
</div>
<div class="float-left">
<fieldset style="width: 358px;">
<legend class="text-center">51-ASSINATURA E CARIMBO (Nº DO REGISTRO DO CONSELHO)</legend>
<div class="box-content-text padding-left" style="letter-spacing: 5px;">
&nbsp;&nbsp;/&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
</div>
<div class="float-left">
<div class="box-content-line">
<div class="float-left">
<fieldset style="width: 328px; height: 71px;">
<legend class="text-center">52-ASSINATURA E CARIMBO (Nº REGISTRO CONSELHO</legend>
<div class="box-content-text"></div>
</fieldset>
</div>
<div class="clear"></div>
</div>
<div class="box-content-line">
<div class="float-left">
<fieldset class="text-center" style="width: 328px;">
<legend>53-PERÍODO DE VALIDADE DA APAC</legend>
<div class="box-content-text" style="letter-spacing: 5px;">
&nbsp;&nbsp;/&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp; a &nbsp;&nbsp;/&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="box">
<div class="box-title">
IDENTIFICAÇÃO DO ESTABELECIMENTO DE SAÚDE (EXECUTANTE)
</div>
<div class="box-content">
<div class="box-content-line">
<div class="float-left">
<fieldset class="margin-right" style="width: 697px;">
<legend>54-NOME FANTASIA DO ESTABELECIMENTO DE SAÚDE EXECUTANTE</legend>
<div class="box-content-text"></div>
</fieldset>
</div>
<div class="float-left">
<fieldset class="text-center">
<legend>55-CNES</legend>
<div class="box-content-text">
<div class="float-left border-right" style="width: 22px;"></div>
<div class="float-left border-right" style="width: 22px;"></div>
<div class="float-left border-right" style="width: 22px;"></div>
<div class="float-left border-right" style="width: 22px;"></div>
<div class="float-left border-right" style="width: 22px;"></div>
<div class="float-left border-right" style="width: 22px;"></div>
<div class="float-left" style="width: 22px;"></div>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
@endforeach
</body>
</html>

View File

@@ -0,0 +1,120 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.col-min { width: 1%; }
.table th { text-align: center; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período</strong>
<div>
De {{ $data_inicio }} até {{ $data_fim }}
</div>
</div>
<div class="col-6">
<strong>Horário</strong>
<div>
De {{ $hora_inicio }} até {{ $hora_fim }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
<div class="col-6">
<strong>Especialidade</strong>
<div>
{{ $especialidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
<div class="col-6">
<strong>Tipo de atendimento</strong>
<div>
{{ $agendamento_tipo }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Status</strong>
<div>
{{ $agendamento_status }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Profissional</th>
<th>CBO</th>
<th>Especialidade</th>
<th>Tipo de atendimento</th>
<th>Data</th>
<th>Hora</th>
<th>Status</th>
<th>Profissional agendador</th>
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
<td>{{ $item->unidade }}</td>
<td>{{ $item->infraestrutura }}</td>
<td>{{ $item->usuario }}</td>
<td>{{ $item->ocupacao }}</td>
<td>{{ $item->especialidade }}</td>
<td>{{ $item->tipo }}</td>
<td>{{ \Carbon\Carbon::parse($item->data)->format('d/m/Y') }}</td>
<td>{{ $item->horario }}</td>
<td>{{ $item->status }}</td>
<td>{{ $item->usuario_agendamento }}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,121 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-3">
<strong>Período:</strong>
</div>
<div class="col-3">
<strong>Hora inicial:</strong>
</div>
<div class="col-3">
<strong>Hora final:</strong>
</div>
<div class="col-3">
<strong>Origem do atendimento:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
De {{ $periodo['inicio'] }} até {{ $periodo['fim'] }}
</div>
<div class="col-3">
{{ $inicio }}
</div>
<div class="col-3">
{{ $fim }}
</div>
<div class="col-3">
{{ $origem }}
</div>
</div>
<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>Especialidade:</strong>
</div>
<div class="col-6">
<strong>Profissional:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $especialidade }}
</div>
<div class="col-6">
{{ $usuario }}
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Status:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{ $status }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@foreach ($colunas as $coluna)
<th>{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
@foreach ($colunas as $coluna)
<td>
@if ($coluna['key'] === 'procedimentos')
@foreach ($item->{$coluna['key']} as $codigo)
<div>{{ $codigo }}</div>
@endforeach
@elseif ($coluna['key'] === 'telefones')
@foreach ($item->{$coluna['key']} as $numero)
<div>{{ $numero }}</div>
@endforeach
@else
{{ $item->{$coluna['key']} }}
@endif
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,107 @@
@extends('impressoes.layout1.content')
@section('conteudo')
@foreach ($orientacoes['orientacoes'] as $orientacao)
<div style="page-break-before: always">
<fieldset>
<legend>Identificação do paciente</legend>
<div class="row">
<div class="col-6">
<strong>Nome</strong>
<div>
{{$orientacao['paciente']['nome']}}
</div>
</div>
<div class="col-6">
<strong>Nome social</strong>
<div>
{{$orientacao['paciente']['nome_social']}}
</div>
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Data de nascimento</strong>
<div>
{{$orientacao['paciente']['data_nascimento']}}
</div>
</div>
<div class="col-4">
<strong>Idade</strong>
<div>
{{$orientacao['paciente']['idade']}}
</div>
</div>
<div class="col-4">
<strong>Nome da mãe</strong>
<div>
{{$orientacao['paciente']['nome_mae']}}
</div>
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Prontuário municipal</strong>
<div>
{{$orientacao['paciente']['prontuario']}}
</div>
</div>
<div class="col-4">
<strong>CPF</strong>
<div>
{{$orientacao['paciente']['cpf']}}
</div>
</div>
<div class="col-4">
<strong>CNS</strong>
<div>
{{$orientacao['paciente']['cns']}}
</div>
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Telefone</strong>
<div>
{{$orientacao['paciente']['telefone_numero']}}
</div>
</div>
<div class="col-4">
<strong>Município / Estado</strong>
<div>
{{$orientacao['paciente']['municipio']}} / {{$orientacao['paciente']['uf']}}
</div>
</div>
<div class="col-4">
<strong>Unidade de referência</strong>
<div>
{{$orientacao['paciente']['unidade_referencia']}}
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>Orientações</legend>
<div class="row">
<div class="col-12"style="font-size: 11px; line-height: 1.4; white-space: normal; word-break: break-word; overflow-wrap: anywhere;">
{{$orientacao['descricao']}}
</div>
</div>
</fieldset>
</div>
@endforeach
@endsection

View File

@@ -0,0 +1,186 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-procedimentos>thead>tr>th,
.table-procedimentos>tfoot>tr>th {
text-align: center;
}
.col-min {
width: 1%;
}
.atendido-em {
margin-bottom: 10px;
}
.assinatura {
margin: 0 auto;
width: 400px;
text-align: center;
padding-top: 80px;
page-break-inside: avoid;
}
.assinatura-linha {
border-top: 2px solid #000000;
margin-bottom: 5px;
}
</style>
@foreach ($posConsultas as $posConsulta)
<div class="page">
<fieldset>
<legend>Identificação do paciente</legend>
<div class="row">
<div class="col-6">
<strong>Nome</strong>
<div>
{{ $posConsulta['paciente']->nome }}
</div>
</div>
<div class="col-6">
<strong>Nome social</strong>
<div>
{{ $posConsulta['paciente']->nome_social }}
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Data de nascimento</strong>
<div>
{{ $posConsulta['paciente']->data_nascimento }}
</div>
</div>
<div class="col-3">
<strong>Idade</strong>
<div>
{{ $posConsulta['paciente']->idade }}
</div>
</div>
<div class="col-6">
<strong>Nome da mãe</strong>
<div>
{{ $posConsulta['paciente']->nome_mae }}
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Prontuário municipal</strong>
<div>
{{ $posConsulta['paciente']->prontuario }}
</div>
</div>
<div class="col-3">
<strong>CPF</strong>
<div>
{{ $posConsulta['paciente']->cpf }}
</div>
</div>
<div class="col-3">
<strong>CNS</strong>
<div>
{{ $posConsulta['paciente']->cns }}
</div>
</div>
<div class="col-3">
<strong>Telefone</strong>
<div>
{{ $posConsulta['paciente']->telefone_numero }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Município / Estado</strong>
<div>
{{ $posConsulta['paciente']->municipio_uf }}
</div>
</div>
<div class="col-6">
<strong>Unidade de referência</strong>
<div>
{{ $posConsulta['paciente']->unidade_referencia }}
</div>
</div>
</div>
</fieldset>
@if ($posConsulta['procedimentos']->isNotEmpty())
<fieldset>
<legend>Intervenções e/ou procedimentos clínicos realizados</legend>
<table class="table table-procedimentos">
<thead>
<tr>
<th>Código</th>
<th>Nome</th>
<th>Quantidade</th>
<th>Automático</th>
<th>Material</th>
<th>Quantidade do material</th>
</tr>
</thead>
<tbody>
@foreach ($posConsulta['procedimentos'] as $procedimento)
<tr>
<td>{{ $procedimento->codigo }}</td>
<td>{{ $procedimento->nome }}</td>
<td>{{ $procedimento->quantidade }}</td>
<td class="text-center">{{ $procedimento->automatico ? 'Sim' : 'Não' }}</td>
<td>{{ $procedimento->material_descricao_completa }}</td>
<td>{{ $procedimento->material_quantidade }}</td>
</tr>
@endforeach
</tbody>
</table>
</fieldset>
@endif
@isset($posConsulta['observacoes'])
<fieldset>
<legend>Observações da pós-consulta</legend>
<div class="row">
<div class="col-12">
{{ $posConsulta['observacoes'] }}
</div>
</div>
</fieldset>
@endisset
<fieldset>
<legend>Desfecho</legend>
<div class="row">
<div class="col-12">
{{ $posConsulta['desfecho'] }}
</div>
</div>
</fieldset>
<div class="assinatura">
<div class="assinatura-linha"></div>
<div>{{ $posConsulta['informacoesAdministrativas']->usuario_nome }}</div>
<div>{{ $posConsulta['informacoesAdministrativas']->ocupacao_descricao }}</div>
<div>{{ $posConsulta['informacoesAdministrativas']->documento }}</div>
</div>
</div>
@endforeach
@endsection

View File

@@ -0,0 +1,402 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-procedimentos>thead>tr>th,
.table-procedimentos>tfoot>tr>th {
text-align: center;
}
.col-min {
width: 1%;
}
.motivo-atendimento {
margin-top: 10px;
}
.atendido-em {
margin-bottom: 10px;
}
.assinatura {
margin: 0 auto;
width: 400px;
text-align: center;
padding-top: 80px;
page-break-inside: avoid;
}
.assinatura-linha {
border-top: 2px solid #000000;
margin-bottom: 5px;
}
</style>
<div class="atendido-em">
<strong>Atendido em </strong><span>{{ $dataHora }}</span>
</div>
<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-3">
<strong>Data de nascimento</strong>
<div>
{{ $paciente->data_nascimento }}
</div>
</div>
<div class="col-3">
<strong>Idade</strong>
<div>
{{ $paciente->idade }}
</div>
</div>
<div class="col-6">
<strong>Nome da mãe</strong>
<div>
{{ $paciente->nome_mae }}
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Prontuário municipal</strong>
<div>
{{ $paciente->prontuario }}
</div>
</div>
<div class="col-3">
<strong>CPF</strong>
<div>
{{ $paciente->cpf }}
</div>
</div>
<div class="col-3">
<strong>CNS</strong>
<div>
{{ $paciente->cns }}
</div>
</div>
<div class="col-3">
<strong>Telefone</strong>
<div>
{{ $paciente->telefone_numero }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Município / Estado</strong>
<div>
{{ $paciente->municipio_uf }}
</div>
</div>
<div class="col-6">
<strong>Unidade de referência</strong>
<div>
{{ $paciente->unidade_referencia }}
</div>
</div>
</div>
</fieldset>
@if (!empty($ciapDescricao) || !empty($motivoAtendimento))
<fieldset>
<legend>Motivo do atendimento</legend>
@isset ($ciapDescricao)
<div class="row">
<div class="col-12">
<strong>CIAP 2</strong>
<div>
{{ $ciapDescricao }}
</div>
</div>
</div>
@endisset
@isset ($motivoAtendimento)
<div class="row motivo-atendimento">
<div class="col-12">
{{ $motivoAtendimento }}
</div>
</div>
@endisset
</fieldset>
@endif
@if (isset($antropometria->peso)
|| isset($antropometria->altura)
|| isset($antropometria->imc->imc)
|| isset($antropometria->perimetro_cefalico)
|| isset($antropometria->circunferencia_abdominal)
|| isset($antropometria->perimetro_panturrilha)
)
<fieldset>
<legend>Antropometria</legend>
<div class="row">
<div class="col-3">
<strong>Peso</strong>
<div>
{{ $antropometria->peso }}
@isset ($antropometria->peso)
{{ $antropometria->peso_unidade_medida_sigla }}
@endisset
</div>
</div>
<div class="col-3">
<strong>Altura</strong>
<div>
{{ $antropometria->altura }}
@isset ($antropometria->altura)
{{ $antropometria->altura_unidade_medida_sigla }}
@endisset
</div>
</div>
<div class="col-3">
<strong>IMC</strong>
<div>
{{ $antropometria->imc->imc }}
@isset ($antropometria->imc->imc)
({{ $antropometria->imc->classificacao }})
@endisset
</div>
</div>
<div class="col-3">
<strong>Perímetro cefálico</strong>
<div>
{{ $antropometria->perimetro_cefalico }}
@isset ($antropometria->perimetro_cefalico)
{{ $antropometria->perimetro_cefalico_unidade_medida_sigla }}
@endisset
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Circunferência abdominal</strong>
<div>
{{ $antropometria->circunferencia_abdominal }}
@isset ($antropometria->circunferencia_abdominal)
{{ $antropometria->circunferencia_abdominal_unidade_medida_sigla }}
@endisset
</div>
</div>
<div class="col-3">
<strong>Perímetro da panturrilha</strong>
<div>
{{ $antropometria->perimetro_panturrilha }}
@isset ($antropometria->perimetro_panturrilha)
{{ $antropometria->perimetro_panturrilha_unidade_medida_sigla }}
@endisset
</div>
</div>
</div>
</fieldset>
@endif
@if (isset($sinalVital->pressao_arterial)
|| isset($sinalVital->frequencia_respiratoria)
|| isset($sinalVital->frequencia_cardiaca)
|| isset($sinalVital->temperatura)
|| isset($sinalVital->saturacao_o2)
)
<fieldset>
<legend>Sinais vitais</legend>
<div class="row">
<div class="col-3">
<strong>Pressão arterial</strong>
<div>
{{ $sinalVital->pressao_arterial }}
@isset ($sinalVital->pressao_arterial)
{{ $sinalVital->pressao_arterial_unidade_medida_sigla }}
@endisset
</div>
</div>
<div class="col-3">
<strong>Frequência respiratória</strong>
<div>
{{ $sinalVital->frequencia_respiratoria }}
@isset ($sinalVital->frequencia_respiratoria)
{{ $sinalVital->frequencia_respiratoria_unidade_medida_sigla }}
@endisset
</div>
</div>
<div class="col-3">
<strong>Frequência cardíaca</strong>
<div>
{{ $sinalVital->frequencia_cardiaca }}
@isset ($sinalVital->frequencia_cardiaca)
{{ $sinalVital->frequencia_cardiaca_unidade_medida_sigla }}
@endisset
</div>
</div>
<div class="col-3">
<strong>Temperatura</strong>
<div>
{{ $sinalVital->temperatura }}
@isset ($sinalVital->temperatura)
{{ $sinalVital->temperatura_unidade_medida_sigla }}
@endisset
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Saturação de O2</strong>
<div>
{{ $sinalVital->saturacao_o2 }}
@isset ($sinalVital->saturacao_o2)
{{ $sinalVital->saturacao_o2_unidade_medida_sigla }}
@endisset
</div>
</div>
</div>
</fieldset>
@endif
@isset ($glicemiaCapilar->valor)
<fieldset>
<legend>Glicemia capilar</legend>
<div class="row">
<div class="col-3">
<strong>Glicemia capilar</strong>
<div>
{{ $glicemiaCapilar->valor }} {{ $glicemiaCapilar->glicemia_capilar_unidade_medida_sigla }}
</div>
</div>
<div class="col-9">
<strong>Momento da coleta</strong>
<div>
{{ $glicemiaCapilar->momento_coleta_nome }}
</div>
</div>
</div>
</fieldset>
@endisset
@if ($procedimentos->isNotEmpty())
<fieldset>
<legend>Intervenções e/ou procedimentos clínicos realizados</legend>
<table class="table table-procedimentos">
<thead>
<tr>
<th>Código</th>
<th>Nome</th>
<th>Quantidade</th>
<th>Automático</th>
<th>Material</th>
<th>Quantidade do material</th>
</tr>
</thead>
<tbody>
@foreach ($procedimentos as $procedimento)
<tr>
<td>{{ $procedimento->codigo }}</td>
<td>{{ $procedimento->nome }}</td>
<td>{{ $procedimento->quantidade }}</td>
<td class="text-center">{{ $procedimento->automatico ? 'Sim' : 'Não' }}</td>
<td>{{ $procedimento->material_descricao_completa }}</td>
<td>{{ $procedimento->material_quantidade }}</td>
</tr>
@endforeach
</tbody>
</table>
</fieldset>
@endif
@if ($medicamentos->isNotEmpty())
<fieldset>
<legend>Medicamentos</legend>
<table class="table table-procedimentos">
<thead>
<tr>
<th>Nome</th>
<th>Quantidade</th>
</tr>
</thead>
<tbody>
@foreach ($medicamentos as $medicamento)
<tr>
<td>{{ $medicamento->descricao_completa }}</td>
<td>{{ $medicamento->quantidade }}</td>
</tr>
@endforeach
</tbody>
</table>
</fieldset>
@endif
@if ($isDemandaEspontanea)
<fieldset>
<legend>Classificação de risco / vunerabilidade</legend>
<div class="row">
<div class="col-12">
{{ $classificacaoRiscoNome }}
</div>
</div>
</fieldset>
<fieldset>
<legend>Desfecho</legend>
<div class="row">
<div class="col-12">
{{ $desfecho }}
</div>
</div>
</fieldset>
@endif
<div class="assinatura">
<div class="assinatura-linha"></div>
<div>{{ $informacoesAdministrativas->usuario_nome }}</div>
<div>{{ $informacoesAdministrativas->ocupacao_descricao }}</div>
<div>{{ $informacoesAdministrativas->documento }}</div>
</div>
@endsection

View File

@@ -0,0 +1,425 @@
@extends('impressoes.layout-receita.impressao', [
'paraAssinar' => !$exibirAssinatura,
'receita' => collect($receitas)->first() ?? []
])
@section('conteudo')
@foreach($receitas as $receita)
@php
$listaMedicamentosApresentados = [];
$temMedicamentoComRecomendacaoEmImpressaoNormal = false;
foreach ($receita['medicamentos'] as $medicamento) {
$conteudo = strip_tags($medicamento['recomendacoes']);
if(
!$medicamento["removerImpressao"] &&
!$medicamento['imprimirSeparado'] &&
($conteudo && strlen($conteudo) > 0)
) {
$temMedicamentoComRecomendacaoEmImpressaoNormal = true;
}
}
@endphp
@foreach($receita['medicamentos'] as $medicamento)
@if(!$medicamento["removerImpressao"] && !in_array($medicamento["nome"], $listaMedicamentosApresentados))
@if(!$medicamento['removerImpressao'] && $medicamento['imprimirSeparado'])
<div class="page">
<div class="row" style="padding-bottom: 2px">
<div class="cell col-5 font-small" style="padding-right:15px">
<div class="font-small border-bottom">
<strong>Medicamentos</strong>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="font-small border-bottom">
<strong>Medicamentos</strong>
</div>
</div>
</div>
@php $counter = 1; @endphp
@php
$linhaEndereco = strlen($receita['paciente']['endereco']) > 65 ? 1 : 0;
$linhaNome = strlen($receita['paciente']['nome']) > 70 ? 1 : 0;
$linhaUnidadeEndereco = strlen($receita['unidade']['endereco']) > 65 ? 1 : 0;
$linhaProfissionalNome = strlen($receita['profissional']['nome']) > 70 ? 1 : 0;
$totalLinhas = $linhaEndereco + $linhaNome + $linhaProfissionalNome+ $linhaUnidadeEndereco
@endphp
@php $primeiraFolha = true; @endphp
@php
$conteudo = strip_tags($medicamento['recomendacoes']);
$totalCaracteres = $conteudo ? strlen($conteudo) :1 ;
$linhas = ceil($totalCaracteres / 90);
$linhasMedicamentoNome = strlen($medicamento['nome']) > 72 ? 1 : 0;
$totalLinhas = $totalLinhas + $linhas + $linhasMedicamentoNome + 2;
@endphp
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px">
<div class="medicamento">
<table class="card">
<tbody>
@if($medicamento['usoContinuo'] || $medicamento['doseUnica'])
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px" >
<strong>{{ sprintf('%02d', $counter) }} - {{ $medicamento['nome'] }}</strong>
</td>
<td class="text-right" style="border-bottom: 1px solid #000;">
@if($medicamento['usoContinuo'])
uso contínuo
@elseif($medicamento['doseUnica'])
dose única
@endif
</td>
</tr>
@else
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px" colspan="2">
<strong>{{ sprintf('%02d', $counter) }} - {{ $medicamento['nome'] }}</strong>
</td>
</tr>
@endif
<tr class="card-middle">
<td style="padding-top: 5px;">
{{ $medicamento['posologia'] }}
@if($medicamento['duracao'])
durante
{{ $medicamento['duracao'] }}
{{ $medicamento['duracaoMedida'] }}
@endif
</td>
<td class="text-right" style="padding-top: 5px;">
<strong>Via: </strong>
{{ $medicamento['viaAdministracao'] }}
</td>
</tr>
<tr class="card-bottom">
<td colspan="2">
@if(!$medicamento['livre'])
<strong>Recomendações:</strong> {!! $medicamento['recomendacoes'] !!}
@endif
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="medicamento">
<table class="card">
<tbody>
@if($medicamento['usoContinuo'] || $medicamento['doseUnica'])
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px" >
<strong>{{ sprintf('%02d', $counter) }} - {{ $medicamento['nome'] }}</strong>
</td>
<td class="text-right" style="border-bottom: 1px solid #000;">
@if($medicamento['usoContinuo'])
uso contínuo
@elseif($medicamento['doseUnica'])
dose única
@endif
</td>
</tr>
@else
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px" colspan="2">
<strong>{{ sprintf('%02d', $counter) }} - {{ $medicamento['nome'] }}</strong>
</td>
</tr>
@endif
<tr class="card-middle">
<td style="padding-top: 5px;">
{{ $medicamento['posologia'] }}
@if($medicamento['duracao'])
durante
{{ $medicamento['duracao'] }}
{{ $medicamento['duracaoMedida'] }}
@endif
</td>
<td class="text-right" style="padding-top: 5px;">
<strong>Via: </strong>
{{ $medicamento['viaAdministracao'] }}
</td>
</tr>
<tr class="card-bottom">
<td colspan="2">
@if(!$medicamento['livre'])
<strong>Recomendações:</strong> {!! $medicamento['recomendacoes'] !!}
@endif
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@if ($primeiraFolha && $totalLinhas > 10 || !$primeiraFolha && $totalLinhas > 16 || $loop->last)
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px">
<div class="font-small mt-8px">
<div class="font-small mt-8px text-right">
{{ $_data['cliente']['municipio']['nome'] }} - {{ $_data['cliente']['municipio']['estado']['uf'] }}, {{ $receita['dataCadastro']['porExtenso'] }}
</div>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="font-small mt-8px">
<div class="font-small mt-8px text-right">
{{ $_data['cliente']['municipio']['nome'] }} - {{ $_data['cliente']['municipio']['estado']['uf'] }}, {{ $receita['dataCadastro']['porExtenso'] }}
</div>
</div>
</div>
</div>
@php $totalLinhas = 0 @endphp
@php $primeiraFolha = false @endphp
@endif
@php $counter++ @endphp
</div>
@else
<div class="page">
<div class="row" style="padding-bottom: 2px">
<div class="cell col-5 font-small" style="padding-right:15px">
<div class="font-small border-bottom">
<strong>Medicamentos</strong>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="font-small border-bottom">
<strong>Medicamentos</strong>
</div>
</div>
</div>
@php $counter = 0; @endphp
@php
$linhaEndereco = strlen($receita['paciente']['endereco']) > 65 ? 1 : 0;
$linhaNome = strlen($receita['paciente']['nome']) > 70 ? 1 : 0;
$linhaUnidadeEndereco = strlen($receita['unidade']['endereco']) > 65 ? 1 : 0;
$linhaProfissionalNome = strlen($receita['profissional']['nome']) > 70 ? 1 : 0;
$totalLinhas = $linhaEndereco + $linhaNome + $linhaProfissionalNome+ $linhaUnidadeEndereco
@endphp
@php $primeiraFolha = true; @endphp
@foreach($receita['medicamentos'] as $medicamento)
@if(!$medicamento['removerImpressao'] && !$medicamento['imprimirSeparado'])
@php
$conteudo = strip_tags($medicamento['recomendacoes']);
$totalCaracteres = $conteudo ? strlen($conteudo) :1 ;
$linhas = ceil($totalCaracteres / 90);
$linhasMedicamentoNome = strlen($medicamento['nome']) > 72 ? 1 : 0;
$totalLinhas = $totalLinhas + $linhas + $linhasMedicamentoNome;
$medicamentosPorPagina = ($counter % 4 == 0);
@endphp
@if($medicamentosPorPagina && $counter > 0)
<div class="row" style="page-break-before: always; padding-bottom: 2px">
<div class="cell col-5 font-small" style="padding-right:15px">
<div class="font-small border-bottom mt-8px">
<strong>Medicamentos</strong>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="font-small border-bottom mt-8px">
<strong>Medicamentos</strong>
</div>
</div>
</div>
@endif
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px">
<div class="medicamento">
<table class="card">
<tbody>
@if($medicamento['usoContinuo'] || $medicamento['doseUnica'])
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px" >
<strong>{{ sprintf('%02d', $counter + 1) }} - {{ $medicamento['nome'] }}</strong>
</td>
<td class="text-right" style="border-bottom: 1px solid #000;">
@if($medicamento['usoContinuo'])
uso contínuo
@elseif($medicamento['doseUnica'])
dose única
@endif
</td>
</tr>
@else
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px" colspan="2">
<strong>{{ sprintf('%02d', $counter + 1) }} - {{ $medicamento['nome'] }}</strong>
</td>
</tr>
@endif
<tr class="card-middle">
<td style="padding-top: 5px;">
{{ $medicamento['posologia'] }}
@if($medicamento['duracao'])
durante
{{ $medicamento['duracao'] }}
{{ $medicamento['duracaoMedida'] }}
@endif
</td>
<td class="text-right" style="padding-top: 5px;">
<strong>Via: </strong>
{{ $medicamento['viaAdministracao'] }}
</td>
</tr>
<tr class="card-bottom">
<td colspan="2">
@if(!$medicamento['livre'])
<strong>Recomendações:</strong> {!! $medicamento['recomendacoes'] !!}
@endif
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="medicamento">
<table class="card">
<tbody>
@if($medicamento['usoContinuo'] || $medicamento['doseUnica'])
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px" >
<strong>{{ sprintf('%02d', $counter + 1) }} - {{ $medicamento['nome'] }}</strong>
</td>
<td class="text-right" style="border-bottom: 1px solid #000;">
@if($medicamento['usoContinuo'])
uso contínuo
@elseif($medicamento['doseUnica'])
dose única
@endif
</td>
</tr>
@else
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px" colspan="2">
<strong>{{ sprintf('%02d', $counter + 1) }} - {{ $medicamento['nome'] }}</strong>
</td>
</tr>
@endif
<tr class="card-middle">
<td style="padding-top: 5px;">
{{ $medicamento['posologia'] }}
@if($medicamento['duracao'])
durante
{{ $medicamento['duracao'] }}
{{ $medicamento['duracaoMedida'] }}
@endif
</td>
<td class="text-right" style="padding-top: 5px;">
<strong>Via: </strong>
{{ $medicamento['viaAdministracao'] }}
</td>
</tr>
<tr class="card-bottom">
<td colspan="2">
@if(!$medicamento['livre'])
<strong>Recomendações:</strong> {!! $medicamento['recomendacoes'] !!}
@endif
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@php
if ($primeiraFolha && $totalLinhas > 10 || !$primeiraFolha && $totalLinhas > 16 || $loop->last) {
$totalLinhas = 0;
$primeiraFolha = false;
}
$counter++;
$listaMedicamentosApresentados[] = $medicamento["nome"];
@endphp
@endif
@endforeach
</div>
@endif
@endif
@endforeach
@endforeach
<style>
.medicamento {
border: 1px solid #000;
border-radius: 5px;
margin-top: 3px;
font-size: 10px !important;
}
.card td {
padding: 0px 5px;
}
.card-top td { padding-top: 0px;}
.card-bottom td {
padding-bottom: 0px;
}
.mt-8px {
margin-top: 8px;
}
.mt-12px {
margin-top: 12px;
}
.fieldset {
padding: 0px 5px 2px !important;
}
.data {
height: 22px !important;
}
.manual-line {
height: 18px !important;
border-bottom: 1px solid #000000 !important;
}
</style>
@endsection

View File

@@ -0,0 +1,407 @@
@extends('impressoes.layout.impressao', ['paraAssinar' => !$exibirAssinatura, '_infraestrutura' => $receita['infraestrutura']])
@section('conteudo')
<style>
header { width: 100%;}
footer { width: 100%;}
.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;
}
.line {
border-bottom: 1px solid black;
height: 20px;
width: 100%;
}
</style>
@foreach($receitas as $receita)
@if(!$receita["removerImpressao"])
<div class="page">
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px;">
<div class="col-2">
<fieldset>
<legend>Número</legend>
<div class="row">
<div class="col-12">
<div style="width: 100%; height: 20px;"></div>
</div>
</div>
</fieldset>
</div>
<div class="col-10"></div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px;">
<div class="col-2">
<fieldset>
<legend>Número</legend>
<div class="row">
<div class="col-12">
<div style="width: 100%; height: 20px;"></div>
</div>
</div>
</fieldset>
</div>
<div class="col-10"></div>
</div>
</div>
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px;">
<fieldset>
<legend>Paciente</legend>
<div class="row">
<div class="cell col-8">
<strong>Nome</strong>
<div>{{$receita['paciente']['nome']}} @if($receita['paciente']['nome_social'])<strong>({{$receita['paciente']['nome_social']}})</strong>@endif</div>
</div>
<div class="cell col-2">
<strong>Prontuário</strong>
<div>{{$receita['paciente']['prontuario']}}</div>
</div>
<div class="cell col-2">
<strong>CPF</strong>
<div>{{$receita['paciente']['cpf']}}</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Endereço</strong>
<div>{{$receita['paciente']['endereco']}}</div>
</div>
</div>
</fieldset>
</div>
<div class="cell col-5 font-small" style="padding-left:15px;">
<fieldset>
<legend>Paciente</legend>
<div class="row">
<div class="cell col-8">
<strong>Nome</strong>
<div>{{$receita['paciente']['nome']}} @if($receita['paciente']['nome_social'])<strong>({{$receita['paciente']['nome_social']}})</strong>@endif</div>
</div>
<div class="cell col-2">
<strong>Prontuário</strong>
<div>{{$receita['paciente']['prontuario']}}</div>
</div>
<div class="cell col-2">
<strong>CPF</strong>
<div>{{$receita['paciente']['cpf']}}</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Endereço</strong>
<div>{{$receita['paciente']['endereco']}}</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px;">
<fieldset>
<legend>Especialidade farmacêutica</legend>
<div class="row">
<div class="col-12">
<strong>Quantidade, apresentação e forma farmacêutica:</strong>
{{$receita['material']['quantidade']}} / {{$receita['material']['apresentacao']}} / {{$receita['material']['forma_farmaceutica']}}
</div>
<div class="col-12">
<strong>Nome:</strong> {{$receita['material']['descricao']}}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Concentração por unidade posológica:</strong> {{$receita['material']['dose']}}
</div>
</div>
<div class="row">
<div class="cell col-9">
<strong>Aplicação:</strong> {{ $receita['material']['posologia'] }}
@if($receita['material']['duracao'])
durante
{{ $receita['material']['duracao'] }}
{{ $receita['material']['duracaoMedida'] }}
@endif
</div>
<div class="cell col-3" style="text-align: right;">
<strong>Via:</strong> {{$receita['material']['via_administracao']}}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Recomendações:</strong> {!! $receita['recomendacoes'] !!}
</div>
</div>
</fieldset>
</div>
<div class="cell col-5 font-small" style="padding-left:15px;">
<fieldset>
<legend>Especialidade farmacêutica</legend>
<div class="row">
<div class="col-12">
<strong>Quantidade, apresentação e forma farmacêutica:</strong>
{{$receita['material']['quantidade']}} / {{$receita['material']['apresentacao']}} / {{$receita['material']['forma_farmaceutica']}}
</div>
<div class="col-12">
<strong>Nome:</strong> {{$receita['material']['descricao']}}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Concentração por unidade posológica:</strong> {{$receita['material']['dose']}}
</div>
</div>
<div class="row">
<div class="cell col-9">
<strong>Aplicação:</strong> {{ $receita['material']['posologia'] }}
@if($receita['material']['duracao'])
durante
{{ $receita['material']['duracao'] }}
{{ $receita['material']['duracaoMedida'] }}
@endif
</div>
<div class="cell col-3" style="text-align: right;">
<strong>Via:</strong> {{$receita['material']['via_administracao']}}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Recomendações:</strong> {!! $receita['recomendacoes'] !!}
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px;">
<div class="assinatura">
@if($exibirAssinatura)
<div class="assinatura-linha"></div>
@endif
<div>{{ $receita['informacoes_administrativas']['usuario_nome'] }}</div>
<div>{{ $receita['informacoes_administrativas']['ocupacao_descricao'] }}</div>
<div>{{ $receita['informacoes_administrativas']['documento'] }}</div>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px;">
<div class="assinatura">
@if($exibirAssinatura)
<div class="assinatura-linha"></div>
@endif
<div>{{ $receita['informacoes_administrativas']['usuario_nome'] }}</div>
<div>{{ $receita['informacoes_administrativas']['ocupacao_descricao'] }}</div>
<div>{{ $receita['informacoes_administrativas']['documento'] }}</div>
</div>
</div>
</div>
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px;">
<table>
<tr>
<td width="300px">
<fieldset style="height: 100px">
<legend>Identificação do comprador</legend>
<div class="row">
<div class="col-12">
<strong>Nome</strong>
<div class="line"></div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Endereço</strong>
<div class="line"></div>
</div>
</div>
<div style="width:100px; float: float;">
<table>
<tr>
<td width="98px">
<strong>Telefone</strong>
<div class="line"></div>
</td>
<td width="90px">
<strong>RG</strong>
<div class="line"></div>
</td>
<td width="90px">
<strong>Orgão emissor</strong>
<div class="line"></div>
</td>
</tr>
</table>
</div>
</fieldset>
</td>
<td>
<fieldset style="height: 100px">
<legend>Identificação do fornecedor</legend>
<div class="row">
<div class="col-12">
<div style="width: 100%; height: 35px;"></div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Data</strong>
<div class="line"></div>
</div>
<div class="col-12">
<strong>Nome</strong>
<div class="line"></div>
</div>
</div>
</fieldset>
</td>
</tr>
</table>
</div>
<div class="cell col-5 font-small" style="padding-left:15px;">
<table>
<tr>
<td width="300px">
<fieldset style="height: 100px">
<legend>Identificação do comprador</legend>
<div class="row">
<div class="col-12">
<strong>Nome</strong>
<div class="line"></div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Endereço</strong>
<div class="line"></div>
</div>
</div>
<div style="width:100px; float: float;">
<table>
<tr>
<td width="98px">
<strong>Telefone</strong>
<div class="line"></div>
</td>
<td width="90px">
<strong>RG</strong>
<div class="line"></div>
</td>
<td width="90px">
<strong>Orgão emissor</strong>
<div class="line"></div>
</td>
</tr>
</table>
</div>
</fieldset>
</td>
<td>
<fieldset style="height: 100px">
<legend>Identificação do fornecedor</legend>
<div class="row">
<div class="col-12">
<div style="width: 100%; height: 35px;"></div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Data</strong>
<div class="line"></div>
</div>
<div class="col-12">
<strong>Nome</strong>
<div class="line"></div>
</div>
</div>
</fieldset>
</td>
</tr>
</table>
</div>
</div>
</div>
@endif
@endforeach
@endsection

View File

@@ -0,0 +1,386 @@
@extends('impressoes.layout.impressao', ['paraAssinar' => !$exibirAssinatura, '_infraestrutura' => $receita['infraestrutura']])
@section('conteudo')
<style>
header { width: 100%;}
footer { width: 100%;}
.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;
}
.line {
border-bottom: 1px solid black;
height: 15px;
width: 100%;
}
</style>
@foreach($receitas as $receita)
@if(!$receita["removerImpressao"])
<div class="page">
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px;">
<div class="row">
<div class="col-4">
<fieldset>
<legend>Número</legend>
<div class="row">
<div class="col-6">
<div style="width: 100%; height: 20px;"></div>
</div>
</div>
</fieldset>
</div>
<div class="col-4"></div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Paciente</legend>
<div class="row">
<div class="cell col-8">
<strong>Nome</strong>
<div>{{$receita['paciente']['nome']}} @if($receita['paciente']['nome_social'])<strong>({{$receita['paciente']['nome_social']}})</strong>@endif</div>
</div>
<div class="cell col-2">
<strong>Prontuário</strong>
<div>{{$receita['paciente']['prontuario']}}</div>
</div>
<div class="cell col-2">
<strong>CPF</strong>
<div>{{$receita['paciente']['cpf']}}</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Endereço</strong>
<div>{{$receita['paciente']['endereco']}}</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Medicamento</legend>
<div class="row">
<div class="col-12">
<strong>Quantidade / Forma farmacêutica:</strong> {{$receita['material']['quantidade']}} / {{$receita['material']['forma_farmaceutica']}}
</div>
<div class="col-12">
<strong>Medicamento ou substância:</strong> {{$receita['material']['descricao']}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Dose por unidade posológica:</strong> {{$receita['material']['dose']}}
</div>
</div>
<div class="row">
<div class="cell col-9">
<strong>Posologia:</strong> {{$receita['material']['posologia']}}
</div>
<div class="cell col-3" style="text-align: right;">
<strong>Via:</strong> {{$receita['material']['via_administracao']}}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Recomendações:</strong> {!! $receita['recomendacoes'] !!}
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="assinatura">
@if($exibirAssinatura)
<div class="assinatura-linha"></div>
@endif
<div>{{ $receita['informacoes_administrativas']['usuario_nome'] }}</div>
<div>{{ $receita['informacoes_administrativas']['ocupacao_descricao'] }}</div>
<div>{{ $receita['informacoes_administrativas']['documento'] }}</div>
</div>
</div>
</div>
<div class="row mt-1">
<table>
<tr>
<td width="300px">
<fieldset style="height: 100px">
<legend>Identificação do comprador</legend>
<div class="row">
<div class="col-12">
<strong>Nome</strong>
<div class="line"></div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Endereço</strong>
<div class="line"></div>
</div>
</div>
<div style="width:100px; float: float;">
<table>
<tr>
<td width="98px">
<strong>Telefone</strong>
<div class="line"></div>
</td>
<td width="90px">
<strong>RG</strong>
<div class="line"></div>
</td>
<td width="90px">
<strong>Orgão emissor</strong>
<div class="line"></div>
</td>
</tr>
</table>
</div>
</fieldset>
</td>
<td>
<fieldset style="height: 100px">
<legend>Carimbo do fornecedor</legend>
<div class="row">
<div class="col-12">
<div style="width: 100%; height: 40px;"></div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Data</strong>
<div class="line"></div>
</div>
<div class="col-12">
<strong>Nome do vendedor</strong>
<div class="line"></div>
</div>
</div>
</fieldset>
</td>
</tr>
</table>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px;">
<div class="row">
<div class="col-4">
<fieldset>
<legend>Número</legend>
<div class="row">
<div class="col-6">
<div style="width: 100%; height: 20px;"></div>
</div>
</div>
</fieldset>
</div>
<div class="col-4"></div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Paciente</legend>
<div class="row">
<div class="cell col-8">
<strong>Nome</strong>
<div>{{$receita['paciente']['nome']}} @if($receita['paciente']['nome_social'])<strong>({{$receita['paciente']['nome_social']}})</strong>@endif</div>
</div>
<div class="cell col-2">
<strong>Prontuário</strong>
<div>{{$receita['paciente']['prontuario']}}</div>
</div>
<div class="cell col-2">
<strong>CPF</strong>
<div>{{$receita['paciente']['cpf']}}</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Endereço</strong>
<div>{{$receita['paciente']['endereco']}}</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Medicamento</legend>
<div class="row">
<div class="col-12">
<strong>Quantidade / Forma farmacêutica:</strong> {{$receita['material']['quantidade']}} / {{$receita['material']['forma_farmaceutica']}}
</div>
<div class="col-12">
<strong>Medicamento ou substância:</strong> {{$receita['material']['descricao']}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Dose por unidade posológica:</strong> {{$receita['material']['dose']}}
</div>
</div>
<div class="row">
<div class="cell col-9">
<strong>Posologia:</strong> {{$receita['material']['posologia']}}
</div>
<div class="cell col-3" style="text-align: right;">
<strong>Via:</strong> {{$receita['material']['via_administracao']}}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Recomendações:</strong> {!! $receita['recomendacoes'] !!}
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="assinatura">
@if($exibirAssinatura)
<div class="assinatura-linha"></div>
@endif
<div>{{ $receita['informacoes_administrativas']['usuario_nome'] }}</div>
<div>{{ $receita['informacoes_administrativas']['ocupacao_descricao'] }}</div>
<div>{{ $receita['informacoes_administrativas']['documento'] }}</div>
</div>
</div>
</div>
<div class="row mt-1">
<table>
<tr>
<td width="300px">
<fieldset style="height: 100px">
<legend>Identificação do comprador</legend>
<div class="row">
<div class="col-12">
<strong>Nome</strong>
<div class="line"></div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Endereço</strong>
<div class="line"></div>
</div>
</div>
<div style="width:100px; float: float;">
<table>
<tr>
<td width="98px">
<strong>Telefone</strong>
<div class="line"></div>
</td>
<td width="90px">
<strong>RG</strong>
<div class="line"></div>
</td>
<td width="90px">
<strong>Orgão emissor</strong>
<div class="line"></div>
</td>
</tr>
</table>
</div>
</fieldset>
</td>
<td>
<fieldset style="height: 100px">
<legend>Carimbo do fornecedor</legend>
<div class="row">
<div class="col-12">
<div style="width: 100%; height: 40px;"></div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Data</strong>
<div class="line"></div>
</div>
<div class="col-12">
<strong>Nome do vendedor</strong>
<div class="line"></div>
</div>
</div>
</fieldset>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
@endif
@endforeach
@endsection

View File

@@ -0,0 +1,304 @@
@extends('impressoes.layout-receita-especial.impressao', [
'paraAssinar' => !$exibirAssinatura,
'receita' => collect($receitas)->first() ?? []
])
@section('conteudo')
@php
function countRecomendacoes($html)
{
$lines = 0;
if (empty($html)) {
return $lines;
}
$dom = new \DOMDocument();
libxml_use_internal_errors(true);
$dom->loadHTML($html);
libxml_clear_errors();
$tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
foreach ($tags as $tag) {
$elements = $dom->getElementsByTagName($tag);
foreach ($elements as $el) {
$lines += ceil(mb_strlen($el->textContent) / 90);
}
}
return (int) $lines;
}
@endphp
@foreach($receitas as $receita)
@php
$medicamentosSeparados = $receita['medicamentos']->filter(fn ($m) => $m['imprimirSeparado'])->values();
$medicamentosUsoContinuo = $receita['medicamentos']->filter(fn ($m) => !$m['imprimirSeparado'] && $m['usoContinuo'])->values();
$demaisMedicamentos = $receita['medicamentos']->filter(fn ($m) => !$m['imprimirSeparado'] && !$m['usoContinuo'])->values();
$hasMedicamentosSeparados = $medicamentosSeparados->isNotEmpty();
$hasMedicamentosUsoContinuo = $medicamentosUsoContinuo->isNotEmpty();
$hasDemaisMedicamentos = $demaisMedicamentos->isNotEmpty();
@endphp
@foreach($medicamentosSeparados as $medicamento)
<div class="page font-small">
<div class="row">
@for($via = 1; $via <= 2; $via++)
<div class="cell col-5" style="padding-{{ $via == 1 ? 'right' : 'left' }}: 15px;">
<div class="medicamento">
<table class="card">
<tbody>
<tr class="card-top">
<td
style="border-bottom: 1px solid #000; padding: 5px"
colspan="{{ $medicamento['usoContinuo'] || $medicamento['doseUnica'] ? 1 : 2 }}"
>
<strong>{{ sprintf('%02d', 1) }} - {{ $medicamento['nome'] }}</strong>
</td>
@if($medicamento['usoContinuo'] || $medicamento['doseUnica'])
<td class="text-right" style="border-bottom: 1px solid #000; width: 80px">
@if($medicamento['usoContinuo'])
uso contínuo
@elseif($medicamento['doseUnica'])
dose única
@endif
</td>
@endif
</tr>
<tr class="card-middle">
<td style="padding-top: 5px;">
{{ $medicamento['posologia'] }}
@if($medicamento['duracao'])
durante
{{ $medicamento['duracao'] }}
{{ $medicamento['duracaoMedida'] }}
@endif
</td>
<td class="text-right" style="padding-top: 5px;">
<strong>Via: </strong>
{{ $medicamento['viaAdministracao'] }}
</td>
</tr>
<tr class="card-bottom">
<td colspan="2">
@if(!$medicamento['livre'])
<strong>Recomendações:</strong> {!! $medicamento['recomendacoes'] !!}
@endif
</td>
</tr>
</tbody>
</table>
</div>
</div>
@endfor
</div>
</div>
@endforeach
@php
$medicamentosImpressos = 0;
$quantidadesLinhasRecomendacoesAnterior = 0;
@endphp
@foreach($medicamentosUsoContinuo as $i => $medicamento)
@php
$quantidadeLinhasRecomendacoes = countRecomendacoes($medicamento['recomendacoes']);
$pageBreakBefore = false;
if ($i === 0) {
if ($hasMedicamentosSeparados) {
$pageBreakBefore = true;
}
}
else {
if ($medicamentosImpressos === 2
|| ($quantidadesLinhasRecomendacoesAnterior + $quantidadeLinhasRecomendacoes) > 5
) {
$pageBreakBefore = true;
$medicamentosImpressos = 0;
}
}
$medicamentosImpressos++;
$quantidadesLinhasRecomendacoesAnterior = $quantidadeLinhasRecomendacoes;
@endphp
<div class="row font-small" style="{{ $pageBreakBefore ? 'page-break-before: always;' : '' }}">
@for($via = 1; $via <= 2; $via++)
<div class="cell col-5" style="padding-{{ $via == 1 ? 'right' : 'left' }}: 15px;">
<div class="medicamento">
<table class="card">
<tbody>
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px">
<strong>{{ sprintf('%02d', $i + 1) }} - {{ $medicamento['nome'] }}</strong>
</td>
<td class="text-right" style="border-bottom: 1px solid #000; width: 80px">
uso contínuo
</td>
</tr>
<tr class="card-middle">
<td style="padding-top: 5px;">
{{ $medicamento['posologia'] }}
@if($medicamento['duracao'])
durante
{{ $medicamento['duracao'] }}
{{ $medicamento['duracaoMedida'] }}
@endif
</td>
<td class="text-right" style="padding-top: 5px;">
<strong>Via: </strong>
{{ $medicamento['viaAdministracao'] }}
</td>
</tr>
<tr class="card-bottom">
<td colspan="2">
@if(!$medicamento['livre'])
<strong>Recomendações:</strong> {!! $medicamento['recomendacoes'] !!}
@endif
</td>
</tr>
</tbody>
</table>
</div>
</div>
@endfor
</div>
@endforeach
@php
$medicamentosImpressos = 0;
$quantidadesLinhasRecomendacoesAnterior = 0;
@endphp
@foreach($demaisMedicamentos as $i => $medicamento)
@php
$quantidadeLinhasRecomendacoes = countRecomendacoes($medicamento['recomendacoes']);
$pageBreakBefore = false;
if ($i === 0) {
if ($hasMedicamentosSeparados || $hasMedicamentosUsoContinuo) {
$pageBreakBefore = true;
}
}
else {
if ($medicamentosImpressos === 2
|| ($quantidadesLinhasRecomendacoesAnterior + $quantidadeLinhasRecomendacoes) > 5
) {
$pageBreakBefore = true;
$medicamentosImpressos = 0;
}
}
$medicamentosImpressos++;
$quantidadesLinhasRecomendacoesAnterior = $quantidadeLinhasRecomendacoes;
@endphp
<div class="row font-small" style="{{ $pageBreakBefore ? 'page-break-before: always;' : '' }}">
@for($via = 1; $via <= 2; $via++)
<div class="cell col-5" style="padding-{{ $via == 1 ? 'right' : 'left' }}: 15px;">
<div class="medicamento">
<table class="card">
<tbody>
<tr class="card-top">
<td
style="border-bottom: 1px solid #000; padding: 5px"
colspan="{{ $medicamento['doseUnica'] ? 1 : 2 }}"
>
<strong>{{ sprintf('%02d', $i + 1) }} - {{ $medicamento['nome'] }}</strong>
</td>
@if($medicamento['doseUnica'])
<td class="text-right" style="border-bottom: 1px solid #000; width: 80px">
dose única
</td>
@endif
</tr>
<tr class="card-middle">
<td style="padding-top: 5px;">
{{ $medicamento['posologia'] }}
@if($medicamento['duracao'])
durante
{{ $medicamento['duracao'] }}
{{ $medicamento['duracaoMedida'] }}
@endif
</td>
<td class="text-right" style="padding-top: 5px;">
<strong>Via: </strong>
{{ $medicamento['viaAdministracao'] }}
</td>
</tr>
<tr class="card-bottom">
<td colspan="2">
@if(!$medicamento['livre'])
<strong>Recomendações:</strong> {!! $medicamento['recomendacoes'] !!}
@endif
</td>
</tr>
</tbody>
</table>
</div>
</div>
@endfor
</div>
@endforeach
@endforeach
<style>
.medicamento {
border: 1px solid #000;
border-radius: 5px;
margin-top: 3px;
font-size: 10px !important;
}
.endereco-margin {
margin-top: 15px;
}
.card td {
padding: 0px 5px;
}
.card-top td { padding-top: 0px; }
.card-bottom td {
padding-bottom: 0px;
}
.mt-8px {
margin-top: 8px;
}
.mt-12px {
margin-top: 12px;
}
.fieldset {
padding: 0px 5px 2px !important;
}
.data {
height: 22px !important;
}
.manual-line {
height: 18px !important;
border-bottom: 1px solid #000000 !important;
}
</style>
@endsection

View File

@@ -0,0 +1,103 @@
@extends('impressoes.layout-receita.impressao', [
'paraAssinar' => !$exibirAssinatura,
'receita' => collect($receitas)->first() ?? []
])
@section('conteudo')
@foreach($receitas as $receita)
@foreach($receita['medicamentos'] as $index => $medicamento)
@foreach($medicamento['descricao_paginas'] as $parteIndex => $descricao)
<div class="page">
<div class="row">
<div class="cell col-5 font-small mt-1" style="padding-right:15px">
<div class="medicamento">
<table class="card">
<tbody>
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px">
<strong>{{ sprintf('%02d', $index + 1) }} - MEDICAMENTO</strong>
</td>
</tr>
<tr>
<td style="padding: 5px">
<strong>Descrição:</strong> {!! $descricao !!}
</td>
</tr>
@if ($loop->last)
<tr class="card-bottom">
<td style="border-top: 1px solid #000; padding: 5px">
<strong>Recomendações:</strong> {!! $medicamento['recomendacoes'] !!}
</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="medicamento">
<table class="card">
<tbody>
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px">
<strong>{{ sprintf('%02d', $index + 1) }} - MEDICAMENTO</strong>
</td>
</tr>
<tr>
<td style="padding: 5px">
<strong>Descrição:</strong> {!! $descricao !!}
</td>
</tr>
@if ($loop->last)
<tr class="card-bottom">
<td style="border-top: 1px solid #000; padding: 5px">
<strong>Recomendações:</strong> {!! $medicamento['recomendacoes'] !!}
</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
@endforeach
@endforeach
@endforeach
<style>
.medicamento {
border: 1px solid #000;
border-radius: 5px;
margin-top: 3px;
font-size: 10px !important;
}
.card td {
padding: 0px 5px;
}
.card-top td { padding-top: 0px; }
.card-bottom td {
padding-bottom: 0px;
}
.mt-8px {
margin-top: 8px;
}
.mt-12px {
margin-top: 12px;
}
.fieldset {
padding: 0px 5px 2px !important;
}
.data {
height: 22px !important;
}
.manual-line {
height: 18px !important;
border-bottom: 1px solid #000000 !important;
}
</style>
@endsection

View File

@@ -0,0 +1,253 @@
@extends('impressoes.layout-receita.impressao', [
'paraAssinar' => !$exibirAssinatura,
'receita' => collect($receitas)->first() ?? []
])
@section('conteudo')
@foreach($receitas as $receita)
@foreach($receita['medicamentos'] as $medicamento)
<div class="page">
<div class="row" style="padding-bottom: 2px">
<div class="cell col-5 font-small" style="padding-right:15px">
<div class="font-small border-bottom mt-8px">
<strong>MEDICAMENTOS</strong>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="font-small border-bottom mt-8px">
<strong>MEDICAMENTOS</strong>
</div>
</div>
</div>
<div class="row">
<div class="cell col-5 font-small" style="padding-right:15px">
<div class="medicamento">
<table class="card">
<tbody>
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px">
<strong>Descrição:</strong> {!! $medicamento['descricao'] !!}
</td>
</tr>
<tr class="card-bottom">
<td>
<strong>Recomendações:</strong> {!!$medicamento['recomendacoes']!!}
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="medicamento">
<table class="card">
<tbody>
<tr class="card-top">
<td style="border-bottom: 1px solid #000; padding: 5px">
<strong>Descrição:</strong> {!! $medicamento['descricao']!!}
</td>
</tr>
<tr class="card-bottom">
<td>
<strong>Recomendações:</strong> {!!$medicamento['recomendacoes']!!}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row" style="padding-top: 5px;" >
<div class="cell col-5 font-small" style="padding-right:15px">
<div class="fieldset mt-8px font-tiny">
<div class="legend">
<strong>Identificação do comprador</strong>
</div>
<div class="row">
<div class="cell col-min" style="vertical-align: bottom;">
<strong>Nome:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
</div>
<div class="row">
<div class="cell col-min" style="vertical-align: bottom;">
<strong>RG:</strong>
</div>
<div class="cell" style="vertical-align: bottom; padding-right: 5px;">
<div class="manual-line"></div>
</div>
<div class="cell col-min" style="vertical-align: bottom;">
<strong>Órgão emissor:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
</div>
<div class="row">
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>Endereço:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
</div>
<div class="row">
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>Cidade:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>UF:</strong>
</div>
<div class="cell col-1" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>Telefone:</strong>
</div>
<div class="cell col-2" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
</div>
</div>
<div class="fieldset mt-8px font-tiny">
<div class="legend">
<strong>Identificação do fornecedor</strong>
</div>
<div class="row mt-1">
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>Assinatura do farmacêutico:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
<div class="cell col-6" style="vertical-align: bottom; white-space: nowrap; text-align: right;">
<strong>Data de fornecimento:</strong> <span class="empty-date"></span>
</div>
</div>
</div>
</div>
<div class="cell col-5 font-small" style="padding-left:15px">
<div class="fieldset mt-8px font-tiny">
<div class="legend">
<strong>Identificação do comprador</strong>
</div>
<div class="row">
<div class="cell col-min" style="vertical-align: bottom;">
<strong>Nome:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
</div>
<div class="row">
<div class="cell col-min" style="vertical-align: bottom;">
<strong>RG:</strong>
</div>
<div class="cell" style="vertical-align: bottom; padding-right: 5px;">
<div class="manual-line"></div>
</div>
<div class="cell col-min" style="vertical-align: bottom;">
<strong>Órgão emissor:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
</div>
<div class="row">
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>Endereço:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
</div>
<div class="row">
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>Cidade:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>UF:</strong>
</div>
<div class="cell col-1" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>Telefone:</strong>
</div>
<div class="cell col-2" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
</div>
</div>
<div class="fieldset mt-8px font-tiny">
<div class="legend">
<strong>Identificação do fornecedor</strong>
</div>
<div class="row mt-1">
<div class="cell col-min" style="vertical-align: bottom; white-space: nowrap">
<strong>Assinatura do farmacêutico:</strong>
</div>
<div class="cell" style="vertical-align: bottom;">
<div class="manual-line"></div>
</div>
<div class="cell col-6" style="vertical-align: bottom; white-space: nowrap; text-align: right;">
<strong>Data de fornecimento:</strong> <span class="empty-date"></span>
</div>
</div>
</div>
</div>
</div>
</div>
@endforeach
@endforeach
<style>
.medicamento {
border: 1px solid #000;
border-radius: 5px;
margin-top: 3px;
font-size: 10px !important;
}
.card td {
padding: 0px 5px;
}
.card-top td { padding-top: 0px; }
.card-bottom td {
padding-bottom: 0px;
}
.mt-8px {
margin-top: 8px;
}
.mt-12px {
margin-top: 12px;
}
.fieldset {
padding: 0px 5px 2px !important;
}
.data {
height: 22px !important;
}
.manual-line {
height: 18px !important;
border-bottom: 1px solid #000000 !important;
}
</style>
@endsection

View File

@@ -0,0 +1,161 @@
@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>Especialidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $especialidade }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional:</strong>
</div>
<div class="col-6">
<strong>Status:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $usuario }}
</div>
<div class="col-6">
{{ $status }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Tipo de demanda</th>
<th>Data de atendimento</th>
<th>Profissional</th>
<th>Especialidade</th>
<th>Paciente</th>
<th>Prontuário</th>
<th>Horário</th>
<th>Cids / Ciaps</th>
<th>Procedimentos</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach($itens['atendimentos'] as $atendimento)
<tr>
<td>{{$atendimento->demanda_tipo}}</td>
<td>{{$atendimento->data_atendimento}}</td>
<td>{{$atendimento->usuario_nome}}</td>
<td>{{$atendimento->especialidade_nome}}</td>
<td>{{$atendimento->paciente_nome}}</td>
<td>{{$atendimento->paciente_prontuario}}</td>
<td>{{$atendimento->horario_atendimento}}</td>
<td>
@foreach($atendimento->cids_ciaps as $cidCiap)
{{$cidCiap}} <br/>
@endforeach
</td>
<td>
@foreach($atendimento->procedimentos as $procedimento)
{{$procedimento}} <br/>
@endforeach
</td>
<td>{{$atendimento->agendamento_status_nome}}</td>
</tr>
@endforeach
</tbody>
</table>
<br />
<fieldset>
<legend>Totais</legend>
<div class="row">
<div class="col-3">
<strong>Total de pacientes:</strong>
</div>
<div class="col-3">
<strong>Total de atendimentos realizadas:</strong>
</div>
<div class="col-3">
<strong>Total de faltas:</strong>
</div>
<div class="col-3">
<strong>Total de procedimentos lançados:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{$itens['totalizadores']['quantidade_pacientes']}}
</div>
<div class="col-3">
{{$itens['totalizadores']['quantidade_atendimentos_realizados']}}
</div>
<div class="col-3">
{{$itens['totalizadores']['quantidade_faltas']}}
</div>
<div class="col-3">
{{$itens['totalizadores']['quantidade_procedimentos_lancados']}}
</div>
</div>
</fieldset>
@endsection

View File

@@ -0,0 +1,102 @@
@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>Especialidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $especialidade }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $usuario }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Data</th>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Especialidade</th>
<th>Profissional</th>
<th>Total</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->data}}</td>
<td>{{$item->unidade_nome_fantasia}}</td>
<td>{{$item->infraestrutura_nome}}</td>
<td>{{$item->especialidade_nome}}</td>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->total}}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th
colspan="6"
style="text-align: right;"
>
Total: {{$data['totalizadores']['quantidade_agendamentos']}}
</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,235 @@
@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-3">
<strong>Tipo de demânda:</strong>
</div>
<div class="col-3">
<strong>Tipo de agendamento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
De {{$periodo['inicio'] }} até {{ $periodo['fim']}}
</div>
<div class="col-3">
{{$demanda_tipo}}
</div>
<div class="col-3">
{{$agendamento_tipo}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Municipio:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$municipio}}
</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>Especialidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$infraestrutura}}
</div>
<div class="col-6">
{{$especialidade}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional:</strong>
</div>
<div class="col-6">
<strong>Status:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$usuario}}
</div>
<div class="col-6">
{{$status}}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Data</th>
<th>Tipo de agendamento</th>
<th>Municipio</th>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Especialidade</th>
<th>Profissional</th>
<th>Status</th>
<th>Total</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->data}}</td>
<td>{{$item->agendamento_tipo_nome}}</td>
<td>{{$item->municipio_nome}}</td>
<td>{{$item->unidade_nome_fantasia}}</td>
<td>{{$item->infraestrutura_nome}}</td>
<td>{{$item->especialidade_nome}}</td>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->agendamento_status_nome}}</td>
<td>{{$item->quantidade}}</td>
</tr>
@endforeach
</tbody>
</table>
<fieldset>
<legend>Totais</legend>
<div class="row">
<div class="col-3">
<strong>Agendado:</strong>
</div>
<div class="col-3">
<strong>Realizado:</strong>
</div>
<div class="col-3">
<strong>Reagendado pelo paciente:</strong>
</div>
<div class="col-3">
<strong>Reagendado pelo médico:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{$data['totalizadores']['agendado']}}
</div>
<div class="col-3">
{{$data['totalizadores']['realizado']}}
</div>
<div class="col-3">
{{$data['totalizadores']['reagendado_paciente']}}
</div>
<div class="col-3">
{{$data['totalizadores']['reagendado_medico']}}
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Cancelado pelo paciente:</strong>
</div>
<div class="col-3">
<strong>Cancelado pelo médico:</strong>
</div>
<div class="col-3">
<strong>Falta do paciente:</strong>
</div>
<div class="col-3">
<strong>Falta do médico:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{$data['totalizadores']['cancelado_paciente']}}
</div>
<div class="col-3">
{{$data['totalizadores']['cancelado_medico']}}
</div>
<div class="col-3">
{{$data['totalizadores']['falta_paciente']}}
</div>
<div class="col-3">
{{$data['totalizadores']['falta_medica']}}
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Aberto:</strong>
</div>
<div class="col-3">
<strong>Total geral:</strong>
</div>
<div class="col-3"></div>
<div class="col-3"></div>
</div>
<div class="row">
<div class="col-3">
{{$data['totalizadores']['aberto']}}
</div>
<div class="col-3">
{{$data['totalizadores']['geral']}}
</div>
<div class="col-3"></div>
<div class="col-3"></div>
</div>
</fieldset>
@endsection

View File

@@ -0,0 +1,126 @@
@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-3">
<strong>Especialidade:</strong>
</div>
<div class="col-3">
<strong>Profissional:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-3">
{{ $especialidade }}
</div>
<div class="col-3">
{{ $usuario }}
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Status:</strong>
</div>
<div class="col-3">
<strong>Idade de:</strong>
</div>
<div class="col-3">
<strong>Idade até:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{ $status }}
</div>
<div class="col-3">
{{ $idade_de }}
</div>
<div class="col-3">
{{ $idade_ate }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Data</th>
<th>Especialidade</th>
<th>Profissional</th>
<th>Paciente / CNS</th>
<th>Status</th>
<th>Idade</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->data}}</td>
<td>{{$item->especialidade_nome}}</td>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->paciente_nome}} / {{$item->paciente_cns}}</td>
<td>{{$item->agendamento_status_nome}}</td>
<td>{{$item->paciente_idade}}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th
colspan="6"
style="text-align: right;"
>
Total: {{$data['totalizadores']['quantidade_atendimentos']}}
</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,171 @@
@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-4">
<strong>Local de atendimento:</strong>
</div>
<div class="col-4">
<strong>Especialidade:</strong>
</div>
<div class="col-4">
<strong>Profissional:</strong>
</div>
</div>
<div class="row">
<div class="col-4">
{{ $infraestrutura }}
</div>
<div class="col-4">
{{ $especialidade }}
</div>
<div class="col-4">
{{ $usuario }}
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Origem:</strong>
</div>
</div>
<div class="row">
<div class="col-4">
{{ $origem }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th rowspan="3">Profissional</th>
<th rowspan="3">Especialidade</th>
<th rowspan="3">Unidade</th>
<th rowspan="3">Local de atendimento</th>
@if(!$onlyDemandasEspontaneas)
<th style="text-align: center;" colspan="7">Agendamento</th>
@endif
@if(!$onlyAgendamentos)
<th style="text-align: center;" colspan="3">Demanda espontânea</th>
@endif
</tr>
<tr>
@if(!$onlyDemandasEspontaneas)
<th style="text-align: center;" colspan="2">Realizadas</th>
<th style="text-align: center;" colspan="2">Faltas do paciente</th>
<th style="text-align: center;" colspan="2">Faltas do médico</th>
<th rowspan="2">Total</th>
@endif
@if(!$onlyAgendamentos)
<th style="text-align: center;" colspan="2">Realizadas</th>
<th rowspan="2">Total</th>
@endif
</tr>
<tr>
@if(!$onlyDemandasEspontaneas)
<th style="text-align: center;">Quantidade</th>
<th style="text-align: center;">%</th>
<th style="text-align: center;">Quantidade</th>
<th style="text-align: center;">%</th>
<th style="text-align: center;">Quantidade</th>
<th style="text-align: center;">%</th>
@endif
@if(!$onlyAgendamentos)
<th style="text-align: center;">Quantidade</th>
<th style="text-align: center;">%</th>
@endif
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->especialidade_nome}}</td>
<td>{{$item->unidade_nome_fantasia}}</td>
<td>{{$item->infraestrutura_nome}}</td>
@if(!$onlyDemandasEspontaneas)
<td class="text-center">{{$item->agendamento_quantidade_atendimento_realizado}}</td>
<td class="text-center">{{$item->agendamento_porcentagem_atendimento_realizado}}%</td>
<td class="text-center">{{$item->agendamento_quantidade_falta_paciente}}</td>
<td class="text-center">{{$item->agendamento_porcentagem_falta_paciente}}%</td>
<td class="text-center">{{$item->agendamento_quantidade_falta_medico}}</td>
<td class="text-center">{{$item->agendamento_porcentagem_falta_medico}}%</td>
<td class="text-center">{{$item->agendamento_quantidade_atendimento}}</td>
@endif
@if(!$onlyAgendamentos)
<td class="text-center">{{$item->demanda_espontanea_quantidade_atendimento_realizado}}</td>
<td class="text-center">{{$item->demanda_espontanea_porcentagem_atendimento_realizado}}%</td>
<td class="text-center">{{$item->demanda_espontanea_quantidade_atendimento}}</td>
@endif
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th colspan="4"></th>
@if(!$onlyDemandasEspontaneas)
<th style="text-align: center;">{{$data['totalizadores']['agendamento_quantidade_atendimento_realizado']}}</th>
<th style="text-align: center;">{{$data['totalizadores']['agendamento_porcentagem_atendimento_realizado']}}%</th>
<th style="text-align: center;">{{$data['totalizadores']['agendamento_quantidade_falta_paciente']}}</th>
<th style="text-align: center;">{{$data['totalizadores']['agendamento_porcentagem_falta_paciente']}}%</th>
<th style="text-align: center;">{{$data['totalizadores']['agendamento_quantidade_falta_medico']}}</th>
<th style="text-align: center;">{{$data['totalizadores']['agendamento_porcentagem_falta_medico']}}%</th>
<th style="text-align: center;">{{$data['totalizadores']['agendamento_quantidade_atendimento']}}</th>
@endif
@if(!$onlyAgendamentos)
<th style="text-align: center;">{{$data['totalizadores']['demanda_espontanea_quantidade_atendimento_realizado']}}</th>
<th style="text-align: center;">{{$data['totalizadores']['demanda_espontanea_porcentagem_atendimento_realizado']}}%</th>
<th style="text-align: center;">{{$data['totalizadores']['demanda_espontanea_quantidade_atendimento']}}</th>
@endif
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,108 @@
@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-4">
<strong>Local de atendimento:</strong>
</div>
<div class="col-4">
<strong>Especialidade:</strong>
</div>
<div class="col-4">
<strong>Profissional:</strong>
</div>
</div>
<div class="row">
<div class="col-4">
{{ $infraestrutura }}
</div>
<div class="col-4">
{{ $especialidade }}
</div>
<div class="col-4">
{{ $usuario }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Procedimento:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $procedimento }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Data</th>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Especialidade</th>
<th>Profissional</th>
<th>Procedimento</th>
<th>Quantidade</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->data}}</td>
<td>{{$item->unidade_nome_fantasia}}</td>
<td>{{$item->infraestrutura_nome}}</td>
<td>{{$item->especialidade_nome}}</td>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->procedimento}}</td>
<td>{{$item->quantidade}}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th colspan="6"></th>
<th>{{$data['totalizadores']['quantidade']}}</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,126 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table 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>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-2">
<strong>Status</strong>
<div>
{{ $status }}
</div>
</div>
<div class="col-4">
<strong>Situação</strong>
<div>
{{ $situacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
<div class="col-6">
<strong>Especialidade</strong>
<div>
{{ $especialidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
</div>
</fieldset>
<div class="row">
<div class="col-12 text-right">
A = AGENDADAS | C = CONSULTA | R = RETORNO | T = TOTAL
</div>
</div>
<table class="table">
<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'] }}">
@if ($coluna['key'] === 'quantidade_consulta')
{{ $item->quantidade_consulta_agendado }}/{{ $item->quantidade_consulta_total }}
@elseif ($coluna['key'] === 'quantidade_retorno')
{{ $item->quantidade_retorno_agendado }}/{{ $item->quantidade_retorno_total }}
@elseif ($coluna['key'] === 'quantidade_total')
{{ $item->quantidade_total_agendado }}/{{ $item->quantidade_total_total }}
@else
{{ $item->{$coluna['key']} ?? '-' }}
@endif
</td>
@endforeach
</tr>
@endforeach
<tr>
<th colspan="{{ $colunas->count() - 3 }}"></th>
<th>
{{ $totalizadores->quantidade_consulta->agendado }}/{{ $totalizadores->quantidade_consulta->total }}
</th>
<th>
{{ $totalizadores->quantidade_retorno->agendado }}/{{ $totalizadores->quantidade_retorno->total }}
</th>
<th>
{{ $totalizadores->quantidade_total->agendado }}/{{ $totalizadores->quantidade_total->total }}
</th>
</tr>
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,81 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table 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>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Especialidade</strong>
<div>
{{ $especialidade }}
</div>
</div>
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<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,145 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table 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>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Especialidade</strong>
<div>
{{ $especialidade }}
</div>
</div>
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Procedimento</strong>
<div>
{{ $procedimento }}
</div>
</div>
</div>
</fieldset>
@foreach ($itens as $i => $item)
<table class="table" style="{{ $i > 0 ? 'margin-top: 10px;' : '' }}">
<tr>
<th>
Unidade: {{ $item->unidade_nome_fantasia }}<br>Local de atendimento: {{ $item->infraestrutura_nome }}
</th>
</tr>
</table>
<div style="padding: 5px;">
@foreach ($item->usuarios as $j => $usuario)
<table class="table" style="{{ $j > 0 ? 'margin-top: 10px;' : '' }}">
<thead>
<tr>
<th colspan="{{ count($colunas) }}">
Profissional: {{ $usuario->usuario_nome ?? '-' }}
</th>
</tr>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($usuario->procedimentos as $procedimento)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }}">{{ $procedimento->{$coluna['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
<tr>
<th colspan="{{ $colunas->count() - 1 }}" style="text-align: left !important;">
Total de atendimentos: {{ $usuario->quantidade_atendimentos }}
</th>
<th>
{{ $usuario->quantidade_procedimentos }}
</th>
</tr>
</tbody>
</table>
@endforeach
<table class="table" style="margin-top: 10px;">
<tr>
<th style="border-right: none !important">
Total de atendimentos do local de atend.: {{ $item->quantidade_atendimentos }}
</th>
<th style="border-left: none !important">
Total de procedimentos do local de atend.: {{ $item->quantidade_procedimentos }}
</th>
</tr>
</table>
</div>
@endforeach
<table class="table" style="margin-top: 10px;">
<tr>
<th style="border-right: none !important">
Total de atendimentos geral: {{ $totalizadores->quantidade_atendimentos }}
</th>
<th style="border-left: none !important">
Total de procedimentos geral: {{ $totalizadores->quantidade_procedimentos }}
</th>
</tr>
</table>
@endsection

View File

@@ -0,0 +1,112 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table 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>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Especialidade</strong>
<div>
{{ $especialidade }}
</div>
</div>
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Procedimento</strong>
<div>
{{ $procedimento }}
</div>
</div>
<div class="col-6">
<strong>Tipo de Demanda</strong>
<div>
{{ $demandaTipo }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<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)
@php $val = $item->{$coluna['key']} ?? null; @endphp
<td class="{{ $coluna['class'] }}">
@if(is_iterable($val))
{{ collect($val)->filter()->implode(', ') ?: '-' }}
@else
{{ $val ?? '-' }}
@endif
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
<div class="row mt-2 mb-2">
<div class="col-12 d-flex" style="gap: 2rem;">
<span><strong>Total de Registros:</strong> {{ $totalRegistros }}</span>
<span><strong>Total de Procedimentos:</strong> {{ $totalProcedimentos }}</span>
<span><strong>Total ABPG:</strong> {{ $totalAbpg }}</span>
</div>
</div>
@endsection

View File

@@ -0,0 +1,94 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table 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>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Procedimento</strong>
<div>
{{ $procedimento }}
</div>
</div>
<div class="col-6">
<strong>Idade (anos)</strong>
<div>
@if ($idadeDe && $idadeAte)
De {{ $idadeDe }} até {{ $idadeAte }}
@elseif ($idadeDe && !$idadeAte)
De {{ $idadeDe }}
@elseif (!$idadeDe && $idadeAte)
Até {{ $idadeAte }}
@endif
</div>
</div>
</div>
</fieldset>
<table class="table">
<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
<tr>
<th colspan="{{ $colunas->count() - 1 }}"></th>
<th>
{{ $totalizadores->quantidade }}
</th>
</tr>
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,143 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table 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>Ano</strong>
<div>
{{ $ano }}
</div>
</div>
<div class="col-4">
<strong>Mês</strong>
<div>
{{ $mes }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Especialidade</strong>
<div>
{{ $especialidade }}
</div>
</div>
</div>
</fieldset>
@foreach ($itens as $i => $infraestrutura)
<table class="table" style="{{ $i > 0 ? 'margin-top: 10px;' : '' }}">
<thead>
<tr>
<th colspan="{{ count($colunas) }}">
Unidade: {{ $infraestrutura->unidade_nome_fantasia }}<br>Local de atendimento: {{ $infraestrutura->infraestrutura_nome }}
</th>
</tr>
<tr>
<th></th>
<th colspan="{{ count($colunas) - 2 }}">
Dia do mês
</th>
<th></th>
</tr>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] ?? '' }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($infraestrutura->usuarios as $usuario)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] ?? '' }}">{{ $usuario->{$coluna['key']} }}</td>
@endforeach
</tr>
@endforeach
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] ?? ''}}">{{ $infraestrutura->{$coluna['key']} ?? '' }}</th>
@endforeach
</tr>
</tbody>
</table>
@endforeach
<table class="table" style="margin-top: 10px;">
<thead>
<tr>
<th colspan="{{ count($colunasTotalizadores) }}">
Totalizadores
</th>
</tr>
<tr>
<th colspan="{{ count($colunasTotalizadores) - 1 }}">
Dia do mês
</th>
<th></th>
</tr>
<tr>
@foreach ($colunasTotalizadores as $coluna)
<th class="{{ $coluna['class'] ?? '' }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
<tr>
@foreach ($colunasTotalizadores as $coluna)
<td class="{{ $coluna['class'] ?? '' }}">{{ $totalizadores->{$coluna['key']} }}</td>
@endforeach
</tr>
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,103 @@
@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>CBO:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $ocupacao }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>CID:</strong>
</div>
<div class="col-3">
<strong>Idade de:</strong>
</div>
<div class="col-3">
<strong>Idade até:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $cid }}
</div>
<div class="col-3">
{{ $idade_de }}
</div>
<div class="col-3">
{{ $idade_ate }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>CID</th>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Quantidade</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->cid}}</td>
<td>{{$item->unidade_nome_fantasia}}</td>
<td>{{$item->infraestrutura_nome}}</td>
<td>{{$item->quantidade}}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,86 @@
@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>Especialidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $especialidade }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Especialidade</th>
<th>Total</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{$item->unidade_nome_fantasia}}</td>
<td>{{$item->infraestrutura_nome}}</td>
<td>{{$item->especialidade_nome}}</td>
<td>{{$item->total}}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th
colspan="4"
style="text-align: right;"
>
Total: {{$data['totalizadores']['quantidade_agendamentos']}}
</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,97 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table 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>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Especialidade</strong>
<div>
{{ $especialidade }}
</div>
</div>
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Procedimento</strong>
<div>
{{ $procedimento }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<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
<tr>
<th colspan="{{ $colunas->count() - 1 }}"></th>
<th>
{{ $totalizadores->quantidade }}
</th>
</tr>
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,100 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table 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>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
<div class="col-6">
<strong>Procedimento</strong>
<div>
{{ $procedimento }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Idade (anos)</strong>
<div>
@if ($idadeDe && $idadeAte)
De {{ $idadeDe }} até {{ $idadeAte }}
@elseif ($idadeDe && !$idadeAte)
De {{ $idadeDe }}
@elseif (!$idadeDe && $idadeAte)
Até {{ $idadeAte }}
@endif
</div>
</div>
</div>
</fieldset>
<table class="table">
<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
<tr>
<th colspan="{{ $colunas->count() }}" style="text-align: center;">Total de procedimentos: {{ $totalizadores->quantidade }}</th>
</tr>
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,163 @@
@extends('impressoes.layout1.content')
<style>
* {
font-size: 14px;
}
.totais-row {
display: table-row;
}
.totais-cell {
display: table-cell;
padding: 3px 6px;
vertical-align: top;
width: 28%;
}
.totais-label { font-weight: bold; color: #222; }
</style>
@section('conteudo')
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-3">
<strong>Período:</strong>
</div>
<div class="col-3">
<strong>Unidade:</strong>
</div>
<div class="col-3">
<strong>Local de atendimento:</strong>
</div>
<div class="col-3">
<strong>Status:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
De {{ $periodo['inicio'] }} até {{ $periodo['fim'] }}
</div>
<div class="col-3">
{{ $unidade }}
</div>
<div class="col-3">
{{ $infraestrutura }}
</div>
<div class="col-3">
{{ $status }}
</div>
</div>
<div class="row">
<div class="col-3">
<strong>CBO:</strong>
</div>
<div class="col-3">
<strong>Especialidade:</strong>
</div>
<div class="col-3">
<strong>Profissional:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{ $cbo }}
</div>
<div class="col-3">
{{ $especialidade }}
</div>
<div class="col-3">
{{ $usuario }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens['itens'] as $atendimento)
<tr>
@foreach ($colunas as $coluna)
@php
$key = $coluna['key'];
$valor = data_get($atendimento, $key, '-');
@endphp
<td class="{{ $coluna['class'] ?? '' }}">
{{ $valor }}
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
<br />
<fieldset>
<legend>Totais</legend>
<div class="totais-row">
<div class="totais-cell">
<span class="totais-label">Pacientes distintos atendidos: </span>
{{$itens['totalizadores']['pacientes_distintos_atendidos']}}
</div>
<div class="totais-cell">
<span class="totais-label">feridas realizados: </span>
{{$itens['totalizadores']['atendimentos_realizados']}}
</div>
<div class="totais-cell">
<span class="totais-label">SOAPs geradas: </span>
{{$itens['totalizadores']['soaps_geradas']}}
</div>
<div class="totais-cell">
<span class="totais-label">Feridas registradas: </span>
{{$itens['totalizadores']['feridas_registradas']}}
</div>
</div>
<div class="totais-row">
<div class="totais-cell">
<span class="totais-label">Procedimentos lançados: </span>
{{$itens['totalizadores']['procedimentos_lancados']}}
</div>
<div class="totais-cell">
<span class="totais-label">Kits/materiais consumidos: </span>
{{$itens['totalizadores']['kits_materiais_consumidos']}}
</div>
<div class="totais-cell">
<span class="totais-label">Valores de custo total: </span>
{{$itens['totalizadores']['valor_custo_total']}}
</div>
</div>
</fieldset>
@endsection

View File

@@ -0,0 +1,346 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.assinatura {
margin: 0 auto;
width: 400px;
text-align: center;
padding-top: 80px;
page-break-inside: avoid;
}
.assinatura-linha {
border-top: 2px solid #000000;
margin-bottom: 5px;
}
.checkbox {
display: inline-block;
width: 10px;
height: 10px;
border: 2px solid #222222;
}
.blank-line {
border-bottom: 1px solid #000000;
}
.blank-line-mr {
margin-right: 10px;
}
</style>
@foreach ($solicitacoes as $solicitacao)
@php
$limite = 1100;
$justificativa = $solicitacao['justificativa'];
$partes = [];
while (strlen($justificativa) > 0) {
if (strlen($justificativa) <= $limite) {
$partes[] = $justificativa;
break;
}
$parte = substr($justificativa, 0, $limite);
$ultimoEspaco = strrpos($parte, ' ');
if ($ultimoEspaco === false) {
$ultimoEspaco = $limite;
}
$partes[] = substr($justificativa, 0, $ultimoEspaco);
$justificativa = substr($justificativa, $ultimoEspaco + 1);
}
$solicitacao['justificativa'] = $partes;
$linhasJustificativa = count($partes);
@endphp
<div style="page-break-before: always">
<div class="row">
<div class="col-12">
<fieldset>
<legend>Identificação do paciente</legend>
<div class="row">
<div class="col-2">
<strong>Prontuário</strong>
<div>
{{ $paciente['prontuario'] }}
</div>
</div>
<div class="col-5">
<strong>Nome</strong>
<div>
{{ $paciente['nome'] }} {{ $paciente['nome_social'] ? '(' . $paciente['nome_social'] . ')' : '' }}
</div>
</div>
<div class="col-3">
<strong>Data de nascimento</strong>
<div>
{{ $paciente['data_nascimento'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>CNS</strong>
<div>
{{ $paciente['cns'] }}
</div>
</div>
<div class="col-5">
<strong>CPF</strong>
<div>
{{ $paciente['cpf'] }}
</div>
</div>
<div class="col-3">
<strong>RG</strong>
<div>
{{ $paciente['rg'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>Sexo</strong>
<div>
{{ $paciente['sexo'] }}
</div>
</div>
<div class="col-5">
<strong>Nome da mãe</strong>
<div>
{{ $paciente['nome_mae'] }}
</div>
</div>
<div class="col-3">
<strong>Telefones</strong>
<div>
@foreach ($paciente['telefones'] as $i => $telefone)
{{$telefone . ($i < count($paciente['telefones']) - 1 ? ' / ' : '')}}
@endforeach
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>CEP</strong>
<div>
{{ $paciente['cep'] }}
</div>
</div>
<div class="col-5">
<strong>Endereço</strong>
<div>
{{ $paciente['logradouro'] }}
@if ($paciente['sem_numero'] || $paciente['numero'])
,
@if ($paciente['sem_numero']) S/N @else {{ $paciente['numero'] }} @endif
@endif
@if ($paciente['complemento']) - {{ $paciente['complemento'] }} @endif
</div>
</div>
<div class="col-3">
<strong>Bairro</strong>
<div>
{{ $paciente['bairro'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>Município</strong>
<div>
{{ $paciente['municipio'] }}
</div>
</div>
<div class="col-5">
<strong>UF</strong>
<div>
{{ $paciente['uf'] }}
</div>
</div>
<div class="col-3">
<strong>Código IBGE</strong>
<div>
{{ $paciente['ibge'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Unidade de referência</strong>
<div>
{{ $paciente['unidade_referencia'] }}
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Requisitante</legend>
<div class="row">
<div class="col-10">
<strong>Unidade</strong>
<div>
{{ $requisitante['unidade'] }}
</div>
</div>
<div class="col-2">
<strong>CNES</strong>
<div>
{{ $requisitante['cnes'] }}
</div>
</div>
</div>
</fieldset>
</div>
</div>
<table class="table">
<thead>
<tr>
<th>Código</th>
<th>Nome</th>
</tr>
</thead>
<tbody>
@foreach ($solicitacao['itens'] as $item)
<tr>
<td>{{ $item['exame']['codigo'] }}</td>
<td>{{ $item['exame']['nome'] }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="row" style="margin-top: 15px;">
<div class="col-12">
<fieldset>
<legend>Justificativa da solicitação</legend>
<div class="row">
<div class="col-10">
<div><strong>CID</strong>: {{ $solicitacao['cid'] }}</div>
<div><strong>CIAP</strong>: {{ $solicitacao['ciap'] }}</div>
<div><strong>Classificacao de risco</strong>: {{ $solicitacao['classificacao_risco'] ?? '-' }}</div>
<div>
<div><strong>Justificativa</strong>: {{ $solicitacao['justificativa'][0] ?? ''}}</div>
@for ($i = 1; $i < $linhasJustificativa; $i++)
<div>
<span>{{ $solicitacao['justificativa'][$i] ?? '' }}</span>
</div>
@if ($i === 1)
<div class="assinatura">
<div class="assinatura-linha"></div>
<div>{{ $solicitacao['informacoes_administrativas']['usuario_nome'] }}</div>
<div>{{ $solicitacao['informacoes_administrativas']['ocupacao_descricao'] }}</div>
<div>{{ $solicitacao['informacoes_administrativas']['documento'] }}</div>
</div>
<div style="page-break-before: always;"></div>
@endif
@endfor
</div>
<div><strong>Observação</strong>: {{ $solicitacao['observacao'] }}</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row" style="margin-top: 20px;">
<div class="col-2" style="text-align: right;">
<strong>Data:</strong> {{ $solicitacao['data'] }}
</div>
</div>
<div class="assinatura">
@if(!$paraAssinar)
<div class="assinatura-linha"></div>
@endif
<div>{{ $solicitacao['informacoes_administrativas']['usuario_nome'] }}</div>
<div>{{ $solicitacao['informacoes_administrativas']['ocupacao_descricao'] }}</div>
<div>{{ $solicitacao['informacoes_administrativas']['documento'] }}</div>
</div>
<div class="row" style="margin-top: 30px;">
<div class="col-12">
<fieldset>
<div class="row">
<div class="col-4">
<strong>Prontuário</strong>
<div>
{{ $paciente['prontuario'] }}
</div>
</div>
<div class="col-8">
<strong>Nome</strong>
<div>
{{ $paciente['nome'] }}
</div>
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Data da coleta</strong>
<div class="blank-line blank-line-mr">
&nbsp;
</div>
</div>
<div class="col-4">
<strong>Número do exame</strong>
<div class="blank-line blank-line-mr">
&nbsp;
</div>
</div>
<div class="col-4">
<strong>Data da entrega</strong>
<div class="blank-line">
&nbsp;
</div>
</div>
</div>
</fieldset>
</div>
</div>
</div>
@endforeach
@endsection

View File

@@ -0,0 +1,122 @@
@extends('impressoes.layout1.content')
<style>
* {
font-size: 14px;
}
</style>
@section('conteudo')
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-2">
<strong>Competência</strong>
</div>
<div class="col-4">
<strong>Tipo de inconsistência</strong>
</div>
<div class="col-6">
<strong>Unidade executante</strong>
</div>
</div>
<div class="row">
<div class="col-2">
{{$competencia}}
</div>
<div class="col-4">
{{$tipo_inconsistencia}}
</div>
<div class="col-6">
{{$unidade_executante}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional executante</strong>
</div>
<div class="col-6">
<strong>CBO</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$usuario_executante}}
</div>
<div class="col-6">
{{$ocupacao}}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Procedimento</strong>
</div>
<div class="col-6">
<strong>CID(s)</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{$procedimento}}
</div>
<div class="col-6">
{{$cid}}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Data de processamento</th>
<th>Prontuário</th>
<th>Paciente</th>
<th>Unidade executante</th>
<th>Profissional executante</th>
<th>CBO</th>
<th>Procedimento</th>
<th>CID</th>
<th>Inconsistências</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{ \Carbon\Carbon::create($item['data_processamento'])->format('d/m/Y') }}</td>
<td>{{ $item['prontuario'] }}</td>
<td>{{ $item['paciente_nome'] }}</td>
<td>{{ $item['unidade_executante_nome_fantasia'] }}</td>
<td>{{ $item['usuario_executante_nome'] }}</td>
<td>{{ $item['ocupacao_codigo'] }}</td>
<td>{{ $item['procedimento_descricao'] }}</td>
<td>{{ $item['cid_descricao'] }}</td>
<td>
@foreach($item['inconsistencias'] as $inconsistencia)
<div>{{$inconsistencia->inconsistencia_descricao}}</div>
@endforeach
</td>
</tr>
@endforeach
<tr>
<th colspan="9" style="text-align: center;">Total: {{ count($data['itens']) }}</th>
</tr>
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,361 @@
@extends('impressoes.layout1.content')
<meta charset="UTF-8">
<table class="report-container">
<thead class="report-header">
<tr>
<th class="report-header-cell">
</th>
</tr>
</thead>
<tfoot class="report-footer">
<tr>
<td class="report-footer-cell">
</td>
</tr>
</tfoot>
<tbody class="report-content">
<table class="table-master">
<tr>
<td>
<fieldset>
<legend>IDENTIFICAÇÃO DO PROFISSIONAL</legend>
<table class="table">
<tr>
<td>
<strong>CNS DO PROFISSIONAL:</strong><br />
{{ $atividade['cadastro']['usuario']['cns'] }}
</td>
<td>
<strong>CBO:</strong><br />
{{ $atividade['cadastro']['usuario']['cbo'] }}
</td>
<td>
<strong>CNES:</strong><br />
{{ $atividade['cadastro']['usuario']['cnes'] }}
</td>
<td>
<strong>INE:</strong><br />
{{ $atividade['cadastro']['numero_ine'] }}
</td>
<td>
<strong>DATA:</strong><br />
{{ $atividade['cadastro']['data_usuario_responsavel'] }}
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<table class="table-master">
<tr>
<td>
<fieldset>
<table class="table col-6 fl">
<tr>
<td><strong>TURNO</strong></td>
<td><strong>PROGRAMA SAÚDE NA ESCOLA</strong></td>
</tr>
<tr>
<td>
@foreach($atividade['turnos'] as $i => $turno)
<label>
<input type="radio" name="turnos" value="" @if($atividade['cadastro']['turno_id'] == $turno['id']) checked @endif>
{{ ucfirst(mb_strtolower($turno['descricao'])) }}
</label>
@endforeach
</td>
<td>
@foreach($atividade['pse'] as $i => $pse)
<label>
<input type="radio" name="pse" value="" @if($atividade['pse_id'] == $pse['id']) checked @endif>
{{ ucfirst(mb_strtolower($pse['descricao'])) }}
</label>
@endforeach
</td>
</tr>
<tr>
<th colspan="3" style="text-align:center"><strong>LOCAL DE ATIVIDADE</strong></th>
</tr>
<tr>
<th><strong>Nº INEP (ESCOLA/CRECHE)</strong></th>
<th><strong>CNES</strong></th>
</tr>
<tr>
<td>{{ $atividade['cadastro']['inep'] }}</td>
<td>{{ $atividade['cadastro']['cnes'] }}</td>
</tr>
<tr>
<th colspan="2"><strong>OUTRA LOCALIDADE</strong></th>
</tr>
<tr>
<td colspan="2">{{ $atividade['cadastro']['local_atividade'] }}</td>
</tr>
<tr>
<td>Nº DE PARTICIPANTES</td>
<td>Nº DE AVALIAÇÕES ALTERADAS</td>
</tr>
<tr>
<td>{{ $atividade['cadastro']['total_participantes'] }}</td>
<td>{{ $atividade['cadastro']['avaliacoes_alteradas'] }}</td>
</tr>
</table>
<table class="table col-6">
<tr>
<td>CNS do Profissional</td>
<td>CBO</td>
</tr>
<tr>
<td>{{ $atividade['profissional']['cns'] }}</td>
<td>{{ $atividade['profissional']['cbo'] }}</td>
</tr>
@foreach($atividade['profissionais'] as $profissional)
<tr>
<td>{{ $profissional['cns'] }}</td>
<td>{{ $profissional['cbo'] }}</td>
</tr>
@endforeach
</table>
</fieldset>
</td>
</tr>
</table>
<table class="table-master">
<table class="table">
<tr class="col-6">
<td>
<strong>ATIVIDADE (opção única):</strong><br />
<ul>
@foreach($atividade['atividade_tipos'] as $i => $atividade_tipo)
<li>
<input type="radio" name="atividade_tipos" value="" @if($atividade['cadastro']['atividade_tipo_id'] == $atividade_tipo['id']) checked @endif>
{{ $atividade_tipo['id'] }} - {{ ucfirst(mb_strtolower($atividade_tipo['descricao'])) }}
</li>
@endforeach
</ul>
</td>
</tr>
<tr class="col-6">
<td>
<strong>TEMAS PARA REUNIÃO (opção múltipla)</strong><br />
<ul>
@foreach($atividade['reuniao_temas'] as $reuniao_tema)
<li>
<input type="checkbox" name="reuniao_tema" value=""
@if($atividade['cadastro']['reuniao_temas']->contains($reuniao_tema['id']))
checked
@endif
>
{{ $reuniao_tema['id'] }} - {{ ucfirst(mb_strtolower($reuniao_tema['descricao'])) }}
</li>
@endforeach
</ul>
</td>
</tr>
</table>
<table class="table">
<tr>
<td>
<strong>PÚBLICO-ALVO (opção múltipla, obrigatório para atividades 4, 5, 6 e 7)</strong><br />
<table>
@php $count = 0 @endphp
@foreach($atividade['publico_alvo'] as $i => $publico_alvo)
@if($count % 2 == 0)
<tr>
@endif
<td>
<input type="checkbox" name="publico_alvo" value=""
@if($atividade['cadastro']['publico_alvo']->contains($publico_alvo['id']))
checked
@endif
>
{{ ucfirst(mb_strtolower($publico_alvo['descricao'])) }}
</td>
@php $count++ @endphp
@if(($count % 2 == 0) || ($count == count($atividade['publico_alvo'])))
</tr>
@endif
@endforeach
</table>
</td>
</tr>
<tr>
<td>
<strong>TEMAS PARA SAÚDE (opção múltipla, obrigatório para atividades 4, 5 e 7)</strong><br />
<table>
@php $count = 0 @endphp
@foreach($atividade['saude_temas'] as $i => $saude_tema)
@if($count % 2 == 0)
<tr>
@endif
<td>
<input type="checkbox" name="saude_tema" value=""
@if($atividade['cadastro']['saude_temas']->contains($saude_tema['id']))
checked
@endif
>
{{ ucfirst(mb_strtolower($saude_tema['descricao'])) }}
</td>
@php $count++ @endphp
@if(($count % 2 == 0) || ($count == count($atividade['saude_temas'])))
</tr>
@endif
@endforeach
</table>
</td>
</tr>
<tr>
<td>
<strong>PRATICAS EM SAÚDE (opção única e obrigatório para atividade 6, e múltipla para 5)</strong><br />
<table>
@php $count = 0 @endphp
@foreach($atividade['saude_pratica'] as $i => $saude_pratica)
@if($count % 2 == 0)
<tr>
@endif
<td>
<input type="checkbox" name="saude_pratica" value=""
@if($atividade['cadastro']['saude_pratica']->contains($saude_pratica['id']))
checked
@endif
>
{{ ucfirst(mb_strtolower($saude_pratica['descricao'])) }}
@if($saude_pratica['id'] == 30)
<br />
Código do SIGTAP: {{ $atividade['cadastro']['codigo_sigtap'] }}
@endif
</td>
@php $count++ @endphp
@if(($count % 2 == 0) || ($count == count($atividade['saude_pratica'])))
</tr>
@endif
@endforeach
</table>
</td>
</tr>
</table>
</table>
<table class="table-master">
<tr>
<td>
<fieldset>
<table class="table participantes">
<tr>
<td colspan="6"></td>
<th colspan="2"><strong>Obrigatório somente para antropometria</strong></th>
<td colspan="2"></td>
</tr>
<tr>
<th rowspan="2"><strong>Nº</strong></th>
<th rowspan="2"><strong>Nome (Nome social)</strong></th>
<th rowspan="2"><strong>CNS</strong></th>
<th rowspan="2"><strong>Data de nascimento</strong></th>
<th rowspan="2"><strong>Sexo</strong></th>
<th rowspan="2"><strong>Avaliação alterada</strong></th>
<th rowspan="2"><strong>Peso (kg)</strong></th>
<th rowspan="2"><strong>Altura (cm)</strong></th>
<th colspan="2"><strong>PNCT</strong></th>
</tr>
<tr>
<th><strong>Parou de fumar</strong></th>
<th><strong>Abandonou o grupo</strong></th>
</tr>
@foreach($atividade['participantes'] as $i => $participante )
<tr>
<td>{{ $i + 1 }}</td>
<td>{{ $participante['nome'] }} @if($participante['nome_social']) ({{ $participante['nome_social'] }}) @endif</td>
<td>{{ $participante['cns'] }}</td>
<td>{{ $participante['data_nascimento'] }}</td>
<td>
<label>
<input type="radio" name="sexo" value="" @if($participante['sexo'] == 1) checked @endif>
M
</label>
<label>
<input type="radio" name="sexo" value="" @if($participante['sexo'] == 2) checked @endif>
F
</label>
</td>
<td>
<input type="checkbox" name="avaliacao_alterada" value=""
@if($participante['avaliacao_alterada'] == true)
checked
@endif
>
</td>
<td>{{ $participante['peso'] }}</td>
<td>{{ $participante['altura'] }}</td>
<td>
<input type="checkbox" name="parou_fumar" value=""
@if($participante['parou_fumar'] == true)
checked
@endif
>
</td>
<td>
<input type="checkbox" name="abandonou_grupo" value=""
@if($participante['abandonou_grupo'] == true)
checked
@endif
>
</td>
</tr>
@endforeach
</table>
</fieldset>
</td>
</tr>
</table>
</tbody>
</table>
<style>
body {font-family: Helvetica, arial, sans-serif;}
h2 {text-align: center}
p {margin:0; padding: 0;}
.table-master {border-collapse: collapse!important; display: inline-table;}
tr {border:0;}
td { background: #fff!important; white-space: nowrap; vertical-align: top!important;}
li {list-style-type: none!important;}
.fl {float: left!important;}
.brl-0 {border-right: 0px!important; border-left: 0px!important; vertical-align: center!important;}
.ws-normal {white-space: normal!important; width: 50%!important;}
.declaracao {white-space: normal!important; border: 0px!important}
.outrasCondicoes {white-space: normal!important; min-height: 60px;}
</style>

View File

@@ -0,0 +1,521 @@
@extends('impressoes.layout1.content')
<meta charset="UTF-8">
<table class="report-container">
<thead class="report-header">
<tr>
<th class="report-header-cell">
</th>
</tr>
</thead>
<tfoot class="report-footer">
<tr>
<td class="report-footer-cell">
</td>
</tr>
</tfoot>
<tbody class="report-content">
<table class="table-master">
<tr>
<td>
<fieldset>
<legend>IDENTIFICAÇÃO DO PROFISSIONAL</legend>
<table class="table">
<tr>
<td>
<strong>CNS DO PROFISSIONAL:</strong><br />
{{ $domicilio['cadastro']['usuario']['cns'] }}
</td>
<td>
<strong>CBO:</strong><br />
{{ $domicilio['cadastro']['usuario']['cbo'] }}
</td>
<td>
<strong>CNES:</strong><br />
{{ $domicilio['cadastro']['cnes'] }}
</td>
<td>
<strong>INE:</strong><br />
{{ $domicilio['cadastro']['numero_ine'] }}
</td>
<td>
<strong>DATA:</strong><br />
{{ $domicilio['cadastro']['data_usuario_responsavel'] }}
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<td>
<fieldset>
<legend>ENDEREÇO/LOCAL DE PERMANÊNCIA</legend>
<table class="table">
<tr>
<td>
<strong>CEP:</strong><br />
{{ $domicilio['endereco']['logradouro']['cep'] }}
</td>
<td colspan="2">
<strong>MUNICÍPIO:</strong><br />
{{ $domicilio['endereco']['logradouro']['municipio']['nome'] }}
</td>
<td>
<strong>UF:</strong><br />
{{ $domicilio['endereco']['logradouro']['municipio']['estado']['uf'] }}
</td>
</tr>
<tr>
<td>
<strong>BAIRRO:</strong><br />
{{ $domicilio['endereco']['logradouro']['bairro']['nome'] }}
</td>
<td>
<strong>TIPO DE LOGRADOURO:</strong><br />
{{ $domicilio['endereco']['logradouro_tipo'] }}
</td>
<td colspan="2">
<strong>NOME DO LOGRADOURO:</strong><br />
{{ $domicilio['endereco']['logradouro']['nome'] }}
</td>
</tr>
<tr>
<td>
<strong>NÚMERO:</strong><br />
{{ $domicilio['endereco']['sem_numero'] ? 'SEM NÚMERO' : $domicilio['endereco']['numero'] }}
</td>
<td>
<strong>COMPLEMENTO:</strong><br />
{{ $domicilio['endereco']['complemento'] }}
</td>
<td>
<strong>PTO. REFERÊNCIA:</strong><br />
{{ $domicilio['endereco']['referencia'] }}
</td>
<td>
<strong>MICROÁREA:</strong><br />
{{ $domicilio['endereco']['fora_area'] ? 'FORA DE ÁREA' : $domicilio['endereco']['microarea'] }}
</td>
</tr>
<tr>
<td>
<strong>TIPO DE IMÓVEL:</strong><br />
{{ $domicilio['residencia']['imovel_tipo'] }}
</td>
<td colspan="3">
<strong>TELEFONES PARA CONTATO:</strong><br />
-
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<td>
<fieldset>
<legend>CONDIÇÕES DE MORADIA</legend>
<table class="table" style="border:0!important">
<tr>
<td class="td">
<table>
<tr>
<td style="border-bottom: 0px;">
<strong>SITUAÇÃO DE MORADIA/POSSE DA TERRA:</strong><br />
@foreach($domicilio['form']['situacao_domicilio'] as $i => $situacao)
<label>
<input type="radio" name="situacao_domicilio" value="" @if($domicilio['residencia']['situacao_domicilio_id'] == $situacao['id']) checked @endif>
{{ ucfirst(mb_strtolower($situacao['descricao'])) }}
</label>
@endforeach
</td>
<td style="border-bottom: 0px;">
<strong>ZONA:</strong><br />
@foreach($domicilio['form']['zonas'] as $i => $zona)
<label>
<input type="radio" name="zonas" value="" @if($domicilio['residencia']['domicilio_zona_id'] == $zona['id']) checked @endif>
{{ ucfirst(mb_strtolower($zona['descricao'])) }}
</label>
@endforeach
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="td">
<table>
<tr>
<td style="border-bottom: 0px; width:50%; max-width:50%">
<strong>TIPO DE DOMICÍLIO:</strong><br />
@foreach($domicilio['form']['domicilio_tipo'] as $i => $tipo)
<label>
<input type="radio" name="domicilio_tipo" value="" @if($domicilio['residencia']['domicilio_tipo_id'] == $tipo['id']) checked @endif>
{{ ucfirst(mb_strtolower($tipo['descricao'])) }}
</label>
@endforeach
</td>
<td style="border-bottom: 0px;">
<strong>Nº DE MORADORES:</strong><br />
{{ count($domicilio['form']['residentes']) }}
</td>
<td style="border-bottom: 0px;">
<strong>Nº DE CÔMODOS</strong><br />
{{ $domicilio['residencia']['quantidade_comodos'] }}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="td">
<table>
<tr>
<td style="border-bottom: 0px;">
<strong>EM CASO DE ÁREA DE PRODUÇÃO RURAL: Condição de Posse e Uso da Terra:</strong><br />
@foreach($domicilio['form']['situacao_rural'] as $i => $situacao)
<label style="width: 32%; display: inline-block;">
<input type="radio" name="situacao_rural" value="" @if($domicilio['residencia']['situacao_rural_id'] == $situacao['id']) checked @endif>
{{ ucfirst(mb_strtolower($situacao['descricao'])) }}
</label>
@if(($i + 1) % 3 == 0)
<br />
@endif
@endforeach
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="td">
<table>
<tr>
<td style="border-bottom: 0px;">
<strong>TIPO DE ACESSO AO DOMICÍLIO:</strong><br />
@foreach($domicilio['form']['domicilio_tipo_acesso'] as $i => $tipo)
<label>
<input type="radio" name="domicilio_tipo_acesso" value="" @if($domicilio['residencia']['domicilio_tipo_acesso_id'] == $tipo['id']) checked @endif>
{{ ucfirst(mb_strtolower($tipo['descricao'])) }}
</label>
@endforeach
</td>
<td style="border-bottom: 0px;">
<strong>DISPONIBILIDADE DE ENERGIA ELÉTRICA?</strong><br />
{{ $domicilio['residencia']['energia_eletrica'] }}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="td">
<table>
<tr>
<td style="border-bottom: 0px;">
<strong>MATERIAL PREDOMINANTE NA CONSTRUÇÃO DAS PAREDES EXTERNAS DE SEU DOMICÍLIO</strong><br />
@foreach($domicilio['form']['material_predominante'] as $i => $material)
<label style="width: 32%; display: inline-block;">
<input type="radio" name="material_predominante" value="" @if($domicilio['residencia']['material_predominante_id'] == $material['id']) checked @endif>
{{ ucfirst(mb_strtolower($material['descricao'])) }}
</label>
@if(($i + 1) % 3 == 0)
<br />
@endif
@endforeach
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="td">
<table>
<tr>
<td style="border-bottom: 0px; width:50%; max-width:50%">
<strong>ABASTECIMENTO DE ÁGUA:</strong><br />
@foreach($domicilio['form']['abastecimento'] as $i => $abastecimento)
<label>
<input type="radio" name="abastecimento" value="" @if($domicilio['residencia']['abastecimento_id'] == $abastecimento['id']) checked @endif>
{{ ucfirst(mb_strtolower($abastecimento['descricao'])) }}
</label>
@if(($i + 1) % 4 == 0)
<br />
@endif
@endforeach
</td>
<td style="border-bottom: 0px; ">
<strong>ÁGUA PARA CONSUMO NO DOMICÍLIO:</strong><br />
@foreach($domicilio['form']['tratamento'] as $i => $tratamento)
<label>
<input type="radio" name="tratamento" value="" @if($domicilio['residencia']['tratamento_id'] == $tratamento['id']) checked @endif>
{{ ucfirst(mb_strtolower($tratamento['descricao'])) }}
</label>
@endforeach
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="td">
<table>
<tr>
<td style="width:50%; max-width:50%">
<strong>FORMA DE ESCOAMENTO DO BANHEIRO OU SANITÁRIO:</strong><br />
@foreach($domicilio['form']['forma_escoamento'] as $i => $escoamento)
<label>
<input type="radio" name="forma_escoamento" value="" @if($domicilio['residencia']['forma_escoamento_id'] == $escoamento['id']) checked @endif>
{{ ucfirst(mb_strtolower($escoamento['descricao'])) }}
</label>
@if(($i + 1) % 3 == 0)
<br />
@endif
@endforeach
</td>
<td>
<strong>DESTINO DO LIXO:</strong><br />
@foreach($domicilio['form']['destino_lixo'] as $i => $lixo)
<label>
<input type="radio" name="destino_lixo" value="" @if($domicilio['residencia']['destino_lixo_id'] == $lixo['id']) checked @endif>
{{ ucfirst(mb_strtolower($lixo['descricao'])) }}
</label>
@endforeach
</td>
</tr>
</table>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<td>
<fieldset>
<legend>ANIMAIS</legend>
<table class="table">
<tr>
<td>
<strong>ANIMAIS NO DOMICÍLIO?</strong><br />
{{ $domicilio['residencia']['possui_animais'] }}
</td>
<td colspan="2">
<strong>QUAL(IS)?</strong><br />
@foreach($domicilio['form']['animais'] as $i => $animais)
<input type="checkbox" name="animais" value="" @if($domicilio['residencia']['animal']->contains($animais['id'])) checked @endif>
{{ ucfirst(mb_strtolower($animais['descricao'])) }}
@endforeach
</td>
<td>
<strong>QUANTOS?</strong><br />
{{ $domicilio['residencia']['quantidade_animais'] }}
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<table class="table-master">
<tr>
<td>
<fieldset>
<legend>RESIDENTES</legend>
<table class="table">
<tr>
<td><strong>NOME</strong></td>
<td><strong>NOME SOCIAL</strong></td>
<td><strong>PRONTUÁRIO</strong></td>
<td><strong>DATA NASCIMENTO</strong></td>
<td><strong>PARENTESCO COM O RESPONSÁVEL FAMILIAR</strong></td>
</tr>
@foreach($domicilio['form']['residentes'] as $i => $residente)
<tr>
<td>{{ $residente->nome }}</td>
<td>{{ $residente->nome_social }}</td>
<td>{{ $residente->prontuario }}</td>
<td>{{ $residente->data_nascimento }}</td>
<td>{{ ucfirst(mb_strtolower($residente->parentesco)) }}</td>
</tr>
@endforeach
</table>
</fieldset>
</td>
</tr>
</table>
<table class="table-master">
<tr>
<td>
<fieldset>
<legend>TERMO DE RECUSA DO CADASTRO DOMICILIAR DA ATENÇÃO BÁSICA</legend>
<table class="table declaracao">
<tr>
<td class="declaracao">
Eu, __________________________________________________________________________,
portador(a) do RG nº _____________________________,
gozando de plena consciência dos meus atos, recuso este cadastro, mesmo que isso
facilite o acompanhamento a minha saúde e de meus familiares. Estou ciente de
que essa recusa não implicará o não atendimento na unidade de saúde.
</td>
</tr>
<tr>
<td class="declaracao">
<div style="margin: 0 auto; margin-top:50px">
<div style="margin: 0 auto; width:40%; border-top: 1px solid #000; text-align:center">
<strong>Assinatura</strong>
</div>
</div>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
@if($domicilio['instituicao']['nome_responsavel_tecnico'])
<table class="table-master">
<tr>
<td>
<fieldset>
<legend>INSTITUIÇÃO DE PERMANÊNCIA</legend>
<table class="table">
<tr>
<td>
<strong>NOME DA INSTITUIÇÃO DE PERMANÊNCIA:</strong><br />
{{ $domicilio['instituicao']['nome'] }}
</td>
</tr>
<tr>
<td>
<strong>Existem outros profissionais de saúde vinculados à instituição
(não inclui profissionais da rede pública de saúde)?</strong>
{{ $domicilio['instituicao']['outros_profissionais'] }}
</td>
</tr>
<tr>
<td>
<strong style="text-align: center">IDENTIFICAÇÃO DO RESPONSÁVEL TÉCNICO DA INSTITUIÇÃO DE PERMANÊNCIA</strong><br /><br />
<strong>NOME:</strong> {{ $domicilio['instituicao']['nome_responsavel_tecnico'] }}<br/>
<strong>CNS DO RESPONSÁVEL:</strong> {{ $domicilio['instituicao']['cns_responsavel_tecnico'] }}<br/>
<strong>CARGO NA INSTITUIÇÃO:</strong> {{ $domicilio['instituicao']['cargo_responsavel_tecnico'] }}<br/>
<strong>TEL. CONTATO:</strong> {{ $domicilio['instituicao']['telefone_responsavel_tecnico'] }}<br/>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<table class="table-master">
<tr>
<td>
<fieldset>
<legend>TERMO DE RECUSA DA INSTITUIÇÃO DE PERMANÊNCIA</legend>
<table class="table declaracao">
<tr>
<td class="declaracao">
Eu, __________________________________________________________________________,
portador(a) do RG nº _____________________________,
responsável técnico pela instituição, recuso este cadastro, mesmo que essa recusa
dificulte o acompanhamento da saúde das pessoas abrigadas/residentes nesta
instituição. Estou ciente de que esta recusa não implicará o não atendimento
pela equipe de saúde.
</td>
</tr>
<tr>
<td class="declaracao">
<div style="margin: 0 auto; margin-top:50px">
<div style="margin: 0 auto; width:40%; border-top: 1px solid #000; text-align:center">
<strong>Assinatura</strong>
</div>
</div>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
@endif
</tbody>
</table>
<style>
body {font-family: Helvetica, arial, sans-serif;}
h2 {text-align: center}
p {margin:0; padding: 0;}
.table-master {border-collapse: collapse!important; display: inline-table;}
tr {border:0;}
td { background: #fff!important; white-space: nowrap; vertical-align: top!important;}
.brl-0 {border-right: 0px!important; border-left: 0px!important; vertical-align: center!important;}
.ws-normal {white-space: normal!important; width: 50%!important;}
.declaracao {white-space: normal!important; border: 0px!important}
.outrasCondicoes {white-space: normal!important; min-height: 60px;}
.td { border: 0!important; padding: 0!important;}
</style>

View File

@@ -0,0 +1,131 @@
@extends('impressoes.layout1.content')
<meta charset="UTF-8">
<table class="report-container">
<thead class="report-header">
<tr>
<th class="report-header-cell">
</th>
</tr>
</thead>
<tfoot class="report-footer">
<tr>
<td class="report-footer-cell">
</td>
</tr>
</tfoot>
<tbody class="report-content">
<table class="table-master">
<tr>
<td>
<fieldset>
<legend>ENDEREÇO/LOCAL DE PERMANÊNCIA</legend>
<table class="table">
<tr>
<td>
<strong>CEP:</strong><br />
{{ $domicilio['endereco']['logradouro']['cep'] }}
</td>
<td colspan="2">
<strong>MUNICÍPIO:</strong><br />
{{ $domicilio['endereco']['logradouro']['municipio']['nome'] }}
</td>
<td>
<strong>UF:</strong><br />
{{ $domicilio['endereco']['logradouro']['municipio']['estado']['uf'] }}
</td>
</tr>
<tr>
<td>
<strong>BAIRRO:</strong><br />
{{ $domicilio['endereco']['logradouro']['bairro']['nome'] }}
</td>
<td>
<strong>TIPO DE LOGRADOURO:</strong><br />
{{ $domicilio['endereco']['logradouro_tipo'] }}
</td>
<td colspan="2">
<strong>NOME DO LOGRADOURO:</strong><br />
{{ $domicilio['endereco']['logradouro']['nome'] }}
</td>
</tr>
<tr>
<td>
<strong>NÚMERO:</strong><br />
{{ $domicilio['endereco']['sem_numero'] ? 'SEM NÚMERO' : $domicilio['endereco']['numero'] }}
</td>
<td>
<strong>COMPLEMENTO:</strong><br />
{{ $domicilio['endereco']['complemento'] }}
</td>
<td colspan="2">
<strong>PTO. REFERÊNCIA:</strong><br />
{{ $domicilio['endereco']['referencia'] }}
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<table class="table-master">
<tr>
<td>
<fieldset>
<legend>RESIDENTES</legend>
<table class="table">
<tr>
<td><strong>NOME</strong></td>
<td><strong>NOME SOCIAL</strong></td>
<td><strong>PRONTUÁRIO</strong></td>
<td><strong>DATA NASCIMENTO</strong></td>
<td><strong>PARENTESCO COM O RESPONSÁVEL FAMILIAR</strong></td>
</tr>
@foreach($domicilio['residentes'] as $i => $residente)
<tr>
<td>{{ $residente->nome }}</td>
<td>{{ $residente->nome_social }}</td>
<td>{{ $residente->prontuario }}</td>
<td>{{ $residente->data_nascimento }}</td>
<td>{{ ucfirst(mb_strtolower($residente->parentesco)) }}</td>
</tr>
@endforeach
</table>
</fieldset>
</td>
</tr>
</table>
</tbody>
</table>
<style>
body {font-family: Helvetica, arial, sans-serif;}
h2 {text-align: center}
p {margin:0; padding: 0;}
.table-master {border-collapse: collapse!important; display: inline-table;}
tr {border:0;}
td { background: #fff!important; white-space: nowrap; vertical-align: top!important;}
.brl-0 {border-right: 0px!important; border-left: 0px!important; vertical-align: center!important;}
.ws-normal {white-space: normal!important; width: 50%!important;}
.declaracao {white-space: normal!important; border: 0px!important}
.outrasCondicoes {white-space: normal!important; min-height: 60px;}
.td { border: 0!important; padding: 0!important;}
</style>

View File

@@ -0,0 +1,343 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<div class="row">
<div class="col-12">
<fieldset>
<legend>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-3">
<strong>CNS</strong>
<div>
{{ $paciente['cns'] }}
</div>
</div>
<div class="col-3">
<strong>CPF</strong>
<div>
{{ $paciente['cpf'] }}
</div>
</div>
<div class="col-3">
<strong>Sexo</strong>
<div>
{{ $paciente['sexo'] }}
</div>
</div>
<div class="col-3">
<strong>Data de nascimento</strong>
<div>
{{ $paciente['data_nascimento'] }}
</div>
</div>
</div>
<div>
<div class="col-4">
<strong>Idade</strong>
<div>
{{ $paciente['idade'] }}
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Profissional responsável</legend>
<div class="row">
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario_nome }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade_nome_fantasia }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura_nome }}
</div>
</div>
<div class="col-6">
<strong>Código da equipe</strong>
<div>
{{ $codigo_equipe }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Ocupação</strong>
<div>
{{ $ocupacao_descricao }}
</div>
</div>
<div class="col-6">
<strong>Data</strong>
<div>
{{ $data }}
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Atendimento</legend>
<div class="row">
<div class="col-3">
<strong>Turno</strong>
<div>
{{ $turno_nome }}
</div>
</div>
<div class="col-3">
<strong>Tipo de imóvel</strong>
<div>
{{ $imovel_tipo_descricao }}
</div>
</div>
<div class="col-3">
<strong>Latitude</strong>
<div>
{{ $latitude ?? '-' }}
</div>
</div>
<div class="col-3">
<strong>Longitude</strong>
<div>
{{ $longitude ?? '-' }}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Visita compartilhada com outro profissional</strong>
<div>
{{ $visita_compartilhada }}
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Motivo da visita</legend>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Tipo de visita</legend>
<div class="row">
<div class="col-12">
{{ $motivos_visita['tipo_visita']->isNotEmpty() ? $motivos_visita['tipo_visita']->join(', ') : '-' }}
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Busca ativa</legend>
<div class="row">
<div class="col-12">
{{ $motivos_visita['busca_ativa']->isNotEmpty() ? $motivos_visita['busca_ativa']->join(', ') : '-' }}
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Controle ambiental/vetorial</legend>
<div class="row">
<div class="col-12">
{{ $motivos_visita['controle_ambiental_vetorial']->isNotEmpty() ? $motivos_visita['controle_ambiental_vetorial']->join(', ') : '-' }}
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Acompanhamento</legend>
<div class="row">
<div class="col-12">
{{ $motivos_visita['acompanhamento']->isNotEmpty() ? $motivos_visita['acompanhamento']->join(', ') : '-' }}
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Outros</legend>
<div class="row">
<div class="col-12">
{{ $motivos_visita['outros_motivos']->isNotEmpty() ? $motivos_visita['outros_motivos']->join(', ') : '-' }}
</div>
</div>
</fieldset>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-4" style="padding-right: 5px">
<fieldset>
<legend>Avaliação antropométrica</legend>
<div class="row">
<div class="col-6">
<strong>Peso (kg)</strong>
<div>
{{ $peso ?? '-' }}
</div>
</div>
<div class="col-6">
<strong>Altura (cm)</strong>
<div>
{{ $altura ?? '-' }}
</div>
</div>
</div>
</fieldset>
</div>
<div class="col-4" style="padding-right: 5px">
<fieldset>
<legend>Sinais vitais</legend>
<div class="row">
<div class="col-6">
<strong>Aferição de PA</strong>
<div>
{{ $afericao_pa ?? '-' }}
</div>
</div>
<div class="col-6">
<strong>Temperatura ºC</strong>
<div>
{{ $temperatura ?? '-' }}
</div>
</div>
</div>
</fieldset>
</div>
<div class="col-4">
<fieldset>
<legend>Glicemia</legend>
<div class="row">
<div class="col-5">
<strong>Glicemia</strong>
<div>
{{ $glicemia ?? '-' }}
</div>
</div>
<div class="col-7">
<strong>Momento da coleta</strong>
<div>
{{ $glicemia_momento_coleta ?? '-' }}
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Desfecho</legend>
<div class="row">
<div class="col-12">
{{ $desfecho_descricao }}
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-12">
<fieldset>
<legend>Complemento</legend>
<div class="row">
<div class="col-12">
{{ $complemento ?? '-' }}
</div>
</div>
</fieldset>
</div>
</div>
@endsection

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,152 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table 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>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>Equipe</strong>
<div>
{{ $equipe }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
<div class="col-6">
<strong>Visualizar por</strong>
<div>
{{ $tipo_visualizacao === 'equipe' ? 'Equipe' : 'Profissional' }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@php
$totalColunas = 5;
if (is_null($unidade_id)) $totalColunas++;
if (is_null($equipe_id)) $totalColunas++;
if (is_null($usuario_id) && $tipo_visualizacao === 'usuario') $totalColunas++;
@endphp
<th colspan="{{ $totalColunas }}">Totalizadores</th>
</tr>
<tr>
<th>Programados</th>
<th>Espontâneos</th>
<th>Total</th>
<th>% Programados</th>
<th>% Espontâneos</th>
@if(is_null($unidade_id))
<th>Total de unidades</th>
@endif
@if(is_null($equipe_id))
<th>Total de equipes</th>
@endif
@if(is_null($usuario_id) && $tipo_visualizacao === 'usuario')
<th>Total de profissionais</th>
@endif
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">{{ $totalizadores['total_programados'] }}</td>
<td class="text-center">{{ $totalizadores['total_espontaneos'] }}</td>
<td class="text-center">{{ $totalizadores['total'] }}</td>
<td class="text-center">{{ $totalizadores['percentual_programados'] }}</td>
<td class="text-center">{{ $totalizadores['percentual_espontaneos'] }}</td>
@if(is_null($unidade_id))
<td class="text-center">{{ $totalizadores['total_unidades'] }}</td>
@endif
@if(is_null($equipe_id))
<td class="text-center">{{ $totalizadores['total_equipes'] }}</td>
@endif
@if(is_null($usuario_id) && $tipo_visualizacao === 'usuario')
<td class="text-center">{{ $totalizadores['total_profissionais'] }}</td>
@endif
</tr>
</tbody>
</table>
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
<th>Unidade</th>
<th>Local de atendimento</th>
<th>Equipe</th>
@if ($tipo_visualizacao === 'usuario')
<th>Profissional</th>
@endif
<th>Programados</th>
<th style="white-space: nowrap;">% Programados</th>
<th>Espontâneos</th>
<th style="white-space: nowrap;">% Espontâneos</th>
<th>Total</th>
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->infraestrutura_nome }}</td>
<td>{{ $item->equipe_descricao }}</td>
@if ($tipo_visualizacao === 'usuario')
<td>{{ $item->usuario_nome }}</td>
@endif
<td class="text-center">{{ $item->total_atendimento_demanda_programada }}</td>
<td class="text-center">{{ $item->porcentagem_atendimento_demanda_programada }}%</td>
<td class="text-center">{{ $item->total_atendimento_demanda_espontanea }}</td>
<td class="text-center">{{ $item->porcentagem_atendimento_demanda_espontanea }}%</td>
<td class="text-center">{{ $item->total_atendimento }}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,148 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.col-min { width: 1%; }
.table th { text-align: center; }
.table-danger { background-color: #f8d7da; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-6">
<strong>Período</strong>
<div>
De {{ $inicio }} até {{ $fim }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Turno</strong>
<div>
{{ $turno }}
</div>
</div>
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Equipe</strong>
<div>
{{ $equipe }}
</div>
</div>
<div class="col-6">
<strong>Modalidade</strong>
<div>
{{ $modalidade }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($itens['itens'] as $item)
<tr class="{{($item->quantidade_dias_cadastro_paciente_desatualizado > 0 || $item->avaliacao_elegibilidade === 'Não') ? 'table-danger' : '' }}">
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }}">{{ $item->{$coluna['key']} ?? '-' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
<br />
<fieldset>
<legend>Totais</legend>
<div class="row">
<div class="col-3">
<strong>Total de atendimentos:</strong>
</div>
<div class="col-3">
<strong>Total de pacientes atendidos:</strong>
</div>
<div class="col-2">
<strong>Total de atendimentos AD 1:</strong>
</div>
<div class="col-2">
<strong>Total de atendimentos AD 2:</strong>
</div>
<div class="col-2">
<strong>Total de atendimentos AD 3:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{$itens['totalizadores']['total_atendimentos']}}
</div>
<div class="col-3">
{{$itens['totalizadores']['total_pacientes_atendidos']}}
</div>
<div class="col-2">
{{$itens['totalizadores']['total_modalidades']['AD_1']}}
</div>
<div class="col-2">
{{$itens['totalizadores']['total_modalidades']['AD_2']}}
</div>
<div class="col-2">
{{$itens['totalizadores']['total_modalidades']['AD_3']}}
</div>
</div>
</fieldset>
@endsection

View File

@@ -0,0 +1,89 @@
@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>Data inicial:</strong>
</div>
<div class="col-6">
<strong>Data final:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $atendimentos['data_inicial'] }}
</div>
<div class="col-6">
{{ $atendimentos['data_final'] }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Unidade:</strong>
</div>
<div class="col-6">
<strong>Equipe:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $atendimentos['unidade'] }}
</div>
<div class="col-6">
{{ $atendimentos['equipe'] }}
</div>
</div>
</fieldset>
<table class="table table-relatorio">
<thead>
<tr>
<th>1ª Consulta Odontológica Programática</th>
<th>Escovação Dental Supervisionada</th>
<th>Tratamento Concluído</th>
<th>Urgência</th>
<th>Gestante</th>
<th>Instalação de Próteses Dentárias</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ $atendimentos['primeira_consulta_odontologica'] }}</td>
<td>{{ $atendimentos['escovacao_dental_supervisionada'] }}</td>
<td>{{ $atendimentos['tratamento_concluido'] }}</td>
<td>{{ $atendimentos['urgencia'] }}</td>
<td>{{ $atendimentos['gestante'] }}</td>
<td>{{ $atendimentos['instalacao_proteses_dentarias'] }}</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="5">
<b>Total</b>
</th>
<th>
<strong>{{ $atendimentos['total_atendimentos_odontologicos'] }}</strong>
</th>
</tr>
</tfoot>
</table>
@endsection

View File

@@ -0,0 +1,139 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-relatorio > thead > tr > th,
.table-relatorio > tfoot > tr > th { text-align: center; font-size: 11px; }
.table-relatorio > tbody > tr > td { font-size: 11px; }
.col-min { width: 1%; white-space: nowrap; }
.totalizadores { margin-top: 16px; }
.totalizadores td, .totalizadores th { padding: 4px 12px; font-size: 12px; }
</style>
@php
$cols = $colunas ?? [];
$show = fn($key) => in_array($key, $cols);
@endphp
@php $f = $filtros ?? []; @endphp
<fieldset style="font-size: 11px;">
<legend style="font-size: 12px;">Filtros</legend>
<div class="row">
<div class="col-4"><strong>Período:</strong></div>
<div class="col-4"><strong>PSE:</strong></div>
<div class="col-4"><strong>Turno:</strong></div>
</div>
<div class="row" style="margin-bottom:6px">
<div class="col-4">{{ $f['periodo'] ?? '' }}</div>
<div class="col-4">{{ $f['pse'] ?? 'Todos' }}</div>
<div class="col-4">{{ $f['turno'] ?? 'Todos' }}</div>
</div>
<div class="row">
<div class="col-4"><strong>Unidade:</strong></div>
<div class="col-4"><strong>Local de Atendimento:</strong></div>
<div class="col-4"><strong>Profissional:</strong></div>
</div>
<div class="row" style="margin-bottom:6px">
<div class="col-4">{{ $f['unidade'] ?? 'Todos' }}</div>
<div class="col-4">{{ $f['localAtendimento'] ?? 'Todos' }}</div>
<div class="col-4">{{ $f['profissional'] ?? 'Todos' }}</div>
</div>
<div class="row">
<div class="col-4"><strong>CBO:</strong></div>
<div class="col-4"><strong>Equipe:</strong></div>
<div class="col-4"><strong>Atividade:</strong></div>
</div>
<div class="row" style="margin-bottom:6px">
<div class="col-4">{{ $f['cbo'] ?? 'Todos' }}</div>
<div class="col-4">{{ $f['equipe'] ?? 'Todos' }}</div>
<div class="col-4">{{ $f['atividade'] ?? 'Todos' }}</div>
</div>
<div class="row">
<div class="col-4"><strong>Público Alvo:</strong></div>
<div class="col-4"><strong>Temas para Saúde:</strong></div>
<div class="col-4"><strong>Práticas em Saúde:</strong></div>
</div>
<div class="row" style="margin-bottom:6px">
<div class="col-4">{{ $f['publicoAlvo'] ?? 'Todos' }}</div>
<div class="col-4">{{ $f['temaSaude'] ?? 'Todos' }}</div>
<div class="col-4">{{ $f['praticaSaude'] ?? 'Todos' }}</div>
</div>
<div class="row">
<div class="col-4"><strong>Procedimentos:</strong></div>
<div class="col-4"><strong>Paciente:</strong></div>
<div class="col-4"><strong>INEP:</strong></div>
</div>
<div class="row" style="margin-bottom:6px">
<div class="col-4">{{ $f['procedimentos'] ?? 'Todos' }}</div>
<div class="col-4">{{ $f['paciente'] ?? 'Todos' }}</div>
<div class="col-4">{{ $f['inep'] ?? 'Todos' }}</div>
</div>
</fieldset>
<table class="table table-bordered table-relatorio">
<thead>
<tr>
<th class="col-min">Data</th>
@if($show('unidade')) <th>Unidade</th> @endif
@if($show('profissional')) <th>Profissional</th> @endif
@if($show('cbo')) <th class="col-min">CBO</th> @endif
@if($show('equipe')) <th>Equipe</th> @endif
@if($show('atividade')) <th>Atividade</th> @endif
@if($show('totalParticipantes')) <th class="col-min">Participantes</th> @endif
@if($show('totalPessoasAvaliadas')) <th class="col-min">Pessoas Avaliadas</th> @endif
@if($show('localAtendimento')) <th>Local de Atendimento</th> @endif
@if($show('cnes')) <th class="col-min">CNES</th> @endif
@if($show('turno')) <th class="col-min">Turno</th> @endif
@if($show('publicoAlvo')) <th>Público Alvo</th> @endif
@if($show('temaSaude')) <th>Temas para Saúde</th> @endif
@if($show('praticaSaude')) <th>Práticas em Saúde</th> @endif
@if($show('procedimentosVinculados')) <th>Procedimentos</th> @endif
</tr>
</thead>
<tbody>
@foreach ($itens as $item)
<tr>
<td>{{ \Carbon\Carbon::parse($item->data)->format('d/m/Y') }}</td>
@if($show('unidade')) <td>{{ $item->unidade }}</td> @endif
@if($show('profissional')) <td>{{ $item->profissional }}</td> @endif
@if($show('cbo')) <td>{{ $item->cbo }}</td> @endif
@if($show('equipe')) <td>{{ $item->equipe }}</td> @endif
@if($show('atividade')) <td>{{ $item->atividade }}</td> @endif
@if($show('totalParticipantes')) <td style="text-align:center">{{ $item->totalParticipantes }}</td> @endif
@if($show('totalPessoasAvaliadas')) <td style="text-align:center">{{ $item->totalPessoasAvaliadas }}</td> @endif
@if($show('localAtendimento')) <td>{{ $item->localAtendimento }}</td> @endif
@if($show('cnes')) <td>{{ $item->cnes }}</td> @endif
@if($show('turno')) <td>{{ $item->turno }}</td> @endif
@if($show('publicoAlvo')) <td>{{ $item->publicoAlvo }}</td> @endif
@if($show('temaSaude')) <td>{{ $item->temaSaude }}</td> @endif
@if($show('praticaSaude')) <td>{{ $item->praticaSaude }}</td> @endif
@if($show('procedimentosVinculados')) <td>{{ $item->procedimentosVinculados }}</td> @endif
</tr>
@endforeach
</tbody>
</table>
<div class="totalizadores">
<table class="table table-bordered">
<thead>
<tr>
<th>Total de Atividades</th>
<th>Total de Procedimentos</th>
<th>Total de Pessoas Avaliadas</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">{{ $totalizadores['totalAtividades'] }}</td>
<td style="text-align:center">{{ $totalizadores['totalProcedimentos'] }}</td>
<td style="text-align:center">{{ $totalizadores['totalPessoasAvaliadas'] }}</td>
</tr>
</tbody>
</table>
</div>
@endsection

View File

@@ -0,0 +1,227 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table th, .table td { font-size: 10px; vertical-align: middle; }
.table th { text-align: center; background-color: #f0f0f0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.badge-success { background-color: #28a745; color: #fff; padding: 1px 5px; border-radius: 3px; }
.badge-danger { background-color: #dc3545; color: #fff; padding: 1px 5px; border-radius: 3px; }
.totais-box { display: inline-block; border: 1px solid #ccc; border-radius: 4px; padding: 4px 10px; margin: 4px; text-align: center; min-width: 80px; }
.totais-box .valor { font-size: 16px; font-weight: bold; }
.totais-box .label { font-size: 9px; color: #555; }
fieldset { border: 1px solid #ccc; border-radius: 4px; padding: 8px 12px; margin-bottom: 10px; }
legend { font-weight: bold; font-size: 11px; padding: 0 4px; width: auto; }
.section-title { font-size: 12px; font-weight: bold; margin: 10px 0 4px; border-bottom: 1px solid #ccc; padding-bottom: 2px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.col-3 { width: 25%; padding: 0 6px; box-sizing: border-box; }
.col-4 { width: 33.33%; padding: 0 6px; box-sizing: border-box; }
.col-6 { width: 50%; padding: 0 6px; box-sizing: border-box; }
strong { font-size: 10px; }
p { font-size: 10px; margin: 2px 0; }
</style>
{{-- Filtros --}}
@php
$feiInicial = collect([($faixaEtariaInicial['anos'] ?? null) ? ($faixaEtariaInicial['anos'].'a') : null, ($faixaEtariaInicial['meses'] ?? null) ? ($faixaEtariaInicial['meses'].'m') : null, ($faixaEtariaInicial['dias'] ?? null) ? ($faixaEtariaInicial['dias'].'d') : null])->filter()->implode(' ');
$feiFinal = collect([($faixaEtariaFinal['anos'] ?? null) ? ($faixaEtariaFinal['anos'].'a') : null, ($faixaEtariaFinal['meses'] ?? null) ? ($faixaEtariaFinal['meses'].'m') : null, ($faixaEtariaFinal['dias'] ?? null) ? ($faixaEtariaFinal['dias'].'d') : null])->filter()->implode(' ');
@endphp
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-4">
<strong>Período</strong>
<p>
@if($quadrimestre)
Quadrimestre {{ $quadrimestre }}
@else
De {{ $inicio }} até {{ $fim }}
@endif
</p>
</div>
<div class="col-4">
<strong>Unidade</strong>
<p>{{ $unidade }}</p>
</div>
<div class="col-4">
<strong>Local de atendimento</strong>
<p>{{ $infraestrutura }}</p>
</div>
</div>
<div class="row" style="margin-top:4px">
<div class="col-4">
<strong>Equipe</strong>
<p>{{ $equipe }}</p>
</div>
<div class="col-4">
<strong>Sexo</strong>
<p>{{ $sexo }}</p>
</div>
<div class="col-4">
<strong>Boas Práticas</strong>
<p>{{ implode(', ', $boasPraticasSelecionadas) }}</p>
</div>
</div>
<div class="row" style="margin-top:4px">
<div class="col-3">
<strong>Faixa Etária Inicial</strong>
<p>{{ $feiInicial ?: '-' }}</p>
</div>
<div class="col-3">
<strong>Faixa Etária Final</strong>
<p>{{ $feiFinal ?: '-' }}</p>
</div>
<div class="col-3">
<strong>Paciente</strong>
<p>{{ $paciente }}</p>
</div>
<div class="col-3">
<strong>Busca Ativa</strong>
<p>{{ $buscaAtiva ? 'Sim' : 'Não' }}</p>
</div>
</div>
</fieldset>
{{-- Totalizadores --}}
<div class="section-title">Totais</div>
<div style="margin-bottom:8px;">
<div class="totais-box">
<div class="label">Pacientes</div>
<div class="valor">{{ $totalizadores['totalPacientes'] }}</div>
</div>
<div class="totais-box">
<div class="label">Equipes</div>
<div class="valor">{{ $totalizadores['totalEquipes'] }}</div>
</div>
<div class="totais-box">
<div class="label">Microáreas</div>
<div class="valor">{{ $totalizadores['totalMicroareas'] }}</div>
</div>
<div class="totais-box">
<div class="label">Denominador (D)</div>
<div class="valor">{{ $totalizadores['denominador'] }}</div>
</div>
<div class="totais-box">
<div class="label">Numerador (N)</div>
<div class="valor">{{ $totalizadores['numerador'] }}</div>
</div>
<div class="totais-box">
<div class="label">Resultado (%)</div>
<div class="valor">{{ $totalizadores['resultado'] }}%</div>
</div>
@foreach($boasPraticasSelecionadas as $pratica)
@if(isset($totalizadores['boasPraticas'][$pratica]))
<div class="totais-box">
<div class="label">% Boa Prática {{ $pratica }}</div>
<div class="valor">{{ $totalizadores['boasPraticas'][$pratica]['percentual'] }}%</div>
</div>
@endif
@endforeach
</div>
{{-- Resultado por Equipe --}}
@if(!empty($resultadoPorEquipe))
<div class="section-title">Resultado por Equipe</div>
<table class="table">
<thead>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Denominador (D)</th>
<th>Numerador (N)</th>
<th>Resultado (%)</th>
<th>Classificação</th>
@foreach($boasPraticasSelecionadas as $pratica)
<th>% Prática {{ $pratica }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach($resultadoPorEquipe as $equipeItem)
<tr>
<td>{{ $equipeItem['unidadeNomeFantasia'] }}</td>
<td>{{ $equipeItem['equipeDescricao'] }}</td>
<td class="text-center">{{ $equipeItem['denominador'] }}</td>
<td class="text-center">{{ $equipeItem['numerador'] }}</td>
<td class="text-center">{{ $equipeItem['resultado'] }}%</td>
<td class="text-center">{{ $equipeItem['classificacao'] }}</td>
@foreach($boasPraticasSelecionadas as $pratica)
<td class="text-center">{{ $equipeItem['percentual' . $pratica] ?? '-' }}%</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endif
{{-- Busca Ativa --}}
@if(!empty($buscaAtivaDados))
<div class="section-title">Busca Ativa - Pacientes com Pendências</div>
<table class="table">
<thead>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Paciente</th>
<th>Sexo</th>
<th>Idade</th>
<th>Usuário Responsável</th>
@if(in_array('pacienteDataNascimento', $selectedColsBuscaAtiva))
<th>Data de Nascimento</th>
@endif
@if(in_array('pacienteTelefone', $selectedColsBuscaAtiva))
<th>Telefone</th>
@endif
@if(in_array('pacienteEndereco', $selectedColsBuscaAtiva))
<th>Endereço</th>
@endif
@if(in_array('areaMicroareaDomicilio', $selectedColsBuscaAtiva))
<th>Area/Microarea do Domicilio</th>
@endif
@foreach($boasPraticasSelecionadas as $pratica)
<th>{{ $pratica }}</th>
@endforeach
<th>Pontuação Total</th>
</tr>
</thead>
<tbody>
@foreach($buscaAtivaDados as $paciente)
<tr>
<td>{{ $paciente['unidadeNomeFantasia'] }}</td>
<td>{{ $paciente['equipeDescricao'] }}</td>
<td>{{ $paciente['pacienteNome'] }}</td>
<td class="text-center">{{ $paciente['pacienteSexo'] }}</td>
<td class="text-center">{{ $paciente['idadeCompleta'] }}</td>
<td class="text-center">{{ $paciente['usuarioResponsavelNome'] }}</td>
@if(in_array('pacienteDataNascimento', $selectedColsBuscaAtiva))
<td class="text-center">{{ $paciente['pacienteDataNascimento'] }}</td>
@endif
@if(in_array('pacienteTelefone', $selectedColsBuscaAtiva))
<td class="text-center">{{ $paciente['pacienteTelefone'] }}</td>
@endif
@if(in_array('pacienteEndereco', $selectedColsBuscaAtiva))
<td>{{ $paciente['pacienteEndereco'] }}</td>
@endif
@if(in_array('areaMicroareaDomicilio', $selectedColsBuscaAtiva))
<td>{{ $paciente['areaMicroareaDomicilio'] }}</td>
@endif
@foreach($boasPraticasSelecionadas as $pratica)
@php $campo = 'indicador' . $pratica; @endphp
<td class="text-center">
@if($paciente[$campo] ?? false)
<span class="badge-success">&#10003;</span>
@elseif($pratica === 'D' && ($paciente['areaTipoId'] ?? null) == 5)
N/C
@else
<span class="badge-danger">X</span>
@endif
</td>
@endforeach
<td class="text-center">{{ $paciente['pontuacaoTotal'] }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
@endsection

View File

@@ -0,0 +1,290 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-4">
<strong>Período</strong>
<div>
@if($periodoDe)
De {{ $periodoDe }} até {{ $periodoAte }}
@endif
</div>
</div>
<div class="col-1">
<strong>Ano</strong>
<div>
{{ $quadrimestreAno }}
</div>
</div>
<div class="col-3">
<strong>Quadrimestre</strong>
<div>
{{ $quadrimestre }}
</div>
</div>
<div class="col-4">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Equipe</strong>
<div>
{{ $equipe }}
</div>
</div>
<div class="col-4">
<strong>Boas práticas</strong>
<div>
{{ $boasPraticas }}
</div>
</div>
<div class="col-2">
<strong>Busca ativa</strong>
<div>
{{ $buscaAtiva }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>Sexo</strong>
<div>
{{ $sexo }}
</div>
</div>
<div class="col-2">
<strong>Idade mínima</strong>
<div>
{{ $idadeMinima }}
</div>
</div>
<div class="col-2">
<strong>Idade máxima</strong>
<div>
{{ $idadeMaxima }}
</div>
</div>
<div class="col-6">
<strong>Paciente</strong>
<div>
{{ $paciente }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th colspan="6">Totalizadores</th>
</tr>
<tr>
<th>Total de pacientes</th>
<th>Total de equipes</th>
<th>Total de microáreas</th>
<th>Denominador</th>
<th>Numerador</th>
<th>Resultado</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">{{ $totalizadores->total_pacientes }}</td>
<td class="text-center">{{ $totalizadores->total_equipes }}</td>
<td class="text-center">{{ $totalizadores->total_microareas }}</td>
<td class="text-center">{{ $totalizadores->denominador }}</td>
<td class="text-center">{{ $totalizadores->numerador }}</td>
<td class="text-center">{{ $totalizadores->resultado }}%</td>
</tr>
</tbody>
</table>
<table class="table" style="border-top: none !important;">
<thead>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<th style="border-top: none !important;">Boa prática A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th style="border-top: none !important;">Boa prática B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th style="border-top: none !important;">Boa prática C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th style="border-top: none !important;">Boa prática D</th>@endif
@if($boasPraticasSelecionadas->contains('E'))<th style="border-top: none !important;">Boa prática E</th>@endif
@if($boasPraticasSelecionadas->contains('F'))<th style="border-top: none !important;">Boa prática F</th>@endif
@if($boasPraticasSelecionadas->contains('G'))<th style="border-top: none !important;">Boa prática G</th>@endif
@if($boasPraticasSelecionadas->contains('H'))<th style="border-top: none !important;">Boa prática H</th>@endif
@if($boasPraticasSelecionadas->contains('I'))<th style="border-top: none !important;">Boa prática I</th>@endif
@if($boasPraticasSelecionadas->contains('J'))<th style="border-top: none !important;">Boa prática J</th>@endif
@if($boasPraticasSelecionadas->contains('K'))<th style="border-top: none !important;">Boa prática K</th>@endif
</tr>
</thead>
<tbody>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $totalizadores->boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $totalizadores->boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td class="text-center">{{ $totalizadores->boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td class="text-center">{{ $totalizadores->boa_pratica_d }}%</td>@endif
@if($boasPraticasSelecionadas->contains('E'))<td class="text-center">{{ $totalizadores->boa_pratica_e }}%</td>@endif
@if($boasPraticasSelecionadas->contains('F'))<td class="text-center">{{ $totalizadores->boa_pratica_f }}%</td>@endif
@if($boasPraticasSelecionadas->contains('G'))<td class="text-center">{{ $totalizadores->boa_pratica_g }}%</td>@endif
@if($boasPraticasSelecionadas->contains('H'))<td class="text-center">{{ $totalizadores->boa_pratica_h }}%</td>@endif
@if($boasPraticasSelecionadas->contains('I'))<td class="text-center">{{ $totalizadores->boa_pratica_i }}%</td>@endif
@if($boasPraticasSelecionadas->contains('J'))<td class="text-center">{{ $totalizadores->boa_pratica_j }}%</td>@endif
@if($boasPraticasSelecionadas->contains('K'))<td class="text-center">{{ $totalizadores->boa_pratica_k }}%</td>@endif
</tr>
</tbody>
</table>
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Denominador</th>
<th>Numerador</th>
<th>Resultado</th>
<th>Classificação</th>
@if($boasPraticasSelecionadas->contains('A'))<th>A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th>B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th>C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th>D</th>@endif
@if($boasPraticasSelecionadas->contains('E'))<th>E</th>@endif
@if($boasPraticasSelecionadas->contains('F'))<th>F</th>@endif
@if($boasPraticasSelecionadas->contains('G'))<th>G</th>@endif
@if($boasPraticasSelecionadas->contains('H'))<th>H</th>@endif
@if($boasPraticasSelecionadas->contains('I'))<th>I</th>@endif
@if($boasPraticasSelecionadas->contains('J'))<th>J</th>@endif
@if($boasPraticasSelecionadas->contains('K'))<th>K</th>@endif
</tr>
</thead>
<tbody>
@foreach ($equipes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
<td class="text-center">{{ $item->denominador }}</td>
<td class="text-center">{{ $item->numerador }}</td>
<td class="text-center">{{ $item->resultado }}%</td>
<td>{{ $item->classificacao_resultado }}</td>
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $item->boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $item->boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td class="text-center">{{ $item->boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td class="text-center">{{ $item->boa_pratica_d }}%</td>@endif
@if($boasPraticasSelecionadas->contains('E'))<td class="text-center">{{ $item->boa_pratica_e }}%</td>@endif
@if($boasPraticasSelecionadas->contains('F'))<td class="text-center">{{ $item->boa_pratica_f }}%</td>@endif
@if($boasPraticasSelecionadas->contains('G'))<td class="text-center">{{ $item->boa_pratica_g }}%</td>@endif
@if($boasPraticasSelecionadas->contains('H'))<td class="text-center">{{ $item->boa_pratica_h }}%</td>@endif
@if($boasPraticasSelecionadas->contains('I'))<td class="text-center">{{ $item->boa_pratica_i }}%</td>@endif
@if($boasPraticasSelecionadas->contains('J'))<td class="text-center">{{ $item->boa_pratica_j }}%</td>@endif
@if($boasPraticasSelecionadas->contains('K'))<td class="text-center">{{ $item->boa_pratica_k }}%</td>@endif
</tr>
@endforeach
</tbody>
</table>
@if($isBuscaAtiva)
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
@php
$colspan = 8;
if($colunasPacientes->contains('data_nascimento')) $colspan++;
if($colunasPacientes->contains('telefone_principal')) $colspan++;
if($colunasPacientes->contains('endereco')) $colspan++;
if($colunasPacientes->contains('microarea_descricao')) $colspan++;
if($colunasPacientes->contains('area_microarea_domicilio')) $colspan++;
if($boasPraticasSelecionadas->contains('A')) $colspan++;
if($boasPraticasSelecionadas->contains('B')) $colspan++;
if($boasPraticasSelecionadas->contains('C')) $colspan++;
if($boasPraticasSelecionadas->contains('D')) $colspan++;
if($boasPraticasSelecionadas->contains('E')) $colspan++;
if($boasPraticasSelecionadas->contains('F')) $colspan++;
if($boasPraticasSelecionadas->contains('G')) $colspan++;
if($boasPraticasSelecionadas->contains('H')) $colspan++;
if($boasPraticasSelecionadas->contains('I')) $colspan++;
if($boasPraticasSelecionadas->contains('J')) $colspan++;
if($boasPraticasSelecionadas->contains('K')) $colspan++;
@endphp
<th colspan="{{ $colspan }}">Busca ativa por paciente</th>
</tr>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Paciente</th>
<th>Sexo</th>
<th>Idade</th>
<th>Responsável pelo cadastro</th>
@if($colunasPacientes->contains('data_nascimento'))<th>Data de nascimento</th>@endif
@if($colunasPacientes->contains('telefone_principal'))<th>Telefone</th>@endif
@if($colunasPacientes->contains('endereco'))<th>Endereço</th>@endif
@if($colunasPacientes->contains('microarea_descricao'))<th>Microárea</th>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<th>Área/Microárea do Domicílio</th>@endif
@if($boasPraticasSelecionadas->contains('A'))<th>A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th>B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th>C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th>D</th>@endif
@if($boasPraticasSelecionadas->contains('E'))<th>E</th>@endif
@if($boasPraticasSelecionadas->contains('F'))<th>F</th>@endif
@if($boasPraticasSelecionadas->contains('G'))<th>G</th>@endif
@if($boasPraticasSelecionadas->contains('H'))<th>H</th>@endif
@if($boasPraticasSelecionadas->contains('I'))<th>I</th>@endif
@if($boasPraticasSelecionadas->contains('J'))<th>J</th>@endif
@if($boasPraticasSelecionadas->contains('K'))<th>K</th>@endif
<th>Pontuação total</th>
</tr>
</thead>
<tbody>
@foreach ($pacientes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
<td>{{ $item->paciente_nome }}</td>
<td>{{ $item->sexo_descricao }}</td>
<td>{{ $item->idade }}</td>
<td>{{ $item->usuario_cadastro_nome }}</td>
@if($colunasPacientes->contains('data_nascimento'))<td>{{ $item->data_nascimento }}</td>@endif
@if($colunasPacientes->contains('telefone_principal'))<td>{{ $item->telefone_principal }}</td>@endif
@if($colunasPacientes->contains('endereco'))<td>{{ $item->endereco }}</td>@endif
@if($colunasPacientes->contains('microarea_descricao'))<td>{{ $item->microarea_descricao }}</td>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<td>{{ $item->area_microarea_domicilio }}</td>@endif
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $item->boa_pratica_a ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $item->boa_pratica_b ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td class="text-center">{{ $item->boa_pratica_c ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td class="text-center">{{ $item->boa_pratica_d ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('E'))<td class="text-center">{{ $item->area_tipo_id == 5 && !$item->boa_pratica_e ? 'N/C' : ($item->boa_pratica_e ? 'x' : '') }}</td>@endif
@if($boasPraticasSelecionadas->contains('F'))<td class="text-center">{{ $item->boa_pratica_f ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('G'))<td class="text-center">{{ $item->boa_pratica_g ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('H'))<td class="text-center">{{ $item->boa_pratica_h ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('I'))<td class="text-center">{{ $item->boa_pratica_i ? 'x' : '' }}</td>@endif
@if($boasPraticasSelecionadas->contains('J'))<td class="text-center">{{ $item->area_tipo_id == 5 && !$item->boa_pratica_j ? 'N/C' : ($item->boa_pratica_j ? 'x' : '') }}</td>@endif
@if($boasPraticasSelecionadas->contains('K'))<td class="text-center">{{ $item->boa_pratica_k ? 'x' : '' }}</td>@endif
<td class="text-center">{{ $item->pontuacao_total }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
@endsection

View File

@@ -0,0 +1,350 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-4">
<strong>Período</strong>
<div>
@if($periodoDe)
De {{ $periodoDe }} até {{ $periodoAte }}
@endif
</div>
</div>
<div class="col-1">
<strong>Ano</strong>
<div>
{{ $quadrimestreAno }}
</div>
</div>
<div class="col-3">
<strong>Quadrimestre</strong>
<div>
{{ $quadrimestre }}
</div>
</div>
<div class="col-5">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Equipe</strong>
<div>
{{ $equipe }}
</div>
</div>
<div class="col-4">
<strong>Boas práticas</strong>
<div>
{{ $boasPraticas }}
</div>
</div>
<div class="col-2">
<strong>Sexo</strong>
<div>
{{ $sexo }}
</div>
</div>
<div class="col-2">
<strong>Identidade de gênero</strong>
<div>
{{ $identidadeGenero }}
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Faixa etária inicial</strong>
<div>
@isset($idadeMinimaAnos){{ $idadeMinimaAnos }} anos @endisset
@isset($idadeMinimaMeses){{ $idadeMinimaMeses }} meses @endisset
@isset($idadeMinimaDias){{ $idadeMinimaDias }} dias @endisset
</div>
</div>
<div class="col-3">
<strong>Faixa etária final</strong>
<div>
@isset($idadeMaximaAnos){{ $idadeMaximaAnos }} anos @endisset
@isset($idadeMaximaMeses){{ $idadeMaximaMeses }} meses @endisset
@isset($idadeMaximaDias){{ $idadeMaximaDias }} dias @endisset
</div>
</div>
<div class="col-4">
<strong>Paciente</strong>
<div>
{{ $paciente }}
</div>
</div>
<div class="col-2">
<strong>Busca ativa</strong>
<div>
{{ $buscaAtiva }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>Fora de Área</strong>
<div>
{{ $foraArea }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th colspan="4">Totalizadores</th>
</tr>
</thead>
<tbody>
<tr>
<th>Total de pacientes</th>
<th>Total de equipes</th>
<th>Total de microáreas</th>
<th>Resultado (%)</th>
</tr>
<tr>
<td class="text-center">{{ $totalizadores->total_pacientes }}</td>
<td class="text-center">{{ $totalizadores->total_equipes }}</td>
<td class="text-center">{{ $totalizadores->total_microareas }}</td>
<td class="text-center">{{ $totalizadores->resultado }}%</td>
</tr>
</tbody>
</table>
<table class="table" style="border-top: none !important;">
<tbody>
<tr>
@if($boasPraticasSelecionadas->contains('A'))
<th style="border-top: none !important;">Denominador da boa prática A</th>
<th style="border-top: none !important;">Numerador da boa prática A</th>
@endif
@if($boasPraticasSelecionadas->contains('B'))
<th style="border-top: none !important;">Denominador da boa prática B</th>
<th style="border-top: none !important;">Numerador da boa prática B</th>
@endif
@if($boasPraticasSelecionadas->contains('C'))
<th style="border-top: none !important;">Denominador da boa prática C</th>
<th style="border-top: none !important;">Numerador da boa prática C</th>
@endif
@if($boasPraticasSelecionadas->contains('D'))
<th style="border-top: none !important;">Denominador da boa prática D</th>
<th style="border-top: none !important;">Numerador da boa prática D</th>
@endif
</tr>
<tr>
@if($boasPraticasSelecionadas->contains('A'))
<td class="text-center">{{ $totalizadores->denominador_boa_pratica_a }}</td>
<td class="text-center">{{ $totalizadores->numerador_boa_pratica_a }}</td>
@endif
@if($boasPraticasSelecionadas->contains('B'))
<td class="text-center">{{ $totalizadores->denominador_boa_pratica_b }}</td>
<td class="text-center">{{ $totalizadores->numerador_boa_pratica_b }}</td>
@endif
@if($boasPraticasSelecionadas->contains('C'))
<td class="text-center">{{ $totalizadores->denominador_boa_pratica_c }}</td>
<td class="text-center">{{ $totalizadores->numerador_boa_pratica_c }}</td>
@endif
@if($boasPraticasSelecionadas->contains('D'))
<td class="text-center">{{ $totalizadores->denominador_boa_pratica_d }}</td>
<td class="text-center">{{ $totalizadores->numerador_boa_pratica_d }}</td>
@endif
</tr>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<th colspan="2">% Boa prática A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th colspan="2">% Boa prática B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th colspan="2">% Boa prática C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th colspan="2">% Boa prática D</th>@endif
</tr>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<td colspan="2" class="text-center">{{ $totalizadores->percentual_boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td colspan="2" class="text-center">{{ $totalizadores->percentual_boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td colspan="2" class="text-center">{{ $totalizadores->percentual_boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td colspan="2" class="text-center">{{ $totalizadores->percentual_boa_pratica_d }}%</td>@endif
</tr>
</tbody>
</table>
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
<th>Unidade</th>
<th>Equipe</th>
@if($boasPraticasSelecionadas->contains('A') && $colunasEquipes->contains('denominador_boa_pratica_a'))<th>Denominador da boa prática A</th>@endif
@if($boasPraticasSelecionadas->contains('A') && $colunasEquipes->contains('numerador_boa_pratica_a'))<th>Numerador da boa prática A</th>@endif
@if($boasPraticasSelecionadas->contains('B') && $colunasEquipes->contains('denominador_boa_pratica_b'))<th>Denominador da boa prática B</th>@endif
@if($boasPraticasSelecionadas->contains('B') && $colunasEquipes->contains('numerador_boa_pratica_b'))<th>Numerador da boa prática B</th>@endif
@if($boasPraticasSelecionadas->contains('C') && $colunasEquipes->contains('denominador_boa_pratica_c'))<th>Denominador da boa prática C</th>@endif
@if($boasPraticasSelecionadas->contains('C') && $colunasEquipes->contains('numerador_boa_pratica_c'))<th>Numerador da boa prática C</th>@endif
@if($boasPraticasSelecionadas->contains('D') && $colunasEquipes->contains('denominador_boa_pratica_d'))<th>Denominador da boa prática D</th>@endif
@if($boasPraticasSelecionadas->contains('D') && $colunasEquipes->contains('numerador_boa_pratica_d'))<th>Numerador da boa prática D</th>@endif
<th>Resultado (%)</th>
<th>Classificação</th>
@if($boasPraticasSelecionadas->contains('A'))<th>% Boa prática A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th>% Boa prática B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th>% Boa prática C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th>% Boa prática D</th>@endif
</tr>
</thead>
<tbody>
@foreach ($equipes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
@if($boasPraticasSelecionadas->contains('A') && $colunasEquipes->contains('denominador_boa_pratica_a'))<td class="text-center">{{ $item->denominador_boa_pratica_a }}</td>@endif
@if($boasPraticasSelecionadas->contains('A') && $colunasEquipes->contains('numerador_boa_pratica_a'))<td class="text-center">{{ $item->numerador_boa_pratica_a }}</td>@endif
@if($boasPraticasSelecionadas->contains('B') && $colunasEquipes->contains('denominador_boa_pratica_b'))<td class="text-center">{{ $item->denominador_boa_pratica_b }}</td>@endif
@if($boasPraticasSelecionadas->contains('B') && $colunasEquipes->contains('numerador_boa_pratica_b'))<td class="text-center">{{ $item->numerador_boa_pratica_b }}</td>@endif
@if($boasPraticasSelecionadas->contains('C') && $colunasEquipes->contains('denominador_boa_pratica_c'))<td class="text-center">{{ $item->denominador_boa_pratica_c }}</td>@endif
@if($boasPraticasSelecionadas->contains('C') && $colunasEquipes->contains('numerador_boa_pratica_c'))<td class="text-center">{{ $item->numerador_boa_pratica_c }}</td>@endif
@if($boasPraticasSelecionadas->contains('D') && $colunasEquipes->contains('denominador_boa_pratica_d'))<td class="text-center">{{ $item->denominador_boa_pratica_d }}</td>@endif
@if($boasPraticasSelecionadas->contains('D') && $colunasEquipes->contains('numerador_boa_pratica_d'))<td class="text-center">{{ $item->numerador_boa_pratica_d }}</td>@endif
<td class="text-center">{{ $item->resultado }}%</td>
<td>{{ $item->classificacao_resultado }}</td>
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $item->percentual_boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $item->percentual_boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td class="text-center">{{ $item->percentual_boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td class="text-center">{{ $item->percentual_boa_pratica_d }}%</td>@endif
</tr>
@endforeach
</tbody>
</table>
@if($isBuscaAtiva)
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
@php
$colspan = 8;
if($colunasPacientes->contains('data_nascimento')) $colspan++;
if($colunasPacientes->contains('telefone_principal')) $colspan++;
if($colunasPacientes->contains('endereco')) $colspan++;
if($colunasPacientes->contains('area_microarea_domicilio')) $colspan++;
if($boasPraticasSelecionadas->contains('A')) $colspan++;
if($boasPraticasSelecionadas->contains('B')) $colspan++;
if($boasPraticasSelecionadas->contains('C')) $colspan++;
if($boasPraticasSelecionadas->contains('D')) $colspan++;
@endphp
<th colspan="{{ $colspan }}">Busca ativa por paciente</th>
</tr>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Paciente</th>
<th>Sexo</th>
<th>Idade</th>
<th>Microárea</th>
<th>Responsável pelo cadastro</th>
@if($colunasPacientes->contains('data_nascimento'))<th>Data de nascimento</th>@endif
@if($colunasPacientes->contains('telefone_principal'))<th>Telefone</th>@endif
@if($colunasPacientes->contains('endereco'))<th>Endereço</th>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<th>Área/Microárea do Domicílio</th>@endif
@if($boasPraticasSelecionadas->contains('A'))<th>A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th>B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th>C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th>D</th>@endif
<th>Pontuação total</th>
</tr>
</thead>
<tbody>
@foreach ($pacientes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
<td>{{ $item->paciente_nome }}</td>
<td>{{ $item->sexo_descricao }}</td>
<td>{{ $item->idade }}</td>
<td>{{ $item->microarea_descricao }}</td>
<td>{{ $item->usuario_cadastro_nome }}</td>
@if($colunasPacientes->contains('data_nascimento'))<td>{{ $item->data_nascimento }}</td>@endif
@if($colunasPacientes->contains('telefone_principal'))<td>{{ $item->telefone_principal }}</td>@endif
@if($colunasPacientes->contains('endereco'))<td>{{ $item->endereco }}</td>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<td>{{ $item->area_microarea_domicilio }}</td>@endif
@if($boasPraticasSelecionadas->contains('A'))
<td class="text-center">
@if($item->boa_pratica_a_aplica)
{{ $item->boa_pratica_a ? 'Sim' : 'Não' }}
@else
Não aplica
@endif
</td>
@endif
@if($boasPraticasSelecionadas->contains('B'))
<td class="text-center">
@if($item->boa_pratica_b_aplica)
{{ $item->boa_pratica_b ? 'Sim' : 'Não' }}
@else
Não aplica
@endif
</td>
@endif
@if($boasPraticasSelecionadas->contains('C'))
<td class="text-center">
@if($item->boa_pratica_c_aplica)
{{ $item->boa_pratica_c ? 'Sim' : 'Não' }}
@else
Não aplica
@endif
</td>
@endif
@if($boasPraticasSelecionadas->contains('D'))
<td class="text-center">
@if($item->boa_pratica_d_aplica)
{{ $item->boa_pratica_d ? 'Sim' : 'Não' }}
@else
Não aplica
@endif
</td>
@endif
<td class="text-center">{{ $item->pontuacao_total }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
@endsection

View File

@@ -0,0 +1,363 @@
@extends('impressoes.layout1.content')
<style>
* {
font-size: 14px;
}
</style>
@section('conteudo')
<fieldset>
<legend>Filtros</legend>
<div class="row">
@if ($periodo['inicio'] && $periodo['fim'])
<div class="col-6">
<strong>Período:</strong>
</div>
@else
<div class="col-6">
<strong>Ano/Quadrimestre:</strong>
</div>
@endif
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
@if ($periodo['inicio'] && $periodo['fim'])
<div class="col-6">
De {{ $periodo['inicio'] }} até {{ $periodo['fim'] }}
</div>
@else
<div class="col-6">
{{ $ano }}/{{ $quadrimestre }}
</div>
@endif
<div class="col-6">
{{ $unidade }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Equipe:</strong>
</div>
<div class="col-6">
<strong>Sexo:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $equipe }}
</div>
<div class="col-6">
{{ $sexo }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Idade mínima (anos):</strong>
</div>
<div class="col-6">
<strong>Idade máxima (anos):</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $idade_anos_minimo }}
</div>
<div class="col-6">
{{ $idade_anos_maximo }}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Paciente:</strong>
</div>
</div>
<div class="row">
<div class="col-12">
{{ $paciente }}
</div>
</div>
<div class="row">
<div class="col-12">
<strong>Fora de Área:</strong>
</div>
</div>
<div class="row">
<div class="col-12">
{{ $fora_area ? 'Sim' : 'Não' }}
</div>
</div>
</fieldset>
<fieldset>
<legend>Totais</legend>
<div class="row">
<div class="col-3">
<strong>Total de pacientes:</strong>
</div>
<div class="col-3">
<strong>Total de equipes:</strong>
</div>
<div class="col-3">
<strong>Total de microáreas:</strong>
</div>
<div class="col-3">
<strong>Denominador:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{$itens['totalizadores']['pacientes']}}
</div>
<div class="col-3">
{{$itens['totalizadores']['equipes']}}
</div>
<div class="col-3">
{{$itens['totalizadores']['microareas']}}
</div>
<div class="col-3">
{{$itens['totalizadores']['denominador']}}
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Numerador:</strong>
</div>
<div class="col-3">
<strong>Resultado:</strong>
</div>
<div class="col-3">
<strong>% Boa prática A:</strong>
</div>
<div class="col-3">
<strong>% Boa prática B:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{$itens['totalizadores']['numerador']}}
</div>
<div class="col-3">
{{$itens['totalizadores']['resultado']}}%
</div>
<div class="col-3">
{{$itens['totalizadores']['percentual_boas_praticas_a']}}%
</div>
<div class="col-3">
{{$itens['totalizadores']['percentual_boas_praticas_b']}}%
</div>
</div>
<div class="row">
<div class="col-3">
<strong>% Boa prática C:</strong>
</div>
<div class="col-3">
<strong>% Boa prática D:</strong>
</div>
<div class="col-3">
<strong>% Boa prática E:</strong>
</div>
<div class="col-3">
<strong>% Boa prática F:</strong>
</div>
</div>
<div class="row">
<div class="col-3">
{{$itens['totalizadores']['percentual_boas_praticas_c']}}%
</div>
<div class="col-3">
{{$itens['totalizadores']['percentual_boas_praticas_d']}}%
</div>
<div class="col-3">
{{$itens['totalizadores']['percentual_boas_praticas_e']}}%
</div>
<div class="col-3">
{{$itens['totalizadores']['percentual_boas_praticas_f']}}%
</div>
</div>
</fieldset>
<br />
<fieldset>
<legend>Resultados por equipe</legend>
<table class="table">
<thead>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Denominador</th>
<th>Numerador</th>
<th>Resultado</th>
<th>Classificação</th>
@if (in_array('A', $boas_praticas))
<th>% Boa prática A</th>
@endif
@if (in_array('B', $boas_praticas))
<th>% Boa prática B</th>
@endif
@if (in_array('C', $boas_praticas))
<th>% Boa prática C</th>
@endif
@if (in_array('D', $boas_praticas))
<th>% Boa prática D</th>
@endif
@if (in_array('E', $boas_praticas))
<th>% Boa prática E</th>
@endif
@if (in_array('F', $boas_praticas))
<th>% Boa prática F</th>
@endif
</tr>
</thead>
<tbody>
@foreach($itens['itens_agrupados'] as $item)
<tr>
<td>{{$item['unidade_nome_fantasia']}}</td>
<td>{{$item['equipe_descricao']}}</td>
<td>{{$item['denominador']}}</td>
<td>{{$item['numerador']}}</td>
<td>{{$item['resultado']}}%</td>
<td>{{$item['classificacao']}}</td>
@if (in_array('A', $boas_praticas))
<td>{{$item['percentual_boas_praticas_a']}}%</td>
@endif
@if (in_array('B', $boas_praticas))
<td>{{$item['percentual_boas_praticas_b']}}%</td>
@endif
@if (in_array('C', $boas_praticas))
<td>{{$item['percentual_boas_praticas_c']}}%</td>
@endif
@if (in_array('D', $boas_praticas))
<td>{{$item['percentual_boas_praticas_d']}}%</td>
@endif
@if (in_array('E', $boas_praticas))
<td>{{$item['percentual_boas_praticas_e']}}%</td>
@endif
@if (in_array('F', $boas_praticas))
<td>{{$item['percentual_boas_praticas_f']}}%</td>
@endif
</tr>
@endforeach
</tbody>
</table>
</fieldset>
<br />
@if ($busca_ativa)
<fieldset>
<legend>Resultados por paciente</legend>
<table class="table">
<thead>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Área/Microárea do Domicílio</th>
<th>Paciente</th>
<th>Sexo</th>
<th>Data de nascimento</th>
<th>Idade</th>
@if (in_array('A', $boas_praticas))
<th>Boa prática A</th>
@endif
@if (in_array('B', $boas_praticas))
<th>Boa prática B</th>
@endif
@if (in_array('C', $boas_praticas))
<th>Boa prática C</th>
@endif
@if (in_array('D', $boas_praticas))
<th>Boa prática D</th>
@endif
@if (in_array('E', $boas_praticas))
<th>Boa prática E</th>
@endif
@if (in_array('F', $boas_praticas))
<th>Boa prática F</th>
@endif
<th>Pontuação total</th>
</tr>
</thead>
<tbody>
@foreach($itens['itens_desagrupados'] as $item)
<tr>
<td>{{$item['unidade_nome_fantasia']}}</td>
<td>{{$item['equipe_descricao']}}</td>
<td>{{$item['area_microarea_domicilio']}}</td>
<td>{{$item['paciente_nome']}}</td>
<td>{{$item['paciente_sexo_descricao']}}</td>
<td>{{$item['paciente_data_nascimento']}}</td>
<td>{{$item['paciente_idade']}}</td>
@if (in_array('A', $boas_praticas))
<td>{{$item['boa_pratica_a'] ? 'Sim' : 'Não'}}</td>
@endif
@if (in_array('B', $boas_praticas))
<td>{{$item['boa_pratica_b'] ? 'Sim' : 'Não'}}</td>
@endif
@if (in_array('C', $boas_praticas))
<td>{{$item['boa_pratica_c'] ? 'Sim' : 'Não'}}</td>
@endif
@if (in_array('D', $boas_praticas))
<td>{{$item['area_tipo_id'] == 5 && !$item['boa_pratica_d'] ? 'N/C' : ($item['boa_pratica_d'] ? 'Sim' : 'Não')}}</td>
@endif
@if (in_array('E', $boas_praticas))
<td>{{$item['boa_pratica_e'] ? 'Sim' : 'Não'}}</td>
@endif
@if (in_array('F', $boas_praticas))
<td>{{$item['boa_pratica_f'] ? 'Sim' : 'Não'}}</td>
@endif
<td>{{$item['pontuacao_total']}}</td>
</tr>
@endforeach
</tbody>
</table>
</fieldset>
@endif
@endsection

View File

@@ -0,0 +1,257 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-4">
<strong>Período</strong>
<div>
@if($periodoDe)
De {{ $periodoDe }} até {{ $periodoAte }}
@endif
</div>
</div>
<div class="col-1">
<strong>Ano</strong>
<div>
{{ $quadrimestreAno }}
</div>
</div>
<div class="col-3">
<strong>Quadrimestre</strong>
<div>
{{ $quadrimestre }}
</div>
</div>
<div class="col-4">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Equipe</strong>
<div>
{{ $equipe }}
</div>
</div>
<div class="col-4">
<strong>Boas práticas</strong>
<div>
{{ $boasPraticas }}
</div>
</div>
<div class="col-2">
<strong>Busca ativa</strong>
<div>
{{ $buscaAtiva }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>Sexo</strong>
<div>
{{ $sexo }}
</div>
</div>
<div class="col-2">
<strong>Idade mínima</strong>
<div>
{{ $idadeMinima }}
</div>
</div>
<div class="col-2">
<strong>Idade máxima</strong>
<div>
{{ $idadeMaxima }}
</div>
</div>
<div class="col-6">
<strong>Paciente</strong>
<div>
{{ $paciente }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>Fora de Área</strong>
<div>
{{ $foraArea }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th colspan="6">Totalizadores</th>
</tr>
<tr>
<th>Total de pacientes</th>
<th>Total de equipes</th>
<th>Total de microáreas</th>
<th>Denominador</th>
<th>Numerador</th>
<th>Resultado</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">{{ $totalizadores->total_pacientes }}</td>
<td class="text-center">{{ $totalizadores->total_equipes }}</td>
<td class="text-center">{{ $totalizadores->total_microareas }}</td>
<td class="text-center">{{ $totalizadores->denominador }}</td>
<td class="text-center">{{ $totalizadores->numerador }}</td>
<td class="text-center">{{ $totalizadores->resultado }}%</td>
</tr>
</tbody>
</table>
<table class="table" style="border-top: none !important;">
<thead>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<th style="border-top: none !important;">Boa prática A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th style="border-top: none !important;">Boa prática B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th style="border-top: none !important;">Boa prática C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th style="border-top: none !important;">Boa prática D</th>@endif
</tr>
</thead>
<tbody>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $totalizadores->boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $totalizadores->boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td class="text-center">{{ $totalizadores->boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td class="text-center">{{ $totalizadores->boa_pratica_d }}%</td>@endif
</tr>
</tbody>
</table>
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Denominador</th>
<th>Numerador</th>
<th>Resultado</th>
<th>Classificação</th>
@if($boasPraticasSelecionadas->contains('A'))<th>A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th>B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th>C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th>D</th>@endif
</tr>
</thead>
<tbody>
@foreach ($equipes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
<td class="text-center">{{ $item->denominador }}</td>
<td class="text-center">{{ $item->numerador }}</td>
<td class="text-center">{{ $item->resultado }}%</td>
<td>{{ $item->classificacao_resultado }}</td>
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $item->boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $item->boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td class="text-center">{{ $item->boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td class="text-center">{{ $item->boa_pratica_d }}%</td>@endif
</tr>
@endforeach
</tbody>
</table>
@if($isBuscaAtiva)
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
@php
$colspan = 8;
if($colunasPacientes->contains('data_nascimento')) $colspan++;
if($colunasPacientes->contains('telefone_principal')) $colspan++;
if($colunasPacientes->contains('endereco')) $colspan++;
if($colunasPacientes->contains('area_microarea_domicilio')) $colspan++;
if($boasPraticasSelecionadas->contains('A')) $colspan++;
if($boasPraticasSelecionadas->contains('B')) $colspan++;
if($boasPraticasSelecionadas->contains('C')) $colspan++;
if($boasPraticasSelecionadas->contains('D')) $colspan++;
@endphp
<th colspan="{{ $colspan }}">Busca ativa por paciente</th>
</tr>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Paciente</th>
<th>Sexo</th>
<th>Idade</th>
<th>Microárea</th>
<th>Responsável pelo cadastro</th>
@if($colunasPacientes->contains('data_nascimento'))<th>Data de nascimento</th>@endif
@if($colunasPacientes->contains('telefone_principal'))<th>Telefone</th>@endif
@if($colunasPacientes->contains('endereco'))<th>Endereço</th>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<th>Área/Microárea do Domicílio</th>@endif
@if($boasPraticasSelecionadas->contains('A'))<th>A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th>B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th>C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th>D</th>@endif
<th>Pontuação total</th>
</tr>
</thead>
<tbody>
@foreach ($pacientes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
<td>{{ $item->paciente_nome }}</td>
<td>{{ $item->sexo_descricao }}</td>
<td>{{ $item->idade }}</td>
<td>{{ $item->microarea_descricao }}</td>
<td>{{ $item->usuario_cadastro_nome }}</td>
@if($colunasPacientes->contains('data_nascimento'))<td>{{ $item->data_nascimento }}</td>@endif
@if($colunasPacientes->contains('telefone_principal'))<td>{{ $item->telefone_principal }}</td>@endif
@if($colunasPacientes->contains('endereco'))<td>{{ $item->endereco }}</td>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<td>{{ $item->area_microarea_domicilio }}</td>@endif
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $item->boa_pratica_a ? 'Sim' : 'Não' }}</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $item->boa_pratica_b ? 'Sim' : 'Não' }}</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td class="text-center">{{ $item->boa_pratica_c ? 'Sim' : 'Não' }}</td>@endif
@if($boasPraticasSelecionadas->contains('D'))
<td class="text-center">
@if($item->is_equipe_eap)
Não condicionante
@else
{{ $item->boa_pratica_d ? 'Sim' : 'Não' }}
@endif
</td>
@endif
<td class="text-center">{{ $item->pontuacao_total }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
@endsection

View File

@@ -0,0 +1,257 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table th { text-align: center; }
.col-min { width: 1%; }
.text-center { text-align: center; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-4">
<strong>Período</strong>
<div>
@if($periodoDe)
De {{ $periodoDe }} até {{ $periodoAte }}
@endif
</div>
</div>
<div class="col-1">
<strong>Ano</strong>
<div>
{{ $quadrimestreAno }}
</div>
</div>
<div class="col-3">
<strong>Quadrimestre</strong>
<div>
{{ $quadrimestre }}
</div>
</div>
<div class="col-4">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Equipe</strong>
<div>
{{ $equipe }}
</div>
</div>
<div class="col-4">
<strong>Boas práticas</strong>
<div>
{{ $boasPraticas }}
</div>
</div>
<div class="col-2">
<strong>Busca ativa</strong>
<div>
{{ $buscaAtiva }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>Sexo</strong>
<div>
{{ $sexo }}
</div>
</div>
<div class="col-2">
<strong>Idade mínima</strong>
<div>
{{ $idadeMinima }}
</div>
</div>
<div class="col-2">
<strong>Idade máxima</strong>
<div>
{{ $idadeMaxima }}
</div>
</div>
<div class="col-6">
<strong>Paciente</strong>
<div>
{{ $paciente }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>Fora de Área</strong>
<div>
{{ $foraArea }}
</div>
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th colspan="6">Totalizadores</th>
</tr>
<tr>
<th>Total de pacientes</th>
<th>Total de equipes</th>
<th>Total de microáreas</th>
<th>Denominador (D)</th>
<th>Numerador (N)</th>
<th>Resultado (%)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">{{ $totalizadores->total_pacientes }}</td>
<td class="text-center">{{ $totalizadores->total_equipes }}</td>
<td class="text-center">{{ $totalizadores->total_microareas }}</td>
<td class="text-center">{{ $totalizadores->denominador }}</td>
<td class="text-center">{{ $totalizadores->numerador }}</td>
<td class="text-center">{{ $totalizadores->resultado }}%</td>
</tr>
</tbody>
</table>
<table class="table" style="border-top: none !important;">
<thead>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<th style="border-top: none !important;">% Boa prática A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th style="border-top: none !important;">% Boa prática B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th style="border-top: none !important;">% Boa prática C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th style="border-top: none !important;">% Boa prática D</th>@endif
</tr>
</thead>
<tbody>
<tr>
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $totalizadores->percentual_boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $totalizadores->percentual_boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td class="text-center">{{ $totalizadores->percentual_boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td class="text-center">{{ $totalizadores->percentual_boa_pratica_d }}%</td>@endif
</tr>
</tbody>
</table>
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Denominador (D)</th>
<th>Numerador (N)</th>
<th>Resultado (%)</th>
<th>Classificação</th>
@if($boasPraticasSelecionadas->contains('A'))<th>% Boa prática A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th>% Boa prática B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th>% Boa prática C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th>% Boa prática D</th>@endif
</tr>
</thead>
<tbody>
@foreach ($equipes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
<td class="text-center">{{ $item->denominador }}</td>
<td class="text-center">{{ $item->numerador }}</td>
<td class="text-center">{{ $item->resultado }}%</td>
<td>{{ $item->classificacao_resultado }}</td>
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $item->percentual_boa_pratica_a }}%</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $item->percentual_boa_pratica_b }}%</td>@endif
@if($boasPraticasSelecionadas->contains('C'))<td class="text-center">{{ $item->percentual_boa_pratica_c }}%</td>@endif
@if($boasPraticasSelecionadas->contains('D'))<td class="text-center">{{ $item->percentual_boa_pratica_d }}%</td>@endif
</tr>
@endforeach
</tbody>
</table>
@if($isBuscaAtiva)
<table class="table" style="margin-top: 15px;">
<thead>
<tr>
@php
$colspan = 8;
if($colunasPacientes->contains('data_nascimento')) $colspan++;
if($colunasPacientes->contains('telefone_principal')) $colspan++;
if($colunasPacientes->contains('endereco')) $colspan++;
if($colunasPacientes->contains('area_microarea_domicilio')) $colspan++;
if($boasPraticasSelecionadas->contains('A')) $colspan++;
if($boasPraticasSelecionadas->contains('B')) $colspan++;
if($boasPraticasSelecionadas->contains('C')) $colspan++;
if($boasPraticasSelecionadas->contains('D')) $colspan++;
@endphp
<th colspan="{{ $colspan }}">Busca ativa por paciente</th>
</tr>
<tr>
<th>Unidade</th>
<th>Equipe</th>
<th>Paciente</th>
<th>Sexo</th>
<th>Idade</th>
<th>Microárea</th>
<th>Responsável pelo cadastro</th>
@if($colunasPacientes->contains('data_nascimento'))<th>Data de nascimento</th>@endif
@if($colunasPacientes->contains('telefone_principal'))<th>Telefone</th>@endif
@if($colunasPacientes->contains('endereco'))<th>Endereço</th>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<th>Área/Microárea do Domicílio</th>@endif
@if($boasPraticasSelecionadas->contains('A'))<th>A</th>@endif
@if($boasPraticasSelecionadas->contains('B'))<th>B</th>@endif
@if($boasPraticasSelecionadas->contains('C'))<th>C</th>@endif
@if($boasPraticasSelecionadas->contains('D'))<th>D</th>@endif
<th>Pontuação total</th>
</tr>
</thead>
<tbody>
@foreach ($pacientes as $item)
<tr>
<td>{{ $item->unidade_nome_fantasia }}</td>
<td>{{ $item->equipe_descricao }}</td>
<td>{{ $item->paciente_nome }}</td>
<td>{{ $item->sexo_descricao }}</td>
<td>{{ $item->idade }}</td>
<td>{{ $item->microarea_descricao }}</td>
<td>{{ $item->usuario_cadastro_nome }}</td>
@if($colunasPacientes->contains('data_nascimento'))<td>{{ $item->data_nascimento }}</td>@endif
@if($colunasPacientes->contains('telefone_principal'))<td>{{ $item->telefone_principal }}</td>@endif
@if($colunasPacientes->contains('endereco'))<td>{{ $item->endereco }}</td>@endif
@if($colunasPacientes->contains('area_microarea_domicilio'))<td>{{ $item->area_microarea_domicilio }}</td>@endif
@if($boasPraticasSelecionadas->contains('A'))<td class="text-center">{{ $item->boa_pratica_a ? 'Sim' : 'Não' }}</td>@endif
@if($boasPraticasSelecionadas->contains('B'))<td class="text-center">{{ $item->boa_pratica_b ? 'Sim' : 'Não' }}</td>@endif
@if($boasPraticasSelecionadas->contains('C'))
<td class="text-center">
@if($item->is_equipe_eap)
Não condicionante
@else
{{ $item->boa_pratica_c ? 'Sim' : 'Não' }}
@endif
</td>
@endif
@if($boasPraticasSelecionadas->contains('D'))<td class="text-center">{{ $item->boa_pratica_d ? 'Sim' : 'Não' }}</td>@endif
<td class="text-center">{{ $item->pontuacao_total }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
@endsection

View File

@@ -0,0 +1,341 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<div style="margin-bottom: 15px;">
Os paciente com saída do cadastro por motivo de óbito ou mudança de território não serão exibidos.
</div>
<fieldset>
<legend>EQUIPE</legend>
<div class="row">
<div class="col-4">
<strong>Unidade:</strong>
</div>
<div class="col-4">
<strong>Local de atendimento:</strong>
</div>
<div class="col-4">
<strong>Local do domicílio:</strong>
</div>
</div>
<div class="row">
<div class="col-4">
{{ $params['unidade_label'] }}
</div>
<div class="col-4">
{{ $params['local_atendimento_label'] }}
</div>
<div class="col-4">
{{ $params['local_domicilio_label'] }}
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Área da equipe</strong>
</div>
<div class="col-4">
<strong>Micro área</strong>
</div>
<div class="col-4">
<strong>Profissional</strong>
</div>
</div>
<div class="row">
<div class="col-4">
{{ $params['area_equipe_label'] }}
</div>
<div class="col-4">
{{ $params['micro_area_label'] }}
</div>
<div class="col-4">
{{ $params['profissional_label'] }}
</div>
</div>
</fieldset>
<fieldset>
<legend>PACIENTE</legend>
<div class="row">
<div class="col-2">
<strong>Classificação:</strong>
</div>
<div class="col-1">
<strong>Anos de:</strong>
</div>
<div class="col-1">
<strong>Meses de:</strong>
</div>
<div class="col-1">
<strong>Dias de:</strong>
</div>
<div class="col-1">
<strong>Anos até:</strong>
</div>
<div class="col-1">
<strong>Meses até:</strong>
</div>
<div class="col-1">
<strong>Dias até:</strong>
</div>
<div class="col-4">
<strong>Paciente:</strong>
</div>
</div>
<div class="row">
<div class="col-2">
{{ $params['classificacao_paciente_label'] }}
</div>
<div class="col-1">
{{ $params['anos_de_label'] }}
</div>
<div class="col-1">
{{ $params['meses_de_label'] }}
</div>
<div class="col-1">
{{ $params['dias_de_label'] }}
</div>
<div class="col-1">
{{ $params['anos_ate_label'] }}
</div>
<div class="col-1">
{{ $params['meses_ate_label'] }}
</div>
<div class="col-1">
{{ $params['dias_ate_label'] }}
</div>
<div class="col-4">
{{ $params['paciente_label'] }}
</div>
</div>
</fieldset>
<fieldset>
<legend>CONDICIONALIDADES</legend>
<div class="row">
<div class="col-1">
<strong>Sexo:</strong>
</div>
<div class="col-1">
<strong>Peso:</strong>
</div>
<div class="col-1">
<strong>Gestante:</strong>
</div>
<div class="col-1">
<strong>Hipertenso:</strong>
</div>
<div class="col-1">
<strong>Diabético:</strong>
</div>
<div class="col-1">
<strong>Hanseniase:</strong>
</div>
<div class="col-1">
<strong>Tuberculose:</strong>
</div>
<div class="col-1">
<strong>Fumante:</strong>
</div>
<div class="col-1">
<strong>Alcool:</strong>
</div>
<div class="col-1">
<strong>Drogas:</strong>
</div>
<div class="col-1">
<strong>Tea:</strong>
</div>
</div>
<div class="row">
<div class="col-1">
{{ $params['condicionalidades_label']['sexo_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['peso_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['gestante_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['hipertenso_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['diabetico_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['hanseniase_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['tuberculose_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['fumante_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['alcool_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['drogas_label'] }}
</div>
<div class="col-1">
{{ $params['condicionalidades_label']['tea_label'] }}
</div>
</div>
</fieldset>
<fieldset>
<legend>OUTRAS DOENÇAS/TRATAMENTOS</legend>
<div class="row">
<div class="col-1">
<strong>Avc/Derrame:</strong>
</div>
<div class="col-1">
<strong>Infarto:</strong>
</div>
<div class="col-1">
<strong>Cancer:</strong>
</div>
<div class="col-1">
<strong>Fibromialgia:</strong>
</div>
<div class="col-1">
<strong>Internação:</strong>
</div>
<div class="col-1">
<strong>Doença cardíaca:</strong>
</div>
</div>
<div class="row">
<div class="col-1">
{{ $params['outras_doencas_label']['avc_label'] }}
</div>
<div class="col-1">
{{ $params['outras_doencas_label']['infarto_label'] }}
</div>
<div class="col-1">
{{ $params['outras_doencas_label']['cancer_label'] }}
</div>
<div class="col-1">
{{ $params['outras_doencas_label']['fibromialgia_label'] }}
</div>
<div class="col-1">
{{ $params['outras_doencas_label']['internacao_label'] }}
</div>
<div class="col-1">
{{ $params['outras_doencas_label']['doenca_cardiaca_label'] }}
</div>
</div>
<div class="row">
<div class="col-1">
<strong>Doença renal:</strong>
</div>
<div class="col-1">
<strong>Doença respiratória:</strong>
</div>
<div class="col-1">
<strong>Tratamento psiquiátrico:</strong>
</div>
<div class="col-1">
<strong>Plantas medicinais:</strong>
</div>
<div class="col-1">
<strong>Práticas integrativas:</strong>
</div>
</div>
<div class="row">
<div class="col-1">
{{ $params['outras_doencas_label']['doenca_renal_label'] }}
</div>
<div class="col-1">
{{ $params['outras_doencas_label']['doenca_respiratoria_label'] }}
</div>
<div class="col-1">
{{ $params['outras_doencas_label']['tratamento_psicologico_label'] }}
</div>
<div class="col-1">
{{ $params['outras_doencas_label']['plantas_medicinais_label'] }}
</div>
<div class="col-1">
{{ $params['outras_doencas_label']['praticas_integrativas_label'] }}
</div>
</div>
</fieldset>
<fieldset>
<legend>ATENÇÃO DOMICILIAR</legend>
<div class="row">
<div class="col-6">
<strong>Acamado:</strong>
</div>
<div class="col-6">
<strong>Domiciliado:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $params['atencao_domiciliar_label']['acamado_label'] }}
</div>
<div class="col-6">
{{ $params['atencao_domiciliar_label']['domiciliado_label'] }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
@foreach($params['selected_columns'] as $coluna)
@if ($coluna['key'] !== 'todas')
<th>{{ $coluna['label'] }}</th>
@endif
@endforeach
</tr>
</thead>
<tbody>
@foreach ($relatorio['relatorio'] as $registros)
<tr>
@foreach($params['selected_columns'] as $coluna)
@if ($coluna['key'] !== 'todas')
<td>{{ $registros->{$coluna['key']} ?? '' }}</td>
@endif
@endforeach
</tr>
@endforeach
</tbody>
</table>
<br>
<div class="row">
<div class="col-12">
<strong>
TOTALIZADORES:
</strong>
</div>
</div>
<br>
<div class="row line-space">
<div class="col-12">
<strong>Total de pacientes:</strong> {{ $relatorio['total_pacientes'] }}<br>
<strong>Total de famílias:</strong> {{ $relatorio['total_familias'] }}<br>
<strong>Total por sexo:</strong>
@foreach ($relatorio['total_pacientes_por_sexo'] as $sexo => $total)
<span class="me-3">{{ ucfirst($sexo) }}: {{ $total }}</span>
@endforeach
<br>
<strong>Total por área:</strong>
@foreach ($relatorio['total_pacientes_por_area'] as $area => $total)
<span class="me-3">{{ ucfirst($area) }}: {{ $total }}</span>
@endforeach
<br>
<strong>Total por micro área:</strong>
@foreach ($relatorio['total_pacientes_por_micro_area'] as $micro => $total)
<span class="me-3">{{ ucfirst($micro) }}: {{ $total }}</span>
@endforeach
</div>
</div>
@endsection

View File

@@ -0,0 +1,104 @@
@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;
}
.linha-filtro {
margin-bottom: 10px;
}
fieldset {
margin-top: 20px;
}
</style>
<fieldset>
<legend>Filtros</legend>
<div class="linha-filtro">
<div class="row">
<div class="col-6">
<strong>Competência:</strong>
</div>
<div class="col-6">
<strong>Unidade:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $competencia }}
</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>Profissional:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-6">
{{ $usuario }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Ficha:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $ficha }}
</div>
</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 ($items as $item)
<tr>
@foreach ($colunas as $coluna)
<td>
{!! $item[$coluna['key']] ?? '-' !!}
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,96 @@
@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 !important; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-2">
<strong>Ano</strong>
<div>
{{ $ano }}
</div>
</div>
<div class="col-4">
<strong>Mês</strong>
<div>
{{ $mes }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Local de atendimento</strong>
<div>
{{ $infraestrutura }}
</div>
</div>
<div class="col-6">
<strong>Equipe</strong>
<div>
{{ $equipe }}
</div>
</div>
</div>
</fieldset>
@foreach ($resultado as $key => $data)
<table class="table table-relatorio" style="page-break-inside: avoid; {{ $key !== 'levantamento_quantitativo' ? 'margin-top: 15px;' : '' }}">
<thead>
<tr>
<th colspan="{{ isset($data['itens'][0]['percentual']) ? 3 : 2 }}">{{ $data['titulo'] }}</th>
</tr>
<tr>
<th>Quantitativo</th>
<th style="width: 110px;">Quantidade</th>
@isset($data['itens'][0]['percentual'])
<th style="width: 110px;">%</th>
@endisset
</tr>
</thead>
<tbody>
@foreach ($data['itens'] as $item)
<tr>
<td>{{ $item['descricao'] }}</td>
<td class="text-center">{{ $item['quantidade'] }}</td>
@isset($item['percentual'])
<td class="text-center">{{ $item['percentual'] }}</td>
@endisset
</tr>
@endforeach
@isset($data['rodape'])
<tr>
<th colspan="{{ isset($data['itens'][0]['percentual']) ? 3 : 2 }}" style="font-weight: normal;">{{ $data['rodape'] }}</th>
</tr>
@endisset
</tbody>
</table>
@endforeach
@endsection

View File

@@ -0,0 +1,193 @@
@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-3">
<strong>Área:</strong>
</div>
<div class="col-3">
<strong>Microárea:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $infraestrutura }}
</div>
<div class="col-3">
{{ $area }}
</div>
<div class="col-3">
{{ $microarea }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Agente responsável:</strong>
</div>
<div class="col-6">
<strong>Paciente:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $usuario }}
</div>
<div class="col-6">
{{ $paciente }}
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Logradouro:</strong>
</div>
<div class="col-3">
<strong>Número do logradouro:</strong>
</div>
<div class="col-3">
<strong>Desfecho:</strong>
</div>
</div>
<div class="row">
<div class="col-6">
{{ $domicilio }}
</div>
<div class="col-3">
{{ $endereco_numero }}
</div>
<div class="col-3">
{{ $desfecho }}
</div>
</div>
</fieldset>
<table class="table">
<thead>
<tr>
<th>Data</th>
<th>Paciente</th>
<th>Prontuário</th>
<th>Endereço completo</th>
<th>Agente responsável</th>
<th>Área</th>
<th>Microarea</th>
<th>Residentes</th>
<th>Responsável familiar</th>
<th>Desfecho</th>
</tr>
</thead>
<tbody>
@foreach($data['itens'] as $item)
<tr>
<td>{{ \Carbon\Carbon::parse($item->data)->format('d/m/Y') }}</td>
<td>{{$item->paciente_nome}}</td>
<td>{{$item->paciente_prontuario}}</td>
<td>{{$item->paciente_endereco}}</td>
<td>{{$item->usuario_nome}}</td>
<td>{{$item->area_descricao}}</td>
<td>{{$item->microarea_descricao}}</td>
<td>{{$item->residentes}}</td>
<td>{{$item->responsavel_familiar}}</td>
<td>{{$item->desfecho_descricao}}</td>
</tr>
@endforeach
</tbody>
</table>
<br />
<fieldset>
<legend>Totais</legend>
<div class="row">
<div class="col-2">
<strong>Total de visitas realizadas:</strong>
</div>
<div class="col-2">
<strong>Total de ausências:</strong>
</div>
<div class="col-2">
<strong>Total de recusas:</strong>
</div>
<div class="col-2">
<strong>Total de visitas registradas:</strong>
</div>
<div class="col-2">
<strong>Total de pacientes atendidos:</strong>
</div>
</div>
<div class="row">
<div class="col-2">
{{$data['totalizadores']['quantidade_visitas_realizadas']}}
</div>
<div class="col-2">
{{$data['totalizadores']['quantidade_ausencias']}}
</div>
<div class="col-2">
{{$data['totalizadores']['quantidade_recusas']}}
</div>
<div class="col-2">
{{$data['totalizadores']['quantidade_visitas_registradas']}}
</div>
<div class="col-2">
{{$data['totalizadores']['quantidade_pacientes_atendidos']}}
</div>
</div>
</fieldset>
@endsection

View File

@@ -0,0 +1,204 @@
@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;
}
.linha-filtro {
margin-bottom: 10px;
}
fieldset {
margin-top: 20px;
}
</style>
<fieldset>
<legend>Filtros</legend>
<div class="linha-filtro">
<div class="row">
<div class="col-5">
<strong>Unidade:</strong>
</div>
<div class="col-3">
<strong>Domicilio:</strong>
</div>
<div class="col-2">
<strong>Área / INE:</strong>
</div>
<div class="col-2">
<strong>Microárea:</strong>
</div>
</div>
<div class="row">
<div class="col-5">
{{ $unidade }}
</div>
<div class="col-3">
{{ $domicilio }}
</div>
<div class="col-2">
{{ $area }}
</div>
<div class="col-2">
{{ $microarea }}
</div>
</div>
</div>
</fieldset>
<table class="table table-relatorio">
<thead>
@if ($domicilio != 'Fora de área')
@php
$colspanMicroareas = count($colunas) - count(['unidade_nome', 'areas', 'pacientes_fora_area']);
if ($domicilio == 'Dentro de área') {
$colspanMicroareas++;
}
@endphp
<tr>
<th></th>
<th></th>
<th colspan="{{ $colspanMicroareas }}">Microárea(s)</th>
@if ($domicilio == 'Todos' && $microarea == 'Todos')
<th></th>
@endif
</tr>
@endif
<tr>
@foreach ($colunas as $coluna)
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($items['consulta'] as $item)
<tr>
@foreach ($colunas as $coluna)
{{-- Coluna de pacientes fora de área --}}
@if ($coluna['key'] == 'pacientes_fora_area')
<td> {{ $item[$coluna['key']]['total_fora_area'] ?? '0' }}</td>
{{-- Coluna de areas --}}
@elseif ($coluna['key'] == 'areas')
<td>
@foreach ($item['areas'] as $index => $itemArea)
@if ($index > 0 && $microarea == 'Todos')
<br />
@endif
{{-- Coluna de área quando tem area filtrada --}}
@if ($area == $itemArea['area_descricao'] && $microarea == 'Todos')
{{ $itemArea['area_descricao'] }}
@endif
{{-- Coluna de area quando tem microarea filtrada --}}
@if ($microarea != 'Todos')
@if (count($itemArea['microareas']) > 0)
@if ($index > 0)
<br />
@endif
@if ($area == $itemArea['area_descricao'])
{{ $itemArea['area_descricao'] }}
@elseif($area == 'Todos')
{{ $itemArea['area_descricao'] }}
@endif
@endif
@endif
{{-- Coluna de área por padrão --}}
@if ($area == 'Todos' && $microarea == 'Todos')
{{ $itemArea['area_descricao'] }}
@endif
@endforeach
</td>
{{-- Coluna de microareas --}}
@elseif ($coluna['key'] != 'unidade_nome')
<td>
@foreach ($item['areas'] as $index => $itemArea)
@if ($index > 0)
<br />
@endif
@if (
$coluna['key'] != 'total' &&
!$itemArea['microareas']->contains('microarea_descricao', $coluna['key']) &&
$microarea == 'Todos')
@if ($area == $itemArea['area_descricao'])
0
@elseif($area == 'Todos')
0
@endif
@endif
@foreach ($itemArea['microareas'] as $itemMicroarea)
@if ($area == $itemArea['area_descricao'] && $itemMicroarea['microarea_descricao'] == $coluna['key'])
{{ $itemMicroarea['microarea_total_pacientes'] }}
@elseif ($area === 'Todos' && $itemMicroarea['microarea_descricao'] == $coluna['key'] && $coluna['key'] !== 'total')
{{ $itemMicroarea['microarea_total_pacientes'] }}
@endif
@endforeach
{{-- Coluna de total --}}
@if ($coluna['key'] == 'total')
@if ($itemArea['area_descricao'] === $area)
{{ $itemArea['area_total_pacientes'] }}
@elseif ($area == 'Todos')
{{ $itemArea['area_total_pacientes'] }}
@endif
@endif
@endforeach
</td>
{{-- Demais colunas --}}
@else
<td>
{{ $item[$coluna['key']] ?? '-' }}
</td>
@endif
@endforeach
</tr>
@endforeach
</tbody>
</table>
<fieldset>
<legend>Totais</legend>
<div class="linha-filtro">
<div class="row">
<div class="col-3">
<strong>Unidade(s):</strong>
{{ $totalizadores['unidades'] }}
</div>
<div class="col-3">
<strong>Dentro de área:</strong>
{{ $totalizadores['dentro_area'] }}
</div>
<div class="col-3">
<strong>Fora de área:</strong>
{{ $totalizadores['fora_area'] }}
</div>
<div class="col-3">
<strong>Dentro + Fora de área:</strong>
{{ $totalizadores['dentro_area'] + $totalizadores['fora_area'] }}
</div>
</div>
</div>
</fieldset>
@endsection

View File

@@ -0,0 +1,143 @@
@extends('impressoes.layout1.content')
@section('conteudo')
<style>
.table-baixa > thead > tr > th { text-align: center; white-space: nowrap; }
.col-min { width: 1%; }
fieldset, .linha-filtro {
margin: 10px 0;
}
</style>
<fieldset>
<legend>Filtros</legend>
<div class="linha-filtro">
<div class="row">
<div class="col-2">
<strong>Competência:</strong> {{ $competencia }}
</div>
<div class="col-4">
<strong>Unidade:</strong> {{ $unidade }}
</div>
<div class="col-3">
<strong>Profissional:</strong> {{ $profissional }}
</div>
<div class="col-3">
<strong>Local de Atendimento:</strong> {{ $localAtendimento }}
</div>
</div>
</div>
<div class="linha-filtro">
<div class="row">
<div class="col-2">
<strong>Prontuário:</strong> {{ $prontuario }}
</div>
<div class="col-4">
<strong>Idade:</strong> {{ $idade }}
</div>
<div class="col-3">
<strong>Sexo:</strong> {{ $sexo }}
</div>
<div class="col-3">
<strong>Hipertenso:</strong> {{ $hipertenso }}
</div>
</div>
</div>
<div class="linha-filtro">
<div class="row">
<div class="col-2">
<strong>Condição avaliada:</strong> {{ $condicaoAvaliada }}
</div>
<div class="col-2">
<strong>Doença transmissível:</strong> {{ $doencaTransmissivel }}
</div>
<div class="col-2">
<strong>Rastreamento:</strong> {{ $rastreamento }}
</div>
<div class="col-3">
<strong>CIAP2:</strong> {{ $ciap2 }}
</div>
<div class="col-3">
<strong>CID10:</strong> {{ $cid }}
</div>
</div>
</div>
<div class="linha-filtro">
<div class="row">
<div class="col-2">
<strong>Diabético:</strong> {{ $diabetico }}
</div>
<div class="col-4">
<strong>Vacina em dia:</strong> {{ $vacinaEmDia }}
</div>
<div class="col-3">
<strong>Aleitamento materno:</strong> {{ $aleitamentoMaterno }}
</div>
@if ($sexo !== 'MASCULINO')
<div class="col-3">
<strong>Gestante:</strong> {{ $gestante }}
</div>
@else
<div class="col-3"></div>
@endif
</div>
</div>
</fieldset>
<fieldset>
<legend>Totais</legend>
<div class="linha-filtro">
<div class="row">
<div class="col-3">
<strong>Registro(s):</strong>
{{ $totalizadores['registros'] }}
</div>
<div class="col-3">
<strong>Unidade(s):</strong>
{{ $totalizadores['unidades'] }}
</div>
<div class="col-3">
<strong>Profissional(s):</strong>
{{ $totalizadores['profissionais'] }}
</div>
<div class="col-3">
<strong>Local(s) de atendimento:</strong>
{{ $totalizadores['locaisAtendimento'] }}
</div>
</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 ($items as $item)
<tr>
@foreach ($colunas as $coluna)
<td class="{{ $coluna['class'] }}">
@if ($coluna['key'] == 'condicao_avaliada')
{{ $item->condicaoAvaliada ?? '-' }}
@else
{{ $item->{$coluna['key']} ?? '-' }}
@endif
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,56 @@
@extends('impressoes.layout1.content')
<meta charset="UTF-8">
<table class="report-container">
<thead class="report-header">
<tr>
<th class="report-header-cell">
</th>
</tr>
</thead>
<tfoot class="report-footer">
<tr>
<td class="report-footer-cell">
</td>
</tr>
</tfoot>
<tbody class="report-content">
<tr>
<td class="report-content-cell">
Eu <strong>{{$paciente['nome']}}</strong>, portador do CPF nº <strong>{{$paciente['cpf']}}</strong>, gozando de plena consciência dos meus
atos, recuso esse cadastro, mesmo que isso facilite o acompanhamento a minha saúde e de meus familiares.
Estou ciente de que essa recusa não implicará no não atendimento na unidade de saúde.
</td>
</tr>
<tr>
<td class="text-center " style="vertical-align: bottom">
<div style="margin: 0 auto; margin-top:100px">
<div style="margin: 0 auto; width:250px; border-top: 1px solid #000">
<strong>Assinatura</strong>
</div>
</div>
</td>
</tr>
</tbody>
</td></tr>
</table>
<style>
body {font-family: Helvetica, arial, sans-serif;}
table {margin-bottom: 15px;}
p {margin:0; padding: 0;}
.circulo {height:15px; width:15px; border:1px solid #000;}
.background-white { background: #fff!important}
.report-content-cell { background: #fff!important; border: none!important}
tr {border:0}
</style>

View File

@@ -0,0 +1,106 @@
@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 !important; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-1">
<strong>Ano</strong>
<div>
{{ $ano }}
</div>
</div>
<div class="col-1">
<strong>Mês</strong>
<div>
{{ $mes }}
</div>
</div>
<div class="col-5">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
<div class="col-5">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Procedimento</strong>
<div>
{{ $procedimento }}
</div>
</div>
<div class="col-2">
<strong>Inconsistência</strong>
<div>
{{ $comInconsistencia }}
</div>
</div>
<div class="col-2">
<strong>Idade de</strong>
<div>
{{ $idadeDe }}
</div>
</div>
<div class="col-2">
<strong>Idade até</strong>
<div>
{{ $idadeAte }}
</div>
</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
<tr>
<th colspan="{{ $colunas->count() }}" style="text-align: center;">Total de procedimentos: {{ $totalizadores->quantidade }}</th>
</tr>
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,108 @@
@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 !important; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-1">
<strong>Ano</strong>
<div>
{{ $ano }}
</div>
</div>
<div class="col-1">
<strong>Mês</strong>
<div>
{{ $mes }}
</div>
</div>
<div class="col-5">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
<div class="col-5">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-4">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
<div class="col-5">
<strong>Procedimento</strong>
<div>
{{ $procedimento }}
</div>
</div>
<div class="col-3">
<strong>CID</strong>
<div>
{{ $cid }}
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<strong>Inconsistência</strong>
<div>
{{ $comInconsistencia }}
</div>
</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
<tr>
<th colspan="{{ $colunas->count() }}" style="text-align: center;">Total de procedimentos: {{ $totalizadores->quantidade }}</th>
</tr>
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,126 @@
@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 !important; }
</style>
<fieldset>
<legend>Filtros</legend>
<div class="row">
<div class="col-1">
<strong>Ano</strong>
<div>
{{ $ano }}
</div>
</div>
<div class="col-1">
<strong>Mês</strong>
<div>
{{ $mes }}
</div>
</div>
<div class="col-4">
<strong>Módulo de origem</strong>
<div>
{{ $origem }}
</div>
</div>
<div class="col-6">
<strong>Unidade</strong>
<div>
{{ $unidade }}
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Idade de</strong>
<div>
{{ $idadeDe }}
</div>
</div>
<div class="col-3">
<strong>Idade até</strong>
<div>
{{ $idadeAte }}
</div>
</div>
<div class="col-6">
<strong>CBO</strong>
<div>
{{ $ocupacao }}
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<strong>Profissional</strong>
<div>
{{ $usuario }}
</div>
</div>
<div class="col-6">
<strong>Procedimento</strong>
<div>
{{ $procedimento }}
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<strong>Status</strong>
<div>
{{ $status }}
</div>
</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
<tr>
<th colspan="{{ $colunas->count() }}" style="text-align: center;">Total de procedimentos: {{ $totalizadores->quantidade }}</th>
</tr>
</tbody>
</table>
@endsection

View File

@@ -0,0 +1,217 @@
@extends('impressoes.layout1.content')
<meta charset="UTF-8" />
<table class="table">
<thead>
<tr>
<th colspan="3">
<strong>IDENTIFICAÇÃO DO PACIENTE</strong>
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="{{ $paciente['cidadao']['nome_social'] ? 2 : 3 }}">
<strong>Nome:</strong> {{ $paciente['cidadao']['nome'] }}
</td>
@if ($paciente['cidadao']['nome_social'])
<td>
<strong>Nome social:</strong> {{ $paciente['cidadao']['nome_social'] }}
</td>
@endif
</tr>
<tr>
<td>
<strong>Cor/Raça:</strong> {{ $paciente['cidadao']['racaCor']['descricao'] }}
</td>
<td colspan="2">
<strong>Profissão/Ocupação:</strong> {{ $paciente['cadastroIndividual']['ocupacao']['nome'] ?? '' }}
</td>
</tr>
<tr>
<td>
<strong>Data de nascimento:</strong> {{ $paciente['cidadao']['data_nascimento'] }}
</td>
<td>
<strong>Idade:</strong> {{ $paciente['cidadao']['idadeFormatada'] }}
</td>
<td>
<strong>Sexo:</strong> {{ $paciente['cidadao']['sexo']['descricao'] }}
</td>
</tr>
<tr>
<td>
<strong>CPF:</strong> {{ $paciente['cidadao']['cpf'] ? \App\Utils\MaskUtil::getCpfMasked($paciente['cidadao']['cpf']) : '' }}
</td>
<td colspan="2">
<strong>CNS:</strong> {{ $paciente['cidadao']['cns'] ? \App\Utils\MaskUtil::getCnsMasked($paciente['cidadao']['cns']) : '' }}
</td>
</tr>
<tr>
<td>
<strong>RG:</strong> {{ $paciente['cidadao']['carteiraIdentidade'] && $paciente['cidadao']['carteiraIdentidade']['numero'] ? \App\Utils\MaskUtil::getRgMasked($paciente['cidadao']['carteiraIdentidade']['numero']) : '' }}
</td>
<td colspan="2">
<strong>Prontuário municipal:</strong> {{ $paciente['prontuario'] }}
</td>
</tr>
<tr>
<td colspan="3">
<strong>Nome da mãe:</strong> {{ $paciente['cidadao']['nome_mae'] }}
</td>
</tr>
<tr>
<td colspan="3">
<strong>Nome do pai:</strong> {{ $paciente['cidadao']['nome_pai'] }}
</td>
</tr>
<tr>
<td>
<strong>Telefone:</strong> {{ $paciente['cidadao']['telefonePrincipal'] && $paciente['cidadao']['telefonePrincipal']['numero'] ? \App\Utils\MaskUtil::getPhoneMasked($paciente['cidadao']['telefonePrincipal']['numero']) : '' }}
</td>
<td colspan="2">
<strong>E-mail:</strong> {{ $paciente['email'] }}
</td>
</tr>
<tr>
<td colspan="3">
<strong>Observações:</strong> {{ $paciente['observacao'] }}
</td>
</tr>
</tbody>
</table>
<br />
<table class="table">
<thead>
<tr>
<th colspan="2">
<strong>INFORMAÇÔES DE ENDEREÇO</strong>
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<strong>Endereço:</strong>
{{ $paciente['cidadao']['domicilio']['endereco']['logradouro']['nome'] ?? '' }},
{{ $paciente['cidadao']['domicilio']['endereco']['numero'] ?? '' }}
{{ $paciente['cidadao']['domicilio']['endereco']['complemento'] ? ' - ' . $paciente['cidadao']['domicilio']['endereco']['complemento'] : '' }}
</td>
</tr>
<tr>
<td colspan="2">
<strong>Bairro:</strong> {{ $paciente['cidadao']['domicilio']['endereco']['logradouro']['bairro']['nome'] ?? '' }}
</td>
</tr>
<tr>
<td>
<strong>Município/UF:</strong>
{{ $paciente['cidadao']['domicilio']['endereco']['logradouro']['municipio']['nome'] ?? '' }}/{{ $paciente['cidadao']['domicilio']['endereco']['logradouro']['municipio']['estado']['uf'] ?? '' }}
</td>
<td>
<strong>CEP:</strong> {{ $paciente['cidadao']['domicilio']['endereco']['logradouro']['cep'] ? \App\Utils\MaskUtil::getCepMasked($paciente['cidadao']['domicilio']['endereco']['logradouro']['cep']) : '' }}
</td>
</tr>
</tbody>
</table>
<br />
<table class="table">
<thead>
<tr>
<th colspan="2">
<strong>INFORMAÇÔES DA UNIDADE RESPONSÁVEL</strong>
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<strong>Unidade/Vínculo atual:</strong> {{ $paciente['unidade']['nome_fantasia'] }}
</td>
</tr>
<tr>
<td colspan="2">
<strong>Situação cadastral:</strong> {{ $paciente['bloqueado'] ? 'Bloqueado' : 'Ativo' }}
</td>
</tr>
<tr>
<td>
<strong>Profissinal responsável pelo cadastro:</strong> {{ $paciente['cadastroIndividual']['usuario']['cidadao']['nome'] ?? '' }}
</td>
<td>
<strong>Data da última atualização:</strong> {{ $paciente['cidadao']['updated_at'] ? \Carbon\Carbon::parse($paciente['cidadao']['updated_at'])->format('d/m/Y') : '' }}
</td>
</tr>
</tbody>
</table>
<br />
<table class="table">
<thead>
<tr>
<th colspan="2">
<strong>PROGRAMAS SOCIAIS</strong>
</th>
</tr>
</thead>
@php
$cadastroDomiciliar = $paciente['cidadao']['domicilio']['CadastroDomiciliar'] ?? [];
@endphp
<tbody>
<tr>
<td>
<strong>Bolsa família:</strong>
{{ !empty($cadastroDomiciliar['bolsa_familia']) ? 'Sim' : 'Não' }}
</td>
<td>
<strong>Vale gás:</strong>
{{ !empty($cadastroDomiciliar['vale_gas']) ? 'Sim' : 'Não' }}
</td>
</tr>
<tr>
<td>
<strong>Bolsa escola:</strong>
{{ !empty($cadastroDomiciliar['bolsa_escola']) ? 'Sim' : 'Não' }}
</td>
<td>
<strong>BPC:</strong>
{{ !empty($cadastroDomiciliar['bpc']) ? 'Sim' : 'Não' }}
</td>
</tr>
</tbody>
</table>

Some files were not shown because too many files have changed in this diff Show More