PAGO TOMA DE MUESTRAS COVID-19
Recuerda que los datos personales deben pertenecer al CONTRATANTE
Número de atención (Digitar solo números)
Ciudad
Selecciona una opción
Bogotá
Medellín
Cali
Barranquilla
Villavicencio
Bucaramanga
Chía
Soacha
Tipo de usuario
Selecciona una opción
Afiliado Emermédica
Usuario Particular
Tipo de examen 1
Selecciona una opción
Antígenos rápida
Antígeno
PCR
Cantidad
Selecciona una opción
1
2
3
4
5
6
7
8
9
10
Tipo de examen 2
Selecciona una opción
Antígenos rápida
Antígeno
PCR
Cantidad tipo de examen 2
Selecciona una opción
1
2
3
4
5
6
7
8
9
10
Tipo de documento
Selecciona una opción
Cédula de ciudadanía
Cédula de extranjería
NIT
RUT
Tarjeta identidad
Business Registration Number
Social Security ID
Cadastro de Pessoas Físicas
RUT
Cédula DIDI
Cédula DIMEX
Persona Física Nacional
Persona Jurídica
Cédula de identidad
Registro único de contribuyente
Documento de residencia
Documento nacional de identificación
Número de Registro Tributario
LIC
Passport
TAX
Cédula de identidad personal
Registro único de contribuyente
DNI
Registro único de contribuyente
Employer Identification Number
Cédula de Identidad
Registro Único Tributario
Número de documento
Nombre
Apellidos
Correo electrónico
Teléfono de contacto
Valor total
<script> (function () { // Generic values var spanTotal = $('#total'), paymentUserType = $('#payment_tipo_de_cliente'); ciudad = $('#payment_ciudad'); // First exam dropdowns var paymentQuantity = $('#payment_cantidad'), paymentExamType = $('#payment_tipo_de_examen'); // Second exam dropdowns var paymentExamTypeTwo = $('#payment_tipo_de_examen_dos'), paymentQuantityTwo = $('#payment_cantidad_dos'); addListeners(); function addListeners() { $('#payment_tipo_de_cliente, #payment_ciudad, #payment_tipo_de_examen, #payment_cantidad, #payment_tipo_de_examen_dos, #payment_cantidad_dos').on('change', function (event) { event.preventDefault(); getTotal(event.target.id); }); } /** * Get the amount by each exam and then calcultate the total **/ function getTotal(changed_dropdown_id = '') { var clientType = paymentUserType.val(); if (changed_dropdown_id === 'payment_tipo_de_cliente' && !clientType) { console.log('Cliente inválido, por favor verifique!!'); resetAllOptions(); return; } // First Exam Variables var stringFirstExamType = paymentExamType.val(); if (!stringFirstExamType) { console.log('String inválido, por favor verifique!!'); return; } var firstExamType = getValueByExam(stringFirstExamType), firstExamQuantity = parseInt(paymentQuantity.val()), firstExamTempResult = 0; if (!isNaN(firstExamType) && !isNaN(firstExamQuantity)) { firstExamTempResult = getTotalByExam(firstExamType, firstExamQuantity) || 0; } // Second Exam Variables var stringSecondExamType = paymentExamTypeTwo.val(), secondExamTempQuantity = 0; if (stringSecondExamType) { var secondExamType = getValueByExam(stringSecondExamType), secondExamQuantity = parseInt(paymentQuantityTwo.val()); if (!isNaN(secondExamType) && !isNaN(secondExamQuantity)) { if (secondExamType === firstExamType) { alert('Esta opción ya se encuentra en uso, por favor valide'); paymentExamTypeTwo.val(''); paymentQuantityTwo.val(''); } else { secondExamTempQuantity = getTotalByExam(secondExamType, secondExamQuantity) || 0; } } } var totalAmount = firstExamTempResult + secondExamTempQuantity; console.log(totalAmount); if (totalAmount !== "NaN" && totalAmount > "0") { $("#payment_amount_static").text("COP $" + Intl.NumberFormat().format(totalAmount)); $("#payment_amount").val(totalAmount); }else{ $("#payment_amount_static").text("0"); $("#payment_amount").val(totalAmount); } } /** * Calculate the total using the exam type and the quantity * * @param {exam_type} The selected exam type PRUEBA_RAPIDA || PCR || ANTIGENO * @param {quantity} The quantity selected by the user * @return int **/ function getTotalByExam(exam_type, quantity) { if (!quantity) { console.log('Cantidad Invalida'); return; } if (!exam_type) { console.log('Tipo de examen invalido'); return; } // Initial prices var prices = { emermedica: { quick_test: 99000, pcr: 270000, antigeno: 99000, }, particular: { quick_test: 99000, pcr: 296000, antigeno: 99000, } }; var ciu = ciudad.val(); // Formatting the selected options to adapt them to the initial prices properties var formattedUserType = getValueByClient(paymentUserType.val()); var ciu = ciudad.val(); ciu = ciu.replace(/\s/g, '').toLocaleLowerCase(); var formattedExamType = getPriceNodeByExam(exam_type); if (formattedUserType === null || formattedExamType === null) { return 0; } if (formattedUserType === 'emermedica' && formattedExamType == 'quick_test'&& ciu =='bogotá') { return 99000 * quantity; }else if (formattedUserType === 'particular' && formattedExamType == 'quick_test'&& ciu =='bogotá') { return 99000 * quantity; }else{ var { [formattedUserType]: { [formattedExamType]: amountByExam } } = prices; return (amountByExam * quantity); } } // Get the amount by the selected exam // var { [formattedUserType]: { [formattedExamType]: amountByExam } } = prices; // return (amountByExam * quantity); // } function formatAmount(amount) { return Intl.NumberFormat().format(amount); } /** * Format the string to match it with the available exam types * * @param {string} exam_type * @return int */ function getValueByExam(exam_type) { if (!exam_type) { console.log('Tipo de examen invalido', exam_type); return; } exam_type = exam_type.replace(/\s/g, '').toLocaleLowerCase(); var value = 0; switch (exam_type) { case 'antigenosrapida': value = 1; break; case 'pcr': value = 2; break; case 'antigeno': value = 3; break; default: console.log('No se puede obtener el valor apropiado'); break; } return value; } /** * Compare the selected client type and return the appropriate value * * @param {string} client_type * @return string|undefined */ function getValueByClient(client_type) { var value = null; if (!client_type) { console.log('El tipo de cliente es invalido', client_type); return value; } client_type = client_type.replace(/\s/g, '').toLocaleLowerCase(); switch (client_type) { case 'afiliadoemermedica': value = 'emermedica'; break; case 'usuarioparticular': value = 'particular'; break; default: console.log('No se puede obtener el valor apropiado'); break; } return value; } /** * Format the exam type to match it with a valid node in the prices table * * @param {int} exam_type * @return string|undefined */ function getPriceNodeByExam(exam_type) { var value = null; if (!exam_type) { console.log('Tipo de examen invalido', exam_type); return value; } switch (exam_type) { case 1: value = 'quick_test'; break; case 2: value = 'pcr'; break; case 3: value = 'antigeno'; break; default: console.log('No se puede obtener el valor apropiado'); break; } return value; } function resetAllOptions() { paymentExamType.val(''); paymentExamTypeTwo.val(''); paymentQuantity.val(''); paymentQuantityTwo.val(''); $("#payment_amount_static").text("COP $" + 0); $("#payment_amount").val(''); } })(); </script>
Al continuar, acepto las políticas aplicables para el tratamiento de mis datos personales según la jurisdicción local del responsable y de
Evertec PlacetoPay
en su calidad de encargado.
Pagar