43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Farmacia;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\Farmacia\RelatorioAtendimentoDiarioService;
|
|
use Illuminate\Http\Response;
|
|
|
|
class RelatorioAtendimentoDiarioController extends Controller
|
|
{
|
|
protected $modulo = 'farmacia';
|
|
protected $funcionalidade = 'relatorio-atendimento-diario';
|
|
|
|
public function index()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(RelatorioAtendimentoDiarioService::index(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function create()
|
|
{
|
|
return response()->json(RelatorioAtendimentoDiarioService::create(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function list()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(RelatorioAtendimentoDiarioService::list(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function autocompletePaciente()
|
|
{
|
|
return datatables()
|
|
->of(RelatorioAtendimentoDiarioService::autocompletePaciente())
|
|
->filterColumn('cadastro_paciente.prontuario', function ($query, $keyword) {
|
|
$query->where('cadastro_paciente.prontuario', (int) $keyword);
|
|
})
|
|
->toJson();
|
|
}
|
|
}
|