añado jsp
This commit is contained in:
@@ -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)");
|
||||
}
|
||||
%>
|
||||
Reference in New Issue
Block a user