This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
use App\Services\Farmacia\AltoCustoGerenciamentoProcessoService;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class AltoCustoGerenciamentoProcessoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'alto-custo-gerenciamento-processo';
|
||||
|
||||
public function index($pacienteId)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(AltoCustoGerenciamentoProcessoService::index($pacienteId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create($pacienteId)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(AltoCustoGerenciamentoProcessoService::create($pacienteId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(AltoCustoGerenciamentoProcessoService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(AltoCustoGerenciamentoProcessoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(AltoCustoGerenciamentoProcessoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
AltoCustoGerenciamentoProcessoService::destroy($id);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
}
|
||||
15
api/app/Http/Controllers/Farmacia/ChamadaController.php
Normal file
15
api/app/Http/Controllers/Farmacia/ChamadaController.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\ChamadaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ChamadaController extends Controller
|
||||
{
|
||||
public function store()
|
||||
{
|
||||
return response()->json(ChamadaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
}
|
||||
69
api/app/Http/Controllers/Farmacia/DispensacaoController.php
Normal file
69
api/app/Http/Controllers/Farmacia/DispensacaoController.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\ReceitaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class DispensacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'dispensacao';
|
||||
|
||||
public function create($pacienteId, $filaId = null)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ReceitaService::create($pacienteId, $filaId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ReceitaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function historicoReceitas($pacienteId)
|
||||
{
|
||||
return response()->json(ReceitaService::getHistoricoReceitas($pacienteId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getUltimaRetirada()
|
||||
{
|
||||
return response()->json(ReceitaService::getUltimaRetirada(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function printReceitaDispensada($receitaId)
|
||||
{
|
||||
return response()->json(ReceitaService::printReceitaDispensada($receitaId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function printReceitaHistorico($id)
|
||||
{
|
||||
return response()->json(ReceitaService::printReceitaHistorico($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getSupervisor()
|
||||
{
|
||||
return response()->json(ReceitaService::getSupervisor(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getMedicamentosAVencer()
|
||||
{
|
||||
return response()->json(ReceitaService::getMedicamentosAVencer(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getItensSolicitacaoMedicamento($prescricaoId)
|
||||
{
|
||||
return response()->json(ReceitaService::getItensSolicitacaoMedicamento($prescricaoId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ReceitaService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
use App\Services\Farmacia\EstornoDispensacaoService;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class EstornoDispensacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'estorno-dispensacao';
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EstornoDispensacaoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EstornoDispensacaoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\FilaAtendimentoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class FilaAtendimentoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'fila-atendimento';
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(FilaAtendimentoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function createEncaminhamento($filaId)
|
||||
{
|
||||
return response()->json(FilaAtendimentoService::createEncaminhamento($filaId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
[$dados, $status] = FilaAtendimentoService::store();
|
||||
|
||||
return response()->json($dados, $status);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(FilaAtendimentoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(FilaAtendimentoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(FilaAtendimentoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function listEncaminhamento()
|
||||
{
|
||||
return response()->json(FilaAtendimentoService::listEncaminhamento(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompletePaciente()
|
||||
{
|
||||
return datatables()
|
||||
->of(FilaAtendimentoService::autocompletePaciente())
|
||||
->filterColumn('cadastro_cidadao.data_nascimento', function ($query, $keyword) {
|
||||
$query->whereRaw("DATE_FORMAT(cadastro_cidadao.data_nascimento, '%d/%m/%Y') like ?", ["%{$keyword}%"]);
|
||||
})
|
||||
->filterColumn('cadastro_paciente.prontuario', function ($query, $keyword) {
|
||||
$query->whereRaw("LPAD(cadastro_paciente.prontuario, 6, 0) like ?", ["%{$keyword}%"]);
|
||||
})
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function evade($id)
|
||||
{
|
||||
FilaAtendimentoService::evade($id);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
public function forward($id)
|
||||
{
|
||||
FilaAtendimentoService::forward($id);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
public function sendBack($id)
|
||||
{
|
||||
FilaAtendimentoService::sendBack($id);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\LivroPsicotropicoService;
|
||||
use App\Services\Farmacia\LivroService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class LivroPsicotropicoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'livro-psicotropico';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return LivroPsicotropicoService::datatable();
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(LivroPsicotropicoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroPsicotropicoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroPsicotropicoService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroPsicotropicoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroPsicotropicoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getLinhas($paginaId)
|
||||
{
|
||||
return response()->json(LivroPsicotropicoService::getLinhas($paginaId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function fecharLivro($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroPsicotropicoService::fecharLivro($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getDataAbertura($livroRegistroId, $livroRegistroTipoId = null)
|
||||
{
|
||||
return response()->json(
|
||||
LivroService::getDataAbertura($livroRegistroId, $livroRegistroTipoId),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\LivroTalidomidaService;
|
||||
use App\Services\Farmacia\LivroService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class LivroTalidomidaController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'livro-talidomida';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return LivroTalidomidaService::datatable();
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(LivroTalidomidaService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getLinhas($paginaId)
|
||||
{
|
||||
return response()->json(LivroTalidomidaService::getLinhas($paginaId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function fecharLivro($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(LivroTalidomidaService::fecharLivro($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getDataAbertura($livroRegistroId, $livroRegistroTipoId)
|
||||
{
|
||||
return response()->json(
|
||||
LivroService::getDataAbertura($livroRegistroId, $livroRegistroTipoId),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
use App\Services\Farmacia\ParametrizacaoService;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class ParametrizacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'parametrizacao';
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ParametrizacaoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ParametrizacaoService::store(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioAltoCustoDispensacaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioAltoCustoDispensacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-alto-custo-dispensacao';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoDispensacaoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(RelatorioAltoCustoDispensacaoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoDispensacaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioAltoCustoDispensacaoService::autocompleteMaterial())->toJson();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioAltoCustoEstatisticoCidService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioAltoCustoEstatisticoCidController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-alto-custo-estatistico-cid';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoEstatisticoCidService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoEstatisticoCidService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteCid()
|
||||
{
|
||||
return datatables()->of(RelatorioAltoCustoEstatisticoCidService::autocompleteCid())->make(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioAltoCustoProcessoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioAltoCustoProcessoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-alto-custo-processo';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoProcessoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoProcessoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioAltoCustoProcessoPacienteService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioAltoCustoProcessoPacienteController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-alto-custo-processo-paciente';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoProcessoPacienteService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoProcessoPacienteService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioAltoCustoProcessoPacienteService::autocompleteMaterial())->toJson();
|
||||
}
|
||||
|
||||
public function autocompletePaciente()
|
||||
{
|
||||
return datatables()
|
||||
->of(RelatorioAltoCustoProcessoPacienteService::autocompletePaciente())
|
||||
->filterColumn('paciente.prontuario', function ($query, $keyword) {
|
||||
|
||||
$query->where('paciente.prontuario', (int) $keyword);
|
||||
})
|
||||
->filterColumn('cidadao.data_nascimento', function ($query, $keyword) {
|
||||
|
||||
$query->whereRaw("DATE_FORMAT(cidadao.data_nascimento, '%d/%m/%Y') like ?", ["%{$keyword}%"]);
|
||||
})
|
||||
->toJson();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioAltoCustoRetiradaPendenteService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioAltoCustoRetiradaPendenteController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-alto-custo-retirada-pendente';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoRetiradaPendenteService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAltoCustoRetiradaPendenteService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioAltoCustoRetiradaPendenteService::autocompleteMaterial())->make(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioAtendimentoDiarioService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioAtendimentoDiarioController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-atendimento-diario';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAtendimentoDiarioService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(RelatorioAtendimentoDiarioService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioAtendimentoDiarioService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompletePaciente()
|
||||
{
|
||||
return datatables()
|
||||
->of(RelatorioAtendimentoDiarioService::autocompletePaciente())
|
||||
->filterColumn('cadastro_paciente.prontuario', function ($query, $keyword) {
|
||||
$query->where('cadastro_paciente.prontuario', (int) $keyword);
|
||||
})
|
||||
->toJson();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioDispensacaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioDispensacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-dispensacao';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioDispensacaoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioDispensacaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioDispensacaoService::autocompleteMaterial())->make(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioDispensacaoPacienteService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioDispensacaoPacienteController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-dispensacao-paciente';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioDispensacaoPacienteService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(RelatorioDispensacaoPacienteService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioDispensacaoPacienteService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompletePaciente()
|
||||
{
|
||||
return datatables()->of(RelatorioDispensacaoPacienteService::autocompletePaciente())->toJson();
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioDispensacaoPacienteService::autocompleteMaterial())->toJson();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioDispensacaoRemedioCasaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioDispensacaoRemedioCasaController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-dispensacao-remedio-casa';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioDispensacaoRemedioCasaService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(RelatorioDispensacaoRemedioCasaService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(RelatorioDispensacaoRemedioCasaService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompletePaciente()
|
||||
{
|
||||
return datatables()->of(RelatorioDispensacaoRemedioCasaService::autocompletePaciente())->toJson();
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioDispensacaoRemedioCasaService::autocompleteMaterial())->toJson();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioEstornoDispensacaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioEstornoDispensacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-estorno-dispensacao';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioEstornoDispensacaoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(RelatorioEstornoDispensacaoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioEstornoDispensacaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioEstornoDispensacaoService::autocompleteMaterial())->toJson();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioMovimentacaoPsicotropicoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioMovimentacaoPsicotropicoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-movimentacao-psicotropico';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioMovimentacaoPsicotropicoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioMovimentacaoPsicotropicoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioMovimentacaoPsicotropicoService::autocompleteMaterial())->make(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioPacienteAtendidoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioPacienteAtendidoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-paciente-atendido';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioPacienteAtendidoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(RelatorioPacienteAtendidoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioPacienteAtendidoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioPacienteAtendidoService::autocompleteMaterial())->toJson();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\RelatorioQuantitativoDispensacaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioQuantitativoDispensacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'relatorio-quantitativo-dispensacao';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioQuantitativoDispensacaoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioQuantitativoDispensacaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RelatorioQuantitativoDispensacaoService::autocompleteMaterial())->make(true);
|
||||
}
|
||||
}
|
||||
65
api/app/Http/Controllers/Farmacia/SupervisorController.php
Normal file
65
api/app/Http/Controllers/Farmacia/SupervisorController.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Farmacia;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Farmacia\SupervisorService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class SupervisorController extends Controller
|
||||
{
|
||||
protected $modulo = 'farmacia';
|
||||
protected $funcionalidade = 'supervisor';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return datatables()->of(SupervisorService::datatable())->toJson();
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(SupervisorService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function isSupervisor($usuarioId)
|
||||
{
|
||||
return response()->json(SupervisorService::isSupervisor($usuarioId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SupervisorService::create(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SupervisorService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SupervisorService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SupervisorService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
SupervisorService::destroy($id);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user