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
+343
View File
@@ -0,0 +1,343 @@
<%@ 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" %>
<%
/* LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de actos médicos (med/actos.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 actos médicos (med/actos.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strCampoNombre="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa();
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
//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"));
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>Actos Médicos</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/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function informarParametroCampoBusqueda()
{
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
//no kaske, ya que en esa asignacion se utiliza comillas simples
<%
String strCampoNombreAux=strCampoNombre.replace('\'', '~');
%>
//cogemos el valor del campo de busqueda sin comillas simples
var lstCampoBusqueda = '<%=strCampoNombreAux%>';
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
while(lstCampoBusqueda.indexOf("~")!=-1)
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
document.frmActosMedicos.nombre.value=lstCampoBusqueda;
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function buscar()
{
document.frmActosMedicos.pagina.value=1;
pasarAMayusculas(document.frmActosMedicos.nombre);
document.frmActosMedicos.submit();
}
function paginacion(pagina)
{
document.frmActosMedicos.pagina.value=pagina;
pasarAMayusculas(document.frmActosMedicos.nombre);
document.frmActosMedicos.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:informarParametroCampoBusqueda()">
<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="<%=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="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<form name="frmActosMedicos" action="actos.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
<td colspan="3">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Descripción: </span></td>
<td><input type="text" size="50" name="nombre" class="txt"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<%
PersistenciaTtactmed per = new PersistenciaTtactmed();
Vector vSeleccion = per.listadoActosMedico(intTarifa, intEspecialidad, strCampoNombre, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Importe</td>
</tr>
<%
Ttactmed TTACTMED = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
TTACTMED = (Ttactmed)vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="left"><%=TTACTMED.getDescripcion()%></td>
<td class="<%=estilo%>" align="center"><%=TTACTMED.getActo()%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(TTACTMED.getPrecio(),PersistenciaParametros.decimales)%></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 (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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(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 gestión de actos médicos (med/gestor.jsp)");
}
%>
+604
View File
@@ -0,0 +1,604 @@
<%@ page import="com.tarisan.control.*" %>
<%@ page import="com.tarisan.control.PersistenciaVTaprescaTaclient" %>
<%@ 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.text.SimpleDateFormat" %>
<%@ page import="java.math.BigDecimal"%>
<%@ page import="java.util.Calendar" %>
<%@ page import="java.io.*" %>
<%
// LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p&aacute;gina de analisis (med/analisis.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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p&aacute;gina de analisis (med/analisis.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strApe1="";
String strApe2="";
String strNom="";
Calendar calFechaAnalisis = Calendar.getInstance();
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
StringBuffer strSql_requestid = new StringBuffer();
StringBuffer strSql = new StringBuffer();
int intPagina = 0;
int pteExtraccion = 0; /* Indica si la anal&iacute;tica esta pte de extraccion para indicarlo en el apartado de regenerar pdf */
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
Object aCondiciones[]=null;
//Obtenci&oacute;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 pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
if (request.getParameter("ap1")!=null)
strApe1=(String)request.getParameter("ap1");
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
if (request.getParameter("ap2")!=null)
strApe2=(String)request.getParameter("ap2");
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
if (request.getParameter("nom")!=null)
strNom=(String)request.getParameter("nom");
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
/*Vector vTamensajes = new Vector();
String strCodigos = "6,7";
vTamensajes = pertamensaje.obtenerMensajes(strCodigos);
pertamensaje.obtenerMensaje(10).getMensaje();*/
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>An&aacute;lisis</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/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmAnalisis.pagina.value=pagina;
document.frmAnalisis.ap1.value=document.getElementById("buscar_apellido1").value.toUpperCase();
document.frmAnalisis.ap2.value=document.getElementById("buscar_apellido2").value.toUpperCase();
document.frmAnalisis.nom.value=document.getElementById("buscar_nombre").value.toUpperCase();
document.frmAnalisis.submit();
}
function enviar_frmAnalitica(valor)
{
obj=document.getElementById(valor);
obj.submit();
}
function buscarPaciente(){
document.frmAnalisis.ap1.value=document.getElementById("buscar_apellido1").value.toUpperCase();
document.frmAnalisis.ap2.value=document.getElementById("buscar_apellido2").value.toUpperCase();
document.frmAnalisis.nom.value=document.getElementById("buscar_nombre").value.toUpperCase();
document.frmAnalisis.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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&oacute;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&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;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 width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<form name="frmAnalisis" action="analisis.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
<input type="hidden" name="ap1" value="">
<input type="hidden" name="ap2" value="">
<input type="hidden" name="nom" value="">
</form>
<tr>
<td colspan="4" align="center" style="background-color:#EBEBEB">
<span class="txtnegrita" align="right">Apellido1: </span>
<input size="15" id="buscar_apellido1" name="buscar_apellido1" class="txt" value="<%=strApe1%>" maxlength="50" type="text">
<span class="txtnegrita" align="right">Apellido2: </span>
<input size="15" id="buscar_apellido2" name="buscar_apellido2" class="txt" value="<%=strApe2%>" maxlength="50" type="text">
<span class="txtnegrita" align="right">Nombre: </span>
<input size="15" id="buscar_nombre" name="buscar_nombre" class="txt" value="<%=strNom%>" maxlength="50" type="text">
<a href="javascript:buscarPaciente()" class="enlace">Buscar</a>
</td>
</tr>
<%
//Creaci&oacute;n de la tabla presentaci&oacute;n de resultados
PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico();
//Vector vSeleccion = per.listado_analiticas_por_medico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), dtFechaAnalisis, intPagina);
Vector vSeleccion = per.listado_analiticas_por_medico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), dtFechaAnalisis, strApe1, strApe2, strNom, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(10).getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="4" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver Resultados</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Regenerar Resultados</td>
</tr>
<%
//VTaresanaTaclient vTaresanaTaclient = null;
VTaresanaTamedico vTaresanaTamedico = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
//vTaresanaTaclient = (VTaresanaTaclient)vSeleccion.elementAt(i);
vTaresanaTamedico = (VTaresanaTamedico)vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<%
if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
{
%>
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
<td class="<%=estilo%>" align="left"><%=/*vTaresanaTaclient.getNombre() + " " + */vTaresanaTamedico.getApellidos()%></td>
<%
}
else //campo autorizacion tiene un valor valido
{
%>
<td class="<%=estilo%>" align="center">
<%
String peticion = ""+vTaresanaTamedico.getAutorizacion();
String peticionE = ""+vTaresanaTamedico.getAutorizacionEncriptada();
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_analiticas;
File ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la nueva ubicaci&oacute;n
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="4"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%>" class="enlacePeticion"></input>
</form>
<%
}else{
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la ubicaci&oacute;n vieja
{
%>
<form name="frmPeticiones" 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="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%>" class="enlacePeticion"></input>
</form>
<%
}else{
%>
<span align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></span>
<%
}
}
%>
</td>
<td class="<%=estilo%>" align="center">
<%
String nombreCompleto = "";
if ((""+vTaresanaTamedico.getAutorizacion()).startsWith(""+((Usuario)sesion.getAttribute("USUARIO")).getMedico())){
nombreCompleto = vTaresanaTamedico.getApellidos();
}else{
nombreCompleto = vTaresanaTamedico.getApellidos()+" "+vTaresanaTamedico.getNombre();
}
ruta = ParametrosConfiguracion.ruta_pdf_peticiones_analiticas;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la nueva ubicaci&oacute;n
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="4"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=nombreCompleto%>" class="enlacePeticion"></input>
</form>
<%
}else{
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la ubicaci&oacute;n vieja
{
%>
<form name="frmPeticiones" 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="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=nombreCompleto%>" class="enlacePeticion"></input>
</form>
<%
}else{
%>
<span align="center"><%=nombreCompleto%></span>
<%
}
}
%>
</td>
<td class="<%=estilo%>" align="center">
<%
String resultado = ""+vTaresanaTamedico.getAutorizacion();
String resultadoE = vTaresanaTamedico.getAutorizacionEncriptada();
String igualadaE = ""+vTaresanaTamedico.getIgualadaEncriptada();
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
/*if(usu.getMedico() == vTaresanaTamedico.getPrescriptor())
{*/
if (vTaresanaTamedico.getExtraccion()==0 || vTaresanaTamedico.getExtraccion()==2){ // Mirar si la anal&iacute;tica est&aacute; pendiente de extracci&oacute;n
if(vTaresanaTamedico.getIgualada().compareTo("0") != 0){ //Comprobar si se trata de una autorizaci&oacute;n que est&aacute; en Tarisan y GPC
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getIgualada()*/igualadaE%>">
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form>
<%
}else{
if(vTaresanaTamedico.isPeticionConGuion())
{
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizacion con gui&oacute;n");
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getAutorizacion()*/resultadoE%>">
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form>
<%
}
else if(vTaresanaTamedico.getAutorizacion() < 999999 && !(vTaresanaTamedico.getAutorizacion()>700000 && vTaresanaTamedico.getAutorizacion()<799999))
{
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizacion < 999999");
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getAutorizacion()*/resultadoE%>">
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form>
<%
}
else{
//PAC.ruta_pdf
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_analiticas;
File fichero = new File(direccion+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="1"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
fichero = new File(direccion+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="1"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
direccion = ParametrosConfiguracion.ruta_pdf_resultados;
fichero = new File(direccion+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="16"/>
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
fichero = new File(direccion+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="16"/>
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><% //Resultados Pendientes
}
}
}
}
}
}
}else if(vTaresanaTamedico.getExtraccion()==3){
/* Controlamos las peticiones anuladas desde GPC */
pteExtraccion = 3;
%><p>Petici&oacute;n anulada en GPC</p><%
}
else {
pteExtraccion = 1;
%><p>Pendiente de Extracci&oacute;n</p><%
}
%>
<td class="<%=estilo%>" align="center">
<%
if(usu.getMedico() == vTaresanaTamedico.getPrescriptor() && pteExtraccion==0)
{
if(vTaresanaTamedico.getIgualada().compareTo("0") != 0){ //Comprobar si se trata de una autorizaci&oacute;n que est&aacute; en Tarisan y GPC
//File fichero = new File(ParametrosConfiguracion.ruta_pdf_resultados_analiticas+Long.valueOf(igua.toString())+".pdf");
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*igua*/igualadaE%>">
<input type="hidden" name="borrarPDF" value="1">
<input type="submit" value="Regenerar" class="enlace"></input>
</form>
<%
}else{
if(vTaresanaTamedico.getAutorizacion() < 999999 && !(vTaresanaTamedico.getAutorizacion()>700000 && vTaresanaTamedico.getAutorizacion()<799999)) //Comprobar si es de izasa
{
//File fichero = new File(ParametrosConfiguracion.ruta_pdf_resultados_analiticas+Long.valueOf(vTaresanaTamedico.getAutorizacion()).toString()+".pdf");
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getAutorizacion()*/resultadoE%>">
<input type="hidden" name="borrarPDF" value="1">
<input type="submit" value="Regenerar" class="enlace"></input>
</form>
<%
}else{
%><p>PDF no regenerable</p><%
}
}
}
else
{
pteExtraccion = 0;
%><p>PDF no regenerable</p><%//Pendiente de Autorizaci&oacute;n del paciente
}
%>
</td>
</td>
<%
strSql_requestid.delete(0,strSql_requestid.length());
}
%>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="4"></td></tr>
<tr>
<td colspan="4">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">&uacute;ltimo</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
<input type="hidden" name="tipo" value="1"/>
<input type="hidden" name="nombrePDF" value="" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
</form>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p&aacute;gina de analisis (med/analisis.jsp)");
}
%>
+509
View File
@@ -0,0 +1,509 @@
<%@ page import="com.tarisan.control.*" %>
<%@ page import="com.tarisan.control.PersistenciaVTaprescaTaclient" %>
<%@ 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.util.DES" %>
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.Vector" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.math.BigDecimal"%>
<%@ page import="java.util.Calendar" %>
<%@ page import="java.io.*" %>
<%
// LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de anatomía patológica (med/ap.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 anatomía patológica (med/ap.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
Calendar calFechaAnalisis = Calendar.getInstance();
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
StringBuffer strSql_requestid = new StringBuffer();
StringBuffer strSql = new StringBuffer();
int intPagina = 0;
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
Object aCondiciones[]=null;
//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 pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
/*Vector vTamensajes = new Vector();
String strCodigos = "6,7";
vTamensajes = pertamensaje.obtenerMensajes(strCodigos);
pertamensaje.obtenerMensaje(10).getMensaje();*/
boolean directorioListado = false;
Vector<String> archivos = new Vector<String>();
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>Anatomía Patológica</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/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmAnalisis.pagina.value=pagina;
document.frmAnalisis.submit();
}
function enviar_frmAnalitica(valor)
{
obj=document.getElementById(valor);
obj.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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="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 width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<form name="frmAnalisis" action="ap.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//Creación de la tabla presentación de resultados
PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico();
Vector vSeleccion = per.listado_anatomia_por_medico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), dtFechaAnalisis, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(10).getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver Resultados</td>
</tr>
<%
//VTaresanaTaclient vTaresanaTaclient = null;
VTaresanaTamedico vTaresanaTamedico = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
//vTaresanaTaclient = (VTaresanaTaclient)vSeleccion.elementAt(i);
vTaresanaTamedico = (VTaresanaTamedico)vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<%
if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
{
%>
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
<td class="<%=estilo%>" align="left"><%=/*vTaresanaTaclient.getNombre() + " " + */vTaresanaTamedico.getApellidos()%></td>
<%
}
else //campo autorizacion tiene un valor valido
{
%>
<td class="<%=estilo%>" align="center">
<%
String peticion = ""+vTaresanaTamedico.getAutorizacion();
String peticionE = ""+vTaresanaTamedico.getAutorizacionEncriptada();
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_ap;
File ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="6"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%>" class="enlacePeticion"></input>
</form>
<%
}else{
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la ubicación vieja
{
%>
<form name="frmPeticiones" 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="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%>" class="enlacePeticion"></input>
</form>
<%
}else{
%>
<span align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></span>
<%
}
}
%>
</td>
<td class="<%=estilo%>" align="center">
<%
ruta = ParametrosConfiguracion.ruta_pdf_peticiones_ap;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="6"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=vTaresanaTamedico.getApellidos()%>" class="enlacePeticion"></input>
</form>
<%
}else{
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la ubicación vieja
{
%>
<form name="frmPeticiones" 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="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=vTaresanaTamedico.getApellidos()%>" class="enlacePeticion"></input>
</form>
<%
}else{
%>
<span align="center"><%=vTaresanaTamedico.getApellidos()%></span>
<%
}
}
%>
</td>
<td class="<%=estilo%>" align="center">
<%
String resultado = ""+vTaresanaTamedico.getAutorizacion();
String resultadoE = vTaresanaTamedico.getAutorizacionEncriptada();
String igualadaE = ""+vTaresanaTamedico.getIgualadaEncriptada();
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
if(usu.getMedico() == vTaresanaTamedico.getPrescriptor())
{
if(vTaresanaTamedico.getEpisodio()!=0){
String episodio = ""+vTaresanaTamedico.getEpisodio();
String episodioE = ""+vTaresanaTamedico.getEpisodioEncriptado();
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia_CSM;
/*if (!directorioListado){
archivos = Utilidades.buscar_ficheros_directorio(direccion);
directorioListado = true;
}
Vector<String> children = Utilidades.buscar_ficheros_array(episodio, archivos);*/
/*String[] children = Utilidades.buscar_ficheros3(episodio,direccion);*/
Vector<String> children = Utilidades.buscar_ficheros(episodio,direccion);
if (children.size()==0) {
%><p>No hay PDF</p><%
}
else {
for (int f=0; f < children.size() ; f++) {
String filename = children.elementAt(f);
DES encrypter = new DES(""+((Usuario)sesion.getAttribute("USUARIO")).getMedico());
String dirE = encrypter.encrypt(filename);
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="21"/>
<input type="hidden" name="nombrePDF" value="<%=dirE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
}
}else{
//PAC.ruta_pdf
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia;
File fichero = new File(direccion+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="2"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
fichero = new File(direccion+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="2"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
direccion = ParametrosConfiguracion.ruta_pdf_resultados;
fichero = new File(direccion+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="16"/>
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
fichero = new File(direccion+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="16"/>
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
%><p>No hay PDF<!-- < %=/*pertamensaje.obtenerMensaje(6).getMensaje()*/ %>--></p><% //Resultados Pendientes
}
}
}
}
}
}
else
{
%>
<p><%=pertamensaje.obtenerMensaje(7).getMensaje() %></p>
<%
}
%>
</td>
<%
strSql_requestid.delete(0,strSql_requestid.length());
}
%>
</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 (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
<input type="hidden" name="tipo" value="1"/>
<input type="hidden" name="nombrePDF" value="" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
</form>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de anatomía patológica (med/ap.jsp)");
}
%>
+396
View File
@@ -0,0 +1,396 @@
<%@ 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" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de peticiones capturadas (med/peticiones_capturadas.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 buscar pacientes (med/buscar_paciente.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strCampoFecha="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
int intBuscarPaciente=0;
String intIdentificador="";
String troquelado = "";
String mensajeNoEncontrado = "";
Object aCondiciones[]=null;
int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa();
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
//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("fecha")!=null)
strCampoFecha = (String)request.getParameter("fecha");
//parametro pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
//parametro pagina para realizar la paginacion
if (request.getParameter("buscarPaciente")!=null)
intBuscarPaciente=Integer.parseInt(request.getParameter("buscarPaciente"));
troquelado = (String)request.getParameter("troque");
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
String ape = "";
String nom = "";
String dir = "";
String fec = "";
String tel = "";
String nif = "";
String ent = "";
String tar = "";
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>Peticiones capturadas</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<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-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function seleccionar(nom,ape,dir,fec,tel,nif,ent,tar){
document.frm_seleccionar.nom.value = nom;
document.frm_seleccionar.ape.value = ape;
document.frm_seleccionar.dir.value = dir;
document.frm_seleccionar.fec.value = fec;
document.frm_seleccionar.tel.value = tel;
document.frm_seleccionar.nif.value = nif;
document.frm_seleccionar.ent.value = ent;
document.frm_seleccionar.tar.value = tar;
document.frm_seleccionar.submit();
}
function paginacion(pagina,tro)
{
document.frm_buscar.pagina.value = pagina;
document.frm_buscar.troque.value = tro;
document.frm_buscar.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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>
<table border="0" align="center" width="100%">
<form name="frm_buscar" action="buscar_paciente.jsp?x=16" method="post">
<input type="hidden" name="pagina" value="">
<input type="hidden" name="troque" value="">
</form>
<!-- Presentacion de los resultados -->
<%
//Se ha pulsado en Buscar Paciente
PersistenciaTapecap per = new PersistenciaTapecap();
Tapecap tapecap = null;
Vector vSeleccion = per.buscarPaciente(troquelado, intPagina);
if (vSeleccion==null || vSeleccion.size()==0) //No se han encontrado datos
{%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt">No se ha encontrado el paciente</span></td>
</tr>
<%
}
else //no existe un analisis previo. Se muestran los datos de la prescripcion.
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="8" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Direccion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha Nacimiento</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Telefono</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Dni</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Compañia</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Tarjeta</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Seleccionar</td>
</tr>
<%
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
tapecap = (Tapecap)vSeleccion.elementAt(i);
if (tapecap.getApellidos()!=null){
ape = tapecap.getApellidos();
}
if (tapecap.getNombre()!=null){
nom = tapecap.getNombre().trim();
}
if (tapecap.getDireccion()!=null){
dir = tapecap.getDireccion();
}
if (tapecap.getFecha_nac()!=null){
fec = tapecap.getFecha_nac().toString();
/*fec = fec.replace('/','-');*/
String[] arrFecha = fec.split("-");
fec = arrFecha[2] + "-" + arrFecha[1] + "-" + arrFecha[0];
}
if (tapecap.getTelefono()!=null){
tel = tapecap.getTelefono().trim();
}
if (tapecap.getNif()!=null){
nif = tapecap.getNif().trim();
}
if (tapecap.getCompañia()!=null){
ent = tapecap.getCompañia();
}
if (tapecap.getIdentificador()!=null){
tar = tapecap.getIdentificador();
}
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=nom + " " + ape%></td>
<td class="<%=estilo%>" align="left"><%=dir%></td>
<td class="<%=estilo%>" align="center"><%=fec%></td>
<td class="<%=estilo%>" align="left"><%=tel%></td>
<td class="<%=estilo%>" align="center"><%=nif%></td>
<td class="<%=estilo%>" align="left"><%=ent%></td>
<td class="<%=estilo%>" align="left"><%=tar%></td>
<td class="<%=estilo%>" align="center"><a href="javascript:seleccionar('<%=nom%>','<%=ape%>','<%=dir%>','<%=fec%>','<%=tel%>','<%=nif%>','<%=ent%>','<%=tar%>')" class="enlace">Seleccionar</a></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="8">
<table border="0" align="center">
<tr>
<%if (per.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,'<%=troquelado%>')" class="enlace">primero</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>,'<%=troquelado%>')" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>,'<%=troquelado%>')" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>,'<%=troquelado%>')" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="8" align="center">
<form name="frmVolver" action="introducir_paciente.jsp?x=16&pagina=1" method="post">
<input type="submit" value="Volver" class="enlace">
</form>
</td>
</tr>
<form name="frm_seleccionar" action="introducir_paciente.jsp?x=16&pagina=1" method="post" >
<input type="hidden" name="pagina" value="1" />
<input type="hidden" name="buscarPaciente" value="1" />
<input type="hidden" name="troque" value="" />
<input type="hidden" name="nom" value="" />
<input type="hidden" name="dir" value="" />
<input type="hidden" name="fec" value="" />
<input type="hidden" name="tel" value="" />
<input type="hidden" name="nif" value="" />
<input type="hidden" name="ent" value="" />
<input type="hidden" name="ape" value="" />
<input type="hidden" name="tar" value="" />
</form>
</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(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 buscar pacientes (med/buscar_paciente.jsp)");
}
%>
+426
View File
@@ -0,0 +1,426 @@
<%@ 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" %>
<%@ page import="java.io.*" %>
<%
// LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de cabecera (med/cabecera.jsp)");
response.setHeader("Expires", "0");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
HttpSession sesion = request.getSession(true);
String mensaje = "";
mensaje = (String)sesion.getAttribute("MSG");
sesion.setAttribute("MSG", "");
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 cabecera (med/cabecera.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
Usuario usuario = (Usuario)sesion.getAttribute("USUARIO");
int intMedico=((Usuario)sesion.getAttribute("USUARIO")).getMedico();
int intEspecialidad=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
String strNombre = "";
String strDireccion = "";
String strPoblacion = "";
String strTelefono = "";
String strColegiado = "";
String strEspe = "";
String strErrorLogo = "";
String strEmail = "";
Integer intEmail = 0;
//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 err para controlar los errores del logotipo al subirlo al servidor
if (request.getParameter("err")!=null)
strErrorLogo=(String)request.getParameter("err");
//parametro intEmail para poner el focus en el email
if (request.getParameter("email")!=null){
intEmail=Integer.parseInt(request.getParameter("email"));
}
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>Cabecera</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/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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function enviar()
{
elem=document.getElementsByName("ch");
if (elem[0].checked && elem[1].checked) {
//alert("Debe marcar una sola posición para el logotipo");
modal({type:'error',title:'¡Atención!',text:'Debe marcar una sola posición para el logotipo.',});
}
else if( (document.getElementById("verImagen").title!="") && (!elem[0].checked && !elem[1].checked) ){
//alert("Debe marcar una posición para el logotipo");
modal({type:'error',title:'¡Atención!',text:'Debe marcar una posición para el logotipo.',});
}
else if( (document.getElementById("verImagen").title=="") && (elem[0].checked || elem[1].checked) ){
//alert("No puedes marcar una posición porque no tienes seleccionado ningun logotipo");
modal({type:'error',title:'¡Atención!',text:'No puedes marcar una posición porque no tienes seleccionado ningun logotipo.',});
for(i=0;i<elem.length;i++) {
if (elem[i].checked) {
elem[i].checked = false;
}
}
}else{
if (elem[0].checked) {
document.frmCabecera.valor_logo_cab.value = elem[0].value;
}else if (elem[1].checked) {
document.frmCabecera.valor_logo_cab.value = elem[1].value;
}
if ((document.frmCabecera.valor_email_cab.value != "") && (!validarEmail(document.frmCabecera.valor_email_cab.value))){
modal({type:'error',title:'¡Atención!',text:'Debe introducir una direccion de correo válida.',callback: function(result){document.frmCabecera.valor_email_cab.focus();}});
}else{
document.frmCabecera.submit();
}
}
}
function eliminarLogo()
{
document.frmLogo.eliminar.value = 1;
document.frmLogo.submit();
}
function posicionarLogotipo()
{
elem=document.getElementsByName("ch");
for(i=0;i<elem.length;i++) {
if (elem[i].checked) { // objeto marcado
/*if (i==0){
elem[1].checked=false; // izquierda
}else{
elem[0].checked=false; // derecha
}*/
resultado = elem[i].value;
}
}
document.frmCabecera.valor_logo_cab.value = resultado;
}
-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td align="center" class="txtnegrita">
<%
if (mensaje!="" && mensaje!=null){ //Mostrar mensaje de cambios guardados ok
%>
<p style="color:blue"><%=mensaje %></p>
<%
}
%>
</td>
</tr>
<!-- PRUEBA DEL WEB SERVICE DE APEX //-->
<!--
<tr><td colspan="2"><a href="https://192.168.1.102:8181/ords/comercial/agentes" class="enlace">Probar restful sin parametro</a></td></tr>
<tr><td colspan="2"><a href="https://192.168.1.102:8181/ords/comercial/datos_agente/1" class="enlace">Probar restful con parametro</a></td></tr>
<tr><td colspan="2"><a href="https://192.168.1.102:8181/ords/comercial/actualizar/690369592" class="enlace">Probar restful procedure</a></td></tr>
<tr><td colspan="2">&nbsp;</td></tr> //-->
<%PersistenciaTamedico per = new PersistenciaTamedico(); %>
<tr>
<form name="frmCabecera" action="../../servlet/GestorMedicos" method="post">
<input type="hidden" name="x" value="<%=strParametroMenu%>">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ACTUALIZAR_CABECERA%>">
<input type="hidden" name="valor_logo_cab" value="" />
<td>
<table border="0" align="center">
<tr>
<td align="right"><span class="txtnegrita">Nombre: </span></td>
<td><input type="text" size="50" name="valor_nombre_cab" class="txt" value="<%=usuario.getNombreCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Dirección: </span></td>
<td><input type="text" size="80" name="valor_direccion_cab" class="txt" value="<%=usuario.getDireccionCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Población: </span></td>
<td><input type="text" size="50" name="valor_poblacion_cab" class="txt" value="<%=usuario.getPoblacionCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Teléfono: </span></td>
<td><input type="text" size="30" name="valor_telefono_cab" class="txt" value="<%=usuario.getTelefonoCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Email: </span></td>
<td><input type="text" size="30" name="valor_email_cab" class="txt" value="<%=usuario.getEmailCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Nº de colegiado: </span></td>
<td><input type="text" size="50" name="valor_Colegiado_cab" class="txt" value="<%=usuario.getColegiadoCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Especialidad: </span></td>
<td><input type="text" size="60" name="valor_especialidad_cab" class="txt" value="<%=usuario.getEspecialidadCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"></td>
<td></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita"></span></td>
</tr>
<tr>
<td colspan="2" align="center"><a href="javascript:frmCabecera.reset()" class="enlace">Deshacer</a>&nbsp;&nbsp;&nbsp;<a href="javascript:enviar()" class="enlace">Aceptar</a></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<table border="0" align="center">
<fieldset style="border:1px solid #D8D8D8; width:80%; margin:0 auto">
<legend><span class="txtnegrita">Logotipo</span></legend>
<div style="float:left">
<fieldset style="border:1px solid #D8D8D8">
<legend>Posición Recetas</legend>
<form name="frmPosicionLogo" action="javascript:posicionarLogotipo()">
<input type="checkbox" name="ch" onclick="this.form.submit();" value="I" <%=((per.obtenerPosicionLogotipo(intMedico)!=null) && (per.obtenerPosicionLogotipo(intMedico).equals("I")))?"checked=checked":"" %>/>IZQUIERDA<br/>
<input type="checkbox" name="ch" onclick="this.form.submit();" value="D" <%=((per.obtenerPosicionLogotipo(intMedico)!=null) && (per.obtenerPosicionLogotipo(intMedico).equals("D")))?"checked=checked":"" %>/>DERECHA
</form>
</fieldset>
</div>
<div style="float:left">
<form name="frmLogo" enctype="multipart/form-data" action="../../../JavaBridgeTemplate621/uploader3.php" method="POST">
<input name="uploadedfile" type="file" /><br/><br/>
<input type="submit" value="Subir logotipo" />
<input type="hidden" name="medico" value="<%=intMedico %>" />
<input type="hidden" name="eliminar" value="" />
</form>
<br/><br/>
<a href="javascript:eliminarLogo()" class="enlace">Eliminar</a>
</div>
<div style="float:right">
<%
File imagenJPG = new File(ParametrosConfiguracion.ruta_logotipos+"/"+intMedico+".jpg");
File imagenPNG = new File(ParametrosConfiguracion.ruta_logotipos+"/"+intMedico+".png");
File imagenGIF = new File(ParametrosConfiguracion.ruta_logotipos+"/"+intMedico+".gif");
File imagenBMP = new File(ParametrosConfiguracion.ruta_logotipos+"/"+intMedico+".bmp");
if(imagenJPG.exists())
{
//mostrar el logotipo del médico
%>
<img id="verImagen" title=1 src="../../logotipos/<%=intMedico%>.jpg" width="80" height="80" style="border:1px solid grey" hspace="20"></img>
<%
}else if(imagenPNG.exists())
{
%>
<img id="verImagen" title=2 src="../../logotipos/<%=intMedico%>.png" width="80" height="80" style="border:1px solid grey" hspace="20"></img>
<%
}
else if(imagenGIF.exists())
{
%>
<img id="verImagen" title=3 src="../../logotipos/<%=intMedico%>.gif" width="80" height="80" style="border:1px solid grey" hspace="20"></img>
<%
}
else if(imagenBMP.exists())
{
%>
<img id="verImagen" title=4 src="../../logotipos/<%=intMedico%>.bmp" width="80" height="80" style="border:1px solid grey" hspace="20"></img>
<%
}
else{
//mostrar cuadrado en blanco
%>
<img id="verImagen" title="" src="" width="80" height="80" style="border:0.5px solid grey" hspace="20"></img>
<%
}
%>
</div>
<br/>
</fieldset>
<tr>
<td align="left" class="menuOn">
<%
if (strErrorLogo!=""){ //Mostrar mensaje de error de subida del logo
%>
<h3><%=strErrorLogo %></h3>
<%
}
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<% if (intEmail==1)//Controlar si hay que poner el focus en algun textbox
{
%>
<script language="javascript" type="text/javascript">
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "#FFAAAA"; }, 500);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "white"; }, 1000);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "#FFAAAA"; }, 1500);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "white"; }, 2000);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "#FFAAAA"; }, 2500);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "white"; }, 3000);
document.frmCabecera.valor_email_cab.focus();
</script>
<%
intEmail=0;
} %>
<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(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 cabecera (med/cabecera.jsp)");
}
%>
+363
View File
@@ -0,0 +1,363 @@
<%@ 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.util.Calendar" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="com.tarisan.util.DES" %>
<%
// LogTarisan.logger.log(NivelLog.INFO, "Inicio p墔ina detalle IRPF (med/detalleIRPF.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鏮 invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p墔ina detalle IRPF (med/detalleIRPF.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strCampoAnio=String.valueOf(Calendar.getInstance().get(Calendar.YEAR));
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
//Obtenci鏮 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("anio")!=null)
strCampoAnio = (String)request.getParameter("anio");
//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
int intImpresion = 0;
if (request.getParameter("imp")!=null) {
intImpresion = Integer.parseInt(request.getParameter("imp"));
}
//atributo ENC que obtiene la peticion encriptada
String irpfE = "";
if (sesion.getAttribute("ENC")!=null) {
irpfE = (String)sesion.getAttribute("ENC");
sesion.removeAttribute("ENC");
}
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>I.R.P.F.</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/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function buscar()
{
var anio = document.frmDetalleIrpf.anio.value;
if ((anio.length<4 || !soloNumeros(anio)) && anio!="")
{
//alert("El a隳 debe ser un valor num廨ico de 4 digitos.");
modal({type:'error',title:'tenci鏮!',text:'El a隳 debe ser un valor num廨ico de 4 digitos.',});
document.frmDetalleIrpf.anio.focus();
}
else
{
document.frmDetalleIrpf.pagina.value=1;
document.frmDetalleIrpf.submit();
}
}
function paginacion(pagina)
{
document.frmDetalleIrpf.pagina.value=pagina;
document.frmDetalleIrpf.submit();
}
function comprobarImpresion(impresion)
{
if (impresion==1) { //se efectua la impresion
document.frmImprimirPeticion.nombrePDF.value = "<%=irpfE%>";
document.frmImprimirPeticion.submit();
}
}
//-->
</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鏮 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墔ina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men de navegaci鏮 del m鏚ulo (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墔ina (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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="3">&nbsp;</td></tr>
<%
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
PersistenciaTaliquimedi perTaliqui = new PersistenciaTaliquimedi();
boolean retencion = perTaliqui.tiene_retencion_por_taliquimedico(intMedico);
if (retencion){
%>
<tr>
<form name="frmDetalleIrpf" action="detalleIRPF.jsp?x=<%=strParametroMenu%>" method="post">
<td colspan="3">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">A隳: </span></td>
<td><input type="text" size="4" name="anio" class="txt" value="<%=strCampoAnio%>" maxlength="4"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<%
PersistenciaTadremed per = new PersistenciaTadremed();
Vector vSeleccion = per.listado_detalle_irpf(strCampoAnio, intMedico/*, intPagina*/);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt">No existe informaci鏮 para el a隳 seleccionado.</span></td>
</tr>
<%
}
else
{
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Importe devengado</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Retenci鏮</td>
</tr>
<%
Tadremed tadremed = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
tadremed = (Tadremed)vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tadremed.getFecha())%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(tadremed.getImporte(),PersistenciaParametros.decimales)%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(tadremed.getIrpf(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="center">
<form name="frmLiqui" action="<%=request.getContextPath()%>/servlet/GestorMedicos" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="anio" value="<%=strCampoAnio%>"/>
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_GENERAR_DETALLE_IRPF%>">
<input type="submit" value="Certificado" class="enlace"/>
</form>
</td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
}else{
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt">El m嶮ico no tiene retenciones.</span></td>
</tr><%
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
<input type="hidden" name="tipo" value="19"/>
<input type="hidden" name="nombrePDF" value="" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
</form>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final p墔ina detalle IRPF (med/detalleIRPF.jsp)");
}
%>
+656
View File
@@ -0,0 +1,656 @@
<%@ 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.text.SimpleDateFormat" %>
<%@ page import="java.util.Calendar" %>
<%
// LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p&aacute;gina de pacientes (med/detallePacientes.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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p&aacute;gina de pacientes (med/detallePacientes.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strFecha = "";
String strFechaHasta = "";
StringBuffer strSql = new StringBuffer();
int intPagina = 0;
int borrarActo = 0;
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
Object aCondiciones[]=null;
java.util.Date hoy = Calendar.getInstance().getTime();
//Obtenci&oacute;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 fecha que indica el a&ntilde;o para el que desea realizar la impresion
if (request.getParameter("fecha")!=null)
strFecha=(String)request.getParameter("fecha");
//parametro fecha que indica el a&ntilde;o para el que desea realizar la impresion
if (request.getParameter("fechaHasta")!=null)
strFechaHasta=(String)request.getParameter("fechaHasta");
//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
int intImpresion = 0;
if (request.getParameter("imp")!=null) {
intImpresion = Integer.parseInt(request.getParameter("imp"));
}
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
if (request.getParameter("borrarActo")!=null){
borrarActo = Integer.parseInt(request.getParameter("borrarActo"));
}
//atributo ENC que obtiene la peticion encriptada
String detalleE = "";
if (sesion.getAttribute("ENC")!=null) {
detalleE = (String)sesion.getAttribute("ENC");
sesion.removeAttribute("ENC");
}
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>Pacientes</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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmDetallePacientes.borrarActo.value=0;
document.frmDetallePacientes.pagina.value=pagina;
document.frmDetallePacientes.submit();
}
function comprobarFecha()
{
if (document.frmDetallePacientes.fecha.value!="")
{
return valorFecha(document.frmDetallePacientes.fecha);
}
else
{
//alert("Introduzca la fecha.");
modal({type:'error',title:'Atenci&oacute;n!',text:'Introduzca la fecha Desde.',});
document.frmDetallePacientes.fecha.focus();
return false;
}
}
function comprobarFechaHasta()
{
if (document.frmDetallePacientes.fechaHasta.value!="")
{
return valorFecha(document.frmDetallePacientes.fechaHasta);
}
else
{
//alert("Introduzca la fecha.");
modal({type:'error',title:'Atenci&oacute;n!',text:'Introduzca la fecha Hasta.',});
document.frmDetallePacientes.fechaHasta.focus();
return false;
}
}
function fechasCorrectas()
{
var Fecha_aux1 = document.frmDetallePacientes.fecha.value.split("-");
var Fecha1 = new Date(parseInt(Fecha_aux1[2]),parseInt(Fecha_aux1[1]-1),parseInt(Fecha_aux1[0]));
var AnyoFecha1 = Fecha1.getFullYear();
var MesFecha1 = Fecha1.getMonth();
var DiaFecha1 = Fecha1.getDate();
var Fecha_aux2 = document.frmDetallePacientes.fechaHasta.value.split("-");
var Fecha2 = new Date(parseInt(Fecha_aux2[2]),parseInt(Fecha_aux2[1]-1),parseInt(Fecha_aux2[0]));
var AnyoFecha2 = Fecha2.getFullYear();
var MesFecha2 = Fecha2.getMonth();
var DiaFecha2 = Fecha2.getDate();
if (AnyoFecha2 < AnyoFecha1){
modal({type:'error',title:'Atenci&oacute;n!',text:'La fecha Desde debe ser menor que la fecha Hasta.',});
document.frmDetallePacientes.fechaHasta.focus();
return false;
}
else{
if (AnyoFecha1 == AnyoFecha2 && MesFecha2 < MesFecha1){
modal({type:'error',title:'Atenci&oacute;n!',text:'La fecha Desde debe ser menor que la fecha Hasta.',});
document.frmDetallePacientes.fechaHasta.focus();
return false;
}
else{
if (AnyoFecha1 == AnyoFecha2 && MesFecha1 == MesFecha2 && DiaFecha2 < DiaFecha1){
modal({type:'error',title:'Atenci&oacute;n!',text:'La fecha Desde debe ser menor que la fecha Hasta.',});
document.frmDetallePacientes.fechaHasta.focus();
return false;
}
else{
return true;
}
}
}
}
function imprimir()
{
if (comprobarFecha()==true && comprobarFechaHasta()==true) {
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
//alert(document.frmDetallePacientes.fecha.value);
if (fechasCorrectas()==true) {
document.frmDetallePacientes.action = "<%=request.getContextPath()%>/servlet/GestorPacientes?OPCION=<%=Constantes.OPC_MED_DETALLE_PACIENTE %>";
document.frmDetallePacientes.submit();
}
}
}
function comprobarImpresion(impresion)
{
if (impresion==1) { //se efectua la impresion
document.frmImprimirPeticion.nombrePDF.value = "<%=detalleE%>";
document.frmImprimirPeticion.submit();
}
}
function cambiar_mes(option)
{
//alert(option.value);
document.frmDetallePacientes.cambio_mes.value=1;
//document.frmDetallePacientes.mes.value=option.value;
document.frmDetallePacientes.borrarActo.value=0;
document.frmDetallePacientes.submit();
}
/*function borrar_acto(medico,fecha,acto,colectivo,poliza,orden,espe,numseq,auto)
{
if(confirm('Seguro que deseas eliminar el acto imputado?'))
{
document.frmDetallePacientes.borrarActo.value=1;
document.frmDetallePacientes.bFecha.value=fecha;
document.frmDetallePacientes.bActo.value=acto;
document.frmDetallePacientes.bMedico.value=medico;
document.frmDetallePacientes.bCol.value=colectivo;
document.frmDetallePacientes.bPol.value=poliza;
document.frmDetallePacientes.bOrd.value=orden;
document.frmDetallePacientes.bEspe.value=espe;
document.frmDetallePacientes.bNumseq.value=numseq;
document.frmDetallePacientes.bAuto.value=auto;
document.frmDetallePacientes.submit();
}
}*/
function borrar_acto(medico,fecha,acto,colectivo,poliza,orden,espe,numseq,auto)
{
modal({
type : 'confirm',
title : 'Atenci&oacute;n!',
text : 'Seguro que deseas eliminar el acto imputado?',
callback: function(result){
if (result){
document.frmDetallePacientes.borrarActo.value=1;
document.frmDetallePacientes.bFecha.value=fecha;
document.frmDetallePacientes.bActo.value=acto;
document.frmDetallePacientes.bMedico.value=medico;
document.frmDetallePacientes.bCol.value=colectivo;
document.frmDetallePacientes.bPol.value=poliza;
document.frmDetallePacientes.bOrd.value=orden;
document.frmDetallePacientes.bEspe.value=espe;
document.frmDetallePacientes.bNumseq.value=numseq;
document.frmDetallePacientes.bAuto.value=auto;
document.frmDetallePacientes.submit();
}
}
});
}
//-->
</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&oacute;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&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;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&aacute;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>
<table border="0" align="center" width="100%">
<%
SimpleDateFormat sdfFormateadorFecha2 = new SimpleDateFormat("MM/yyyy");
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
String fec1 = sdfFormateadorFecha2.format(dtFecha);
String[] parts = fec1.split("/");
Integer mes1 = Integer.parseInt(parts[0]);
Integer ano1 = Integer.parseInt(parts[1]);
String fec2 = "";
String fec3 = "";
if (mes1 == 1){
fec2 = "12/" + (ano1 -1);
fec3 = "11/" + (ano1 -1);
} else{
if (mes1 == 2){
fec3 = "12/" + (ano1 -1);
} else{
fec3 = (mes1 - 2) + "/" + ano1;
if (fec3.length() == 6){
fec3 = "0" + fec3;
}
}
fec2 = (mes1 - 1) + "/" + ano1;
if (fec2.length() == 6){
fec2 = "0" + fec2;
}
}
String strCambio_mes = "";
if (request.getParameter("cambio_mes")!=null){
strCambio_mes = request.getParameter("cambio_mes");
}
String strMes = "";
if (strCambio_mes.compareTo("1") == 0){
strMes = request.getParameter("mes");
} else {
if (request.getParameter("mes")!=null){
strMes = request.getParameter("mes");
} else{
strMes = sdfFormateadorFecha2.format(dtFecha);
}
}
%>
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmDetallePacientes" action="detallePacientes.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="listaElementosPrescripcion" value="">
<input type="hidden" name="informePrescripcion" value="">
<input type="hidden" name="borrarActo" value="">
<input type="hidden" name="bFecha" value="">
<input type="hidden" name="bActo" value="">
<input type="hidden" name="bCol" value="">
<input type="hidden" name="bPol" value="">
<input type="hidden" name="bOrd" value="">
<input type="hidden" name="bNumseq" value="">
<input type="hidden" name="bEspe" value="">
<input type="hidden" name="bMedico" value="">
<input type="hidden" name="bAuto" value="">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_DETALLE_PACIENTE%>">
<input type="hidden" id="cambio_mes" name="cambio_mes" value="0">
<tr>
<td colspan="5">
<select name="mes" onchange="cambiar_mes(this);" style="margin-left:2em;">
<option value="<%=fec1 %>" <%=(fec1.compareTo(strMes) == 0)?"selected":"" %>><%=fec1 %></option>
<option value="<%=fec2 %>" <%=(fec2.compareTo(strMes) == 0)?"selected":"" %>><%=fec2 %></option>
<option value="<%=fec3 %>" <%=(fec3.compareTo(strMes) == 0)?"selected":"" %>><%=fec3 %></option>
</select>
</td>
</tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Desde (dd-mm-aaaa): </span></td>
<td><input type="text" size="12" name="fecha" class="txt" value="<%=strFecha%>" maxlength="10"></td>
<td>&nbsp;</td>
<td><span class="txtnegrita">Hasta (dd-mm-aaaa): </span></td>
<td><input type="text" size="12" name="fechaHasta" class="txt" value="<%=strFechaHasta%>" maxlength="10"></td>
<td>&nbsp;</td>
<td><a href="javascript:imprimir()" class="enlace">Imprimir</a></td>
</tr>
</table>
</td>
</tr>
<input type="hidden" name="pagina" value="1">
</form>
<tr><td colspan="4">&nbsp;</td></tr>
<%
//Creaci&oacute;n de la tabla presentaci&oacute;n de resultados
if (borrarActo==1){ //Se ha pulsado en eliminar acto
String bFecha="";
int bActo=0;
int bCol=0;
double bPol=0;
int bOrd=0;
int bNumseq=0;
int bEspe=0;
int bMedico=0;
long bAuto=0;
if (request.getParameter("bFecha")!=null){
bFecha=(String)request.getParameter("bFecha");
bFecha = bFecha.replace('-','/');
}
if (request.getParameter("bActo")!=null){
bActo=Integer.parseInt(request.getParameter("bActo"));
}
if (request.getParameter("bCol")!=null){
bCol=Integer.parseInt(request.getParameter("bCol"));
}
if (request.getParameter("bPol")!=null){
bPol=Double.parseDouble(request.getParameter("bPol"));
}
if (request.getParameter("bOrd")!=null){
bOrd=Integer.parseInt(request.getParameter("bOrd"));
}
if (request.getParameter("bNumseq")!=null){
bNumseq=Integer.parseInt(request.getParameter("bNumseq"));
}
if (request.getParameter("bEspe")!=null){
bEspe=Integer.parseInt(request.getParameter("bEspe"));
}
if (request.getParameter("bMedico")!=null){
bMedico=Integer.parseInt(request.getParameter("bMedico"));
}
if (request.getParameter("bAuto")!=null){
bAuto=Long.parseLong(request.getParameter("bAuto"));
}
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
if (per.borrar_acto(bMedico, bFecha, bActo, bCol, bPol, bOrd, bEspe, bNumseq, bAuto)){
%><tr><td colspan="5" align="center" class="txtNegrita"><font color="blue">Acto eliminado correctamente</font></td></tr><%
}
}
aCondiciones = new Object[8];
aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
aCondiciones[2] = String.valueOf( strMes );
aCondiciones[3] = String.valueOf( strMes );
aCondiciones[4] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
aCondiciones[5] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
aCondiciones[6] = String.valueOf( strMes );
aCondiciones[7] = String.valueOf( strMes );
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
Vector vSeleccion = per.detalle_paciente_tamovext_espia(intPagina, aCondiciones);
/*aCondiciones = new Object[4];
aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
aCondiciones[2] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
aCondiciones[3] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
Vector vSeleccion = per.detalle_paciente(intPagina, aCondiciones);*/
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="5" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci&oacute;n</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td>
</tr>
<%
VTamovextTaclient vTamovextTaclient = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
vTamovextTaclient = (VTamovextTaclient)vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%></td>
<td class="<%=estilo%>" align="center"><%=/*vTamovextTaclient.getNombre() + " " + */vTamovextTaclient.getApellidos()%></td>
<td class="<%=estilo%>" align="center"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
<td class="<%=estilo%>" align="center"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
<%
/*int diaHoy = hoy.getDate();
int mesHoy = hoy.getMonth();
int anoHoy = hoy.getYear();
int diaActo = vTamovextTaclient.getFecha().getDate();
int mesActo = vTamovextTaclient.getFecha().getMonth();
int anoActo = vTamovextTaclient.getFecha().getYear(); */
Calendar fechaLimite = Calendar.getInstance();
fechaLimite.add(Calendar.DATE, -5);
// if ((diaHoy==diaActo)&&(mesHoy==mesActo)&&(anoHoy==anoActo)){
if(vTamovextTaclient.getFecha().getTime() <= hoy.getTime() && vTamovextTaclient.getFecha().getTime() >= fechaLimite.getTime().getTime()) {%>
<td class="<%=estilo%>" align="center"><a href="javascript:borrar_acto('<%=vTamovextTaclient.getMedico()%>','<%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%>','<%=vTamovextTaclient.getActo()%>','<%=vTamovextTaclient.getColec()%>','<%=vTamovextTaclient.getPoliza()%>','<%=vTamovextTaclient.getOrden()%>','<%=vTamovextTaclient.getEspecialidad()%>','<%=vTamovextTaclient.getNumseq()%>','<%=vTamovextTaclient.getAutorizacion()%>')" class="enlaceAnalisis">Eliminar</a></td>
<%}else{ %>
<td class="<%=estilo%>" align="center">-</td>
<%}%>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">&uacute;ltimo</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
<input type="hidden" name="tipo" value="9"/>
<input type="hidden" name="nombrePDF" value="" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
</form>
</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", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final p&aacute;gina de pacientes (med/detallePacientes.jsp)");
}
%>
+229
View File
@@ -0,0 +1,229 @@
<%@ 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, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p&aacute;gina de detalle historico de liquidacion (med/detalle_historico_liquidacion.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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p&aacute;gina de detalle historico de liquidacion (med/detalle_historico_liquidacion.jsp)");
try
{
// Definicion de variables
String strMensajeSinElementos="No ha seleccionado ning&uacute;n acto m&eacute;dico.";
String strParametroMenu="";
String strCampocalendar="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
//Obtenci&oacute;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("calendar")!=null)
strCampocalendar = (String)request.getParameter("calendar");
//parametro pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
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>Detalle hist&oacuete;rico liquidaci&oacute;n</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.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">pNG="<%= perfil.toString() %>"</script>
</head>
<script language="javascript" type="text/javascript">
<!--
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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&oacute;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&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;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&aacute;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>
<table border="0" align="center" width="100%">
<%
aCondiciones = new Object[4];
aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
String[] result = strCampocalendar.split("/");
int i=2;
for(String s : result){
aCondiciones[i] = new String(s);
i++;
}
PersistenciaTaliquimedidet perta = new PersistenciaTaliquimedidet();
Integer val = 0;
val = (Integer)aCondiciones[0];
int med = val.intValue();
val = (Integer)aCondiciones[1];
int espe = val.intValue();
String valor = (String)aCondiciones[2];
val = Integer.parseInt(valor);
int mes = val.intValue();
valor = (String)aCondiciones[3];
val = Integer.parseInt(valor);
int anio = val.intValue();
Vector resul = perta.buscarDetalles(med, mes, anio, intPagina);
%>
<table border="0" align="center" width="100%">
<tr><td>Factura</td><td>Asegurado</td><td>Entidad</td><td>Colectivo</td><td>Poliza</td><td>Orden</td><td>Fecha Gasto</td><td>Descripcion</td></tr>
<%
for(int j=0;j<resul.size();j++)
{
TaliquimediDet t = (TaliquimediDet)resul.get(j);
%>
<tr><td><%=t.getFactura() %></td><td><%=t.getApellidos() %></td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci&oacute;n de la p&aacute;gina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final p&aacute;gina de detalle historico de liquidacion (med/detalle_historico_liquidacion.jsp)");
}
%>
+317
View File
@@ -0,0 +1,317 @@
<%@ 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.text.SimpleDateFormat" %>
<%@ page import="java.util.Calendar" %>
<%
// LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de liquidaciones (med/liquidacion.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 liquidaciones (med/liquidacion.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
StringBuffer strSql = new StringBuffer();
int intPagina = 0;
long longAutorizacion = 0;
double dblImporteTotal=0;
Object aCondiciones[]=null;
//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 pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
//parametro pagina para realizar la paginacion
if (request.getParameter("au")!=null)
longAutorizacion=Long.parseLong(request.getParameter("au"));
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>Liquidaciones</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/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacionAnalista.pagina.value=pagina;
document.frmLiquidacionAnalista.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmLiquidacionAnalista" action="detalle_liquidacion_analista.jsp?x=<%=strParametroMenu%>&au=<%=longAutorizacion%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//Creación de la tabla presentación de resultados
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
int intEspe = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
PersistenciaTamovext per = new PersistenciaTamovext();
Vector<Object[]> vSeleccion = per.MovimientosCapturadosDetallePorAutorizacion(intPagina, intMedico, longAutorizacion, intEspe);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td align="center"><span class="txt">&nbsp;</span></td>
<td align="center"><span class="tituloTabla"><%=vSeleccion.elementAt(0)[1]%> - <%=vSeleccion.elementAt(0)[0]%> - <%=vSeleccion.elementAt(0)[2]%></span></td>
<td align="center"><span class="txt">&nbsp;</span></td>
</tr>
<tr>
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripcion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
</tr>
<%
//Tamovext tamovext= null;
//Object tamovext= null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
Object[] resultados = vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=resultados[3]%></td>
<td class="<%=estilo%>" align="left"><%=resultados[4]%></td>
<td class="<%=estilo%>" align="center"><%=resultados[5]%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><a href="liquidacion_analista.jsp?x=4&pagina=1" class="enlace">Volver</a></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final página de gestión de liquidaciones (med/liquidacion.jsp)");
}
%>
+317
View File
@@ -0,0 +1,317 @@
<%@ 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.text.SimpleDateFormat" %>
<%@ page import="java.util.Calendar" %>
<%
// LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de detalle de liquidaciones de radiologos (med/detalle_liquidacion_radiologo.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 detalle de liquidaciones de radiologos (med/detalle_liquidacion_radiologo.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
StringBuffer strSql = new StringBuffer();
int intPagina = 0;
long longAutorizacion = 0;
double dblImporteTotal=0;
Object aCondiciones[]=null;
//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 pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
//parametro pagina para realizar la paginacion
if (request.getParameter("au")!=null)
longAutorizacion=Long.parseLong(request.getParameter("au"));
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>Liquidaciones</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/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacionRadiologo.pagina.value=pagina;
document.frmLiquidacionRadiologo.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmLiquidacionRadiologo" action="detalle_liquidacion_radiologo.jsp?x=<%=strParametroMenu%>&au=<%=longAutorizacion%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//Creación de la tabla presentación de resultados
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
int intEspe = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
PersistenciaTamovext per = new PersistenciaTamovext();
Vector<Object[]> vSeleccion = per.MovimientosCapturadosDetallePorAutorizacion(intPagina, intMedico, longAutorizacion, intEspe);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td align="center"><span class="txt">&nbsp;</span></td>
<td align="center"><span class="tituloTabla"><%=vSeleccion.elementAt(0)[1]%> - <%=vSeleccion.elementAt(0)[0]%> - <%=vSeleccion.elementAt(0)[2]%></span></td>
<td align="center"><span class="txt">&nbsp;</span></td>
</tr>
<tr>
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripcion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
</tr>
<%
//Tamovext tamovext= null;
//Object tamovext= null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
Object[] resultados = vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=resultados[3]%></td>
<td class="<%=estilo%>" align="left"><%=resultados[4]%></td>
<td class="<%=estilo%>" align="center"><%=resultados[5]%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><a href="liquidacion_radiologo.jsp?x=5&pagina=1" class="enlace">Volver</a></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final página de detalle de liquidaciones de radiologos (med/detalle_liquidacion_radiologo.jsp)");
}
%>
+344
View File
@@ -0,0 +1,344 @@
<%@ 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" %>
<%
// LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de determinaciones analíticas (med/determinaciones.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 determinaciones analíticas (med/determinaciones.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strCampoNombre="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa();
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
//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"));
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>Actos Médicos</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function informarParametroCampoBusqueda()
{
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
//no kaske, ya que en esa asignacion se utiliza comillas simples
<%
String strCampoNombreAux=strCampoNombre.replace('\'', '~');
%>
//cogemos el valor del campo de busqueda sin comillas simples
var lstCampoBusqueda = '<%=strCampoNombreAux%>';
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
while(lstCampoBusqueda.indexOf("~")!=-1)
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
document.frmActosMedicos.nombre.value=lstCampoBusqueda;
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function buscar()
{
document.frmActosMedicos.pagina.value=1;
pasarAMayusculas(document.frmActosMedicos.nombre);
document.frmActosMedicos.submit();
}
function paginacion(pagina)
{
document.frmActosMedicos.pagina.value=pagina;
pasarAMayusculas(document.frmActosMedicos.nombre);
document.frmActosMedicos.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:informarParametroCampoBusqueda()">
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<form name="frmActosMedicos" action="determinaciones.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
<td colspan="3">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Descripción: </span></td>
<td><input type="text" size="50" name="nombre" class="txt"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<%
PersistenciaTtactmedGPC per = new PersistenciaTtactmedGPC();
Vector vSeleccion = per.listadoDeterminacionesAnaliticas(strCampoNombre, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">OMC</td>
</tr>
<%
TtactmedGPC ttactmedGPC = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
ttactmedGPC = (TtactmedGPC)vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="left"><%=ttactmedGPC.getDescripcion_gpc()%></td>
<td class="<%=estilo%>" align="center"><%=ttactmedGPC.getActo()%></td>
<td class="<%=estilo%>" align="right"><%=ttactmedGPC.getOmc()%></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 (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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(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 determinaciones analíticas (med/determinaciones.jsp)");
}
%>
+164
View File
@@ -0,0 +1,164 @@
<%@ 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 gestión de médicos (med/gestor.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 gestión de médicos (med/gestor.jsp)");
//Obtención del perfil del usuario conectado
StringBuffer perfil = new StringBuffer();
perfil.append("|");
perfil.append(sesion.getAttribute("PERFIL"));
perfil.append("|");
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>Módulo de Gestión de Médicos</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>
</head>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="ffffff"">
<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 de navegación (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>
<table border="0" align="center" width="100%">
<%
//Creación de la tabla presentación de resultados
%>
<!-- Enlace para volver a la página anterior //-->
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="6" align="right"><a href="javascript:history.back();" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></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>
<%
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de médicos (med/gestor.jsp)");
}
%>
+684
View File
@@ -0,0 +1,684 @@
<%@ 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" %>
<%@ page import="java.util.StringTokenizer" %>
<%
// LogTarisan.logger.log(NivelLog.INFO, "Inicio página de gestor de perfiles (med/gestor_perfiles.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 gestor de perfiles (med/gestor_perfiles.jsp)");
try
{
// Definicion de variables
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
String strParametroMenu="";
String strCampoNombre="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
//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"));
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
tamensaje = pertamensaje.obtenerMensaje(5);
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
PersistenciaTamedico perTamedico = new PersistenciaTamedico();
Tamedico tamedico = new Tamedico();
int maxDeterminaciones = 25;
maxDeterminaciones = perTamedico.obtenerNumeroDeterminaciones(intMedico);
int especialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
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&oacute;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">
<!--
var vElementosPerfil = new Array();
function pasar() {
obj=document.getElementById('sel1');
if (obj.selectedIndex==-1) return;
for (i=0; opt=obj.options[i]; i++)
if (opt.selected) {
valor=opt.value; // almacenar value
txt=obj.options[i].text; // almacenar el texto
obj.options[i]=null; // borrar el item si está seleccionado
obj2=document.getElementById('sel2');
if (obj2.options[0].value=='-') // si solo está la opción inicial borrarla
obj2.options[0]=null;
opc = new Option(txt,valor);
eval(obj2.options[obj2.options.length]=opc);
}
if(obj.options.length==0)
{
opc=new Option('-','-');
obj.options[0]=opc;
}
}
function borrar_perfil(valor)
{
obj=document.getElementById(valor);
//var answer = confirm ("Are you having fun?")
/*if(confirm('Seguro que deseas borrar el perfil??'))
{
obj.submit();
}*/
modal({
type : 'confirm',
title : '¡Atención!',
text : '¿Seguro que deseas borrar el perfil?',
callback: function(result){
if (result){
obj.submit();
}
}
});
}
function quitar() {
obj=document.getElementById('sel2');
if (obj.selectedIndex==-1) return;
for (i=0; opt=obj.options[i]; i++)
if (opt.selected) {
obj2=document.getElementById('sel1');
if (obj2.options.length >= <%= maxDeterminaciones%>){
//alert("No puedes crear perfiles de mas de " + <%= maxDeterminaciones %> + " actos");
modal({type:'error',title:'¡Atención!',text:'No puedes crear perfiles de mas de ' + <%= maxDeterminaciones %> + ' actos.',});
}else{
valor=opt.value; // almacenar value
txt=obj.options[i].text; // almacenar el texto
obj.options[i]=null; // borrar el item si está seleccionado
obj2=document.getElementById('sel1');
if (obj2.options[0].value=='-') // si solo está la opción inicial borrarla
obj2.options[0]=null;
opc = new Option(txt,valor);
eval(obj2.options[obj2.options.length]=opc);
}
}
if(obj.options.length==0)
{
opc=new Option('-','-');
obj.options[0]=opc;
}
}
function enviar()
{
obj=document.getElementById('sel1');
if(obj.options.length==1 && obj.options[0].value=='-')
{
//alert("No hay analiticas en el perfil, añade alguna");
modal({type:'error',title:'¡Atención!',text:'No hay analiticas en el perfil, añade alguna.',});
}
else if (document.frmModifyPerfil.descripcion.value.length < 3)
{
//alert("El nombre del perfil tiene que tener más de 3 letras");
modal({type:'error',title:'¡Atención!',text:'El nombre del perfil tiene que tener más de 3 letras.',});
}
else
{
txt="";
for(i=0; opt=obj.options[i]; i++)
{
txt=obj.options[i].value+", "+txt;
}
document.frmModifyPerfil.valores.value=txt;
document.frmModifyPerfil.submit();
}
}
function enviar_buscador(){
var vElementos = "";
var vCodigos = "";
obj=document.getElementById('sel1');
for (i=0; opt=obj.options[i]; i++)
{
vElementos = vElementos + obj.options[i].text + "¬";
vCodigos = vCodigos + obj.options[i].value + "¬";
}
vElementos = vElementos.substring(0,(vElementos.length) - 1);
vCodigos = vCodigos.substring(0,(vCodigos.length) - 1);
if(vElementos.length<=1)
{
opc=new Option('-','-');
obj.options[0]=opc;
document.frmBuscador.submit();
}else{
//vElementos = vElementos.substring(0,vElementos.lenght - 1);
//document.frmBuscador.vDeter_buscador.value = vElementos;
document.getElementById("vDeter_buscador").value= vElementos;
document.getElementById("vCod_buscador").value= vCodigos;
//document.getElementById("frmBuscador").submit();
document.frmBuscador.submit();
}
}
function enviar_frmNuevoPerfil()
{
document.frmNuevoPerfil.submit();
//document.frmModifyPerfil.submit();
}
function enviar_frmDetallesPerfil(valor)
{
obj=document.getElementById(valor);
obj.submit();
//document.frmDetallesPerfil+valor.submit();
}
function paginacion(pagina)
{
document.frmPaginacion.pagina.value=pagina;
document.frmPaginacion.submit();
}
function anularTeclaIntro(e){
if (e.keyCode == 13) { //controlo que se ha pulsado la tecla "intro"
return false;
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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="../../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="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="95%">
<form name="frmPaginacion" action="gestor_perfiles.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1" />
</form>
<!-- FORM PAGINACION!!!!!!!!!!! -->
<%
if(request.getParameter("detalles")==null && request.getParameter("nuevo") == null)
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Mostramos el listado de los perfiles que tiene definidos el médico.");
//mostramos el listado de los perfiles que tiene definidos el médico de la sesión.
// int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
PersistenciaTagruana per = new PersistenciaTagruana();
Vector vSeleccion = null;
try{
vSeleccion = per.obtenerGrupos(intPagina, intMedico);
}
catch(ExcepcionTarisan exT)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan al obtener los grupos del medico");
}
int espe = 0;
boolean fondo=true;
if (vSeleccion.size()!=0)
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="4" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">C&oacute;digo Perfil</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci&oacute;n</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td>
</tr><%
Tagruana tag = new Tagruana();
for(int i = 0; i < vSeleccion.size(); i++)
{
if(fondo)
{
fondo = false;
%>
<tr class="filaA trResultados" style="height:20px">
<%
}
else
{
fondo = true;
%>
<tr class="filaB trResultados" style="height:20px">
<%
}
espe = ParametrosConfiguracion.analiticas;
tag = (Tagruana)vSeleccion.elementAt(i);
%><td class="txt" align="center" class="txt"><%=tag.getGrupo() %></td>
<td align="center" class="txt"><%=tag.getDescripcion()%></td>
<td align="center"><form id="frmDetallesPerfil<%=i %>" name="frmDetallesPerfil<%=i %>" action="gestor_perfiles.jsp?x=13" method="post" style="margin-bottom: 0px;"><input type="hidden" name="pagina" value="1"/><input type="hidden" name="detalles" value="<%=tag.getGrupo() %>"/><a href="javascript:enviar_frmDetallesPerfil('frmDetallesPerfil<%=i %>')" class="enlace"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></a></form></td>
<td align="center"><form id="frmEliminarPerfil<%=i %>" name="frmEliminarPerfil" action="verify_cambios_perfil.jsp?x=13" method="post" style="margin-bottom: 0px;"><input type="hidden" name="especialidad" value="<%=espe %>"/><input type="hidden" name="borrar" value="<%=tag.getGrupo() %>"/><a href="javascript:borrar_perfil('frmEliminarPerfil<%=i %>')" class="enlace">Eliminar Perfil</a></form></td>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="3"></td></tr>
<tr>
<td colspan="4">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
}
%><tr><td><form name="frmNuevoPerfil" action="gestor_perfiles.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="nuevo" value="<%=espe %>"/><a href="javascript:enviar_frmNuevoPerfil()" class="enlace">Añadir Perfil</a></form></td></tr><%
}
else if(request.getParameter("nuevo") == null && request.getParameter("borrar") == null)
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El médico ha pulsado en ver detalles.");
//El médico ha pulsado en ver detalles
PersistenciaTagruana per = new PersistenciaTagruana();
int grp = 0;
int med = 0;
grp = Integer.parseInt(request.getParameter("detalles"));
med = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
Vector vSeleccion = per.obtenerActosMedicos(grp, med);
String descripcion = "";
String nosacar ="";
Tagruana tag = new Tagruana();
tag = (Tagruana)vSeleccion.elementAt(0);
descripcion = tag.getDescripcion().trim();
%>
<tr>
<td>
<form name="frmModifyPerfil" action="verify_cambios_perfil.jsp?x=13" method="post">
<label for="descripcion" class="txtNegrita">Nombre del Perfil: </label><input type="text" name="descripcion" class="txt" value="<%=descripcion %>" />
<br/><br/>
<label for="sel1" class="txtNegrita">Contenido Actual del perfil:</label><br/>
<select id="sel1" name="sel1" size="5" class="txt">
<%
int grupo = 0;
int espe = 0;
if (request.getParameter("vDeter_buscador")!=null){
String strDeter = (String)request.getParameter("vDeter_buscador");
String strCod = (String)request.getParameter("vCod_buscador");
StringTokenizer st1 = new StringTokenizer(strDeter, "¬");
StringTokenizer st2 = new StringTokenizer(strCod, "¬");
while (st1.hasMoreTokens())
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Se procesan las determinaciones "+strDeter);
//obtenemos los valores especificos para cada determinacion
String token1 = st1.nextToken();
String token2 = st2.nextToken();
if(token1.length()>0)
{
String descripDeter = token1;
int codigoDeter = Integer.parseInt(token2);
%><option value="<%=codigoDeter %>"><%=descripDeter.trim() %></option><%
grupo = Integer.parseInt(request.getParameter("detalles"));
espe = ParametrosConfiguracion.analiticas;
nosacar = nosacar + ", " +codigoDeter;
}
}
}else{
for(int i = 0; i < vSeleccion.size(); i++)
{
tag = (Tagruana)vSeleccion.elementAt(i);
%><option value="<%=tag.getActo() %>"><%=tag.getDescripcionActo().trim() %></option><%
grupo = Integer.parseInt(request.getParameter("detalles"));
espe = ParametrosConfiguracion.analiticas;
nosacar = nosacar + ", " +tag.getActo();
}
}
%>
</select>
<%
if (nosacar.compareTo("")!=0){
nosacar = nosacar.substring(2);
}
String buscador = (request.getParameter("txt_buscar_deter") == null)?"%":"%"+request.getParameter("txt_buscar_deter")+"%";
//Vector vSeleccion2 = per.listar_actos_buscador_excluidos(nosacar, buscador);
PersistenciaTtactmed perTtactmed = new PersistenciaTtactmed();
Vector vSeleccion2 = perTtactmed.listar_actos_buscador_excluidos_por_especialidad(nosacar, buscador, especialidad);
%>
<br/><img src="<%=request.getContextPath()%>/img/arriba.png" onclick="quitar()"><img src="<%=request.getContextPath()%>/img/abajo.png" onclick="pasar()">
<br/>
<label for="sel2" class="txtNegrita">Pruebas disponibles:</label>
<br/>
<select id="sel2" size="15" class="txt">
<%Ttactmed ttactmed = null;
for(int i = 0; i < vSeleccion2.size(); i++)
{
ttactmed = (Ttactmed)vSeleccion2.elementAt(i);
%><option value="<%=ttactmed.getActo() %>"><%=ttactmed.getDescripcion().trim() %></option><%
}
%>
</select></p>
<input type="hidden" name="valores" />
<input type="hidden" name="grupo" value="<%=grupo %>" />
<input type="hidden" name="espe" value="<%=espe %>" />
</form>
<br/><br/>
<form name="frmBuscador" id="frmBuscador" action="gestor_perfiles.jsp?x=<%=strParametroMenu %>" method="post">
<input type="hidden" name="detalles" value="<%=grp %>"/>
<input type="hidden" name="vDeter_buscador" id="vDeter_buscador" value=""/>
<input type="hidden" name="vCod_buscador" id="vCod_buscador" value=""/>
<label for="txt_buscar_deter" class="txtNegrita">Buscar prueba:</label>
<input type="text" name="txt_buscar_deter" class="txt" value="<%=(request.getParameter("txt_buscar_deter") == null)?"":request.getParameter("txt_buscar_deter") %>" onkeypress="return anularTeclaIntro(event)"/>
<a href="javascript:enviar_buscador()" class="enlace">Buscar</a>
</form>
<br/><br/><br/>
<a class="enlace" href="javascript:enviar()">Guardar Cambios</a>
</td>
</tr>
<%
}
else if (request.getParameter("borrar") != null)
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El médico ha pulsado en eliminar perfil.");
//el médico ha pulsado en eliminar perfil
%>
<tr><td>Borrar perfil: <%=request.getParameter("borrar") %></td></tr>
<%
}
else if (request.getParameter("nuevo") != null)
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El médico ha pulsado en crear nuevo perfil.");
//El médico ha pulsado en crear nuevo perfil
String nosacar ="";
String descripcion = "";
%>
<tr>
<td>
<form name="frmModifyPerfil" action="verify_cambios_perfil.jsp?x=13" method="post">
<label class="txtNegrita"><%=tamensaje.getMensaje() %></label>
<br/><br/><br/>
<label for="descripcion" class="txtNegrita">Nombre del Perfil:</label><input type="text" class="txt" name="descripcion" value="<%=descripcion %>" />
<br/><br/>
<label for="sel1" class="txtNegrita">Contenido Actual del perfil:</label><br/>
<select id="sel1" name="sel1" class="txt" size="5" class="txt">
<%
if (request.getParameter("vDeter_buscador")!=null){
String strDeter = (String)request.getParameter("vDeter_buscador");
String strCod = (String)request.getParameter("vCod_buscador");
StringTokenizer st1 = new StringTokenizer(strDeter, "¬");
StringTokenizer st2 = new StringTokenizer(strCod, "¬");
while (st1.hasMoreTokens())
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Se procesan las determinaciones "+strDeter);
//obtenemos los valores especificos para cada determinacion
String token1 = st1.nextToken();
String token2 = st2.nextToken();
if(token1.length()>0)
{
String descripDeter = token1;
int codigoDeter = Integer.parseInt(token2);
%><option value="<%=codigoDeter %>"><%=descripDeter.trim() %></option><%
nosacar = nosacar + ", " +codigoDeter;
}
}
if (strDeter == ""){
%><option value="-">-</option><%
}
}else{
%><option value="-">-</option><%
}
%>
</select>
<%
PersistenciaTagruana perTaGru = new PersistenciaTagruana();
int max = 0;
max = perTaGru.getMaxGrupo();
if (nosacar.compareTo("")!=0){
nosacar = nosacar.substring(2);
}
String buscador = (request.getParameter("txt_buscar_deter") == null)?"%":"%"+request.getParameter("txt_buscar_deter")+"%";
//int especialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
PersistenciaTtactmed per = new PersistenciaTtactmed();
//Vector vSeleccion = per.obtenerAnalisisNivelesVisiblesPorEspecialidad(especialidad, buscador);
Vector vSeleccion = per.listar_actos_buscador_excluidos_por_especialidad(nosacar, buscador, especialidad);
int grupo = max;
int espe = 0;
%>
<br/><img src="<%=request.getContextPath()%>/img/arriba.png" onclick="quitar()"><img src="<%=request.getContextPath()%>/img/abajo.png" onclick="pasar()">
<br/>
<label for="sel2" class="txtNegrita">Pruebas disponibles:</label><br/>
<select id="sel2" size="15" class="txt">
<%
if (vSeleccion.size()!=0){
Ttactmed ttactmed = null;
for(int i = 0; i < vSeleccion.size(); i++)
{
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
%><option value="<%=ttactmed.getActo() %>"><%=ttactmed.getDescripcion().trim() %></option><%
espe = ttactmed.getEspecialidad();
}
}
%>
</select></p>
<input type="hidden" name="valores" />
<input type="hidden" name="grupo" value="<%=grupo %>" />
<input type="hidden" name="espe" value="<%=espe %>" />
</form>
<br/><br/>
<form name="frmBuscador" id="frmBuscador" action="gestor_perfiles.jsp?x=<%=strParametroMenu %>" method="post">
<input type="hidden" name="nuevo" value="5"/>
<input type="hidden" name="vDeter_buscador" id="vDeter_buscador" value=""/>
<input type="hidden" name="vCod_buscador" id="vCod_buscador" value=""/>
<label for="txt_buscar_deter" class="txtNegrita">Buscar prueba:</label>
<input type="text" name="txt_buscar_deter" class="txt" value="<%=(request.getParameter("txt_buscar_deter") == null)?"":request.getParameter("txt_buscar_deter") %>" onkeypress="return anularTeclaIntro(event)"/>
<a href="javascript:enviar_buscador()" class="enlace">Buscar</a>
</form>
<br/><br/><br/>
<a class="enlace" href="javascript:enviar()">Guardar Cambios</a>
</td>
</tr>
<%
// quitar el espacio detras del % y subirlo aquí encima del <% para añadir el formulario de búsqueda.
// <form name="frmNuevoPerfil" action="gestor_perfiles.jsp?x=<%=strParametroMenu % >" method="post"><input type="hidden" name="nuevo" value="<%=espe % >"/><label for="txt_buscar_deter" class="txt">Buscar entre las pruebas disponibles:</label><input type="text" name="txt_buscar_deter" class="txt" value="<%=(request.getParameter("txt_buscar_deter") == null)?"":request.getParameter("txt_buscar_deter") % >"/><a href="javascript:enviar_frmNuevoPerfil()" class="enlace">Buscar</a></form>
}
%>
</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(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");
}
catch(ExcepcionTarisan exT)
{
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestion de perfiles (med/gestor_perfiles.jsp)");
}
%>
+351
View File
@@ -0,0 +1,351 @@
<%@ 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&oacute;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)");
}
%>
+768
View File
@@ -0,0 +1,768 @@
<%@page import="com.tarisan.persistencia.DataStore"%>
<%@ 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.text.*" %>
<%@ page import="java.util.Calendar" %>
<%@ page import="java.io.*" %>
<%@ page import="com.itextpdf.text.Font" %>
<%@ page import="com.itextpdf.text.Image" %>
<%@ page import="com.itextpdf.text.Document" %>
<%@ page import="com.itextpdf.text.DocumentException" %>
<%@ page import="com.itextpdf.text.Paragraph" %>
<%@ page import="com.itextpdf.text.Phrase" %>
<%@ page import="com.itextpdf.text.pdf.*" %>
<%@ page import="com.itextpdf.text.PageSize" %>
<%@ page import="com.itextpdf.text.FontFactory" %>
<%@ page import="com.itextpdf.text.BaseColor" %>
<%@ page import="com.itextpdf.text.Element" %>
<%@ page import="com.tarisan.util.DES" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio p&aacute;gina del hist&oacute;rico liquidaciones (med/historico_liquidacion.jsp)");
//JJ Fuerzo un cambio para provocar la descarga
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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p&aacute;gina del hist&oacute;rico liquidaciones (med/historico_liquidacion.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
StringBuffer strSql = new StringBuffer();
String sql = new String();
int intPagina = 0;
double dblImporteTotal=0;
//Object aCondiciones[]=null;
//Obtenci&oacute;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 pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
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&oacute;rico Liquidaciones</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacion.pagina.value=pagina;
document.frmLiquidacion.submit();
}
function enviar_frmLiquidacion()
{
document.frmLiquidacion.submit();
}
function verdetalles(valor)
{
obj=document.getElementById(valor);
obj.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" style="width:95%;border:0;margin:0 auto">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table style="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&oacute;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&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;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&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td>
<form id="frmLiquidacion" name="frmLiquidacion" action="historico_liquidacion.jsp?x=<%=strParametroMenu%>" method="post">
<%
//Creaci&oacute;n de la tabla presentaci&oacute;n de resultados
int medico = 0;
int esp = 0;
medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
esp = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
if(request.getParameter("pagina")==null)
{
SimpleDateFormat sdfFormateadorFecha = new SimpleDateFormat("MM/yyyy");
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
sdfFormateadorFecha.format(dtFecha);
PersistenciaTaliquimedi per = new PersistenciaTaliquimedi();
Vector vSeleccion = per.listado_fechas_liquidaciones(medico);
if(vSeleccion.size()==0)
{
%>
<table border="0" width="90%" align="center">
<tr>
<td colspan="5" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(52).getMensaje() %></span></td>
</tr>
</table>
<%
}
else
{
%>
<table border="0" width="90%" align="center">
<tr>
<td colspan="5" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(53).getMensaje() %> <select name="mes">
<%
int i=0;
do{
%><option value="<%=vSeleccion.get(i) %>"><%=vSeleccion.get(i) %></option>
<%
i=i+1;
}while(i<vSeleccion.size());
%>
<option value="todos">Todos</option>
</select>
<input type="hidden" name="pagina" value="1">
<a href="javascript:enviar_frmLiquidacion()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
</span></td>
</tr>
</table>
<%
vSeleccion=null;
}
}
else{
//ha pulsado en buscar
String strMes = request.getParameter("mes");
int prueba01 = strMes.toString().indexOf("s");
int prueba02 = 0;
if(strMes.toString().indexOf("os")>0)
{
//Ha seleccionado la opci&oacute;n de todos, para ver un resumen de sus liquidaciones
%>
<p style="text-align:center;margin:0px auto;"><span class="tituloTabla"><%=pertamensaje.obtenerMensaje(51).getMensaje() %></span></p><br/>
<table border="0" width="90%" align="center">
<%
PersistenciaTaliquimedi per = new PersistenciaTaliquimedi();
boolean retencion = per.tiene_retencion(medico);
//Primero vamos a ver si el m&eacute;dico origen tiene retenci&oacute;n o no...
Vector vSeleccion = new Vector();
if(retencion)
{
vSeleccion = per.listado_resumen_todas_liquidaciones_con_retencion(medico);
}
else
{
vSeleccion = per.listado_resumen_todas_liquidaciones_sin_retencion(medico);
}
boolean fondo = true;
DecimalFormat df = new DecimalFormat("#.##");
%>
<tr class="tituloTabla">
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(54).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(55).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(56).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(57).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td>
</tr>
<%
//while(resul.next())
int i=0;
do{
if(fondo)
{
fondo = false;
%>
<tr class="filaA trResultados">
<%
}
else
{
fondo = true;
%>
<tr class="filaB trResultados">
<%
}
if(retencion)
{
%>
<td align="center"><%=vSeleccion.elementAt(i).toString().trim() %></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+1)) %></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+3)) %></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+2)) %></td>
<td align="center">
<form name="frmLiquidacion" action="historico_liquidacion.jsp?x=<%=strParametroMenu%>" method="post" style="margin-bottom: 0px">
<input type="hidden" name="pagina" value="1"/>
<input type="hidden" value="<%=vSeleccion.elementAt(i).toString().trim() %>" name="mes"/>
<input type="submit" value="Ver" class="enlace"/>
</form>
</td>
<%
i=i+4;
}
else
{
%>
<td align="center"><%=vSeleccion.elementAt(i).toString().trim() %></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+1)) %></td>
<td align="center"></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+2)) %></td>
<td align="center">
<form name="frmLiquidacion" action="historico_liquidacion.jsp?x=<%=strParametroMenu%>" method="post" style="margin-bottom: 0px">
<input type="hidden" name="pagina" value="1"/>
<input type="hidden" value="<%=vSeleccion.elementAt(i).toString().trim() %>" name="mes"/>
<input type="submit" value="Ver" class="enlace"/>
</form>
</td>
<%
i=i+3;
}
%>
</tr>
<%
}while(i<vSeleccion.size());
%>
</tr>
</table>
<%
}
else
{
//Ha seleccionado un mes/a&ntilde;o, generamos la tabla en hmtl y si no existe el PDF
/*String file="/root/apache-tomcat-6.0.20/webapps/tarisan/liquidaciones/"+medico+"_"+strMes.toString().replace('/', '_')+".pdf";
String file_detalle="/root/apache-tomcat-6.0.20/webapps/tarisan/liquidaciones/detalle_"+medico+"_"+strMes.toString().replace('/', '_')+".pdf";*/
String file=ParametrosConfiguracion.ruta_pdf_liquidaciones+medico+"_"+strMes.toString().replace('/', '_')+".pdf";
String file_detalle=ParametrosConfiguracion.ruta_pdf_liquidaciones+"detalle_"+medico+"_"+strMes.toString().replace('/', '_')+".pdf";
boolean exists = (new File(file)).exists();
boolean exists_detalle = (new File(file_detalle)).exists();
boolean generado = false;
boolean generado_detalle = false;
Font fuente= new Font(Font.getFamily("ARIAL"), 12, Font.BOLD);
String encabezado = null;
String detalles_fra = null;
String pie = null;
Document documento = new Document(PageSize.A4);
/*Ahora definimos la tabla donde el arguemento recibido indica el numero de columnas y la propiedad setWidthPercentage permite indicarle que ocupe todo el ancho de la pagina*/
float[] colsWidth = {1f, 4f, 1f, 1f, 1f};
//PdfPTable table = new PdfPTable(colsWidth);
PdfPTable tabla=new PdfPTable(colsWidth);
tabla.setWidthPercentage(100);
Connection conexion = ParametrosConfiguracion.dataStore.obtenerConexion();
int medico_origen = medico;
PersistenciaTaliquimedi per = new PersistenciaTaliquimedi();
boolean retencion = per.tiene_retencion_por_taliquimedico(medico);
if (!exists)
{
//no existe el pdf de la liquidaci&oacute;n que quiere ver, la generamos para que se guarde y poderla mostrar si quiere.
//para evitar a&ntilde;adir varios pies si el fichero se gener&oacute; en una consulta anterior
generado = true;
/*Est&aacute; generando el pdf, luego ha pulsado en el detalle de la liquidaci&oacute;n: lo metemos en el log:
medico, fecha, fecha_peticion, correlativo, tabla, sentencia, observaciones
*/
SimpleDateFormat sdfFormateadorFecha = new SimpleDateFormat("dd/MM/yyyy");
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
sdfFormateadorFecha.format(dtFecha);
java.sql.Timestamp timeStampDate = new Timestamp(dtFecha.getTime());
PersistenciaTareglog per_ta = new PersistenciaTareglog();
Integer sig_correlativo = per_ta.obtenerUltimoValorCorrelativo(medico,timeStampDate);
Calendar cal = Calendar.getInstance();
cal.setTime(dtFecha);
per_ta.insertarLog(medico, timeStampDate, cal, sig_correlativo, "liquidaxs", "genera el pdf", "el medico accede al hist&oacute;rico de liquidaciones y consulta el mes "+strMes+" generando el pdf correspondiente");
//obtenemos los datos del m&eacute;dico necesarios, primero vemos el m&eacute;dico origen:
medico_origen = per.obtener_medico_origen(medico);
PersistenciaVTTbancosTamedico perTtbanTamed = new PersistenciaVTTbancosTamedico();
Vector vSeleccion = perTtbanTamed.obtenerMedico_por_medico_y_mes(medico, strMes, intPagina);
if (vSeleccion.size()!=0) //Se han encontrado datos
{
VTtbancosTamedico vTtbancosTamedico = null;
vTtbancosTamedico = (VTtbancosTamedico)vSeleccion.elementAt(0);
String nif = vTtbancosTamedico.getNif();
String nombre = vTtbancosTamedico.getNombre().trim();
String apellidos = vTtbancosTamedico.getApellidos();
String direccion = vTtbancosTamedico.getDireccion();
String cp = vTtbancosTamedico.getCp();
String poblacion = vTtbancosTamedico.getPoblacion();
String descripcion = vTtbancosTamedico.getDescripcion();
int sucursal = vTtbancosTamedico.getIban_sucursal();
String cuenta = vTtbancosTamedico.getIban_cuenta().trim();
if(medico_origen != medico)
{
Vector vSeleccion2 = perTtbanTamed.obtenerMedico_por_medico_origen(medico_origen, intPagina);
if (vSeleccion2.size()!=0) //Se han encontrado datos
{
VTtbancosTamedico vTtbancosTamedico2 = null;
vTtbancosTamedico2 = (VTtbancosTamedico)vSeleccion2.elementAt(0);
nif = vTtbancosTamedico2.getNif();
nombre = vTtbancosTamedico2.getNombre().trim();
apellidos = vTtbancosTamedico2.getApellidos();
direccion = vTtbancosTamedico2.getDireccion();
cp = vTtbancosTamedico2.getCp();
poblacion = vTtbancosTamedico2.getPoblacion();
descripcion = vTtbancosTamedico2.getDescripcion();
sucursal = vTtbancosTamedico2.getIban_sucursal();
cuenta = vTtbancosTamedico2.getIban_cuenta().trim();
}
}
encabezado="Factura Para: "+medico_origen+"\n"+"Igual. Med. Qui. y de E. De Navarra S.A."+"\n"+"AVENIDA BAYONA 4"+"\n"+"31011 PAMPLONA"+"\n"+"CIF: A31005432"+"\n"+"\n";
detalles_fra="\nHonorarios del: "+strMes+"\n"+ "Fecha Factura: "+String.format("%1$te/%1$tm/%1$tY", vTtbancosTamedico.getFecha_factura())+"\n Factura Numero: "+medico_origen+"/"+vTtbancosTamedico.getFactura()+" N.I.F: "+nif+"\n"+"\n"+"\n"+"\n";
float[] columnas = {1f, 1f};
PdfPTable detalles_medico=new PdfPTable(columnas);
PdfPCell celda01 = new PdfPCell();
celda01.setBorder(0);
detalles_medico.addCell(celda01);
PdfPCell celda02 = new PdfPCell(new Paragraph(nombre+" "+apellidos+"\n"+direccion+"\n"+cp+" "+poblacion+"\n",FontFactory.getFont("arial",10,Font.NORMAL,BaseColor.BLACK)));
celda02.setBorder(0);
detalles_medico.addCell(celda02);
//prueba:
Paragraph linea = new Paragraph(encabezado,fuente);
//Definimos un parrafo
Phrase para=new Phrase(detalles_fra,FontFactory.getFont("arial",10,Font.NORMAL,BaseColor.BLACK));
//El pie tambi&oacute;n es un p&aacute;rrafo
SimpleDateFormat formatearFecha = new SimpleDateFormat("dd 'de' MMMM 'de' yyyy");
//String.format("%1$te/%1$tm/%1$tY", result.getDate("FECHA_FACTURA")
pie = "Banco: "+descripcion+"\nSucursal: "+sucursal+"\nCuenta: "+cuenta+" Pamplona a "+formatearFecha.format(vTtbancosTamedico.getFecha_factura());
//Pasamos la fecha a un String y la agregamos a un parrafo
Paragraph fecha=new Paragraph(String.format("%1$te/%1$tm/%1$tY", vTtbancosTamedico.getFecha_factura())+"\n"+"\n");
//Ahora definimos la tabla donde el arguemento recibido indica el numero de columnas y la propiedad setWidthPercentage permite indicarle que ocupe todo el ancho de lapagina*/
PdfWriter.getInstance(documento, new FileOutputStream(file));
documento.open();
documento.add(linea);
documento.add(detalles_medico);
documento.add(para);
PdfPCell celda1 =new PdfPCell (new Paragraph("C&oacute;d. Acto",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED)));
PdfPCell celda2 =new PdfPCell (new Paragraph("Descripci&oacute;n",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED)));
PdfPCell celda3 =new PdfPCell (new Paragraph("Cant.",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED)));
PdfPCell celda4 =new PdfPCell (new Paragraph("Precio",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED)));
PdfPCell celda5 =new PdfPCell (new Paragraph("Importe",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED)));
celda1.setBorder(1);
celda1.setBorderWidthTop(1);
celda1.setBorderWidthBottom(1);
celda1.setHorizontalAlignment(Element.ALIGN_RIGHT);
celda1.setVerticalAlignment(Element.ALIGN_MIDDLE);
celda2.setBorder(1);
celda2.setBorderWidthTop(1);
celda2.setBorderWidthBottom(1);
celda2.setVerticalAlignment(Element.ALIGN_MIDDLE);
celda3.setBorder(1);
celda3.setBorderWidthTop(1);
celda3.setBorderWidthBottom(1);
celda3.setHorizontalAlignment(Element.ALIGN_RIGHT);
celda3.setVerticalAlignment(Element.ALIGN_MIDDLE);
celda4.setBorder(1);
celda4.setBorderWidthTop(1);
celda4.setBorderWidthBottom(1);
celda4.setHorizontalAlignment(Element.ALIGN_RIGHT);
celda4.setVerticalAlignment(Element.ALIGN_MIDDLE);
celda5.setBorder(1);
celda5.setBorderWidthTop(1);
celda5.setBorderWidthBottom(1);
celda5.setHorizontalAlignment(Element.ALIGN_RIGHT);
celda5.setVerticalAlignment(Element.ALIGN_MIDDLE);
tabla.addCell(celda1);
tabla.addCell(celda2);
tabla.addCell(celda3);
tabla.addCell(celda4);
tabla.addCell(celda5);
}
}
PersistenciaTaliquimedidet perTaDet = new PersistenciaTaliquimedidet();
int mes = Integer.parseInt(((String)strMes).substring(0, 2));
int anio = Integer.parseInt(((String)strMes).substring(3));
generado_detalle = perTaDet.generarPdfDetalle(medico, mes, anio);
Double importe = 0.0;
Vector vSeleccion = per.listado_detalle_liquidaciones_medicos(medico, strMes, intPagina);
%>
<p style="text-align:center;margin:0px auto;"><span class="tituloTabla"><%=pertamensaje.obtenerMensaje(58).getMensaje() %> <%=request.getParameter("mes") %></p></span><br/>
<%
%>
<table border="0" width="90%" align="center">
<%
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
%>
<tr class="tituloTabla">
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(40).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(41).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(59).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(42).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(60).getMensaje() %></td>
</tr>
<%
boolean fondo = true;
DecimalFormat df = new DecimalFormat("#.##");
Taliquimedi taliquimedi = null;
for(int i = 0; i < vSeleccion.size(); i++)
{
if(fondo)
{
fondo = false;
%>
<tr class="filaA trResultados">
<%
}
else
{
fondo = true;
%>
<tr class="filaB trResultados">
<%
}
taliquimedi = (Taliquimedi)vSeleccion.elementAt(i);
String act = String.valueOf(taliquimedi.getActo());
String cant = String.valueOf(taliquimedi.getCantidad());
%>
<td cellspacing="1"><span class="txt"><%=act.trim() %></span></td>
<td><span class="txt"><%=taliquimedi.getDescripcion().trim() %></span></td>
<td align="right"><span class="txt"><%=cant.trim() %></span></td>
<td align="right"><span class="txt"><%=df.format(taliquimedi.getPrecio()) %></span></td>
<td align="right"><span class="txt"><%=df.format(taliquimedi.getImporte()) %></span></td>
</tr>
<%
if(generado)
{
//si generando el pdf genero la tabla para a&ntilde;ad&iacute;rsela
/*Definimos las celdas que seran los encabezados de la tabla*/
PdfPCell celda1 =new PdfPCell (new Paragraph(act.trim(),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
PdfPCell celda2 =new PdfPCell (new Paragraph(taliquimedi.getDescripcion().trim(),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
PdfPCell celda3 =new PdfPCell (new Paragraph(cant.trim(),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
PdfPCell celda4 =new PdfPCell (new Paragraph(df.format(taliquimedi.getPrecio()),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
PdfPCell celda5 =new PdfPCell (new Paragraph(df.format(taliquimedi.getImporte()),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
celda1.setBorder(0);
celda1.setHorizontalAlignment(Element.ALIGN_RIGHT);
celda1.setVerticalAlignment(Element.ALIGN_MIDDLE);
celda2.setBorder(0);
celda3.setBorder(0);
celda3.setHorizontalAlignment(Element.ALIGN_RIGHT);
celda3.setVerticalAlignment(Element.ALIGN_MIDDLE);
celda4.setBorder(0);
celda4.setHorizontalAlignment(Element.ALIGN_RIGHT);
celda4.setVerticalAlignment(Element.ALIGN_MIDDLE);
celda5.setBorder(0);
celda5.setHorizontalAlignment(Element.ALIGN_RIGHT);
celda5.setVerticalAlignment(Element.ALIGN_MIDDLE);
tabla.addCell(celda1);
tabla.addCell(celda2);
tabla.addCell(celda3);
tabla.addCell(celda4);
tabla.addCell(celda5);
}
importe = importe + taliquimedi.getImporte();
}
/*
Si el medico tiene retencion
*/
%>
<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(61).getMensaje() %></span></td><td align="right"><span class="txt"> <%=df.format(importe) %></span></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<%
Double irpf = 0.0;
Double total = 0.0;
if(retencion)
{
irpf = importe*0.15;
total = importe - irpf;
%>
<tr><td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(56).getMensaje() %>: </span></td><td align="right"><span class="txt"> <%=df.format(irpf) %></span></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(62).getMensaje() %></span></td><td align="right"><span class="txt"> <%=df.format(total) %></span></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<%
}
else
{
total = importe;%>
<tr><td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(62).getMensaje() %></span></td><td align="right"><span class="txt"> <%=df.format(importe) %></span></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<%
}
%>
<tr>
<td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(63).getMensaje() %></span></td>
<td align="right"><span class="txt">&nbsp;</span></td><td>&nbsp;</td><td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left">
<%
String strMedico = ""+medico;
DES encrypter = new DES(strMedico);
String doc = medico +"_"+strMes.toString().replace('/', '_');
String docEncriptado = encrypter.encrypt(doc);
/*File ficheroPDF = new File(ParametrosConfiguracion.ruta_pdf_liquidaciones+medico +"_"+strMes.toString().replace('/', '_')+".pdf");*/
File ficheroPDF = new File(ParametrosConfiguracion.ruta_pdf_liquidaciones+doc+".pdf");
if(ficheroPDF.exists())
{
%>
<form></form>
<form name="frmLiqui" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="17"/>
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPDF.getName()*/docEncriptado%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"/>
</form>
<%
}
else
{
%><p><span class="txt">No hay PDF</span></p><%
}
%>
</td>
<td align="right">
<%
String docDetalle = "detalle_"+medico +"_"+strMes.toString().replace('/', '_');
String docDetalleEncriptado = encrypter.encrypt(docDetalle);
File ficheroDetalle = new File(ParametrosConfiguracion.ruta_pdf_liquidaciones+docDetalle+".pdf");
if(ficheroDetalle.exists())
{
%>
<form name="frmLiquiDetalle" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="17"/>
<input type="hidden" name="nombrePDF" value="<%=/*ficheroDetalle.getName()*/docDetalleEncriptado%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver detalle" class="enlace"/>
</form><%
}
else
{
%><p><span class="txt">No hay Detalle</span></p><%
}
%>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<%
if(generado)
{
PdfPTable resumen=new PdfPTable(2);
resumen.setWidthPercentage(40);
PdfPCell celda1 =new PdfPCell (new Paragraph("Importe total:",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
celda1.setBorder(0);
PdfPCell celda2 =new PdfPCell (new Paragraph(df.format(importe),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
celda2.setBorder(0);
celda2.setHorizontalAlignment(Element.ALIGN_RIGHT);
resumen.addCell(celda1);
resumen.addCell(celda2);
if(retencion)
{
celda1 =new PdfPCell (new Paragraph("I.R.P.F. ",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
celda2 =new PdfPCell (new Paragraph(df.format(irpf),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
celda1.setBorder(0);
celda2.setBorder(0);
celda2.setHorizontalAlignment(Element.ALIGN_RIGHT);
resumen.addCell(celda1);
resumen.addCell(celda2);
}
celda1 =new PdfPCell (new Paragraph("Total Liquidacion:",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
celda2 =new PdfPCell (new Paragraph(df.format(total),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
celda1.setBorder(0);
celda2.setBorder(0);
celda2.setHorizontalAlignment(Element.ALIGN_RIGHT);
resumen.addCell(celda1);
resumen.addCell(celda2);
Paragraph fin=new Paragraph(pie,FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK));
documento.add(tabla);
documento.add(new Paragraph("\n\n\n",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
documento.add(resumen);
documento.add(new Paragraph("\n\n\n",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)));
documento.add(fin);
documento.close();
}
importe = irpf = total = null;
df = null;
}
}
}
%>
</form>
</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", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p&aacute;gina del hist&oacute;rico de liquidaciones (med/historico_liquidacion.jsp)");
}
%>
+315
View File
@@ -0,0 +1,315 @@
<%@ 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&oacute;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&eacute;dico</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Motivo Ingreso</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Juicio diagn&oacute;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)");
}
%>
+336
View File
@@ -0,0 +1,336 @@
<%@ 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&aacute;gina de igualados (med/igualados.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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p&aacute;gina de igualados (med/igualados.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strBuscarIguala="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Double dblPoliza=null;
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
Object aCondiciones[]=null;
//Obtenci&oacute;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 pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
if (request.getParameter("buscar")!=null)
strBuscarIguala=request.getParameter("buscar");
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>Igualados</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina,buscar)
{
document.frmIgualados.pagina.value=pagina;
document.frmIgualados.buscar.value=buscar;
pasarAMayusculas(document.frmIgualados.buscar);
document.frmIgualados.submit();
}
function buscar()
{
pasarAMayusculas(document.frmIgualados.buscar);
document.frmIgualados.submit();
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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&oacute;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&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;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&aacute;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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="4">
<table border="0" align="center">
<tr><form name="frmIgualados" action="igualados.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
<td><span class="txtnegrita">Apellido del igualado</span></td>
<td><input type="text" size="50" name="buscar" class="txt"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="btn_buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</form>
</tr>
</table>
</td>
</tr>
<%
PersistenciaTapolfac per = new PersistenciaTapolfac();
Vector vSeleccion = per.listado_igualados(strBuscarIguala, intMedico, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="4" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre asegurado</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nº colectivo</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nº p&oacute;liza</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nº Beneficiarios</td>
</tr>
<%
Tapolfac tapolfac = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
tapolfac = (Tapolfac)vSeleccion.elementAt(i);
dblPoliza = Double.valueOf(tapolfac.getPoliza());
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="left"><%=tapolfac.getTitular()%></td>
<td class="<%=estilo%>" align="center"><%=tapolfac.getColec()%></td>
<td class="<%=estilo%>" align="center"><%=dblPoliza.longValue()%></td>
<td class="<%=estilo%>" align="center"><%=tapolfac.getBeneficiarios()%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="4"></td></tr>
<tr>
<td colspan="4">
<table border="0" align="center">
<tr>
<%if (per.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,'<%=strBuscarIguala %>')" class="enlace">primero</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>,'<%=strBuscarIguala %>')" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">&uacute;ltimo</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>, '<%=strBuscarIguala %>')" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>, '<%=strBuscarIguala %>')" class="enlace">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="right"><span class="txtNegrita">Nº total de beneficiarios: </span><span class="txt"><%=per.obtenerNumTotalBeneficiarios(intMedico)%></span></td>
</tr>
<tr>
<td colspan="4" align="right"><span class="txtNegrita">Nº total de p&oacute;lizas: </span><span class="txt"><%=per.obtenerNumerPolizasMedicos(intMedico)%></span></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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", "Error en la presentaci&oacute;n de la p&aacute;gina al usuario.");
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&oacute;n de la p&aacute;gina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p&aacute;gina de gesti&oacute;n de actos m&eacute;dicos (med/gestor.jsp)");
}
%>
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

+442
View File
@@ -0,0 +1,442 @@
<%@ 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, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p墔ina de determinaciones anal癃icas (med/determinaciones.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鏮 invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p墔ina de incicdencias (med/incidencia.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strMensaje="";
String strCorreo = "";
String mensajeError= "";
String strAdjunto = "";
String strAdjuntos = "";
String strAsuntoCorreo = "";
String strMensajeCorreo = "";
String strTarjetaCorreo = "";
String strError = "";
Integer intLimpiarAdjuntos = 0;
//Obtenci鏮 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("msg")!=null)
strMensaje = (String)request.getParameter("msg");
//parametro adjunto con el nombre del archivo adjuntado
if (request.getParameter("adjunto")!=null)
strAdjunto = (String)request.getParameter("adjunto");
//parametro asunto del correo a enviar
if (request.getParameter("asunto")!=null)
strAsuntoCorreo = (String)request.getParameter("asunto");
//parametro mensaje del correo a enviar
if (request.getParameter("mensaje")!=null)
strMensajeCorreo = (String)request.getParameter("mensaje");
//parametro tarjeta del correo a enviar
if (request.getParameter("tarjeta")!=null)
strTarjetaCorreo = (String)request.getParameter("tarjeta");
//parametro limpiar adjuntos que se hace la primera vez que se entra
if (request.getParameter("limpiarAdjuntos")!=null)
intLimpiarAdjuntos = Integer.parseInt(request.getParameter("limpiarAdjuntos"));
//parametro error de la subida del adjunto
if (request.getParameter("err")!=null)
strError = (String)request.getParameter("err");
//Si el m嶮ico no tiene el correo guardado en la cabecera, redirijimos a cabecera.jsp para que lo meta
Integer noTieneEmail = 0;
Tamedico tamedico = new Tamedico();
PersistenciaTamedico pertamedico = new PersistenciaTamedico();
int intMedico=((Usuario)sesion.getAttribute("USUARIO")).getMedico();
tamedico = pertamedico.seleccionar(intMedico);
if (tamedico.getEmailCab()==null){
noTieneEmail = 1;
mensajeError = "Para crear una incidencia debe tener registrado su correo electr鏮ico:";
}else{
strCorreo = tamedico.getEmailCab();
if (!Utilidades.validarEmail(strCorreo)){
noTieneEmail = 1;
mensajeError = "Debe utilizar una direcci鏮 de correo v嫮ida.";
}
}
File dir = new File(ParametrosConfiguracion.ruta_adjuntos+"/");
Vector<String> archivos = Utilidades.buscar_ficheros_recursivo(dir);
if (intLimpiarAdjuntos==1){
if (archivos != null) {
for (int f=0; f < archivos.size() ; f++) {
String path = archivos.elementAt(f);
LogTarisan.logger.log(NivelLog.DEBUG, "Eliminamos todos los adjuntos. Ruta de adjunto "+f+": " + path);
File adjunto = new File(path);
if(adjunto.exists())
{
adjunto.delete();
}
}
}
}else{
if (archivos != null) {
for (int f=0; f < archivos.size() ; f++) {
String path = archivos.elementAt(f);
String[] partes = path.split("/");
String filename = partes[6];
strAdjuntos += partes[6] + "--";
}
}
}
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>Incidencias</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/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.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>
<script language="JavaScript" type="text/javascript">
<!--
function enviar_incidencia()
{
if (frmIncidencia.ASUNTO.value == ""){
modal({type:'error',title:'tenci鏮!',text:'Debe introducir la descripci鏮 de la incidencia',callback: function(result){frmIncidencia.ASUNTO.focus();}});
}else if (frmIncidencia.MENSAJE.value == ""){
modal({type:'error',title:'tenci鏮!',text:'Debe introducir el detalle de la incidencia',callback: function(result){frmIncidencia.MENSAJE.focus();}});
}else{
frmIncidencia.submit();
}
}
function introducir_email()
{
frmIntroducirEmail.submit();
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function eliminarAdjunto(adjunto)
{
document.frmAdjunto.eliminar.value = 1;
document.frmAdjunto.adj.value = adjunto;
document.frmAdjunto.ASUNTO.value = frmIncidencia.ASUNTO.value;
document.frmAdjunto.MENSAJE.value = frmIncidencia.MENSAJE.value;
document.frmAdjunto.TARJETA.value = (frmIncidencia.TARJETA.value).replace(/%/g, "()").trim();
document.frmAdjunto.submit();
}
function adjuntar()
{
document.frmAdjunto.ASUNTO.value = frmIncidencia.ASUNTO.value;
document.frmAdjunto.MENSAJE.value = frmIncidencia.MENSAJE.value;
document.frmAdjunto.TARJETA.value = (frmIncidencia.TARJETA.value).replace(/%/g, "()").trim();
/*document.frmAdjunto.submit();*/
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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鏮 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墔ina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men de navegaci鏮 del m鏚ulo (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墔ina (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>
<div class="cajaCentral">
<div class="tituloCajaCentral">
<span>SISTEMA DE INCIDENCIAS DE TARISAN</span>
</div>
<br>
<form name="frmIncidencia" action="../../servlet/GestorMedicos" method="post" autocomplete="off">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ENVIAR_EMAIL%>">
<input type="hidden" name="correo" value="<%=strCorreo%>">
<input type="hidden" name="nombreAdjuntos" value="<%=strAdjuntos%>">
<table border="0" align="center" width="100%">
<!-- <tr>
<td>&nbsp;</td>
<td align="left"><h5>SISTEMA DE INCIDENCIAS DE TARISAN</h5></td>
</tr> -->
<tr>
<td>&nbsp;</td>
<td align="left"><p class="txt">*Para el correcto funcionamiento del sistema de incidencias debe comprobar en la secci鏮 "CABECERA" que tiene una cuenta de correo v嫮ida.</p></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left" class="txtnegrita">Descripci鏮 breve:</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left"><input type="text" size="40" name="ASUNTO" id="asun" class="txt" value="<%=strAsuntoCorreo %>" style="width:40%"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left" class="txtnegrita"><span>Detalle de la Incidencia:</span></td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left">
<textarea name="MENSAJE" rows="4" cols="70%" class="txt" style="width:70%"><%=strMensajeCorreo %></textarea>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left" class="txtnegrita">Pase la tarjeta para registrarla:</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left"><input type="password" size="40" name="TARJETA" id="tar" class="txt" value="<%=strTarjetaCorreo %>" style="width:70%"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</form>
<table border="0" align="center" width="100%">
<tr>
<td>&nbsp;</td>
<td align="left" class="txtnegrita">Adjuntar archivos:</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<form name="frmAdjunto" enctype="multipart/form-data" action="../../../JavaBridgeTemplate621/adjuntar.php" method="POST">
<input name="uploadedfile" type="file" />
<input type="submit" value="Adjuntar" onclick="adjuntar()"/>
<input type="hidden" name="medico" value="<%=intMedico %>" />
<input type="hidden" name="eliminar" value="" />
<input type="hidden" name="adj" value="" />
<input type="hidden" name="ASUNTO" value="" />
<input type="hidden" name="MENSAJE" value="" />
<input type="hidden" name="TARJETA" value="" />
<%
if (intLimpiarAdjuntos!=1){
if (archivos != null) {
for (int f=0; f < archivos.size() ; f++) {
String path = archivos.elementAt(f);
String[] partes = path.split("/");
String filename = partes[6];
%>
<span type="text" name="txtAdjunto" class="txtnegrita" style="color: rgb(69, 69, 255);margin-left: 50px;"><%= filename%></span>
<a href="javascript:eliminarAdjunto('<%= filename%>')" class="enlace" title="Eliminar" style="color:rgb(219, 67, 67);font-size: medium;">X</a>
<%
}
}
}
%>
</form>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2" align="left"><a href="javascript:enviar_incidencia()" class="enlace">Enviar</a></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<%
if (strMensaje.compareTo("")!=0){
%>
<tr>
<td>&nbsp;</td>
<td align="center"><p class="txtNegrita" style="color:blue"><%= strMensaje %></p></td>
</tr>
<%
}
if (strError.compareTo("")!=0){
%>
<tr>
<td>&nbsp;</td>
<td align="center"><p class="txtNegrita" style="color:red"><%= strError %></p></td>
</tr>
<%
}
%>
</table>
</div>
<form name="frmIntroducirEmail" action="../../servlet/GestorMedicos" method="post" autocomplete="off">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ENVIAR_EMAIL%>">
<input type="hidden" name="introducir_email" value="1" />
</form>
</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);
}
var jsNoTieneEmail = <%=noTieneEmail %>;
if (jsNoTieneEmail==1){
//prompt("Para crear una incidencia debe tener registrado su correo electr鏮ico:");
modal({type:'error',title:'tenci鏮!',text:'<%= mensajeError%>',callback: function(result){introducir_email();}});
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final p墔ina de determinaciones anal癃icas (med/incidencia.jsp)");
}
%>
+597
View File
@@ -0,0 +1,597 @@
<%@ 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" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio p墔ina de peticiones capturadas (med/peticiones_capturadas.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鏮 invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p墔ina de introducir paciente (med/introducir_paciente.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strCampoFecha="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
int intBuscarPaciente=0;
String troquelado = "";
String mensajeNoEncontrado = "";
Object aCondiciones[]=null;
int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa();
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
//Obtenci鏮 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("fecha")!=null)
strCampoFecha = (String)request.getParameter("fecha");
//parametro pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
//parametro pagina para realizar la paginacion
if (request.getParameter("buscarPaciente")!=null)
intBuscarPaciente=Integer.parseInt(request.getParameter("buscarPaciente"));
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
String ape = "";
String nom = "";
String dir = "";
String fec = "";
String tel = "";
String nif = "";
String ent = "";
String tar = "";
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>Introducir Paciente</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>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function enviar()
{
if(document.frm_buscar.apellidos.value.length == 0)
{
//alert("Introduce los apellidos del paciente");
modal({type:'error',title:'tenci鏮!',text:'Introduce los apellidos del paciente.',});
document.frm_buscar.apellidos.focus();
}
else if(document.frm_buscar.apellidos.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.apellidos.focus();
}
else if(document.frm_buscar.nombre.value.length == 0)
{
//alert("Introduce el nombre del paciente");
modal({type:'error',title:'tenci鏮!',text:'Introduce el nombre del paciente.',});
document.frm_buscar.nombre.focus();
}
else if(document.frm_buscar.nombre.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.nombre.focus();
}
else if(document.frm_buscar.direccion.value.length == 0)
{
//alert("Introduce la direccion del paciente");
modal({type:'error',title:'tenci鏮!',text:'Introduce la direccion del paciente.',});
document.frm_buscar.direccion.focus();
}
else if(document.frm_buscar.direccion.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.direccion.focus();
}
else if(document.frm_buscar.fec_nac.value.length == 0)
{
//alert("Introduce la fecha de nacimiento");
modal({type:'error',title:'tenci鏮!',text:'Introduce la fecha de nacimiento.',});
document.frm_buscar.fec_nac.focus();
}
else if (document.frm_buscar.fec_nac.value!=""){
if (!valorFecha(document.frm_buscar.fec_nac)){
document.frm_buscar.fec_nac.focus();
}else if(document.frm_buscar.telefono.value.length == 0)
{
//alert("Introduce un numero de telefono");
modal({type:'error',title:'tenci鏮!',text:'Introduce un numero de telefono.',});
document.frm_buscar.telefono.focus();
}
else if(document.frm_buscar.telefono.value.length > 9)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.telefono.focus();
}
else if(isNaN(document.frm_buscar.telefono.value))
{
//alert("Solo puede introducir n𤦤eros en el campo telefono");
modal({type:'error',title:'tenci鏮!',text:'Solo puede introducir n𤦤eros en el campo telefono.',});
document.frm_buscar.telefono.value = "";
document.frm_buscar.telefono.focus();
}
else if(document.frm_buscar.dni.value.length == 0)
{
//alert("Introduce un numero de DNI");
modal({type:'error',title:'tenci鏮!',text:'Introduce un numero de DNI.',});
document.frm_buscar.dni.focus();
}
else if(document.frm_buscar.dni.value.length > 10)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.dni.focus();
}
else if(document.frm_buscar.compania.value.length == 0)
{
//alert("Introduce la compa鎴a del asegurado");
modal({type:'error',title:'tenci鏮!',text:'Introduce la compa鎴a del asegurado.',});
document.frm_buscar.compania.focus();
}
else if(document.frm_buscar.compania.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.compania.focus();
}
else if((document.frm_buscar.identificador.value.length != 0)&&(isNaN(document.frm_buscar.identificador.value)))
{
//alert("Solo puede introducir n𤦤eros en el campo identificador");
modal({type:'error',title:'tenci鏮!',text:'Solo puede introducir n𤦤eros en el campo identificador.',});
document.frm_buscar.identificador.value = "";
document.frm_buscar.identificador.focus();
}
else if((document.frm_buscar.identificador.value.length != 0)&&(document.frm_buscar.identificador.value.length >= 99))
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.identificador.value = "";
document.frm_buscar.identificador.focus();
}
else if(document.frm_buscar.medico.value.length == 0)
{
//alert("Introduce el nombre del medico");
modal({type:'error',title:'tenci鏮!',text:'Introduce el nombre del medico.',});
document.frm_buscar.medico.focus();
}
else if(document.frm_buscar.medico.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.medico.focus();
}
else if(document.frm_buscar.espe.value.length == 0)
{
//alert("Introduce la especialidad");
modal({type:'error',title:'tenci鏮!',text:'Introduce la especialidad.',});
document.frm_buscar.medico.focus();
}
else if(document.frm_buscar.espe.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.medico.focus();
}
else if((document.frm_buscar.autorizacion.value.length != 0)&&(isNaN(document.frm_buscar.autorizacion.value)))
{
//alert("Solo puede introducir n𤦤eros en el campo autorizacion");
modal({type:'error',title:'tenci鏮!',text:'Solo puede introducir n𤦤eros en el campo autorizacion.',});
document.frm_buscar.autorizacion.value = "";
document.frm_buscar.autorizacion.focus();
}
else{
if(document.frm_buscar.autorizacion.value.length == 0)
{
document.frm_buscar.autorizacion.value = -1;
}
document.frm_buscar.submit();
}
}
}
function buscar(){
if(document.frm_buscar.identificador.value.length == 0)
{
//alert("Introduce el identificador de la tarjeta para realizar la b𢃼queda");
modal({type:'error',title:'tenci鏮!',text:'Introduce el identificador de la tarjeta para realizar la b𢃼queda.',});
document.frm_buscar.identificador.focus();
}
else if(isNaN(document.frm_buscar.identificador.value))
{
//alert("Solo puede introducir n𤦤eros en el campo Tarjeta");
modal({type:'error',title:'tenci鏮!',text:'Solo puede introducir n𤦤eros en el campo Tarjeta.',});
document.frm_buscar.identificador.value = "";
document.frm_buscar.identificador.focus();
}
else if(document.frm_buscar.identificador.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.identificador.value = "";
document.frm_buscar.identificador.focus();
}
else
{
document.frm_buscarPaciente.troque.value = document.frm_buscar.identificador.value;
document.frm_buscarPaciente.submit();
}
}
function paginacion(pagina)
{
document.frm_buscar.pagina.value = pagina;
document.frm_buscar.submit();
}
function enfocar()
{
document.frm_buscar.apellidos.focus();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frm_buscar.apellidos.focus();">
<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鏮 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墔ina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men de navegaci鏮 del m鏚ulo (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墔ina (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>
<table border="0" align="center" width="100%">
<%
//Se ha pulsado en Buscar Paciente
/*if (intBuscarPaciente==1){
troquelado = (String)request.getParameter("troque");
PersistenciaTapecap per = new PersistenciaTapecap();
Tapecap tapecap = null;
Vector vSeleccion = per.buscarPaciente(troquelado, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
mensajeNoEncontrado = "No se ha encontrado el paciente";
}
else
{
tapecap = (Tapecap)vSeleccion.firstElement();
if (tapecap.getApellidos()!=null){
ape = tapecap.getApellidos();
}
if (tapecap.getNombre()!=null){
nom = tapecap.getNombre().trim();
}
if (tapecap.getDireccion()!=null){
dir = tapecap.getDireccion();
}
if (tapecap.getFecha_nac()!=null){
fec = tapecap.getFecha_nac().toString();
String[] arrFecha = fec.split("-");
fec = arrFecha[2] + "-" + arrFecha[1] + "-" + arrFecha[0];
}
if (tapecap.getTelefono()!=null){
tel = tapecap.getTelefono().trim();
}
if (tapecap.getNif()!=null){
nif = tapecap.getNif().trim();
}
if (tapecap.getCompa鎴a()!=null){
ent = tapecap.getCompa鎴a();
}
}
}*/
if (intBuscarPaciente==1){
if (request.getParameter("nom")!=null)
nom=(String)request.getParameter("nom");
if (request.getParameter("ape")!=null)
ape=(String)request.getParameter("ape");
if (request.getParameter("dir")!=null)
dir=(String)request.getParameter("dir");
if (request.getParameter("fec")!=null)
fec=(String)request.getParameter("fec");
if (request.getParameter("tel")!=null)
tel=(String)request.getParameter("tel");
if (request.getParameter("nif")!=null)
nif=(String)request.getParameter("nif");
if (request.getParameter("ent")!=null)
ent=(String)request.getParameter("ent");
if (request.getParameter("tar")!=null)
tar=(String)request.getParameter("tar");
}
%>
<!-- Presentacion de los resultados -->
<form name="frm_buscar" action="<%=request.getContextPath()%>/servlet/GestorMedicos?x=<%=strParametroMenu%>" method="post" >
<input type="hidden" name="pagina" value="1" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_PETICION_CAPTURADA%>">
<h3>DATOS B糜ICOS DE LA ANAL炆ICA</h3>
<table border="0" align="center">
<tr>
<td colspan="2" align="center">
<span class="menuOn"><%=mensajeNoEncontrado %></span>
</td>
</tr>
<tr>
<td colspan="2" align="right">&nbsp;</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Apellidos:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="apellidos" name="apellidos" value="<%=ape%>"/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Nombre:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="nombre" name="nombre" value="<%=nom%>"/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita">Direccion:</label>
</td>
<td>
<input size="30" type="text" class="txt" id="direccion" name="direccion" value="<%=dir%>"/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita">Fecha Nacimiento (dd-mm-aaaa):</label>
</td>
<td>
<input size="30" type="text" class="txt" id="fec_nac" name="fec_nac" value="<%=fec%>"/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Telefono:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="telefono" name="telefono" value="<%=tel%>"/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">DNI:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="dni" name="dni" value="<%=nif%>"/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita">Compa鎴a:</label>
</td>
<td>
<input size="30" type="text" class="txt" id="compania" name="compania" value="<%=ent%>"/>
</td>
</tr>
<tr>
<tr>
<td align="right">
<label class="txtnegrita">Tarjeta:</label>
</td>
<td>
<input size="30" type="text" class="txt" id="identificador" name="identificador" value="<%=tar%>"/>
<a href="javascript:buscar()" class="enlace">Buscar Paciente</a>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Peticionario:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="medico" name="medico" value=""/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Especialidad:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="espe" name="espe" value=""/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Autorizacion:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="autorizacion" name="autorizacion" value=""/>
</td>
</tr>
<tr>
<td colspan="2" align="right">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center">
<a href="javascript:enviar()" class="enlace">Introducir Paciente</a>
</td>
</tr>
<tr>
<td colspan="2" align="right">&nbsp;</td>
</tr>
</table>
</form>
<form name="frm_buscarPaciente" action="buscar_paciente.jsp?x=16&pagina=1" method="post" >
<input type="hidden" name="pagina" value="1" />
<input type="hidden" name="buscarPaciente" value="1" />
<input type="hidden" name="troque" value="" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_PETICION_CAPTURADA%>">
</form>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p墔ina de peticiones capturadas (med/peticiones_capturadas.jsp)");
}
%>
+317
View File
@@ -0,0 +1,317 @@
<%@ 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.text.SimpleDateFormat" %>
<%@ page import="java.util.Calendar" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de liquidaciones (med/liquidacion.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 liquidaciones (med/liquidacion.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
StringBuffer strSql = new StringBuffer();
int intPagina = 0;
double dblImporteTotal=0;
Object aCondiciones[]=null;
//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 pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
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>Liquidaciones</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacion.pagina.value=pagina;
document.frmLiquidacion.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmLiquidacion" action="liquidacion.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//Creación de la tabla presentación de resultados
SimpleDateFormat sdfFormateadorFecha = new SimpleDateFormat("MM/yyyy");
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
sdfFormateadorFecha.format(dtFecha);
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
PersistenciaVTamovextTtactmed per = new PersistenciaVTamovextTtactmed();
Vector vSeleccion = per.listado_liquidaciones_por_medico(intMedico, intEspecialidad, sdfFormateadorFecha.format(dtFecha), intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Cantidad</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Importe</td>
</tr>
<%
VTamovextTtactmed vTamovextttactmed = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
vTamovextttactmed = (VTamovextTtactmed)vSeleccion.elementAt(i);
//vamos calculando el importe total
dblImporteTotal=dblImporteTotal + vTamovextttactmed.getImporteActoMedico();
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=vTamovextttactmed.getActo()%></td>
<td class="<%=estilo%>" align="left"><%=vTamovextttactmed.getDescripcionActoMedico()%></td>
<td class="<%=estilo%>" align="center"><%=vTamovextttactmed.getCantidad()%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextttactmed.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextttactmed.getImporteActoMedico(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="right"><span class="txtNegrita">Importe total: </span><span class="txt"><%=Utilidades.formatearDouble(dblImporteTotal,PersistenciaParametros.decimales)%></span></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de liquidaciones (med/liquidacion.jsp)");
}
%>
+303
View File
@@ -0,0 +1,303 @@
<%@ 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.text.SimpleDateFormat" %>
<%@ page import="java.util.Calendar" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de liquidaciones (med/liquidacion.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 liquidaciones (med/liquidacion.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
StringBuffer strSql = new StringBuffer();
int intPagina = 0;
double dblImporteTotal=0;
Object aCondiciones[]=null;
//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 pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
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>Liquidaciones</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacionAnalista.pagina.value=pagina;
document.frmLiquidacionAnalista.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmLiquidacionAnalista" action="liquidacion_analista.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//Creación de la tabla presentación de resultados
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
int intEspe = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
PersistenciaTamovext per = new PersistenciaTamovext();
Vector<Object[]> vSeleccion = per.MovimientosCapturadosPorMedico(intPagina, intMedico, intEspe);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorización</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Paciente</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
</tr>
<%
//Tamovext tamovext= null;
//Object tamovext= null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
Object[] aResultados = vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/med/detalle_liquidacion_analista.jsp?x=<%=strParametroMenu%>&au=<%=aResultados[1]%>&pagina=1" class="enlace"><%=aResultados[1]%></a></td>
<td class="<%=estilo%>" align="left"><%=aResultados[0]%></td>
<td class="<%=estilo%>" align="center"><%=Utilidades.formatear_fecha((java.sql.Date)aResultados[2])%></td>
<td class="<%=estilo%>" align="right"><%=aResultados[3]%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de liquidaciones (med/liquidacion.jsp)");
}
%>
+303
View File
@@ -0,0 +1,303 @@
<%@ 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.text.SimpleDateFormat" %>
<%@ page import="java.util.Calendar" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de liquidaciones (med/liquidacion.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 liquidaciones de radiólogos (med/liquidacion_radiologo.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
StringBuffer strSql = new StringBuffer();
int intPagina = 0;
double dblImporteTotal=0;
Object aCondiciones[]=null;
//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 pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
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>Liquidaciones</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacionRadiologo.pagina.value=pagina;
document.frmLiquidacionRadiologo.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmLiquidacionRadiologo" action="liquidacion_radiologo.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//Creación de la tabla presentación de resultados
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
int intEspe = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
PersistenciaTamovext per = new PersistenciaTamovext();
Vector<Object[]> vSeleccion = per.MovimientosCapturadosPorMedico(intPagina, intMedico, intEspe);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorización</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Paciente</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
</tr>
<%
//Tamovext tamovext= null;
//Object tamovext= null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
Object[] aResultados = vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/med/detalle_liquidacion_radiologo.jsp?x=<%=strParametroMenu%>&au=<%=aResultados[1]%>&pagina=1" class="enlace"><%=aResultados[1]%></a></td>
<td class="<%=estilo%>" align="left"><%=aResultados[0]%></td>
<td class="<%=estilo%>" align="center"><%=Utilidades.formatear_fecha((java.sql.Date)aResultados[2])%></td>
<td class="<%=estilo%>" align="right"><%=aResultados[3]%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de liquidaciones de radiólogos (med/liquidacion_radiologo.jsp)");
}
%>
+335
View File
@@ -0,0 +1,335 @@
<%@ 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 medicamentos (med/medicamentos.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 medicamentos (med/medicamentos.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strCampoNombre="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
//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"));
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>Medicamentos</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function informarParametroCampoBusqueda()
{
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
//no kaske, ya que en esa asignacion se utiliza comillas simples
<%
String strCampoNombreAux=strCampoNombre.replace('\'', '~');
%>
//cogemos el valor del campo de busqueda sin comillas simples
var lstCampoBusqueda = '<%=strCampoNombreAux%>';
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
while(lstCampoBusqueda.indexOf("~")!=-1)
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
document.frmMedicamentos.nombre.value=lstCampoBusqueda;
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function buscar()
{
document.frmMedicamentos.pagina.value=1;
pasarAMayusculas(document.frmMedicamentos.nombre);
document.frmMedicamentos.submit();
}
function paginacion(pagina)
{
document.frmMedicamentos.pagina.value=pagina;
pasarAMayusculas(document.frmMedicamentos.nombre);
document.frmMedicamentos.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:informarParametroCampoBusqueda()">
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<form name="frmMedicamentos" action="medicamentos.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
<td colspan="2">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Nombre medicamento: </span></td>
<td><input type="text" size="50" name="nombre" class="txt"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<%
PersistenciaTamedica per = new PersistenciaTamedica();
Vector vSeleccion = per.listado_medicamentos(strCampoNombre, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="2" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
</tr>
<%
Tamedica tamedica = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
tamedica = (Tamedica)vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="left"><%=tamedica.getDescripcion()%></td>
<td class="<%=estilo%>" align="center"><%=tamedica.getCodigo()%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="2">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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(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 medicamentos (med/medicamentos.jsp)");
}
%>
+487
View File
@@ -0,0 +1,487 @@
<%@ 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.text.SimpleDateFormat" %>
<%
/* LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p&aacute;gina de noticias (med/noticias.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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p&aacute;gina de noticias (med/noticias.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strCampoNombre="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa();
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
//Obtenci&oacute;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"));
//Probando WebServiceEntidad
String saludo = "";
if (request.getParameter("saludo")!=null)
saludo = (String)request.getParameter("saludo");
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
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>Noticias</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/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function leer(formulario)
{
var nombre = formulario;
nombre.submit();
}
function todas()
{
document.frmTodas.submit();
}
function volver()
{
document.frmVolver.submit();
}
function saludar()
{
document.frmSaludar.submit();
}
function json()
{
document.frmJson.submit();
}
function notiRapida()
{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
$('.marquee').stop(); //
$('.marquee').clearQueue();
marqueeRapido($('.tituloNoticia'), $('.marquee'),not);
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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>
<img src="<%=request.getContextPath()%>/img/arrow.png" class="noticiaRapida" onclick="notiRapida()" title="Pasar R&aacute;pido">
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci&oacute;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&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;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&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<!--<td width="1px" bgcolor="#AB8383" height="330px"></td> -->
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<%
//Noticias del cuerpo de la p&aacute;gina
PersistenciaTanoticias per = new PersistenciaTanoticias();
if(request.getParameter("todas")!=null) //Se ha pulsado en ver todas las noticias
{
%>
<div class="cajaCentral">
<div class="tituloCajaCentral">
<span>TODAS LAS NOTICIAS</span>
</div>
<br>
<table border="0" width="95%" align="center">
<%
Vector vSeleccion = per.obtener_noticias(medico,intEspecialidad,intPagina);
if(vSeleccion.size()==0){
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt">No hay noticias</span></td>
</tr>
<%
}else{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="2" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripcion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
</tr>
<%
Tanoticias tanoticia = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
tanoticia = (Tanoticias)vSeleccion.elementAt(i);
%>
<tr style="height:25px;" class="trResultados">
<td class="<%=estilo%>" align="left"><%=tanoticia.getNoticia()%></td>
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tanoticia.getFecha())%></td>
</tr>
<%
}
%>
<tr><td colspan="2">&nbsp;</td></tr>
<%
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="2">
<table border="0" align="center">
<tr>
<%if (per.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 width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/med/noticias.jsp?x=19&pagina=1" class="enlace">primero</a></td>
<td></td>
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>-->
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/med/noticias.jsp?x=19&pagina=<%=per.getPaginacion().getNumeroPagina() - 1%>" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">&uacute;ltimo</span></td>
<%}else{%>
<!--<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>-->
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/med/noticias.jsp?x=19&pagina=<%=per.getPaginacion().getNumeroPagina() + 1%>" class="enlace">siguiente</a></td>
<td></td>
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">&uacute;ltimo</a></td>-->
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/med/noticias.jsp?x=19&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
<tr>
<td align="left">
<form name="frmVolver" id ="frmVolver" action="noticias.jsp?x=19&pagina=1" method="post">
<a href="javascript:volver()" class="enlace">NOTICIAS SIN LEER</a>
</form>
</td>
</tr>
</table>
</div>
<%
}else{ //Mostramos las noticias no leidas
%>
<div class="cajaCentral">
<div class="tituloCajaCentral">
<span>NOTICIAS SIN LEER</span>
</div>
<br>
<table border="0" width="95%" align="center">
<%
if(request.getParameter("leida")!=null)
{
int not = 0;
not=Integer.parseInt(request.getParameter("leida"));
boolean leida = per.insertarNoticiaLeida(not, medico);
}
Vector vSeleccion = per.obtener_noticias_no_leidas(medico,intEspecialidad,intPagina);
if(vSeleccion.size()==0){
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt">No hay noticias sin leer</span></td>
</tr>
<%
}else{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="3" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripcion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Marcar como le&iacute;da</td>
</tr>
<%
Tanoticias tanoticia = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
tanoticia = (Tanoticias)vSeleccion.elementAt(i);
%>
<tr style="height:25px;" class="trResultados">
<td class="<%=estilo%>" align="left"><%=tanoticia.getNoticia()%></td>
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tanoticia.getFecha())%></td>
<td class="<%=estilo%>" align="center">
<form name="frmNoticias<%=i%>" id ="frmNoticias<%=i%>" action="noticias.jsp?x=19&pagina=1" method="post" style="margin:0 auto;">
<input type="hidden" name="leida" value="<%=tanoticia.getId_noticia() %>"/>
<a href="javascript:leer(frmNoticias<%=i%>)" class="enlace"> Le&iacute;da</a>
</form>
</td>
</tr>
<%
}
%>
<tr><td colspan="2">&nbsp;</td></tr>
<%
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="3">
<table border="0" align="center">
<tr>
<%if (per.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 width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/noticias.jsp?x=19&pagina=1" class="enlace">primero</a></td>
<td></td>
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>-->
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/med/noticias.jsp?x=19&pagina=<%=per.getPaginacion().getNumeroPagina() - 1%>" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">&uacute;ltimo</span></td>
<%}else{%>
<!--<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>-->
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/med/noticias.jsp?x=19&pagina=<%=per.getPaginacion().getNumeroPagina() + 1%>" class="enlace">siguiente</a></td>
<td></td>
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">&uacute;ltimo</a></td>-->
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/med/noticias.jsp?x=19&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
<tr>
<td align="left">
<form name="frmTodas" id ="frmTodas" action="noticias.jsp?x=19&pagina=1" method="post">
<input type="hidden" name="todas" value="1"/>
<a href="javascript:todas()" class="enlace">TODAS LAS NOTICIAS</a>
</form>
</td>
</tr>
</table>
</div>
<%
}
%>
</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);
}
var jsMostrarSaludo = "<%=saludo %>";
if (jsMostrarSaludo!=""){
alert(jsMostrarSaludo);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci&oacute;n de la p&aacute;gina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p&aacute;gina de noticias (med/noticias.jsp)");
}
%>
+280
View File
@@ -0,0 +1,280 @@
<%@ 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墔ina de password (med/password.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鏮 invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p墔ina de password (med/password.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
//Obtenci鏮 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");
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>Password</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/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<%
if( ((String)sesion.getAttribute("PERFIL")).equalsIgnoreCase(Constantes.PERFIL_ADMINISTRADOR) )
{
%>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<%
}
else
{
%>
<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>
<script language="JavaScript" type="text/javascript">
<!--
function enviar()
{
var blnFormularioValido = true;
//comprobamos si la clave nueva es vacia o esta rellena solo con espacios
if (blnFormularioValido && esVacia(frmClave.clave_nueva.value))
{
//alert("La clave es vac燰 o contiene 𠒇icamente espacios en blanco. Introduzca una clave v嫮ida.");
modal({type:'error',title:'tenci鏮!',text:'La clave es vac燰 o contiene 𠒇icamente espacios en blanco. Introduzca una clave v嫮ida.',});
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
//comprobamos que el tama隳 de la clave nueva no sea < 6
if (blnFormularioValido && frmClave.clave_nueva.value.length<6)
{
//alert("La clave debe tener como m璯imo 6 caracteres.");
modal({type:'error',title:'tenci鏮!',text:'La clave debe tener como m璯imo 6 caracteres.',});
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
//comprobamos que el valor de las claves introducidas sean iguales
if (blnFormularioValido && frmClave.clave_nueva.value != frmClave.confirmar_clave.value)
{
//alert("Las claves introducidas no conciden.");
modal({type:'error',title:'tenci鏮!',text:'Las claves introducidas no conciden.',});
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
//comprobamos que la nueva clave se diferente a la anterior
if (blnFormularioValido && frmClave.clave_anterior.value == frmClave.clave_nueva.value)
{
//alert("La nueva clave debe ser diferente a la clave ya existente.");
modal({type:'error',title:'tenci鏮!',text:'La nueva clave debe ser diferente a la clave ya existente.',});
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
if (blnFormularioValido)
{
document.frmClave.submit();
document.frmClave.clave_anterior.focus();
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="document.frmClave.clave_anterior.focus();">
<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鏮 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墔ina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men de navegaci鏮 del m鏚ulo (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墔ina (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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<form name="frmClave" action="../../servlet/GestorMedicos" method="post">
<td>
<table border="0" align="center">
<tr>
<td align="right"><span class="txtnegrita">Clave anterior: </span></td>
<td><input type="password" size="30" name="clave_anterior" class="txt" value="" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Clave nueva: </span></td></td>
<td><input type="password" size="30" name="clave_nueva" class="txt" value="" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Confirmar clave: </span></td></td>
<td><input type="password" size="30" name="confirmar_clave" class="txt" value="" maxlength="50"></td>
</tr>
<tr>
<td colspan="2" align="center"><a href="javascript:frmClave.reset();frmClave.clave_anterior.focus()" class="enlace">Deshacer</a>&nbsp;&nbsp;&nbsp;<a href="javascript:enviar()" class="enlace">Aceptar</a></td>
</tr>
</table>
</td>
<input type="hidden" name="x" value="<%=strParametroMenu%>">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ACTUALIZAR_PASSWORD%>">
</form>
</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p墔ina de password (med/password.jsp)");
}
%>
+435
View File
@@ -0,0 +1,435 @@
<%@ 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="com.tarisan.util.DES" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de peticiones capturadas (med/peticiones_capturadas.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 peticiones capturadas (med/peticiones_capturadas.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strCampoFecha="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
int intExito = 0;
int tipo = 0; //tipo de peticion para buscar el pdf en su carpeta
String texto = "";
int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa();
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
//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("fecha")!=null)
strCampoFecha = (String)request.getParameter("fecha");
//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
int intImpresion = 0;
if (request.getParameter("imp")!=null) {
intImpresion = Integer.parseInt(request.getParameter("imp"));
}
//parametro exito para saber si se ha hecho la insert o no
if (request.getParameter("exito")!=null)
intExito = Integer.parseInt(request.getParameter("exito"));
//atributo ENC que obtiene la peticion encriptada
String peticionE = "";
if (sesion.getAttribute("ENC")!=null) {
peticionE = (String)sesion.getAttribute("ENC");
sesion.removeAttribute("ENC");
}
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
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/>", " ");
}
}
if (intEspecialidad == ParametrosConfiguracion.analiticas){
tipo = 5;
texto = "INTRODUCIR DATOS DE ANALÍTICA MANUALMENTE";
}else if (intEspecialidad == ParametrosConfiguracion.radiodiagnostico){
texto = "INTRODUCIR DATOS DE RADIODIAGNÓSTICO MANUALMENTE";
tipo = 18;
}
%>
<html>
<head>
<title>Peticiones capturadas</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.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">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function informarParametroCampoBusqueda()
{
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
//no kaske, ya que en esa asignacion se utiliza comillas simples
<%
String strCampoFechaAux=strCampoFecha.replace('\'', '~');
%>
//cogemos el valor del campo de busqueda sin comillas simples
var lstCampoBusqueda = '<%=strCampoFechaAux%>';
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
while(lstCampoBusqueda.indexOf("~")!=-1)
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
document.frmPeticionesCapturadas.fecha.value=lstCampoBusqueda;
}
function comprobarImpresion(impresion)
{
if (impresion==1) { //se efectua la impresion
document.frmImprimirPeticion.nombrePDF.value = "<%=peticionE%>";
document.frmImprimirPeticion.submit();
}
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function buscar()
{
document.frmPeticionesCapturadas.pagina.value=1;
//pasarAMayusculas(document.frmPeticionesCapturadas.fecha);
//document.frmPeticionesCapturadas.submit();
if (document.frmPeticionesCapturadas.fecha.value!=""){
if (valorFecha(document.frmPeticionesCapturadas.fecha)){
document.frmPeticionesCapturadas.submit();
}
}else{
document.frmPeticionesCapturadas.submit();
}
}
function paginacion(pagina)
{
document.frmPeticionesCapturadas.pagina.value=pagina;
//pasarAMayusculas(document.frmPeticionesCapturadas.fecha);
//document.frmPeticionesCapturadas.submit();
if (document.frmPeticionesCapturadas.fecha.value!=""){
if (valorFecha(document.frmPeticionesCapturadas.fecha)){
document.frmPeticionesCapturadas.submit();
}
}else{
document.frmPeticionesCapturadas.submit();
}
}
function imprimirPeCap(){
document.frmImprimirPeticiones.fec.value = document.frmPeticionesCapturadas.fecha.value;
document.frmImprimirPeticiones.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:informarParametroCampoBusqueda();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="../../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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="5" align="left"><a href="introducir_paciente.jsp?x=16" class="enlace"><%=texto %></a></td></tr>
<tr><td colspan="5">&nbsp;</td></tr>
<tr>
<form name="frmPeticionesCapturadas" action="peticiones_capturadas.jsp?x=<%=strParametroMenu%>" method="post">
<td colspan="5">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Fecha (dd-mm-aaaa): </span></td>
<td><input type="text" size="12" name="fecha" class="txt" maxlength="10"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="5">&nbsp;</td></tr>
<%
/*PersistenciaTtactmedGPC per = new PersistenciaTtactmedGPC();
Vector vSeleccion = per.listadoDeterminacionesAnaliticas(strCampoNombre, intPagina);*/
PersistenciaTapecap per = new PersistenciaTapecap();
Vector vSeleccion = per.obtenerPeticionesCapturadas(medico, strCampoFecha, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><span class="txt"><%= pertamensaje.obtenerMensaje(10).getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Codigo</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorización</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Compañía</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
</tr>
<%
Tapecap tapecap = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
tapecap = (Tapecap)vSeleccion.elementAt(i);
String aut = "";
if (tapecap.getAutorizacion()!=-1){
aut = ""+tapecap.getAutorizacion();
}
String strPrescriptor = "";
if (tapecap.getPrescriptor()!=null){
strPrescriptor = ""+tapecap.getPrescriptor();
}
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=tapecap.getCodigo() %></td>
<td class="<%=estilo%>" align="left"><%=tapecap.getApellidos()%>, <%=tapecap.getNombre()%></td>
<td class="<%=estilo%>" align="center"><%=aut %></td>
<td class="<%=estilo%>" align="center"><%=tapecap.getCompañia() %></td>
<td class="<%=estilo%>" align="left"><%=strPrescriptor %></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.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(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td><form name="frmImprimirPeticiones" action="<%=request.getContextPath()%>/servlet/GestorMedicos?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="fec" value="">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_IMPRIMIR_PETICIONES%>">
<input type="button" name="imprimir" value="Imprimir Peticiones" onclick="javascript:imprimirPeCap()" class="enlace">
</form></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
<%if(intExito != 0)
{
%><table border="0" align="center">
<tr><td class="txtnegrita"><font color="blue">Analítica introducida correctamente</font></td></tr>
</table><%
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
<input type="hidden" name="tipo" value="<%=tipo%>"/>
<input type="hidden" name="nombrePDF" value="" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
</form>
</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(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 peticiones capturadas (med/peticiones_capturadas.jsp)");
}
%>
+203
View File
@@ -0,0 +1,203 @@
<%@ 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" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de preaviso de caducidad de clave (med/preaviso.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 preaviso de caducidad de clave (med/preaviso.jsp)");
try
{
//Obtención del perfil del usuario conectado
StringBuffer perfil = new StringBuffer();
perfil.append("|");
perfil.append(sesion.getAttribute("PERFIL"));
perfil.append("|");
//Obtención del mensaje de preaviso de caducidad de fecha
String mensaje = (String)sesion.getAttribute("ERROR");
if((mensaje == null) || (mensaje.trim().compareTo("") == 0))
{
mensaje = "Se ha producido un error al realizar la consulta";
}
sesion.removeAttribute("ERROR");
String paginaRedirigida = "";
if(((String)sesion.getAttribute("PERFIL")).compareTo(Constantes.PERFIL_ADMINISTRADOR) == 0)
{
//paginaRedirigida = "../../servlet/GestorAdministracion?OPCION=" + Constantes.OPC_ADM_USUARIO_LISTA;
paginaRedirigida = "../../servlet/GestorMedicos?OPCION=" + Constantes.OPC_MED_PASSWORD;
}
else
{
//paginaRedirigida = "../../servlet/GestorMedicos?OPCION=" + Constantes.OPC_MED_LIQUIDACION;
paginaRedirigida = "../../servlet/GestorMedicos?OPCION=" + Constantes.OPC_MED_PASSWORD;
}
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>Preaviso de caducidad de clave</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/menu_med.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center" class="txtnegrita"><%= mensaje %></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center"><a href="<%= paginaRedirigida %>" class="enlace">Continuar</a></td>
</tr>
<tr>
<td>&nbsp;</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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de preaviso de caducidad de clave (med/preaviso.jsp)");
}
%>
+350
View File
@@ -0,0 +1,350 @@
<%@ 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.util.Calendar" %>
<%
//LogTarisan.logger.log(NivelLog.INFO, "Inicio p墔ina de pescripciones (med/prescripciones.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鏮 invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p墔ina de pescripciones (med/prescripciones.jsp)");
try
{
// Definicion de variables
String strParametroMenu="";
String strCampoAnio=String.valueOf(Calendar.getInstance().get(Calendar.YEAR));
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
//Obtenci鏮 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("anio")!=null)
strCampoAnio = (String)request.getParameter("anio");
//parametro pagina para realizar la paginacion
if (request.getParameter("pagina")!=null)
intPagina=Integer.parseInt(request.getParameter("pagina"));
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>Prescripciones</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/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.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>
<script language="JavaScript" type="text/javascript">
<!--
function buscar()
{
var anio = document.frmPrescripciones.anio.value;
if ((anio.length<4 || !soloNumeros(anio)) && anio!="")
{
//alert("El a隳 debe ser un valor num廨ico de 4 digitos.");
modal({type:'error',title:'tenci鏮!',text:'El a隳 debe ser un valor num廨ico de 4 digitos.',});
document.frmPrescripciones.anio.focus();
}
else
{
document.frmPrescripciones.pagina.value=1;
document.frmPrescripciones.submit();
}
}
function paginacion(pagina)
{
document.frmPrescripciones.pagina.value=pagina;
document.frmPrescripciones.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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鏮 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墔ina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men de navegaci鏮 del m鏚ulo (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墔ina (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>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<form name="frmPrescripciones" action="prescripciones.jsp?x=<%=strParametroMenu%>" method="post">
<td colspan="2">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">A隳: </span></td>
<td><input type="text" size="4" name="anio" class="txt" value="<%=strCampoAnio%>" maxlength="4"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<%
PersistenciaVTaprescrTamedico per = new PersistenciaVTaprescrTamedico();
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
Vector vSeleccion = per.listado_prescripciones(strCampoAnio, intMedico, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt">No existe informaci鏮 para el a隳 seleccionado.</span></td>
</tr>
<%
}
else
{
if (intPagina != 0) { //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="3" align="right"><span class="txt">P墔ina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre facultativo</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Importe</td>
</tr>
<%
VTaprescrTamedico vTaprescrTamedico = null;
String estilo = "";
for(int i = 0; i < vSeleccion.size(); i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
vTaprescrTamedico = (VTaprescrTamedico)vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="left"><%=vTaprescrTamedico.getNombre() + " " + vTaprescrTamedico.getApellidos()%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTaprescrTamedico.getImporte(),PersistenciaParametros.decimales)%></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 (per.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(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">萖timo</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">萖timo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<%
if (!strCampoAnio.equalsIgnoreCase(""))
{
%>
<td colspan="2" align="right"><span class="txtNegrita">Importe total: </span><span class="txt"><%=Utilidades.formatearDouble(per.obtenerImporteTotal(intMedico,Integer.parseInt(strCampoAnio)), PersistenciaParametros.decimales)%></span></td>
<%
}
else
{
%>
<td colspan="2" align="right"><span class="txtNegrita">Importe total: </span><span class="txt"><%=Utilidades.formatearDouble(per.obtenerImporteTotal(intMedico,0), PersistenciaParametros.decimales)%></span></td>
<%
}
%>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</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", "Error en la presentaci鏮 de la p墔ina al usuario.");
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鏮 de la p墔ina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p墔ina de prescripciones (med/prescripciones.jsp)");
}
%>
+220
View File
@@ -0,0 +1,220 @@
<%@ 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&aacute;gina de gestor de perfiles (med/verify_cambios_perfil.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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p&aacute;gina de gestor de perfiles (med/verify_cambios_perfil.jsp)");
// Definicion de variables
String strMensajeSinElementos="No ha seleccionado ning&uacute;n acto m&eacute;dico.";
String strParametroMenu="";
String strCampoNombre="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
//Obtenci&oacute;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"));
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&oacute;n Perfiles</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.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">pNG="<%= perfil.toString() %>"</script>
</head>
<script language="javascript" type="text/javascript">
<!--
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<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&oacute;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&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;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&aacute;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>
<table border="0" align="center" width="100%">
<%
String valores = request.getParameter("valores");
String borrar = request.getParameter("borrar");
//LogTarisan.logger.log(NivelLog.INFO, "Llega 136");
if(valores != null)
{
int grupo = Integer.parseInt(request.getParameter("grupo"));
int espe = Integer.parseInt(request.getParameter("espe"));
String descrip = request.getParameter("descripcion");
int medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
valores = valores.substring(0, valores.length());
int i=0;
//LogTarisan.logger.log(NivelLog.INFO, "Llega 145: "+grupo+", espe: "+espe+", descrip:"+descrip+", medico:"+medico);
PersistenciaTagruana perTag = new PersistenciaTagruana();
perTag.borrar_actos(grupo, espe, medico);
i = perTag.insertar_actos(grupo, espe, medico, valores, descrip);
%>
<tr><td class="txtNegrita" align="center" style="color:blue">Se han insertado los <%=i %> an&aacute;lisis del perfil: <%=descrip %></td></tr>
<%
descrip = null;
}
else
{
//LogTarisan.logger.log(NivelLog.INFO, "Llega 168:"+borrar);
int medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
int espe = Integer.parseInt(request.getParameter("especialidad"));
PersistenciaTagruana perTag = new PersistenciaTagruana();
perTag.borrar_actos(Integer.parseInt(request.getParameter("borrar")), espe, medico);
%>
<tr><td class="txtNegrita" align="center" style="color:blue">Se ha borrado el perfil correctamente.</td></tr>
<%
//sql=null;
medico = espe = 0;
}
valores = borrar = null;
%>
<tr><td align="center">&nbsp;</td></tr>
<tr><td align="center"><a href="gestor_perfiles.jsp?x=13&pagina=1" class="enlace">Volver</a></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>
<%
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p&aacute;gina de gestion de perfiles (med/verify_cambios_perfil.jsp)");
}
%>