This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Administracao;
|
||||
|
||||
use App\Models\Administracao\Funcionalidade;
|
||||
use App\Models\Administracao\Modulo;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Services\Administracao\RelatorioAcessoFuncionalidadeService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAcessoFuncionalidade implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ACESSO À FUNCIONALIDADE';
|
||||
private const VIEW = 'exportacoes.administracao.relatorio-acesso-funcionalidade';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioAcessoFuncionalidadeService::index();
|
||||
|
||||
$usuario = Usuario::find(request()->usuario_id);
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$infraestrutura = Infraestrutura::find(request()->infraestrutura_id);
|
||||
$modulo = Modulo::find(request()->modulo_id);
|
||||
$funcionalidade = Funcionalidade::find(request()->funcionalidade_id);
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'data' => [
|
||||
'start' => request()->data['start'],
|
||||
'end' => request()->data['end'],
|
||||
],
|
||||
'hora' => [
|
||||
'start' => request()->hora['start'] ?? '-',
|
||||
'end' => request()->hora['end'] ?? '-',
|
||||
],
|
||||
'usuario' => $usuario->nome ?? 'Todos',
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todos',
|
||||
'modulo' => $modulo->nome ?? 'Todos',
|
||||
'funcionalidade' => $funcionalidade->nome ?? 'Todas',
|
||||
'dados' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
40
api/app/Exports/Administracao/RelatorioAcessoSistema.php
Normal file
40
api/app/Exports/Administracao/RelatorioAcessoSistema.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Administracao;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\Log\AcessoSistemaStatus;
|
||||
use App\Services\Administracao\RelatorioAcessoSistemaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAcessoSistema implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ACESSO AO SISTEMA';
|
||||
private const VIEW = 'exportacoes.administracao.relatorio-acesso-sistema';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioAcessoSistemaService::index();
|
||||
|
||||
$usuario = Usuario::find(request()->usuario_id);
|
||||
$status = AcessoSistemaStatus::find(request()->status_id);
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'data' => [
|
||||
'start' => request()->data['start'],
|
||||
'end' => request()->data['end'],
|
||||
],
|
||||
'hora' => [
|
||||
'start' => request()->hora['start'] ?? '-',
|
||||
'end' => request()->hora['end'] ?? '-',
|
||||
],
|
||||
'usuario' => $usuario->nome ?? 'Todos',
|
||||
'status' => $status->nome ?? 'Todas',
|
||||
'dados' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
25
api/app/Exports/Administracao/RelatorioPapelLotacao.php
Normal file
25
api/app/Exports/Administracao/RelatorioPapelLotacao.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Administracao;
|
||||
|
||||
use App\Services\Administracao\RelatorioPapelLotacaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioPapelLotacao implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE PAPEL POR LOTAÇÃO';
|
||||
private const VIEW = 'exportacoes.administracao.relatorio-papel-lotacao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioPapelLotacaoService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'data' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
25
api/app/Exports/Administracao/RelatorioPermissaoLotacao.php
Normal file
25
api/app/Exports/Administracao/RelatorioPermissaoLotacao.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Administracao;
|
||||
|
||||
use App\Services\Administracao\RelatorioPermissaoLotacaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioPermissaoLotacao implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE PERMISSÃO POR LOTAÇÃO';
|
||||
private const VIEW = 'exportacoes.administracao.relatorio-permissao-lotacao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioPermissaoLotacaoService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'data' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
25
api/app/Exports/Administracao/RelatorioPermissaoPapel.php
Normal file
25
api/app/Exports/Administracao/RelatorioPermissaoPapel.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Administracao;
|
||||
|
||||
use App\Services\Administracao\RelatorioPermissaoPapelService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioPermissaoPapel implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE PERMISSÃO POR PAPEL';
|
||||
private const VIEW = 'exportacoes.administracao.relatorio-permissao-papel';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioPermissaoPapelService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'data' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\ConsumoFinanceiroService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ConsumoFinanceiro implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE CONSUMO FINANCEIRO';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.consumo-financeiro';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = ConsumoFinanceiroService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/Entrada.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/Entrada.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\EntradaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Entrada implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ENTRADA';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.entrada';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = EntradaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/EstornoEntrada.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/EstornoEntrada.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\EstornoEntradaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class EstornoEntrada implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ESTORNO DE ENTRADAS';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.estorno-entrada';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = EstornoEntradaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/EstornoSaida.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/EstornoSaida.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\EstornoSaidaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class EstornoSaida implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ESTORNO DE SAÍDAS';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.estorno-saida';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = EstornoSaidaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Models\Almoxarifado\EntradaTipo;
|
||||
use App\Models\Almoxarifado\SaidaTipo;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Setor;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\Material\Material;
|
||||
use App\Models\Cadastro\OrigemProgramatica;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Services\Almoxarifado\Relatorios\MovimentacaoGeralService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class MovimentacaoGeral implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE MOVIMENTAÇÃO GERAL';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.movimentacao-geral';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = MovimentacaoGeralService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'periodo' => [
|
||||
'start' => request()->periodo['start'],
|
||||
'end' => request()->periodo['end'],
|
||||
],
|
||||
'movimentacao_tipo' => request()->movimentacao_tipo === 'entrada' ? 'ENTRADA' : 'SAÍDA',
|
||||
'movimentacao_subtipo' => (request()->movimentacao_tipo === 'entrada' ? EntradaTipo::find(request()->movimentacao_subtipo_id)->nome ?? null : SaidaTipo::find(request()->movimentacao_subtipo_id)->nome ?? null) ?? 'Todos',
|
||||
'unidade' => Unidade::find(request()->unidade_id)->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => Infraestrutura::find(request()->infraestrutura_id)->nome ?? 'Todos',
|
||||
'setor' => Setor::find(request()->setor_id)->nome ?? 'Todos',
|
||||
'usuario' => Usuario::find(request()->usuario_id)->nome ?? 'Todos',
|
||||
'origem_programatica' => OrigemProgramatica::find(request()->origem_programatica_id)->nome ?? 'Todas',
|
||||
'material' => Material::find(request()->material_id)->descricao_completa ?? 'Todos',
|
||||
'colunas' => collect(request()->selected_cols),
|
||||
'itens' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/PosicaoEstoque.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/PosicaoEstoque.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\PosicaoEstoqueService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class PosicaoEstoque implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE POSIÇÃO DE ESTOQUE';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.posicao-estoque';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = PosicaoEstoqueService::getPrintData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/Requisicao.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/Requisicao.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\RequisicaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Requisicao implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE REQUISIÇÕES';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.requisicao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RequisicaoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/Saida.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/Saida.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\SaidaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Saida implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE SAÍDAS';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.saida';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = SaidaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Almoxarifado/Relatorios/ValidadeMaterial.php
Normal file
21
api/app/Exports/Almoxarifado/Relatorios/ValidadeMaterial.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Services\Almoxarifado\Relatorios\ValidadeMaterialService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ValidadeMaterial implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE VALIDADE DE MATERIAL';
|
||||
private const VIEW = 'exportacoes.almoxarifado.relatorios.validade-material';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = ValidadeMaterialService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
44
api/app/Exports/Ambulatorio/RelatorioConsultaFinalizada.php
Normal file
44
api/app/Exports/Ambulatorio/RelatorioConsultaFinalizada.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Ambulatorio;
|
||||
|
||||
use App\Models\Ambulatorio\AgendamentoStatus;
|
||||
use App\Models\Cadastro\Especialidade;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Services\Ambulatorio\RelatorioConsultaFinalizadaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioConsultaFinalizada implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE CONSULTAS FINALIZADAS';
|
||||
private const VIEW = 'exportacoes.ambulatorio.relatorio-consulta-finalizada';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioConsultaFinalizadaService::index();
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$infraestrutura = Infraestrutura::find(request()->infraestrutura_id);
|
||||
$especialidade = Especialidade::find(request()->especialidade_id);
|
||||
$usuario = Usuario::find(request()->usuario_id);
|
||||
$status = AgendamentoStatus::find(request()->status_id);
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'periodo' => [
|
||||
'inicio' => request()->periodo['start'],
|
||||
'fim' => request()->periodo['end'],
|
||||
],
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todas',
|
||||
'especialidade' => $especialidade->nome ?? 'Todas',
|
||||
'usuario' => $usuario->nome ?? 'Todos',
|
||||
'status' => $status->nome ?? 'Todos',
|
||||
'itens' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
53
api/app/Exports/Ambulatorio/RelatorioEstatisticoConsulta.php
Normal file
53
api/app/Exports/Ambulatorio/RelatorioEstatisticoConsulta.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Ambulatorio;
|
||||
|
||||
use App\Enums\Ambulatorio\AgendamentoTipo as AmbulatorioAgendamentoTipo;
|
||||
use App\Models\Ambulatorio\AgendamentoStatus;
|
||||
use App\Models\Ambulatorio\AgendamentoTipo;
|
||||
use App\Models\Cadastro\Especialidade;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\Intranet\Municipio;
|
||||
use App\Services\Ambulatorio\RelatorioEstatisticoConsultaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioEstatisticoConsulta implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO ESTATÍSTICO DE CONSULTA';
|
||||
private const VIEW = 'exportacoes.ambulatorio.relatorio-estatistico-consulta';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioEstatisticoConsultaService::index();
|
||||
$demandaTipo = request()->demanda_tipo === 'agendada' ? 'AGENDADA' : 'ESPONTÂNEA';
|
||||
$agendamentoTipo = AgendamentoTipo::find(request()->agendamento_tipo_id) ?? AgendamentoTipo::find(AmbulatorioAgendamentoTipo::CONSULTA);
|
||||
$municipio = Municipio::find(request()->municipio_id) ?? 'Todos';
|
||||
$unidade = Unidade::find(request()->unidade_id) ?? 'Todas';
|
||||
$infraestrutura = Infraestrutura::find(request()->infraestrutura_id) ?? 'Todos';
|
||||
$especialidade = Especialidade::find(request()->especialidade_id) ?? 'Todas';
|
||||
$usuario = Usuario::find(request()->usuario_id) ?? 'Todos';
|
||||
$status = request()->demanda_tipo === 'agendada' ? AgendamentoStatus::find(request()->agendamento_status_id) : 'Todos';
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'periodo' => [
|
||||
'inicio' => request()->periodo['start'],
|
||||
'fim' => request()->periodo['end'],
|
||||
],
|
||||
'demanda_tipo' => $demandaTipo,
|
||||
'agendamento_tipo' => $agendamentoTipo->nome ?? 'Todos',
|
||||
'municipio' => $municipio->nome ?? 'Todos',
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todas',
|
||||
'especialidade' => $especialidade->nome ?? 'Todas',
|
||||
'usuario' => $usuario->nome ?? 'Todos',
|
||||
'data' => $itens,
|
||||
'status' => $status,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
17
api/app/Exports/Ambulatorio/RelatorioProcedimento.php
Normal file
17
api/app/Exports/Ambulatorio/RelatorioProcedimento.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Ambulatorio;
|
||||
|
||||
use App\Http\Controllers\Impressao\Ambulatorio\RelatorioProcedimentoController;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioProcedimento implements FromView
|
||||
{
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioProcedimentoController::getTemplate();
|
||||
|
||||
return view('exportacoes.ambulatorio.relatorio-procedimento', $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Ambulatorio;
|
||||
|
||||
use App\Models\Cadastro\Especialidade;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Sigtap\Ocupacao;
|
||||
use App\Services\Ambulatorio\RelatorioQuantitativoAtendimentoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioQuantitativoAtendimento implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO QUANTITATIVO DE ATENDIMENTO';
|
||||
private const VIEW = 'exportacoes.ambulatorio.relatorio-quantitativo-atendimento';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$resultado = RelatorioQuantitativoAtendimentoService::index();
|
||||
$itens = $resultado['infraestruturas'];
|
||||
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$infraestrutura = Infraestrutura::find(request()->infraestrutura_id);
|
||||
$ocupacao = Ocupacao::find(request()->ocupacao_id);
|
||||
$especialidade = Especialidade::find(request()->especialidade_id);
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'ano' => request()->periodo['ano'],
|
||||
'mes' => RelatorioQuantitativoAtendimentoService::getMeses()
|
||||
->where('value', request()->periodo['mes'])
|
||||
->first()['text'],
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todos',
|
||||
'ocupacao' => $ocupacao ? "{$ocupacao->codigo} - {$ocupacao->nome}" : 'Todas',
|
||||
'especialidade' => $especialidade->nome ?? 'Todas',
|
||||
'colunas' => collect(request()->columns),
|
||||
'colunasTotalizadores' => collect(request()->columns)
|
||||
->reject(fn ($c) => $c['key'] === 'usuario_nome')
|
||||
->values(),
|
||||
'itens' => $itens,
|
||||
'totalizadores' => $resultado['totalizadores'],
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Ambulatorio;
|
||||
|
||||
use App\Services\Ambulatorio\RelatorioQuantitativoProducaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioQuantitativoProducao implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO QUANTITATIVO DE PRODUÇÃO';
|
||||
private const VIEW = 'exportacoes.ambulatorio.relatorio-quantitativo-producao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioQuantitativoProducaoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
22
api/app/Exports/Ambulatorio/RelatorioRastreioFerida.php
Normal file
22
api/app/Exports/Ambulatorio/RelatorioRastreioFerida.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Ambulatorio;
|
||||
|
||||
use App\Services\Ambulatorio\RelatorioRastreioFeridaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioRastreioFerida implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO RASTREIO DE FERIDA';
|
||||
private const VIEW = 'exportacoes.ambulatorio.relatorio-rastreio-ferida';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
|
||||
$data = RelatorioRastreioFeridaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
61
api/app/Exports/Apac/RelatorioInconsistencia.php
Normal file
61
api/app/Exports/Apac/RelatorioInconsistencia.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Apac;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\Sigtap\Cid;
|
||||
use App\Models\Sigtap\Competencia;
|
||||
use App\Models\Sigtap\Ocupacao;
|
||||
use App\Models\Sigtap\Procedimento;
|
||||
use App\Services\Apac\RelatorioInconsistenciaService;
|
||||
use App\Utils\MaskUtil;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioInconsistencia implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE INCONSISTÊNCIA';
|
||||
private const VIEW = 'exportacoes.apac.relatorio-inconsistencia';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$competencia = Competencia::find(request()->competencia_id);
|
||||
|
||||
$tipoInconsistencia = request()->tipo_inconsistencia === 'procedimento-principal'
|
||||
? 'Procedimento principal' : 'Procedimento secundário';
|
||||
|
||||
$unidadeExecutante = request()->unidade_executante_id ? Unidade::findOrFail(request()->unidade_executante_id) : null;
|
||||
$usuarioExecutante = request()->usuario_executante_id ? Usuario::findOrFail(request()->usuario_executante_id) : null;
|
||||
$ocupacao = request()->ocupacao_id ? Ocupacao::findOrFail(request()->ocupacao_id) : null;
|
||||
$procedimento = request()->procedimento_id ? Procedimento::findOrFail(request()->procedimento_id) : null;
|
||||
|
||||
$cid = null;
|
||||
|
||||
if (count(request()->cids) === 1) {
|
||||
|
||||
$cid = Cid::findOrFail(request()->cids[0]);
|
||||
$cid = MaskUtil::getCidMasked($cid->codigo) . " - {$cid->nome}";
|
||||
}
|
||||
else {
|
||||
|
||||
$cid = count(request()->cids) . ' cids selecionados';
|
||||
}
|
||||
|
||||
$itens = RelatorioInconsistenciaService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'competencia' => $competencia->valor,
|
||||
'tipo_inconsistencia' => $tipoInconsistencia,
|
||||
'unidade_executante' => $unidadeExecutante->nome_fantasia ?? 'Todas',
|
||||
'usuario_executante' => $usuarioExecutante->cidadao->nome ?? 'Todos',
|
||||
'ocupacao' => $ocupacao ? "{$ocupacao->codigo} - {$ocupacao->nome}" : 'Todas',
|
||||
'procedimento' => $procedimento ? MaskUtil::getProcedimentoMasked($procedimento->codigo) . " - {$procedimento->nome}" : 'Todos',
|
||||
'cid' => $cid,
|
||||
'data' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Models\AtencaoBasica\Parametrizacao\Equipe;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Services\AtencaoBasica\RelatorioAcessoCuidadoProgramadoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAcessoCuidadoProgramado implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO C1 - ACESSO AO CUIDADO PROGRAMADO';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-acesso-cuidado-programado';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$infraestrutura = Infraestrutura::find(request()->infraestrutura_id);
|
||||
$equipe = Equipe::find(request()->equipe_id);
|
||||
$usuario = Usuario::find(request()->usuario_id);
|
||||
$data = RelatorioAcessoCuidadoProgramadoService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'inicio' => request()->periodo['start'],
|
||||
'fim' => request()->periodo['end'],
|
||||
'unidade_id' => request()->unidade_id,
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todos',
|
||||
'equipe_id' => request()->equipe_id,
|
||||
'equipe' => $equipe->nome ?? 'Todas',
|
||||
'usuario_id' => request()->usuario_id,
|
||||
'usuario' => $usuario->nome ?? 'Todos',
|
||||
'itens' => $data['itens'],
|
||||
'totalizadores' => $data['totalizadores'],
|
||||
'tipo_visualizacao' => request()->tipo_visualizacao,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\ModalidadeAtencaoDomiciliar;
|
||||
use App\Models\AtencaoBasica\Parametrizacao\Equipe;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\Geral\Turno;
|
||||
use App\Models\Sigtap\Ocupacao;
|
||||
use App\Services\AtencaoBasica\RelatorioAtendimentoDomiciliarService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAtendimentoDomiciliar implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ATENDIMENTO DOMICILIAR';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-atendimento-domiciliar';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$infraestrutura = Infraestrutura::find(request()->infraestrutura_id);
|
||||
$usuario = Usuario::find(request()->usuario_id);
|
||||
$turno = Turno::find(request()->turno_id);
|
||||
$ocupacao = Ocupacao::find(request()->ocupacao_id);
|
||||
$equipe = Equipe::find(request()->equipe_id);
|
||||
$modalidade = ModalidadeAtencaoDomiciliar::find(request()->modalidade_id);
|
||||
$itens = RelatorioAtendimentoDomiciliarService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'inicio' => request()->periodo['start'],
|
||||
'fim' => request()->periodo['end'],
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todos',
|
||||
'usuario' => $usuario->nome ?? 'Todos',
|
||||
'turno' => $turno->descricao ?? 'Todos',
|
||||
'ocupacao' => $ocupacao->nome ?? 'Todos',
|
||||
'equipe' => $equipe ? ('INE: ' . $equipe->area->numero_ine) : 'Todas',
|
||||
'modalidade' => $modalidade->descricao ?? 'Todas',
|
||||
'itens' => $itens,
|
||||
'colunas' => collect(request()->columns),
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
37
api/app/Exports/AtencaoBasica/RelatorioAtividadeColetiva.php
Normal file
37
api/app/Exports/AtencaoBasica/RelatorioAtividadeColetiva.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioAtividadeColetivaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAtividadeColetiva implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ATIVIDADE COLETIVA';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-atividade-coletiva';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioAtividadeColetivaService::list();
|
||||
|
||||
$itens = $data->itens;
|
||||
|
||||
if (request()->sort_by) {
|
||||
$sortBy = request()->sort_by;
|
||||
$sortDesc = request()->sort_desc === 'true';
|
||||
|
||||
$itens = $sortDesc
|
||||
? $itens->sortByDesc(fn ($item) => $item->{$sortBy})->values()
|
||||
: $itens->sortBy(fn ($item) => $item->{$sortBy})->values();
|
||||
}
|
||||
|
||||
return view(self::VIEW, [
|
||||
'title' => self::TITLE,
|
||||
'itens' => $itens,
|
||||
'totalizadores' => $data->totalizadores,
|
||||
'colunas' => request()->get('colunas', []),
|
||||
'filtros' => request()->get('filtros', []),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Enums\Cadastro\SujeitoAtencao\Sexo;
|
||||
use App\Models\AtencaoBasica\Parametrizacao\Equipe;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Services\AtencaoBasica\RelatorioCuidadoDesenvolvimentoInfantilService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioCuidadoDesenvolvimentoInfantil implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE CUIDADO E DESENVOLVIMENTO INFANTIL';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-cuidado-desenvolvimento-infantil';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$resultado = RelatorioCuidadoDesenvolvimentoInfantilService::index(request());
|
||||
|
||||
$sortByEquipe = request()->input('sort_by_equipe', 'unidadeNomeFantasia');
|
||||
$sortDescEquipe = (bool) request()->input('sort_desc_equipe', false);
|
||||
$sortByBuscaAtiva = request()->input('sort_by_busca_ativa', 'unidadeNomeFantasia');
|
||||
$sortDescBuscaAtiva = (bool) request()->input('sort_desc_busca_ativa', false);
|
||||
|
||||
$resultadoPorEquipe = $sortDescEquipe
|
||||
? collect($resultado['resultadoPorEquipe'])->sortByDesc($sortByEquipe)->values()->toArray()
|
||||
: collect($resultado['resultadoPorEquipe'])->sortBy($sortByEquipe)->values()->toArray();
|
||||
|
||||
$buscaAtivaDados = $sortDescBuscaAtiva
|
||||
? collect($resultado['buscaAtiva'])->sortByDesc($sortByBuscaAtiva)->values()->toArray()
|
||||
: collect($resultado['buscaAtiva'])->sortBy($sortByBuscaAtiva)->values()->toArray();
|
||||
|
||||
$unidade = Unidade::find(request()->input('unidade_id'));
|
||||
$infraestrutura = Infraestrutura::find(request()->input('infraestrutura_id'));
|
||||
$equipe = Equipe::find(request()->input('equipe_id'));
|
||||
$pacienteId = request()->input('paciente_id');
|
||||
$paciente = $pacienteId ? Paciente::with('cidadao')->find($pacienteId) : null;
|
||||
|
||||
$sexoMap = [
|
||||
Sexo::MASCULINO => 'Masculino',
|
||||
Sexo::FEMININO => 'Feminino',
|
||||
];
|
||||
|
||||
$faixaEtaria = request()->input('faixa_etaria', []);
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'inicio' => request()->input('periodo.start'),
|
||||
'fim' => request()->input('periodo.end'),
|
||||
'quadrimestre' => request()->input('quadrimestre'),
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todos',
|
||||
'equipe' => $equipe->nome ?? 'Todas',
|
||||
'sexo' => $sexoMap[request()->input('sexo_id')] ?? 'Todos',
|
||||
'paciente' => optional(optional(optional($paciente)->first())->cidadao)->nome ?? 'Todos',
|
||||
'buscaAtiva' => (bool) request()->input('busca_ativa'),
|
||||
'faixaEtariaInicial' => $faixaEtaria['inicial'] ?? [],
|
||||
'faixaEtariaFinal' => $faixaEtaria['final'] ?? [],
|
||||
'totalizadores' => $resultado['totalizadores'],
|
||||
'resultadoPorEquipe' => $resultadoPorEquipe,
|
||||
'buscaAtivaDados' => $buscaAtivaDados,
|
||||
'boasPraticasSelecionadas' => $resultado['boasPraticasSelecionadas'],
|
||||
'selectedColsBuscaAtiva' => request()->input('selected_cols_busca_ativa', ['pacienteDataNascimento']),
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioCuidadoGestacaoPuerperioService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioCuidadoGestacaoPuerperio implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO C3 - CUIDADO NA GESTAÇÃO E PUERPÉRIO';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-cuidado-gestacao-puerperio';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioCuidadoGestacaoPuerperioService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioCuidadoMulherPrevencaoCancerService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioCuidadoMulherPrevencaoCancer implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO C7 - CUIDADO DA MULHER NA PREVENÇÃO DO CÂNCER';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-cuidado-mulher-prevencao-cancer';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioCuidadoMulherPrevencaoCancerService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Models\AtencaoBasica\Parametrizacao\Equipe;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Sexo;
|
||||
use App\Services\AtencaoBasica\RelatorioCuidadoPessoaComDiabeteService;
|
||||
use App\Utils\DataUtil;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioCuidadoPessoaComDiabete implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO C4 - CUIDADO DA PESSOA COM DIABETES';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-cuidado-pessoa-com-diabete';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$equipe = Equipe::find(request()->equipe_id);
|
||||
$sexo = Sexo::find(request()->sexo_id);
|
||||
$paciente = Paciente::find(request()->paciente_id);
|
||||
$itens = RelatorioCuidadoPessoaComDiabeteService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'periodo' => [
|
||||
'inicio' => request()->periodo['start'],
|
||||
'fim' => request()->periodo['end'],
|
||||
],
|
||||
'ano' => request()->ano ?? null,
|
||||
'quadrimestre' => self::getQuadrimestre(request()->quadrimestre) ?? null,
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'equipe' => $equipe->nome ?? 'Todas',
|
||||
'boas_praticas' => request()->boas_praticas ?? [],
|
||||
'sexo' => $sexo->descricao ?? 'Todos',
|
||||
'idade_anos_minimo' => request()->idade_anos_minimo ?? '-',
|
||||
'idade_anos_maximo' => request()->idade_anos_maximo ?? '-',
|
||||
'paciente' => $paciente->nome ?? 'Todos',
|
||||
'busca_ativa' => DataUtil::getBooleanValueFromStringBoolean(request()->busca_ativa) ?? false,
|
||||
'fora_area' => DataUtil::getBooleanValueFromStringBoolean(request()->fora_area) ?? false,
|
||||
'itens' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
|
||||
private static function getQuadrimestre($value)
|
||||
{
|
||||
switch ($value) {
|
||||
case 1:
|
||||
return '1º Janeiro a Abril';
|
||||
case 2:
|
||||
return '2º Maio a Agosto';
|
||||
case 3:
|
||||
return '3º Setembro a Dezembro';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioCuidadoPessoaHipertensaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioCuidadoPessoaHipertensao implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO C5 - CUIDADO DA PESSOA COM HIPERTENSÃO';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-cuidado-pessoa-hipertensao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioCuidadoPessoaHipertensaoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioCuidadoPessoaIdosaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioCuidadoPessoaIdosa implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO C6 - CUIDADO DA PESSOA IDOSA';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-cuidado-pessoa-idosa';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioCuidadoPessoaIdosaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/AtencaoBasica/RelatorioInconsistencia.php
Normal file
21
api/app/Exports/AtencaoBasica/RelatorioInconsistencia.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioInconsistencia\RelatorioInconsistenciaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioInconsistencia implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE INCONSISTÊNCIA';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-inconsistencia';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioInconsistenciaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/AtencaoBasica/RelatorioIndicadorSad.php
Normal file
21
api/app/Exports/AtencaoBasica/RelatorioIndicadorSad.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioIndicadorSadService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioIndicadorSad implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE INDICADORES SAD';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-indicador-sad';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioIndicadorSadService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
54
api/app/Exports/AtencaoBasica/RelatorioVisitaDomiciliar.php
Normal file
54
api/app/Exports/AtencaoBasica/RelatorioVisitaDomiciliar.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica;
|
||||
|
||||
use App\Models\AtencaoBasica\Parametrizacao\Area;
|
||||
use App\Models\AtencaoBasica\Parametrizacao\Microarea;
|
||||
use App\Models\AtencaoBasica\VisitaDomiciliar\Desfecho;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\Localizacao\Domicilio;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Services\AtencaoBasica\RelatorioVisitaDomiciliarService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioVisitaDomiciliar implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE VISITA DOMICILIAR';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorio-visita-domiciliar';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$infraestrutura = Infraestrutura::find(request()->infraestrutura_id);
|
||||
$area = Area::find(request()->area_id);
|
||||
$midroarea = Microarea::find(request()->microarea_id);
|
||||
$usuario = Usuario::find(request()->usuario_id);
|
||||
$paciente = Paciente::find(request()->paciente_id);
|
||||
$domicilio = Domicilio::find(request()->domicilio_id);
|
||||
$desfecho = Desfecho::find(request()->desfecho_id);
|
||||
$itens = RelatorioVisitaDomiciliarService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'periodo' => [
|
||||
'inicio' => request()->periodo['start'],
|
||||
'fim' => request()->periodo['end'],
|
||||
],
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todas',
|
||||
'area' => $area->descricao ?? 'Todas',
|
||||
'microarea' => $midroarea->descricao ?? 'Todas',
|
||||
'usuario' => $usuario->cidadao->nome ?? 'Todos',
|
||||
'paciente' => $paciente->cidadao->nome ?? '-',
|
||||
'domicilio' => $domicilio->endereco->completo ?? 'Todos',
|
||||
'endereco_numero' => request()->endereco_numero ?? '-',
|
||||
'desfecho' => $desfecho->descricao ?? 'Todos',
|
||||
'data' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica\Relatorios;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioAtendimentoOdontologico\RelatorioAtendimentoOdontologicoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAtendimentoOdontologico implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ATENDIMENTOS ODONTOLÓGICOS';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorios.relatorio-atendimento-odontologico';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioAtendimentoOdontologicoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica\Relatorios;
|
||||
|
||||
use App\Services\AtencaoBasica\Relatorios\RelatorioCadastroConsistenteService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioCadastroConsistente implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE CADASTROS CONSISTENTES';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorios.relatorio-cadastro-consistente';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioCadastroConsistenteService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica\Relatorios;
|
||||
|
||||
use App\Services\AtencaoBasica\Relatorios\RelatorioCadastroConsistenteService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioCadastroConsistentePaciente implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE CADASTROS CONSISTENTES - LISTA DE PACIENTES';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorios.relatorio-cadastro-consistente-paciente';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioCadastroConsistenteService::getPrintExportDataPacientes();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica\Relatorios;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioEstatisticoAtendimentoService;
|
||||
use App\Utils\MesesAnoUtil;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioEstatisticoAtendimento implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO ESTATISTICO DE ATENDIMENTO';
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorios.relatorio-estatistico-atendimento';
|
||||
|
||||
|
||||
public static function getTemplate()
|
||||
{
|
||||
$data = RelatorioEstatisticoAtendimentoService::search();
|
||||
$data['filtros'] = request()->all();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = self::getTemplate();
|
||||
$filtros = $data['filtros'];
|
||||
$registros = $data['registros'];
|
||||
|
||||
$mesCompetencia = MesesAnoUtil::getNomeMes($filtros['competencia']['mes']);
|
||||
|
||||
$competencia = $mesCompetencia . '/' . $filtros['competencia']['ano'];
|
||||
$unidade = isset($filtros['unidade']) ? $registros[0]->unidade : 'Todas';
|
||||
$profissional = isset($filtros['profissional']) ? $registros[0]->profissional : 'Todos';
|
||||
$localAtendimento = isset($filtros['local_atendimento']) ? $registros[0]->local_atendimento : 'Todos';
|
||||
$prontuario = isset($filtros['prontuario']) ? $registros[0]->prontuario : 'Todos';
|
||||
$idadeMinima = (isset($filtros['idade_minima']) ? $filtros['idade_minima'] : 0) . ' anos';
|
||||
$idadeMaxima = isset($filtros['idade_maxima']) ? $filtros['idade_maxima'] . ' anos' : 'Sem limite';
|
||||
$idade = "$idadeMinima - $idadeMaxima";
|
||||
$sexo = isset($filtros['sexo']) ? $registros[0]->sexo : 'Ambos';
|
||||
$hipertenso = isset($filtros['hipertenso']) ? $registros[0]->hipertenso : 'Todos';
|
||||
$condicaoAvaliada = isset($filtros['condicao_avaliada']) ? $filtros['condicao_avaliada']['descricao'] : 'Todos';
|
||||
$doencaTransmissivel = isset($filtros['doenca_transmissivel']) ? $filtros['doenca_transmissivel']['descricao'] : 'Todos';
|
||||
$rastreamento = isset($filtros['rastreamento']) ? $filtros['rastreamento']['descricao'] : 'Todos';
|
||||
$ciap2 = isset($filtros['ciap2']) ? $filtros['ciap2']['descricao'] : 'Todos';
|
||||
$cid = isset($filtros['cid']) ? $filtros['cid']['nome'] : 'Todos';
|
||||
$gestante = isset($filtros['gestante']) ? $registros[0]->gestante : 'Todos';
|
||||
$diabetico = isset($filtros['diabetico']) ? $registros[0]->diabetico : 'Todos';
|
||||
$vacinaEmDia = isset($filtros['vacina']) ? $registros[0]->vacina : 'Todos';
|
||||
$aleitamentoMaterno = isset($filtros['aleitamento_materno']) ? ($registros[0]->aleitamento_materno ?? '-') : 'Todos';
|
||||
|
||||
$colunas = collect(request()->selected_columns);
|
||||
|
||||
return view(self::VIEW, [
|
||||
'title' => $data['title'],
|
||||
'colunas' => $colunas,
|
||||
'items' => $registros,
|
||||
'competencia' => $competencia,
|
||||
'unidade' => $unidade,
|
||||
'profissional' => $profissional,
|
||||
'localAtendimento' => $localAtendimento,
|
||||
'prontuario' => $prontuario,
|
||||
'idade' => $idade,
|
||||
'sexo' => $sexo,
|
||||
'hipertenso' => $hipertenso,
|
||||
'condicaoAvaliada' => $condicaoAvaliada,
|
||||
'doencaTransmissivel' => $doencaTransmissivel,
|
||||
'rastreamento' => $rastreamento,
|
||||
'ciap2' => $ciap2,
|
||||
'cid' => $cid,
|
||||
'gestante' => $gestante,
|
||||
'diabetico' => $diabetico,
|
||||
'vacinaEmDia' => $vacinaEmDia,
|
||||
'aleitamentoMaterno' => $aleitamentoMaterno,
|
||||
'totalizadores' => $data['totalizadores'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\AtencaoBasica\Relatorios;
|
||||
|
||||
use App\Services\AtencaoBasica\RelatorioEstatisticoPacienteCadastradoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioEstatisticoPacienteCadastrado implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.atencao-basica.relatorios.relatorio-estatistico-paciente-cadastrado';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'relatorio' => RelatorioEstatisticoPacienteCadastradoService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Bpa\Relatorios;
|
||||
|
||||
use App\Services\Bpa\RelatorioBpaConsolidadoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportRelatorioBpaConsolidado implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE BPA CONSOLIDADO';
|
||||
private const VIEW = 'exportacoes.bpa.relatorios.export-relatorio-bpa-consolidado';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioBpaConsolidadoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Bpa\Relatorios;
|
||||
|
||||
use App\Services\Bpa\RelatorioBpaIndividualizadoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportRelatorioBpaIndividualizado implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE BPA INDIVIDUALIZADO';
|
||||
private const VIEW = 'exportacoes.bpa.relatorios.export-relatorio-bpa-individualizado';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioBpaIndividualizadoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Bpa\Relatorios;
|
||||
|
||||
use App\Services\Bpa\ExportRelatorioInconsistenciaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportRelatorioInconsistencia implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.bpa.relatorios.export-relatorio-inconsistencia';
|
||||
private const TITLE = 'RELATÓRIO DE INCONSISTÊNCIAS';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = ExportRelatorioInconsistenciaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Bpa\Relatorios;
|
||||
|
||||
use App\Services\Bpa\RelatorioQuantitativoProducaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportRelatorioQuantitativoProducao implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO QUANTITATIVO DE PRODUÇÃO';
|
||||
private const VIEW = 'exportacoes.bpa.relatorios.export-relatorio-quantitativo-producao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioQuantitativoProducaoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Cadastro/ExportRelatorioPacienteBairro.php
Normal file
21
api/app/Exports/Cadastro/ExportRelatorioPacienteBairro.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Cadastro;
|
||||
|
||||
use App\Services\Cadastro\RelatorioPacienteBairroService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportRelatorioPacienteBairro implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE PACIENTE POR BAIRRO';
|
||||
private const VIEW = 'exportacoes.cadastro.relatorio-paciente-bairro';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioPacienteBairroService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Cadastro/ExportRelatorioUsuario.php
Normal file
21
api/app/Exports/Cadastro/ExportRelatorioUsuario.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Cadastro;
|
||||
|
||||
use App\Services\Cadastro\RelatorioUsuarioService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportRelatorioUsuario implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE USUÁRIOS';
|
||||
private const VIEW = 'exportacoes.cadastro.relatorio-usuario';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioUsuarioService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
74
api/app/Exports/Cadastro/RelatorioMaterial.php
Normal file
74
api/app/Exports/Cadastro/RelatorioMaterial.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Cadastro;
|
||||
|
||||
use App\Models\Cadastro\Grupo\Grupo;
|
||||
use App\Models\Cadastro\Material\LivroRegistro;
|
||||
use App\Models\Cadastro\Material\LivroRegistroTipo;
|
||||
use App\Models\Cadastro\Material\Material;
|
||||
use App\Models\Cadastro\Medicamento\FormaFarmaceutica;
|
||||
use App\Models\Cadastro\Medicamento\ReceitaTipo;
|
||||
use App\Models\Cadastro\Subgrupo\Subgrupo;
|
||||
use App\Services\Cadastro\RelatorioMaterialService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioMaterial implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE MATERIAIS';
|
||||
private const VIEW = 'exportacoes.cadastro.relatorio-material';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$grupo = Grupo::find(request()->grupo_id);
|
||||
$subgrupo = Subgrupo::find(request()->subgrupo_id);
|
||||
$receitaTipo = ReceitaTipo::find(request()->receita_tipo_id);
|
||||
$livro = LivroRegistro::find(request()->livro_registro_id);
|
||||
$livroTipo = LivroRegistroTipo::find(request()->livro_registro_tipo_id);
|
||||
$formaFarmaceutica = FormaFarmaceutica::find(request()->forma_farmaceutica_id);
|
||||
$programasAcoes = collect();
|
||||
$material = Material::find(request()->material_id);
|
||||
|
||||
if (is_array(request()->programas_acoes)) {
|
||||
if (in_array('is_alto_custo', request()->programas_acoes)) {
|
||||
$programasAcoes->push('Alto custo');
|
||||
}
|
||||
|
||||
if (in_array('is_programa_remedio_em_casa', request()->programas_acoes)) {
|
||||
$programasAcoes->push('Programa remédio em casa');
|
||||
}
|
||||
|
||||
if (in_array('is_acao_judicial', request()->programas_acoes)) {
|
||||
$programasAcoes->push('Ação judicial');
|
||||
}
|
||||
|
||||
if (in_array('is_remume', request()->programas_acoes)) {
|
||||
$programasAcoes->push('REMUME');
|
||||
}
|
||||
}
|
||||
|
||||
if ($programasAcoes->isNotEmpty()) {
|
||||
$programasAcoes = $programasAcoes->join(', ');
|
||||
} else {
|
||||
$programasAcoes = 'Todos';
|
||||
}
|
||||
|
||||
$itens = RelatorioMaterialService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'grupo' => $grupo->nome ?? 'Todos',
|
||||
'subgrupo' => $subgrupo->nome ?? 'Todos',
|
||||
'receita_tipo' => $receitaTipo->nome ?? 'Todos',
|
||||
'livro' => $livro->nome ?? 'Todos',
|
||||
'livro_tipo' => $livroTipo->nome ?? 'Todos',
|
||||
'forma_farmaceutica' => $formaFarmaceutica->nome ?? 'Todos',
|
||||
'programas_acoes' => $programasAcoes,
|
||||
'material' => $material->nome ?? 'Todos',
|
||||
'columns' => collect(request()->columns),
|
||||
'itens' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameImagem\Relatorios;
|
||||
|
||||
use App\Services\ExameImagem\RelatorioCotaProfissionalService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportCotaProfissional implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.exame-imagem.relatorios.export-cota-profissional';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'listagem' => RelatorioCotaProfissionalService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
20
api/app/Exports/ExameImagem/Relatorios/ExportExameStatus.php
Normal file
20
api/app/Exports/ExameImagem/Relatorios/ExportExameStatus.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameImagem\Relatorios;
|
||||
|
||||
use App\Services\ExameImagem\RelatorioExameStatusService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportExameStatus implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.exame-imagem.relatorios.export-exame-status';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'listagem' => RelatorioExameStatusService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameImagem\Relatorios;
|
||||
|
||||
use App\Services\ExameImagem\RelatorioFinanceiroExameService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportFinanceiroExame implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.exame-imagem.relatorios.export-financeiro-exame';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'listagem' => RelatorioFinanceiroExameService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
20
api/app/Exports/ExameImagem/Relatorios/ExportProducao.php
Normal file
20
api/app/Exports/ExameImagem/Relatorios/ExportProducao.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameImagem\Relatorios;
|
||||
|
||||
use App\Services\ExameImagem\RelatorioProducaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportProducao implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.exame-imagem.relatorios.export-producao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'itens' => RelatorioProducaoService::index(),
|
||||
'busca' => RelatorioProducaoService::getPrintExportData()
|
||||
]);
|
||||
}
|
||||
}
|
||||
22
api/app/Exports/ExameLaboratorial/ExportColetaRealizada.php
Normal file
22
api/app/Exports/ExameLaboratorial/ExportColetaRealizada.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioColetaRealizadaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportColetaRealizada implements FromView
|
||||
{
|
||||
|
||||
private const TITLE = 'RELATÓRIO DE COLETAS REALIZADAS';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.coleta-realizada';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioColetaRealizadaService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
22
api/app/Exports/ExameLaboratorial/ExportCotaConsumo.php
Normal file
22
api/app/Exports/ExameLaboratorial/ExportCotaConsumo.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioCotaConsumoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportCotaConsumo implements FromView
|
||||
{
|
||||
|
||||
private const TITLE = 'RELATÓRIO DE COTA E CONSUMO';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.export-cota-consumo';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioCotaConsumoService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/ExameLaboratorial/ExportExameBloqueado.php
Normal file
21
api/app/Exports/ExameLaboratorial/ExportExameBloqueado.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioExameBloqueadoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportExameBloqueado implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE EXAME BLOQUEADO';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.exame-bloqueado';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioExameBloqueadoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioExameLaboratorioApoioService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportExameLaboratorioApoio implements FromView
|
||||
{
|
||||
|
||||
private const TITLE = 'RELATÓRIO DE EXAME PARA LABORATÓRIO DE APOIO';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.exame-laboratorio-apoio';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioExameLaboratorioApoioService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
22
api/app/Exports/ExameLaboratorial/ExportExameProducao.php
Normal file
22
api/app/Exports/ExameLaboratorial/ExportExameProducao.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioExameProducaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportExameProducao implements FromView
|
||||
{
|
||||
|
||||
private const TITLE = 'RELATÓRIO DE PRODUÇÃO';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.exame-producao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioExameProducaoService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioExameSolicitadoStatusService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportExameSolicitadoStatus implements FromView
|
||||
{
|
||||
|
||||
private const TITLE = 'RELATÓRIO DE EXAMES SOLICITADOS POR STATUS';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.exame-solicitado-status';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioExameSolicitadoStatusService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
22
api/app/Exports/ExameLaboratorial/ExportFinanceiroExame.php
Normal file
22
api/app/Exports/ExameLaboratorial/ExportFinanceiroExame.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioFinanceiroExameService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportFinanceiroExame implements FromView
|
||||
{
|
||||
|
||||
private const TITLE = 'RELATÓRIO FINANCEIRO DE EXAME';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.financeiro-exame';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioFinanceiroExameService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioFinanceiroPacienteService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportFinanceiroPaciente implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO FINANCEIRO POR PACIENTE';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.financeiro-paciente';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioFinanceiroPacienteService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioHistoricoPacienteService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportHistoricoPaciente implements FromView
|
||||
{
|
||||
|
||||
private const TITLE = 'RELATÓRIO DE HISTÓRICO DO PACIENTE';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.historico-paciente';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioHistoricoPacienteService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/ExameLaboratorial/ExportPacienteAtendido.php
Normal file
21
api/app/Exports/ExameLaboratorial/ExportPacienteAtendido.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioPacienteAtendidoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportPacienteAtendido implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE PACIENTE ATENDIDO';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.paciente-atendido';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioPacienteAtendidoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioQuantitativoExameSolicitadoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportQuantitativoExameSolicitado implements FromView
|
||||
{
|
||||
|
||||
private const TITLE = 'RELATÓRIO QUANTITATIVO DE EXAME SOLICITADO';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.quantitativo-exame-solicitado';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioQuantitativoExameSolicitadoService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\ExameLaboratorial;
|
||||
|
||||
use App\Services\ExameLaboratorial\RelatorioQuantitativoProducaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportQuantitativoProducao implements FromView
|
||||
{
|
||||
|
||||
private const TITLE = 'RELATÓRIO QUANTITATIVO DE PRODUÇÃO';
|
||||
private const VIEW = 'exportacoes.exame-laboratorial.quantitativo-producao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioQuantitativoProducaoService::index();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
20
api/app/Exports/ExportAtendimento.php
Normal file
20
api/app/Exports/ExportAtendimento.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Services\ProntoAtendimento\RelatorioAtendimentoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportAtendimento implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.pronto-atendimento.export-atendimento';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'atendimentos' => RelatorioAtendimentoService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
20
api/app/Exports/ExportClassificacaoRisco.php
Normal file
20
api/app/Exports/ExportClassificacaoRisco.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Services\ProntoAtendimento\RelatorioClassificacaoRiscoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportClassificacaoRisco implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.pronto-atendimento.export-classificacao-risco';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'classificacoes_risco' => RelatorioClassificacaoRiscoService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
17
api/app/Exports/ExportDocumentoNaoAssinado.php
Normal file
17
api/app/Exports/ExportDocumentoNaoAssinado.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use App\Services\ProntoAtendimento\RelatorioDocumentoNaoAssinadoService;
|
||||
|
||||
class ExportDocumentoNaoAssinado implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.pronto-atendimento.export-documento-nao-assinado';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, RelatorioDocumentoNaoAssinadoService::getPrintExportData());
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/ExportExameImagem.php
Normal file
21
api/app/Exports/ExportExameImagem.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Services\ProntoAtendimento\RelatorioExameImagemService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportExameImagem implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.pronto-atendimento.export-exame-imagem';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'itens' => RelatorioExameImagemService::index(),
|
||||
'colunas' => collect(request()->selectedCols),
|
||||
'params' => request()->all(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
20
api/app/Exports/ExportPlantao.php
Normal file
20
api/app/Exports/ExportPlantao.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use App\Services\ProntoAtendimento\Plantao\RelatorioPlantaoService;
|
||||
|
||||
class ExportPlantao implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.pronto-atendimento.plantao.export-plantao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'plantoes' => RelatorioPlantaoService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
20
api/app/Exports/ExportProducaoMedico.php
Normal file
20
api/app/Exports/ExportProducaoMedico.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Services\ProntoAtendimento\RelatorioProducaoMedicoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportProducaoMedico implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.pronto-atendimento.export-producao-medico';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'atendimentos' => RelatorioProducaoMedicoService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
20
api/app/Exports/ExportQuantitativoProducao.php
Normal file
20
api/app/Exports/ExportQuantitativoProducao.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Services\ProntoAtendimento\RelatorioQuantitativoProducaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportQuantitativoProducao implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.pronto-atendimento.export-quantitativo-producao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'procedimentos_atendimentos' => RelatorioQuantitativoProducaoService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Farmacia/RelatorioAltoCustoProcesso.php
Normal file
21
api/app/Exports/Farmacia/RelatorioAltoCustoProcesso.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Farmacia;
|
||||
|
||||
use App\Services\Farmacia\RelatorioAltoCustoProcessoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAltoCustoProcesso implements FromView
|
||||
{
|
||||
private const TITLE = 'ALTO CUSTO - RELATÓRIO DE PROCESSO';
|
||||
private const VIEW = 'exportacoes.farmacia.relatorio-alto-custo-processo';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioAltoCustoProcessoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Farmacia;
|
||||
|
||||
use App\Services\Farmacia\RelatorioAltoCustoRetiradaPendenteService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAltoCustoRetiradaPendente implements FromView
|
||||
{
|
||||
private const TITLE = 'ALTO CUSTO - RELATÓRIO DE RETIRADA PENDENTE';
|
||||
private const VIEW = 'exportacoes.farmacia.relatorio-alto-custo-retirada-pendente';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioAltoCustoRetiradaPendenteService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Farmacia/RelatorioDispensacao.php
Normal file
21
api/app/Exports/Farmacia/RelatorioDispensacao.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Farmacia;
|
||||
|
||||
use App\Services\Farmacia\RelatorioDispensacaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioDispensacao implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE DISPENSAÇÃO';
|
||||
private const VIEW = 'exportacoes.farmacia.relatorio-dispensacao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioDispensacaoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
42
api/app/Exports/Farmacia/RelatorioDispensacaoRemedioCasa.php
Normal file
42
api/app/Exports/Farmacia/RelatorioDispensacaoRemedioCasa.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Farmacia;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\Material\Material;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Services\Farmacia\RelatorioDispensacaoRemedioCasaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioDispensacaoRemedioCasa implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE DISPENSAÇÃO - REMÉDIO EM CASA';
|
||||
private const VIEW = 'exportacoes.farmacia.relatorio-dispensacao-remedio-casa';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioDispensacaoRemedioCasaService::index();
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$infraestrutura = Infraestrutura::find(request()->infraestrutura_id);
|
||||
$material = Material::find(request()->material_id);
|
||||
$paciente = Paciente::find(request()->paciente_id);
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'periodo' => [
|
||||
'inicio' => request()->periodo['start'],
|
||||
'fim' => request()->periodo['end'],
|
||||
],
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todas',
|
||||
'material' => $material->descricao ?? 'Todos',
|
||||
'paciente' => $paciente->nome ?? 'Todos',
|
||||
'data' => $itens,
|
||||
'colunas' => collect(request()->get('selected_columns')),
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Imunizacao/RelatorioFaltosoAprazamento.php
Normal file
21
api/app/Exports/Imunizacao/RelatorioFaltosoAprazamento.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Imunizacao;
|
||||
|
||||
use App\Services\Imunizacao\RelatorioFaltosoAprazamentoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioFaltosoAprazamento implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE FALTOSOS E APRAZAMENTOS';
|
||||
private const VIEW = 'exportacoes.imunizacao.relatorio-faltoso-aprazamento';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioFaltosoAprazamentoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Imunizacao\Relatorios;
|
||||
|
||||
use App\Services\Imunizacao\RelatorioConsolidadoAplicacaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioConsolidadoAplicacao implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.imunizacao.relatorio-consolidado-aplicacao';
|
||||
|
||||
public static function getTemplate()
|
||||
{
|
||||
return RelatorioConsolidadoAplicacaoService::getPrintData();
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, self::getTemplate());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Imunizacao\Relatorios;
|
||||
|
||||
use App\Services\Imunizacao\RelatorioDeAplicacaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioDeAplicacao implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.imunizacao.relatorio-de-aplicacao';
|
||||
|
||||
public static function getTemplate()
|
||||
{
|
||||
$registros = RelatorioDeAplicacaoService::search();
|
||||
$registros['filtros'] = request()->all();
|
||||
|
||||
return $registros;
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = self::getTemplate();
|
||||
$filtros = $data['filtros'];
|
||||
$registros = $data['registros'];
|
||||
|
||||
$tipoRegistro = isset($filtros['tipo_registro']) ? $registros[0]->registro : 'Todos';
|
||||
$salaVacinacao = isset($filtros['sala_vacinacao']) ? $registros[0]->sala : 'Todas';
|
||||
$vacina = isset($filtros['vacina']) ? $registros[0]->vacina : 'Todas';
|
||||
$dose = isset($filtros['dose']) ? $registros[0]->dose : 'Todas';
|
||||
$sexo = isset($filtros['sexo']) ? $registros[0]->sexo : 'Ambos';
|
||||
$unidade = isset($filtros['unidade']) ? $registros[0]->unidade : 'Todas';
|
||||
$area = isset($filtros['area']) ? $registros[0]->area : 'Todas';
|
||||
$microarea = isset($filtros['microarea']) ? $registros[0]->microarea : 'Todas';
|
||||
$classificacao = isset($filtros['classificacao']) ? $registros[0]->classificacao : 'Todas';
|
||||
$prontuario = isset($filtros['prontuario']) ? $registros[0]->prontuario : 'Todos';
|
||||
$periodo = $filtros['periodo'];
|
||||
|
||||
$faixaEtariaInicial = $filtros['faixa_etaria']['inicial'];
|
||||
$faixaEtariaFinal = $filtros['faixa_etaria']['final'];
|
||||
|
||||
$faixaEtariaInicialAnos = $faixaEtariaInicial['anos'] ?? 'Não informado';
|
||||
$faixaEtariaInicialMeses = $faixaEtariaInicial['meses'] ?? 'Não informado';
|
||||
$faixaEtariaInicialDias = $faixaEtariaInicial['dias'] ?? 'Não informado';
|
||||
|
||||
$faixaEtariaFinalAnos = $faixaEtariaFinal['anos'] ?? 'Não informado';
|
||||
$faixaEtariaFinalMeses = $faixaEtariaFinal['meses'] ?? 'Não informado';
|
||||
$faixaEtariaFinalDias = $faixaEtariaInicial['dias'] ?? 'Não informado';
|
||||
|
||||
$colunas = collect(request()->selected_columns);
|
||||
|
||||
return view(self::VIEW, [
|
||||
'periodo' => "{$periodo['start']} até {$periodo['end']}",
|
||||
'tipoRegistro' => $tipoRegistro,
|
||||
'salaVacinacao' => $salaVacinacao,
|
||||
'vacina' => $vacina,
|
||||
'dose' => $dose,
|
||||
'sexo' => $sexo,
|
||||
'unidade' => $unidade,
|
||||
'areaMicroarea' => "{$area}/{$microarea}",
|
||||
'classificacao' => $classificacao,
|
||||
'faixaInicialAnos' => $faixaEtariaInicialAnos,
|
||||
'faixaInicialMeses' => $faixaEtariaInicialMeses,
|
||||
'faixaInicialDias' => $faixaEtariaInicialDias,
|
||||
'faixaFinalAnos' => $faixaEtariaFinalAnos,
|
||||
'faixaFinalMeses' => $faixaEtariaFinalMeses,
|
||||
'faixaFinalDias' => $faixaEtariaFinalDias,
|
||||
'prontuario' => $prontuario,
|
||||
'colunas' => $colunas,
|
||||
'items' => $registros,
|
||||
'totalizadores' => $data['totalizadores'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Integracao/Bnafar/RelatorioEnvio.php
Normal file
21
api/app/Exports/Integracao/Bnafar/RelatorioEnvio.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Integracao\Bnafar;
|
||||
|
||||
use App\Services\Integracao\Bnafar\RelatorioEnvioService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioEnvio implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO SOA BNAFAR';
|
||||
private const VIEW = 'exportacoes.integracao.bnafar.relatorio-envio';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioEnvioService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
20
api/app/Exports/Integracao/ExportAtendimento.php
Normal file
20
api/app/Exports/Integracao/ExportAtendimento.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Integracao;
|
||||
|
||||
use App\Services\Integracao\Erpsaude\RelatorioAtendimentoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ExportAtendimento implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.integracao.erpsaude.export-atendimento';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'atendimentos' => RelatorioAtendimentoService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Integracao/Ria/RelatorioEnvio.php
Normal file
21
api/app/Exports/Integracao/Ria/RelatorioEnvio.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Integracao\Ria;
|
||||
|
||||
use App\Services\Integracao\Ria\RelatorioEnvioService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioEnvio implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE ENVIO';
|
||||
private const VIEW = 'exportacoes.integracao.ria.relatorio-envio';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioEnvioService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
20
api/app/Exports/Manutencao/RelatorioSolicitacoes.php
Normal file
20
api/app/Exports/Manutencao/RelatorioSolicitacoes.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Manutencao;
|
||||
|
||||
use App\Services\Manutencao\RelatorioSolicitacoesService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioSolicitacoes implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.manutencao.relatorio-solicitacoes';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, [
|
||||
'solicitacoes' => RelatorioSolicitacoesService::index(),
|
||||
'params' => request()->all()
|
||||
]);
|
||||
}
|
||||
}
|
||||
37
api/app/Exports/Parametrizacao/RelatorioExameCadastrado.php
Normal file
37
api/app/Exports/Parametrizacao/RelatorioExameCadastrado.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Parametrizacao;
|
||||
|
||||
use App\Services\Parametrizacao\RelatorioExameCadastradoService;
|
||||
use App\Models\Cadastro\Grupo\Grupo;
|
||||
use App\Models\Parametrizacao\Exame\ExameTipo;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioExameCadastrado implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE EXAME CADASTRADO';
|
||||
private const VIEW = 'exportacoes.parametrizacao.relatorio-exame-cadastrado';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioExameCadastradoService::index();
|
||||
|
||||
$selectedCols = request()->selected_cols ?? [];
|
||||
$tipo = ExameTipo::find(request()->tipo_id);
|
||||
$grupo = Grupo::find(request()->grupo_id);
|
||||
$valor = request()->valor_id;
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'tipo' => $tipo->nome ?? 'Todos',
|
||||
'grupo' => $grupo->nome ?? 'Todos',
|
||||
'valor' => $valor === null ? 'Todos' : ($valor == 1 ? 'Sim' : 'Não'),
|
||||
'dados' => $itens,
|
||||
'selectedCols' => $selectedCols
|
||||
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/PortalDivulgacao/PosicaoEstoque.php
Normal file
21
api/app/Exports/PortalDivulgacao/PosicaoEstoque.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\PortalDivulgacao;
|
||||
|
||||
use App\Services\PortalDivulgacao\PosicaoEstoqueService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class PosicaoEstoque implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE POSIÇÃO DE ESTOQUE';
|
||||
private const VIEW = 'exportacoes.portal-divulgacao.posicao-estoque';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = PosicaoEstoqueService::getPrintData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
33
api/app/Exports/Raas/RelatorioInconsistencia.php
Normal file
33
api/app/Exports/Raas/RelatorioInconsistencia.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Raas;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Sigtap\Competencia;
|
||||
use App\Services\Raas\RelatorioInconsistenciaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioInconsistencia implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE INCONSISTÊNCIA';
|
||||
private const VIEW = 'exportacoes.raas.relatorio-inconsistencia';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$competencia = Competencia::find(request()->competencia_id);
|
||||
$tipoInconsistencia = request()->tipo_inconsistencia === 'atendimento' ? 'Atendimento' : 'Procedimento';
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$itens = RelatorioInconsistenciaService::index();
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'competencia' => $competencia->valor,
|
||||
'tipo_inconsistencia' => $tipoInconsistencia,
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'data' => $itens,
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
17
api/app/Exports/Regulacao/Fila.php
Normal file
17
api/app/Exports/Regulacao/Fila.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Regulacao;
|
||||
|
||||
use App\Services\Regulacao\FilaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Fila implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.regulacao.fila';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, FilaService::getPrintExportData());
|
||||
}
|
||||
}
|
||||
17
api/app/Exports/Regulacao/RelatorioSolicitacao.php
Normal file
17
api/app/Exports/Regulacao/RelatorioSolicitacao.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Regulacao;
|
||||
|
||||
use App\Services\Regulacao\RelatorioSolicitacaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioSolicitacao implements FromView
|
||||
{
|
||||
private const VIEW = 'exportacoes.regulacao.relatorio-solicitacao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view(self::VIEW, RelatorioSolicitacaoService::getPrintExportData());
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/TransportePaciente/Relatorios/Agendador.php
Normal file
21
api/app/Exports/TransportePaciente/Relatorios/Agendador.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\RelatorioAgendadorService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Agendador implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE AGENDAMENTOS';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.agendador';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioAgendadorService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\EstatisticoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Estatistico implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO ESTATÁTISTICO DE VIAGEM POR MOTORISTA';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.estatistico';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = EstatisticoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
22
api/app/Exports/TransportePaciente/Relatorios/Listagem.php
Normal file
22
api/app/Exports/TransportePaciente/Relatorios/Listagem.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\ListagemService;
|
||||
use App\Services\TransportePaciente\Relatorios\ViagemService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Listagem implements FromView
|
||||
{
|
||||
private const TITLE = 'LISTAGEM DE TRANSPORTE AGENDADO';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.listagem';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = ListagemService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\PrestacaoContaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class PrestacaoConta implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO PRESTAÇÃO DE CONTAS';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.prestacao-conta';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = PrestacaoContaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\RelatorioQuantitativoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Quantitativo implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO QUANTITATIVO DE VIAGEM';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.quantitativo';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioQuantitativoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\RelatorioViagemMotoristaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioViagemMotorista implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE VIAGEM POR MOTORISTA';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.relatorio-viagem-motorista';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioViagemMotoristaService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/TransportePaciente/Relatorios/Viagem.php
Normal file
21
api/app/Exports/TransportePaciente/Relatorios/Viagem.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\ViagemService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class Viagem implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE VIAGEM';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.viagem';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = ViagemService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/TransportePaciente/Relatorios/ViagemData.php
Normal file
21
api/app/Exports/TransportePaciente/Relatorios/ViagemData.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\ViagemDataService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ViagemData implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE VIAGEM POR DATA';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.viagem-data';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = ViagemDataService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\RelatorioViagemGeralService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ViagemGeral implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE VIAGEM GERAL';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.viagem-geral';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioViagemGeralService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\TransportePaciente\Relatorios;
|
||||
|
||||
use App\Services\TransportePaciente\Relatorios\ViagemVeiculoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class ViagemVeiculo implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE VIAGEM POR VEÍCULO';
|
||||
private const VIEW = 'exportacoes.transporte-paciente.relatorios.viagem-veiculo';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = ViagemVeiculoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user