diff --git a/enfermero_portal.php b/enfermero_portal.php index ca21835..36383c7 100644 --- a/enfermero_portal.php +++ b/enfermero_portal.php @@ -1123,6 +1123,29 @@ const formVer = { +
+
+ + +
+
+ + +
+
+
+ + +
@@ -1451,11 +1474,21 @@ const agendaNueva = { return; } try { + const documento = document.getElementById('na-np-documento').value.trim(); + if (!documento) { + btn.disabled = false; + btn.innerHTML = 'Agendar'; + this._mostrarError('El número de documento del paciente es obligatorio.'); + return; + } const rPac = await fetch('api/lab/save_paciente.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ nombre_completo: nombre, + tipo_documento: document.getElementById('na-np-tipo-doc').value, + numero_documento: documento, + eps: document.getElementById('na-np-eps').value.trim() || null, telefono: document.getElementById('na-np-telefono').value.trim() || null, fecha_nacimiento: document.getElementById('na-np-fnac').value || null, email: document.getElementById('na-np-email').value.trim() || null, @@ -2029,7 +2062,7 @@ const notasManager = { const ru = await fetch('api/lab/upload_nota_imagen.php', { method:'POST', body: fd }); const du = await ru.json(); if (!du.success) { alert('No se pudo subir la imagen: ' + (du.error||'')); return; } - imagenPath = du.local_file; + imagenPath = du.imagen_path; } try {