CRM Virtual 5m6i3i
Conselho Regional de Medicina 493l6b
e agora
';
html += '
';
html += ' CRM: ' + item.CRM + "-" + item.SG_UF;
html += '
';
html += '
';
html += ' CNPJ: ' + item.NU_F_CGC.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/g,"\$1.\$2.\$3\/\$4\-\$5");
html += '
';
html += '
';
html += ' ';
html += '
';
html += ' Situação: (' + item.SITUACAO + ')';
//html += ' Situação: (' + item.SITUACAO +
// 'i )';
html += '
';
html += '
';
html += ' ';
html += '
';
html += ' Diretor Técnico: ' + trataDiretor;
html += '
';
html += '
';
html += ' ';
html += '
';
html += ' Certificado de Regularidade: ' + certificadoDeRegularidade;
html += '
';
html += '
';
html += ' ';
html += '
';
html += ' Classificação: ' + trataClassificacao + ' ';
html += '
';
html += '
';
html += `
`;
html += `
`;
html += ' ';
html += ' ';
html += ' ';
html += ' ';
html += ' ';
$(".busca-resultado").append(html);
morePrestador(item.ID, item.SG_UF, item.SECURITYHASH)
})
var resultadoText = resultado != 1 ? 'registros encontrados' : 'registro encontrado';
var htmlResultados = `${resultado} ${resultadoText}
`;
$("#resultados").html(htmlResultados);
$(".loading").hide();
$("#paginacao").show();
$("#resultados").show();
refreshTooltips();
renderPagination(page);
} else {
$(".loading").hide();
$("#paginacao").hide();
$("#resultados").hide();
var html = '';
html += '
';
html += '
';
html += '
';
html += '
';
html += '
nenhum resultado encontrado para a busca selecionada!
';
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
$(".busca-resultado").html(html);
}
}
})
.fail(function(jqXHR, textStatus, msg) {
alert('Houve um erro ao efetuar sua busca, por favor, tente mais tarde!');
$(".btn-buscar").html("Buscar");
});
}
var paginationInitialized = false;
function renderPagination(pageNumber) {
const qtdPaginas = [];
for (let index = 0; index < resultado; index++) {
qtdPaginas.push(index);
}
$('#paginacao').pagination({
dataSource: qtdPaginas,
pageSize: pageSize,
pageNumber: pageNumber,
showPrevious: false,
showNext: false,
callback: function(data, pagination) {
if (paginationInitialized) {
paginationInitialized = false;
page = pagination.pageNumber;
loadData();
} else {
if (recaptchaPublicKeyV2 || recaptchaPublicKeyV2Outros) {
grecaptcha.execute();
}
paginationInitialized = true;
}
$.scrollTo($('.page-content'), 0);
}
});
}
// $('#buscaForm').on('submit', function(e) {
// e.preventDefault();
// loadData();
// });
function loadData() {
//window.reloadCaptcha(function() {
onSubmit();
//});
}
function morePrestador(id, uf, securityHash) {
$.ajax(window._API.endpoint + `/prestadores/buscar_detalhamentos/${id}/${uf}`, {
method: 'post',
dataType: 'json',
data: JSON.stringify([{
securityHash: securityHash,
id_solicitante: id,
uf: uf
}]),
}).done(function(res) {
if (res.status && res.dados) {
var dados = res.dados[0];
//console.log(dados);
$('#item' + id).find(".item_nome_fantasia span").html(`${dados.FANTASIA}`);
$('#item' + id).find(".item_situacao").html(`${dados.SITUACAO}`);
$('#item' + id).find(".item_situacao_tooltip").attr("title", `${dados.TX_SITUACAO}`);
// $('#item' + id).find(".item_classificacao").html(`${dados.CLASSIFICACAO}`);
$('.diretor' + id).html(`Diretor Técnico: ${dados.DIRETOR}`);
$('.moreinfoPrestadores' + id).html('');
var endereco = "";
if (dados.ENDERECO && dados.ENDERECO !== null) {
endereco = dados.ENDERECO;
}
if (dados.BAIRRO && dados.BAIRRO !== null) {
endereco += ", " + dados.BAIRRO;
}
if (dados.CEP && dados.CEP !== null) {
endereco += " - CEP: " + dados.CEP;
}
$('.moreinfoPrestadores' + id).append(`Endereço: ${endereco}
`);
var atividade = "Prestador sem atividades registradas.";
if (dados.atividades && dados.atividades.length) {
atividade = dados.atividades.map(function(value) {
return value.DS_ATIVIDADE;
}).(", ");
}
$('.moreinfoPrestadores' + id).append(`Atividades: ${atividade}
`);
var especialidade = "Prestador sem especialidades registradas.";
if (dados.especialidades && dados.especialidades.length) {
especialidade = dados.especialidades.map(function(value) {
return value.DS_ESPECIALIDADE;
}).(", ");
}
$('.moreinfoPrestadores' + id).append(`Especialidades: ${especialidade}
`);
var servicos = "Prestador sem serviços registrados.";
if (dados.servicos && dados.servicos.length) {
servicos = dados.servicos.map(function(value) {
return value.SERVICO;
}).(", ");
}
$('.moreinfoPrestadores' + id).append(`Serviços prestados: ${servicos}
`);
var comissao = "Prestador sem comissão registrada.";
if (dados.comissao && dados.comissao.length) {
comissao = dados.comissao.map(function(value) {
var temp55holder = '';
if(value.UF_SG_UF == 'RJ'){
temp55holder = '55';
}
var cargoholder = '';
if(value.DS_CARGO != null){
cargoholder = ' ('+value.DS_CARGO+')';
}
return ' '+temp55holder+value.NU_CRM+'/'+value.UF_SG_UF+' - '+value.NM_SOLICITANTE+cargoholder;
}).(", ");
}
$('.moreinfoPrestadores' + id).append(`Comissão de Ética: ${comissao}
`);
var classificacoes = "Prestador sem classificação registrada."
if (dados.classificacoes && dados.classificacoes.length) {
classificacoes = dados.classificacoes.map(function(value) {
return value.NM_CLASSIFICACAO;
}).(", ");
}
$('#item' + id).find(".item_classificacao span").html(`${classificacoes}`);
}
});
}
$(document).on('click', '.btnMorePres', function(e) {
$(`.moreinfoPrestadores${$(this).data('id')}`).toggle();
});
function listarUFs() {
$.ajax(window._API.endpoint + '/medicos/listar_ufs', {
dataType: 'json'
}).done(function(res) {
if (res.status && res.dados) {
var ufs = [];
res.dados.forEach(function(item) {
$("#uf").append('' + item.DS_UF + ' ');
})
}
});
}
$("#uf").change(function(e) {
var uf = e.target.value;
if (uf === 'RJ') {
$('.basic-addon').show();
$('.controll-state').addClass('selectRJ');
} else {
$('.basic-addon').hide();
$('.controll-state').removeClass('selectRJ');
}
$.ajax(window._API.endpoint + '/medicos/listar_municipios/' + uf, {
dataType: 'json'
}).done(function(res) {
if (res.status && res.dados) {
var municipios = [];
$("#municipio").html('');
$("#municipio").append('Todos ');
res.dados.forEach(function(item) {
$("#municipio").append('' + item.DS_MUNICIPIO +
' ');
})
}
});
});
function init() {
listarUFs();
}
window.addEventListener("load", function() {
init();
})
})(jQuery);
Aviso de Privacidade 1z496u
Nós usamos cookies para melhorar sua experiência de navegação no portal. Ao utilizar o Portal Médico, você concorda com a política de monitoramento de cookies. Para ter mais informações sobre como isso é feito, e Política de cookies . Se você concorda, clique em ACEITO.
Aceito