This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\AtencaoBasica;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\AtencaoBasica\RelatorioCuidadoPessoaComDiabeteService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioCuidadoPessoaComDiabeteController extends Controller
|
||||
{
|
||||
protected $modulo = 'atencao-basica';
|
||||
protected $funcionalidade = 'relatorio-cuidado-pessoa-com-diabete';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioCuidadoPessoaComDiabeteService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(RelatorioCuidadoPessoaComDiabeteService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(RelatorioCuidadoPessoaComDiabeteService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocomplete()
|
||||
{
|
||||
return datatables()
|
||||
->of(RelatorioCuidadoPessoaComDiabeteService::autocomplete())
|
||||
->filterColumn('cadastro_paciente.prontuario', function ($query, $keyword) {
|
||||
$query->whereRaw("LPAD(cadastro_paciente.prontuario, 7, 0) like ?", ["%{$keyword}%"]);
|
||||
})
|
||||
->toJson();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user