Fix: PDF formulario de ingreso con nuevo diseño y encabezado
This commit is contained in:
@@ -347,36 +347,36 @@ export function HistoriaClinica({
|
|||||||
|
|
||||||
const edad = paciente.fechaNacimiento ? calcularEdad(paciente.fechaNacimiento) : '';
|
const edad = paciente.fechaNacimiento ? calcularEdad(paciente.fechaNacimiento) : '';
|
||||||
const fechaFormateada = internacion.fechaIngresoClinica ? formatDateDDMMYYYY(internacion.fechaIngresoClinica) : 'N/A';
|
const fechaFormateada = internacion.fechaIngresoClinica ? formatDateDDMMYYYY(internacion.fechaIngresoClinica) : 'N/A';
|
||||||
|
const fechaHospital = internacion.fechaIngresoHospital ? formatDateDDMMYYYY(internacion.fechaIngresoHospital) : '';
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
page.drawRectangle({ x: 0, y: height - 80, width, height: 80, color: colorPrimary });
|
page.drawRectangle({ x: 0, y: height - 100, width, height: 100, color: colorPrimary });
|
||||||
page.drawText('FORMULARIO DE INGRESO', { x: 180, y: height - 45, size: 20, font: fontBold, color: rgb(1, 1, 1) });
|
page.drawText('HOSPITAL DONACIÓN F. SANTOJANNI – DIVISIÓN CLÍNICA MÉDICA', { x: 60, y: height - 35, size: 14, font: fontBold, color: rgb(1, 1, 1) });
|
||||||
page.drawText('Historia Clínica Electrónica - Servicio de Clínica Médica', { x: 110, y: height - 65, size: 10, font, color: rgb(0.85, 0.85, 0.85) });
|
page.drawText('HISTORIA CLÍNICA DE INGRESO', { x: 170, y: height - 55, size: 12, font: fontBold, color: rgb(1, 1, 1) });
|
||||||
page.drawText('Hospital Santojanni', { x: 50, y: height - 90, size: 9, font, color: colorGray });
|
|
||||||
|
|
||||||
let y = height - 125;
|
let y = height - 140;
|
||||||
|
|
||||||
// Datos del Paciente
|
// Datos Filiatorios
|
||||||
page.drawRectangle({ x: 45, y: y - 8, width: 505, height: 24, color: colorLightGray });
|
page.drawRectangle({ x: 45, y: y - 8, width: 505, height: 24, color: colorLightGray });
|
||||||
page.drawText('DATOS DEL PACIENTE', { x: 50, y: y, size: 12, font: fontBold, color: colorPrimary });
|
page.drawText('DATOS FILIATORIOS', { x: 50, y: y, size: 12, font: fontBold, color: colorPrimary });
|
||||||
y -= 35;
|
y -= 35;
|
||||||
|
|
||||||
page.drawText('Cama:', { x: 50, y, size: 10, font: fontBold, color: colorGray });
|
// Primera línea: Fechas y cama
|
||||||
page.drawText(cama?.numero || 'N/A', { x: 120, y, size: 10, font, color: colorText });
|
const fechaIngresoHospText = fechaHospital ? `Fecha ingreso al hospital: ${fechaHospital}` : '';
|
||||||
page.drawText('Fecha de Ingreso:', { x: 280, y, size: 10, font: fontBold, color: colorGray });
|
const fechaIngresoClinText = fechaFormateada ? `Fecha ingreso a clínica: ${fechaFormateada}` : '';
|
||||||
page.drawText(fechaFormateada, { x: 390, y, size: 10, font, color: colorText });
|
const camaText = `Cama: ${cama?.numero || 'N/A'}`;
|
||||||
|
|
||||||
|
page.drawText(fechaIngresoHospText, { x: 50, y, size: 10, font: fontBold, color: colorGray });
|
||||||
|
page.drawText(fechaIngresoClinText, { x: 260, y, size: 10, font: fontBold, color: colorGray });
|
||||||
|
y -= 18;
|
||||||
|
page.drawText(camaText, { x: 50, y, size: 10, font: fontBold, color: colorGray });
|
||||||
y -= 25;
|
y -= 25;
|
||||||
|
|
||||||
page.drawText('Apellido:', { x: 50, y, size: 10, font: fontBold, color: colorGray });
|
// Segunda línea: Apellido, Nombre y DNI
|
||||||
page.drawText(paciente.apellido || '', { x: 120, y, size: 10, font, color: colorText });
|
page.drawText(`Apellido y Nombre: ${paciente.apellido || ''}, ${paciente.nombre || ''}`, { x: 50, y, size: 10, font: fontBold, color: colorGray });
|
||||||
page.drawText('Nombre:', { x: 280, y, size: 10, font: fontBold, color: colorGray });
|
y -= 18;
|
||||||
page.drawText(paciente.nombre || '', { x: 350, y, size: 10, font, color: colorText });
|
page.drawText(`DNI: ${paciente.dni || ''}`, { x: 50, y, size: 10, font: fontBold, color: colorGray });
|
||||||
y -= 25;
|
page.drawText(`Edad: ${edad ? `${edad} años` : ''}`, { x: 280, y, size: 10, font: fontBold, color: colorGray });
|
||||||
|
|
||||||
page.drawText('DNI:', { x: 50, y, size: 10, font: fontBold, color: colorGray });
|
|
||||||
page.drawText(paciente.dni || '', { x: 120, y, size: 10, font, color: colorText });
|
|
||||||
page.drawText('Edad:', { x: 280, y, size: 10, font: fontBold, color: colorGray });
|
|
||||||
page.drawText(edad ? `${edad} años` : '', { x: 330, y, size: 10, font, color: colorText });
|
|
||||||
y -= 40;
|
y -= 40;
|
||||||
|
|
||||||
// Datos Clínicos
|
// Datos Clínicos
|
||||||
|
|||||||
Reference in New Issue
Block a user