63 lines
1.5 KiB
PHP
63 lines
1.5 KiB
PHP
<?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);
|
|
}
|
|
}
|