351 lines
13 KiB
Plaintext
351 lines
13 KiB
Plaintext
<%@ page import="com.tarisan.control.*" %>
|
|
<%@ page import="com.tarisan.data.*" %>
|
|
<%@ page import="com.tarisan.excepcion.*" %>
|
|
<%@ page import="com.tarisan.log.*" %>
|
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
|
<%@ page import="java.sql.*" %>
|
|
<%@ page import="java.util.Vector" %>
|
|
<%@ page import="java.io.*" %>
|
|
|
|
<%
|
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio pagina del historico de prescripciones ats (med/historico_ats.jsp)");
|
|
|
|
response.setHeader("Expires", "0");
|
|
response.setHeader("Pragma", "no-cache");
|
|
response.setHeader("Cache-Control", "no-cache");
|
|
HttpSession sesion = request.getSession(true);
|
|
|
|
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
|
{
|
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
|
response.sendRedirect("../../html/login.html");
|
|
}
|
|
else
|
|
{
|
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio pagina del historico de prescripciones ats (med/historico_ats.jsp)");
|
|
|
|
try
|
|
{
|
|
|
|
//Obtención del perfil del usuario conectado
|
|
StringBuffer perfil = new StringBuffer();
|
|
perfil.append("|");
|
|
perfil.append(sesion.getAttribute("PERFIL"));
|
|
perfil.append("|");
|
|
|
|
// Definicion de variables
|
|
String strParametroMenu="";
|
|
String strCampoNombre="";
|
|
int intPagina=1;
|
|
int especialidad=0;
|
|
|
|
//Obtenemos los valores de los parametros que se pasan a la pagina
|
|
//En caso de que no se le pasen parametros, quedaram inicializados
|
|
//a sus valores por defecto
|
|
|
|
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
|
if (request.getParameter("x")!=null)
|
|
strParametroMenu=(String)request.getParameter("x");
|
|
|
|
//parametro pagina para realizar la paginacion
|
|
if (request.getParameter("pagina")!=null)
|
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
|
|
|
especialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
|
|
|
Tamensaje tamensaje = new Tamensaje();
|
|
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
|
|
|
boolean mostrarNoticia = true;
|
|
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
|
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
|
Vector vNoticias = new Vector();
|
|
String strNoticia = "";
|
|
String noticias ="";
|
|
String separador = " ---//--- ";
|
|
if(vSeleccionNot.size()==0){
|
|
mostrarNoticia = false;
|
|
}else{
|
|
mostrarNoticia = true;
|
|
Tanoticias tanoticia = null;
|
|
for(int i = 0; i < vSeleccionNot.size(); i++)
|
|
{
|
|
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
|
if (i!=0){
|
|
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
|
}else{
|
|
strNoticia = tanoticia.getNoticia();
|
|
}
|
|
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
|
}
|
|
}
|
|
%>
|
|
|
|
<html>
|
|
<head>
|
|
<title>Histórico Prescripciones ATS</title>
|
|
<link rel="shortcut icon" href="../../img/logo.ico" />
|
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
|
|
|
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
|
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
|
<script language="JavaScript" src="../../js/funciones.js"></script>
|
|
<script language="JavaScript" src="../../js/menu_med.js"></script>
|
|
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
|
<script language="JavaScript" type="text/javascript">
|
|
<!--
|
|
function paginacion(pagina)
|
|
{
|
|
document.frmPaginacion.pagina.value=pagina;
|
|
document.frmPaginacion.submit();
|
|
}
|
|
//-->
|
|
</script>
|
|
|
|
</head>
|
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="">
|
|
<div class="marco">
|
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
|
<tr>
|
|
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
|
<td>
|
|
<table width="100%">
|
|
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
|
<tr>
|
|
<td>
|
|
<div id="contenedorNoticia">
|
|
<br>
|
|
<div class="tituloNoticia">
|
|
<p class="marquee"><%=strNoticia %></p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<!-- Cabecera de Navegación superior //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
|
<tr>
|
|
<td><script language="JavaScript">bloques();</script></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<!-- Cuerpo de la página //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
|
<tr valign="top">
|
|
<!--<td width="180">//-->
|
|
<td width="5%">
|
|
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr valign="top">
|
|
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
|
<td width="565">
|
|
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
|
<tr>
|
|
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
|
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
|
|
<td class="txt" valign="top">
|
|
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
|
|
|
<form name="frmPaginacion" action="historico_ats.jsp?x=<%=strParametroMenu%>" method="post">
|
|
<input type="hidden" name="pagina" value="1" />
|
|
</form>
|
|
|
|
<table border="0" align="center" width="100%">
|
|
<%
|
|
PersistenciaTaconaut pertacon = new PersistenciaTaconaut();
|
|
Vector vSeleccion = pertacon.ObtenerPrescripcionesPorMedico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(),intPagina);
|
|
if(vSeleccion.size() == 0)
|
|
{
|
|
%>
|
|
<!-- Presentacion de los resultados -->
|
|
<tr><td colspan="3" class="txt">No Se han realizado prescripciones de actos para los ATS</td></tr>
|
|
<tr><td colspan="3" class="txt"> </tr><%
|
|
}
|
|
else
|
|
{
|
|
|
|
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
|
%>
|
|
<tr>
|
|
<td colspan="3" align="right"><span class="txt">Página <%=pertacon.getPaginacion().getNumeroPagina()%> de <%=pertacon.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
|
</tr>
|
|
<%
|
|
}
|
|
%>
|
|
<tr>
|
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorizacion</td>
|
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Informe</td>
|
|
</tr>
|
|
|
|
<%
|
|
Taconaut ta = new Taconaut();
|
|
PersistenciaTtactmed tm = new PersistenciaTtactmed();
|
|
String estilo = "";
|
|
for(int i=0; i<vSeleccion.size();i++)
|
|
{
|
|
if (i % 2 == 0)
|
|
{
|
|
estilo = "filaA";
|
|
}
|
|
else
|
|
{
|
|
estilo = "filaB";
|
|
}
|
|
ta = (Taconaut)vSeleccion.elementAt(i);
|
|
%>
|
|
<tr class="trResultados">
|
|
<td class="<%=estilo%>" align="center">
|
|
<%
|
|
String resultado = ""+ta.getAutorizacion().toString();
|
|
String resultadoE = ta.getAutorizacionEncriptada();
|
|
File fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_ats+resultado+".pdf"); //Buscar en ubicacion vieja
|
|
if(fichero.exists())
|
|
{
|
|
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
|
<input type="hidden" name="tipo" value="7"/>
|
|
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
|
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
|
<input type="submit" value="<%=resultado%>" class="enlacePeticion"></input>
|
|
</form><%
|
|
}
|
|
else
|
|
{
|
|
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_ats+resultado+".PDF");
|
|
if(fichero.exists())
|
|
{
|
|
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
|
<input type="hidden" name="tipo" value="7"/>
|
|
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
|
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
|
<input type="submit" value="<%=resultado%>" class="enlacePeticion"></input>
|
|
</form><%
|
|
}
|
|
else
|
|
{
|
|
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".pdf"); //Buscar en ubicacion nueva
|
|
if(fichero.exists())
|
|
{
|
|
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
|
<input type="hidden" name="tipo" value="15"/>
|
|
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
|
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
|
<input type="submit" value="<%=resultado%>" class="enlacePeticion"></input>
|
|
</form><%
|
|
}
|
|
else
|
|
{
|
|
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".PDF");
|
|
if(fichero.exists())
|
|
{
|
|
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
|
<input type="hidden" name="tipo" value="15"/>
|
|
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
|
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
|
<input type="submit" value="<%=resultado%>" class="enlacePeticion"></input>
|
|
</form><%
|
|
}
|
|
else
|
|
{
|
|
%><p><%=pertamensaje.obtenerMensaje(7).getMensaje() %></p><%
|
|
}
|
|
}
|
|
}
|
|
}
|
|
%>
|
|
</td>
|
|
<td class="<%=estilo%>" align="center"><%=tm.obtenerNombreActo(ta.getActo(), ta.getEspecialidad()) %></td>
|
|
<td class="<%=estilo%>" align="center"><%=ta.getInforme() %></td>
|
|
|
|
</tr>
|
|
<%
|
|
}
|
|
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
|
<tr><td colspan="3"></td></tr>
|
|
<tr>
|
|
<td colspan="3">
|
|
<table border="0" align="center">
|
|
<tr>
|
|
<%if (pertacon.getPaginacion().esPrimeraPagina()){%>
|
|
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
|
<td></td>
|
|
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
|
<%}else{%>
|
|
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
|
<td></td>
|
|
<td width="70" align="left"><a href="javascript:paginacion(<%=pertacon.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
|
<%}%>
|
|
|
|
<%if (pertacon.getPaginacion().esUltimaPagina()){%>
|
|
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
|
<td></td>
|
|
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
|
<%}else{%>
|
|
<td width="70" align="right"><a href="javascript:paginacion(<%=pertacon.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
|
<td></td>
|
|
<td width="70" align="left"><a href="javascript:paginacion(<%=pertacon.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
|
<%}%>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
|
|
}
|
|
}
|
|
|
|
%>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
<script>
|
|
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
|
if (!jsMostrarNoticia){
|
|
document.getElementById('contenedorNoticia').style.display="none";
|
|
}else{
|
|
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
|
var not = "<%=strNoticia %>";
|
|
tamanioNoticia(not);
|
|
marquee($('.tituloNoticia'), $('.marquee'),not);
|
|
}
|
|
</script>
|
|
<%
|
|
}
|
|
catch(ExcepcionTarisan ex)
|
|
{
|
|
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
|
response.sendRedirect("../error.jsp");
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
|
response.sendRedirect("../error.jsp");
|
|
}
|
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página del historico de prescripciones ats (med/historico_ats.jsp)");
|
|
}
|
|
%> |