This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\AtencaoBasica\Procedimento;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\AtencaoBasica\Procedimento\ProcedimentoService;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ProcedimentoController extends Controller
|
||||
{
|
||||
protected $modulo = 'atencao-basica';
|
||||
protected $funcionalidade = 'procedimento';
|
||||
|
||||
public function index()
|
||||
{
|
||||
return response()->json(ProcedimentoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(ProcedimentoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getAtendimentos()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getAtendimentos(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getProcedimentos()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getProcedimentos(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getProcedimentosUsuario()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getProcedimentosUsuario(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function loadUnidades()
|
||||
{
|
||||
return response()->json(ProcedimentoService::loadUnidades(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getCadastroIndividual()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getCadastroIndividual(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function loadLocaisAtendimento()
|
||||
{
|
||||
return response()->json(ProcedimentoService::loadLocaisAtendimento(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function loadProfissionais()
|
||||
{
|
||||
return response()->json(ProcedimentoService::loadProfissionais(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getUnidades()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getUnidades(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getInfraestruturas()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getInfraestruturas(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getAtendimentoResponsavel()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getAtendimentoResponsavel(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getAtendimentoPaciente()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getAtendimentoPaciente(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getEquipes()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getEquipes(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getOcupacoes()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getOcupacoes(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getCadastroDomiciliar()
|
||||
{
|
||||
return response()->json(ProcedimentoService::getCadastroDomiciliar(request()->all()), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ProcedimentoService::store($request), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ProcedimentoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function show()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ProcedimentoService::show(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ProcedimentoService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user