añado jsp

This commit is contained in:
2025-06-09 13:55:08 +02:00
parent ce54d7a756
commit e1227c3b2a
118 changed files with 44926 additions and 0 deletions
+164
View File
@@ -0,0 +1,164 @@
<%@ page import="com.tarisan.control.ParametrosConfiguracion" %>
<%@ page import="com.tarisan.data.Paciente" %>
<%@ page import="com.tarisan.data.Usuario" %>
<%@ page import="com.tarisan.excepcion.*" %>
<%@ page import="com.tarisan.log.*" %>
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Calendar" %>
<%@ page import="com.tarisan.util.Utilidades" %>
<%
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de especialidades (imp/impEspecialidades.jsp)");
response.setHeader("Expires", "0");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
HttpSession sesion = request.getSession(true);
try
{
// Definicion de variables
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy");
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
String strAutorizacion = (String)request.getParameter("autorizacion");
%>
<html>
<head>
<title>Impresión Especialidades</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function escribirListaElementos()
{
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
var strInforme = top.self.opener.obtenerInformePrescripcion();
var texto="<table border='0' width='100%' cellpadding='5' cellspacing='0'>";
if (vElementos.length==0) //no hay ningun elemento
texto+= "<tr><td width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
else //hay algun elemento
{
for (var i=0; i<vElementos.length; i++)
{
texto+= "<tr><td width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
}
if (strInforme!="")
{
texto += "<tr><td width='2%' class='txtImpresion' colspan='2'>&nbsp;</td></tr>";
texto += "<tr><td class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + strInforme + "</td></tr>";
}
}
texto = texto + "</table>";
//escribimos la lista de elementos dependiendo del navegador
if (document.all)
{
document.all['elementos'].innerHTML = texto;
}
else if (document.getElementById)
{
document.getElementById('elementos').innerHTML = texto;
}
else if (document.layers)
{
texto = "<layer top='0' left='0'>"+texto+"</layer>";
document.layers['elementos'].document.open();
document.layers['elementos'].document.write(texto);
document.layers['elementos'].document.close();
}
}
//-->
</script>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="5" align="left">
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><hr width="100%"></hr></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="5" align="left">
<tr>
<td class="txtImpresion" nowrap>Nº de póliza:</td>
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
<td class="txtImpresion">&nbsp;&nbsp;&nbsp;</td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
</tr>
<tr>
<td colspan="2" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
<td colspan="3">
<table border="0" cellpadding="0">
<tr>
<td class="txtImpresion">Nº Autorización:</td>
<td class="txtImpresion"><%=strAutorizacion%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="5" class="txtImpresion">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="left" class="txtImpresion">Ruego autoricen las siguientes exploraciones:</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
escribirListaElementos();
imprimirHTML();
//-->
</script>
</body>
</html>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
//-->
</script>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de especialidades (imp/impEspecialidades.jsp)");
%>