315 lines
12 KiB
Plaintext
315 lines
12 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="java.sql.*" %>
|
|
<%@ page import="java.util.Vector" %>
|
|
|
|
<%
|
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de historico volantes ingreso (med/historico_volantes.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 página de historico volantes ingreso (med/historico_volantes.jsp)");
|
|
|
|
try
|
|
{
|
|
|
|
// Definicion de variables
|
|
String strFile = "Ingreso_" + ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
|
int intImpresion = 0;
|
|
|
|
String strParametroMenu="";
|
|
String strCampoNombre="";
|
|
StringBuffer strSql = new StringBuffer();
|
|
int intPagina=0;
|
|
Object aCondiciones[]=null;
|
|
boolean borrados = false;
|
|
String ver_borrados = "";
|
|
|
|
//Obtención del perfil del usuario conectado
|
|
StringBuffer perfil = new StringBuffer();
|
|
perfil.append("|");
|
|
perfil.append(sesion.getAttribute("PERFIL"));
|
|
perfil.append("|");
|
|
|
|
//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 descripcion para las busquedas
|
|
if (request.getParameter("nombre")!=null)
|
|
strCampoNombre = (String)request.getParameter("nombre");
|
|
|
|
//parametro pagina para realizar la paginacion
|
|
if (request.getParameter("pagina")!=null)
|
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
|
|
|
//parametro impresion que nos indica que se ha de realizar una impresion
|
|
if (request.getParameter("imp")!=null) {
|
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
|
}
|
|
|
|
if(request.getParameter("borrados")!=null){
|
|
borrados = true;
|
|
ver_borrados = "disabled=\"disabled\"";
|
|
}
|
|
|
|
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>Gestión Perfiles</title>
|
|
<link rel="shortcut icon" href="../../img/logo.ico" />
|
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
|
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
|
|
|
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
|
<script language="JavaScript" src="../../js/funciones.js"></script>
|
|
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
|
<script language="JavaScript" src="../../js/menu_med.js"></script>
|
|
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
|
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
|
</head>
|
|
<script language="javascript" type="text/javascript">
|
|
<!--
|
|
function imprimir(valor)
|
|
{
|
|
obj=document.getElementById(valor);
|
|
obj.submit();
|
|
}
|
|
|
|
function eliminar(valor)
|
|
{
|
|
obj=document.getElementById(valor);
|
|
/*if(confirm('Seguro que deseas borrar el volante??'))
|
|
{
|
|
obj.submit();
|
|
}*/
|
|
modal({
|
|
type : 'confirm',
|
|
title : '¡Atención!',
|
|
text : '¿Seguro que deseas borrar el volante?',
|
|
callback: function(result){
|
|
if (result){
|
|
obj.submit();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function comprobarImpresion(impresion)
|
|
{
|
|
if (impresion==1) {//se efectua la impresion
|
|
var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strFile%>.pdf',"<%=strFile%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
|
}
|
|
}
|
|
|
|
//-->
|
|
</script>
|
|
</head>
|
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
|
<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="<%=request.getContextPath()%>/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="<%=request.getContextPath()%>/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="<%=request.getContextPath()%>/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="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
|
<table>
|
|
<%if(!borrados){ %>
|
|
<tr><td><a href="<%=request.getContextPath()%>/jsp/med/historico_volantes.jsp?x=<%=strParametroMenu %>&borrados=1" class="enlace">Ver borrados</a></td></tr>
|
|
<%
|
|
}
|
|
else
|
|
{
|
|
%><tr><td><a href="<%=request.getContextPath()%>/jsp/med/historico_volantes.jsp?x=<%=strParametroMenu %>" class="enlace">Ocultar borrados</a></td></tr><%
|
|
}
|
|
PersistenciaTavolin perTavol = new PersistenciaTavolin();
|
|
Vector vSeleccion = new Vector();
|
|
if(borrados)
|
|
vSeleccion = perTavol.volantes_por_prescriptor(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), intPagina, 1);
|
|
else
|
|
vSeleccion = perTavol.volantes_por_prescriptor(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), intPagina);
|
|
|
|
if(vSeleccion.size() > 0)
|
|
{
|
|
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
|
%>
|
|
<tr>
|
|
<td colspan="3" align="right"><span class="txt">Página de </span></td>
|
|
</tr>
|
|
<%
|
|
}
|
|
%>
|
|
<tr><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto Médico</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Motivo Ingreso</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Juicio diagnóstico</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td></tr>
|
|
<%
|
|
String estilo = "";
|
|
for(int i = 0; i < vSeleccion.size(); i++)
|
|
{
|
|
if (i % 2 == 0)
|
|
{
|
|
estilo = "filaA";
|
|
}
|
|
else
|
|
{
|
|
estilo = "filaB";
|
|
}
|
|
Tavolin tavol = (Tavolin)vSeleccion.elementAt(i);
|
|
PersistenciaTtactmed perta = new PersistenciaTtactmed();
|
|
Integer especialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
|
String fecha = tavol.get_fecha().toString().substring(8, 10)+"/"+tavol.get_fecha().toString().substring(5, 7)+"/"+tavol.get_fecha().toString().substring(0, 4);
|
|
%>
|
|
<tr valign="center" class="trResultados"><form name="frmtavolin<%=i %>" id="frmtavolin<%=i %>" action="<%=request.getContextPath() %>/servlet/GestorPacientes?x=<%=strParametroMenu %>&imp=1" method="post"><td class="<%=estilo %>"><%=tavol.get_nombre() %></td><td class="<%=estilo%>"><%=perta.obtenerNombreActo(tavol.get_acto(), especialidad) %></td><td class="<%=estilo%>"><%=perta.obtenerDescripcionMotivoIngreso(tavol.get_motivo()) %></td><td class="<%=estilo%>"><%=tavol.get_juicio() %></td><td class="<%=estilo%>"><%=fecha %></td><td class="<%=estilo%>"><input type="submit" <%=ver_borrados %> name="aceptar" value="OK/Imprimir" class="txt"></td>
|
|
<input type="hidden" name="nom_paciente" value="<%=tavol.get_nombre() %>"/>
|
|
<input type="hidden" name="fec_paciente" value="<%=tavol.get_fecnac() %>"/>
|
|
<input type="hidden" name="poliza" value="<%=tavol.get_poliza()%>"/>
|
|
<input type="hidden" name="dir_paciente" value="<%=tavol.get_domicilio() %>"/>
|
|
<input type="hidden" name="nif_paciente" value="<%=tavol.get_nif() %>"/>
|
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_IMPRIMIR_VOLANTE_INGRESO %>"/>
|
|
<input type="hidden" name="acto_medico" value="<%=tavol.get_acto() %>"/>
|
|
<input type="hidden" name="motivo_ingreso" value="<%=tavol.get_motivo() %>"/>
|
|
<input type="hidden" name="diagnostico" value="<%=tavol.get_juicio() %>"/>
|
|
<input type="hidden" name="tarjeta" value="<%=tavol.get_tarjeta() %>"/>
|
|
</form>
|
|
<td class="<%=estilo%>"><form name="eliminar_volante" id="eliminar_volante<%=i %>" action="<%=request.getContextPath() %>/servlet/GestorPacientes?x=<%=strParametroMenu %>&imp=1" method="post"><input type="hidden" name="pk" value="<%=tavol.get_pk() %>"/><input type="button" value="Eliminar" <%=ver_borrados %> class="txt" onclick="eliminar('eliminar_volante<%=i %>')"/><input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_BORRAR_VOLANTE_INGRESO %>"/></form></td>
|
|
</tr>
|
|
<%
|
|
}
|
|
}
|
|
else
|
|
{
|
|
%>
|
|
<tr><td class="txt"><%=pertamensaje.obtenerMensaje(19).getMensaje() %></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 de historico de volantes de ingreso (med/historico_volantes.jsp)");
|
|
}
|
|
%> |