init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
<?php
namespace App\Http\Controllers\ExameImagem;
use App\Http\Controllers\Controller;
use App\Services\ExameImagem\ReagendamentoCancelamentoExameService;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class ReagendamentoCancelamentoExameController extends Controller
{
protected $modulo = 'exame-imagem';
protected $funcionalidade = 'reagendamento-cancelamento-exame';
public function datatable(Request $request)
{
return datatables()->of(ReagendamentoCancelamentoExameService::datatable($request))
->filterColumn('cadastro_cidadao.data_nascimento', function ($query, $keyword) {
$query
->whereRaw("DATE_FORMAT(cadastro_cidadao.data_nascimento, '%d/%m/%Y') like ?", ["%{$keyword}%"])
->orWhereRaw(
"CONCAT(
SUBSTR(cadastro_cidadao.data_nascimento,9,2),
SUBSTR(cadastro_cidadao.data_nascimento,6,2),
SUBSTR(cadastro_cidadao.data_nascimento,1,4)
) like ?",
["%{$keyword}%"]
);
})
->filterColumn('cadastro_cidadao.cpf', function ($query, $keyword) {
$query
->whereRaw("cadastro_cidadao.cpf like ?", ["%{$keyword}%"])
->orWhereRaw(
"CONCAT(
SUBSTR(cadastro_cidadao.cpf,1,3),
'.',
SUBSTR(cadastro_cidadao.cpf,4,3),
'.',
SUBSTR(cadastro_cidadao.cpf,7,3),
'-',
SUBSTR(cadastro_cidadao.cpf,10,2)
) like ?",
["%{$keyword}%"]
);
})
->skipTotalRecords()
->toJson();
}
public function edit($usuarioId)
{
$this->auth(__FUNCTION__);
return response()->json(ReagendamentoCancelamentoExameService::edit($usuarioId), Response::HTTP_OK);
}
public function getJornadas(Request $request)
{
return response()->json(ReagendamentoCancelamentoExameService::getJornadas($request), Response::HTTP_OK);
}
public function getPrestadores(Request $request)
{
return response()->json(ReagendamentoCancelamentoExameService::getPrestadores($request), Response::HTTP_OK);
}
public function getGrupos(Request $request)
{
return response()->json(ReagendamentoCancelamentoExameService::getGrupos($request), Response::HTTP_OK);
}
public function getJornadasDestino(Request $request)
{
return response()->json(ReagendamentoCancelamentoExameService::getJornadasDestino($request), Response::HTTP_OK);
}
public function reschedule() {
$this->auth(__FUNCTION__);
return response()->json(ReagendamentoCancelamentoExameService::reschedule(), Response::HTTP_OK);
}
public function cancel()
{
$this->auth(__FUNCTION__);
return response()->json(ReagendamentoCancelamentoExameService::cancel(), Response::HTTP_OK);
}
}