49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\ProntoAtendimento;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\ProntoAtendimento\Aih\AihService;
|
|
use Illuminate\Http\Response;
|
|
|
|
class AihController extends Controller
|
|
{
|
|
protected $modulo = 'pronto-atendimento';
|
|
protected $funcionalidade = 'aih';
|
|
|
|
public function datatable()
|
|
{
|
|
return AihService::datatable()->skipTotalRecords()->toJson();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
return response()->json(AihService::index(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function list()
|
|
{
|
|
return response()->json(AihService::list(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function create($pacienteId = null)
|
|
{
|
|
return response()->json(AihService::create($pacienteId), Response::HTTP_OK);
|
|
}
|
|
|
|
public function store()
|
|
{
|
|
return response()->json(AihService::store(), Response::HTTP_CREATED);
|
|
}
|
|
|
|
public function edit($id)
|
|
{
|
|
return response()->json(AihService::edit($id), Response::HTTP_OK);
|
|
}
|
|
|
|
public function update($id)
|
|
{
|
|
return response()->json(AihService::update($id), Response::HTTP_OK);
|
|
}
|
|
}
|