auth(__FUNCTION__); return response()->json(RelatorioEstatisticoPacienteCadastradoService::index(), Response::HTTP_OK); } public function list() { return response()->json(RelatorioEstatisticoPacienteCadastradoService::list(), Response::HTTP_OK); } public function autocompletePaciente() { return datatables() ->of(RelatorioEstatisticoPacienteCadastradoService::autocompletePaciente()) ->filterColumn('cadastro_paciente.prontuario', function ($query, $keyword) { $query->whereRaw("LPAD(cadastro_paciente.prontuario, 7, 0) like ?", ["%{$keyword}%"]); }) ->editColumn('cns', fn ($paciente) => MaskUtil::getCnsMasked($paciente->cns)) ->toJson(); } }