This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\AtencaoBasica\FichaVacinacao;
|
||||
|
||||
use App\Services\AtencaoBasica\FichaVacinacao\FichaVacinacaoService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class FichaVacinacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'atencao-basica';
|
||||
protected $funcionalidade = 'ficha-vacinacao';
|
||||
|
||||
public function index()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getUnidades()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getUnidades(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getInfraestruturas()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getInfraestruturas(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getProfissionais()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getProfissionais(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getOcupacoes()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getOcupacoes(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getEquipes()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getEquipes(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getPaciente()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getPaciente(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getLotes()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getLotes(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getFabricantes()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getFabricantes(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(FichaVacinacaoService::store($request), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(FichaVacinacaoService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
public function destroyAll($id)
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::destroyAll($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
public function destroyOne($id)
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::destroyOne($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
public function getVacinas()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getVacinas(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update(Request $request, int $id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(FichaVacinacaoService::update($id, $request), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getEstrategias()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getEstrategias(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getDoses()
|
||||
{
|
||||
return response()->json(FichaVacinacaoService::getDoses(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user