cambios nuevos

This commit is contained in:
Jhonathan Guevara 2026-01-19 14:25:36 -05:00
parent 6d43a61d76
commit 81818e933e
Signed by: jhonathan_guevara
GPG Key ID: 619239F12DCBE55B
4 changed files with 19 additions and 9 deletions

View File

@ -2759,6 +2759,8 @@ async function crearLibroAutorizacion(a) {
// 4) Nombre IPS (B12:G12) // 4) Nombre IPS (B12:G12)
const nombreIps = a.nombre_ips || ''; const nombreIps = a.nombre_ips || '';
const filaNombreIps = sheet.getRow(12);
filaNombreIps.height = (filaNombreIps.height || 15) * 2;
['B12', 'C12', 'D12', 'E12', 'F12', 'G12'].forEach(celda => { ['B12', 'C12', 'D12', 'E12', 'F12', 'G12'].forEach(celda => {
sheet.getCell(celda).value = nombreIps; sheet.getCell(celda).value = nombreIps;
}); });
@ -2773,6 +2775,10 @@ async function crearLibroAutorizacion(a) {
sheet.getCell(celda).value = telefonoIps; sheet.getCell(celda).value = telefonoIps;
}); });
const filaDiagnostico = sheet.getRow(21);
const filaDiagnosticoExtra = sheet.getRow(22);
filaDiagnostico.height = (filaDiagnostico.height || 15) * 1.5;
filaDiagnosticoExtra.height = (filaDiagnosticoExtra.height || 15) * 1.5;
sheet.getCell('M21').value = a.cie10_codigo || ''; sheet.getCell('M21').value = a.cie10_codigo || '';
sheet.getCell('N21').value = a.cie10_descripcion || ''; sheet.getCell('N21').value = a.cie10_descripcion || '';

View File

@ -2436,6 +2436,8 @@ async function crearLibroAutorizacionBrigadasAmbulanciasHospitalarios(a) {
} }
const nombreIps = a.nombre_ips || ''; const nombreIps = a.nombre_ips || '';
const filaNombreIps = sheet.getRow(12);
filaNombreIps.height = (filaNombreIps.height || 15) * 2;
['B12', 'C12', 'D12', 'E12', 'F12', 'G12'].forEach((celda) => { ['B12', 'C12', 'D12', 'E12', 'F12', 'G12'].forEach((celda) => {
sheet.getCell(celda).value = nombreIps; sheet.getCell(celda).value = nombreIps;
}); });
@ -2450,6 +2452,10 @@ async function crearLibroAutorizacionBrigadasAmbulanciasHospitalarios(a) {
sheet.getCell(celda).value = telefonoIps; sheet.getCell(celda).value = telefonoIps;
}); });
const filaDiagnostico = sheet.getRow(21);
const filaDiagnosticoExtra = sheet.getRow(22);
filaDiagnostico.height = (filaDiagnostico.height || 15) * 1.5;
filaDiagnosticoExtra.height = (filaDiagnosticoExtra.height || 15) * 1.5;
sheet.getCell('M21').value = a.cie10_codigo || ''; sheet.getCell('M21').value = a.cie10_codigo || '';
sheet.getCell('N21').value = a.cie10_descripcion || ''; sheet.getCell('N21').value = a.cie10_descripcion || '';

View File

@ -1392,12 +1392,7 @@ app.post(
allowMissingAmbito: true, allowMissingAmbito: true,
defaultAmbito: 'extramural', defaultAmbito: 'extramural',
allowNumeroOrdenForAnyAmbito: true, allowNumeroOrdenForAnyAmbito: true,
fechaAutorizacionKeys: [ allowDuplicates: true,
'FECHADEREGISTRO',
'FECHAREGISTRO',
'FECHADEAUTORIZACION',
'FECHA',
],
}); });
} finally { } finally {
await safeUnlink(inputPath); await safeUnlink(inputPath);
@ -2516,6 +2511,7 @@ async function procesarExcelAutorizacionesMasivas(inputFilePath, usuario, option
defaultAmbito = '', defaultAmbito = '',
allowNumeroOrdenForAnyAmbito = false, allowNumeroOrdenForAnyAmbito = false,
fechaAutorizacionKeys = [], fechaAutorizacionKeys = [],
allowDuplicates = false,
} = options; } = options;
const headerRow = sheet.getRow(1); const headerRow = sheet.getRow(1);
@ -3018,10 +3014,12 @@ async function procesarExcelAutorizacionesMasivas(inputFilePath, usuario, option
} }
if (dupRes.rows.length > 0) { if (dupRes.rows.length > 0) {
resumen.omitidas += 1;
resumen.duplicados += 1; resumen.duplicados += 1;
if (!allowDuplicates) {
resumen.omitidas += 1;
continue; continue;
} }
}
const observaciones = []; const observaciones = [];
const obs1 = getValueMulti(row, [ const obs1 = getValueMulti(row, [

View File

@ -17,7 +17,7 @@
<div class="card masivas-card"> <div class="card masivas-card">
<h2>Subir plantilla</h2> <h2>Subir plantilla</h2>
<p class="subtitle"> <p class="subtitle">
Usa la plantilla oficial de autorizados. La fecha de registro se guarda como fecha de autorizacion. Usa la plantilla oficial de autorizados. La fecha y hora se toman del sistema.
</p> </p>
<div class="form-row template-row"> <div class="form-row template-row">