This commit is contained in:
62
api/app/Http/Controllers/Ambulatorio/RecepcaoController.php
Normal file
62
api/app/Http/Controllers/Ambulatorio/RecepcaoController.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Ambulatorio;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Ambulatorio\RecepcaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RecepcaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'ambulatorio';
|
||||
protected $funcionalidade = 'recepcao';
|
||||
|
||||
public function autocompletePaciente()
|
||||
{
|
||||
return RecepcaoService::autocompletePaciente();
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(RecepcaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create($filaId = null)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RecepcaoService::create($filaId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function unidadePaciente($pacienteId)
|
||||
{
|
||||
return response()->json(
|
||||
RecepcaoService::unidadePaciente(
|
||||
$pacienteId
|
||||
),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
|
||||
public function edit($atendimentoId)
|
||||
{
|
||||
return response()->json(RecepcaoService::edit($atendimentoId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RecepcaoService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function update($atendimentoId)
|
||||
{
|
||||
return response()->json(RecepcaoService::update($atendimentoId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($atendimentoId)
|
||||
{
|
||||
return response()->json(RecepcaoService::destroy($atendimentoId), Response::HTTP_CREATED);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user