añado jsp
@@ -0,0 +1,328 @@
|
|||||||
|
<%@ 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, "Inicio pá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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strFecha = "";
|
||||||
|
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 fecha que indica el año para el que desea realizar la impresion
|
||||||
|
if (request.getParameter("fecha")!=null)
|
||||||
|
strFecha=(String)request.getParameter("fecha");
|
||||||
|
|
||||||
|
//parametro pagina para realizar la paginacion
|
||||||
|
if (request.getParameter("pagina")!=null)
|
||||||
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Pacientes</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="../../js/imprimir.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.frmDetallePacientes.pagina.value=pagina;
|
||||||
|
document.frmDetallePacientes.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function comprobarImpresion()
|
||||||
|
{
|
||||||
|
if (document.frmDetallePacientes.fecha.value!="")
|
||||||
|
{
|
||||||
|
return valorFecha(document.frmDetallePacientes.fecha);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert("Introduzca la fecha.");
|
||||||
|
document.frmDetallePacientes.fecha.focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function realizarImpresion()
|
||||||
|
{
|
||||||
|
if (comprobarImpresion()==true)
|
||||||
|
{
|
||||||
|
VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
if (comprobarImpresion()==true) {
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
|
||||||
|
alert("Victor");
|
||||||
|
//var ventana =
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
|
||||||
|
|
||||||
|
<!-- Logotipo de IMQ de Navarra //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../../img/imq_grande.gif" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<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">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></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 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"> </td>
|
||||||
|
</tr>
|
||||||
|
<form name="frmDetallePacientes" action="detallePacientes.jsp?x=<%=strParametroMenu%>" method="post" onsubmit="javascript:return realizarImpresion()">
|
||||||
|
<td colspan="4">
|
||||||
|
<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" value="<%=strFecha%>" maxlength="10"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:imprimir()" class="enlace">Imprimir</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<tr><td colspan="4"> </td></tr>
|
||||||
|
<%
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
|
||||||
|
strSql.append("SELECT tamovext.fecha, tamovext.precio as precioActoMedico, ttactmed.descripcion as descripcionActoMedico, ttclient.nombre, ttclient.apellidos");
|
||||||
|
strSql.append(" FROM tamovext, ttactmed, ttbenefi, ttclient");
|
||||||
|
strSql.append(" WHERE tamovext.acto=ttactmed.acto");
|
||||||
|
strSql.append(" and tamovext.especialidad=ttactmed.especialidad");
|
||||||
|
strSql.append(" and tamovext.medico=?");
|
||||||
|
strSql.append(" and tamovext.especialidad=?");
|
||||||
|
strSql.append(" and tamovext.colectivo=ttbenefi.colectivo");
|
||||||
|
strSql.append(" and tamovext.poliza=ttbenefi.poliza");
|
||||||
|
strSql.append(" and tamovext.orden=ttbenefi.orden");
|
||||||
|
strSql.append(" and ttbenefi.cliente=ttclient.cliente");
|
||||||
|
strSql.append(" and ttbenefi.fecha_baja is null");
|
||||||
|
strSql.append(" ORDER BY tamovext.fecha");
|
||||||
|
|
||||||
|
aCondiciones = new Object[2];
|
||||||
|
aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||||
|
aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||||
|
|
||||||
|
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
|
||||||
|
Vector vSeleccion = per.seleccionar(strSql.toString(), intPagina, aCondiciones);
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center"><span class="txt">No se ha encontrado ningún dato.</span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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">Fecha</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</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>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
|
||||||
|
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></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)" 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>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de pacientes (med/detallePacientes.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,272 @@
|
|||||||
|
<%@ 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, "Inicio pá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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu="";
|
||||||
|
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"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Análisis</title>
|
||||||
|
<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" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmAnalisis.pagina.value=pagina;
|
||||||
|
document.frmAnalisis.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarAnalisis(autorizacion, path)
|
||||||
|
{
|
||||||
|
//var url = path + "/servlet/GestorMedicos?OPCION=<%=Constantes.OPC_MED_REGISTRAR_LOG_ANALISIS%>&autorizacion=" + autorizacion;
|
||||||
|
//var ventana = window.open(url,"analisis" + autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
var ventanaAnalisisMedico = window.open('<%=request.getContextPath()%>'+ '/peticiones/' + autorizacion + '.pdf',autorizacion,"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">
|
||||||
|
|
||||||
|
<!-- Logotipo de IMQ de Navarra //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<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">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></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 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"> </td>
|
||||||
|
</tr>
|
||||||
|
<form name="frmAnalisis" action="analisis.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PersistenciaVTaresanaTaclient per = new PersistenciaVTaresanaTaclient();
|
||||||
|
Vector vSeleccion = per.listado_analisis_por_medico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(),intPagina);
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="txt">No se ha encontrado ningún dato.</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">Fecha</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
VTaresanaTaclient vTaresanaTaclient = 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);
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if (vTaresanaTaclient.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTaclient.getFecha())%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTaresanaTaclient.getNombre() + " " + vTaresanaTaclient.getApellidos()%></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else //campo autorizacion tiene un valor valido
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><a href="javascript:mostrarAnalisis(<%=vTaresanaTaclient.getAutorizacion()%>, '<%=request.getContextPath()%>')" class="enlaceAnalisis"><%=sdfFormateadorFecha.format(vTaresanaTaclient.getFecha())%></a></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><a href="javascript:mostrarAnalisis(<%=vTaresanaTaclient.getAutorizacion()%>, '<%=request.getContextPath()%>')" class="enlaceAnalisis"><%=vTaresanaTaclient.getNombre() + " " + vTaresanaTaclient.getApellidos()%></a></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>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de analisis (med/analisis.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,345 @@
|
|||||||
|
<%@ 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, "Inicio pá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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strFecha = "";
|
||||||
|
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 fecha que indica el año para el que desea realizar la impresion
|
||||||
|
if (request.getParameter("fecha")!=null)
|
||||||
|
strFecha=(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"));
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Pacientes</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="../../js/imprimir.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.frmDetallePacientes.pagina.value=pagina;
|
||||||
|
document.frmDetallePacientes.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function comprobarFecha()
|
||||||
|
{
|
||||||
|
if (document.frmDetallePacientes.fecha.value!="")
|
||||||
|
{
|
||||||
|
return valorFecha(document.frmDetallePacientes.fecha);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert("Introduzca la fecha.");
|
||||||
|
document.frmDetallePacientes.fecha.focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function realizarImpresion()
|
||||||
|
{
|
||||||
|
if (comprobarImpresion()==true)
|
||||||
|
{
|
||||||
|
VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
if (comprobarFecha()==true) {
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
|
||||||
|
document.frmDetallePacientes.action = "<%=request.getContextPath()%>/servlet/GestorPacientes?x=4&pagina=1&imp=1";
|
||||||
|
document.frmDetallePacientes.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) { //se efectua la impresion
|
||||||
|
var ventana1 = window.open('<%=request.getContextPath()%>/peticiones/DetallePaciente_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Detalle","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%>);">
|
||||||
|
|
||||||
|
<!-- Logotipo de IMQ de Navarra //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<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">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></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 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"> </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="OPCION" value="<%=Constantes.OPC_MED_DETALLE_PACIENTE%>">
|
||||||
|
|
||||||
|
<td colspan="4">
|
||||||
|
<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" value="<%=strFecha%>" maxlength="10"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:imprimir()" class="enlace">Imprimir</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<tr><td colspan="4"> </td></tr>
|
||||||
|
<%
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
|
||||||
|
strSql.append("SELECT tamovext.fecha, tamovext.precio as precioActoMedico, ttactmed.descripcion as descripcionActoMedico, ttclient.nombre, ttclient.apellidos");
|
||||||
|
strSql.append(" FROM tamovext, ttactmed, ttbenefi, ttclient");
|
||||||
|
strSql.append(" WHERE tamovext.acto=ttactmed.acto");
|
||||||
|
strSql.append(" and tamovext.especialidad=ttactmed.especialidad");
|
||||||
|
strSql.append(" and tamovext.medico=?");
|
||||||
|
strSql.append(" and tamovext.especialidad=?");
|
||||||
|
strSql.append(" and tamovext.colectivo=ttbenefi.colectivo");
|
||||||
|
strSql.append(" and tamovext.poliza=ttbenefi.poliza");
|
||||||
|
strSql.append(" and tamovext.orden=ttbenefi.orden");
|
||||||
|
strSql.append(" and tamovext.entidad=ttbenefi.entidad");
|
||||||
|
strSql.append(" and ttbenefi.cliente=ttclient.cliente");
|
||||||
|
strSql.append(" ORDER BY tamovext.fecha");
|
||||||
|
|
||||||
|
aCondiciones = new Object[2];
|
||||||
|
aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||||
|
aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||||
|
|
||||||
|
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
|
||||||
|
Vector vSeleccion = per.seleccionar(strSql.toString(), intPagina, aCondiciones);
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center"><span class="txt">No se ha encontrado ningún dato.</span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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">Fecha</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</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>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
|
||||||
|
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></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)" 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>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de pacientes (med/detallePacientes.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,200 @@
|
|||||||
|
<%@ 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.util.Calendar" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de detalles analisis por analista (med/detalle_analista.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
|
||||||
|
{
|
||||||
|
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"));
|
||||||
|
|
||||||
|
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
|
||||||
|
<title>Gestión Perfiles</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../css/dhtmlgoodies_calendar.css?random=20051112" media="screen"></LINK>
|
||||||
|
<SCRIPT type="text/javascript" src="../../js/dhtmlgoodies_calendar.js?random=20060118"></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">
|
||||||
|
<!--
|
||||||
|
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Logotipo de IMQ de Navarra
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>//-->
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="../../img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<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">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<tr valign="top">
|
||||||
|
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0" width="75%"></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 class="txt" valign="top">
|
||||||
|
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<form>
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "LLega 134");
|
||||||
|
PersistenciaTamovext perTamo = new PersistenciaTamovext();
|
||||||
|
|
||||||
|
Calendar hoy = Calendar.getInstance();
|
||||||
|
java.sql.Date hoyjava = new java.sql.Date(hoy.getTimeInMillis());
|
||||||
|
java.sql.Date hace30dias = Utilidades.sumarFechasDias(hoyjava, -30);
|
||||||
|
Vector<Object[]> analiticas = perTamo.AnaliticasCapturadas(medico, hace30dias, hoyjava);
|
||||||
|
%>
|
||||||
|
<tr><td class="txt" >Ver desde fecha:</td><td class="txt"><input class="txt" type="text" name="desdefecha" id="desdefecha" onclick="displayCalendar('desdefecha','dd/mm/yyyy',this)" value="<%=Utilidades.formatear_fecha(hace30dias) %>"></td></tr>
|
||||||
|
<tr><td class="txt" >hasta fecha:</td><td class="txt"><input class="txt" type="text" name="hastafecha" id="hastafecha" onclick="displayCalendar('hastafecha','dd/mm/yyyy',this)" value="<%=Utilidades.formatear_fecha(hoyjava) %>"></td><td><input type="button" value="buscar"></td></tr>
|
||||||
|
<%
|
||||||
|
if(analiticas.size()>0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorizacion</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Paciente</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
for(int i=0;i<analiticas.size();i++)
|
||||||
|
{
|
||||||
|
Object[] aResultados = analiticas.get(i);
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td class="txt" align="center"><%=aResultados[1] %></td>
|
||||||
|
<td class="txt" align="center"><%=aResultados[0] %></td>
|
||||||
|
<td class="txt" align="center"><%=Utilidades.formatear_fecha((java.sql.Date)aResultados[2]) %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</form>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de detalles analisis por analista (med/detalle_analista.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,284 @@
|
|||||||
|
<%@ 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 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
|
||||||
|
{
|
||||||
|
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"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Liquidaciones</title>
|
||||||
|
<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" 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">
|
||||||
|
|
||||||
|
<!-- Logotipo de IMQ de Navarra //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<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">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></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 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"> </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
|
||||||
|
strSql.append("SELECT TAMOVEXT.Acto, Count(TAMOVEXT.Acto) as cantidad, TAMOVEXT.Precio as precioActoMedico, ttactmed.descripcion as descripcionActoMedico");
|
||||||
|
strSql.append(" FROM TAMOVEXT, ttactmed");
|
||||||
|
strSql.append(" WHERE (TAMOVEXT.Acto = ttactmed.Acto)");
|
||||||
|
strSql.append(" AND (TAMOVEXT.Especialidad = ttactmed.Especialidad)");
|
||||||
|
strSql.append(" AND TAMOVEXT.Medico=?");
|
||||||
|
strSql.append(" AND TAMOVEXT.Especialidad=?");
|
||||||
|
strSql.append(" GROUP BY TAMOVEXT.Acto, TAMOVEXT.Precio, ttactmed.descripcion");
|
||||||
|
strSql.append(" ORDER BY TAMOVEXT.Acto ASC");
|
||||||
|
|
||||||
|
aCondiciones = new Object[2];
|
||||||
|
aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||||
|
aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||||
|
|
||||||
|
PersistenciaVTamovextTtactmed per = new PersistenciaVTamovextTtactmed();
|
||||||
|
Vector vSeleccion = per.seleccionar(strSql.toString(), intPagina, aCondiciones);
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><span class="txt">No se ha encontrado ningún dato.</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>
|
||||||
|
<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"> </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>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de gestión de liquidaciones (med/liquidacion.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<%@ 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.Font" %>
|
||||||
|
<%@ page import="com.itextpdf.text.Chunk" %>
|
||||||
|
<%@ page import="com.itextpdf.text.PageSize" %>
|
||||||
|
<%@ page import="com.itextpdf.text.Image" %>
|
||||||
|
<%@ page import="com.itextpdf.text.pdf.PdfPTable" %>
|
||||||
|
<%@ page import="com.itextpdf.text.FontFactory" %>
|
||||||
|
<%@ page import="com.itextpdf.text.BaseColor" %>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
@@ -0,0 +1,783 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de otras especialidades (pac/especialidades.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ninguna especialidad.";
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampoNombre="";
|
||||||
|
String strListaElementos="";
|
||||||
|
String strListaCodigoElementos="";
|
||||||
|
String strInforme="";
|
||||||
|
int intImpresion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
String strInformePrescripcion = "";
|
||||||
|
String strAutorizacion="";
|
||||||
|
|
||||||
|
//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 listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaElementos")!=null)
|
||||||
|
strListaElementos=(String)request.getParameter("listaElementos");
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaCodigoElementos")!=null)
|
||||||
|
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro informePrescripcion utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("informePrescripcion")!=null)
|
||||||
|
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||||
|
|
||||||
|
//atributo autorizacion utilizado para realizar la impresion
|
||||||
|
if (request.getAttribute("autorizacion")!=null)
|
||||||
|
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||||
|
|
||||||
|
//parametro informe para mostrar el informe introducido por el medico
|
||||||
|
if (request.getParameter("informe")!=null)
|
||||||
|
strInforme=(String)request.getParameter("informe");
|
||||||
|
|
||||||
|
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null)
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Especialidades</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = new Array();
|
||||||
|
var vCodigoElementos = new Array();
|
||||||
|
var intNumeroCheckBoxes = 0;
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) //se efectua la impresion
|
||||||
|
VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impEspecialidades.jsp?autorizacion=<%=strAutorizacion%>');
|
||||||
|
}
|
||||||
|
|
||||||
|
function anular()
|
||||||
|
{
|
||||||
|
vElementos = new Array();
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
vCodigoElementos = new Array();
|
||||||
|
|
||||||
|
//limpiamos la seleccion de las checkboxes
|
||||||
|
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||||
|
eval("document.frmEspecialidades.checkbox" + i + ".checked=false");
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.informePrescripcion.value="";
|
||||||
|
document.frmEspecialidades.listaElementos.value="";
|
||||||
|
document.frmEspecialidades.listaCodigoElementos.value="";
|
||||||
|
document.frmEspecialidades.informe.value="";
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||||
|
prepararEnvioFormInformePrescripcion();
|
||||||
|
|
||||||
|
if (document.frmPrescripcion.listaElementosPrescripcion.value=="")
|
||||||
|
alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//comprobamos que tenga menos de mil caracteres
|
||||||
|
if (document.frmPrescripcion.informePrescripcion.value.length > 1000)
|
||||||
|
document.frmPrescripcion.informePrescripcion.value=document.frmPrescripcion.informePrescripcion.value.substring(0,1000);
|
||||||
|
//enviamos el formulario
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
|
||||||
|
if (vElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoElementos+= "�" + vElementos[i];
|
||||||
|
}
|
||||||
|
textoElementos+="�";
|
||||||
|
|
||||||
|
}
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
|
||||||
|
|
||||||
|
if (vCodigoElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "�" + vCodigoElementos[i];
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "�";
|
||||||
|
}
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormInformePrescripcion()
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.informePrescripcion.value = document.frmEspecialidades.informe.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaElementos()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementos = '<%=strListaElementosAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementos.indexOf("~")!=-1)
|
||||||
|
lstElementos = lstElementos.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
if (lstElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("�") + 1);
|
||||||
|
while (lstElementos.indexOf("�")!=-1)
|
||||||
|
{
|
||||||
|
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("�"));
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("�") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
|
||||||
|
//cogemos los valores de la lista de codigos
|
||||||
|
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores
|
||||||
|
var i=0;
|
||||||
|
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("�") + 1);
|
||||||
|
while (lstCodigoElementos.indexOf("�")!=-1)
|
||||||
|
{
|
||||||
|
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("�"));
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("�") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
|
||||||
|
function aniadirElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
|
||||||
|
//añadimos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||||
|
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||||
|
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||||
|
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||||
|
|
||||||
|
|
||||||
|
//añadimos codigo elemento
|
||||||
|
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminarElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var vNuevosElementos=new Array();
|
||||||
|
var vNuevosCodigoElementos=new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
//eliminamos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vElementos[i]!=elementoConComillaSimple)
|
||||||
|
{
|
||||||
|
vNuevosElementos[j]=vElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vElementos = vNuevosElementos;
|
||||||
|
|
||||||
|
//eliminamos codigo elemento
|
||||||
|
j=0;
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]!=codigoElemento)
|
||||||
|
{
|
||||||
|
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vCodigoElementos = vNuevosCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarCheckBox(checkbox, codigoElemento)
|
||||||
|
{
|
||||||
|
if (vElementos.length>=1) //hay seleccionados 1 elemento. No puede seleccionar mas elementos.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
alert("No puede imputar más actos médicos");
|
||||||
|
}
|
||||||
|
else //se quita la seleccion de una prescripcion
|
||||||
|
{
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //tiene seleccionados menos que 1 elemento. Le dejamos que seleccione sin ningun problema.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
aniadirElemento(checkbox.value, codigoElemento);
|
||||||
|
else
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("�") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("�")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("�"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("�") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function obtenerInformePrescripcion()
|
||||||
|
{
|
||||||
|
//preparamos el informe de prescripcion
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||||
|
//dependiendo del navegador el salto de linea es diferente.
|
||||||
|
//explorer => \r\n
|
||||||
|
//netscape 6 => \n
|
||||||
|
<%
|
||||||
|
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||||
|
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||||
|
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores del informe sin comillas simples
|
||||||
|
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original
|
||||||
|
while(informePrescripcion.indexOf("~")!=-1)
|
||||||
|
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
return informePrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
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.frmEspecialidades.nombre.value=lstCampoBusqueda;
|
||||||
|
}
|
||||||
|
|
||||||
|
function comprobarTamanio()
|
||||||
|
{
|
||||||
|
return (document.frmEspecialidades.informe.value.length < 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value=campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
document.frmEspecialidades.pagina.value=1;
|
||||||
|
pasarAMayusculas(document.frmEspecialidades.nombre);
|
||||||
|
document.frmEspecialidades.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
document.frmEspecialidades.pagina.value=pagina;
|
||||||
|
pasarAMayusculas(document.frmEspecialidades.nombre);
|
||||||
|
document.frmEspecialidades.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Logotipo de IMQ de Navarra //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><script language="JavaScript">bloques();</script></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- Cuerpo de la página //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="14" height="261" border="0"></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 class="txt" valign="top">
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><input type="button" name="aceptar" value="OK/Imprimir" onclick="javascript:imprimir()" class="menu"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||||
|
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=1" method="post">
|
||||||
|
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="informePrescripcion" value="">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_ESPECIALIDADES%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmEspecialidades" action="<%=request.getContextPath()%>/jsp/pac/especialidades.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||||
|
<table border="0" align="left" width="60%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Prescripción de especialista:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table border="0" align="right">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Informe:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<textarea name="informe" rows="4" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInforme%></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita">Especialidad: </span></td>
|
||||||
|
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar">Buscar</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
|
||||||
|
strSql.append("SELECT ESPECIALIDAD, DESCRIPCION");
|
||||||
|
strSql.append(" FROM TAESPECI");
|
||||||
|
strSql.append(" WHERE ESPECIALIDAD <> ?");
|
||||||
|
|
||||||
|
//comprobamos si se trata de una busqueda de especialidades
|
||||||
|
if (!strCampoNombre.equalsIgnoreCase(""))
|
||||||
|
{
|
||||||
|
if (strCampoNombre.endsWith("*"))
|
||||||
|
strCampoNombre=strCampoNombre.replace('*', '%');
|
||||||
|
else
|
||||||
|
strCampoNombre="%" + strCampoNombre + "%";
|
||||||
|
|
||||||
|
strSql.append(" AND DESCRIPCION LIKE ?");
|
||||||
|
|
||||||
|
aCondiciones = new Object[2];
|
||||||
|
aCondiciones[1] = strCampoNombre;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
aCondiciones = new Object[1];
|
||||||
|
|
||||||
|
aCondiciones[0] = Integer.valueOf(0);
|
||||||
|
|
||||||
|
strSql.append(" ORDER BY DESCRIPCION");
|
||||||
|
|
||||||
|
PersistenciaTaespeci per = new PersistenciaTaespeci();
|
||||||
|
Vector vSeleccion = per.seleccionar(strSql.toString(), intPagina, aCondiciones);
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="txt">No se ha encontrado ningún dato.</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>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<tr>
|
||||||
|
<td width="1%"></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
Taespeci taespeci = null;
|
||||||
|
String estilo = "";
|
||||||
|
String strDescripcionSinComilla="";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
taespeci = (Taespeci)vSeleccion.elementAt(i);
|
||||||
|
|
||||||
|
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||||
|
strDescripcionSinComilla = taespeci.getDescripcion().replace('\'', '~');
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if (strListaElementos.indexOf("�" + taespeci.getDescripcion() + "�")!=-1)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=taespeci.getDescripcion()%></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<% 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>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de otras especialidades (pac/especialidades.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,745 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion (pac/facturacion.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else if(sesion.getAttribute("PACIENTE") == null)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Paciente borrado ¿Ha pulsado 'history back'?");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/gestor.jsp");
|
||||||
|
}
|
||||||
|
else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) != 0 )
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/facturacion_chipcard.jsp?x=12&pagina=1");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
String mensaje = null;
|
||||||
|
mensaje = (String)sesion.getAttribute("ERROR");
|
||||||
|
String strMensajeSinElementos="";
|
||||||
|
if(mensaje == null || (mensaje.trim().compareTo("") == 0))
|
||||||
|
{
|
||||||
|
strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strMensajeSinElementos=mensaje;
|
||||||
|
}
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampoNombre="";
|
||||||
|
String strListaElementos="";
|
||||||
|
String strListaCodigoElementos="";
|
||||||
|
int intImpresion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
|
||||||
|
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
|
||||||
|
//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 listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaElementos")!=null)
|
||||||
|
strListaElementos=(String)request.getParameter("listaElementos");
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaCodigoElementos")!=null)
|
||||||
|
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||||
|
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
String tarjeta = String.valueOf(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta());
|
||||||
|
if(((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado() != ParametrosConfiguracion.bin_chipcard_propios)
|
||||||
|
tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado();
|
||||||
|
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Especialidades</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = new Array();
|
||||||
|
var vCodigoElementos = new Array();
|
||||||
|
var intNumeroCheckBoxes = 0;
|
||||||
|
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) { //se efectua la impresion
|
||||||
|
var ventanaFact = window.open('<%=request.getContextPath()%>/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()+"_"+((Tarjeta)((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta()).getPoliza()%>.pdf',"Impresion","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function anular()
|
||||||
|
{
|
||||||
|
vElementos = new Array();
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
vCodigoElementos = new Array();
|
||||||
|
|
||||||
|
//limpiamos la seleccion de las checkboxes
|
||||||
|
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||||
|
eval("document.frmFacturacion.checkbox" + i + ".checked=false");
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||||
|
document.frmFacturacion.listaElementos.value="";
|
||||||
|
document.frmFacturacion.listaCodigoElementos.value="";
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
var boton = document.getElementById('okimprimir');
|
||||||
|
boton.disabled = true;
|
||||||
|
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||||
|
|
||||||
|
if (document.frmPrescripcion.listaElementosPrescripcion.value=="")
|
||||||
|
{
|
||||||
|
boton.disabled = false;
|
||||||
|
alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
|
||||||
|
if (vElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoElementos+= "¬" + vElementos[i];
|
||||||
|
}
|
||||||
|
textoElementos+="¬";
|
||||||
|
}
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
|
||||||
|
|
||||||
|
if (vCodigoElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "¬";
|
||||||
|
}
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaElementos()
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementos = '<%=strListaElementosAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementos.indexOf("~")!=-1)
|
||||||
|
lstElementos = lstElementos.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
if (lstElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
while (lstElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
|
||||||
|
//cogemos los valores de la lista de codigos
|
||||||
|
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores
|
||||||
|
var i=0;
|
||||||
|
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
|
||||||
|
function aniadirElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
//añadimos descripcion elemento
|
||||||
|
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||||
|
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||||
|
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||||
|
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||||
|
|
||||||
|
|
||||||
|
//añadimos codigo elemento
|
||||||
|
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminarElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var vNuevosElementos=new Array();
|
||||||
|
var vNuevosCodigoElementos=new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
//eliminamos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vElementos[i]!=elementoConComillaSimple)
|
||||||
|
{
|
||||||
|
vNuevosElementos[j]=vElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vElementos = vNuevosElementos;
|
||||||
|
|
||||||
|
//eliminamos codigo elemento
|
||||||
|
j=0;
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]!=codigoElemento)
|
||||||
|
{
|
||||||
|
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vCodigoElementos = vNuevosCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarCheckBox(checkbox, codigoElemento)
|
||||||
|
{
|
||||||
|
if (vElementos.length>=5) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
alert("No pueden imputarse más actos médicos");
|
||||||
|
}
|
||||||
|
else //se quita la seleccion de una prescripcion
|
||||||
|
{
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //tiene seleccionados menos que 5 elementos. Le dejamos que seleccione sin ningun problema.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
//comprobamos si se permite seleccionar la primera visita o la visita sucesiva
|
||||||
|
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
|
||||||
|
aniadirElemento(checkbox.value, codigoElemento);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
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.frmFacturacion.nombre.value=lstCampoBusqueda;
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value=campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=1;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=pagina;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Logotipo de IMQ de Navarra //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><script language="JavaScript">bloques();</script></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- Cuerpo de la página //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="14" height="261" border="0"></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 class="txt" valign="top">
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="right">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><input type="button" name="aceptar" id="okimprimir" value="OK" onclick="javascript:imprimir()" class="menu"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||||
|
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=1" method="post">
|
||||||
|
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_FACTURACION_ESTOMATOLOGIA%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmFacturacion" action="<%=request.getContextPath()%>/jsp/pac/estomatologia.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||||
|
<table border="0" align="center" width="60%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Imputación de actos médicos:</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="top">
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||||
|
</td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="60" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita">Nombre acto médico: </span></td>
|
||||||
|
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar">Buscar</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
PersistenciaTTFranquiciasDentales per = new PersistenciaTTFranquiciasDentales();
|
||||||
|
|
||||||
|
long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
int intEntidadnew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadIMQ();
|
||||||
|
int intEspecialidadnew = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||||
|
|
||||||
|
Calendar cal = Calendar.getInstance() ;
|
||||||
|
Integer anio = cal.get(Calendar.YEAR);
|
||||||
|
Vector vSeleccion = per.obtenerFranquicia(intEspecialidadnew, intEntidadnew, intColectivonew,anio,strCampoNombre,intPagina);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center"><span class="txt">No se ha encontrado ningún dato.</span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<tr>
|
||||||
|
<td width="1%"></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
TTFranquiciasDentales ttFranquiciasDentales = null;
|
||||||
|
String estilo = "";
|
||||||
|
String strDescripcionSinComilla="";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
ttFranquiciasDentales = (TTFranquiciasDentales)vSeleccion.elementAt(i);
|
||||||
|
|
||||||
|
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||||
|
strDescripcionSinComilla = ttFranquiciasDentales.getDescripcion().replace('\'', '~');
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if (strListaElementos.indexOf("¬" + ttFranquiciasDentales.getDescripcion() + "¬")!=-1)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttFranquiciasDentales.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttFranquiciasDentales.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=ttFranquiciasDentales.getActo()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=ttFranquiciasDentales.getDescripcion()%></td>
|
||||||
|
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(ttFranquiciasDentales.getPrecio(), PersistenciaParametros.decimales)%></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<% 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">ú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>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de facturacion (pac/facturacion.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,806 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion_estoma (pac/facturacion_estoma.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else if(sesion.getAttribute("PACIENTE") == null)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Paciente borrado ¿Ha pulsado 'history back'?");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/gestor.jsp");
|
||||||
|
}
|
||||||
|
//else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) != 0 )
|
||||||
|
else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado() != (ParametrosConfiguracion.bin_chipcard_propios))
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/facturacion_chipcard.jsp?x=0&pagina=1");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampoNombre="";
|
||||||
|
String strListaElementos="";
|
||||||
|
String strListaCodigoElementos="";
|
||||||
|
int intImpresion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
|
||||||
|
String strEsPrimeraVisita = "";
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
|
||||||
|
//Obtención del perfil del usuario conectado
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
StringBuffer perfilIguala = new StringBuffer();
|
||||||
|
perfilIguala.append(sesion.getAttribute("PERFIL"));
|
||||||
|
|
||||||
|
|
||||||
|
//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 listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaElementos")!=null)
|
||||||
|
strListaElementos=(String)request.getParameter("listaElementos");
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaCodigoElementos")!=null)
|
||||||
|
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||||
|
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
String tarjeta = String.valueOf(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta());
|
||||||
|
if(((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado() != ParametrosConfiguracion.bin_chipcard_propios)
|
||||||
|
tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado();
|
||||||
|
PersistenciaTapolfac perTapolfac = new PersistenciaTapolfac();
|
||||||
|
Integer blnEsPolizaIgualaMedico = perTapolfac.esPolizaIgualaMedico(intMedico, intColectivo, dblPoliza);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PersistenciaTaprimer perTaprimer = new PersistenciaTaprimer();
|
||||||
|
if (perTaprimer.esPrimeraVisita( intMedico, intColectivo, dblPoliza, intBeneficiario) )
|
||||||
|
strEsPrimeraVisita = "si";
|
||||||
|
else
|
||||||
|
strEsPrimeraVisita = "no";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Estomatología</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = new Array();
|
||||||
|
var vCodigoElementos = new Array();
|
||||||
|
var intNumeroCheckBoxes = 0;
|
||||||
|
var esPrimeraVisita = '<%=strEsPrimeraVisita%>';
|
||||||
|
var codigoPrimeraVisita = <%=ParametrosConfiguracion.codigoPrimeraVisita%>;
|
||||||
|
var codigoVisitaSucesiva = <%=ParametrosConfiguracion.codigoVisitaSucesiva%>;
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) { //se efectua la impresion
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impfacturacion_estoma.jsp');
|
||||||
|
//window.open('https://infor-roumenov/tarisan/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf');
|
||||||
|
var ventanaFact = window.open('<%=request.getContextPath()%>/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Impresion","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function anular()
|
||||||
|
{
|
||||||
|
vElementos = new Array();
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
vCodigoElementos = new Array();
|
||||||
|
|
||||||
|
//limpiamos la seleccion de las checkboxes
|
||||||
|
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||||
|
eval("document.frmFacturacion.checkbox" + i + ".checked=false");
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||||
|
document.frmFacturacion.listaElementos.value="";
|
||||||
|
document.frmFacturacion.listaCodigoElementos.value="";
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
var boton = document.getElementById('okimprimir');
|
||||||
|
boton.disabled = true;
|
||||||
|
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||||
|
|
||||||
|
if (document.frmPrescripcion.listaElementosPrescripcion.value=="")
|
||||||
|
{
|
||||||
|
boton.disabled = false;
|
||||||
|
alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
|
||||||
|
if (vElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoElementos+= "¬" + vElementos[i];
|
||||||
|
}
|
||||||
|
textoElementos+="¬";
|
||||||
|
|
||||||
|
}
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
|
||||||
|
|
||||||
|
if (vCodigoElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "¬";
|
||||||
|
}
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaElementos()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementos = '<%=strListaElementosAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementos.indexOf("~")!=-1)
|
||||||
|
lstElementos = lstElementos.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
if (lstElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
while (lstElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
|
||||||
|
//cogemos los valores de la lista de codigos
|
||||||
|
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores
|
||||||
|
var i=0;
|
||||||
|
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
|
||||||
|
function aniadirElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
|
||||||
|
//añadimos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||||
|
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||||
|
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||||
|
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||||
|
|
||||||
|
|
||||||
|
//añadimos codigo elemento
|
||||||
|
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminarElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var vNuevosElementos=new Array();
|
||||||
|
var vNuevosCodigoElementos=new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
//eliminamos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vElementos[i]!=elementoConComillaSimple)
|
||||||
|
{
|
||||||
|
vNuevosElementos[j]=vElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vElementos = vNuevosElementos;
|
||||||
|
|
||||||
|
//eliminamos codigo elemento
|
||||||
|
j=0;
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]!=codigoElemento)
|
||||||
|
{
|
||||||
|
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vCodigoElementos = vNuevosCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarCheckBox(checkbox, codigoElemento)
|
||||||
|
{
|
||||||
|
if (vElementos.length>=5) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
alert("No pueden imputarse más actos médicos");
|
||||||
|
}
|
||||||
|
else //se quita la seleccion de una prescripcion
|
||||||
|
{
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //tiene seleccionados menos que 5 elementos. Le dejamos que seleccione sin ningun problema.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
//comprobamos si se permite seleccionar la primera visita o la visita sucesiva
|
||||||
|
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
|
||||||
|
if ( codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") //selecciona primera visita y no es la primera visita o seleciona la visita sucesiva y es primera vista
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
alert("Imposible imputarse ese acto médico ya ha tenido consulta.");
|
||||||
|
}
|
||||||
|
else if (codigoElemento == 2 && esPrimeraVisita == "si")
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
alert("Imposible imputarse ese acto médico, no hay consulta previa.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
aniadirElemento(checkbox.value, codigoElemento);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
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.frmFacturacion.nombre.value=lstCampoBusqueda;
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value=campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=1;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=pagina;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Logotipo de IMQ de Navarra //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><script language="JavaScript">bloques();</script></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- Cuerpo de la página //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="14" height="261" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td>
|
||||||
|
<td width="565">
|
||||||
|
<%
|
||||||
|
if ((blnEsPolizaIgualaMedico == 0) || ((blnEsPolizaIgualaMedico != 0) && perfilIguala.toString().compareTo("01")!=0)){
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "PERFIL TARISAN: " + perfilIguala.toString() + " " + blnEsPolizaIgualaMedico);
|
||||||
|
%>
|
||||||
|
<!-- 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 class="txt" valign="top">
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="right">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><input type="button" name="aceptar" id="okimprimir" value="OK" onclick="javascript:imprimir()" class="menu"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||||
|
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=1" method="post">
|
||||||
|
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_FACTURACION%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmFacturacion" action="<%=request.getContextPath()%>/jsp/pac/facturacion_estoma.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||||
|
<table border="0" align="center" width="60%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Imputación de actos médicos:</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="top">
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||||
|
</td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="60" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita">Nombre acto médico: </span></td>
|
||||||
|
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar">Buscar</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||||
|
long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
double dblPolizanew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
|
||||||
|
//Esta es la consulta que le cuesta 20seg. devolver
|
||||||
|
Vector vSeleccion = per.obtenerActosAutoprescribibles(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato(), intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre);
|
||||||
|
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center"><span class="txt">No parece tener cobertura dental...</span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<tr>
|
||||||
|
<td width="1%"></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
Ttactmed ttactmed = null;
|
||||||
|
String estilo = "";
|
||||||
|
String strDescripcionSinComilla="";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
|
||||||
|
|
||||||
|
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||||
|
strDescripcionSinComilla = ttactmed.getDescripcion().replace('\'', '~');
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=ttactmed.getActo()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=ttactmed.getDescripcion()%></td>
|
||||||
|
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(per.obtenerPrecioActoMedico(((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), ttactmed.getActo(), ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad()), PersistenciaParametros.decimales)%></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<% 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">ú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>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
%>
|
||||||
|
<table border="0" align="center" width="60%">
|
||||||
|
<form name="frmFacturacion" action="" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
</form>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita"> </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita"> </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita"> </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if (blnEsPolizaIgualaMedico == 1){ %>
|
||||||
|
<td align="center" class="txtNegrita">Paciente con IGUALA suya</td>
|
||||||
|
<%}
|
||||||
|
else { %>
|
||||||
|
<td align="center" class="txtNegrita">Paciente con IGUALA de otro profesional</td>
|
||||||
|
<%
|
||||||
|
}%>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de facturacion_estoma (pac/facturacion_estoma.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,218 @@
|
|||||||
|
<%@ 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.Calendar" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de franquicias dentales (pac/franquicias_dentales.jsp)");
|
||||||
|
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
|
||||||
|
String mensaje = null;
|
||||||
|
mensaje = (String)sesion.getAttribute("ERROR");
|
||||||
|
sesion.setAttribute("ERROR", "");
|
||||||
|
|
||||||
|
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
//Obtención del perfil del usuario conectado
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
|
||||||
|
Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||||
|
//String noticia = Utilidades.leerNoticias("/root/apache-tomcat-6.0.20/webapps/tarisan/noticias.txt");
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Módulo de Franquicias dentales</title>
|
||||||
|
<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_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||||
|
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
<!--
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="noticia_importante();">
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
.mensajes {
|
||||||
|
width:150px;
|
||||||
|
height:150px;
|
||||||
|
background:#FFFF00;
|
||||||
|
color:#C02331;
|
||||||
|
padding:1px;
|
||||||
|
margin:10px;
|
||||||
|
float:center;
|
||||||
|
text-align:center;
|
||||||
|
font-family:Verdana, Arial;
|
||||||
|
font-size: 12;
|
||||||
|
font-weight: bold;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- Logotipo de IMQ de Navarra //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<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">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOn"><b>FRANQUICIAS DENTALES</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></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 class="txt" valign="top">
|
||||||
|
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||||
|
<br/>
|
||||||
|
<table border="0" width="100%" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="txtnegrita" align="center">El paciente tiene la siguiente franquicia dental: </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
PersistenciaTTFranquiciasDentales per = new PersistenciaTTFranquiciasDentales();
|
||||||
|
|
||||||
|
long longColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
int intEntidadnew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadIMQ();
|
||||||
|
int intEspecialidadnew = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||||
|
int intContrato = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato();
|
||||||
|
|
||||||
|
Calendar cal = Calendar.getInstance() ;
|
||||||
|
Integer anio = cal.get(Calendar.YEAR);
|
||||||
|
int franquicia = 0;
|
||||||
|
franquicia = per.obtenerNumeroFranquicia(intEspecialidadnew, intEntidadnew, longColectivonew,anio);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (franquicia==0) //No se han encontrado datos al buscar una franquicia por entidad
|
||||||
|
{
|
||||||
|
int franquiciaPorContrato = 0;
|
||||||
|
franquiciaPorContrato = per.obtenerNumeroFranquiciaPorContrato(intContrato);
|
||||||
|
|
||||||
|
if (franquiciaPorContrato==0) //No se han encontrado datos al buscar una franquicia por contrato
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center"><span class="txt">No tiene franquicias asociadas</span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center" class="txt"><span class="txtNegrita"><a href=<%=request.getContextPath()+"/pdfdental/franquicia_"+ franquiciaPorContrato +".pdf"%> target="blank">Franquicia</a></span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center" class="txt"><span class="txtNegrita"><a href=<%=request.getContextPath()+"/pdfdental/franquicia_"+ franquicia +".pdf"%> target="blank">Franquicia</a></span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><a href="../pac/gestor.jsp" class="enlace">Volver</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de franquicias dentales (pac/franquicias_dentales.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
<%@ 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 pacientes (pac/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
|
||||||
|
{
|
||||||
|
|
||||||
|
//Obtención del perfil del usuario conectado
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Módulo de Gestión de Pacientes</title>
|
||||||
|
<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_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||||
|
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
<!--
|
||||||
|
function validar()
|
||||||
|
{
|
||||||
|
if(document.frmTarjeta.TARJETA.value != "")
|
||||||
|
{
|
||||||
|
document.frmTarjeta.submit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert("Tiene que pasar la Tarjeta del Paciente");
|
||||||
|
document.frmTarjeta.TARJETA.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmTarjeta.TARJETA.focus()">
|
||||||
|
|
||||||
|
<!-- Logotipo de IMQ de Navarra //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
|
<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">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="180">
|
||||||
|
<!-- 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>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOff"><b>TARJETA DE PACIENTE IMQ</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOff"><a href="gestor_chipcard.jsp">TARJETA DE PACIENTE CHIPCARD</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></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 class="txt" valign="top">
|
||||||
|
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||||
|
<table border="0" width="100%" align="center">
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<form name="frmTarjeta" action="../../servlet/GestorPacientes?OPCION=<%= Constantes.OPC_PAC_PASO_TARJETA %>" method="post">
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtnegrita">Pase la tarjeta:</td>
|
||||||
|
<td><input type="password" size="80" name="TARJETA" class="txt" value=""></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><a href="javascript:validar()" class="enlace">Validar</a></td>
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de gestión de pacientes (pac/gestor.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,990 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de solicitud de analiticas (pac/solicitudAnalitica.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de solicitud de analiticas (pac/solicitudAnalitica.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
boolean boolActosValidosCargados=false;
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
String strJustificacionPrescripcion="";
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampoNombre="";
|
||||||
|
String strListaElementos="";
|
||||||
|
String strListaCodigoElementos="";
|
||||||
|
String strInforme="";
|
||||||
|
String strGrupo="";
|
||||||
|
int intPagina = 0;
|
||||||
|
int i=0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
|
||||||
|
PersistenciaTagruana perTagruana = new PersistenciaTagruana();
|
||||||
|
Tagruana tagruana=null;
|
||||||
|
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
|
||||||
|
//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 listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaElementos")!=null)
|
||||||
|
strListaElementos=(String)request.getParameter("listaElementos");
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaCodigoElementos")!=null)
|
||||||
|
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||||
|
|
||||||
|
//parametro informe para mostrar el informe introducido por el medico
|
||||||
|
if (request.getParameter("informe")!=null)
|
||||||
|
strInforme=(String)request.getParameter("informe");
|
||||||
|
|
||||||
|
//parametro justificacion que contiene la justificacion del medico para hacer un nuevo analisis.
|
||||||
|
//en caso de no ser necesaria una justificacion, este campo estará vacio
|
||||||
|
if (request.getParameter("justificacionPrescripcion")!=null)
|
||||||
|
{
|
||||||
|
strJustificacionPrescripcion=(String)request.getParameter("justificacionPrescripcion");
|
||||||
|
|
||||||
|
//quitamos las comillas simples para pasarlas a un input oculto del formulario
|
||||||
|
//en javascript.
|
||||||
|
//Si no le quitamos las comillas simples, fallaria. Antes de pasar el valor al input, restauramos las comillas simples.
|
||||||
|
strJustificacionPrescripcion = strJustificacionPrescripcion.replace('\'', '~');
|
||||||
|
}
|
||||||
|
|
||||||
|
//parametro grupo que indica que el usuario selecciona los actos medicos de un grupo de analisis
|
||||||
|
//tenemos que cargar los actos medicos de ese grupo
|
||||||
|
if (request.getParameter("seleccionGrupo")!=null)
|
||||||
|
{
|
||||||
|
strGrupo=(String)request.getParameter("grupo");
|
||||||
|
if ( ((String)request.getParameter("seleccionGrupo")).equalsIgnoreCase("si") && strGrupo!="")
|
||||||
|
{
|
||||||
|
Vector vActosGrupo = perTagruana.obtenerActosMedicos(Integer.parseInt(strGrupo),intMedico);
|
||||||
|
|
||||||
|
if (vActosGrupo.size()>0)
|
||||||
|
{
|
||||||
|
tagruana=null;
|
||||||
|
if(strListaElementos.length() == 0)
|
||||||
|
strListaElementos="¬"+strListaElementos;
|
||||||
|
|
||||||
|
if(strListaCodigoElementos.length() == 0)
|
||||||
|
strListaCodigoElementos="¬"+strListaCodigoElementos;
|
||||||
|
|
||||||
|
for (i=0;i<vActosGrupo.size();i++)
|
||||||
|
{
|
||||||
|
tagruana=(Tagruana)vActosGrupo.elementAt(i);
|
||||||
|
if(strListaElementos.indexOf(tagruana.getDescripcionActo()) == -1)
|
||||||
|
{
|
||||||
|
strListaElementos += tagruana.getDescripcionActo() + "¬";
|
||||||
|
strListaCodigoElementos += tagruana.getActo() + "¬";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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 n = 0; n < vSeleccionNot.size(); n++)
|
||||||
|
{
|
||||||
|
tanoticia = (Tanoticias)vSeleccionNot.elementAt(n);
|
||||||
|
if (n!=0){
|
||||||
|
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||||
|
}else{
|
||||||
|
strNoticia = tanoticia.getNoticia();
|
||||||
|
}
|
||||||
|
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Analítica</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/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">
|
||||||
|
<!--
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = new Array();
|
||||||
|
var vCodigoElementos = new Array();
|
||||||
|
var intNumeroCheckBoxes = 0;
|
||||||
|
var strParametroGrupoSeleccionado = '<%=strGrupo%>';
|
||||||
|
var stringActosValidos = "";
|
||||||
|
|
||||||
|
function anular()
|
||||||
|
{
|
||||||
|
strParametroGrupoSeleccionado="";
|
||||||
|
|
||||||
|
vElementos = new Array();
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
vCodigoElementos = new Array();
|
||||||
|
|
||||||
|
//limpiamos la seleccion de las checkboxes
|
||||||
|
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||||
|
eval("document.frmAnalitica.checkbox" + i + ".checked=false");
|
||||||
|
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.informePrescripcion.value="";
|
||||||
|
document.frmAnalitica.listaElementos.value="";
|
||||||
|
document.frmAnalitica.listaCodigoElementos.value="";
|
||||||
|
document.frmAnalitica.informe.value="";
|
||||||
|
document.frmAnalitica.grupo.value=""
|
||||||
|
document.frmAnalitica.seleccionGrupo.value=""
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
prepararImpresionListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||||
|
prepararEnvioFormInformePrescripcion();
|
||||||
|
|
||||||
|
if (document.frmPrescripcion.listaElementosPrescripcion.value==""){
|
||||||
|
|
||||||
|
alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||||
|
|
||||||
|
}else if(document.frmPrescripcion.informePrescripcion.value.length > 1000){
|
||||||
|
alert("El informe no puede superar los 1000 caracteres.");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//comprobamos que tenga menos de mil caracteres
|
||||||
|
/*if (document.frmPrescripcion.informePrescripcion.value.length > 1000)
|
||||||
|
document.frmPrescripcion.informePrescripcion.value=document.frmPrescripcion.informePrescripcion.value.substring(0,1000);*/
|
||||||
|
|
||||||
|
//enviamos el formulario
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Array.prototype.indexOf) {
|
||||||
|
Array.prototype.indexOf = function (obj, fromIndex) {
|
||||||
|
if (fromIndex == null) {
|
||||||
|
fromIndex = 0;
|
||||||
|
} else if (fromIndex < 0) {
|
||||||
|
fromIndex = Math.max(0, this.length + fromIndex);
|
||||||
|
}
|
||||||
|
for (var i = fromIndex, j = this.length; i < j; i++) {
|
||||||
|
if (this[i] == obj && obj != 0)
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararImpresionListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
if(vCodigoElementos.length>0)
|
||||||
|
{
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||||
|
textoElementos+= "¬" + vElementos[i];
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "¬";
|
||||||
|
textoElementos+="¬";
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function DetectFirefox()
|
||||||
|
{
|
||||||
|
var resul = false;
|
||||||
|
var val = navigator.appName;
|
||||||
|
if(val.indexOf("Netscape") > -1)
|
||||||
|
{
|
||||||
|
resul = true;
|
||||||
|
}
|
||||||
|
return resul;
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar_array_firefox(obj, elemento)
|
||||||
|
{
|
||||||
|
var matriz = new Array();
|
||||||
|
matriz = obj;
|
||||||
|
for(var i=0; i<matriz.length; i++)
|
||||||
|
{
|
||||||
|
if(matriz[i] == elemento)
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
//stringActosValidos += "¬";
|
||||||
|
var posiciones_eliminar="";
|
||||||
|
var temp3 = new Array();
|
||||||
|
var temp2 = new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
if (vCodigoElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
//Convertimos el string en array y buscamos el elemento actual dentro del array:
|
||||||
|
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
var temp = new Array();
|
||||||
|
temp = stringActosValidos.split('¬');
|
||||||
|
var bueno = false;
|
||||||
|
if(DetectFirefox())
|
||||||
|
{
|
||||||
|
if(buscar_array_firefox(temp, vCodigoElementos[i]) > 0)
|
||||||
|
{
|
||||||
|
bueno = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(temp.indexOf(vCodigoElementos[i]) > 0)
|
||||||
|
{
|
||||||
|
//si lo encuentra va vien
|
||||||
|
bueno = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(bueno)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||||
|
textoElementos+= "¬" + vElementos[i];
|
||||||
|
temp3[j] = vCodigoElementos[i];
|
||||||
|
temp2[j] = vElementos[i];
|
||||||
|
j=j+1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert("El acto: "+vElementos[i].replace(/^\s+|\s+$/g,'')+" no está cubierto para este paciente, no saldrá en la petición...");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "¬";
|
||||||
|
textoElementos+="¬";
|
||||||
|
}
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
|
||||||
|
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
|
||||||
|
vCodigoElementos = temp3;
|
||||||
|
vElementos = temp2;
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormInformePrescripcion()
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.informePrescripcion.value = document.frmAnalitica.informe.value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaElementos()
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
|
||||||
|
//cogemos los valores de la lista de codigos
|
||||||
|
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores
|
||||||
|
var i=0;
|
||||||
|
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
var string = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||||
|
if(string.length > 0)
|
||||||
|
vCodigoElementos[i] = string;
|
||||||
|
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementos = '<%=strListaElementosAux%>';
|
||||||
|
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementos.indexOf("~")!=-1)
|
||||||
|
lstElementos = lstElementos.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
if (lstElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
|
||||||
|
while (lstElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
var string = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||||
|
if(string.length > 0)
|
||||||
|
vElementos[i] = string;
|
||||||
|
|
||||||
|
//lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||||
|
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function aniadirElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var nocargar=false;
|
||||||
|
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||||
|
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||||
|
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||||
|
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
{
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
}
|
||||||
|
|
||||||
|
//añadimos descripcion elemento
|
||||||
|
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||||
|
|
||||||
|
|
||||||
|
//añadimos codigo elemento
|
||||||
|
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminarElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var vNuevosElementos=new Array();
|
||||||
|
var vNuevosCodigoElementos=new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
//eliminamos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vElementos[i]!=elementoConComillaSimple)
|
||||||
|
{
|
||||||
|
vNuevosElementos[j]=vElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vElementos = vNuevosElementos;
|
||||||
|
|
||||||
|
//eliminamos codigo elemento
|
||||||
|
j=0;
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]!=codigoElemento)
|
||||||
|
{
|
||||||
|
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vCodigoElementos = vNuevosCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
// USAR EL STRING EN LUGAR DEL ARRAY O MODIFICAR EL ARRAY
|
||||||
|
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class="+'"txtNegrita"'+" valign='top'><input type='checkbox' onclick='javascript:tratarCheckBox(this, " + vCodigoElementos[i] + ")' checked='checked' value='"+vElementos[i]+"'></td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
//alert(texto);
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarCheckBox(checkbox, codigoElemento)
|
||||||
|
{
|
||||||
|
if (vElementos.length>=25) //hay seleccionados 25 elementos. No puede seleccionar mas elementos.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
alert("No puede imputar más actos médicos");
|
||||||
|
}
|
||||||
|
else //se quita la seleccion de una prescripcion
|
||||||
|
{
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //tiene seleccionados menos que 25 elementos. Le dejamos que seleccione sin ningun problema.
|
||||||
|
{
|
||||||
|
//alert("tiene menos de 25 elementos");
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
// alert("Vamos a añadir un elemento");
|
||||||
|
aniadirElemento(checkbox.value, codigoElemento);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// alert("Vamos a quitar un elemento");
|
||||||
|
// alert("valores, checkbox: "+checkbox.value+"codigoelemento: "+codigoElemento);
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
}
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
//buscar();
|
||||||
|
document.frmAnalitica.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
//el parametro justificacion proveniente de la jsp justificaccionDiagnostico, puede que tenga comillas simples.
|
||||||
|
//este valor hay que pasarlo como input oculto dentro del formulario.
|
||||||
|
//para evitar que kaske esta asignacion, hacemos tratamiento de las comillas.
|
||||||
|
//antes, en el codigo java, hemos sustituido las comillas simples por el caracter '~'.
|
||||||
|
//ahora sustituimos el valor '~' por las comillas simples.
|
||||||
|
function prepararCampoJustificacion()
|
||||||
|
{
|
||||||
|
var justificacionConComillas = document.frmPrescripcion.justificacionPrescripcion.value;
|
||||||
|
while (justificacionConComillas.indexOf("~")!=-1)
|
||||||
|
justificacionConComillas=justificacionConComillas.replace("~", "'");
|
||||||
|
|
||||||
|
document.frmAnalitica.justificacionPrescripcion.value = justificacionConComillas;
|
||||||
|
document.frmPrescripcion.justificacionPrescripcion.value = justificacionConComillas;
|
||||||
|
}
|
||||||
|
|
||||||
|
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.frmAnalitica.nombre.value=lstCampoBusqueda;
|
||||||
|
}
|
||||||
|
|
||||||
|
function comprobarTamanio()
|
||||||
|
{
|
||||||
|
return (document.frmAnalitica.informe.value.length < 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaGrupos()
|
||||||
|
{
|
||||||
|
document.frmAnalitica.grupo.value = strParametroGrupoSeleccionado;
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarGrupoAnalisis(grupo)
|
||||||
|
{
|
||||||
|
if (grupo != "" && grupo!=strParametroGrupoSeleccionado)
|
||||||
|
{
|
||||||
|
document.frmAnalitica.seleccionGrupo.value = "si";
|
||||||
|
document.frmAnalitica.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value=campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
|
||||||
|
document.frmAnalitica.pagina.value=1;
|
||||||
|
pasarAMayusculas(document.frmAnalitica.nombre);
|
||||||
|
document.frmAnalitica.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
|
||||||
|
document.frmAnalitica.pagina.value=pagina;
|
||||||
|
pasarAMayusculas(document.frmAnalitica.nombre);
|
||||||
|
document.frmAnalitica.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();prepararCampoJustificacion();inicializarListaGrupos();informarParametroCampoBusqueda()">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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 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"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<!--<td colspan="2" align="right">//-->
|
||||||
|
<td colspan="2" align="right" width="100%">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><input type="button" name="aceptar" value="OK/Imprimir" onclick="javascript:imprimir()" class="menu"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||||
|
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&imp=1" method="post">
|
||||||
|
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="informePrescripcion" value="">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_ANALITICA%>">
|
||||||
|
<input type="hidden" name="justificacionPrescripcion" value='<%=strJustificacionPrescripcion%>'>
|
||||||
|
</form>
|
||||||
|
<form name="frmAnalitica" action="<%=request.getContextPath()%>/jsp/pac/solicitudAnalitica.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||||
|
<table border="0" align="left" width="60%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Prescripción de diagnóstico:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table border="0" align="right">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Grupos de análisis:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<%
|
||||||
|
|
||||||
|
Vector vGrupos = perTagruana.obtenerGruposAnalisis(intMedico);
|
||||||
|
tagruana = null;
|
||||||
|
%>
|
||||||
|
<select name="grupo" class="txt" onChange="javascript:tratarGrupoAnalisis(this.value)">
|
||||||
|
<%
|
||||||
|
if (vGrupos.size() > 0) {
|
||||||
|
%>
|
||||||
|
<option value="">Seleccione...</option>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
%>
|
||||||
|
<option value="">Usuario sin grupos definidos</option>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
for(i = 0; i < vGrupos.size(); i++)
|
||||||
|
{
|
||||||
|
tagruana = (Tagruana)vGrupos.elementAt(i);
|
||||||
|
%>
|
||||||
|
<option value="<%=tagruana.getGrupo()%>"><%=tagruana.getDescripcion()%></option>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Informe:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<textarea name="informe" rows="4" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInforme%></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="2" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita">Nombre acto médico: </span></td>
|
||||||
|
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:buscar()" class="enlace" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
<input type="hidden" name="justificacionPrescripcion">
|
||||||
|
<input type="hidden" name="seleccionGrupo">
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
double dblPolizanew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
int intContratonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato();
|
||||||
|
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||||
|
Vector vSeleccion_Validos = null;
|
||||||
|
|
||||||
|
if(pac.getDesplazado() == null)
|
||||||
|
pac.setDesplazado(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard());
|
||||||
|
|
||||||
|
if(pac.getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) == 0)
|
||||||
|
{
|
||||||
|
vSeleccion_Validos= per.obtenerActosPorEspecialidad(0, ParametrosConfiguracion.analiticas,intContratonew,intColectivonew,dblPolizanew, "%");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Obtener todos los actos, es desplazado");
|
||||||
|
vSeleccion_Validos= per.obtenerActosPorEspecialidad(0, ParametrosConfiguracion.analiticas, "%");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(vSeleccion_Validos.size()>0 && !boolActosValidosCargados)
|
||||||
|
{
|
||||||
|
Ttactmed ttactmed2=null;
|
||||||
|
for(int j=0;j<vSeleccion_Validos.size(); j++)
|
||||||
|
{
|
||||||
|
ttactmed2 = (Ttactmed)vSeleccion_Validos.elementAt(j);
|
||||||
|
%>
|
||||||
|
<!-- Para cargar en un string todos los actos autorizados a este paciente -->
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
stringActosValidos += "¬"+<%=ttactmed2.getActo() %>;
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Vector vSeleccion = null;
|
||||||
|
if(pac.getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) == 0)
|
||||||
|
{
|
||||||
|
vSeleccion= per.obtenerActosPorEspecialidad(intPagina, ParametrosConfiguracion.analiticas,intContratonew,intColectivonew,dblPolizanew, strCampoNombre);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Obtener todos los actos, es desplazado");
|
||||||
|
vSeleccion= per.obtenerActosPorEspecialidad(intPagina, ParametrosConfiguracion.analiticas, strCampoNombre);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </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>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<tr>
|
||||||
|
<td width="1%"></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
Ttactmed ttactmed = null;
|
||||||
|
String estilo = "";
|
||||||
|
String strDescripcionSinComilla="";
|
||||||
|
for(i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
|
||||||
|
|
||||||
|
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||||
|
strDescripcionSinComilla = ttactmed.getDescripcion().replace('\'', '~');
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=ttactmed.getDescripcion()%></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<% 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(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/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(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de solicitud de analiticas (pac/solicitudAnalitica.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,720 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de solicitud de diagnostico (pac/solicitudDiagnostico.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de solicitud de diagnostico (pac/solicitudDiagnostico.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampoNombre="";
|
||||||
|
String strListaElementos="";
|
||||||
|
String strListaCodigoElementos="";
|
||||||
|
String strInforme="";
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
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"));
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaElementos")!=null)
|
||||||
|
strListaElementos=(String)request.getParameter("listaElementos");
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaCodigoElementos")!=null)
|
||||||
|
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||||
|
|
||||||
|
//parametro informe para mostrar el informe introducido por el medico
|
||||||
|
if (request.getParameter("informe")!=null)
|
||||||
|
strInforme=(String)request.getParameter("informe");
|
||||||
|
|
||||||
|
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>Diagnóstico</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/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">
|
||||||
|
<!--
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = new Array();
|
||||||
|
var vCodigoElementos = new Array();
|
||||||
|
var intNumeroCheckBoxes = 0;
|
||||||
|
|
||||||
|
function anular()
|
||||||
|
{
|
||||||
|
vElementos = new Array();
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
vCodigoElementos = new Array();
|
||||||
|
|
||||||
|
//limpiamos la seleccion de las checkboxes
|
||||||
|
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||||
|
eval("document.frmDiagnostico.checkbox" + i + ".checked=false");
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.informePrescripcion.value="";
|
||||||
|
document.frmDiagnostico.listaElementos.value="";
|
||||||
|
document.frmDiagnostico.listaCodigoElementos.value="";
|
||||||
|
document.frmDiagnostico.informe.value="";
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||||
|
prepararEnvioFormInformePrescripcion();
|
||||||
|
|
||||||
|
if (document.frmPrescripcion.listaElementosPrescripcion.value=="") {
|
||||||
|
alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||||
|
} else if (document.frmPrescripcion.informePrescripcion.value.length < 1) {
|
||||||
|
alert("Debe rellenar el informe!");
|
||||||
|
} else {
|
||||||
|
//comprobamos que tenga menos de mil caracteres
|
||||||
|
if (document.frmPrescripcion.informePrescripcion.value.length > 1000)
|
||||||
|
document.frmPrescripcion.informePrescripcion.value=document.frmPrescripcion.informePrescripcion.value.substring(0,1000);
|
||||||
|
//enviamos el formulario
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
|
||||||
|
if (vElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoElementos+= "¬" + vElementos[i];
|
||||||
|
}
|
||||||
|
textoElementos+="¬";
|
||||||
|
|
||||||
|
}
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
|
||||||
|
|
||||||
|
if (vCodigoElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "¬";
|
||||||
|
}
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormInformePrescripcion()
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.informePrescripcion.value = document.frmDiagnostico.informe.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaElementos()
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementos = '<%=strListaElementosAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementos.indexOf("~")!=-1)
|
||||||
|
lstElementos = lstElementos.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
if (lstElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
|
||||||
|
while (lstElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
|
||||||
|
//cogemos los valores de la lista de codigos
|
||||||
|
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores
|
||||||
|
var i=0;
|
||||||
|
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function aniadirElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
|
||||||
|
//añadimos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||||
|
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||||
|
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||||
|
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||||
|
|
||||||
|
|
||||||
|
//añadimos codigo elemento
|
||||||
|
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminarElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var vNuevosElementos=new Array();
|
||||||
|
var vNuevosCodigoElementos=new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
//eliminamos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vElementos[i]!=elementoConComillaSimple)
|
||||||
|
{
|
||||||
|
vNuevosElementos[j]=vElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vElementos = vNuevosElementos;
|
||||||
|
|
||||||
|
//eliminamos codigo elemento
|
||||||
|
j=0;
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]!=codigoElemento)
|
||||||
|
{
|
||||||
|
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vCodigoElementos = vNuevosCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarCheckBox(checkbox, codigoElemento)
|
||||||
|
{
|
||||||
|
if (vElementos.length>=15) //hay seleccionados 15 elementos. No puede seleccionar mas elementos.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
alert("No puede imputar más actos médicos");
|
||||||
|
}
|
||||||
|
else //se quita la seleccion de una prescripcion
|
||||||
|
{
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //tiene seleccionados menos que 15 elementos. Le dejamos que seleccione sin ningun problema.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
aniadirElemento(checkbox.value, codigoElemento);
|
||||||
|
else
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
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.frmDiagnostico.nombre.value=lstCampoBusqueda;
|
||||||
|
}
|
||||||
|
|
||||||
|
function comprobarTamanio()
|
||||||
|
{
|
||||||
|
return (document.frmDiagnostico.informe.value.length < 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value=campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
|
||||||
|
document.frmDiagnostico.pagina.value=1;
|
||||||
|
pasarAMayusculas(document.frmDiagnostico.nombre);
|
||||||
|
document.frmDiagnostico.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
|
||||||
|
document.frmDiagnostico.pagina.value=pagina;
|
||||||
|
pasarAMayusculas(document.frmDiagnostico.nombre);
|
||||||
|
document.frmDiagnostico.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda()">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||||
|
</tr>
|
||||||
|
<!--<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></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"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<!--<td colspan="2" align="right">//-->
|
||||||
|
<td colspan="2" align="right" width="100%">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><input type="button" name="aceptar" value="OK/Imprimir" onclick="javascript:imprimir()" class="menu"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||||
|
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&imp=1" method="post">
|
||||||
|
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="informePrescripcion" value="">
|
||||||
|
<input type="hidden" name="justificacionNiveles" value="false">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_DIAGNOSTICO%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmDiagnostico" action="<%=request.getContextPath()%>/jsp/pac/solicitudDiagnostico.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||||
|
<table border="0" align="left" width="60%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Prescripción de diagnóstico:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table border="0" align="right">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Informe:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<textarea name="informe" rows="4" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInforme%></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita">Nombre acto médico: </span></td>
|
||||||
|
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
double dblPolizanew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
int intContratonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato();
|
||||||
|
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||||
|
Vector vSeleccion = null;
|
||||||
|
|
||||||
|
if(pac.getDesplazado() == null)
|
||||||
|
pac.setDesplazado(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard());
|
||||||
|
|
||||||
|
if(pac.getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) == 0)
|
||||||
|
{
|
||||||
|
vSeleccion = per.obtenerActosPorEspecialidad(intPagina, ParametrosConfiguracion.radiodiagnostico,intContratonew,intColectivonew,dblPolizanew, strCampoNombre);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(strCampoNombre.length()==0)
|
||||||
|
strCampoNombre="%";
|
||||||
|
vSeleccion = per.obtenerActosPorEspecialidad(intPagina, ParametrosConfiguracion.radiodiagnostico, strCampoNombre);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </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>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<tr>
|
||||||
|
<td width="1%"></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
Ttactmed ttactmed = null;
|
||||||
|
String estilo = "";
|
||||||
|
String strDescripcionSinComilla="";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
|
||||||
|
|
||||||
|
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||||
|
strDescripcionSinComilla = ttactmed.getDescripcion().replace('\'', '~');
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=ttactmed.getDescripcion()%></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<% 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(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/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(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de solicitud de diagnostico (pac/solicitudDiagnostico.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,608 @@
|
|||||||
|
<%@ 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, "Inicio página de de mantenimiento de autorizaciones (adm/mto_taconaut.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
|
||||||
|
{
|
||||||
|
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 mensaje = "";
|
||||||
|
int CampoMedico = 0;
|
||||||
|
long CampoPoliza = 0;
|
||||||
|
int CampoColectivo = 0;
|
||||||
|
int CampoOrden = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[] = null;
|
||||||
|
|
||||||
|
//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 medico para las busquedas
|
||||||
|
if (request.getParameter("medico")!=null){
|
||||||
|
if (request.getParameter("medico").compareTo("")!=0){
|
||||||
|
CampoMedico = Integer.parseInt(request.getParameter("medico"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//parametro poliza para las busquedas
|
||||||
|
if (request.getParameter("poliza")!=null)
|
||||||
|
CampoPoliza = Long.parseLong(request.getParameter("poliza"));
|
||||||
|
|
||||||
|
//parametro medico para las busquedas
|
||||||
|
if (request.getParameter("colectivo")!=null)
|
||||||
|
CampoColectivo = Integer.parseInt(request.getParameter("colectivo"));
|
||||||
|
|
||||||
|
//parametro poliza para las busquedas
|
||||||
|
if (request.getParameter("orden")!=null)
|
||||||
|
CampoOrden = Integer.parseInt(request.getParameter("orden"));
|
||||||
|
|
||||||
|
//parametro pagina para realizar la paginacion
|
||||||
|
if (request.getParameter("pagina")!=null)
|
||||||
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||||
|
|
||||||
|
if(sesion.getAttribute("MENSAJE")!=null)
|
||||||
|
{
|
||||||
|
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||||
|
sesion.removeAttribute("MENSAJE");
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento autorizaciones</title>
|
||||||
|
<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_adm.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 pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value = campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
/*if(document.frm_buscar.medico.value.length == 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de medico");
|
||||||
|
document.frm_buscar.medico.focus();
|
||||||
|
}
|
||||||
|
else */ if (isNaN(document.frm_buscar.medico.value)){
|
||||||
|
alert("Introduce un numero de medico válido. Sólo se permiten números");
|
||||||
|
document.frm_buscar.medico.value = "";
|
||||||
|
document.frm_buscar.medico.focus();
|
||||||
|
}
|
||||||
|
else if(document.frm_buscar.colectivo.value.length == 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de colectivo");
|
||||||
|
document.frm_buscar.colectivo.focus();
|
||||||
|
}
|
||||||
|
else if (isNaN(document.frm_buscar.colectivo.value)){
|
||||||
|
alert("Introduce un numero de colectivo válido. Sólo se permiten números");
|
||||||
|
document.frm_buscar.colectivo.value = "";
|
||||||
|
document.frm_buscar.colectivo.focus();
|
||||||
|
}
|
||||||
|
else if(document.frm_buscar.poliza.value.length == 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de poliza");
|
||||||
|
document.frm_buscar.poliza.focus();
|
||||||
|
}
|
||||||
|
else if (isNaN(document.frm_buscar.poliza.value)){
|
||||||
|
alert("Introduce un numero de poliza válido. Sólo se permiten números");
|
||||||
|
document.frm_buscar.poliza.value = "";
|
||||||
|
document.frm_buscar.poliza.focus();
|
||||||
|
}
|
||||||
|
else if(document.frm_buscar.orden.value.length == 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de orden");
|
||||||
|
document.frm_buscar.orden.focus();
|
||||||
|
}
|
||||||
|
else if (isNaN(document.frm_buscar.orden.value)){
|
||||||
|
alert("Introduce un numero de orden válido. Sólo se permiten números");
|
||||||
|
document.frm_buscar.orden.value = "";
|
||||||
|
document.frm_buscar.orden.focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frm_buscar.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function actualizar()
|
||||||
|
{
|
||||||
|
if(document.actualizar_autorizacion.cantidad.value < 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de sesiones disponibles valido")
|
||||||
|
document.actualizar_autorizacion.cantidad.focus();
|
||||||
|
}
|
||||||
|
else if (document.actualizar_autorizacion.cantidad.value.length < 1)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de sesiones disponibles valido")
|
||||||
|
document.actualizar_autorizacion.cantidad.focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.actualizar_autorizacion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frm_buscar.pagina.value = pagina;
|
||||||
|
document.frm_buscar.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function enfocar()
|
||||||
|
{
|
||||||
|
if(document.actualizar_autorizacion === undefined)
|
||||||
|
document.frm_buscar.medico.focus();
|
||||||
|
else
|
||||||
|
document.actualizar_autorizacion.cantidad.focus();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
|
||||||
|
<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="90px"></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="descarga_pdfs_autorizaciones.jsp?x=<%=strParametroMenu%>" method="post" >
|
||||||
|
<input type="hidden" name="pagina" value="1" />
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(21).getMensaje() %></span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="colectivo" name="colectivo" <%if(CampoPoliza!=0){%>value="<%=CampoColectivo %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(22).getMensaje() %></label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="poliza" name="poliza" <%if(CampoPoliza!=0){%>value="<%=CampoPoliza %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(23).getMensaje() %></label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="orden" name="orden" <%if(CampoPoliza!=0){%>value="<%=CampoOrden %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right">
|
||||||
|
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<%if(CampoMedico >= 0 && CampoPoliza > 0 && CampoColectivo >= 0 && CampoOrden >= 0)
|
||||||
|
{
|
||||||
|
PersistenciaTaconaut pertacon = new PersistenciaTaconaut();
|
||||||
|
PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut();
|
||||||
|
Vector vSeleccion = pertacon.BuscarAutorizacionPorMedicoYPoliza(CampoMedico,CampoColectivo,CampoPoliza,CampoOrden,intPagina);
|
||||||
|
if(vSeleccion.size()>0)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion del medico "+CampoMedico+" con poliza "+CampoPoliza+" esta en taconaut");
|
||||||
|
%>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<%if (intPagina != 0){ %>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" 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"><%=pertamensaje.obtenerMensaje(18).getMensaje() %></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(16).getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
String estilo = "";
|
||||||
|
for(int i=0;i<vSeleccion.size();i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td class="<%=estilo%>" align="center"><%= vSeleccion.get(i)%></td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
//mostrar el bot�n de resultados
|
||||||
|
%><form name="resultados" action="../adm/mto_taconaut.jsp?x=2" target="blank" method="post">
|
||||||
|
<input type="hidden" name="autorizacion" value="<%=vSeleccion.get(i) %>" />
|
||||||
|
<input type="submit" value="<%=pertamensaje.obtenerMensaje(65).getMensaje() %>" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<td class="<%=estilo%>" colspan="2" align="center">
|
||||||
|
<%
|
||||||
|
String resultado = ""+vSeleccion.get(i).toString();
|
||||||
|
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||||
|
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
//mostrar el bot�n de resultados
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="<%=pertamensaje.obtenerMensaje(64).getMensaje() %>" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
//mostrar el bot�n de resultados
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="<%=pertamensaje.obtenerMensaje(64).getMensaje() %>" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</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 (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>
|
||||||
|
<%
|
||||||
|
} //fin if(pagina!=0) %>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
boolean yaExisteEnTaconaut = false;
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion del medico "+CampoMedico+" con poliza "+CampoPoliza+" no esta en taconaut la buscamos en ttmovaut");
|
||||||
|
vSeleccion = perttmov.BuscarAutorizacionPorMedicoYPoliza(CampoMedico,CampoColectivo,CampoPoliza,CampoOrden,intPagina);
|
||||||
|
if(vSeleccion.size() > 0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<%if (intPagina != 0){ %>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right"><span class="txt">Página <%=perttmov.getPaginacion().getNumeroPagina()%> de <%=perttmov.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||||
|
</tr>
|
||||||
|
<% }%>
|
||||||
|
<tr>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(18).getMensaje() %></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(16).getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
String estilo = "";
|
||||||
|
for(int i=0;i<vSeleccion.size();i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
Taconaut tacon = new Taconaut();
|
||||||
|
tacon = (Taconaut)vSeleccion.get(i);
|
||||||
|
//Vuelvo a buscar en taconaut por si la primera vez no ha encontrado la autorizacion porque tarjeta=0 y tarjeta_chipcard=nulll
|
||||||
|
Vector vSeleccion2 = pertacon.ObtenerAutorizacionADM(Long.parseLong(tacon.getAutorizacion()));
|
||||||
|
if (vSeleccion2.size()>0){
|
||||||
|
tacon = (Taconaut)vSeleccion2.get(i);
|
||||||
|
yaExisteEnTaconaut = true;
|
||||||
|
}
|
||||||
|
int gesigu = 0;
|
||||||
|
if(tacon.getFromGesigu())
|
||||||
|
gesigu = 1;
|
||||||
|
|
||||||
|
if (!yaExisteEnTaconaut){
|
||||||
|
pertacon.CrearAutorizacionValida(Long.parseLong(tacon.getAutorizacion()), tacon.getMedico(), tacon.getEspecialidad(), tacon.getActo(), tacon.getCantidad(), gesigu, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if(pertacon.CrearAutorizacionValida(Integer.parseInt(tacon.getAutorizacion()), tacon.getMedico(), tacon.getEspecialidad(), tacon.getActo(), tacon.getCantidad(), gesigu, ""))
|
||||||
|
{*/
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td class="<%=estilo%>" align="center"><%= tacon.getAutorizacion()%></td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
//mostrar el bot�n de resultados
|
||||||
|
%><form name="resultados" action="../adm/mto_taconaut.jsp?x=2" target="blank" method="post">
|
||||||
|
<input type="hidden" name="autorizacion" value="<%=tacon.getAutorizacion() %>" />
|
||||||
|
<input type="submit" value="Ver Detalle" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
String resultado = ""+vSeleccion.get(i).toString();
|
||||||
|
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||||
|
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
//mostrar el bot�n de resultados
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
//mostrar el bot�n de resultados
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
/* }
|
||||||
|
else
|
||||||
|
{ */
|
||||||
|
%>
|
||||||
|
<!-- <tr><td class="txt"><%=pertamensaje.obtenerMensaje(14).getMensaje() %></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 (perttmov.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(<%=perttmov.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||||
|
<%}%>
|
||||||
|
|
||||||
|
<%if (perttmov.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(<%=perttmov.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||||
|
<td></td>
|
||||||
|
<td width="70" align="left"><a href="javascript:paginacion(<%=perttmov.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||||
|
<%}%>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
} //fin if(pagina!=0) %>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr><td class="txtnegrita"><%=pertamensaje.obtenerMensaje(13).getMensaje() %></td></tr>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td class="txt"><%=mensaje %></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, "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, "Final página de mantenimiento de autorizaciones (adm/mto_taconaut.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,309 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de detalle de usuario (adm/detalle_usuario.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
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu = "";
|
||||||
|
int intMedico = 0;
|
||||||
|
String blo = "";
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
|
||||||
|
//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 medico para la selección de los datos del mismo
|
||||||
|
if (request.getParameter("medico")!=null){
|
||||||
|
intMedico = Integer.parseInt(request.getParameter("medico"));}
|
||||||
|
|
||||||
|
//parametro bloqueo para combrobar despues si se ha modificado
|
||||||
|
if (request.getParameter("bloqueado")!=null){
|
||||||
|
blo = (String)request.getParameter("bloqueado");}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Detalle de usuario</title>
|
||||||
|
<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_adm.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 enviar()
|
||||||
|
{
|
||||||
|
//comprobamos que el se haya modificado el combobox o el checkbox
|
||||||
|
if ((document.frmUsuario.reset_clave.checked == true) || ((document.frmUsuario.bloqueado.value)!=(document.frmUsuario.valor_bloqueo_clave.value))){
|
||||||
|
document.frmUsuario.submit();
|
||||||
|
alert("Usuario modificado");
|
||||||
|
} else{
|
||||||
|
alert("No has modificado ningún valor");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value = campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmUsuario.valor_password.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ó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="90px"></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 -->
|
||||||
|
<%
|
||||||
|
PersistenciaTamedico per = new PersistenciaTamedico();
|
||||||
|
Tamedico tamedico = per.seleccionar(intMedico);
|
||||||
|
|
||||||
|
|
||||||
|
String bloqueo = "";
|
||||||
|
String fechaUltAcceso = "";
|
||||||
|
String fechaCaducidad = "";
|
||||||
|
Calendar calCaducidad = Calendar.getInstance();
|
||||||
|
|
||||||
|
if (tamedico != null)
|
||||||
|
{
|
||||||
|
if(tamedico.getBloqueoClave() != null)
|
||||||
|
{
|
||||||
|
bloqueo = tamedico.getBloqueoClave().toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tamedico.getFechaUltimoAcceso() != null)
|
||||||
|
{
|
||||||
|
fechaUltAcceso = sdf.format(tamedico.getFechaUltimoAcceso());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tamedico.getFechaModifClave() != null)
|
||||||
|
{
|
||||||
|
calCaducidad.setTime((java.util.Date)tamedico.getFechaModifClave());
|
||||||
|
}
|
||||||
|
calCaducidad.add(Calendar.DATE, ParametrosConfiguracion.diasCaducidad);
|
||||||
|
fechaCaducidad = sdf.format(calCaducidad.getTime());
|
||||||
|
%>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<form name="frmUsuario" action="../../servlet/GestorAdministracion" method="post">
|
||||||
|
<td>
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Código: </span></td></td>
|
||||||
|
<td><input type="text" size="20" name="medico" class="txt" readonly="yes" value="<%=tamedico.getMedico()%>" maxlength="6"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Resetear clave: </span></td>
|
||||||
|
<td><input name="reset_clave" type="checkbox" value="" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Nombre: </span></td>
|
||||||
|
<td><input type="text" size="80" name="nombre" class="txt" readonly="yes" value="<%=tamedico.getNombre()%>" maxlength="255"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Apellidos: </span></td>
|
||||||
|
<td><input type="text" size="80" name="apellidos" class="txt" readonly="yes" value="<%=tamedico.getApellidos()%>" maxlength="255"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Especialidad: </span></td></td>
|
||||||
|
<td><input type="text" size="4" name="especialidad" class="txt" readonly="yes" value="<%=tamedico.getEspecialidad()%>" maxlength="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Bloqueo: </span></td></td>
|
||||||
|
<td><select name="valor_bloqueo_clave"><%if (bloqueo.equals("S")
|
||||||
|
) {%>
|
||||||
|
<option selected="selected" value="S">Si</option>
|
||||||
|
<option value="N">No</option>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<option selected="selected" value="N">No</option>
|
||||||
|
<option value="S">Si</option>
|
||||||
|
<% } %>
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Ultimo acceso: </span></td></td>
|
||||||
|
<td><input type="text" size="15" name="fecha_ult_acceso" class="txt" readonly="yes" value="<%=fechaUltAcceso%>" maxlength="10"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Caducidad de clave: </span></td></td>
|
||||||
|
<td><input type="text" size="15" name="valor_fecha_modif_clave" class="txt" value="<%=fechaCaducidad%>" maxlength="10" onblur="javascript:valorFecha(this)"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><a href="javascript:frmUsuario.reset();frmUsuario.valor_password.focus()" class="enlace">Deshacer</a> <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_ADM_USUARIO_DETALLE%>">
|
||||||
|
<input type="hidden" name="bloqueado" value="<%=bloqueo%>">
|
||||||
|
</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(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de detalle de usuario (adm/detalle_usuario.jsp)");
|
||||||
|
%>
|
||||||
|
After Width: | Height: | Size: 86 B |
|
After Width: | Height: | Size: 43 B |
|
After Width: | Height: | Size: 43 B |
@@ -0,0 +1,330 @@
|
|||||||
|
<%@ 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 del listado de usuarios (adm/lista_usuarios.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
|
||||||
|
{
|
||||||
|
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 strCampoApellido = "";
|
||||||
|
int intPagina = 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 apellido para las busquedas
|
||||||
|
if (request.getParameter("apellido")!=null)
|
||||||
|
strCampoApellido = (String)request.getParameter("apellido");
|
||||||
|
|
||||||
|
//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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Lista de Usuarios</title>
|
||||||
|
<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_adm.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 pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value = campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
document.frmListaUsuarios.pagina.value = 1;
|
||||||
|
pasarAMayusculas(document.frmListaUsuarios.apellido);
|
||||||
|
document.frmListaUsuarios.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmListaUsuarios.pagina.value = pagina;
|
||||||
|
pasarAMayusculas(document.frmListaUsuarios.apellido);
|
||||||
|
document.frmListaUsuarios.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="document.frmListaUsuarios.apellido.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ó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="90px"></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"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<form name="frmListaUsuarios" action="lista_usuarios.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.apellido)">
|
||||||
|
<td colspan="3">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita">Apellido: </span></td>
|
||||||
|
<td><input type="text" size="50" name="apellido" class="txt" value="<%=strCampoApellido%>"></td>
|
||||||
|
<td> </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"> </td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
|
||||||
|
PersistenciaUsuario per = new PersistenciaUsuario();
|
||||||
|
|
||||||
|
Vector vSeleccion = per.listado_usuarios(intPagina, strCampoApellido);
|
||||||
|
|
||||||
|
if (vSeleccion.size() == 0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||||
|
%>
|
||||||
|
<!-- Hay registros -->
|
||||||
|
<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">Apellidos</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
Tamedico tamedico = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
tamedico = (Tamedico)vSeleccion.elementAt(i);
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td class="<%=estilo%>" align="left"><a href="./detalle_usuario.jsp?x=0&medico=<%= tamedico.getMedico() %>" class="enlace"><%=tamedico.getApellidos()%></a></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=tamedico.getNombre()%></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=tamedico.getMedico()%></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)
|
||||||
|
%>
|
||||||
|
|
||||||
|
<!-- Hay registros -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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, "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, "Final página de listado de usuarios (adm/lista_usuarios.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,235 @@
|
|||||||
|
<%@ 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 de mantenimiento actos imputados (adm/movimientos_tamovext.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
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu = "";
|
||||||
|
String mensaje = "";
|
||||||
|
long CampoAutorizacion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[] = null;
|
||||||
|
//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 apellido para las busquedas
|
||||||
|
if (request.getParameter("num_aut")!=null)
|
||||||
|
CampoAutorizacion = Long.parseLong(request.getParameter("num_aut"));
|
||||||
|
|
||||||
|
//parametro pagina para realizar la paginacion
|
||||||
|
if (request.getParameter("pagina")!=null)
|
||||||
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||||
|
|
||||||
|
if(sesion.getAttribute("MENSAJE")!=null)
|
||||||
|
{
|
||||||
|
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||||
|
sesion.removeAttribute("MENSAJE");
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Llega 62");
|
||||||
|
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento actos imputados</title>
|
||||||
|
<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_adm.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 buscar()
|
||||||
|
{
|
||||||
|
document.frm_buscar.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 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="90px"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||||
|
<%PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut();
|
||||||
|
TTMovaut ttmov = perttmov.ObtenerAutorizacionTTmovaut(CampoAutorizacion);
|
||||||
|
PersistenciaTamovext pertamo = new PersistenciaTamovext();
|
||||||
|
Vector resul = pertamo.ObtenerMovimientosMismaPolizaYMedico(ttmov.get_medico(), ttmov.get_especialidad1(), ttmov.get_acto1(), ttmov.get_entidad(), ttmov.get_colectivo(), ttmov.get_poliza(), ttmov.get_orden());
|
||||||
|
%>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<%
|
||||||
|
if(resul != null)
|
||||||
|
{
|
||||||
|
if(resul.size()>0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td class="txt">Fecha</td><td class="txt">Acto</td><td class="txt">Especialidad</td><td class="txt">Médico</td></tr>
|
||||||
|
<%
|
||||||
|
for(int i=0; i<resul.size();i++)
|
||||||
|
{
|
||||||
|
Tamovext tamo = new Tamovext();
|
||||||
|
tamo = (Tamovext)resul.get(i);
|
||||||
|
%>
|
||||||
|
<tr><td class="txt"><%=Utilidades.formatear_fecha(tamo.getFecha()) %></td><td class="txt"><%=tamo.getActo() %></td><td class="txt"><%=tamo.getEspecialidad() %></td><td class="txt"><%=tamo.getMedico() %></td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td class="txt"><form name="frm_buscar" action="mto_taconaut.jsp?x=<%=strParametroMenu%>" method="post" ><input type="hidden" class="txt" id="autorizacion" name="autorizacion" value="<%=CampoAutorizacion %>"/><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></form></td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td class="txt">No se han encontrado movimientos <br/>imputados a esa autorización</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, "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, "Final página de mantenimiento de autorizaciones (adm/movimientos_tamovext.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,411 @@
|
|||||||
|
<%@ 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 mantenimiento de niveles analíticos (adm/mto_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
|
||||||
|
{
|
||||||
|
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 strParametroEspe = "0";
|
||||||
|
String strDescripcionActo = "";
|
||||||
|
int intPagina = 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 especialidad para saber si el combo tiene seleccionada una especialidad y mostrar los actos de cada especialidad o no
|
||||||
|
if (request.getParameter("especialidad")!=null)
|
||||||
|
strParametroEspe=(String)request.getParameter("especialidad");
|
||||||
|
|
||||||
|
//parametro pagina para realizar la paginacion
|
||||||
|
if (request.getParameter("pagina")!=null)
|
||||||
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||||
|
|
||||||
|
//parametro acto para las busquedas
|
||||||
|
if (request.getParameter("hiddenActo")!=null)
|
||||||
|
strDescripcionActo = (String)request.getParameter("hiddenActo");
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento Actos</title>
|
||||||
|
<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_adm.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">
|
||||||
|
<!--
|
||||||
|
var modificado = 0;
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value = campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function MostrarActos(especialidad){
|
||||||
|
if (document.getElementById("mto_esp").value != 0){
|
||||||
|
document.getElementById("hiddenEspecialidad").value = document.getElementById("mto_esp").value;
|
||||||
|
document.getElementById("hiddenActo").value = "";
|
||||||
|
document.frmActos.submit();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function enviar(){
|
||||||
|
if (modificado == 1){
|
||||||
|
for (i=0;i<document.getElementById("nElementos").value;i++){
|
||||||
|
document.getElementById("hiddenNivel"+(i+1)).value = document.getElementById("mto_nivel"+(i+1)).value;
|
||||||
|
}
|
||||||
|
document.frmActosNiveles.submit();
|
||||||
|
alert("Nivel modificado");
|
||||||
|
} else{
|
||||||
|
alert("No has modificado ningun valor");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina){
|
||||||
|
document.getElementById("pagina").value = pagina;
|
||||||
|
document.getElementById("hiddenEspecialidad").value = document.getElementById("mto_esp").value;
|
||||||
|
document.frmActos.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
document.getElementById("pagina").value = 1;
|
||||||
|
pasarAMayusculas(document.getElementById("acto"));
|
||||||
|
document.getElementById("hiddenActo").value = document.getElementById("acto").value;
|
||||||
|
document.frmActos.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 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>//-->
|
||||||
|
<!-- Zona central //-->
|
||||||
|
<td width="565">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||||
|
<td>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Especialidad: </span></td>
|
||||||
|
|
||||||
|
<% PersistenciaTanivelEspecialidadTanivelActo per = new PersistenciaTanivelEspecialidadTanivelActo();
|
||||||
|
Vector vSeleccion = per.obtenerEspecialidades();
|
||||||
|
|
||||||
|
if (vSeleccion.size() == 0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<td><select id="mto_esp" name="especialidades" onchange="MostrarActos()">
|
||||||
|
<option value=0>-- Seleccionar --</option>
|
||||||
|
<%
|
||||||
|
TanivelEspecialidad TanivEsp = null;
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
TanivEsp = (TanivelEspecialidad)vSeleccion.elementAt(i);
|
||||||
|
String descripcion = "";
|
||||||
|
descripcion = per.ObtenerDescripcion(TanivEsp.getEspecialidad());
|
||||||
|
%>
|
||||||
|
<option value="<%=TanivEsp.getEspecialidad()%>" <%=(strParametroEspe.compareTo(String.valueOf(TanivEsp.getEspecialidad()))==0)?"selected=selected":"" %>><%=descripcion %></option>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</select></td>
|
||||||
|
<% }
|
||||||
|
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="3"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<% if (Integer.parseInt(strParametroEspe)!=0){
|
||||||
|
Vector vTanivAct = new Vector();
|
||||||
|
vTanivAct = per.ObtenerActos(Integer.parseInt(strParametroEspe),intPagina,strDescripcionActo);
|
||||||
|
if (vTanivAct.size() == 0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||||
|
%>
|
||||||
|
<!-- Hay registros -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita">Descripcion Acto: </span></td>
|
||||||
|
<td><input type="text" size="50" name="acto" id="acto" class="txt" value="<%=strDescripcionActo%>"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<table cellpadding="0" border="0" width="90%" align="center">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><form name="frmActosNiveles" action="../../servlet/GestorAdministracion" method="post">
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Codigo</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nivel</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
TanivelActo TanivAct = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vTanivAct.size(); i++){
|
||||||
|
TanivAct = (TanivelActo)vTanivAct.elementAt(i);
|
||||||
|
String descripcionActo = "";
|
||||||
|
descripcionActo = per.ObtenerDescripcionActo(TanivAct.getActo(),Integer.parseInt(strParametroEspe));
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="<%=estilo%>" align="center"><span class="txtnegrita"><%=TanivAct.getActo()%> </span></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><span class="txtnegrita"><%=descripcionActo%> </span></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><select id="mto_nivel<%=(i+1) %>" name="mto_visibilidad" onchange="modificado=1">
|
||||||
|
<option value=1 <%=(1==TanivAct.getNivel())?"selected=selected":"" %>>1</option>
|
||||||
|
<option value=2 <%=(2==TanivAct.getNivel())?"selected=selected":"" %>>2</option>
|
||||||
|
<option value=3 <%=(3==TanivAct.getNivel())?"selected=selected":"" %>>3</option>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td><input type="hidden" name="hiddenActo<%=(i+1) %>" id="hiddenActo<%=(i+1) %>" value="<%=TanivAct.getActo()%>"></td>
|
||||||
|
<td><input type="hidden" name="hiddenNivel<%=(i+1)%>" id="hiddenNivel<%=(i+1)%>" value=""></td>
|
||||||
|
<td><input type="hidden" name="nElementos" id="nElementos" value="<%=vTanivAct.size()%>"></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)
|
||||||
|
%>
|
||||||
|
<input type="hidden" name="hiddenEspe" value="<%=strParametroEspe%>">
|
||||||
|
<tr>
|
||||||
|
<td><input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_ACT_NIVEL_ACTO%>"></td>
|
||||||
|
<td colspan="2" align="right"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
<form name="frmActos" action="../../servlet/GestorAdministracion" method="post">
|
||||||
|
<input type="hidden" name="pagina" id="pagina" value="1">
|
||||||
|
<input type="hidden" id="hiddenEspecialidad" name="hiddenEspecialidad" value="<%=Integer.parseInt(strParametroEspe)%>">
|
||||||
|
<input type="hidden" id="hiddenActo" name="hiddenActo" value="<%=strDescripcionActo%>">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_NIVELES_ACT%>">
|
||||||
|
</form>
|
||||||
|
</table>
|
||||||
|
</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, "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, "Final página de mantenimiento de niveles analíticos (adm/mto_actos.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
<%@ 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 mantenimiento de niveles analíticos (adm/mto_analiticas.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
|
||||||
|
{
|
||||||
|
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 = "";
|
||||||
|
int intPagina = 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");
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento de Analíticas</title>
|
||||||
|
<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_adm.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 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ó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>//-->
|
||||||
|
<!-- Zona central //-->
|
||||||
|
<td width="565">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||||
|
<td colspan="2" align="center"><a href="mto_niveles.jsp?x=3" class="enlace">Mantenimiento de niveles</a></td>
|
||||||
|
<td colspan="2" align="center"><a href="mto_actos.jsp?x=3" class="enlace">Mantenimiento de actos</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</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, "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, "Final página de mantenimiento de niveles analíticos (adm/mto_analiticas.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,383 @@
|
|||||||
|
<%@ 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 mantenimiento de niveles analíticos (adm/mto_niveless.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
|
||||||
|
{
|
||||||
|
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 strParametroEspe = "0";
|
||||||
|
String strParametroEspeSol = "0";
|
||||||
|
int intPagina = 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");
|
||||||
|
|
||||||
|
if (request.getParameter("especialidad")!=null)
|
||||||
|
strParametroEspe=(String)request.getParameter("especialidad");
|
||||||
|
|
||||||
|
if (request.getParameter("especialidadSolicitada")!=null)
|
||||||
|
strParametroEspeSol=(String)request.getParameter("especialidadSolicitada");
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento Niveles</title>
|
||||||
|
<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_adm.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">
|
||||||
|
<!--
|
||||||
|
var modificado = 0;
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value = campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function MostrarNiveles(especialidad){
|
||||||
|
if (document.getElementById("mto_esp").value != 0){
|
||||||
|
document.getElementById("hiddenEspecialidad").value = document.getElementById("mto_esp").value;
|
||||||
|
document.getElementById("hiddenEspecialidadSolicitada").value = 0;
|
||||||
|
document.frmNiveles.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function MostrarEspecialidadesSolicitadas(){
|
||||||
|
if (document.getElementById("mto_esp_sol").value != 0){
|
||||||
|
document.getElementById("hiddenEspecialidadSolicitada").value = document.getElementById("mto_esp_sol").value;
|
||||||
|
document.frmNiveles.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function enviar()
|
||||||
|
{
|
||||||
|
if (modificado == 1){
|
||||||
|
document.getElementById("hiddenVisi1").value = document.getElementById("mto_visibilidad1").value;
|
||||||
|
document.getElementById("hiddenVisi2").value = document.getElementById("mto_visibilidad2").value;
|
||||||
|
document.getElementById("hiddenVisi3").value = document.getElementById("mto_visibilidad3").value;
|
||||||
|
document.frmNivVis.submit();
|
||||||
|
alert("Visibilidad modificada");
|
||||||
|
} else{
|
||||||
|
alert("No has modificado ningun valor");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</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 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>//-->
|
||||||
|
<!-- Zona central //-->
|
||||||
|
<td width="565">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||||
|
<td>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="right"><span class="txtnegrita">Especialidad: </span></td>
|
||||||
|
|
||||||
|
<% PersistenciaTanivelEspecialidadTanivelActo per = new PersistenciaTanivelEspecialidadTanivelActo();
|
||||||
|
Vector vSeleccion = per.obtenerEspecialidades();
|
||||||
|
|
||||||
|
if (vSeleccion.size() == 0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<td><select id="mto_esp" name="especialidades" onchange="MostrarNiveles()">
|
||||||
|
<option value=0>-- Seleccionar --</option>
|
||||||
|
<%
|
||||||
|
TanivelEspecialidad TanivEsp = null;
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
TanivEsp = (TanivelEspecialidad)vSeleccion.elementAt(i);
|
||||||
|
String descripcion = "";
|
||||||
|
descripcion = per.ObtenerDescripcion(TanivEsp.getEspecialidad());
|
||||||
|
%>
|
||||||
|
<option value="<%=TanivEsp.getEspecialidad()%>" <%=(strParametroEspe.compareTo(String.valueOf(TanivEsp.getEspecialidad()))==0)?"selected=selected":"" %>><%=descripcion %></option>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</select></td>
|
||||||
|
<% }
|
||||||
|
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<% if (Integer.parseInt(strParametroEspe)!=0){
|
||||||
|
%>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td align="right"><span class="txtnegrita">Especialidad Solicitada: </span></td>
|
||||||
|
<%
|
||||||
|
Vector vTanivEspeSolicitada = new Vector();
|
||||||
|
vTanivEspeSolicitada = per.obtenerEspecialidadesSolicitadas(Integer.parseInt(strParametroEspe));
|
||||||
|
if (vTanivEspeSolicitada.size() == 0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" align="center"><span class="txt"><%=tamensaje.getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<td><select id="mto_esp_sol" name="mto_esp_sol" onchange="MostrarEspecialidadesSolicitadas()">
|
||||||
|
<option value=0>-- Seleccionar --</option>
|
||||||
|
<%
|
||||||
|
TanivelEspecialidad TanivEspe = null;
|
||||||
|
for(int i = 0; i < vTanivEspeSolicitada.size(); i++)
|
||||||
|
{
|
||||||
|
TanivEspe = (TanivelEspecialidad)vTanivEspeSolicitada.elementAt(i);
|
||||||
|
String descripcionEspSol = "";
|
||||||
|
descripcionEspSol = per.ObtenerDescripcion(TanivEspe.getEspecialidad());
|
||||||
|
%>
|
||||||
|
<option value="<%=TanivEspe.getEspecialidad()%>"<%=(strParametroEspeSol.compareTo(String.valueOf(TanivEspe.getEspecialidad()))==0)?"selected=selected":"" %>><%=descripcionEspSol %></option>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</select></td>
|
||||||
|
<% }
|
||||||
|
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<% if (Integer.parseInt(strParametroEspeSol)!=0){
|
||||||
|
|
||||||
|
Vector vTanivEspe = new Vector();
|
||||||
|
vTanivEspe = per.ObtenerNiveles(Integer.parseInt(strParametroEspe),Integer.parseInt(strParametroEspeSol));
|
||||||
|
if (vTanivEspe.size() == 0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" align="center"><span class="txt"><%=tamensaje.getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- No hay registros -->
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<form name="frmNivVis" action="../../servlet/GestorAdministracion" method="post">
|
||||||
|
<table cellpadding="0" border="0" width="90%" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nivel</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Visibilidad</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
TanivelEspecialidad TanivEsp = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vTanivEspe.size(); i++){
|
||||||
|
TanivEsp = (TanivelEspecialidad)vTanivEspe.elementAt(i);
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="<%=estilo%>" align="center"><span class="txtnegrita"><%=TanivEsp.getNivel()%> </span></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><select id="mto_visibilidad<%=(i+1) %>" name="mto_visibilidad" onchange="modificado=1">
|
||||||
|
<option value=0 <%=(0==TanivEsp.getVisibilidad())?"selected=selected":"" %>>0 - Invisible</option>
|
||||||
|
<option value=1 <%=(1==TanivEsp.getVisibilidad())?"selected=selected":"" %>>1 - Permitido</option>
|
||||||
|
<option value=2 <%=(2==TanivEsp.getVisibilidad())?"selected=selected":"" %>>2 - Justificable</option>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td><input type="hidden" name="hiddenNivel<%=(i+1) %>" id="hiddenNivel<%=(i+1) %>" value="<%=TanivEsp.getNivel()%>"></td>
|
||||||
|
<td><input type="hidden" name="hiddenVisi<%=(i+1)%>" id="hiddenVisi<%=(i+1)%>" value=""></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<input type="hidden" name="hiddenEspe" value="<%=strParametroEspe%>">
|
||||||
|
<input type="hidden" name="hiddenEspeS" value="<%=strParametroEspeSol%>">
|
||||||
|
<tr>
|
||||||
|
<td><input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_ACT_VISIBILI%>"></td>
|
||||||
|
<td colspan="2" align="right"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
<form name="frmNiveles" action="../../servlet/GestorAdministracion" method="post">
|
||||||
|
<input type="hidden" id="hiddenEspecialidad" name="hiddenEspecialidad" value="<%=strParametroEspe%>">
|
||||||
|
<input type="hidden" id="hiddenEspecialidadSolicitada" name="hiddenEspecialidadSolicitada" value="<%=strParametroEspeSol%>">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_NIVELES_ESPE%>">
|
||||||
|
</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);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de niveles analíticos (adm/mto_niveles.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,465 @@
|
|||||||
|
<%@ 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, "Inicio página de de mantenimiento de autorizaciones (adm/mto_taconaut.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
|
||||||
|
{
|
||||||
|
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 mensaje = "";
|
||||||
|
int CampoMedico = 0;
|
||||||
|
long CampoPoliza = 0;
|
||||||
|
int CampoColectivo = 0;
|
||||||
|
int CampoOrden = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[] = null;
|
||||||
|
|
||||||
|
//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 medico para las busquedas
|
||||||
|
if (request.getParameter("medico")!=null){
|
||||||
|
if (request.getParameter("medico").compareTo("")==0){
|
||||||
|
CampoMedico = 0;
|
||||||
|
}else{
|
||||||
|
CampoMedico = Integer.parseInt(request.getParameter("medico"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//parametro poliza para las busquedas
|
||||||
|
if (request.getParameter("poliza")!=null)
|
||||||
|
CampoPoliza = Integer.parseInt(request.getParameter("poliza"));
|
||||||
|
|
||||||
|
//parametro medico para las busquedas
|
||||||
|
if (request.getParameter("colectivo")!=null)
|
||||||
|
CampoColectivo = Integer.parseInt(request.getParameter("colectivo"));
|
||||||
|
|
||||||
|
//parametro poliza para las busquedas
|
||||||
|
if (request.getParameter("orden")!=null)
|
||||||
|
CampoOrden = Integer.parseInt(request.getParameter("orden"));
|
||||||
|
|
||||||
|
//parametro pagina para realizar la paginacion
|
||||||
|
if (request.getParameter("pagina")!=null)
|
||||||
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||||
|
|
||||||
|
if(sesion.getAttribute("MENSAJE")!=null)
|
||||||
|
{
|
||||||
|
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||||
|
sesion.removeAttribute("MENSAJE");
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento autorizaciones</title>
|
||||||
|
<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_adm.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 pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value = campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
/*if(document.frm_buscar.medico.value.length == 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de medico");
|
||||||
|
document.frm_buscar.medico.focus();
|
||||||
|
}
|
||||||
|
else */ if(isNaN(document.frm_buscar.medico.value))
|
||||||
|
{
|
||||||
|
alert("Solo puede introducir números en el campo médico");
|
||||||
|
document.frm_buscar.medico.value = "";
|
||||||
|
document.frm_buscar.medico.focus();
|
||||||
|
}
|
||||||
|
else if(document.frm_buscar.colectivo.value.length == 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de colectivo");
|
||||||
|
document.frm_buscar.colectivo.focus();
|
||||||
|
}
|
||||||
|
else if(isNaN(document.frm_buscar.colectivo.value))
|
||||||
|
{
|
||||||
|
alert("Solo puede introducir números en el campo colectivo");
|
||||||
|
document.frm_buscar.colectivo.value = "";
|
||||||
|
document.frm_buscar.colectivo.focus();
|
||||||
|
}
|
||||||
|
else if(document.frm_buscar.poliza.value.length == 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de poliza");
|
||||||
|
document.frm_buscar.poliza.focus();
|
||||||
|
}
|
||||||
|
else if(isNaN(document.frm_buscar.poliza.value))
|
||||||
|
{
|
||||||
|
alert("Solo puede introducir números en el campo poliza");
|
||||||
|
document.frm_buscar.poliza.value = "";
|
||||||
|
document.frm_buscar.poliza.focus();
|
||||||
|
}
|
||||||
|
else if(document.frm_buscar.orden.value.length == 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de orden");
|
||||||
|
document.frm_buscar.orden.focus();
|
||||||
|
}
|
||||||
|
else if(isNaN(document.frm_buscar.orden.value))
|
||||||
|
{
|
||||||
|
alert("Solo puede introducir números en el campo orden");
|
||||||
|
document.frm_buscar.orden.value = "";
|
||||||
|
document.frm_buscar.orden.focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frm_buscar.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function actualizar()
|
||||||
|
{
|
||||||
|
if(document.actualizar_autorizacion.cantidad.value < 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de sesiones disponibles valido")
|
||||||
|
document.actualizar_autorizacion.cantidad.focus();
|
||||||
|
}
|
||||||
|
else if (document.actualizar_autorizacion.cantidad.value.length < 1)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de sesiones disponibles valido")
|
||||||
|
document.actualizar_autorizacion.cantidad.focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.actualizar_autorizacion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frm_buscar.pagina.value = pagina;
|
||||||
|
document.frm_buscar.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function enfocar()
|
||||||
|
{
|
||||||
|
if(document.actualizar_autorizacion === undefined)
|
||||||
|
document.frm_buscar.medico.focus();
|
||||||
|
else
|
||||||
|
document.actualizar_autorizacion.cantidad.focus();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
|
||||||
|
<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="190px"></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="mto_peticiones.jsp?x=<%=strParametroMenu%>" method="post" >
|
||||||
|
<input type="hidden" name="pagina" value="1" />
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(21).getMensaje() %></span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="colectivo" name="colectivo" <%if(CampoPoliza!=0 ){%>value="<%=CampoColectivo %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(22).getMensaje() %></label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="poliza" name="poliza" <%if(CampoPoliza!=0){%>value="<%=CampoPoliza %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(23).getMensaje() %></label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="orden" name="orden" <%if(CampoPoliza!=0){%>value="<%=CampoOrden %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right">
|
||||||
|
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<%if(CampoMedico >= 0 && CampoPoliza > 0 && CampoColectivo >= 0 && CampoOrden >= 0)
|
||||||
|
{
|
||||||
|
PersistenciaTapresca per = new PersistenciaTapresca();
|
||||||
|
Vector vSeleccion = per.obtenerPeticiones(CampoMedico,CampoColectivo,CampoPoliza,CampoOrden,intPagina);
|
||||||
|
if(vSeleccion.size()>0)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "La peticion del medico "+CampoMedico+" con poliza "+CampoPoliza+" esta en tapreca_tarisan");
|
||||||
|
%>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<%if (intPagina != 0){ %>
|
||||||
|
<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">Peticiones</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver PDF</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
String estilo = "";
|
||||||
|
for(int i=0;i<vSeleccion.size();i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td class="<%=estilo%>" align="center"><%= vSeleccion.get(i)%></td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
String resultado = ""+vSeleccion.get(i).toString();
|
||||||
|
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||||
|
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
//mostrar el botón de resultados
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
//mostrar el botón de resultados
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</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) %>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td class="txtnegrita">No hay peticiones para los datos introducidos</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td class="txt"><%=mensaje %></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, "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, "Final página de mantenimiento de autorizaciones (adm/mto_taconaut.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,404 @@
|
|||||||
|
<%@ 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, "Inicio página de de mantenimiento de autorizaciones (adm/mto_taconaut.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
|
||||||
|
{
|
||||||
|
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 mensaje = "";
|
||||||
|
long CampoAutorizacion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[] = null;
|
||||||
|
|
||||||
|
//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 apellido para las busquedas
|
||||||
|
if (request.getParameter("autorizacion")!=null)
|
||||||
|
CampoAutorizacion = Long.parseLong(request.getParameter("autorizacion"));
|
||||||
|
|
||||||
|
//parametro pagina para realizar la paginacion
|
||||||
|
if (request.getParameter("pagina")!=null)
|
||||||
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||||
|
|
||||||
|
if(sesion.getAttribute("MENSAJE")!=null)
|
||||||
|
{
|
||||||
|
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||||
|
sesion.removeAttribute("MENSAJE");
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento autorizaciones</title>
|
||||||
|
<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_adm.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 pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value = campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
if(document.frm_buscar.autorizacion.value.length < 3)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de autorizacion valido");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frm_buscar.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function actualizar()
|
||||||
|
{
|
||||||
|
if(document.actualizar_autorizacion.cantidad.value < 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de sesiones disponibles valido")
|
||||||
|
document.actualizar_autorizacion.cantidad.focus();
|
||||||
|
}
|
||||||
|
else if (document.actualizar_autorizacion.cantidad.value.length < 1)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de sesiones disponibles valido")
|
||||||
|
document.actualizar_autorizacion.cantidad.focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.actualizar_autorizacion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frm_buscar.pagina.value = pagina;
|
||||||
|
document.frm_buscar.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function enfocar()
|
||||||
|
{
|
||||||
|
if(document.actualizar_autorizacion === undefined)
|
||||||
|
document.frm_buscar.autorizacion.focus();
|
||||||
|
else
|
||||||
|
document.actualizar_autorizacion.cantidad.focus();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
|
||||||
|
<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="190px"></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%">
|
||||||
|
<tr><td><a href="<%=request.getContextPath()%>/jsp/adm/descarga_pdfs_autorizaciones.jsp?x=<%=strParametroMenu%>" class="enlace"><%=pertamensaje.obtenerMensaje(31).getMensaje() %></a></td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<form name="frm_buscar" action="mto_taconaut.jsp?x=<%=strParametroMenu%>" method="post" >
|
||||||
|
<tr><td class="txt"><label>Número autorización:</label><input type="text" class="txt" id="autorizacion" name="autorizacion"/><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td></tr>
|
||||||
|
</form>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<%if(CampoAutorizacion > 0)
|
||||||
|
{
|
||||||
|
PersistenciaTaconaut pertacon = new PersistenciaTaconaut();
|
||||||
|
PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut();
|
||||||
|
if(pertacon.BuscarAutorizacion(CampoAutorizacion))
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion "+CampoAutorizacion+" esta en taconaut");
|
||||||
|
Vector vSeleccion = pertacon.ObtenerAutorizacionADM(CampoAutorizacion);
|
||||||
|
if(vSeleccion.size()>0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<table>
|
||||||
|
<tr><td class="txt">Autorización</td><td class="txt">Acto</td><td class="txt">Especialidad</td><td class="txt">Cantidad</td></tr>
|
||||||
|
<%
|
||||||
|
for(int i=0;i<vSeleccion.size();i++)
|
||||||
|
{
|
||||||
|
Taconaut tacon = (Taconaut)vSeleccion.get(i);
|
||||||
|
%>
|
||||||
|
<form name="actualizar_autorizacion" action="<%=request.getContextPath()%>/servlet/GestorAdministracion?x=<%=strParametroMenu%>&pagina=1&imp=0" method="post">
|
||||||
|
<tr><td class="txt"><%=tacon.getAutorizacion() %></td><td class="txt"><%=tacon.getActo() %></td><td class="txt"><%=tacon.getEspecialidad() %></td><td class="txt"><input type="text" name="cantidad" id="cantidad" value="<%=tacon.getCantidad() %>"/></td><td class="txt"><a href="javascript:actualizar()" class="enlace">Actualizar</a></td></tr>
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_ACT_AUTORIZACION %>"/>
|
||||||
|
<input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>"/>
|
||||||
|
<input type="hidden" name="acto" value="<%=tacon.getActo() %>"/>
|
||||||
|
<input type="hidden" name="especialidad" value="<%=tacon.getEspecialidad() %>"/>
|
||||||
|
</form>
|
||||||
|
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="movimientos_autorizacion" action="movimientos_tamovext.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Movimientos imputados a esta autorizacion" class="enlace"></form></td></tr>
|
||||||
|
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="otras_autorizaciones" action="otras_autorizaciones.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Otras Autorizaciones del asegurado" class="enlace"></form></td></tr>
|
||||||
|
<tr><td></td><td></td><td></td><td></td>
|
||||||
|
<td class="txt">
|
||||||
|
<%
|
||||||
|
String resultado = ""+tacon.getAutorizacion();
|
||||||
|
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||||
|
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="Imprimir Petición" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fichero = new File(ParametrosConfiguracion.ruta_pdf+Integer.valueOf(tacon.getAutorizacion()).toString()+".PDF");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="Imprimir Petición" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%><p><%=pertamensaje.obtenerMensaje(15).getMensaje() %></p><%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion "+CampoAutorizacion+" no esta en taconaut la buscamos en ttmovaut");
|
||||||
|
Vector vSeleccion = perttmov.ObtenerAutorizacionADM(CampoAutorizacion);
|
||||||
|
if(vSeleccion.size() > 0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<table>
|
||||||
|
<tr><td class="txt">Autorización</td><td class="txt">Acto</td><td class="txt">Especialidad</td><td class="txt">Cantidad</td></tr>
|
||||||
|
<%
|
||||||
|
for(int i=0;i<vSeleccion.size();i++)
|
||||||
|
{
|
||||||
|
Taconaut tacon = new Taconaut();
|
||||||
|
tacon = (Taconaut)vSeleccion.get(i);
|
||||||
|
int gesigu = 0;
|
||||||
|
if(tacon.getFromGesigu())
|
||||||
|
gesigu = 1;
|
||||||
|
|
||||||
|
if(pertacon.CrearAutorizacionValida(Long.parseLong(tacon.getAutorizacion()), tacon.getMedico(), tacon.getEspecialidad(), tacon.getActo(), tacon.getCantidad(), gesigu, ""))
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<form name="actualizar_autorizacion" action="<%=request.getContextPath()%>/servlet/GestorAdministracion?x=<%=strParametroMenu%>&pagina=1&imp=0" method="post">
|
||||||
|
<tr><td class="txt"><%=tacon.getAutorizacion() %></td><td class="txt"><%=tacon.getActo() %></td><td class="txt"><%=tacon.getEspecialidad() %></td><td class="txt"><input type="text" name="cantidad" id="cantidad" value="<%=tacon.getCantidad() %>"/></td><td class="txt"><a href="javascript:actualizar()" class="enlace">Actualizar</as></td></tr>
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_ACT_AUTORIZACION %>"/>
|
||||||
|
<input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>"/>
|
||||||
|
<input type="hidden" name="acto" value="<%=tacon.getActo() %>"/>
|
||||||
|
<input type="hidden" name="especialidad" value="<%=tacon.getEspecialidad() %>"/>
|
||||||
|
</form>
|
||||||
|
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="movimientos_autorizacion" action="movimientos_tamovext.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Movimientos imputados a esta autorizacion" class="enlace"></form></td></tr>
|
||||||
|
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="otras_autorizaciones" action="otras_autorizaciones.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Otras Autorizaciones del asegurado" class="enlace"></form></td></tr>
|
||||||
|
<tr><td></td><td></td><td></td><td></td>
|
||||||
|
<td class="txt">
|
||||||
|
<%
|
||||||
|
String resultado = ""+tacon.getAutorizacion();
|
||||||
|
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
|
||||||
|
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="Imprimir Petición" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fichero = new File(ParametrosConfiguracion.ruta_pdf+Integer.valueOf(tacon.getAutorizacion()).toString()+".PDF");
|
||||||
|
if(fichero.exists())
|
||||||
|
{
|
||||||
|
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
|
||||||
|
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
|
||||||
|
<input type="submit" value="Imprimir Petición" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%><p><%=pertamensaje.obtenerMensaje(15).getMensaje() %></p><%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td class="txt"><%=pertamensaje.obtenerMensaje(14).getMensaje() %></td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td class="txt"><%=pertamensaje.obtenerMensaje(13).getMensaje() %></td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td class="txt"><%=mensaje %></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, "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, "Final página de mantenimiento de autorizaciones (adm/mto_taconaut.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,453 @@
|
|||||||
|
<%@ 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, "Inicio página de de mantenimiento de actos imputados (adm/mto_tamovext.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
|
||||||
|
{
|
||||||
|
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 = "";
|
||||||
|
int CampoMedico = 0;
|
||||||
|
String CampoFecha = "";
|
||||||
|
String CampoApellido1 = "";
|
||||||
|
String CampoApellido2 = "";
|
||||||
|
String CampoNombre = "";
|
||||||
|
int intPagina = 0;
|
||||||
|
int intEliminar = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[] = null;
|
||||||
|
|
||||||
|
//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 medico para las busquedas
|
||||||
|
if (request.getParameter("medico")!=null)
|
||||||
|
CampoMedico = Integer.parseInt(request.getParameter("medico"));
|
||||||
|
|
||||||
|
//parametro fecha para las busquedas
|
||||||
|
if (request.getParameter("fecha")!=null)
|
||||||
|
CampoFecha = (String)request.getParameter("fecha");
|
||||||
|
|
||||||
|
//parametro apellido1 para las busquedas
|
||||||
|
if (request.getParameter("apellido1")!=null)
|
||||||
|
CampoApellido1 = (String)request.getParameter("apellido1");
|
||||||
|
|
||||||
|
//parametro apellido2 para las busquedas
|
||||||
|
if (request.getParameter("apellido2")!=null)
|
||||||
|
CampoApellido2 = (String)request.getParameter("apellido2");
|
||||||
|
|
||||||
|
//parametro nombre para las busquedas
|
||||||
|
if (request.getParameter("nombre")!=null)
|
||||||
|
CampoNombre = (String)request.getParameter("nombre");
|
||||||
|
|
||||||
|
//parametro pagina para realizar la paginacion
|
||||||
|
if (request.getParameter("pagina")!=null)
|
||||||
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||||
|
|
||||||
|
//parametro eliminar para eliminar un movimiento de tamovext
|
||||||
|
if (request.getParameter("eliminar")!=null)
|
||||||
|
intEliminar=Integer.parseInt(request.getParameter("eliminar"));
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento autorizaciones</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||||
|
<script language="JavaScript" src="../../js/inicio_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" src="../../js/menu_adm.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 pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value = campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
pasarAMayusculas(document.frm_buscar.apellido1);
|
||||||
|
pasarAMayusculas(document.frm_buscar.apellido2);
|
||||||
|
pasarAMayusculas(document.frm_buscar.nombre);
|
||||||
|
var fechaBuena = true;
|
||||||
|
|
||||||
|
if(document.frm_buscar.medico.value.length == 0)
|
||||||
|
{
|
||||||
|
alert("Introduce un numero de medico");
|
||||||
|
document.frm_buscar.medico.focus();
|
||||||
|
fechaBuena = false;
|
||||||
|
}
|
||||||
|
else if(isNaN(document.frm_buscar.medico.value))
|
||||||
|
{
|
||||||
|
alert("Solo puede introducir números en el campo médico");
|
||||||
|
document.frm_buscar.medico.value = "";
|
||||||
|
document.frm_buscar.medico.focus();
|
||||||
|
fechaBuena = false;
|
||||||
|
}
|
||||||
|
else if (document.frm_buscar.fecha.value!="")
|
||||||
|
{
|
||||||
|
fechaBuena = valorFecha(document.frm_buscar.fecha);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fechaBuena){
|
||||||
|
document.frm_buscar.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frm_buscar.pagina.value = pagina;
|
||||||
|
document.frm_buscar.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function enfocar()
|
||||||
|
{
|
||||||
|
document.frm_buscar.medico.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminar(medico,fecha,acto,ape1,ape2,nom,espe,numseq,col,pol,orden)
|
||||||
|
{
|
||||||
|
if (confirm("Desea eliminaar el acto seleccionado? \n Medico: "+ medico +" -- Acto: "+ acto +" -- Fecha: "+ fecha +" \n Asegurado: "+ ape1.trim() +" "+ ape2.trim() +", "+ nom.trim())) {
|
||||||
|
document.frm_buscar.eliminar.value=1;
|
||||||
|
document.frm_buscar.hiddenMedico.value=medico;
|
||||||
|
document.frm_buscar.hiddenEspecialidad.value=espe;
|
||||||
|
document.frm_buscar.hiddenActo.value=acto;
|
||||||
|
document.frm_buscar.hiddenNumseq.value=numseq;
|
||||||
|
document.frm_buscar.hiddenColectivo.value=col;
|
||||||
|
document.frm_buscar.hiddenPoliza.value=pol;
|
||||||
|
document.frm_buscar.hiddenOrden.value=orden;
|
||||||
|
document.frm_buscar.hiddenFecha.value=fecha;
|
||||||
|
document.frm_buscar.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
|
||||||
|
<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="190px"></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%">
|
||||||
|
<%
|
||||||
|
if (intEliminar == 1)
|
||||||
|
{
|
||||||
|
int intMedico=Integer.parseInt(request.getParameter("hiddenMedico"));
|
||||||
|
int intActo=Integer.parseInt(request.getParameter("hiddenActo"));
|
||||||
|
int intEspe=Integer.parseInt(request.getParameter("hiddenEspecialidad"));
|
||||||
|
int intNumseq=Integer.parseInt(request.getParameter("hiddenNumseq"));
|
||||||
|
int intColec=Integer.parseInt(request.getParameter("hiddenColectivo"));
|
||||||
|
int intPoliza=Integer.parseInt(request.getParameter("hiddenPoliza"));
|
||||||
|
int intOrden=Integer.parseInt(request.getParameter("hiddenOrden"));
|
||||||
|
String strFecha=(String)(request.getParameter("hiddenFecha"));
|
||||||
|
|
||||||
|
PersistenciaTamovext pert = new PersistenciaTamovext();
|
||||||
|
boolean resultado = false;
|
||||||
|
resultado = pert.EliminarMovimientoImputado(intMedico, intEspe, intActo, intNumseq, intColec, intPoliza, intOrden, strFecha);
|
||||||
|
intEliminar=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
<form name="frm_buscar" action="mto_tamovext.jsp?x=<%=strParametroMenu%>" method="post" >
|
||||||
|
<input type="hidden" name="pagina" value="1" />
|
||||||
|
<input type="hidden" name="eliminar" value="0" />
|
||||||
|
<input type="hidden" name="hiddenMedico" value="0" />
|
||||||
|
<input type="hidden" name="hiddenEspecialidad" value="0" />
|
||||||
|
<input type="hidden" name="hiddenActo" value="0" />
|
||||||
|
<input type="hidden" name="hiddenNumseq" value="0" />
|
||||||
|
<input type="hidden" name="hiddenColectivo" value="0" />
|
||||||
|
<input type="hidden" name="hiddenPoliza" value="0" />
|
||||||
|
<input type="hidden" name="hiddenOrden" value="0" />
|
||||||
|
<input type="hidden" name="hiddenFecha" value="0" />
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(25).getMensaje() %></span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="fecha" name="fecha" <%if(CampoFecha!="" ){%>value="<%=CampoFecha %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(26).getMensaje() %></label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="apellido1" name="apellido1" <%if(CampoApellido1!=""){%>value="<%=CampoApellido1 %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(27).getMensaje() %></label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="apellido2" name="apellido2" <%if(CampoApellido2!=""){%>value="<%=CampoApellido2 %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(28).getMensaje() %></label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="nombre" name="nombre" <%if(CampoNombre!=""){%>value="<%=CampoNombre %>"<%}%>/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right">
|
||||||
|
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<%if(CampoMedico > 0)
|
||||||
|
{
|
||||||
|
PersistenciaTamovext per = new PersistenciaTamovext();
|
||||||
|
Vector<Object[]> vSeleccion = per.MovimientosImputados(intPagina,CampoMedico,CampoFecha,CampoApellido1,CampoApellido2,CampoNombre);
|
||||||
|
if(vSeleccion.size()>0)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Los movimientos del medico "+CampoMedico+" estan en tamovext");
|
||||||
|
%>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<%if (intPagina != 0){ %>
|
||||||
|
<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">Médico</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Asegurado</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";
|
||||||
|
}
|
||||||
|
|
||||||
|
Object[] aResultados = vSeleccion.elementAt(i);
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td class="<%=estilo%>" align="center"><%= aResultados[0] %></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%= aResultados[1] %> </td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%= aResultados[2] %></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%= aResultados[4] +" "+ aResultados[5] +", "+ aResultados[6]%> </td>
|
||||||
|
<%if ((Integer.valueOf(aResultados[3].toString())) != 32){ %>
|
||||||
|
<td class="<%=estilo%>" align="center"><a href="javascript:eliminar(<%= aResultados[0] %>,'<%= aResultados[1] %>',<%= aResultados[2] %>,'<%= aResultados[4] %>','<%= aResultados[5] %>','<%= aResultados[6] %>',<%= aResultados[7] %>,<%= aResultados[8] %>,<%= aResultados[9] %>,<%= aResultados[10] %>,<%= aResultados[11] %>)" class="enlace">Eliminar</a></td>
|
||||||
|
<% }else { %>
|
||||||
|
<td class="<%=estilo%>" align="center">Adeslas</td>
|
||||||
|
<%} %>
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
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) %>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td class="txtnegrita"><%=pertamensaje.obtenerMensaje(29).getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</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, "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, "Final página de mantenimiento de actos imputados (adm/mto_tamovext.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
<%@ 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 de mantenimiento de autorizaciones (adm/movimientos_tamovext.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
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Obtención del perfil del usuario conectado
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Llega 27");
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu = "";
|
||||||
|
String mensaje = "";
|
||||||
|
long CampoAutorizacion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[] = null;
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Llega 40");
|
||||||
|
//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 apellido para las busquedas
|
||||||
|
if (request.getParameter("num_aut")!=null)
|
||||||
|
CampoAutorizacion = Long.parseLong(request.getParameter("num_aut"));
|
||||||
|
|
||||||
|
//parametro pagina para realizar la paginacion
|
||||||
|
if (request.getParameter("pagina")!=null)
|
||||||
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||||
|
|
||||||
|
if(sesion.getAttribute("MENSAJE")!=null)
|
||||||
|
{
|
||||||
|
mensaje=(String)sesion.getAttribute("MENSAJE");
|
||||||
|
sesion.removeAttribute("MENSAJE");
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Llega 62");
|
||||||
|
|
||||||
|
boolean mostrarNoticia = true;
|
||||||
|
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||||
|
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||||
|
Vector vNoticias = new Vector();
|
||||||
|
String strNoticia = "";
|
||||||
|
String noticias ="";
|
||||||
|
String espacio = "";
|
||||||
|
for(int x = 0; x < 100; x++){
|
||||||
|
espacio = espacio + " ";
|
||||||
|
}
|
||||||
|
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 + espacio + tanoticia.getNoticia();
|
||||||
|
}else{
|
||||||
|
strNoticia = tanoticia.getNoticia();
|
||||||
|
}
|
||||||
|
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento autorizaciones</title>
|
||||||
|
<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_adm.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 buscar(aut)
|
||||||
|
{
|
||||||
|
document.frm_buscar.autorizacion.value = aut;
|
||||||
|
document.frm_buscar.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 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="190px"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||||
|
<%PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut();
|
||||||
|
Vector resul = perttmov.ObtenerAutorizacionesPoliza(CampoAutorizacion);
|
||||||
|
%>
|
||||||
|
<form name="frm_buscar" action="mto_taconaut.jsp?x=<%=strParametroMenu%>" method="post" ><input type="hidden" class="txt" id="autorizacion" name="autorizacion" value=""/></form>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<%
|
||||||
|
if(resul != null)
|
||||||
|
{
|
||||||
|
if(resul.size()>0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td class="txt">Autorizacion</td><td class="txt">Fecha</td><td class="txt">Especialidad</td><td class="txt">Médico</td><td class="txt">Detalles</td></tr>
|
||||||
|
<%
|
||||||
|
for(int i=0; i<resul.size();i++)
|
||||||
|
{
|
||||||
|
TTMovaut ttmov = new TTMovaut();
|
||||||
|
ttmov = perttmov.ObtenerAutorizacionTTmovaut((Integer)resul.get(i));
|
||||||
|
%>
|
||||||
|
<tr><td class="txt"><%=ttmov.get_autorizacion() %></td><td class="txt"><%=Utilidades.formatear_fecha(ttmov.get_fecha_autorizacion()) %></td><td class="txt"><%=ttmov.get_especialidad1() %></td><td class="txt"><%=ttmov.get_medico() %></td><td class="txt"><a href="javascript:buscar(<%=ttmov.get_autorizacion() %>)" class="enlace">Ver</a></td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td class="txt">No se han encontrado autorizaciones <br/>para este asegurado</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, "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, "Final página de mantenimiento de autorizaciones (adm/movimientos_tamovext.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,236 @@
|
|||||||
|
<%@ 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.BufferedWriter" %>
|
||||||
|
<%@ page import="java.io.File" %>
|
||||||
|
<%@ page import="java.io.FileWriter" %>
|
||||||
|
<%@ page import="java.io.IOException" %>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de poner cambios en producción (adm/poner_en_produccion.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
|
||||||
|
{
|
||||||
|
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 = "";
|
||||||
|
int intCrearArchivo = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
int intMensaje = 0;
|
||||||
|
String strMensaje = "";
|
||||||
|
|
||||||
|
//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 crearArchivo
|
||||||
|
if (request.getParameter("crearArchivo")!=null)
|
||||||
|
intCrearArchivo=Integer.parseInt(request.getParameter("crearArchivo"));
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Lo pongo a false para que no salga la noticia
|
||||||
|
mostrarNoticia = false;
|
||||||
|
|
||||||
|
if (intCrearArchivo==1){
|
||||||
|
|
||||||
|
String ruta = "/tmp/ponerCambios/semaforo.txt";
|
||||||
|
File archivo = new File(ruta);
|
||||||
|
BufferedWriter bw;
|
||||||
|
if(archivo.exists()) {
|
||||||
|
intMensaje = 1;
|
||||||
|
strMensaje = "¡El archivo ya existe!";
|
||||||
|
} else {
|
||||||
|
bw = new BufferedWriter(new FileWriter(archivo));
|
||||||
|
bw.write("Este archivo indica que hay cambios para poner en Tarisan. ");
|
||||||
|
bw.write("Por la noche se ejecutará un corntab que subirá los cambios a producción. ");
|
||||||
|
bw.write("El crontab ejecuta /root/tarisan_en_produccion_crontab.sh");
|
||||||
|
bw.close();
|
||||||
|
intMensaje = 1;
|
||||||
|
strMensaje = "¡Archivo creado correctamente!";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Mantenimiento de Analíticas</title>
|
||||||
|
<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_adm.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 pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value = campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
function ponerCambios()
|
||||||
|
{
|
||||||
|
document.frmCrearArchivo.crearArchivo.value=1;
|
||||||
|
document.frmCrearArchivo.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 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 width="565">
|
||||||
|
<form name="frmCrearArchivo" action="<%=request.getContextPath()%>/jsp/adm/poner_en_produccion.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="crearArchivo" value="">
|
||||||
|
</form>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC" height="50px"></td>
|
||||||
|
<td colspan="2" align="center"><h4 style="color:#43881A"><b>PONER CAMBIOS EN PRODUCCIÓN</b></h4></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC" height="30px"></td>
|
||||||
|
<td colspan="2" align="center"><p style="color:#666666;font-size: small;">Genera el archivo <b>/tmp/ponerCambios/semaforo.txt</b>. Hay un crontab que se ejecuta cada noche y sube los cambios simepre que encuentre el archivo.</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||||
|
<td colspan="2" align="center"><p style="color:#666666;font-size: small;">El crontab ejecuta el archivo <b>/root/tarisan_en_produccion_crontab.sh</b></p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC" height="80px"></td>
|
||||||
|
<td colspan="2" align="center"><input type="button" name="btnPonerCambios" value='Activar Semáforo' onclick="javascript:ponerCambios()"></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
if (intMensaje == 1){
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC" height="80px"></td>
|
||||||
|
<td colspan="2" align="center"><p class="franquicias"><%=strMensaje %></p></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, "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, "Final página de poner cambios en producción (adm/poner_en_produccion.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
<%@ 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.*" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
int usuario = 0;
|
||||||
|
String strusu = "";
|
||||||
|
|
||||||
|
//parametro usuario
|
||||||
|
strusu = sesion.getAttribute("U").toString();
|
||||||
|
usuario = Integer.parseInt(strusu);
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Simulación usuarios</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="<%=request.getContextPath() %>/css/jquery.modal.css">
|
||||||
|
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/menu_adm.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" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
|
||||||
|
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
|
||||||
|
function entrar()
|
||||||
|
{
|
||||||
|
if(document.frm_simular.USUARIO.value.length == 0)
|
||||||
|
{
|
||||||
|
//alert("Introduce un numero de medico o pulse en Cancelar");
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'Introduce un numero de medico o pulse en Cancelar.',});
|
||||||
|
document.frm_simular.USUARIO.focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frm_simular.SIMULADO.value=1;
|
||||||
|
document.frm_simular.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function cancelar()
|
||||||
|
{
|
||||||
|
document.frm_simular.USUARIO.value=<%= usuario%>;
|
||||||
|
document.frm_simular.SIMULADO.value=0;
|
||||||
|
document.frm_simular.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function volver()
|
||||||
|
{
|
||||||
|
document.frm_volver.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function SePulsaEnter(event) {
|
||||||
|
if (event.which == 13 && !event.shiftKey) {
|
||||||
|
event.preventDefault();
|
||||||
|
entrar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frm_simular.USUARIO.focus();" style="background-color:#FFFFFF">
|
||||||
|
<div style="width:250px; margin:0 auto; margin-top:30px; border:1px solid rgb(192, 35, 49);">
|
||||||
|
<table border="0" align="center" width="100%" >
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center">SIMULACIÓN DE USUARIOS</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<form name="frm_simular" action="../../servlet/Login" method="post" >
|
||||||
|
<input type="hidden" name="SIMULADO" id="SIMULADO" value="1">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<span class="txtnegrita">Usuario:</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input size="20" type="text" class="txt" id="USUARIO" name="USUARIO" value="" onkeypress="SePulsaEnter(event)"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"></td>
|
||||||
|
<td align="right">
|
||||||
|
<a href="javascript:entrar()" class="enlace">Entrar</a> <a href="javascript:volver()" class="enlace">Cancelar</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<form name="frm_volver" action="../../html/login.html" method="post" >
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -0,0 +1,178 @@
|
|||||||
|
<%@ 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" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
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, "Sesion invalidada");
|
||||||
|
response.sendRedirect("../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio pagina de cambio de clave (cambio_clave.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
Tamensaje tamensaje = new Tamensaje();
|
||||||
|
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Cambio 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/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="../js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="../js/bloques_tarisan.js"></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ía o contiene únicamente espacios en blanco. Introduzca una clave válida.");
|
||||||
|
frmClave.clave_nueva.value="";
|
||||||
|
frmClave.confirmar_clave.value="";
|
||||||
|
frmClave.clave_nueva.focus();
|
||||||
|
blnFormularioValido=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//comprobamos que el tamaño de la clave nueva no sea < 6
|
||||||
|
if (blnFormularioValido && frmClave.clave_nueva.value.length<6)
|
||||||
|
{
|
||||||
|
alert("La clave debe tener como mínimo 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.");
|
||||||
|
frmClave.clave_nueva.value="";
|
||||||
|
frmClave.confirmar_clave.value="";
|
||||||
|
frmClave.clave_nueva.focus();
|
||||||
|
blnFormularioValido=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blnFormularioValido)
|
||||||
|
document.frmClave.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="document.frmClave.clave_nueva.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>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- Cuerpo de la pagina //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr valign="top">
|
||||||
|
<!--<td width="180">//-->
|
||||||
|
<td width="5%">
|
||||||
|
<!-- Menu de navegacion del modulo (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>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOff"><b>CLAVE DE ACCESO</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td><img src="../img/sp.gif" width="14" height="261" border="0"></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 pagina (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="90px"></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"> </td></tr>
|
||||||
|
<tr><td colspan="2" class="txtnegrita" align="center">Por favor introduzca su nueva clave de acceso</td></tr>
|
||||||
|
<tr><td colspan="2"> </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 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_nueva.focus()" class="enlace">Deshacer</a> <a href="javascript:enviar()" class="enlace">Aceptar</a> <a href="javascript:history.back();" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ACTUALIZAR_ACCESO%>">
|
||||||
|
</form>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentacion de la pagina al usuario.");
|
||||||
|
response.sendRedirect("./error.jsp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final pagina de cambio de clave (cambio_clave.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
|
||||||
|
<%@ page import="java.awt.Button" %>
|
||||||
|
<%@ page import="java.awt.Color" %>
|
||||||
|
<%@ page import="java.awt.Font" %>
|
||||||
|
<%@ page import="java.awt.Frame" %>
|
||||||
|
<%@ page import="java.awt.GraphicsEnvironment" %>
|
||||||
|
<%@ page import="java.awt.GraphicsConfiguration" %>
|
||||||
|
<%@ page import="java.awt.GraphicsDevice" %>
|
||||||
|
<%@ page import="java.awt.GraphicsConfigTemplate" %>
|
||||||
|
<%@ page import="java.awt.TextField" %>
|
||||||
|
|
||||||
|
<%@ page import="javax.swing.JFrame" %>
|
||||||
|
<%@ page import="java.awt.Canvas" %>
|
||||||
|
<%@ page import="java.awt.Rectangle" %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Entorno gráfico</title>
|
||||||
|
</head>
|
||||||
|
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="ffffff">
|
||||||
|
|
||||||
|
<%
|
||||||
|
Date fecha = new Date();
|
||||||
|
Calendar calendario = Calendar.getInstance();
|
||||||
|
calendario.setTime(fecha);
|
||||||
|
|
||||||
|
String dia = String.valueOf(calendario.get(Calendar.DATE));
|
||||||
|
if(dia.length() == 1)
|
||||||
|
{
|
||||||
|
dia = "0" + dia;
|
||||||
|
}
|
||||||
|
String mes = String.valueOf(calendario.get(Calendar.MONTH) + 1);
|
||||||
|
if(mes.length() == 1)
|
||||||
|
{
|
||||||
|
mes = "0" + mes;
|
||||||
|
}
|
||||||
|
String ano = String.valueOf(calendario.get(Calendar.YEAR));
|
||||||
|
String hora = String.valueOf(calendario.get(Calendar.HOUR_OF_DAY));
|
||||||
|
if(hora.length() == 1)
|
||||||
|
{
|
||||||
|
hora = "0" + hora;
|
||||||
|
}
|
||||||
|
String minutos = String.valueOf(calendario.get(Calendar.MINUTE));
|
||||||
|
if(minutos.length() == 1)
|
||||||
|
{
|
||||||
|
minutos = "0" + minutos;
|
||||||
|
}
|
||||||
|
String segundos = String.valueOf(calendario.get(Calendar.SECOND));
|
||||||
|
if(segundos.length() == 1)
|
||||||
|
{
|
||||||
|
segundos = "0" + segundos;
|
||||||
|
}
|
||||||
|
|
||||||
|
out.print("<hr>");
|
||||||
|
out.print("Fecha = " + dia + "/" + mes + "/" + ano);
|
||||||
|
out.print(" ");
|
||||||
|
out.print("Hora = " + hora + ":" + minutos + ":" + segundos);
|
||||||
|
out.print("<hr>");
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
<b><i><font size="+1">Entorno gráfico</font></i></b>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
|
||||||
|
out.println("<font size=\"-1\"><ul>");
|
||||||
|
out.println("<li><b>awt.toolkit: </b>" + System.getProperties().get("awt.toolkit"));
|
||||||
|
out.println("<li><b>java.awt.graphicsenv: </b>" + System.getProperties().get("java.awt.graphicsenv"));
|
||||||
|
|
||||||
|
out.println("</ul></font>");
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
out.println("<font size=\"-1\"><ul>");
|
||||||
|
|
||||||
|
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||||
|
out.println("<li><b>GraphicsEnvironment </b>--> " + ge);
|
||||||
|
out.println("</ul></font>");
|
||||||
|
|
||||||
|
GraphicsDevice gd = ge.getDefaultScreenDevice();
|
||||||
|
out.println("<font size=\"-1\"><ul>");
|
||||||
|
out.println("<li><b>GraphicsDevice default</b>--> " + gd);
|
||||||
|
out.println("</ul></font>");
|
||||||
|
|
||||||
|
GraphicsDevice[] gds = ge.getScreenDevices();
|
||||||
|
GraphicsConfiguration[] gc = null;
|
||||||
|
GraphicsConfiguration bestGc = null;
|
||||||
|
out.println("<font size=\"-1\"><ul>");
|
||||||
|
for(int i = 0; i < gds.length; i++)
|
||||||
|
{
|
||||||
|
out.println("<li><b>GraphicsDevice[" + i + "] </b>--> " + gds[i] + "; getType()=" + gds[i].getType() + "; getIDstring()=" + gds[i].getIDstring());
|
||||||
|
gc = gds[i].getConfigurations();
|
||||||
|
out.println("<font size=\"-1\"><ul>");
|
||||||
|
for(int j = 0; j < gc.length; j++)
|
||||||
|
{
|
||||||
|
out.println("<li><b>GraphicsConfiguration[" + j + "] </b>--> " + gc[j] + "; getColorModel()=" + gc[j].getColorModel() + "; getDevice()=" + gc[j].getDevice());
|
||||||
|
}
|
||||||
|
out.println("<li><b>GraphicsConfiguration default </b>--> " + gds[i].getDefaultConfiguration());
|
||||||
|
out.println("</ul></font>");
|
||||||
|
}
|
||||||
|
out.println("</ul></font>");
|
||||||
|
|
||||||
|
Font[] fuentes = ge.getAllFonts();
|
||||||
|
out.println("<font size=\"-1\"><ul>");
|
||||||
|
for(int i = 0; i < fuentes.length; i++)
|
||||||
|
{
|
||||||
|
out.println("<li><b>Fuente[" + i + "] </b>--> nombre:" + fuentes[i].getFontName() + ", familia " + fuentes[i].getFamily());
|
||||||
|
}
|
||||||
|
out.println("</ul></font>");
|
||||||
|
|
||||||
|
String[] familias = ge.getAvailableFontFamilyNames();
|
||||||
|
out.println("<font size=\"-1\"><ul>");
|
||||||
|
for(int i = 0; i < familias.length; i++)
|
||||||
|
{
|
||||||
|
out.println("<li><b>Familia[" + i + "] </b>--> " + familias[i]);
|
||||||
|
}
|
||||||
|
out.println("</ul></font>");
|
||||||
|
}
|
||||||
|
catch(Throwable ex)
|
||||||
|
{
|
||||||
|
out.println("<li><b>Excepción en manejo de entorno gráfico:</b> " + ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
out.println("<hr>");
|
||||||
|
out.println("</b>Prueba de clases de java.awt</b>");
|
||||||
|
out.println("<font size=\"-1\"><ul>");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Color color = new Color(100, 125, 12);
|
||||||
|
out.println("<li>Color --> " + color);
|
||||||
|
}
|
||||||
|
catch(Throwable ex)
|
||||||
|
{
|
||||||
|
out.println("<li>Excepción en Color --> " + ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Frame ventana = new Frame("ventana de prueba");
|
||||||
|
out.println("<li>Frame --> " + ventana);
|
||||||
|
}
|
||||||
|
catch(Throwable ex)
|
||||||
|
{
|
||||||
|
out.println("<li>Excepción en Frame --> " + ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Button boton = new Button("botón de prueba");
|
||||||
|
out.println("<li>Button --> " + boton);
|
||||||
|
}
|
||||||
|
catch(Throwable ex)
|
||||||
|
{
|
||||||
|
out.println("<li>Excepción en Button --> " + ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Font fuente = new Font("LucidaSansRegular", Font.PLAIN, 12);
|
||||||
|
out.println("<li>Fuente --> " + fuente);
|
||||||
|
}
|
||||||
|
catch(Throwable ex)
|
||||||
|
{
|
||||||
|
out.println("<li>Excepción en Font --> " + ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TextField campo = new TextField("campo de texto");
|
||||||
|
out.println("<li>TextField --> " + campo);
|
||||||
|
}
|
||||||
|
catch(Throwable ex)
|
||||||
|
{
|
||||||
|
out.println("<li>Excepción en TextField --> " + ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
out.println("</ul></font>");
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,247 @@
|
|||||||
|
<%@ page import="com.tarisan.data.Usuario" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de error (error.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("ERROR") == 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 error (error.jsp)");
|
||||||
|
|
||||||
|
String mensaje = null;
|
||||||
|
String vuelta = null;
|
||||||
|
String vuelta_dental = null;
|
||||||
|
String destino = null;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
vuelta = (String)sesion.getAttribute("VUELTA");
|
||||||
|
if(vuelta == null)
|
||||||
|
{
|
||||||
|
destino = "javascript:history.back();";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
destino = "../jsp/pac/facturacion_odon.jsp?x=1&pagina=1";
|
||||||
|
}
|
||||||
|
vuelta_dental = (String)sesion.getAttribute("VUELTA_DENTAL");
|
||||||
|
if(vuelta_dental == null)
|
||||||
|
{
|
||||||
|
destino = "javascript:history.back();";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
destino = "../jsp/pac/estomatologia.jsp?x=1&pagina=1";
|
||||||
|
}
|
||||||
|
|
||||||
|
Usuario usuario = (Usuario)sesion.getAttribute("USUARIO");
|
||||||
|
|
||||||
|
Tamensaje tamensaje = new Tamensaje();
|
||||||
|
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||||
|
|
||||||
|
boolean mostrarNoticia = true;
|
||||||
|
String strNoticia = "";
|
||||||
|
if(usuario == null)
|
||||||
|
{
|
||||||
|
mostrarNoticia = false;
|
||||||
|
}else{
|
||||||
|
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||||
|
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||||
|
Vector vNoticias = new Vector();
|
||||||
|
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>Error en Tarisan</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/bloques_tarisan.js"></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>
|
||||||
|
<%
|
||||||
|
if(usuario == null)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="tituloTablaMedico" align="center"> </td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="tituloTablaMedico" align="center"><%= 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>
|
||||||
|
<!-- Logotipo de IMQ de Navarra
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>//-->
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if(usuario == null)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="tituloTabla" align="center"> </td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="tituloTabla" align="center"><%= usuario %></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></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>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOff"><b>MENSAJE</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td><img src="../img/sp.gif" width="14" height="261" border="0"></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"></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%">
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td class="txtnegrita" align="center"><%= mensaje %></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="txt" align="center">Contacte con el administrador del sistema</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="<%=destino %>" 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, "Final página de error (error.jsp)");
|
||||||
|
%>
|
||||||
|
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
<%@ page import="com.tarisan.data.Usuario" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de error (errorIguala.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("ERROR") == 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 error (errorIguala.jsp)");
|
||||||
|
|
||||||
|
String mensaje = null;
|
||||||
|
|
||||||
|
Tamensaje tamensaje = new Tamensaje();
|
||||||
|
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||||
|
|
||||||
|
mensaje = (String)sesion.getAttribute("ERROR");
|
||||||
|
if(mensaje == null || (mensaje.trim().compareTo("") == 0))
|
||||||
|
{
|
||||||
|
mensaje = pertamensaje.obtenerMensaje(12).getMensaje() ;
|
||||||
|
}
|
||||||
|
sesion.removeAttribute("ERROR");
|
||||||
|
|
||||||
|
Usuario usuario = (Usuario)sesion.getAttribute("USUARIO");
|
||||||
|
|
||||||
|
boolean mostrarNoticia = true;
|
||||||
|
String strNoticia = "";
|
||||||
|
if(usuario == null)
|
||||||
|
{
|
||||||
|
mostrarNoticia = false;
|
||||||
|
}else{
|
||||||
|
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||||
|
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||||
|
Vector vNoticias = new Vector();
|
||||||
|
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>Error en Tarisan</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/bloques_tarisan.js"></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>
|
||||||
|
<%
|
||||||
|
if(usuario == null)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="tituloTablaMedico" align="center"> </td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="tituloTablaMedico" align="center"><%= 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>
|
||||||
|
<!-- Logotipo de IMQ de Navarra
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>//-->
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if(usuario == null)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="tituloTabla" align="center"> </td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="tituloTabla" align="center"><%= usuario %></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></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>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOff"><b>MENSAJE</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td><img src="../img/sp.gif" width="14" height="261" border="0"></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 class="txt" valign="top">
|
||||||
|
<img src="../img/sp.gif" width="1" height="11" border="0"><br>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td class="txtnegrita" align="center"><%= mensaje %></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="txt" align="center"><%=pertamensaje.obtenerMensaje(32).getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><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, "Final página de error (errorIguala.jsp)");
|
||||||
|
%>
|
||||||
|
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.util.GregorianCalendar" %>
|
||||||
|
<%@ page import="java.util.TimeZone" %>
|
||||||
|
<%@ page import="java.util.*" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
Date fecha = new Date();
|
||||||
|
Calendar calendario = Calendar.getInstance();
|
||||||
|
calendario.setTime(fecha);
|
||||||
|
java.util.TimeZone tZone = TimeZone.getTimeZone("Europe/Madrid");
|
||||||
|
tZone.setID("Europe/Madrid");
|
||||||
|
tZone.setDefault(tZone);
|
||||||
|
Locale loCurrentLocale = new Locale("ES", "ES");
|
||||||
|
GregorianCalendar gcHoy = new GregorianCalendar( tZone, loCurrentLocale);
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Control de Horas</title>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
var hora_actual = new Date()
|
||||||
|
|
||||||
|
hora = hora_actual.getHours();
|
||||||
|
minutos = hora_actual.getMinutes();
|
||||||
|
if (hora<10)
|
||||||
|
hora="0"+hora;
|
||||||
|
if (minutos<10)
|
||||||
|
minutos="0"+minutos;
|
||||||
|
|
||||||
|
|
||||||
|
document.write("<b>Hora de JavaScript: </b>");
|
||||||
|
document.write(hora+":"+minutos)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<b>Hora del Calendar: </b><%=calendario.getTime()%>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<b>Hora del Calendar (con TimeZone): </b><%=calendario.getTime()%>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<b>Hora del Date: </b><%=fecha%>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
<%@ page import="com.tarisan.control.ParametrosConfiguracion" %>
|
||||||
|
<%@ page import="com.tarisan.data.Paciente" %>
|
||||||
|
<%@ page import="com.tarisan.data.Usuario" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de peticion de autorizacion (imp/impAutorizacion.jsp)");
|
||||||
|
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
String strAutorizacion = (String)request.getParameter("autorizacion");
|
||||||
|
String strCentro = (String)request.getParameter("centro");
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Impresión Autorización</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
|
||||||
|
var strInforme = top.self.opener.obtenerInformePrescripcion();
|
||||||
|
var texto="<table border='0' width='100%' cellpadding='5' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td width='2%' class='txtImpresion'> </td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td width='2%' class='txtImpresion'> </td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strInforme!="")
|
||||||
|
{
|
||||||
|
texto += "<tr><td width='2%' class='txtImpresion' colspan='2'> </td></tr>";
|
||||||
|
texto += "<tr><td class='txtImpresion'> </td><td class='txtImpresion'>" + strInforme + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table width="100%" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table width="100%" border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><hr width="100%"></hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" nowrap>Nº de póliza:</td>
|
||||||
|
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
|
||||||
|
<td class="txtImpresion"> </td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
|
||||||
|
<td colspan="3">
|
||||||
|
<table border="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion">Nº Solicitud:</td>
|
||||||
|
<td class="txtImpresion"><%=strAutorizacion%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="txtImpresion"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="left" class="txtImpresion">Ruego faciliten las siguientes autorizaciones:</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion"><%=strCentro%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
escribirListaElementos();
|
||||||
|
imprimirHTML();
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
%>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de peticion de autorizacion (imp/impAutorizacion.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de pacientes (imp/impDetallePacientes.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");
|
||||||
|
%>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion_sesion.html';
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
|
||||||
|
String strFecha = (String)request.getParameter("fecha");
|
||||||
|
String[] arrFecha = strFecha.split("-");
|
||||||
|
java.sql.Date dtFecha = new java.sql.Date(java.sql.Date.valueOf(arrFecha[2] + "-" + arrFecha[1] + "-" + arrFecha[0]).getTime());
|
||||||
|
double dblImporteTotal=0;
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Impresión Detalle Pacientes</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table width="100%" border="0" cellpadding="5">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" colspan="3"><hr width="100%"></hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" colspan="3" align="left">--- RELAción ACTOS MédicoS REALIZADOS ---</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<table border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion">FECHA:</td>
|
||||||
|
<td class="txtImpresion"><%=strFecha%></td>
|
||||||
|
<td class="txtImpresion"> </td>
|
||||||
|
<td class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" colspan="3"><hr width="100%"></hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" align="left">Nombre Paciente</td>
|
||||||
|
<td class="txtImpresion" align="left">Acto realizado</td>
|
||||||
|
<td class="txtImpresion" align="right">Importe</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" colspan="3"><hr width="100%"></hr></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
|
||||||
|
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
|
||||||
|
|
||||||
|
Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||||
|
Integer especialidad = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||||
|
Vector vSeleccion = per.detalle_pacientes(medico, especialidad, dtFecha);
|
||||||
|
|
||||||
|
|
||||||
|
VTamovextTaclient vTamovextTaclient = null;
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
vTamovextTaclient = (VTamovextTaclient)vSeleccion.elementAt(i);
|
||||||
|
dblImporteTotal+=vTamovextTaclient.getPrecioActoMedico();
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" align="left"><%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%></td>
|
||||||
|
<td class="txtImpresion" align="left"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
|
||||||
|
<td class="txtImpresion" align="right"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion"></td>
|
||||||
|
<td class="txtImpresion" align="left">Importe ....</td>
|
||||||
|
<td class="txtImpresion" align="right"><%=Utilidades.formatearDouble(dblImporteTotal,PersistenciaParametros.decimales)%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
imprimirHTML();
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
%>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de pacientes (imp/impDetallePacientes.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
<%@ page import="com.tarisan.control.ParametrosConfiguracion" %>
|
||||||
|
<%@ page import="com.tarisan.data.Paciente" %>
|
||||||
|
<%@ page import="com.tarisan.data.Usuario" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de diagnostico (imp/impDiagnostico.jsp)");
|
||||||
|
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
String strAutorizacion = (String)request.getParameter("autorizacion");
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Impresión Diagnóstico</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
|
||||||
|
var strInforme = top.self.opener.obtenerInformePrescripcion();
|
||||||
|
var texto="<table border='0' width='100%' cellpadding='5' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td width='2%' class='txtImpresion'> </td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td width='2%' class='txtImpresion'> </td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strInforme!="")
|
||||||
|
{
|
||||||
|
texto += "<tr><td width='2%' class='txtImpresion' colspan='2'> </td></tr>";
|
||||||
|
texto += "<tr><td class='txtImpresion'> </td><td class='txtImpresion'>" + strInforme + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table width="100%" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table width="100%" border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><hr width="100%"></hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" nowrap>Nº de póliza:</td>
|
||||||
|
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
|
||||||
|
<td class="txtImpresion"> </td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
|
||||||
|
<td colspan="3">
|
||||||
|
<table border="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion">Nº Autorización:</td>
|
||||||
|
<td class="txtImpresion"><%=strAutorizacion%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="txtImpresion"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="left" class="txtImpresion">Ruego faciliten las siguientes exploraciones:</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
escribirListaElementos();
|
||||||
|
imprimirHTML();
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
%>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de diagnostico (imp/impDiagnostico.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
<%@ page import="com.tarisan.control.ParametrosConfiguracion" %>
|
||||||
|
<%@ page import="com.tarisan.data.Paciente" %>
|
||||||
|
<%@ page import="com.tarisan.data.Usuario" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de especialidades (imp/impEspecialidades.jsp)");
|
||||||
|
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
String strAutorizacion = (String)request.getParameter("autorizacion");
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Impresión Especialidades</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
|
||||||
|
var strInforme = top.self.opener.obtenerInformePrescripcion();
|
||||||
|
var texto="<table border='0' width='100%' cellpadding='5' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td width='2%' class='txtImpresion'> </td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td width='2%' class='txtImpresion'> </td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strInforme!="")
|
||||||
|
{
|
||||||
|
texto += "<tr><td width='2%' class='txtImpresion' colspan='2'> </td></tr>";
|
||||||
|
texto += "<tr><td class='txtImpresion'> </td><td class='txtImpresion'>" + strInforme + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table width="100%" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table width="100%" border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><hr width="100%"></hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" nowrap>Nº de póliza:</td>
|
||||||
|
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
|
||||||
|
<td class="txtImpresion"> </td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
|
||||||
|
<td colspan="3">
|
||||||
|
<table border="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion">Nº Autorización:</td>
|
||||||
|
<td class="txtImpresion"><%=strAutorizacion%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="txtImpresion"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="left" class="txtImpresion">Ruego autoricen las siguientes exploraciones:</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
escribirListaElementos();
|
||||||
|
imprimirHTML();
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
%>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de especialidades (imp/impEspecialidades.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
<%@ page import="com.tarisan.control.ParametrosConfiguracion" %>
|
||||||
|
<%@ page import="com.tarisan.data.Paciente" %>
|
||||||
|
<%@ page import="com.tarisan.data.Usuario" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de facturacion (imp/impFacturacion.jsp)");
|
||||||
|
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Impresión Facturación</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
|
||||||
|
var texto="<table border='0' cellpadding='5' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td class='txtImpresion'> </td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txtImpresion'> </td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.all.elementos.innerHTML = texto + "</table>";
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table width="100%" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table width="100%" border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><hr width="100%"></hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion">Nº de póliza:</td>
|
||||||
|
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
|
||||||
|
<td class="txtImpresion"> </td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="txtImpresion"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="left" class="txtImpresion">Asistencia prestada</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
escribirListaElementos();
|
||||||
|
imprimirHTML();
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
%>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de facturacion (imp/impFacturacion.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
<%@ page import="com.tarisan.control.ParametrosConfiguracion" %>
|
||||||
|
<%@ page import="com.tarisan.data.Paciente" %>
|
||||||
|
<%@ page import="com.tarisan.data.Usuario" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de recetas (imp/impRecetas.jsp)");
|
||||||
|
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Impresión Recetas</title>
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
|
||||||
|
var strInforme = top.self.opener.obtenerInformePrescripcion();
|
||||||
|
var texto="<table border='0' width='100%' cellpadding='5' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td align='left' width='2%' class='txtImpresion'> </td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td align='left' width='2%' class='txtImpresion'> </td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strInforme!="")
|
||||||
|
{
|
||||||
|
texto += "<tr><td align='left' width='2%' class='txtImpresion' colspan='2'> </td></tr>";
|
||||||
|
texto += "<tr><td align='left' class='txtImpresion'> </td><td class='txtImpresion'>" + strInforme + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table width="100%" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table width="100%" border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
|
||||||
|
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><hr width="100%"></hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table border="0" cellpadding="5" align="left">
|
||||||
|
<tr>
|
||||||
|
<td class="txtImpresion" nowrap>Nº de póliza:</td>
|
||||||
|
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
|
||||||
|
<td class="txtImpresion"> </td>
|
||||||
|
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="txtImpresion"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="left" class="txtImpresion">DP./</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
escribirListaElementos();
|
||||||
|
imprimirHTML();
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||||
|
%>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de recetas (imp/impRecetas.jsp)");
|
||||||
|
%>
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="java.util.Enumeration" %>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="java.io.ByteArrayOutputStream" %>
|
||||||
|
<%@ page import="java.io.ObjectOutputStream" %>
|
||||||
|
<%@ page import="java.io.NotSerializableException" %>
|
||||||
|
|
||||||
|
|
||||||
|
<HTML>
|
||||||
|
<BODY>
|
||||||
|
<%
|
||||||
|
Date fecha = null;
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss");
|
||||||
|
Calendar calendario = Calendar.getInstance();
|
||||||
|
|
||||||
|
out.print("<hr>");
|
||||||
|
out.print("Fecha = " + sdf.format(calendario.getTime()));
|
||||||
|
out.print("<hr>");
|
||||||
|
|
||||||
|
HttpSession miSession = request.getSession(true);
|
||||||
|
Object valor = null;
|
||||||
|
int total = 0;
|
||||||
|
Vector salidaListado;
|
||||||
|
StringBuffer elementoListado;
|
||||||
|
String nombre;
|
||||||
|
|
||||||
|
Enumeration listaSession = miSession.getAttributeNames();
|
||||||
|
|
||||||
|
out.print("<br>");
|
||||||
|
out.print("<b>LISTADO DE LOS OBJETOS DE SESIÓN</b><br>");
|
||||||
|
if((listaSession != null) && (listaSession.hasMoreElements()))
|
||||||
|
{
|
||||||
|
out.println("<font size=-1><ul>" );
|
||||||
|
ByteArrayOutputStream o;
|
||||||
|
ObjectOutputStream buf;
|
||||||
|
boolean serial;
|
||||||
|
salidaListado = new Vector();
|
||||||
|
|
||||||
|
for(; listaSession.hasMoreElements();)
|
||||||
|
{
|
||||||
|
serial = false;
|
||||||
|
nombre = (String)listaSession.nextElement();
|
||||||
|
|
||||||
|
elementoListado = new StringBuffer();
|
||||||
|
elementoListado.append("<li><b>");
|
||||||
|
elementoListado.append(nombre);
|
||||||
|
elementoListado.append("</b>");
|
||||||
|
|
||||||
|
valor = miSession.getAttribute(nombre);
|
||||||
|
elementoListado.append(" --> ");
|
||||||
|
elementoListado.append(valor.getClass().getName());
|
||||||
|
elementoListado.append(" --> ");
|
||||||
|
elementoListado.append(valor);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = new ByteArrayOutputStream();
|
||||||
|
buf = new ObjectOutputStream(o);
|
||||||
|
buf.writeObject(valor);
|
||||||
|
buf.flush();
|
||||||
|
elementoListado.append(" --> ");
|
||||||
|
elementoListado.append(o.size());
|
||||||
|
elementoListado.append(" bytes");
|
||||||
|
total += o.size();
|
||||||
|
}
|
||||||
|
catch(NotSerializableException ex)
|
||||||
|
{
|
||||||
|
elementoListado.append(" --> ??? bytes");
|
||||||
|
}
|
||||||
|
salidaListado.addElement(elementoListado.toString());
|
||||||
|
}
|
||||||
|
o = null;
|
||||||
|
buf = null;
|
||||||
|
|
||||||
|
for(int ind = 0; ind < salidaListado.size(); ind++)
|
||||||
|
{
|
||||||
|
out.println((String)salidaListado.elementAt(ind));
|
||||||
|
}
|
||||||
|
|
||||||
|
out.println("</font></ul>" );
|
||||||
|
out.println( "<b>TOTAL(aproximado) = " + total + " bytes</b>" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out.println( "No existen objetos almacenados en la sesión" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
out.print("<hr>");
|
||||||
|
out.print("<br>");
|
||||||
|
out.print("<b>LISTADO DE LAS COOKIES</b><br>");
|
||||||
|
|
||||||
|
Cookie[] listaCookies = request.getCookies();
|
||||||
|
|
||||||
|
if((listaCookies != null) && (listaCookies.length > 0))
|
||||||
|
{
|
||||||
|
Cookie unaCookie;
|
||||||
|
int duracion;
|
||||||
|
salidaListado = new Vector();
|
||||||
|
|
||||||
|
out.println("<font size=-1><ul>" );
|
||||||
|
|
||||||
|
for(int ind = 0; ind < listaCookies.length; ind++)
|
||||||
|
{
|
||||||
|
unaCookie = listaCookies[ind];
|
||||||
|
|
||||||
|
elementoListado = new StringBuffer();
|
||||||
|
elementoListado.append("<li><b>");
|
||||||
|
elementoListado.append(unaCookie.getName());
|
||||||
|
elementoListado.append("</b> --> ");
|
||||||
|
elementoListado.append(unaCookie.getValue());
|
||||||
|
|
||||||
|
duracion = unaCookie.getMaxAge();
|
||||||
|
|
||||||
|
elementoListado.append(" [duración = ");
|
||||||
|
if (duracion >= 0)
|
||||||
|
{
|
||||||
|
fecha.setTime((long)(duracion*1000));
|
||||||
|
calendario.setTime(fecha);
|
||||||
|
|
||||||
|
elementoListado.append(calendario.get(Calendar.HOUR_OF_DAY));
|
||||||
|
elementoListado.append("h.");
|
||||||
|
elementoListado.append(calendario.get(Calendar.MINUTE));
|
||||||
|
elementoListado.append("m.");
|
||||||
|
elementoListado.append(calendario.get(Calendar.SECOND));
|
||||||
|
elementoListado.append("s.");
|
||||||
|
elementoListado.append(calendario.get(Calendar.MILLISECOND));
|
||||||
|
elementoListado.append("ms");
|
||||||
|
elementoListado.append("]");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
elementoListado.append("hasta que se cierre el navegador]");
|
||||||
|
}
|
||||||
|
salidaListado.addElement(elementoListado.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int ind = 0; ind < salidaListado.size(); ind++)
|
||||||
|
{
|
||||||
|
out.println((String)salidaListado.elementAt(ind));
|
||||||
|
}
|
||||||
|
|
||||||
|
out.println("</font></ul>" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out.println( "No existen cookies" );
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
||||||
@@ -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"> </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> </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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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á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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio pá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ítica esta pte de extraccion para indicarlo en el apartado de regenerar pdf */
|
||||||
|
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"));
|
||||||
|
|
||||||
|
//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á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ó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"> </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ón de la tabla presentació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"> </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á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ó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ó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ó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ó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ítica está pendiente de extracción
|
||||||
|
|
||||||
|
if(vTaresanaTamedico.getIgualada().compareTo("0") != 0){ //Comprobar si se trata de una autorización que está 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ó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ón anulada en GPC</p><%
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
pteExtraccion = 1;
|
||||||
|
%><p>Pendiente de Extracció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ón que está 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ó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">ú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 analisis (med/analisis.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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"> </td></tr>
|
||||||
|
<tr><td colspan="2"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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> <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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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> </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"> </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"> </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"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </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"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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á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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio pá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ó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ño para el que desea realizar la impresion
|
||||||
|
if (request.getParameter("fecha")!=null)
|
||||||
|
strFecha=(String)request.getParameter("fecha");
|
||||||
|
|
||||||
|
//parametro fecha que indica el añ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ó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ó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ó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ó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ó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ó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ó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%">
|
||||||
|
|
||||||
|
<%
|
||||||
|
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"> </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> </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> </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"> </td></tr>
|
||||||
|
<%
|
||||||
|
//Creación de la tabla presentació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"> </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">Fecha</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripció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">ú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="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ágina de pacientes (med/detallePacientes.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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á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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de detalle historico de liquidacion (med/detalle_historico_liquidacion.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampocalendar="";
|
||||||
|
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("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ó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ó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%">
|
||||||
|
<%
|
||||||
|
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ó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 detalle historico de liquidacion (med/detalle_historico_liquidacion.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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"> </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"> </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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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"> </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"> </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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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> </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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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ó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ódigo Perfil</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripció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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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ó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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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ágina del histó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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página del histó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ó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ó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ó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 width="1px" bgcolor="#CCCCCC" height="330px"></td>
|
||||||
|
<td>
|
||||||
|
<form id="frmLiquidacion" name="frmLiquidacion" action="historico_liquidacion.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<%
|
||||||
|
//Creación de la tabla presentació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ó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édico origen tiene retenció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ñ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ón que quiere ver, la generamos para que se guarde y poderla mostrar si quiere.
|
||||||
|
//para evitar añadir varios pies si el fichero se generó en una consulta anterior
|
||||||
|
generado = true;
|
||||||
|
|
||||||
|
/*Está generando el pdf, luego ha pulsado en el detalle de la liquidació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órico de liquidaciones y consulta el mes "+strMes+" generando el pdf correspondiente");
|
||||||
|
|
||||||
|
//obtenemos los datos del médico necesarios, primero vemos el mé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ón es un pá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ód. Acto",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED)));
|
||||||
|
PdfPCell celda2 =new PdfPCell (new Paragraph("Descripció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"> </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ñadí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> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
|
<tr><td> </td><td><span class="txt"><%=pertamensaje.obtenerMensaje(61).getMensaje() %></span></td><td align="right"><span class="txt"> <%=df.format(importe) %></span></td><td> </td><td> </td></tr>
|
||||||
|
<%
|
||||||
|
Double irpf = 0.0;
|
||||||
|
Double total = 0.0;
|
||||||
|
if(retencion)
|
||||||
|
{
|
||||||
|
irpf = importe*0.15;
|
||||||
|
total = importe - irpf;
|
||||||
|
%>
|
||||||
|
<tr><td> </td><td><span class="txt"><%=pertamensaje.obtenerMensaje(56).getMensaje() %>: </span></td><td align="right"><span class="txt"> <%=df.format(irpf) %></span></td><td> </td><td> </td></tr>
|
||||||
|
<tr><td> </td><td><span class="txt"><%=pertamensaje.obtenerMensaje(62).getMensaje() %></span></td><td align="right"><span class="txt"> <%=df.format(total) %></span></td><td> </td><td> </td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
total = importe;%>
|
||||||
|
<tr><td> </td><td><span class="txt"><%=pertamensaje.obtenerMensaje(62).getMensaje() %></span></td><td align="right"><span class="txt"> <%=df.format(importe) %></span></td><td> </td><td> </td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td> </td><td><span class="txt"><%=pertamensaje.obtenerMensaje(63).getMensaje() %></span></td>
|
||||||
|
<td align="right"><span class="txt"> </span></td><td> </td><td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </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> </td>
|
||||||
|
<td> </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ágina del histórico de liquidaciones (med/historico_liquidacion.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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ón Perfiles</title>
|
||||||
|
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/menu_med.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
</head>
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function imprimir(valor)
|
||||||
|
{
|
||||||
|
obj=document.getElementById(valor);
|
||||||
|
obj.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminar(valor)
|
||||||
|
{
|
||||||
|
obj=document.getElementById(valor);
|
||||||
|
/*if(confirm('Seguro que deseas borrar el volante??'))
|
||||||
|
{
|
||||||
|
obj.submit();
|
||||||
|
}*/
|
||||||
|
modal({
|
||||||
|
type : 'confirm',
|
||||||
|
title : '¡Atención!',
|
||||||
|
text : '¿Seguro que deseas borrar el volante?',
|
||||||
|
callback: function(result){
|
||||||
|
if (result){
|
||||||
|
obj.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) {//se efectua la impresion
|
||||||
|
var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strFile%>.pdf',"<%=strFile%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||||
|
<td>
|
||||||
|
<table width="100%">
|
||||||
|
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="contenedorNoticia">
|
||||||
|
<br>
|
||||||
|
<div class="tituloNoticia">
|
||||||
|
<p class="marquee"><%=strNoticia %></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- Cabecera de Navegación superior //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td><script language="JavaScript">bloques();</script></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- Cuerpo de la página //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr valign="top">
|
||||||
|
<!--<td width="180">//-->
|
||||||
|
<td width="5%">
|
||||||
|
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr valign="top">
|
||||||
|
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<!--<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||||
|
<td width="565">
|
||||||
|
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||||
|
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
||||||
|
<table>
|
||||||
|
<%if(!borrados){ %>
|
||||||
|
<tr><td><a href="<%=request.getContextPath()%>/jsp/med/historico_volantes.jsp?x=<%=strParametroMenu %>&borrados=1" class="enlace">Ver borrados</a></td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%><tr><td><a href="<%=request.getContextPath()%>/jsp/med/historico_volantes.jsp?x=<%=strParametroMenu %>" class="enlace">Ocultar borrados</a></td></tr><%
|
||||||
|
}
|
||||||
|
PersistenciaTavolin perTavol = new PersistenciaTavolin();
|
||||||
|
Vector vSeleccion = new Vector();
|
||||||
|
if(borrados)
|
||||||
|
vSeleccion = perTavol.volantes_por_prescriptor(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), intPagina, 1);
|
||||||
|
else
|
||||||
|
vSeleccion = perTavol.volantes_por_prescriptor(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), intPagina);
|
||||||
|
|
||||||
|
if(vSeleccion.size() > 0)
|
||||||
|
{
|
||||||
|
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" align="right"><span class="txt">Página de </span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto Médico</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Motivo Ingreso</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Juicio diagnóstico</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td></tr>
|
||||||
|
<%
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
Tavolin tavol = (Tavolin)vSeleccion.elementAt(i);
|
||||||
|
PersistenciaTtactmed perta = new PersistenciaTtactmed();
|
||||||
|
Integer especialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||||
|
String fecha = tavol.get_fecha().toString().substring(8, 10)+"/"+tavol.get_fecha().toString().substring(5, 7)+"/"+tavol.get_fecha().toString().substring(0, 4);
|
||||||
|
%>
|
||||||
|
<tr valign="center" class="trResultados"><form name="frmtavolin<%=i %>" id="frmtavolin<%=i %>" action="<%=request.getContextPath() %>/servlet/GestorPacientes?x=<%=strParametroMenu %>&imp=1" method="post"><td class="<%=estilo %>"><%=tavol.get_nombre() %></td><td class="<%=estilo%>"><%=perta.obtenerNombreActo(tavol.get_acto(), especialidad) %></td><td class="<%=estilo%>"><%=perta.obtenerDescripcionMotivoIngreso(tavol.get_motivo()) %></td><td class="<%=estilo%>"><%=tavol.get_juicio() %></td><td class="<%=estilo%>"><%=fecha %></td><td class="<%=estilo%>"><input type="submit" <%=ver_borrados %> name="aceptar" value="OK/Imprimir" class="txt"></td>
|
||||||
|
<input type="hidden" name="nom_paciente" value="<%=tavol.get_nombre() %>"/>
|
||||||
|
<input type="hidden" name="fec_paciente" value="<%=tavol.get_fecnac() %>"/>
|
||||||
|
<input type="hidden" name="poliza" value="<%=tavol.get_poliza()%>"/>
|
||||||
|
<input type="hidden" name="dir_paciente" value="<%=tavol.get_domicilio() %>"/>
|
||||||
|
<input type="hidden" name="nif_paciente" value="<%=tavol.get_nif() %>"/>
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_IMPRIMIR_VOLANTE_INGRESO %>"/>
|
||||||
|
<input type="hidden" name="acto_medico" value="<%=tavol.get_acto() %>"/>
|
||||||
|
<input type="hidden" name="motivo_ingreso" value="<%=tavol.get_motivo() %>"/>
|
||||||
|
<input type="hidden" name="diagnostico" value="<%=tavol.get_juicio() %>"/>
|
||||||
|
<input type="hidden" name="tarjeta" value="<%=tavol.get_tarjeta() %>"/>
|
||||||
|
</form>
|
||||||
|
<td class="<%=estilo%>"><form name="eliminar_volante" id="eliminar_volante<%=i %>" action="<%=request.getContextPath() %>/servlet/GestorPacientes?x=<%=strParametroMenu %>&imp=1" method="post"><input type="hidden" name="pk" value="<%=tavol.get_pk() %>"/><input type="button" value="Eliminar" <%=ver_borrados %> class="txt" onclick="eliminar('eliminar_volante<%=i %>')"/><input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_BORRAR_VOLANTE_INGRESO %>"/></form></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td class="txt"><%=pertamensaje.obtenerMensaje(19).getMensaje() %></td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<script>
|
||||||
|
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||||
|
if (!jsMostrarNoticia){
|
||||||
|
document.getElementById('contenedorNoticia').style.display="none";
|
||||||
|
}else{
|
||||||
|
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||||
|
var not = "<%=strNoticia %>";
|
||||||
|
tamanioNoticia(not);
|
||||||
|
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
catch(ExcepcionTarisan ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de historico de volantes de ingreso (med/historico_volantes.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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á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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio pá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ó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ó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="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> </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"> </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á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ó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">ú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">último</a></td>
|
||||||
|
<%}%>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
} //fin if(pagina!=0)
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </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ó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ón de la pá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ó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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
After Width: | Height: | Size: 86 B |
|
After Width: | Height: | Size: 43 B |
|
After Width: | Height: | Size: 43 B |
@@ -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> </td>
|
||||||
|
<td align="left"><h5>SISTEMA DE INCIDENCIAS DE TARISAN</h5></td>
|
||||||
|
</tr> -->
|
||||||
|
<tr>
|
||||||
|
<td> </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> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="left" class="txtnegrita">Descripci鏮 breve:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="left"><input type="text" size="40" name="ASUNTO" id="asun" class="txt" value="<%=strAsuntoCorreo %>" style="width:40%"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="left" class="txtnegrita"><span>Detalle de la Incidencia:</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="left">
|
||||||
|
<textarea name="MENSAJE" rows="4" cols="70%" class="txt" style="width:70%"><%=strMensajeCorreo %></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="left" class="txtnegrita">Pase la tarjeta para registrarla:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="left"><input type="password" size="40" name="TARJETA" id="tar" class="txt" value="<%=strTarjetaCorreo %>" style="width:70%"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<table border="0" align="center" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="left" class="txtnegrita">Adjuntar archivos:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </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> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2" align="left"><a href="javascript:enviar_incidencia()" class="enlace">Enviar</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
if (strMensaje.compareTo("")!=0){
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td align="center"><p class="txtNegrita" style="color:blue"><%= strMensaje %></p></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strError.compareTo("")!=0){
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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> </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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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á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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio pá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ó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ápido">
|
||||||
|
<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 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á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"> </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á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"> </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">ú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">último</a></td>-->
|
||||||
|
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/med/noticias.jsp?x=19&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">ú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"> </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á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í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ída</a>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td colspan="2"> </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">ú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">último</a></td>-->
|
||||||
|
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/med/noticias.jsp?x=19&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">ú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ó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 noticias (med/noticias.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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> <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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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> </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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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> </td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtnegrita"><%= mensaje %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="<%= paginaRedirigida %>" class="enlace">Continuar</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<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", "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)");
|
||||||
|
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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"> </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> </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"> </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"> </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"> </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)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -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á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ó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/verify_cambios_perfil.jsp)");
|
||||||
|
|
||||||
|
|
||||||
|
// 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"));
|
||||||
|
|
||||||
|
boolean mostrarNoticia = true;
|
||||||
|
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||||
|
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||||
|
Vector vNoticias = new Vector();
|
||||||
|
String strNoticia = "";
|
||||||
|
String noticias ="";
|
||||||
|
String separador = " ---//--- ";
|
||||||
|
if(vSeleccionNot.size()==0){
|
||||||
|
mostrarNoticia = false;
|
||||||
|
}else{
|
||||||
|
mostrarNoticia = true;
|
||||||
|
Tanoticias tanoticia = null;
|
||||||
|
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||||
|
{
|
||||||
|
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||||
|
if (i!=0){
|
||||||
|
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||||
|
}else{
|
||||||
|
strNoticia = tanoticia.getNoticia();
|
||||||
|
}
|
||||||
|
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Gestión Perfiles</title>
|
||||||
|
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||||
|
|
||||||
|
<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ó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%">
|
||||||
|
<%
|
||||||
|
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á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"> </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ágina de gestion de perfiles (med/verify_cambios_perfil.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<%@ 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.*" %>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de visionado de pdfs (pac/ver_pdf.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 ver pdf");
|
||||||
|
response.sendRedirect("../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de visionado de pdfs (pac/ver_pdf.jsp)");
|
||||||
|
|
||||||
|
//../../resultados/<%=fichero.getName()
|
||||||
|
// if (request.getParameter("x")!=null)
|
||||||
|
// strParametroMenu=(String)request.getParameter("x");
|
||||||
|
String fichero = "";
|
||||||
|
if(request.getParameter("fichero")!=null)
|
||||||
|
{
|
||||||
|
fichero = (String)request.getParameter("fichero");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//LogTarisan.logger.log(NivelLog.DEBUG, "getparameter.fichero es null"+sesion.getAttribute("fichero"));
|
||||||
|
if(sesion.getAttribute("fichero")!=null)
|
||||||
|
{
|
||||||
|
//LogTarisan.logger.log(NivelLog.DEBUG, "getattribute.fichero es: "+sesion.getAttribute("fichero"));
|
||||||
|
fichero=(String)sesion.getAttribute("fichero");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*File miFile = new File("//root/resultados/"+fichero);*/
|
||||||
|
File miFile = new File("//var/lib/tomcat/webapps/tarisan/resultados/"+fichero);
|
||||||
|
String fi = "";
|
||||||
|
fi = miFile.getName();
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Se va a mostrar el fichero: "+request.getContextPath()+"/resultados/"+fichero);
|
||||||
|
%>
|
||||||
|
|
||||||
|
<EMBED SRC="<%=request.getContextPath()%>/resultados/<%=fichero %>" HEIGHT=100% WIDTH=100%>
|
||||||
|
<NOEMBED> Your browser does not support embedded PDF files. </NOEMBED>
|
||||||
|
</EMBED>
|
||||||
|
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de visionado de pdfs (pac/ver_pdf.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="java.util.Arrays" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%@ page import="java.util.Enumeration" %>
|
||||||
|
<%@ page import="java.util.Properties" %>
|
||||||
|
<%@ page import="java.util.StringTokenizer" %>
|
||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Consulta de diversas propiedades</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p align="center"><u><big><strong><big><big><font face="Verdana, Arial, Helvetica, sans-serif" size="3">Propiedades del sistema</font></big></big></strong></big></u></p>
|
||||||
|
|
||||||
|
<%
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss");
|
||||||
|
Calendar calendario = Calendar.getInstance();
|
||||||
|
|
||||||
|
out.print("<hr>");
|
||||||
|
out.print(sdf.format(calendario.getTime()));
|
||||||
|
out.print("<hr>");
|
||||||
|
|
||||||
|
// Properties propiedades = System.getProperties();
|
||||||
|
String nombrePropiedad;
|
||||||
|
// String valorPropiedad;
|
||||||
|
// String arrayPropiedades[] = new String[propiedades.size()];
|
||||||
|
// String arrayValores[];
|
||||||
|
// StringTokenizer stValores;
|
||||||
|
// int i = 0;
|
||||||
|
// int k;
|
||||||
|
|
||||||
|
// out.println("<b>Consulta de diversas propiedades: </b>");
|
||||||
|
|
||||||
|
out.println("<font size=\"-1\"><ul>");
|
||||||
|
out.println("<li><b>request:</b> " + request + "</li>");
|
||||||
|
out.println("<li><b>response:</b> " + response + "</li>");
|
||||||
|
out.println("<li><b>session:</b> " + session + "</li>");
|
||||||
|
|
||||||
|
out.println("<li><b>session.getServletContext():</b> " + session.getServletContext() + "</li>");
|
||||||
|
out.println("<li><b>session.getServletContext().getServerInfo():</b> " + session.getServletContext().getServerInfo() + "</li>");
|
||||||
|
out.println("<li><b>session.getServletContext().getMajorVersion():</b> " + session.getServletContext().getMajorVersion() + "</li>");
|
||||||
|
out.println("<li><b>session.getServletContext().getMinorVersion():</b> " + session.getServletContext().getMinorVersion() + "</li>");
|
||||||
|
|
||||||
|
out.println("<li><b>session.getServletContext().getAttributeNames():</b> " + session.getServletContext().getAttributeNames() + "</li>");
|
||||||
|
out.println("<ul>");
|
||||||
|
for(Enumeration enu = session.getServletContext().getAttributeNames(); enu.hasMoreElements();)
|
||||||
|
{
|
||||||
|
nombrePropiedad = (String)enu.nextElement();
|
||||||
|
out.println("<li><b>" + nombrePropiedad + ": </b>" + session.getServletContext().getAttribute(nombrePropiedad) + "</li>");
|
||||||
|
}
|
||||||
|
out.println("</ul>");
|
||||||
|
|
||||||
|
out.println("<li><b>session.getServletContext().getInitParameterNames():</b> " + session.getServletContext().getInitParameterNames() + "</li>");
|
||||||
|
out.println("<ul>");
|
||||||
|
for(Enumeration enu = session.getServletContext().getInitParameterNames(); enu.hasMoreElements();)
|
||||||
|
{
|
||||||
|
nombrePropiedad = (String)enu.nextElement();
|
||||||
|
out.println("<li><b>" + nombrePropiedad + ": </b>" + session.getServletContext().getInitParameter(nombrePropiedad) + "</li>");
|
||||||
|
}
|
||||||
|
out.println("</ul>");
|
||||||
|
|
||||||
|
|
||||||
|
out.println("<li><b>super.pageContext:</b> " + super.toString() + "</li>");
|
||||||
|
// out.println("<li><b>super.pageContext.getAttributeNamesInScope():</b> " + super.pageContext.getAttributeNamesInScope(PageContext.PAGE_SCOPE) + "</li>");
|
||||||
|
// out.println("<li><b>JspFactory.getPageContext():</b> " + JspFactory.getPageContext() + "</li>");
|
||||||
|
|
||||||
|
out.println("</ul></font>");
|
||||||
|
out.println("<hr>");
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,551 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.io.*" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + ": Inicio página de analista (pac/analista.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 analista (pac/analista.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strAutorizacion="";
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
int intPagina=0;
|
||||||
|
String strRespuesta="";
|
||||||
|
boolean blnPeticionCapturada=false;
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||||
|
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||||
|
java.sql.Date dtFechaActual = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||||
|
PersistenciaVTaprescaTtactmed per = new PersistenciaVTaprescaTtactmed();
|
||||||
|
Vector vSeleccion=null;
|
||||||
|
int mostrarBotonPDF = 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 descripcion para las busquedas
|
||||||
|
if (request.getParameter("autorizacion")!=null)
|
||||||
|
strAutorizacion = (String)request.getParameter("autorizacion");
|
||||||
|
|
||||||
|
//parametro pagina para realizar la paginacion
|
||||||
|
if (request.getParameter("pagina")!=null)
|
||||||
|
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||||
|
|
||||||
|
//parametro respuesta para sacar el mensaje según se haya capturado o no
|
||||||
|
if (request.getParameter("respuesta")!=null)
|
||||||
|
strRespuesta = (String)request.getParameter("respuesta");
|
||||||
|
|
||||||
|
|
||||||
|
//obtenemos las prescripciones de los analisis en caso de que se haya introducido un numero de autorizacion
|
||||||
|
if (!strAutorizacion.equalsIgnoreCase("")) //El usuario ha introducido el numero de autorizacion
|
||||||
|
{
|
||||||
|
PersistenciaTaresana perTa = new PersistenciaTaresana();
|
||||||
|
|
||||||
|
if(!perTa.peticionCapturada(Long.parseLong(strAutorizacion))){
|
||||||
|
per = new PersistenciaVTaprescaTtactmed();
|
||||||
|
vSeleccion = per.obtenerPrescripcionAnalisis(Long.parseLong(strAutorizacion), intColectivo, dblPoliza, intBeneficiario, intEspecialidad, intPagina,((Usuario)sesion.getAttribute("USUARIO")).getMedico());
|
||||||
|
}else{
|
||||||
|
blnPeticionCapturada=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*if (vSeleccion != null & vSeleccion.size()!=0)
|
||||||
|
{
|
||||||
|
//Comprobamos si existe ya el analisis en la tabla taresana
|
||||||
|
//PersistenciaTaresana perTaresana = new PersistenciaTaresana();
|
||||||
|
/*if (perTaresana.existeAnalisis(((VTapresca_ttactmed)vSeleccion.elementAt(0)).getPrescriptor(), intEspecialidad, intColectivo, dblPoliza, intBeneficiario, dtFechaActual)) //existe un analisis ya aceptado por el analista
|
||||||
|
blnExisteAnalisisAceptado=true;*/
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
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>Analista </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/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</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 aceptarAnalisis(aceptar)
|
||||||
|
{
|
||||||
|
if (aceptar==0)
|
||||||
|
{
|
||||||
|
/*alert("Para poder aceptar el análisis debe realizar una búsqueda previa del mismo.");*/
|
||||||
|
document.frmAnalista.autorizacion.focus();
|
||||||
|
modal({type:'error',title:'Atención!',text:'Para poder aceptar el análisis debe realizar una búsqueda previa del mismo.',});
|
||||||
|
}
|
||||||
|
else if (aceptar==2)
|
||||||
|
{
|
||||||
|
/*alert("La petición solicitada ya ha sido aceptada.");*/
|
||||||
|
document.frmAnalista.autorizacion.focus();
|
||||||
|
modal({type:'error',title:'Atención!',text:'La petición solicitada ya ha sido aceptada.',});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var boton = document.getElementById('okimprimir');
|
||||||
|
boton.disabled = true;
|
||||||
|
document.frmAceptarAnalisis.submit();
|
||||||
|
/*alert("Petición adjudicada correctamente"); */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarPrescripciones()
|
||||||
|
{
|
||||||
|
if (validarAutorizacion(document.frmAnalista.autorizacion))
|
||||||
|
document.frmAnalista.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function validarAutorizacion(autorizacion)
|
||||||
|
{
|
||||||
|
if (document.frmAnalista.autorizacion.value.length == 7){
|
||||||
|
document.frmAnalista.autorizacion.value = "0" + document.frmAnalista.autorizacion.value;
|
||||||
|
}else if(document.frmAnalista.autorizacion.value.length == 6){
|
||||||
|
document.frmAnalista.autorizacion.value = "00" + document.frmAnalista.autorizacion.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
//var blnValorCorrecto = (soloNumeros(autorizacion.value) && document.frmAnalista.autorizacion.value.length == 8);
|
||||||
|
var blnValorCorrecto = soloNumeros(autorizacion.value);
|
||||||
|
if (!blnValorCorrecto)
|
||||||
|
{
|
||||||
|
//alert("La autorización debe ser un valor numérico de 8 dígitos.");
|
||||||
|
//alert("La autorización debe ser un valor numérico.");
|
||||||
|
autorizacion.focus();
|
||||||
|
modal({type:'error',title:'Atención!',text:'La autorización debe ser un valor numérico.',});
|
||||||
|
}
|
||||||
|
|
||||||
|
return blnValorCorrecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmAnalista.pagina.value=pagina;
|
||||||
|
document.frmAnalista.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmAnalista.autorizacion.focus()">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||||
|
</tr>
|
||||||
|
<!-- <tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></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>
|
||||||
|
<!--<tr valign="top">
|
||||||
|
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0" width="75%"></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"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right" width="100%">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if (blnPeticionCapturada)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="button" name="aceptar" value="Aceptar" id="okimprimir" onclick="javascript:aceptarAnalisis(2)" class="menu"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else if ((vSeleccion==null || vSeleccion.size()==0)){
|
||||||
|
%>
|
||||||
|
<td><input type="button" name="aceptar" value="Aceptar" id="okimprimir" onclick="javascript:aceptarAnalisis(0)" class="menu"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="button" name="aceptar" value="Aceptar" id="okimprimir" onclick="javascript:aceptarAnalisis(1)" class="menu"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<form name="frmAceptarAnalisis" action="../../servlet/GestorPacientes" method="post">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_ANALISTA_ACEPTAR_ANALISIS%>">
|
||||||
|
<input type="hidden" name="autorizacion" value="<%=strAutorizacion%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmAnalista" action="analista.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:return validarAutorizacion(this.autorizacion)">
|
||||||
|
<td colspan="2">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita">Número de autorización: </span></td>
|
||||||
|
<td><input type="text" size="10" name="autorizacion" class="txt" maxlength="10" value='<%=strAutorizacion%>'></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:mostrarPrescripciones()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="4"></td></tr>
|
||||||
|
<tr><td colspan="4"></td></tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2"></td></tr>
|
||||||
|
<%
|
||||||
|
if (!strAutorizacion.equalsIgnoreCase("")) //El usuario ha introducido el numero de autorizacion
|
||||||
|
{
|
||||||
|
if (blnPeticionCapturada) //ya existe un analisis
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(8); %><%=tamensaje.getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else if (vSeleccion==null || vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(9); %><%=tamensaje.getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else //no existe un analisis previo. Se muestran los datos de la prescripcion.
|
||||||
|
{
|
||||||
|
mostrarBotonPDF = 1;
|
||||||
|
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">Código</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
VTapresca_Ttactmed vtapresca_tarisanttactmed = new VTapresca_Ttactmed();
|
||||||
|
String strInforme = ((VTapresca_Ttactmed)vSeleccion.elementAt(0)).getInforme();
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
vtapresca_tarisanttactmed = (VTapresca_Ttactmed)vSeleccion.elementAt(i);
|
||||||
|
%>
|
||||||
|
<tr class="trResultados">
|
||||||
|
<td class="<%=estilo%>" align="center"><%=vtapresca_tarisanttactmed.getActo()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vtapresca_tarisanttactmed.getDescripcionActoMedico()%></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)
|
||||||
|
%>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Informe:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left"><textarea name="informe" rows="4" cols="50" class="txt" readonly="readonly"><%=strInforme%></textarea></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
} //fin else (vSeleccion.size()!=0)
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</table>
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="" align="left">
|
||||||
|
<%
|
||||||
|
if(mostrarBotonPDF==1){
|
||||||
|
String resultado = ""+strAutorizacion;
|
||||||
|
/*resultado = (resultado.length()<8)?"0"+resultado:resultado;*/
|
||||||
|
File 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="<%=fichero.getName()%>" />
|
||||||
|
<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(ParametrosConfiguracion.ruta_pdf_peticiones+Integer.valueOf(strAutorizacion).toString()+".PDF");*/
|
||||||
|
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="<%=fichero.getName()%>" />
|
||||||
|
<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(ParametrosConfiguracion.ruta_pdf_peticiones_analiticas+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="4"/>
|
||||||
|
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||||
|
<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(ParametrosConfiguracion.ruta_pdf_peticiones_analiticas+Integer.valueOf(strAutorizacion).toString()+".PDF");*/
|
||||||
|
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_analiticas+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="4"/>
|
||||||
|
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%><p>PDF inexistente</p><%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mostrarBotonPDF = 0;
|
||||||
|
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<%
|
||||||
|
if (/*intRespuesta == 1*/strRespuesta.compareTo("1")==0){
|
||||||
|
%><td class="txtnegrita" align="center" style="color:blue">Petición adjudicada correctamente<td> <%
|
||||||
|
}else if (/*intRespuesta == 2*/strRespuesta.compareTo("2")==0){
|
||||||
|
%><td class="txtnegrita" align="center" style="color:rgb(189, 2, 2);">No se puede capturar el análisis. El acto no tiene precio<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", "Error en la presentación de la pá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ó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 analista (pac/analista.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,901 @@
|
|||||||
|
<%@ 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.util.Vector" %>
|
||||||
|
<%@ page import="java.io.*" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.math.BigDecimal"%>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="com.tarisan.util.DES" %>
|
||||||
|
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/analitica.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
/*else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/solicitudAnaliticaNiveles.jsp?x=4&pagina=1");
|
||||||
|
}*/
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de analitica (pac/analitica.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables param2
|
||||||
|
boolean desplazado = false;
|
||||||
|
String strParametroMenu="";
|
||||||
|
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||||
|
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||||
|
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||||
|
int intPagina = 0;
|
||||||
|
int pteExtraccion = 0; /* Indica si la analítica esta pte de extraccion para indicarlo en el apartado de regenerar pdf */
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
StringBuffer strSql2 = new StringBuffer();
|
||||||
|
StringBuffer strSql_requestid = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
Object bCondiciones[]=null;
|
||||||
|
Object Condiciones[]=null;
|
||||||
|
Object aCondiciones_requestid[]=null;
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
int intImpresion = 0;
|
||||||
|
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||||
|
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
String strInformePrescripcion = "";
|
||||||
|
String strAutorizacion="";
|
||||||
|
|
||||||
|
//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 impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro informePrescripcion utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("informePrescripcion")!=null)
|
||||||
|
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||||
|
|
||||||
|
//atributo autorizacion utilizado para realizar la impresion
|
||||||
|
if (request.getAttribute("autorizacion")!=null) {
|
||||||
|
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||||
|
{
|
||||||
|
desplazado = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
String pathSpgif = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
pathSpgif = path + "/..";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Analítica </title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
var despla = <%= desplazado %>;
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function obtenerInformePrescripcion()
|
||||||
|
{
|
||||||
|
//preparamos el informe de prescripcion
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||||
|
//dependiendo del navegador el salto de linea es diferente.
|
||||||
|
//explorer => \r\n
|
||||||
|
//netscape 6 => \n
|
||||||
|
<%
|
||||||
|
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||||
|
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||||
|
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores del informe sin comillas simples
|
||||||
|
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original
|
||||||
|
while(informePrescripcion.indexOf("~")!=-1)
|
||||||
|
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
return informePrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
function mostrarAnalisis(autorizacion, path)
|
||||||
|
{
|
||||||
|
//var url = path + "/servlet/GestorPacientes?OPCION=<%=Constantes.OPC_PAC_REGISTRAR_LOG_ANALISIS%>&autorizacion=" + autorizacion;
|
||||||
|
//var ventana = window.open(url,"analisis" + autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
//var ventanaAnalisis = window.open('<%=request.getContextPath()%>'+ '/peticiones/' + autorizacion + '.pdf',autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>.pdf";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarPDFIzasa(path)
|
||||||
|
{
|
||||||
|
var ventanaAnalisis = window.open("",analisis,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarResultadoAnalisis(autorizacion, path)
|
||||||
|
{
|
||||||
|
var ventanaAnalisis = window.open('<%=request.getContextPath()%>'+ '/jsp/resultado_analitica.jsp?peticion='+ autorizacion,autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
}
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) {//se efectua la impresion
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impAnalitica.jsp?autorizacion=<%=strAutorizacion%>');
|
||||||
|
//var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function nuevaPrescripcion(tieneAnalisis)
|
||||||
|
{
|
||||||
|
if ((tieneAnalisis=="no") || (despla==true))
|
||||||
|
{
|
||||||
|
<!-- Para la nueva pagina de solicitud de analiticas con niveles hemos cambiado este destino -->
|
||||||
|
<!-- document.frmSolicitudPrescripcion.action = " %=request.getContextPath()%>/jsp/pac/solicitudAnalitica.jsp?x= %=strParametroMenu%>"; -->
|
||||||
|
<!-- por este otro: solicitudAnaliticaNiveles.jsp -->
|
||||||
|
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/solicitudAnaliticaNiveles.jsp?x=<%=strParametroMenu%>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/justificacionAnalitica.jsp?x=<%=strParametroMenu%>";
|
||||||
|
}
|
||||||
|
|
||||||
|
document.frmSolicitudPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.pagina.value=pagina;
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function submitform()
|
||||||
|
{
|
||||||
|
document.frmAnalitica.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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="<%=pathSpgif%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td><script language="JavaScript">escribirMenuGst();</script></td></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%">
|
||||||
|
<%
|
||||||
|
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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="100%">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||||
|
<form name="frmPrescripcion" action="analitica.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||||
|
<form name="frmSolicitudPrescripcion" action="" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico();
|
||||||
|
String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||||
|
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||||
|
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();
|
||||||
|
/*Vector vSeleccion = per.listado_analiticas_paciente(cole, poli, orde, dtFechaAnalisis, intPagina);*/
|
||||||
|
|
||||||
|
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
/*Vector vSeleccion2 = per.listado_analiticas_por_tarjeta(pac, intPagina);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Nueva select resultados analitica tapresca_tarisan. Tenemos resultados: " + vSeleccion2.size());*/
|
||||||
|
|
||||||
|
String vael = null;
|
||||||
|
|
||||||
|
/*for(int i = 0; i < vSeleccion2.size(); i++)
|
||||||
|
{
|
||||||
|
vSeleccion.addElement(vSeleccion2.elementAt(i));
|
||||||
|
}*/
|
||||||
|
|
||||||
|
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
Vector vSeleccion = per.listado_analiticas_por_paciente(cole, poli, orde, dtFechaAnalisis, pac, medico, intPagina);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados analitica tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||||
|
/*int prueba = per.prueba_conexion();*/
|
||||||
|
|
||||||
|
/*Vector vPagiancion = new Vector();
|
||||||
|
vPagiancion = Utilidades.ObtenerPaginacionDeUnVector(vSeleccion, intPagina);*/
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(67).getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" 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 Solicitud</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver Resultados</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Regenerar Resultados</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
|
||||||
|
VTaresanaTamedico vTaresanaTamedico = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
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"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getAutorizacion()%></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else //campo autorizacion tiene un valor valido
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
String peticion = ""+vTaresanaTamedico.getAutorizacion();
|
||||||
|
/*peticion = (peticion.length()<8)?"0"+peticion:peticion;*/
|
||||||
|
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ón
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<form name="resultados" 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="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" 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="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="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<span align="center"><%=peticion%></span>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
|
||||||
|
PersistenciaPaciente perPac = new PersistenciaPaciente();
|
||||||
|
Paciente pacient = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
|
||||||
|
|
||||||
|
String autorizado = pacient.getAutorizado();
|
||||||
|
if(autorizado == null)
|
||||||
|
autorizado = "N";
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizado: "+pacient.getAutorizado());
|
||||||
|
String igua = vTaresanaTamedico.getIgualada();
|
||||||
|
if(igua == null)
|
||||||
|
igua = "0";
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Igua: "+igua);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, vTaresanaTamedico.getAutorizacion());
|
||||||
|
|
||||||
|
String resultado = ""+vTaresanaTamedico.getAutorizacion();
|
||||||
|
String resultadoE = ""+vTaresanaTamedico.getAutorizacionEncriptada();
|
||||||
|
String igualadaE = ""+vTaresanaTamedico.getIgualadaEncriptada();
|
||||||
|
|
||||||
|
//Buscar los PDF con ceros
|
||||||
|
String resultadoConCeros=resultado;
|
||||||
|
do{
|
||||||
|
resultadoConCeros = (resultado.length()<8)?"0"+resultadoConCeros:resultadoConCeros;
|
||||||
|
}while (resultadoConCeros.length() < 8);
|
||||||
|
|
||||||
|
if((autorizado.toUpperCase().compareTo("S") == 0) || usu.getMedico() == vTaresanaTamedico.getPrescriptor())
|
||||||
|
{
|
||||||
|
|
||||||
|
// 16/06/2018 Nuvea comprobación para mostrar los pdfs que subimos a mano(ej: los desplazados que se hacen la extracción en CSM)
|
||||||
|
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="<%=/*fichero.getName()*/resultadoE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
if (vTaresanaTamedico.getExtraccion()!=0 && vTaresanaTamedico.getExtraccion()!=3){ // Mirar si la analítica está pendiente de extracción
|
||||||
|
|
||||||
|
if(igua.compareTo("0") != 0){ //Comprobar si se trata de una autorización que está 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="<%=/*igua*/igualadaE%>">
|
||||||
|
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
if(vTaresanaTamedico.isPeticionConGuion())
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<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))
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<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 resultado = ""+vTaresanaTamedico.getAutorizacion();
|
||||||
|
resultado = (resultado.length()<8)?"0"+resultado:resultado;*/
|
||||||
|
/*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="<%=/*fichero.getName()*/resultadoE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="Ver Resultado" 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="<%=/*fichero.getName()*/resultadoE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="Ver Resultado" 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 Resultado" 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 Resultado" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
//Buscamos en los mismos sitios pero con los ceros en el nombre del PDF
|
||||||
|
DES encrypter = new DES(""+medico);
|
||||||
|
String resultadoConCerosE = encrypter.encrypt(resultadoConCeros);
|
||||||
|
|
||||||
|
|
||||||
|
direccion = ParametrosConfiguracion.ruta_pdf_resultados_analiticas;
|
||||||
|
fichero = new File(direccion+resultadoConCeros+".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="<%=/*fichero.getName()*/resultadoConCerosE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fichero = new File(direccion+resultadoConCeros+".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="<%=/*fichero.getName()*/resultadoConCerosE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
direccion = ParametrosConfiguracion.ruta_pdf_resultados;
|
||||||
|
fichero = new File(direccion+resultadoConCeros+".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()*/resultadoConCerosE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||||
|
</form><%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fichero = new File(direccion+resultadoConCeros+".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()*/resultadoConCerosE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="Ver Resultado" 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ón anulada en GPC</p><%
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
pteExtraccion = 1;
|
||||||
|
%><p>Pendiente de Extracción</p><%
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%><p><%=pertamensaje.obtenerMensaje(66).getMensaje() %></p><% //Pendiente de Autorización del paciente
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
/*PersistenciaPaciente perPac = new PersistenciaPaciente();
|
||||||
|
Paciente pacient = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
|
||||||
|
|
||||||
|
String autorizado = pacient.getAutorizado();
|
||||||
|
if(autorizado == null)
|
||||||
|
autorizado = "N";
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizado: "+pacient.getAutorizado());
|
||||||
|
String igua = vTaresanaTamedico.getIgualada();
|
||||||
|
if(igua == null)
|
||||||
|
igua = "0";
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Igua: "+igua);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, vTaresanaTamedico.getAutorizacion());
|
||||||
|
autorizado="S";*/
|
||||||
|
if(((autorizado.toUpperCase().compareTo("S") == 0) || usu.getMedico() == vTaresanaTamedico.getPrescriptor()) && pteExtraccion==0)
|
||||||
|
{
|
||||||
|
if(igua.compareTo("0") != 0){ //Comprobar si se trata de una autorización que está 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ón del paciente
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
</td>
|
||||||
|
<%
|
||||||
|
int diaHoy = hoy.getDate();
|
||||||
|
int mesHoy = hoy.getMonth();
|
||||||
|
int anoHoy = hoy.getYear();
|
||||||
|
|
||||||
|
int diaAnalisis = vTaresanaTamedico.getFecha().getDate();
|
||||||
|
int mesAnalisis = vTaresanaTamedico.getFecha().getMonth();
|
||||||
|
int anoAnalisis = vTaresanaTamedico.getFecha().getYear();
|
||||||
|
|
||||||
|
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){ %>
|
||||||
|
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/solicitudAnaliticaNiveles.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=vTaresanaTamedico.getAutorizacion()%>&pagina=1" class="enlaceAnalisis">Editar</a></td>
|
||||||
|
<%}else{ %>
|
||||||
|
<td class="<%=estilo%>" align="center">-</td>
|
||||||
|
<%}%>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
/*strSql_requestid.delete(0,strSql_requestid.length());*/
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" align="center"><a href="javascript:nuevaPrescripcion('si')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||||
|
<tr><td colspan="2"></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6">
|
||||||
|
<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/analitica.jsp?x=4&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/pac/analitica.jsp?x=4&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">ú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/pac/analitica.jsp?x=4&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">último</a></td>-->
|
||||||
|
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/analitica.jsp?x=4&pagina=<%=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="4"/>
|
||||||
|
<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 analitica (pac/analitica.jsp)");
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
@@ -0,0 +1,702 @@
|
|||||||
|
<%@ 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.util.DES" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="java.io.*" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.math.BigDecimal"%>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/anatomia.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de anatomia patologica (pac/anatomia.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables param2
|
||||||
|
boolean desplazado = false;
|
||||||
|
String strParametroMenu="";
|
||||||
|
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||||
|
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||||
|
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
StringBuffer strSql2 = new StringBuffer();
|
||||||
|
StringBuffer strSql_requestid = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
Object bCondiciones[]=null;
|
||||||
|
Object Condiciones[]=null;
|
||||||
|
Object aCondiciones_requestid[]=null;
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
int intImpresion = 0;
|
||||||
|
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||||
|
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
String strInformePrescripcion = "";
|
||||||
|
String strAutorizacion="";
|
||||||
|
|
||||||
|
//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 impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro informePrescripcion utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("informePrescripcion")!=null)
|
||||||
|
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||||
|
|
||||||
|
//atributo autorizacion utilizado para realizar la impresion
|
||||||
|
if (request.getAttribute("autorizacion")!=null) {
|
||||||
|
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||||
|
{
|
||||||
|
desplazado = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Anatomía Patoloógica</title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
var despla = <%= desplazado %>;
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function obtenerInformePrescripcion()
|
||||||
|
{
|
||||||
|
//preparamos el informe de prescripcion
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||||
|
//dependiendo del navegador el salto de linea es diferente.
|
||||||
|
//explorer => \r\n
|
||||||
|
//netscape 6 => \n
|
||||||
|
<%
|
||||||
|
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||||
|
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||||
|
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores del informe sin comillas simples
|
||||||
|
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original
|
||||||
|
while(informePrescripcion.indexOf("~")!=-1)
|
||||||
|
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
return informePrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) {//se efectua la impresion
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function nuevaPrescripcion(tieneAnalisis)
|
||||||
|
{
|
||||||
|
if ((tieneAnalisis=="no") || (despla==true))
|
||||||
|
{
|
||||||
|
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/solicitudAnatomiaNiveles.jsp?x=<%=strParametroMenu%>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/justificacionAnalitica.jsp?x=<%=strParametroMenu%>&tipo=anato";
|
||||||
|
}
|
||||||
|
|
||||||
|
document.frmSolicitudPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.pagina.value=pagina;
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function submitform()
|
||||||
|
{
|
||||||
|
document.frmAnalitica.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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></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%">
|
||||||
|
<%
|
||||||
|
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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="100%">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||||
|
<form name="frmPrescripcion" action="anatomia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||||
|
<form name="frmSolicitudPrescripcion" action="" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico();
|
||||||
|
String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||||
|
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||||
|
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();
|
||||||
|
|
||||||
|
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
Vector vSeleccion = per.listado_anatomia_por_paciente(cole, poli, orde, dtFechaAnalisis, pac, medico, intPagina);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados analitica tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(71).getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></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">Fecha Solicitud</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver resultados</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
|
||||||
|
VTaresanaTamedico vTaresanaTamedico = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
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"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getAutorizacion()%></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else //campo autorizacion tiene un valor valido
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||||
|
<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="resultados" 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="<%=peticion%>" class="enlacePeticion"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
|
||||||
|
ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||||
|
if(ficheroPeticion.exists()) //Buesco en la ubicación vieja
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<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="<%=peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<span align="center"><%=peticion%></span>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
PersistenciaPaciente perPac = new PersistenciaPaciente();
|
||||||
|
Paciente pacient = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
|
||||||
|
|
||||||
|
String autorizado = pacient.getAutorizado();
|
||||||
|
if(autorizado == null)
|
||||||
|
autorizado = "N";
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizado: "+pacient.getAutorizado());
|
||||||
|
String igua = vTaresanaTamedico.getIgualada();
|
||||||
|
if(igua == null)
|
||||||
|
igua = "0";
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Igua: "+igua);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, vTaresanaTamedico.getAutorizacion());
|
||||||
|
autorizado = "S";
|
||||||
|
if((autorizado.toUpperCase().compareTo("S") == 0) || usu.getMedico() == vTaresanaTamedico.getPrescriptor())
|
||||||
|
{
|
||||||
|
|
||||||
|
if(vTaresanaTamedico.getEpisodio()!=0){
|
||||||
|
|
||||||
|
Integer Nuevoepisodio = vTaresanaTamedico.getEpisodio();
|
||||||
|
Hce_doc_ext_ap hce_doc_ext_ap = null;
|
||||||
|
PersistenciaHce_doc_ext_ap nueva_per = new PersistenciaHce_doc_ext_ap();
|
||||||
|
Vector nuevos_pdfs = new Vector();
|
||||||
|
try{
|
||||||
|
nuevos_pdfs = nueva_per.seleccionar(Nuevoepisodio);
|
||||||
|
}catch(ExcepcionTarisan ex){
|
||||||
|
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||||
|
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||||
|
response.sendRedirect("../error.jsp");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nuevos_pdfs == null) {
|
||||||
|
%><p>No hay archivos</p><%
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (int f=0; f < nuevos_pdfs.size() ; f++) {
|
||||||
|
hce_doc_ext_ap = (Hce_doc_ext_ap)nuevos_pdfs.elementAt(f);
|
||||||
|
String filename = hce_doc_ext_ap.getNombre_doc();
|
||||||
|
|
||||||
|
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia_CSM;
|
||||||
|
File archivo = new File(direccion+filename+".pdf");
|
||||||
|
|
||||||
|
if(archivo.exists())
|
||||||
|
{
|
||||||
|
DES encrypter = new DES(""+medico);
|
||||||
|
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
|
||||||
|
{
|
||||||
|
%><p>No hay resultados</p><%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia;
|
||||||
|
File fichero = new File(direccion+peticion+".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="<%=peticionE%>" />
|
||||||
|
<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+peticion+".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="<%=peticionE%>" />
|
||||||
|
<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+peticion+".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()*/peticionE%>" />
|
||||||
|
<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+peticion+".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()*/peticionE%>" />
|
||||||
|
<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(66).getMensaje() %></p>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<%
|
||||||
|
int diaHoy = hoy.getDate();
|
||||||
|
int mesHoy = hoy.getMonth();
|
||||||
|
int anoHoy = hoy.getYear();
|
||||||
|
|
||||||
|
int diaAnalisis = vTaresanaTamedico.getFecha().getDate();
|
||||||
|
int mesAnalisis = vTaresanaTamedico.getFecha().getMonth();
|
||||||
|
int anoAnalisis = vTaresanaTamedico.getFecha().getYear();
|
||||||
|
|
||||||
|
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){ %>
|
||||||
|
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/solicitudAnatomiaNiveles.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=vTaresanaTamedico.getAutorizacion()%>&pagina=1" class="enlaceAnalisis">Editar</a></td>
|
||||||
|
<%}else{ %>
|
||||||
|
<td class="<%=estilo%>" align="center">-</td>
|
||||||
|
<%}%>
|
||||||
|
<%
|
||||||
|
strSql_requestid.delete(0,strSql_requestid.length());
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion('si')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||||
|
<tr><td colspan="2"></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 width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&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/pac/anatomia.jsp?x=4&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">ú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/pac/anatomia.jsp?x=4&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">último</a></td>-->
|
||||||
|
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=<%=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="6"/>
|
||||||
|
<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 anatomia (pac/anatomia.jsp)");
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
@@ -0,0 +1,660 @@
|
|||||||
|
<%@ 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.util.DES" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="java.io.*" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.math.BigDecimal"%>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/anatomia.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de anatomia patologica (pac/anatomia.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables param2
|
||||||
|
boolean desplazado = false;
|
||||||
|
String strParametroMenu="";
|
||||||
|
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||||
|
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||||
|
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
StringBuffer strSql2 = new StringBuffer();
|
||||||
|
StringBuffer strSql_requestid = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
Object bCondiciones[]=null;
|
||||||
|
Object Condiciones[]=null;
|
||||||
|
Object aCondiciones_requestid[]=null;
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
int intImpresion = 0;
|
||||||
|
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||||
|
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
String strInformePrescripcion = "";
|
||||||
|
String strAutorizacion="";
|
||||||
|
|
||||||
|
//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 impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro informePrescripcion utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("informePrescripcion")!=null)
|
||||||
|
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||||
|
|
||||||
|
//atributo autorizacion utilizado para realizar la impresion
|
||||||
|
if (request.getAttribute("autorizacion")!=null) {
|
||||||
|
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||||
|
{
|
||||||
|
desplazado = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Anatomía Patológica</title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
var despla = <%= desplazado %>;
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("�") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("�")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("�"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("�") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function obtenerInformePrescripcion()
|
||||||
|
{
|
||||||
|
//preparamos el informe de prescripcion
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||||
|
//dependiendo del navegador el salto de linea es diferente.
|
||||||
|
//explorer => \r\n
|
||||||
|
//netscape 6 => \n
|
||||||
|
<%
|
||||||
|
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||||
|
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||||
|
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores del informe sin comillas simples
|
||||||
|
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original
|
||||||
|
while(informePrescripcion.indexOf("~")!=-1)
|
||||||
|
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
return informePrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) {//se efectua la impresion
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function nuevaPrescripcion(tieneAnalisis)
|
||||||
|
{
|
||||||
|
if ((tieneAnalisis=="no") || (despla==true))
|
||||||
|
{
|
||||||
|
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/solicitudAnatomiaNiveles.jsp?x=<%=strParametroMenu%>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/justificacionAnalitica.jsp?x=<%=strParametroMenu%>&tipo=anato";
|
||||||
|
}
|
||||||
|
|
||||||
|
document.frmSolicitudPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.pagina.value=pagina;
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function submitform()
|
||||||
|
{
|
||||||
|
document.frmAnalitica.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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></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%">
|
||||||
|
<%
|
||||||
|
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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="100%">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||||
|
<form name="frmPrescripcion" action="anatomia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||||
|
<form name="frmSolicitudPrescripcion" action="" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico();
|
||||||
|
String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||||
|
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||||
|
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();
|
||||||
|
|
||||||
|
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
Vector vSeleccion = per.listado_anatomia_por_paciente(cole, poli, orde, dtFechaAnalisis, pac, medico, intPagina);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados analitica tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(71).getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></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">Fecha Solicitud</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver resultados</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
|
||||||
|
VTaresanaTamedico vTaresanaTamedico = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
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"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getAutorizacion()%></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else //campo autorizacion tiene un valor valido
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||||
|
<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="resultados" 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="<%=peticion%>" class="enlacePeticion"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
|
||||||
|
ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||||
|
if(ficheroPeticion.exists()) //Buesco en la ubicación vieja
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<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="<%=peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<span align="center"><%=peticion%></span>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
PersistenciaPaciente perPac = new PersistenciaPaciente();
|
||||||
|
Paciente pacient = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
|
||||||
|
|
||||||
|
String autorizado = pacient.getAutorizado();
|
||||||
|
if(autorizado == null)
|
||||||
|
autorizado = "N";
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizado: "+pacient.getAutorizado());
|
||||||
|
String igua = vTaresanaTamedico.getIgualada();
|
||||||
|
if(igua == null)
|
||||||
|
igua = "0";
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Igua: "+igua);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, vTaresanaTamedico.getAutorizacion());
|
||||||
|
autorizado = "S";
|
||||||
|
if((autorizado.toUpperCase().compareTo("S") == 0) || usu.getMedico() == vTaresanaTamedico.getPrescriptor())
|
||||||
|
{
|
||||||
|
|
||||||
|
if(vTaresanaTamedico.getEpisodio()!=0){
|
||||||
|
|
||||||
|
|
||||||
|
String episodio = ""+vTaresanaTamedico.getEpisodio();
|
||||||
|
String episodioE = ""+vTaresanaTamedico.getEpisodioEncriptado();
|
||||||
|
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia;
|
||||||
|
Vector<String> children = Utilidades.buscar_ficheros(episodio,direccion);
|
||||||
|
|
||||||
|
if (children == null) {
|
||||||
|
%><p>No hay archivos</p><%
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (int f=0; f < children.size() ; f++) {
|
||||||
|
String filename = children.elementAt(f);
|
||||||
|
DES encrypter = new DES(""+medico);
|
||||||
|
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="2"/>
|
||||||
|
<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{
|
||||||
|
String resultado = ""+vTaresanaTamedico.getAutorizacion();
|
||||||
|
/*resultado = (resultado.length()<8)?"0"+resultado:resultado;*/
|
||||||
|
String resultadoE = ""+vTaresanaTamedico.getAutorizacionEncriptada();
|
||||||
|
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+Long.valueOf(vTaresanaTamedico.getAutorizacion()).toString()+".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
|
||||||
|
{
|
||||||
|
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<p><%=pertamensaje.obtenerMensaje(66).getMensaje() %></p>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<%
|
||||||
|
int diaHoy = hoy.getDate();
|
||||||
|
int mesHoy = hoy.getMonth();
|
||||||
|
int anoHoy = hoy.getYear();
|
||||||
|
|
||||||
|
int diaAnalisis = vTaresanaTamedico.getFecha().getDate();
|
||||||
|
int mesAnalisis = vTaresanaTamedico.getFecha().getMonth();
|
||||||
|
int anoAnalisis = vTaresanaTamedico.getFecha().getYear();
|
||||||
|
|
||||||
|
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){ %>
|
||||||
|
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/solicitudAnatomiaNiveles.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=vTaresanaTamedico.getAutorizacion()%>&pagina=1" class="enlaceAnalisis">Editar</a></td>
|
||||||
|
<%}else{ %>
|
||||||
|
<td class="<%=estilo%>" align="center">-</td>
|
||||||
|
<%}%>
|
||||||
|
<%
|
||||||
|
strSql_requestid.delete(0,strSql_requestid.length());
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion('si')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||||
|
<tr><td colspan="2"></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 width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&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/pac/anatomia.jsp?x=4&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">ú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/pac/anatomia.jsp?x=4&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">último</a></td>-->
|
||||||
|
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=<%=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="6"/>
|
||||||
|
<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 anatomia (pac/anatomia.jsp)");
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
@@ -0,0 +1,441 @@
|
|||||||
|
<%@ 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.util.Vector" %>
|
||||||
|
<%@ page import="java.io.*" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
|
||||||
|
<%@ page import="java.math.BigDecimal"%>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de ats (pac/ats.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables param2
|
||||||
|
String strParametroMenu="";
|
||||||
|
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||||
|
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||||
|
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
StringBuffer strSql2 = new StringBuffer();
|
||||||
|
StringBuffer strSql_requestid = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
Object bCondiciones[]=null;
|
||||||
|
Object Condiciones[]=null;
|
||||||
|
Object aCondiciones_requestid[]=null;
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
int intImpresion = 0;
|
||||||
|
String strAutorizacion="";
|
||||||
|
|
||||||
|
//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 impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//atributo autorizacion utilizado para realizar la impresion
|
||||||
|
if (request.getAttribute("autorizacion")!=null) {
|
||||||
|
/*strAutorizacion=(String)request.getAttribute("autorizacion"); */
|
||||||
|
strAutorizacion=""+request.getAttribute("autorizacion");
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>ATS</title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery-ui.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery-ui.min.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/theme.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-ui.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-ui.min.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) {//se efectua la impresion
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impAnalitica.jsp?autorizacion=<%=strAutorizacion%>');
|
||||||
|
//var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function nuevaPrescripcion()
|
||||||
|
{
|
||||||
|
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/prescripcion_ats.jsp?x=<%=strParametroMenu%>";
|
||||||
|
document.frmSolicitudPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.pagina.value=pagina;
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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></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%">
|
||||||
|
<%
|
||||||
|
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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="100%">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||||
|
<form name="frmPrescripcion" action="ats.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<!-- formulario para enviar la peticion a la pagina de prescripcion ats -->
|
||||||
|
<form name="frmSolicitudPrescripcion" action="" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
PersistenciaTaconaut per = new PersistenciaTaconaut();
|
||||||
|
String tarj = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta() )).toString();
|
||||||
|
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
Vector vSeleccion = per.ObtenerPrescripcionesPorPaciente(tarj, medico, intPagina);
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="txt">El paciente no tiene ninguna prescripción ats efectuada.</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva prescripción</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
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">Fecha Modificacion</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorizacion</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
|
||||||
|
Taconaut taconaut = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
taconaut = (Taconaut)vSeleccion.elementAt(i);
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr class="trResultados">
|
||||||
|
<td class="<%=estilo%>" align="center"><%=(sdfFormateadorFecha.format(taconaut.getFechaModificacion())==null)?"":sdfFormateadorFecha.format(taconaut.getFechaModificacion())%></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=taconaut.getActo()%></td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
String peticion = ""+taconaut.getAutorizacion();
|
||||||
|
String peticionE = ""+taconaut.getAutorizacionEncriptada();
|
||||||
|
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_ats;
|
||||||
|
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||||
|
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<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="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" 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="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="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<span align="center"><%=peticion%></span>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva prescripción</a></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)" class="enlace">primero</a></td>-->
|
||||||
|
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/ats.jsp?x=13&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/pac/ats.jsp?x=13&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">ú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/pac/ats.jsp?x=13&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">último</a></td>-->
|
||||||
|
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/ats.jsp?x=13&pagina=<%=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="7"/>
|
||||||
|
<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 ats (pac/ats.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,512 @@
|
|||||||
|
<%@ 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.util.Vector" %>
|
||||||
|
<%@ page import="java.io.*" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.math.BigDecimal"%>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/analitica.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
/*else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/solicitudAnaliticaNiveles.jsp?x=4&pagina=1");
|
||||||
|
}*/
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de peticiones (pac/peticiones.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables param2
|
||||||
|
boolean desplazado = false;
|
||||||
|
String strParametroMenu="";
|
||||||
|
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||||
|
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||||
|
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
StringBuffer strSql2 = new StringBuffer();
|
||||||
|
StringBuffer strSql_requestid = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
Object bCondiciones[]=null;
|
||||||
|
Object Condiciones[]=null;
|
||||||
|
Object aCondiciones_requestid[]=null;
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
int intImpresion = 0;
|
||||||
|
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||||
|
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
String strInformePrescripcion = "";
|
||||||
|
String strAutorizacion="";
|
||||||
|
|
||||||
|
//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 impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro informePrescripcion utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("informePrescripcion")!=null)
|
||||||
|
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||||
|
|
||||||
|
//atributo autorizacion utilizado para realizar la impresion
|
||||||
|
if (request.getAttribute("autorizacion")!=null) {
|
||||||
|
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||||
|
{
|
||||||
|
desplazado = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Autorización</title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
var despla = <%= desplazado %>;
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) {//se efectua la impresion
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impAnalitica.jsp?autorizacion=<%=strAutorizacion%>');
|
||||||
|
//var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function nuevaPrescripcion()
|
||||||
|
{
|
||||||
|
document.frmSolicitudPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.pagina.value=pagina;
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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></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%">
|
||||||
|
<%
|
||||||
|
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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="100%">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||||
|
<form name="frmPrescripcion" action="autorizacion.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||||
|
<form name="frmSolicitudPrescripcion" action="<%=request.getContextPath()%>/jsp/pac/autorizacion.jsp?x=<%=strParametroMenu%>&pagina=1" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
PersistenciaTapresca per = new PersistenciaTapresca();
|
||||||
|
/*String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||||
|
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||||
|
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();*/
|
||||||
|
|
||||||
|
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
String vael = null;
|
||||||
|
|
||||||
|
Vector vSeleccion = per.listado_peticiones_por_paciente(intMedico, pac, intPagina, /*4*/5); //El último número es el tipo de petición (en este caso autorizaciones)
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados peticiones tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||||
|
/*int prueba = per.prueba_conexion();*/
|
||||||
|
|
||||||
|
/*Vector vPagiancion = new Vector();
|
||||||
|
vPagiancion = Utilidades.ObtenerPaginacionDeUnVector(vSeleccion, intPagina);*/
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(70).getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace">Nueva Petición</a></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">Fecha Solicitud</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Especialidad</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Texto</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
|
||||||
|
Tapresca tapresca = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
tapresca = (Tapresca)vSeleccion.elementAt(i);
|
||||||
|
String txt = "";
|
||||||
|
txt = tapresca.getTexto();
|
||||||
|
if (txt == null){
|
||||||
|
txt = "-";
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr class="trResultados">
|
||||||
|
<%
|
||||||
|
if (tapresca.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tapresca.getFecha())%></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else //campo autorizacion tiene un valor valido
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tapresca.getFecha())%></td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
String peticion = ""+tapresca.getAutorizacion();
|
||||||
|
/*peticion = (peticion.length()<8)?"0"+peticion:peticion;*/
|
||||||
|
String peticionE = tapresca.getAutorizacionEncriptada();
|
||||||
|
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_autorizaciones;
|
||||||
|
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||||
|
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||||
|
<input type="hidden" name="tipo" value="8"/>
|
||||||
|
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" 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="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="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<span align="center"><%=peticion%></span>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=tapresca.getEspecialidad()%></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=txt%></td>
|
||||||
|
<%
|
||||||
|
int diaHoy = hoy.getDate();
|
||||||
|
int mesHoy = hoy.getMonth();
|
||||||
|
int anoHoy = hoy.getYear();
|
||||||
|
|
||||||
|
int diaAnalisis = tapresca.getFecha().getDate();
|
||||||
|
int mesAnalisis = tapresca.getFecha().getMonth();
|
||||||
|
int anoAnalisis = tapresca.getFecha().getYear();
|
||||||
|
|
||||||
|
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){
|
||||||
|
PersistenciaTaespeci perTaes = new PersistenciaTaespeci();
|
||||||
|
/*int pa = perTaes.paginaDeLaEspecialidad(tapresca.getEspecialidad());*/
|
||||||
|
int pa = 1;
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/autorizacion.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=tapresca.getAutorizacion()%>&pagina=<%=pa%>" class="enlaceAnalisis">Editar</a></td>
|
||||||
|
<%}else{ %>
|
||||||
|
<td class="<%=estilo%>" align="center">-</td>
|
||||||
|
<%}%>
|
||||||
|
<%
|
||||||
|
strSql_requestid.delete(0,strSql_requestid.length());
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva Petición</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||||
|
<tr><td colspan="2"></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 width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/autorizaciones.jsp?x=3&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/pac/autorizaciones.jsp?x=3&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">ú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/pac/autorizaciones.jsp?x=3&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">último</a></td>-->
|
||||||
|
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/autorizaciones.jsp?x=3&pagina=<%=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="8"/>
|
||||||
|
<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 analitica (pac/analitica.jsp)");
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
@@ -0,0 +1,323 @@
|
|||||||
|
<%@ 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 pacientes (pac/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ón invalidada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de pacientes (med/detallePacientes.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strFecha = "";
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
int intPagina = 0;
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
java.sql.Date hoy = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||||
|
|
||||||
|
//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 fecha que indica el año para el que desea realizar la impresion
|
||||||
|
if (request.getParameter("fecha")!=null)
|
||||||
|
strFecha=(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"));
|
||||||
|
}
|
||||||
|
|
||||||
|
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">
|
||||||
|
|
||||||
|
<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_pac.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.frmDetallePacientes.pagina.value=pagina;
|
||||||
|
document.frmDetallePacientes.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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 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="230px"></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" align="center" class="txtnegrita">DETALLE DIARIO DE PACIENTES</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
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_diario(intPagina, aCondiciones);
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </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á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ón</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</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>
|
||||||
|
</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">ú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(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ágina de pacientes (pac/detallePacientes.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,628 @@
|
|||||||
|
<%@ 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.Base64" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="com.tarisan.util.DES" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.sql.Timestamp" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
<%@ page import="java.math.BigDecimal"%>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="java.io.*" %>
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de diagnostico (pac/diagnostico_NEW.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");
|
||||||
|
sesion.setAttribute("USUARIO", null);
|
||||||
|
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de diagnostico (pac/diagnostico_NEW.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu="";
|
||||||
|
Calendar calFechaRx = Calendar.getInstance();
|
||||||
|
calFechaRx.add(Calendar.MONTH, -ParametrosConfiguracion.periodoRx);
|
||||||
|
java.sql.Date dtFechaRx = new java.sql.Date(calFechaRx.getTime().getTime());
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
int intImpresion = 0;
|
||||||
|
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
String strInformePrescripcion = "";
|
||||||
|
String strAutorizacion="";
|
||||||
|
|
||||||
|
//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 impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro informePrescripcion utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("informePrescripcion")!=null)
|
||||||
|
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||||
|
|
||||||
|
//atributo autorizacion utilizado para realizar la impresion
|
||||||
|
if (request.getAttribute("autorizacion")!=null) {
|
||||||
|
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Diagnostico</title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery-ui.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery-ui.min.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/theme.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-ui.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-ui.min.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function obtenerInformePrescripcion()
|
||||||
|
{
|
||||||
|
//preparamos el informe de prescripcion
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||||
|
//dependiendo del navegador el salto de linea es diferente.
|
||||||
|
//explorer => \r\n
|
||||||
|
//netscape 6 => \n
|
||||||
|
<%
|
||||||
|
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||||
|
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||||
|
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores del informe sin comillas simples
|
||||||
|
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original
|
||||||
|
while(informePrescripcion.indexOf("~")!=-1)
|
||||||
|
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
return informePrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) { //se efectua la impresion
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDiagnostico.jsp?autorizacion=<%=strAutorizacion%>');
|
||||||
|
//var ventanaDiagnos = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function nuevaPrescripcion()
|
||||||
|
{
|
||||||
|
document.frmSolicitudPrescripcion.submit();
|
||||||
|
}
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.pagina.value=pagina;
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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 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="220"></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="100%">
|
||||||
|
<%
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||||
|
<form name="frmPrescripcion" action="diagnostico.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<!-- formulario para enviar la peticion a la pagina de solicitud de diagnostico -->
|
||||||
|
<form name="frmSolicitudPrescripcion" action="<%=request.getContextPath()%>/jsp/pac/solicitudDiagnosticoNiveles.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
Paciente pac = new Paciente();
|
||||||
|
pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
String colec,pol,ord;
|
||||||
|
colec = Long.valueOf(pac.getTarjeta().getColectivo()).toString();
|
||||||
|
pol = new BigDecimal(pac.getTarjeta().getPoliza()).toString();
|
||||||
|
ord = Integer.valueOf(pac.getTarjeta().getBeneficiario()).toString();
|
||||||
|
int med = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
|
||||||
|
PersistenciaVTaprescaTaclient per = new PersistenciaVTaprescaTaclient();
|
||||||
|
/*Vector vSeleccion = per.listado_diagnostico_gpc_por_cliente(numafil, intPagina);*/
|
||||||
|
Vector vSeleccion = per.listado_rx_por_paciente(colec, pol, ord, dtFechaRx, med, intPagina);
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Resultados radiodiagnosticos: " + vSeleccion.size());
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><span class="txt">El paciente no tiene ningún radiodiagnóstico efectuado durante los últimos <%=ParametrosConfiguracion.periodoAnalisis%> meses.</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="5"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva prescripción</a></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">Fecha</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prueba Realizada</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Informe</td>
|
||||||
|
<%
|
||||||
|
//Para evitar que salga el enlace de ver las imágenes
|
||||||
|
//<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver Imagenes</td> %>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
|
||||||
|
/*VTaresanaTaclient vTaresanaTaclient = null;*/
|
||||||
|
Ttrayos ttrayos = 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); */
|
||||||
|
ttrayos = (Ttrayos)vSeleccion.elementAt(i);
|
||||||
|
%>
|
||||||
|
<tr class="trResultados">
|
||||||
|
|
||||||
|
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
String peticion = ""+ttrayos.getPeticion() ;
|
||||||
|
/*peticion = (peticion.length()<8)?"0"+peticion:peticion;*/
|
||||||
|
String peticionE = ""+ttrayos.getPeticionEncriptada();
|
||||||
|
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_rx;
|
||||||
|
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||||
|
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||||
|
<input type="hidden" name="tipo" value="14"/>
|
||||||
|
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=sdfFormateadorFecha.format(ttrayos.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="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="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=sdfFormateadorFecha.format(ttrayos.getFecha())%>" class="enlacePeticion"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<span align="center"><%=sdfFormateadorFecha.format(ttrayos.getFecha())%></span>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=ttrayos.getPrescriptor()%></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=ttrayos.getPrueba()%></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><table><tr>
|
||||||
|
<%
|
||||||
|
String episodioE = ttrayos.getEpisodioEncriptado();
|
||||||
|
String nhc = "NHC_"+ttrayos.getNhc().trim();
|
||||||
|
String filtro = ttrayos.getEpisodio()+"_";
|
||||||
|
String direccion = ParametrosConfiguracion.ruta_pdf_informes_rx+nhc+"/";
|
||||||
|
|
||||||
|
|
||||||
|
File dir = new File(ParametrosConfiguracion.ruta_pdf_informes_rx+nhc+"/");
|
||||||
|
/*Vector<String> archivos = Utilidades.buscar_ficheros_recursivo_rx(dir);*/
|
||||||
|
Vector<String> archivos = Utilidades.buscar_informes_rx(dir,filtro);
|
||||||
|
|
||||||
|
if ((archivos == null)||(archivos.size() == 0)) {
|
||||||
|
%><%="No hay informe"%><%
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (int f=0; f < archivos.size() ; f++) {
|
||||||
|
String filename = archivos.elementAt(f);
|
||||||
|
DES encrypter = new DES(""+med);
|
||||||
|
/*String*/ ruta = filename.substring(ParametrosConfiguracion.ruta_pdf_informes_rx.length());
|
||||||
|
String[] partes = ruta.split("\\.");
|
||||||
|
ruta = partes[0];
|
||||||
|
String rutaE = encrypter.encrypt(ruta);
|
||||||
|
String MostrarNombre = "Informe " + (f+1);
|
||||||
|
%><td><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px;float:left">
|
||||||
|
<input type="hidden" name="tipo" value="3"/>
|
||||||
|
<input type="hidden" name="nombrePDF" value="<%=rutaE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=MostrarNombre %>" class="enlace"></input>
|
||||||
|
</form></td><%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%></tr></table></td>
|
||||||
|
|
||||||
|
<% /*Con esta url accedemos al pacs para ver las imágenes.
|
||||||
|
https://pacs.clinicasanmiguel.es:8443/Login2.aspx?User="+usuario_codificado+"&Pass="+password_codificado+"&UID="+uid+"&IdPaciente="+num_paciente +"&IdEstudio=&Accession="+num_estudio+"&RequestId=&Modalidades=XSPACS/
|
||||||
|
https://pacs.clinicasanmiguel.es:8443/Login2.aspx?User===QZ0F2bklmZ&Pass=xEjNxQTMxEDMyYDM4ATZ0F2bklmZ&UID=2.16.840.1.113883.2.1.3.7.1000043610&IdPaciente=&IdEstudio=&Accession=43610&RequestId=&Modalidades=XSPACS/
|
||||||
|
uid = '2.16.840.1.113883.2.1.3.7.100000000' + num_estudio (36 caracteres)
|
||||||
|
idpaciente=
|
||||||
|
*/
|
||||||
|
/* String exploracion = new String();
|
||||||
|
exploracion = (Integer.valueOf(vTaresanaTaclient.getAutorizacion())).toString();
|
||||||
|
for(int conta = 0; conta < 5 - longitud ; conta++)
|
||||||
|
{
|
||||||
|
exploracion = "0" + exploracion;
|
||||||
|
}*/
|
||||||
|
/*
|
||||||
|
//Usuario=invertir(base64("fidoate"))
|
||||||
|
//passwd=((fidoate+system.time)base64)invertido
|
||||||
|
//
|
||||||
|
//*/
|
||||||
|
/*String usuario = "fidoate";
|
||||||
|
String passwd = "fidoate";
|
||||||
|
Calendar cal = Calendar.getInstance();
|
||||||
|
int minutos = cal.get(Calendar.MINUTE);
|
||||||
|
cal.set(Calendar.MINUTE, minutos+30);
|
||||||
|
String tiempovalidez = passwd;*/
|
||||||
|
//cal.get(Calendar.HOUR_OF_DAY) + (cal.get(Calendar.MINUTE)+30) + "00";
|
||||||
|
/* if(cal.get(Calendar.DAY_OF_MONTH) < 10){
|
||||||
|
tiempovalidez = tiempovalidez + "0" + cal.get(Calendar.DAY_OF_MONTH);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
tiempovalidez = tiempovalidez + cal.get(Calendar.DAY_OF_MONTH);
|
||||||
|
}
|
||||||
|
if(cal.get(Calendar.MONTH)+1 < 10){
|
||||||
|
tiempovalidez = tiempovalidez + "0" + (cal.get(Calendar.MONTH)+1);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
tiempovalidez = tiempovalidez + (cal.get(Calendar.MONTH)+1);
|
||||||
|
}
|
||||||
|
tiempovalidez = tiempovalidez + cal.get(Calendar.YEAR);
|
||||||
|
if(cal.get(Calendar.HOUR_OF_DAY)<10){
|
||||||
|
tiempovalidez = tiempovalidez + "0" + cal.get(Calendar.HOUR_OF_DAY);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
tiempovalidez = tiempovalidez + cal.get(Calendar.HOUR_OF_DAY);
|
||||||
|
}
|
||||||
|
if(cal.get(Calendar.MINUTE) < 10){
|
||||||
|
tiempovalidez = tiempovalidez + "0" + cal.get(Calendar.MINUTE);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
tiempovalidez = tiempovalidez + cal.get(Calendar.MINUTE);
|
||||||
|
}
|
||||||
|
tiempovalidez = tiempovalidez + "00";
|
||||||
|
usuario = Utilidades.invertir_string(Base64.encode(usuario));
|
||||||
|
//passwd = Utilidades.invertir_string(Base64.encode("fidoate11112011182200"));
|
||||||
|
//https://192.168.2.192/tarisan/jsp/pac/ fidoate06132011103300
|
||||||
|
passwd = Utilidades.invertir_string(Base64.encode(tiempovalidez));*/
|
||||||
|
|
||||||
|
//para que funcione bien el enlace que está aquí comentado hay que quitar los espacios entre el % y el > en:
|
||||||
|
//<%=passwd% >
|
||||||
|
//<%=exploracion% >
|
||||||
|
//<%=vTaresanaTamedico.getAutorizacion()% >
|
||||||
|
|
||||||
|
//<td class="enlace"><a target="blank" href="https://pacs.clinicasanmiguel.es:8443/Login2.aspx?User=<%=usuario% >&Pass=<%=passwd% >&UID=2.16.840.1.113883.2.1.3.7.1<%=exploracion% >&IdPaciente=&IdEstudio=&Accession=<%=vTaresanaTamedico.getAutorizacion()% >&RequestId=&Modalidades=XSPACS/">Ver imagenes</a></td>
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
/*}*/
|
||||||
|
%>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td colspan="5"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva prescripción</a></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/pac/diagnostico.jsp?x=4&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/pac/diagnostico.jsp?x=4&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">ú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/pac/diagnostico.jsp?x=4&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">último</a></td>-->
|
||||||
|
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/diagnostico.jsp?x=4&pagina=<%=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="14"/>
|
||||||
|
<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 diagnostico (pac/diagnostico.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,885 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de otras especialidades (pac/especialidades.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de otras especialidades (pac/especialidades.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ninguna especialidad.";
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampoNombre="";
|
||||||
|
String strListaElementos="";
|
||||||
|
String strListaCodigoElementos="";
|
||||||
|
String strInforme="";
|
||||||
|
int intImpresion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
int paginacion = 0;
|
||||||
|
String strModifiAut="";
|
||||||
|
boolean modificar = false;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
String strInformePrescripcion = "";
|
||||||
|
String strAutorizacion="";
|
||||||
|
|
||||||
|
//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 listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaElementos")!=null)
|
||||||
|
strListaElementos=(String)request.getParameter("listaElementos");
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaCodigoElementos")!=null)
|
||||||
|
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro informePrescripcion utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("informePrescripcion")!=null)
|
||||||
|
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||||
|
|
||||||
|
//atributo autorizacion utilizado para realizar la impresion
|
||||||
|
if (request.getAttribute("autorizacion")!=null)
|
||||||
|
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||||
|
|
||||||
|
//parametro informe para mostrar el informe introducido por el medico
|
||||||
|
if (request.getParameter("informe")!=null)
|
||||||
|
strInforme=(String)request.getParameter("informe");
|
||||||
|
|
||||||
|
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null)
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
|
||||||
|
//parametro autorizacion que se pasa cuando se ha pulsado en editar peticion
|
||||||
|
if (request.getParameter("modifiAuto")!=null)
|
||||||
|
strModifiAut=(String)request.getParameter("modifiAuto");
|
||||||
|
|
||||||
|
Tamensaje tamensaje = new Tamensaje();
|
||||||
|
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||||
|
Tamensaje tamensajeJS = new Tamensaje();
|
||||||
|
tamensajeJS = pertamensaje.obtenerMensaje(4);
|
||||||
|
|
||||||
|
if (strModifiAut!=null && strModifiAut.compareTo("")!=0){
|
||||||
|
|
||||||
|
if ((request.getParameter("paginacion")!=null)&&(request.getParameter("paginacion").compareTo("")!=0)) {
|
||||||
|
paginacion=Integer.parseInt(request.getParameter("paginacion"));
|
||||||
|
}
|
||||||
|
if (paginacion==0){
|
||||||
|
modificar = true;
|
||||||
|
PersistenciaTapresca per = new PersistenciaTapresca();
|
||||||
|
Vector vSeleccion = new Vector();
|
||||||
|
vSeleccion = per.obtenerEspecialidadOtrasPeticiones(Long.parseLong(strModifiAut));
|
||||||
|
if (vSeleccion.size()!=0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
Tapresca tapresca = new Tapresca();
|
||||||
|
tapresca = (Tapresca)vSeleccion.firstElement();
|
||||||
|
strListaCodigoElementos = ""+tapresca.getEspecialidad();
|
||||||
|
PersistenciaTaespeci perTaespeci = new PersistenciaTaespeci();
|
||||||
|
strListaElementos = perTaespeci.obtenerDescripcionEspecialidad(tapresca.getEspecialidad());
|
||||||
|
strListaElementosPrescripcion = strListaElementos;
|
||||||
|
strInforme = tapresca.getTexto();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
paginacion=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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>Especialidades</title>
|
||||||
|
<link rel="shortcut icon" href="<%=request.getContextPath()%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/jquery.modal.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/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" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = new Array();
|
||||||
|
var vCodigoElementos = new Array();
|
||||||
|
var intNumeroCheckBoxes = 0;
|
||||||
|
var mensajeNoMasActos = "<%=tamensajeJS.getMensaje()%>";
|
||||||
|
var modifi = <%=modificar%>;
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) { //se efectua la impresion
|
||||||
|
//alert("dentro de impresion " + <%=request.getContextPath()%>);
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impEspecialidades.jsp?autorizacion=<%=strAutorizacion%>');
|
||||||
|
//var ventanaEspec = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>.pdf";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function anular()
|
||||||
|
{
|
||||||
|
vElementos = new Array();
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
vCodigoElementos = new Array();
|
||||||
|
|
||||||
|
//limpiamos la seleccion de las checkboxes
|
||||||
|
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||||
|
eval("document.frmEspecialidades.checkbox" + i + ".checked=false");
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.informePrescripcion.value="";
|
||||||
|
document.frmEspecialidades.listaElementos.value="";
|
||||||
|
document.frmEspecialidades.listaCodigoElementos.value="";
|
||||||
|
document.frmEspecialidades.informe.value="";
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||||
|
prepararEnvioFormInformePrescripcion();
|
||||||
|
if (modifi){
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value = '<%=strListaElementos%>';
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value = '<%=strListaCodigoElementos%>';
|
||||||
|
/*modifi=false;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (document.frmPrescripcion.listaElementosPrescripcion.value=="") {
|
||||||
|
/*alert("Debe seleccionar algún elemento para realizar la prescripción.");*/
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||||
|
} else if (document.frmPrescripcion.informePrescripcion.value.length < 1) {
|
||||||
|
/*alert("Debe rellenar el Informe.");*/
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'Debe rellenar el Informe.',});
|
||||||
|
}else {
|
||||||
|
//comprobamos que tenga menos de mil caracteres
|
||||||
|
if (document.frmPrescripcion.informePrescripcion.value.length > 1000)
|
||||||
|
document.frmPrescripcion.informePrescripcion.value=document.frmPrescripcion.informePrescripcion.value.substring(0,1000);
|
||||||
|
//enviamos el formulario
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
|
||||||
|
if (vElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoElementos+= "¬" + vElementos[i];
|
||||||
|
}
|
||||||
|
textoElementos+="¬";
|
||||||
|
|
||||||
|
}
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
|
||||||
|
|
||||||
|
if (vCodigoElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "¬";
|
||||||
|
}
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormInformePrescripcion()
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.informePrescripcion.value = document.frmEspecialidades.informe.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaElementos()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementos = '<%=strListaElementosAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementos.indexOf("~")!=-1)
|
||||||
|
lstElementos = lstElementos.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
if (lstElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
while (lstElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
|
||||||
|
//cogemos los valores de la lista de codigos
|
||||||
|
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores
|
||||||
|
var i=0;
|
||||||
|
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
|
||||||
|
function aniadirElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
|
||||||
|
//añadimos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||||
|
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||||
|
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||||
|
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||||
|
|
||||||
|
|
||||||
|
//añadimos codigo elemento
|
||||||
|
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminarElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var vNuevosElementos=new Array();
|
||||||
|
var vNuevosCodigoElementos=new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
//eliminamos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vElementos[i]!=elementoConComillaSimple)
|
||||||
|
{
|
||||||
|
vNuevosElementos[j]=vElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vElementos = vNuevosElementos;
|
||||||
|
|
||||||
|
//eliminamos codigo elemento
|
||||||
|
j=0;
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]!=codigoElemento)
|
||||||
|
{
|
||||||
|
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vCodigoElementos = vNuevosCodigoElementos;
|
||||||
|
modifi=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
if (modifi){
|
||||||
|
vElementos[0]= '<%=strListaElementos%>';
|
||||||
|
/*modifi=false;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarCheckBox(checkbox, codigoElemento)
|
||||||
|
{
|
||||||
|
if (vElementos.length>=1) //hay seleccionados 1 elemento. No puede seleccionar mas elementos.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
/*alert(mensajeNoMasActos);*/
|
||||||
|
modal({type:'error',title:'¡Atención!',text:mensajeNoMasActos,});
|
||||||
|
}
|
||||||
|
else //se quita la seleccion de una prescripcion
|
||||||
|
{
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //tiene seleccionados menos que 1 elemento. Le dejamos que seleccione sin ningun problema.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
aniadirElemento(checkbox.value, codigoElemento);
|
||||||
|
else
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function obtenerInformePrescripcion()
|
||||||
|
{
|
||||||
|
//preparamos el informe de prescripcion
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||||
|
//dependiendo del navegador el salto de linea es diferente.
|
||||||
|
//explorer => \r\n
|
||||||
|
//netscape 6 => \n
|
||||||
|
<%
|
||||||
|
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||||
|
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||||
|
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores del informe sin comillas simples
|
||||||
|
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original
|
||||||
|
while(informePrescripcion.indexOf("~")!=-1)
|
||||||
|
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
return informePrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
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.frmEspecialidades.nombre.value=lstCampoBusqueda;
|
||||||
|
}
|
||||||
|
|
||||||
|
function comprobarTamanio()
|
||||||
|
{
|
||||||
|
return (document.frmEspecialidades.informe.value.length < 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value=campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
document.frmEspecialidades.pagina.value=1;
|
||||||
|
pasarAMayusculas(document.frmEspecialidades.nombre);
|
||||||
|
document.frmEspecialidades.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||||
|
document.frmEspecialidades.pagina.value=pagina;
|
||||||
|
pasarAMayusculas(document.frmEspecialidades.nombre);
|
||||||
|
document.frmEspecialidades.paginacion.value=1;
|
||||||
|
document.frmEspecialidades.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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 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"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
<%
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="right">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><input type="button" name="aceptar" value="OK/Imprimir" onclick="javascript:imprimir()" class="menu"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||||
|
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=1" method="post">
|
||||||
|
<input type="hidden" name="listaElementosPrescripcion" value="<%=strListaElementos%>">
|
||||||
|
<input type="hidden" name="listaCodigoElementosPrescripcion" value="<%=strListaCodigoElementos%>">
|
||||||
|
<input type="hidden" name="informePrescripcion" value="">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_ESPECIALIDADES%>">
|
||||||
|
<input type="hidden" name="modifiAuto" value="<%=strModifiAut%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmEspecialidades" action="<%=request.getContextPath()%>/jsp/pac/especialidades.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||||
|
<table border="0" align="left" width="60%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita"><%=pertamensaje.obtenerMensaje(50).getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table border="0" align="right">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita"><%=pertamensaje.obtenerMensaje(46).getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<textarea name="informe" rows="4" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInforme%></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita"><%=pertamensaje.obtenerMensaje(49).getMensaje() %> </span></td>
|
||||||
|
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
<input type="hidden" name="modifiAuto" value="<%=strModifiAut%>">
|
||||||
|
<input type="hidden" name="paginacion" value="">
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
PersistenciaTaespeci per = new PersistenciaTaespeci();
|
||||||
|
Vector vSeleccion = per.listado_especialidades(strCampoNombre, intPagina);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Especialidades: " + vSeleccion.size());
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </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>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<tr>
|
||||||
|
<td width="1%"></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(41).getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
Taespeci taespeci = null;
|
||||||
|
String estilo = "";
|
||||||
|
String strDescripcionSinComilla="";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
taespeci = (Taespeci)vSeleccion.elementAt(i);
|
||||||
|
|
||||||
|
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||||
|
strDescripcionSinComilla = taespeci.getDescripcion().replace('\'', '~');
|
||||||
|
%>
|
||||||
|
<tr class="trResultados">
|
||||||
|
<%
|
||||||
|
if (modificar){
|
||||||
|
if (strListaElementos.indexOf(taespeci.getDescripcion())!=-1){
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (strListaElementos.indexOf("¬" + taespeci.getDescripcion() + "¬")!=-1){
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=taespeci.getDescripcion()%></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<% 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>
|
||||||
|
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||||
|
<input type="hidden" name="tipo" value="10"/>
|
||||||
|
<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(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de otras especialidades (pac/especialidades.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,916 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion (pac/facturacion.jsp)");
|
||||||
|
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
|
||||||
|
if(sesion == null)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión no iniciada");
|
||||||
|
response.sendRedirect("../../html/login.html");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else if(sesion.getAttribute("PACIENTE") == null)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Paciente borrado ¿Ha pulsado 'history back'?");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/gestor.jsp");
|
||||||
|
}
|
||||||
|
//else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) != 0 )
|
||||||
|
else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado() != (ParametrosConfiguracion.bin_chipcard_propios))
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Es desplazado, lo mandamos a chipcard");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/facturacion_chipcard.jsp?x=0&pagina=1");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de facturacion (pac/facturacion.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
String mensaje = null;
|
||||||
|
mensaje = (String)sesion.getAttribute("ERROR");
|
||||||
|
String strMensajeSinElementos="";
|
||||||
|
if(mensaje == null || (mensaje.trim().compareTo("") == 0))
|
||||||
|
{
|
||||||
|
strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strMensajeSinElementos=mensaje;
|
||||||
|
}
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampoNombre="";
|
||||||
|
String strListaElementos="";
|
||||||
|
String strListaCodigoElementos="";
|
||||||
|
int intImpresion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
|
||||||
|
String strEsPrimeraVisita = "";
|
||||||
|
String strConRevisionHoy = "";
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
|
||||||
|
//Obtención del perfil del usuario conectado
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
StringBuffer perfilIguala = new StringBuffer();
|
||||||
|
perfilIguala.append(sesion.getAttribute("PERFIL"));
|
||||||
|
|
||||||
|
|
||||||
|
//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 listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaElementos")!=null)
|
||||||
|
strListaElementos=(String)request.getParameter("listaElementos");
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaCodigoElementos")!=null)
|
||||||
|
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//atributo ENC que obtiene la peticion encriptada
|
||||||
|
String factE = "";
|
||||||
|
if (sesion.getAttribute("ENC")!=null) {
|
||||||
|
factE = (String)sesion.getAttribute("ENC");
|
||||||
|
sesion.removeAttribute("ENC");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||||
|
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
String tarjeta = String.valueOf(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta());
|
||||||
|
if(((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado() != ParametrosConfiguracion.bin_chipcard_propios)
|
||||||
|
tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado();
|
||||||
|
PersistenciaTapolfac perTapolfac = new PersistenciaTapolfac();
|
||||||
|
Integer blnEsPolizaIgualaMedico = perTapolfac.esPolizaIgualaMedico(intMedico, intColectivo, dblPoliza);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PersistenciaTaprimer perTaprimer = new PersistenciaTaprimer();
|
||||||
|
if (perTaprimer.esPrimeraVisita( intMedico, intColectivo, dblPoliza, intBeneficiario) )
|
||||||
|
strEsPrimeraVisita = "si";
|
||||||
|
else
|
||||||
|
strEsPrimeraVisita = "no";
|
||||||
|
|
||||||
|
PersistenciaTamovext perTamovex = new PersistenciaTamovext();
|
||||||
|
strConRevisionHoy = "no";
|
||||||
|
//if(perTamovex.tieneRevisionHoy(intMedico, ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado(), true))
|
||||||
|
if(perTamovex.tieneRevisionHoyColPolOrd(intMedico, intColectivo, dblPoliza, intBeneficiario, true))
|
||||||
|
strConRevisionHoy = "si";
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
String pathSpgif = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
pathSpgif = path + "/..";
|
||||||
|
}else if (request.getContextPath().indexOf("servlet")==-1){
|
||||||
|
path = "/tarisan";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Especialidades</title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery.modal.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery.modal.min.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = new Array();
|
||||||
|
var vCodigoElementos = new Array();
|
||||||
|
var intNumeroCheckBoxes = 0;
|
||||||
|
var esPrimeraVisita = '<%=strEsPrimeraVisita%>';
|
||||||
|
var tienerevisionhoy = '<%=strConRevisionHoy%>';
|
||||||
|
var codigoPrimeraVisita = <%=ParametrosConfiguracion.codigoPrimeraVisita%>;
|
||||||
|
var codigoVisitaSucesiva = <%=ParametrosConfiguracion.codigoVisitaSucesiva%>;
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) { //se efectua la impresion
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=factE%>";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function anular()
|
||||||
|
{
|
||||||
|
vElementos = new Array();
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
vCodigoElementos = new Array();
|
||||||
|
|
||||||
|
//limpiamos la seleccion de las checkboxes
|
||||||
|
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||||
|
eval("document.frmFacturacion.checkbox" + i + ".checked=false");
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||||
|
document.frmFacturacion.listaElementos.value="";
|
||||||
|
document.frmFacturacion.listaCodigoElementos.value="";
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
var boton = document.getElementById('okimprimir');
|
||||||
|
boton.disabled = true;
|
||||||
|
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||||
|
|
||||||
|
if (document.frmPrescripcion.listaElementosPrescripcion.value=="")
|
||||||
|
{
|
||||||
|
boton.disabled = false;
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||||
|
/*alert("Debe seleccionar algún elemento para realizar la prescripción.");*/
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
|
||||||
|
if (vElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoElementos+= "¬" + vElementos[i];
|
||||||
|
}
|
||||||
|
textoElementos+="¬";
|
||||||
|
|
||||||
|
}
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
|
||||||
|
|
||||||
|
if (vCodigoElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "¬";
|
||||||
|
}
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaElementos()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementos = '<%=strListaElementosAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementos.indexOf("~")!=-1)
|
||||||
|
lstElementos = lstElementos.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
if (lstElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
while (lstElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
|
||||||
|
//cogemos los valores de la lista de codigos
|
||||||
|
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores
|
||||||
|
var i=0;
|
||||||
|
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
|
||||||
|
function aniadirElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
|
||||||
|
//añadimos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||||
|
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||||
|
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||||
|
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||||
|
|
||||||
|
|
||||||
|
//añadimos codigo elemento
|
||||||
|
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminarElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var vNuevosElementos=new Array();
|
||||||
|
var vNuevosCodigoElementos=new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
//eliminamos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vElementos[i]!=elementoConComillaSimple)
|
||||||
|
{
|
||||||
|
vNuevosElementos[j]=vElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vElementos = vNuevosElementos;
|
||||||
|
|
||||||
|
//eliminamos codigo elemento
|
||||||
|
j=0;
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]!=codigoElemento)
|
||||||
|
{
|
||||||
|
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vCodigoElementos = vNuevosCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarCheckBox(checkbox, codigoElemento)
|
||||||
|
{
|
||||||
|
var consultaRevision = false; //variable que controla si se ha marcado una consulta y una revision a la vez
|
||||||
|
|
||||||
|
if (vElementos.length>=5) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'No pueden imputarse más actos médicos.',});
|
||||||
|
/*alert("No pueden imputarse más actos médicos");*/
|
||||||
|
}
|
||||||
|
else //se quita la seleccion de una prescripcion
|
||||||
|
{
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //tiene seleccionados menos que 5 elementos. Le dejamos que seleccione sin ningun problema.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
//Comprobamos que no se pueda seleccionar una consulta y una revision a la vez
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]==1)
|
||||||
|
{
|
||||||
|
if (codigoElemento==2){
|
||||||
|
checkbox.checked=false;
|
||||||
|
/*alert("No puede imputarse una consulta y una revision a la vez"); */
|
||||||
|
consultaRevision = true;
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'No puede imputarse una consulta y una revision a la vez.',});
|
||||||
|
}
|
||||||
|
}else if(vCodigoElementos[i]==2)
|
||||||
|
{
|
||||||
|
if (codigoElemento==1){
|
||||||
|
checkbox.checked=false;
|
||||||
|
/*alert("No puede imputarse una consulta y una revision a la vez"); */
|
||||||
|
consultaRevision = true;
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'No puede imputarse una consulta y una revision a la vez.',});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//comprobamos si se permite seleccionar la primera visita o la visita sucesiva
|
||||||
|
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
|
||||||
|
if ( codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") //selecciona primera visita y no es la primera visita o seleciona la visita sucesiva y es primera vista
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta.',});
|
||||||
|
/*alert("Imposible imputarse ese acto médico ya ha tenido consulta.");*/
|
||||||
|
}
|
||||||
|
else if(( codigoElemento == codigoVisitaSucesiva && tienerevisionhoy == "si" )||( codigoElemento == 1 && tienerevisionhoy == "si" ))
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.',});
|
||||||
|
/*alert("Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.");*/
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if (consultaRevision == false){
|
||||||
|
aniadirElemento(checkbox.value, codigoElemento);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
consultaRevision = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
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.frmFacturacion.nombre.value=lstCampoBusqueda;
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value=campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=1;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=pagina;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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 width="565">
|
||||||
|
<%
|
||||||
|
if ((blnEsPolizaIgualaMedico == 0) || ((blnEsPolizaIgualaMedico != 0) && perfilIguala.toString().compareTo("01")!=0)){
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - PERFIL TARISAN: " + perfilIguala.toString() + " " + blnEsPolizaIgualaMedico);
|
||||||
|
%>
|
||||||
|
<!-- 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"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<!--<td colspan="4" align="right">-->
|
||||||
|
<td colspan="4" align="right" width="100%">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><input type="button" name="aceptar" id="okimprimir" value="OK" onclick="javascript:imprimir()" class="menu"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||||
|
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=1" method="post">
|
||||||
|
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_FACTURACION%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmFacturacion" action="<%=request.getContextPath()%>/jsp/pac/facturacion.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||||
|
<table border="0" align="center" width="60%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Imputación de actos médicos:</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="top">
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||||
|
</td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="60" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita">Nombre acto médico: </span></td>
|
||||||
|
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||||
|
long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
double dblPolizanew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
int contrato = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato();
|
||||||
|
|
||||||
|
Vector vSeleccion = per.obtenerActosAutoprescribibles(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), contrato, intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Actos: " + vSeleccion.size());
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </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ágina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<tr>
|
||||||
|
<td width="1%"></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
Ttactmed ttactmed = null;
|
||||||
|
String estilo = "";
|
||||||
|
String strDescripcionSinComilla="";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
|
||||||
|
|
||||||
|
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||||
|
strDescripcionSinComilla = ttactmed.getDescripcion().replace('\'', '~');
|
||||||
|
%>
|
||||||
|
<tr class="trResultados">
|
||||||
|
<%
|
||||||
|
if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=ttactmed.getActo()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=ttactmed.getDescripcion()%></td>
|
||||||
|
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(per.obtenerPrecioActoMedico(((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), ttactmed.getActo(), ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad()), PersistenciaParametros.decimales)%></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<% 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">ú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>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
%>
|
||||||
|
<table border="0" align="center" width="60%">
|
||||||
|
<form name="frmFacturacion" action="" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
</form>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita"> </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita"> </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita"> </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<%
|
||||||
|
if (blnEsPolizaIgualaMedico == 1){ %>
|
||||||
|
<td align="center" class="txtNegrita"><%=pertamensaje.obtenerMensaje(12).getMensaje() %></td>
|
||||||
|
<%}
|
||||||
|
else { %>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
<%
|
||||||
|
}%>
|
||||||
|
<td></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="11"/>
|
||||||
|
<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", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/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(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de facturacion (pac/facturacion.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,885 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion (pac/facturacion_chipcard.jsp)");
|
||||||
|
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - \n\n\nTarjeta desplazado en sesion, contrato: "+tarjeta.getContrato()+" entidad imq: "+tarjeta.getEntidadIMQ() + " - " + tarjeta.getColectivo() + " - " + tarjeta.getPoliza()+ " - " +tarjeta.getBeneficiario());
|
||||||
|
|
||||||
|
|
||||||
|
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(sesion.getAttribute("PACIENTE") == null)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Paciente borrado Ha pulsado 'history back'?");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/gestor.jsp");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de facturacion (pac/facturacion_chipcard.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
boolean strMensajeEnRojo = false;
|
||||||
|
if(sesion.getAttribute("mensaje") != null )
|
||||||
|
{
|
||||||
|
strMensajeSinElementos =sesion.getAttribute("mensaje").toString();
|
||||||
|
}
|
||||||
|
sesion.setAttribute("mensaje", null);
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampoNombre="";
|
||||||
|
String strListaElementos="";
|
||||||
|
String strListaCodigoElementos="";
|
||||||
|
int intImpresion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
|
||||||
|
String strEsPrimeraVisita = "";
|
||||||
|
String strEsPrimeraVisitaDesplazado = "";
|
||||||
|
String strConRevisionHoy = "";
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
|
||||||
|
//Obtención del perfil del usuario conectado
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
StringBuffer perfilIguala = new StringBuffer();
|
||||||
|
perfilIguala.append(sesion.getAttribute("PERFIL"));
|
||||||
|
|
||||||
|
|
||||||
|
//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 listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaElementos")!=null)
|
||||||
|
strListaElementos=(String)request.getParameter("listaElementos");
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaCodigoElementos")!=null)
|
||||||
|
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
String mensaje = (String)sesion.getAttribute("RESULTADO");
|
||||||
|
sesion.setAttribute("RESULTADO", null);
|
||||||
|
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||||
|
//int intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
//int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||||
|
//double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
|
||||||
|
/*
|
||||||
|
PersistenciaTapolfac perTapolfac = new PersistenciaTapolfac();
|
||||||
|
Integer blnEsPolizaIgualaMedico = perTapolfac.esPolizaIgualaMedico(intMedico, intColectivo, dblPoliza);
|
||||||
|
|
||||||
|
|
||||||
|
PersistenciaTaprimer perTaprimer = new PersistenciaTaprimer();
|
||||||
|
if (perTaprimer.esPrimeraVisita( intMedico, intColectivo, dblPoliza, intBeneficiario) )
|
||||||
|
strEsPrimeraVisita = "si";
|
||||||
|
else
|
||||||
|
strEsPrimeraVisita = "no";
|
||||||
|
*/
|
||||||
|
PersistenciaTamovext perTamovex = new PersistenciaTamovext();
|
||||||
|
if(perTamovex.tieneRevisionHoy(intMedico, tarjeta.getTarjetaDesplazado(), true))
|
||||||
|
strConRevisionHoy = "si";
|
||||||
|
else
|
||||||
|
strConRevisionHoy = "no";
|
||||||
|
|
||||||
|
if(perTamovex.esPrimeraVisitaDesplazado(intMedico, tarjeta.getTarjetaDesplazado(), false))
|
||||||
|
strEsPrimeraVisitaDesplazado = "si";
|
||||||
|
else
|
||||||
|
strEsPrimeraVisitaDesplazado = "no";
|
||||||
|
|
||||||
|
|
||||||
|
PersistenciaTaprimer perTapri = new PersistenciaTaprimer();
|
||||||
|
if(perTapri.esPrimeraVisita(intMedico, tarjeta.getColectivo(), tarjeta.getPoliza(), tarjeta.getBeneficiario()))
|
||||||
|
strEsPrimeraVisita = "si";
|
||||||
|
else
|
||||||
|
strEsPrimeraVisita = "no";
|
||||||
|
/*if(tarjeta.getEntidadChipcard() == (ParametrosConfiguracion.bin_chipcard_propios) || (tarjeta.getBeneficiario() + tarjeta.getColectivo())>0)
|
||||||
|
{
|
||||||
|
if(perTapri.esPrimeraVisita(intMedico, tarjeta.getColectivo(), tarjeta.getPoliza(), tarjeta.getBeneficiario()))
|
||||||
|
strEsPrimeraVisita = "si";
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(perTamovex.esPrimeraVisitaDesplazado(intMedico, tarjeta.getTarjetaDesplazado(), false))
|
||||||
|
strEsPrimeraVisita = "si";
|
||||||
|
}*/
|
||||||
|
|
||||||
|
Tamensaje tamensaje = new Tamensaje();
|
||||||
|
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||||
|
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Es primera visita?: "+strEsPrimeraVisita+", es primera visita para desplazado: "+strEsPrimeraVisitaDesplazado);
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
String pathSpgif = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
pathSpgif = path + "/..";
|
||||||
|
}else if (request.getContextPath().indexOf("servlet")==-1){
|
||||||
|
path = "/../tarisan";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Especialidades para desplazados</title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery.modal.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery.modal.min.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = new Array();
|
||||||
|
var vCodigoElementos = new Array();
|
||||||
|
var intNumeroCheckBoxes = 0;
|
||||||
|
var esPrimeraVisita = '<%=strEsPrimeraVisita%>';
|
||||||
|
var esPrimeraVisitaDesplaz = '<%=strEsPrimeraVisitaDesplazado%>';
|
||||||
|
var tienerevisionhoy = '<%=strConRevisionHoy%>';
|
||||||
|
var codigoPrimeraVisita = <%=ParametrosConfiguracion.codigoPrimeraVisita%>
|
||||||
|
var codigoVisitaSucesiva = <%=ParametrosConfiguracion.codigoVisitaSucesiva%>
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) { //se efectua la impresion
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impFacturacion.jsp');
|
||||||
|
//window.open('https://infor-roumenov/tarisan/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf');
|
||||||
|
//var ventanaFact = window.open('<%=request.getContextPath()%>/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Impresion","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()+"_"+((Tarjeta)((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta()).getPoliza()%>.pdf";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function anular()
|
||||||
|
{
|
||||||
|
vElementos = new Array();
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
vCodigoElementos = new Array();
|
||||||
|
|
||||||
|
//limpiamos la seleccion de las checkboxes
|
||||||
|
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||||
|
eval("document.frmFacturacion.checkbox" + i + ".checked=false");
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||||
|
document.frmFacturacion.listaElementos.value="";
|
||||||
|
document.frmFacturacion.listaCodigoElementos.value="";
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||||
|
var boton = document.getElementById('okimprimir');
|
||||||
|
boton.disabled = true;
|
||||||
|
if (document.frmPrescripcion.listaElementosPrescripcion.value=="")
|
||||||
|
{
|
||||||
|
boton.disabled = false;
|
||||||
|
//alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||||
|
modal({type:'error',title:'Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
|
||||||
|
if (vElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoElementos+= "¬" + vElementos[i];
|
||||||
|
}
|
||||||
|
textoElementos+="¬";
|
||||||
|
|
||||||
|
}
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
|
||||||
|
|
||||||
|
if (vCodigoElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "¬";
|
||||||
|
}
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaElementos()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementos = '<%=strListaElementosAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementos.indexOf("~")!=-1)
|
||||||
|
lstElementos = lstElementos.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
if (lstElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
while (lstElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
|
||||||
|
//cogemos los valores de la lista de codigos
|
||||||
|
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores
|
||||||
|
var i=0;
|
||||||
|
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
|
||||||
|
function aniadirElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
|
||||||
|
//añadimos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||||
|
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||||
|
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||||
|
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||||
|
|
||||||
|
|
||||||
|
//añadimos codigo elemento
|
||||||
|
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminarElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var vNuevosElementos=new Array();
|
||||||
|
var vNuevosCodigoElementos=new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
//eliminamos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vElementos[i]!=elementoConComillaSimple)
|
||||||
|
{
|
||||||
|
vNuevosElementos[j]=vElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vElementos = vNuevosElementos;
|
||||||
|
|
||||||
|
//eliminamos codigo elemento
|
||||||
|
j=0;
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]!=codigoElemento)
|
||||||
|
{
|
||||||
|
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vCodigoElementos = vNuevosCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
}
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarCheckBox(checkbox, codigoElemento)
|
||||||
|
{
|
||||||
|
if (vElementos.length>=1) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
//alert("No puede imputarse más actos médicos");
|
||||||
|
modal({type:'error',title:'Atención!',text:'No puede imputarse más actos médicos.',});
|
||||||
|
}
|
||||||
|
else //se quita la seleccion de una prescripcion
|
||||||
|
{
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //tiene seleccionados menos que 5 elementos. Le dejamos que seleccione sin ningun problema.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
//comprobamos si se permite seleccionar la primera visita o la visita sucesiva
|
||||||
|
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
|
||||||
|
if ( (codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoPrimeraVisita && esPrimeraVisitaDesplaz == "no") ) //selecciona primera visita y no es la primera visita o seleciona la visita sucesiva y es primera vista
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
//alert("Imposible imputarse ese acto médico ya ha tenido consulta.");
|
||||||
|
modal({type:'error',title:'Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta.',});
|
||||||
|
}
|
||||||
|
else if( codigoElemento == codigoVisitaSucesiva && tienerevisionhoy == "si" || ( codigoElemento == 1 && tienerevisionhoy == "si" ))
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
//alert("Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.");
|
||||||
|
modal({type:'error',title:'Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.',});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
aniadirElemento(checkbox.value, codigoElemento);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
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.frmFacturacion.nombre.value=lstCampoBusqueda;
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value=campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=1;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=pagina;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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 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"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<table border="0" align="center" width="100%" cellpadding="0">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<!--<td colspan="4" align="right">-->
|
||||||
|
<td colspan="4" align="right" width="100%">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><input type="button" name="aceptar" value="OK" id="okimprimir" onclick="javascript:imprimir()" class="menu"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||||
|
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=0" method="post">
|
||||||
|
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||||
|
<input type="hidden" name="autorizacion" value="1">
|
||||||
|
<input type="hidden" name="especialidad" value="<%=intEspecialidad %>">
|
||||||
|
<input type="hidden" name="medico" value="<%=intMedico%>">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_FACTURACION_CHIPCARD%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmFacturacion" action="<%=request.getContextPath()%>/jsp/pac/facturacion_chipcard.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||||
|
<table border="0" align="center" width="60%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita"><%=pertamensaje.obtenerMensaje(44).getMensaje() %></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="top">
|
||||||
|
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||||
|
</td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="60" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
if(mensaje != null)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td><span class="txtnegrita" bgcolor="#FFAAAA"><%=mensaje %></span></td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><span class="txtnegrita"><%=pertamensaje.obtenerMensaje(43).getMensaje() %> </span></td>
|
||||||
|
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
<input type="hidden" name="listaElementos" value="">
|
||||||
|
<input type="hidden" name="listaCodigoElementos" value="">
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||||
|
aCondiciones = new Object[1];
|
||||||
|
aCondiciones[0] = Integer.valueOf(intEspecialidad);
|
||||||
|
String actos = "";
|
||||||
|
|
||||||
|
//obtenemos los actos incluidos en la autorización
|
||||||
|
Vector vSeleccion = per.obtenerActosAutoprescribiblesDespla(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), ((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Actos autoprescriblibles desplazados: " + vSeleccion.size());
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<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ágina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="1%"></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(40).getMensaje() %></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(41).getMensaje() %></td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(42).getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
Ttactmed ttactmed = null;
|
||||||
|
String estilo = "";
|
||||||
|
String strDescripcionSinComilla="";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
|
||||||
|
|
||||||
|
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||||
|
strDescripcionSinComilla = ttactmed.getDescripcion().replace('\'', '~');
|
||||||
|
%>
|
||||||
|
<tr class="trResultados">
|
||||||
|
<%
|
||||||
|
if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=ttactmed.getActo()%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=ttactmed.getDescripcion()%></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="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">ú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="11"/>
|
||||||
|
<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", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Es desplazado?: "+((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard());
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - \n\n\nTarjeta desplazado en sesion, contrato: "+tarjeta.getContrato()+" entidad imq: "+tarjeta.getEntidadIMQ()+", pista2: "+((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPista2()+"-->"+tarjeta.getPista2() );
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de facturacion (pac/facturacion_chipcard.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,599 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
<%@ page import="java.util.Vector" %>
|
||||||
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion_iguala (pac/facturacion_iguala.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de facturacion_iguala (pac/facturacion_iguala.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strCampoNombre="";
|
||||||
|
String strListaElementos="";
|
||||||
|
String strListaCodigoElementos="";
|
||||||
|
int intImpresion = 0;
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
|
||||||
|
String strEsPrimeraVisita = "";
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
|
||||||
|
//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 listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaElementos")!=null)
|
||||||
|
strListaElementos=(String)request.getParameter("listaElementos");
|
||||||
|
|
||||||
|
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||||
|
if (request.getParameter("listaCodigoElementos")!=null)
|
||||||
|
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||||
|
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||||
|
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||||
|
|
||||||
|
|
||||||
|
PersistenciaTaprimer perTaprimer = new PersistenciaTaprimer();
|
||||||
|
if (perTaprimer.esPrimeraVisita( intMedico, intColectivo, dblPoliza, intBeneficiario) )
|
||||||
|
strEsPrimeraVisita = "si";
|
||||||
|
else
|
||||||
|
strEsPrimeraVisita = "no";
|
||||||
|
|
||||||
|
|
||||||
|
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>Especialidades</title>
|
||||||
|
<link rel="shortcut icon" href="<%=request.getContextPath()%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/jquery.modal.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac_iguala.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=request.getContextPath()%>/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" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||||
|
var vElementos = new Array();
|
||||||
|
var vCodigoElementos = new Array();
|
||||||
|
var intNumeroCheckBoxes = 0;
|
||||||
|
var esPrimeraVisita = '<%=strEsPrimeraVisita%>';
|
||||||
|
var codigoPrimeraVisita = <%=ParametrosConfiguracion.codigoPrimeraVisita%>
|
||||||
|
var codigoVisitaSucesiva = <%=ParametrosConfiguracion.codigoVisitaSucesiva%>
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) { //se efectua la impresion
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impFacturacion.jsp');
|
||||||
|
//window.open('https://infor-roumenov/tarisan/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf');
|
||||||
|
//var ventanaFact = window.open('<%=request.getContextPath()%>/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Impresion","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()+"_"+((Tarjeta)((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta()).getPoliza()%>.pdf";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function anular()
|
||||||
|
{
|
||||||
|
vElementos = new Array();
|
||||||
|
escribirListaElementos();
|
||||||
|
|
||||||
|
vCodigoElementos = new Array();
|
||||||
|
|
||||||
|
//limpiamos la seleccion de las checkboxes
|
||||||
|
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||||
|
eval("document.frmFacturacion.checkbox" + i + ".checked=false");
|
||||||
|
|
||||||
|
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||||
|
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||||
|
document.frmFacturacion.listaElementos.value="";
|
||||||
|
document.frmFacturacion.listaCodigoElementos.value="";
|
||||||
|
}
|
||||||
|
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||||
|
|
||||||
|
if (document.frmPrescripcion.listaElementosPrescripcion.value==""){
|
||||||
|
//alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||||
|
{
|
||||||
|
var textoElementos="";
|
||||||
|
var textoCodigoElementos="";
|
||||||
|
|
||||||
|
if (vElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoElementos+= "¬" + vElementos[i];
|
||||||
|
}
|
||||||
|
textoElementos+="¬";
|
||||||
|
|
||||||
|
}
|
||||||
|
campoElementos.value=textoElementos;
|
||||||
|
|
||||||
|
|
||||||
|
if (vCodigoElementos.length>0) //array con elementos
|
||||||
|
{
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||||
|
}
|
||||||
|
textoCodigoElementos+= "¬";
|
||||||
|
}
|
||||||
|
campoCodigoElementos.value=textoCodigoElementos;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function inicializarListaElementos()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementos = '<%=strListaElementosAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementos.indexOf("~")!=-1)
|
||||||
|
lstElementos = lstElementos.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
if (lstElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
while (lstElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||||
|
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//preparamos la lista de codigos
|
||||||
|
|
||||||
|
//cogemos los valores de la lista de codigos
|
||||||
|
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores
|
||||||
|
var i=0;
|
||||||
|
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||||
|
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
|
||||||
|
function aniadirElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
|
||||||
|
//añadimos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||||
|
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||||
|
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||||
|
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||||
|
|
||||||
|
|
||||||
|
//añadimos codigo elemento
|
||||||
|
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
function eliminarElemento(elemento, codigoElemento)
|
||||||
|
{
|
||||||
|
var elementoConComillaSimple=elemento;
|
||||||
|
var vNuevosElementos=new Array();
|
||||||
|
var vNuevosCodigoElementos=new Array();
|
||||||
|
var j=0;
|
||||||
|
|
||||||
|
//eliminamos descripcion elemento
|
||||||
|
|
||||||
|
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||||
|
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||||
|
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||||
|
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||||
|
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vElementos[i]!=elementoConComillaSimple)
|
||||||
|
{
|
||||||
|
vNuevosElementos[j]=vElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vElementos = vNuevosElementos;
|
||||||
|
|
||||||
|
//eliminamos codigo elemento
|
||||||
|
j=0;
|
||||||
|
for (var i=0; i<vCodigoElementos.length; i++)
|
||||||
|
{
|
||||||
|
if(vCodigoElementos[i]!=codigoElemento)
|
||||||
|
{
|
||||||
|
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vCodigoElementos = vNuevosCodigoElementos;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escribirListaElementos()
|
||||||
|
{
|
||||||
|
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||||
|
if (vElementos.length==0) //no hay ningun elemento
|
||||||
|
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||||
|
else //hay algun elemento
|
||||||
|
{
|
||||||
|
for (var i=0; i<vElementos.length; i++)
|
||||||
|
{
|
||||||
|
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
texto = texto + "</table>";
|
||||||
|
|
||||||
|
//escribimos la lista de elementos dependiendo del navegador
|
||||||
|
if (document.all)
|
||||||
|
{
|
||||||
|
document.all['elementos'].innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.getElementById)
|
||||||
|
{
|
||||||
|
document.getElementById('elementos').innerHTML = texto;
|
||||||
|
}
|
||||||
|
else if (document.layers)
|
||||||
|
{
|
||||||
|
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||||
|
document.layers['elementos'].document.open();
|
||||||
|
document.layers['elementos'].document.write(texto);
|
||||||
|
document.layers['elementos'].document.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tratarCheckBox(checkbox, codigoElemento)
|
||||||
|
{
|
||||||
|
if (vElementos.length>=5) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
//alert("No puede imputarse más actos médicos");
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'No puede imputarse más actos médicos.',});
|
||||||
|
}
|
||||||
|
else //se quita la seleccion de una prescripcion
|
||||||
|
{
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //tiene seleccionados menos que 5 elementos. Le dejamos que seleccione sin ningun problema.
|
||||||
|
{
|
||||||
|
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||||
|
{
|
||||||
|
//comprobamos si se permite seleccionar la primera visita o la visita sucesiva
|
||||||
|
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
|
||||||
|
if ( codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no" ) //selecciona primera visita y no es la primera visita o seleciona la visita sucesiva y es primera vista
|
||||||
|
{
|
||||||
|
checkbox.checked=false;
|
||||||
|
//alert("Imposible imputarse ese acto médico.");
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'Imposible imputarse ese acto médico.',});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
aniadirElemento(checkbox.value, codigoElemento);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eliminarElemento(checkbox.value, codigoElemento);
|
||||||
|
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
escribirListaElementos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
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.frmFacturacion.nombre.value=lstCampoBusqueda;
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasarAMayusculas(campo)
|
||||||
|
{
|
||||||
|
campo.value=campo.value.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function buscar()
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=1;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||||
|
document.frmFacturacion.pagina.value=pagina;
|
||||||
|
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||||
|
document.frmFacturacion.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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="<%=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 width="565">
|
||||||
|
<%=pertamensaje.obtenerMensaje(12).getMensaje() %>
|
||||||
|
</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="11"/>
|
||||||
|
<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", "Error en la presentación de la página al usuario.");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/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(request.getContextPath() + "/jsp/error.jsp");
|
||||||
|
}
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de facturacion_iguala (pac/facturacion_iguala.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
<%@ 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 firma de autorización (pac/firma_autorizacion.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 firma de autorización (pac/firma_autorizacion.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Obtención del perfil del usuario conectado
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
|
||||||
|
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>Firma de autorización del beneficiario</title>
|
||||||
|
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="../../js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/menu_pac.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">
|
||||||
|
<!--
|
||||||
|
function imprimir()
|
||||||
|
{
|
||||||
|
VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/html/imp/firmaAutorizacion.html');
|
||||||
|
}
|
||||||
|
|
||||||
|
function enviar(firmado)
|
||||||
|
{
|
||||||
|
if(firmado)
|
||||||
|
{
|
||||||
|
document.frmAutorizacion.OPCION.value = <%= Constantes.OPC_PAC_FIRMA_BENEFICIARIO %>;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.frmAutorizacion.OPCION.value = <%= Constantes.OPC_PAC_GESTOR %>;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.frmAutorizacion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:imprimir()">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOff"><b>AUTORIZACION DEL BENEFICIARIO</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</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><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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"></td></tr>
|
||||||
|
<tr><td colspan="2" class="txtnegrita" align="center">Le recordamos que una vez firmado el consentimiento, para que este tenga validez deberá ser remitido al IMQ.</br>Hasta entonces este aviso continuará apareciendo. Gracias</td></tr>
|
||||||
|
<tr><td colspan="2">¿Firma el beneficiario la autorización?</td></tr>
|
||||||
|
<tr>
|
||||||
|
<form name="frmAutorizacion" action="../../servlet/GestorPacientes" method="post">
|
||||||
|
<td>
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><a href="javascript:enviar(true);" class="enlace">Aceptar</a> <a href="javascript:enviar(false);" class="enlace">Cancelar</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_FACTURACION%>">
|
||||||
|
</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ó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 firma de autorización (pac/firma_autorizacion.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,457 @@
|
|||||||
|
<%@ 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 pacientes (pac/gestor.jsp)");
|
||||||
|
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
HttpSession sesion = request.getSession(true);
|
||||||
|
|
||||||
|
String mensaje = null;
|
||||||
|
mensaje = (String)sesion.getAttribute("ERROR");
|
||||||
|
sesion.setAttribute("ERROR", "");
|
||||||
|
String aviso = null;
|
||||||
|
aviso = (String)sesion.getAttribute("AVISO");
|
||||||
|
sesion.setAttribute("AVISO", "");
|
||||||
|
|
||||||
|
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 pacientes (pac/gestor.jsp)");
|
||||||
|
|
||||||
|
|
||||||
|
//Obtención del perfil del usuario conectado
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
|
||||||
|
//String noticia = Utilidades.leerNoticias("/root/apache-tomcat-6.0.20/webapps/tarisan/noticias.txt");
|
||||||
|
Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||||
|
int intEspecialidad = ((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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
String pathSpgif = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
pathSpgif = path + "/..";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Módulo de Gestión de Pacientes</title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery.modal.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery.modal.min.js"></script>
|
||||||
|
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
<!--
|
||||||
|
function validar()
|
||||||
|
{
|
||||||
|
if(document.frmTarjeta.TARJETA.value != "")
|
||||||
|
{
|
||||||
|
document.frmTarjeta.submit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*alert("Tiene que pasar la Tarjeta del Paciente");*/
|
||||||
|
modal({type:'error',title:'Atención!',text:'Tiene que pasar la Tarjeta del Paciente.',});
|
||||||
|
document.frmTarjeta.TARJETA.value = "";
|
||||||
|
document.frmTarjeta.TROQUELADO.value="";
|
||||||
|
document.frmTarjeta.TARJETA.focus();
|
||||||
|
document.frmTarjeta.TROQUELADO.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function borrarCampo()
|
||||||
|
{
|
||||||
|
document.frmTarjeta.TARJETA.value = "";
|
||||||
|
document.frmTarjeta.TARJETA.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function validar_embosado()
|
||||||
|
{
|
||||||
|
|
||||||
|
var troque = document.frmTarjeta.TROQUELADO.value;
|
||||||
|
while(troque.indexOf(' ')>0){
|
||||||
|
troque = troque.replace(' ','');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.frmTarjeta.TARJETA.value != "" && troque != "" && troque.length <= 40)
|
||||||
|
{
|
||||||
|
document.frmTarjeta.TROQUELADO.value = troque;
|
||||||
|
document.frmTarjeta.submit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*alert("Para conseguir una mejor gestión de los desplazados necesitamos que vuelva a pasar la tarjeta en el campo correspondiente y que introduzca los dígitos que aparecen en la tarjeta, como se muestra en la imagen \nGracias.");*/
|
||||||
|
modal({type:'error',title:'Atención!',text:'Para conseguir una mejor gestión de los desplazados necesitamos que vuelva a pasar la tarjeta en el campo correspondiente y que introduzca los dígitos que aparecen en la tarjeta, como se muestra en la imagen \nGracias.',});
|
||||||
|
document.frmTarjeta.TARJETA.value = "";
|
||||||
|
document.frmTarjeta.TROQUELADO.value="";
|
||||||
|
document.frmTarjeta.TARJETA.focus();
|
||||||
|
document.frmTarjeta.TROQUELADO.focus();
|
||||||
|
document.frmTarjeta.TROQUELADO.value="";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function detecta(){
|
||||||
|
var navegador = navigator.vendor;
|
||||||
|
alert(navigator.vendor);
|
||||||
|
switch (navegador)
|
||||||
|
{
|
||||||
|
case "Microsoft Internet Explorer":
|
||||||
|
/*alert("Su navegador es Internet Explorer");*/
|
||||||
|
modal({type:'error',title:'Atención!',text:'Su navegador es Internet Explorer.',});
|
||||||
|
break;
|
||||||
|
case "Netscape":
|
||||||
|
/*alert("Su navegador es Mozilla o Google Chrome");*/
|
||||||
|
modal({type:'error',title:'Atención!',text:'Su navegador es Mozilla o Google Chrome.',});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function leer()
|
||||||
|
{
|
||||||
|
document.frmNoticias.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function noticia_importante()
|
||||||
|
{
|
||||||
|
VerText('mensajes1',1);
|
||||||
|
document.frmTarjeta.TARJETA.value="";
|
||||||
|
document.frmTarjeta.TARJETA.focus();
|
||||||
|
var obj = document.frmTarjeta.TROQUELADO;
|
||||||
|
if(obj)
|
||||||
|
{
|
||||||
|
document.frmTarjeta.TROQUELADO.value="";
|
||||||
|
document.frmTarjeta.TROQUELADO.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clear(){
|
||||||
|
var texto = document.getElementById('usrtxt');
|
||||||
|
texto.value ="";
|
||||||
|
texto.setAttribute("autocomplete", "off");
|
||||||
|
texto = document.getElementById('pwdtxt');
|
||||||
|
texto.value="";
|
||||||
|
texto.setAttribute("autocomplete", "off");
|
||||||
|
texto = document.getElementById('usrtxt');
|
||||||
|
texto.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function VerText(m,s)
|
||||||
|
{
|
||||||
|
obj=document.getElementById(m);
|
||||||
|
if(s==1)obj.style.display="block";
|
||||||
|
if(s==0)obj.style.display="none";
|
||||||
|
}
|
||||||
|
|
||||||
|
function disableautocompletion(id){
|
||||||
|
var passwordControl = document.getElementById(id);
|
||||||
|
passwordControl.setAttribute("autocomplete", "off");
|
||||||
|
}
|
||||||
|
|
||||||
|
function setFocus(){
|
||||||
|
document.getElementById("tartxt").focus();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="noticia_importante();setFocus();">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Logotipo de IMQ de Navarra
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr valign="bottom">
|
||||||
|
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>//-->
|
||||||
|
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
<!--<tr>
|
||||||
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||||
|
</tr> -->
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!--<div id="contenedorNoticia">
|
||||||
|
<br>
|
||||||
|
<div class="tituloNoticia">
|
||||||
|
<span class="noticiaSpan">NOTICIAS:</span>
|
||||||
|
<p class="marquee"><%=strNoticia %></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<br>-->
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOn"><b>TARJETA DE PACIENTE</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
|
<span id="mensajes1" class="mensajes">
|
||||||
|
<!-- <p>Atención:<br/>Ya pueden pasar las tarjetas de TODOS LOS DESPLAZADOS, excepto en ATS, Rehabilitación, Podología y Analistas. <br/><a href="https://tarisan.imqnavarra.com/tarisan/COMPANIASALASQUEDACOBERTURAELCUADROMEDICOPERTENECIENTEAIMQ.pdf" target="_blank">Ver compañias incluidas</a></p> -->
|
||||||
|
<p>No pasar tarjetas de DESPLAZADOS en ATS, Rehabilitación, Podología y Analistas. <br/><a href="https://tarisan.imqnavarra.com/tarisan/COMPANIASALASQUEDACOBERTURAELCUADROMEDICOPERTENECIENTEAIMQ.pdf" target="_blank">Ver compañias incluidas</a></p>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!--<tr valign="top">
|
||||||
|
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0" width="75%"></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"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||||
|
<table border="0" width="100%" align="center">
|
||||||
|
<%
|
||||||
|
if (aviso!=null && aviso.length() > 0){
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center" class="menuOn"><%=aviso %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
if (mensaje!=null && mensaje.length() > 0){
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" align="center" class="menuOn"><%=mensaje %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
if(request.getParameter("embosado")!=null)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Página para introducir el troquelado");
|
||||||
|
%>
|
||||||
|
<form name="frmTarjeta" action="../../servlet/GestorPacientes?OPCION=<%=Constantes.OPC_PAC_PASO_TARJETA %>" method="post" autocomplete="off">
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtnegrita">Introduzca los números de la tarjeta:</td>
|
||||||
|
<td><input type="text" size="40" name="TROQUELADO" id="trqld" class="txt" value=""></td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtnegrita">Pase la tarjeta:</td>
|
||||||
|
<td><input type="password" size="40" name="TARJETA" id="tar" class="txt" value="" onfocus="javascript:document.frmTarjeta.TARJETA.text=''"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><a href="javascript:validar_embosado()" class="enlace">Validar</a></td>
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<form name="frmTarjeta" action="../../servlet/GestorPacientes?OPCION=<%=Constantes.OPC_PAC_PASO_TARJETA %>" method="post">
|
||||||
|
<tr>
|
||||||
|
<!-- <td align="center" class="txtnegrita">Pase la tarjeta:</td>-->
|
||||||
|
<td align="center" class="txtnegrita">Pase la tarjeta: <input type="password" size="40" name="TARJETA" class="txt" id="tartxt" value="" onlostfocus="javascript:detecta()" onfocus="javascript:document.frmTarjeta.TARJETA.text=''"> <a href="javascript:validar()" class="enlace">Validar</a> <a href="javascript:borrarCampo()" class="enlace">Borrar</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<!-- <tr>
|
||||||
|
<td colspan="2" align="center"><a href="javascript:validar()" class="enlace">Validar</a></td>
|
||||||
|
</tr>-->
|
||||||
|
</form>
|
||||||
|
<!-- <tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<table align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtnegrita">INTRODUCción MANUAL DEL TROQUELADO DE LA TARJETA</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtnegrita">Si no funciona el pase de la Tarjeta utilice esta opción para identificar al asegurado:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><a href="troquelado.jsp" class="enlace">Introducir Troquelado</a></td>
|
||||||
|
</tr>
|
||||||
|
</table> -->
|
||||||
|
<%
|
||||||
|
|
||||||
|
}%>
|
||||||
|
<%
|
||||||
|
if(request.getParameter("embosado")!=null)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<table border="0" width="100%" align="center">
|
||||||
|
<tr><td align="center" class="txtnegrita">Para conseguir una mejor gestión de los desplazados necesitamos que vuelva a pasar la tarjeta en el campo correspondiente y que introduzca los dígitos que aparecen en la tarjeta, como se muestra en la imagen a continuación:</td></tr>
|
||||||
|
<tr><td align="center"><img src="https://tarisan.imqnavarra.com/tarisan/img/tarjeta_embossado.jpg" width="400" height="130"/></td></tr>
|
||||||
|
</table>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<table border="0" width="100%" align="center">
|
||||||
|
<tr><td align="center" class="txt"><a href="https://tarisan.imqnavarra.com/tarisan/manual.pdf" target="_blank"><img src="<%=request.getContextPath()%>/img/iconoManual.gif"></a></td></tr>
|
||||||
|
</table>
|
||||||
|
<!--<br/> -->
|
||||||
|
<div id="thawteseal" style="text-align:center;" title="Click para Verificar - Este sitio confía en Thawte SSL para asegurar la confidencialidad de sus comunicaciones.">
|
||||||
|
<div><script type="text/javascript" src="https://seal.thawte.com/getthawteseal?host_name=tarisan.imqnavarra.com&size=S&lang=es"></script></div>
|
||||||
|
<div><a href="http://www.thawte.com/products/" target="_blank" style="color:#000000; text-decoration:none; font:bold 10px arial,sans-serif; margin:0px; padding:0px;">Acerca de los certificados SSL</a></div>
|
||||||
|
</div>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<!-- <td width="15%">
|
||||||
|
<div class="noticiaLateral">
|
||||||
|
<span>Noticias en el lateral derecho</span>
|
||||||
|
</div>
|
||||||
|
</td>-->
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<script>
|
||||||
|
//Basta con ponerle a cualquier elemento el id="idAviso"
|
||||||
|
if(document.getElementById ("idAviso")){
|
||||||
|
window.setInterval (parpadear, 500);
|
||||||
|
var color = "#C02331"; //color del blink
|
||||||
|
function parpadear () {
|
||||||
|
var aviso = document.getElementById ("idAviso");
|
||||||
|
color = (color == "#C02331")? "#000000" : "#C02331";
|
||||||
|
aviso.style.color = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.getElementById ("fondoParpadeo")){
|
||||||
|
window.setInterval (parpadear, 500);
|
||||||
|
var color = "#F3D195"; //color del blink
|
||||||
|
function parpadear () {
|
||||||
|
var fondo = document.getElementById ("fondoParpadeo");
|
||||||
|
color = (color == "#F3D195")? "#E8AD79" : "#F3D195";
|
||||||
|
fondo.style.background = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 pacientes (pac/gestor.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,198 @@
|
|||||||
|
<%@ 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 pacientes (pac/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 pacientes (pac/gestor.jsp)");
|
||||||
|
|
||||||
|
//Obtención del perfil del usuario conectado
|
||||||
|
StringBuffer perfil = new StringBuffer();
|
||||||
|
perfil.append("|");
|
||||||
|
perfil.append(sesion.getAttribute("PERFIL"));
|
||||||
|
perfil.append("|");
|
||||||
|
|
||||||
|
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 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/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/menu_pac.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" src="../../js/jquery.modal.min.js"></script>
|
||||||
|
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
<!--
|
||||||
|
function validar()
|
||||||
|
{
|
||||||
|
if(document.frmTarjeta.TARJETA.value != "")
|
||||||
|
{
|
||||||
|
document.frmTarjeta.submit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*alert("Tiene que pasar la Tarjeta del Paciente");*/
|
||||||
|
modal({type:'error',title:'¡Atención!',text:'Tiene que pasar la Tarjeta del Paciente.',});
|
||||||
|
document.frmTarjeta.TARJETA.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmTarjeta.TARJETA.focus()">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOff"><b>TARJETA DE PACIENTE IMQ</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr valign="top">
|
||||||
|
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||||
|
<td width="150" class="menuOn"><b>TARJETA DE PACIENTE CHIPCARD</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></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"></td>
|
||||||
|
<td class="txt" valign="top">
|
||||||
|
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||||
|
<table border="0" width="100%" align="center">
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<form name="frmTarjeta" action="../../servlet/GestorPacientes?OPCION=<%= Constantes.OPC_PAC_PASO_TARJETA %>" method="post">
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtnegrita">Pase la tarjeta:</td>
|
||||||
|
<td><input type="password" size="80" name="TARJETA" class="txt" value=""></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><a href="javascript:validar()" class="enlace">Validar</a></td>
|
||||||
|
</tr>
|
||||||
|
</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>
|
||||||
|
<%
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de pacientes (pac/gestor.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,407 @@
|
|||||||
|
<%@ page import="com.tarisan.control.*" %>
|
||||||
|
<%@ page import="com.tarisan.data.*" %>
|
||||||
|
<%@ page import="com.tarisan.excepcion.*" %>
|
||||||
|
<%@ page import="com.tarisan.log.*" %>
|
||||||
|
<%@ 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, "Inicio p墔ina del historial del paciente (pac/historia.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 del historial del paciente (pac/historia.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu="";
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
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 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>Historial 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/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/menu_pac.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" src="../../js/jquery.modal.min.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/Javascript">
|
||||||
|
<!--
|
||||||
|
function comprobarTamanio()
|
||||||
|
{
|
||||||
|
return (document.frmHistoriaPaciente.texto.value.length < 255)
|
||||||
|
}
|
||||||
|
|
||||||
|
function actualizarHistoriaPaciente()
|
||||||
|
{
|
||||||
|
if (esVacia(document.frmHistoriaPaciente.texto.value)) //la textarea esta vacia
|
||||||
|
{
|
||||||
|
//alert("Debe introducir alguna indicaci鏮.");
|
||||||
|
modal({type:'error',title:',tenci鏮!',text:'Debe introducir alguna indicaci鏮.',});
|
||||||
|
document.frmHistoriaPaciente.texto.value="";
|
||||||
|
document.frmHistoriaPaciente.texto.focus();
|
||||||
|
}
|
||||||
|
else //la textarea no esta vacia
|
||||||
|
{
|
||||||
|
//comprobamos que tenga menos de mil caracteres
|
||||||
|
if (document.frmHistoriaPaciente.texto.value.length > 255)
|
||||||
|
document.frmHistoriaPaciente.texto.value=document.frmHistoriaPaciente.texto.value.substring(0,255);
|
||||||
|
|
||||||
|
document.frmHistoriaPaciente.texto.value = document.frmHistoriaPaciente.texto.value.toUpperCase();
|
||||||
|
frmHistoriaPaciente.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deshacer()
|
||||||
|
{
|
||||||
|
document.frmHistoriaPaciente.reset();
|
||||||
|
document.frmHistoriaPaciente.texto.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmPaginacionHistoriaPaciente.pagina.value=pagina;
|
||||||
|
document.frmPaginacionHistoriaPaciente.submit();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmHistoriaPaciente.texto.focus()">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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 width="565">
|
||||||
|
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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%">
|
||||||
|
|
||||||
|
<%
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//Creaci鏮 de la tabla presentaci鏮 de resultados
|
||||||
|
PersistenciaTamovmpo per = new PersistenciaTamovmpo();
|
||||||
|
Vector vSeleccion = per.listado_historia_paciente(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario(), intPagina);
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Listado historia paciente: " + vSeleccion.size());
|
||||||
|
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" colspan="2">
|
||||||
|
<form name="frmHistoriaPaciente" action="../../servlet/GestorPacientes" method="post">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="txtNegrita" align="left">Indicaciones:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<textarea name="texto" rows="5" cols="70" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<input type="hidden" name="x" value="<%=strParametroMenu%>">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_ACTUALIZAR_HISTORIA_PACIENTE%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmPaginacionHistoriaPaciente" action="historia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="">
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" colspan="2">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td width="60" align="center"><a href="javascript:actualizarHistoriaPaciente()" class="enlace">OK</a></td>
|
||||||
|
<td width="60" align="center"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" 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">Fecha</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci鏮</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
Tamovmpo tamovmpo = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
tamovmpo = (Tamovmpo)vSeleccion.elementAt(i);
|
||||||
|
%>
|
||||||
|
<tr class="trResultados">
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tamovmpo.getFecha())%></td>
|
||||||
|
<td class="<%=estilo%>" align="left"><%=tamovmpo.getTexto()%></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">萖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"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" colspan="2">
|
||||||
|
<form name="frmHistoriaPaciente" action="../../servlet/GestorPacientes" method="post">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="txtNegrita" align="left">Indicaciones:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<textarea name="texto" rows="5" cols="70" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<input type="hidden" name="x" value="<%=strParametroMenu%>">
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_ACTUALIZAR_HISTORIA_PACIENTE%>">
|
||||||
|
</form>
|
||||||
|
<form name="frmPaginacionHistoriaPaciente" action="historia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="">
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" colspan="2">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td width="60" align="center"><a href="javascript:actualizarHistoriaPaciente()" class="enlace">OK</a></td>
|
||||||
|
<td width="60" align="center"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</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", "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 del historial del paciente (pac/historia.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
After Width: | Height: | Size: 86 B |
|
After Width: | Height: | Size: 43 B |
|
After Width: | Height: | Size: 43 B |
@@ -0,0 +1,250 @@
|
|||||||
|
<%@ 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 justificacion de la analitica (pac/justificacionAnalitica.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 justificacion de la analitica (pac/justificacionAnalitica.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// Definicion de variables
|
||||||
|
String strParametroMenu="";
|
||||||
|
String strTipo="";
|
||||||
|
String paginaSolicitud = "solicitudAnaliticaNiveles.jsp";
|
||||||
|
|
||||||
|
//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 tipo para saber si la justificacion es de tipo anatomia patologica o anal癃ica
|
||||||
|
if (request.getParameter("tipo")!=null)
|
||||||
|
paginaSolicitud="solicitudAnatomiaNiveles.jsp";
|
||||||
|
|
||||||
|
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>Anal癃ica</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/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</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 comprobarTamanio()
|
||||||
|
{
|
||||||
|
return (document.frmJustificacionPrescripcion.justificacionPrescripcion.value.length < 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
function enviar()
|
||||||
|
{
|
||||||
|
|
||||||
|
//Eliminamos los saltos de linea que esten despues del ultimo elemento
|
||||||
|
quitarUltimosSaltosLinea(document.frmJustificacionPrescripcion.justificacionPrescripcion);
|
||||||
|
|
||||||
|
if (esVacia(document.frmJustificacionPrescripcion.justificacionPrescripcion.value))
|
||||||
|
{
|
||||||
|
//alert("Debe introducir la justificaci鏮 de la nueva prescripci鏮.");
|
||||||
|
modal({type:'error',title:',tenci鏮!',text:'Debe introducir la justificaci鏮 de la nueva prescripci鏮.',});
|
||||||
|
document.frmJustificacionPrescripcion.justificacionPrescripcion.value="";
|
||||||
|
document.frmJustificacionPrescripcion.justificacionPrescripcion.focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
document.frmJustificacionPrescripcion.submit();
|
||||||
|
}
|
||||||
|
function deshacer()
|
||||||
|
{
|
||||||
|
document.frmJustificacionPrescripcion.reset();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmJustificacionPrescripcion.justificacionPrescripcion.focus()">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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 width="565">
|
||||||
|
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<form name="frmJustificacionPrescripcion" action="<%=paginaSolicitud%>?x=<%=strParametroMenu%>&pagina=1" method="post">
|
||||||
|
<td align="center">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<!-- <td align="left" class="txtNegrita">Indique la justificaci鏮 de prescribir una nueva anal癃ica: </span></td> -->
|
||||||
|
<td align="left" class="txtNegrita">Indique la justificaci鏮 de la nueva prescripci鏮: </span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<textarea name="justificacionPrescripcion" rows="8" cols="80" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table boreder="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td width="70"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
|
||||||
|
<td width="70"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||||
|
</tr>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</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 justificacion de la analitica (pac/justificacionAnalitica.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
<%@ 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 justificacion del diagnostico (pac/justificacionDiagnostico.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 justificacion del diagnostico (pac/justificacionDiagnostico.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>Diagn鏀tico</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/menu_pac.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" src="../../js/jquery.modal.min.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
|
||||||
|
function comprobarTamanio()
|
||||||
|
{
|
||||||
|
return (document.frmJustificacionPrescripcion.justificacionPrescripcion.value.length < 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
function enviar()
|
||||||
|
{
|
||||||
|
if (esVacia(document.frmJustificacionPrescripcion.justificacionPrescripcion.value))
|
||||||
|
{
|
||||||
|
//alert("Debe introducir la justificaci鏮 del nuevo an嫮isis.");
|
||||||
|
modal({type:'error',title:',tenci鏮!',text:'Debe introducir la justificaci鏮 del nuevo an嫮isis.',});
|
||||||
|
document.frmJustificacionPrescripcion.justificacionPrescripcion.focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
document.frmJustificacionPrescripcion.submit();
|
||||||
|
}
|
||||||
|
function deshacer()
|
||||||
|
{
|
||||||
|
document.frmJustificacionPrescripcion.reset();
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmJustificacionPrescripcion.justificacionPrescripcion.focus()">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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 width="565">
|
||||||
|
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<form name="frmJustificacionPrescripcion" action="solicitudDiagnosticoNiveles.jsp?x=<%=strParametroMenu%>&pagina=1" method="post">
|
||||||
|
<td align="center">
|
||||||
|
<table border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="left" class="txtNegrita">Indique la justificaci鏮 de prescribir una nueva radiograf燰: </span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<textarea name="justificacionPrescripcion" rows="8" cols="80" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table boreder="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td width="70"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||||
|
<td width="70"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
|
||||||
|
</tr>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</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 justificacion del diagnostico (pac/justificacionDiagnostico.jsp)");
|
||||||
|
}
|
||||||
|
%>
|
||||||
@@ -0,0 +1,586 @@
|
|||||||
|
<%@ 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.util.Vector" %>
|
||||||
|
<%@ page import="java.io.*" %>
|
||||||
|
<%@ page import="java.util.Calendar" %>
|
||||||
|
<%@ page import="java.math.BigDecimal"%>
|
||||||
|
<%@ page import="java.text.SimpleDateFormat" %>
|
||||||
|
|
||||||
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/analitica.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(request.getContextPath() + "/html/login.html");
|
||||||
|
}
|
||||||
|
/*else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||||
|
response.sendRedirect(request.getContextPath() + "/jsp/pac/solicitudAnaliticaNiveles.jsp?x=4&pagina=1");
|
||||||
|
}*/
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de peticiones (pac/peticiones.jsp)");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Definicion de variables param2
|
||||||
|
boolean desplazado = false;
|
||||||
|
String strParametroMenu="";
|
||||||
|
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||||
|
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||||
|
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||||
|
int intPagina = 0;
|
||||||
|
StringBuffer strSql = new StringBuffer();
|
||||||
|
StringBuffer strSql2 = new StringBuffer();
|
||||||
|
StringBuffer strSql_requestid = new StringBuffer();
|
||||||
|
Object aCondiciones[]=null;
|
||||||
|
Object bCondiciones[]=null;
|
||||||
|
Object Condiciones[]=null;
|
||||||
|
Object aCondiciones_requestid[]=null;
|
||||||
|
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||||
|
int intImpresion = 0;
|
||||||
|
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||||
|
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||||
|
|
||||||
|
String strListaElementosPrescripcion = "";
|
||||||
|
String strInformePrescripcion = "";
|
||||||
|
String strAutorizacion="";
|
||||||
|
|
||||||
|
//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 impresion que nos indica que se ha de realizar una impresion
|
||||||
|
if (request.getParameter("imp")!=null) {
|
||||||
|
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||||
|
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||||
|
|
||||||
|
//parametro informePrescripcion utilizado para realizar la impresion
|
||||||
|
if (request.getParameter("informePrescripcion")!=null)
|
||||||
|
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||||
|
|
||||||
|
//atributo autorizacion utilizado para realizar la impresion
|
||||||
|
if (request.getAttribute("autorizacion")!=null) {
|
||||||
|
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||||
|
{
|
||||||
|
desplazado = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
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/>", " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String path = request.getContextPath();
|
||||||
|
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||||
|
path = path + "/tarisan";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Otras Peticiones</title>
|
||||||
|
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||||
|
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||||
|
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||||
|
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||||
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
<!--
|
||||||
|
var despla = <%= desplazado %>;
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
function obtenerArrayListaElementosPrescripcion()
|
||||||
|
{
|
||||||
|
|
||||||
|
//preparamos la lista de descripciones
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
<%
|
||||||
|
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores de la lista sin comillas simples
|
||||||
|
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||||
|
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||||
|
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
//inicializamos el array de elementos con sus valores originales
|
||||||
|
var i=0;
|
||||||
|
var vElementosPrescripcion = new Array();
|
||||||
|
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||||
|
{
|
||||||
|
//quitamos el primer caracter separador
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||||
|
{
|
||||||
|
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||||
|
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vElementosPrescripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function obtenerInformePrescripcion()
|
||||||
|
{
|
||||||
|
//preparamos el informe de prescripcion
|
||||||
|
|
||||||
|
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||||
|
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||||
|
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||||
|
//dependiendo del navegador el salto de linea es diferente.
|
||||||
|
//explorer => \r\n
|
||||||
|
//netscape 6 => \n
|
||||||
|
<%
|
||||||
|
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||||
|
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||||
|
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||||
|
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||||
|
%>
|
||||||
|
|
||||||
|
//cogemos los valores del informe sin comillas simples
|
||||||
|
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||||
|
//restauramos las comillas simples para ponerlos con su valor original
|
||||||
|
while(informePrescripcion.indexOf("~")!=-1)
|
||||||
|
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||||
|
|
||||||
|
return informePrescripcion;
|
||||||
|
}
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||||
|
//********************************************************************************************************************
|
||||||
|
//********************************************************************************************************************
|
||||||
|
|
||||||
|
function comprobarImpresion(impresion)
|
||||||
|
{
|
||||||
|
if (impresion==1) {//se efectua la impresion
|
||||||
|
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impAnalitica.jsp?autorizacion=<%=strAutorizacion%>');
|
||||||
|
//var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||||
|
|
||||||
|
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||||
|
document.frmImprimirPeticion.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function nuevaPrescripcion()
|
||||||
|
{
|
||||||
|
document.frmSolicitudPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function paginacion(pagina)
|
||||||
|
{
|
||||||
|
document.frmPrescripcion.pagina.value=pagina;
|
||||||
|
document.frmPrescripcion.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function submitform()
|
||||||
|
{
|
||||||
|
document.frmAnalitica.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||||
|
<div class="marco">
|
||||||
|
<!-- Datos del usuario conectado //-->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||||
|
<tr>
|
||||||
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></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></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%">
|
||||||
|
<%
|
||||||
|
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||||
|
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||||
|
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||||
|
<td width="1px" bgcolor="#CCCCCC"></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="100%">
|
||||||
|
|
||||||
|
<!-- Presentacion de los resultados -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||||
|
<form name="frmPrescripcion" action="peticiones.jsp?x=<%=strParametroMenu%>" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||||
|
<form name="frmSolicitudPrescripcion" action="<%=request.getContextPath()%>/jsp/pac/especialidades.jsp?x=<%=strParametroMenu%>&pagina=1" method="post">
|
||||||
|
<input type="hidden" name="pagina" value="1">
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//Creación de la tabla presentación de resultados
|
||||||
|
PersistenciaTapresca per = new PersistenciaTapresca();
|
||||||
|
String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||||
|
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||||
|
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();
|
||||||
|
|
||||||
|
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||||
|
String vael = null;
|
||||||
|
|
||||||
|
Vector vSeleccion = per.listado_peticiones_por_paciente(intMedico, pac, intPagina, /*5*/6 ); //El último número es el tipo de petición (en este caso especialidades)
|
||||||
|
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados peticiones tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||||
|
/*int prueba = per.prueba_conexion();*/
|
||||||
|
|
||||||
|
/*Vector vPagiancion = new Vector();
|
||||||
|
vPagiancion = Utilidades.ObtenerPaginacionDeUnVector(vSeleccion, intPagina);*/
|
||||||
|
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(70).getMensaje() %></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></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">Fecha Solicitud</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Especialidad</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Texto</td>
|
||||||
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
|
||||||
|
Tapresca tapresca = null;
|
||||||
|
String estilo = "";
|
||||||
|
for(int i = 0; i < vSeleccion.size(); i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
estilo = "filaA";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
estilo = "filaB";
|
||||||
|
}
|
||||||
|
tapresca = (Tapresca)vSeleccion.elementAt(i);
|
||||||
|
String txt = "";
|
||||||
|
txt = tapresca.getTexto();
|
||||||
|
if (txt == null){
|
||||||
|
txt = "-";
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
<tr class="trResultados">
|
||||||
|
<%
|
||||||
|
if (tapresca.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tapresca.getFecha())%></td>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else //campo autorizacion tiene un valor valido
|
||||||
|
{
|
||||||
|
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tapresca.getFecha())%></td>
|
||||||
|
<td class="<%=estilo%>" align="center">
|
||||||
|
<%
|
||||||
|
String peticion = ""+tapresca.getAutorizacion();
|
||||||
|
/*peticion = (peticion.length()<8)?"0"+peticion:peticion;*/
|
||||||
|
String peticionE = tapresca.getAutorizacionEncriptada();
|
||||||
|
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_especialidades;
|
||||||
|
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||||
|
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||||
|
<input type="hidden" name="tipo" value="10"/>
|
||||||
|
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" 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="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="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||||
|
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||||
|
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||||
|
</form>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<span align="center"><%=peticion%></span>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=tapresca.getEspecialidad()%></td>
|
||||||
|
<td class="<%=estilo%>" align="center"><%=txt%></td>
|
||||||
|
<%
|
||||||
|
int diaHoy = hoy.getDate();
|
||||||
|
int mesHoy = hoy.getMonth();
|
||||||
|
int anoHoy = hoy.getYear();
|
||||||
|
|
||||||
|
int diaAnalisis = tapresca.getFecha().getDate();
|
||||||
|
int mesAnalisis = tapresca.getFecha().getMonth();
|
||||||
|
int anoAnalisis = tapresca.getFecha().getYear();
|
||||||
|
|
||||||
|
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){
|
||||||
|
PersistenciaTaespeci perTaes = new PersistenciaTaespeci();
|
||||||
|
int pa = perTaes.paginaDeLaEspecialidad(tapresca.getEspecialidad());
|
||||||
|
%>
|
||||||
|
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/especialidades.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=tapresca.getAutorizacion()%>&pagina=<%=pa%>" class="enlaceAnalisis">Editar</a></td>
|
||||||
|
<%}else{ %>
|
||||||
|
<td class="<%=estilo%>" align="center">-</td>
|
||||||
|
<%}%>
|
||||||
|
<%
|
||||||
|
strSql_requestid.delete(0,strSql_requestid.length());
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%
|
||||||
|
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||||
|
<tr><td colspan="2"></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 width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/peticiones.jsp?x=6&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/pac/peticiones.jsp?x=6&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">ú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/pac/peticiones.jsp?x=6&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">último</a></td>-->
|
||||||
|
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/peticiones.jsp?x=6&pagina=<%=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="10"/>
|
||||||
|
<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 analitica (pac/analitica.jsp)");
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||