añado jsp
This commit is contained in:
@@ -0,0 +1,407 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio p墔ina del historial del paciente (pac/historia.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesi鏮 invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p墔ina del historial del paciente (pac/historia.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
|
||||
//Obtenci鏮 del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Historial Paciente</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/Javascript">
|
||||
<!--
|
||||
function comprobarTamanio()
|
||||
{
|
||||
return (document.frmHistoriaPaciente.texto.value.length < 255)
|
||||
}
|
||||
|
||||
function actualizarHistoriaPaciente()
|
||||
{
|
||||
if (esVacia(document.frmHistoriaPaciente.texto.value)) //la textarea esta vacia
|
||||
{
|
||||
//alert("Debe introducir alguna indicaci鏮.");
|
||||
modal({type:'error',title:',tenci鏮!',text:'Debe introducir alguna indicaci鏮.',});
|
||||
document.frmHistoriaPaciente.texto.value="";
|
||||
document.frmHistoriaPaciente.texto.focus();
|
||||
}
|
||||
else //la textarea no esta vacia
|
||||
{
|
||||
//comprobamos que tenga menos de mil caracteres
|
||||
if (document.frmHistoriaPaciente.texto.value.length > 255)
|
||||
document.frmHistoriaPaciente.texto.value=document.frmHistoriaPaciente.texto.value.substring(0,255);
|
||||
|
||||
document.frmHistoriaPaciente.texto.value = document.frmHistoriaPaciente.texto.value.toUpperCase();
|
||||
frmHistoriaPaciente.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function deshacer()
|
||||
{
|
||||
document.frmHistoriaPaciente.reset();
|
||||
document.frmHistoriaPaciente.texto.focus();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPaginacionHistoriaPaciente.pagina.value=pagina;
|
||||
document.frmPaginacionHistoriaPaciente.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmHistoriaPaciente.texto.focus()">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegaci鏮 superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la p墔ina //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Men� de navegaci鏮 del m鏚ulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<%
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
//Creaci鏮 de la tabla presentaci鏮 de resultados
|
||||
PersistenciaTamovmpo per = new PersistenciaTamovmpo();
|
||||
Vector vSeleccion = per.listado_historia_paciente(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario(), intPagina);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Listado historia paciente: " + vSeleccion.size());
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<form name="frmHistoriaPaciente" action="../../servlet/GestorPacientes" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="txtNegrita" align="left">Indicaciones:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="texto" rows="5" cols="70" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<input type="hidden" name="x" value="<%=strParametroMenu%>">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_ACTUALIZAR_HISTORIA_PACIENTE%>">
|
||||
</form>
|
||||
<form name="frmPaginacionHistoriaPaciente" action="historia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td width="60" align="center"><a href="javascript:actualizarHistoriaPaciente()" class="enlace">OK</a></td>
|
||||
<td width="60" align="center"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span class="txt">P墔ina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci鏮</td>
|
||||
</tr>
|
||||
<%
|
||||
Tamovmpo tamovmpo = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
tamovmpo = (Tamovmpo)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tamovmpo.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=tamovmpo.getTexto()%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">萖timo</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">萖timo</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<form name="frmHistoriaPaciente" action="../../servlet/GestorPacientes" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="txtNegrita" align="left">Indicaciones:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="texto" rows="5" cols="70" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<input type="hidden" name="x" value="<%=strParametroMenu%>">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_ACTUALIZAR_HISTORIA_PACIENTE%>">
|
||||
</form>
|
||||
<form name="frmPaginacionHistoriaPaciente" action="historia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td width="60" align="center"><a href="javascript:actualizarHistoriaPaciente()" class="enlace">OK</a></td>
|
||||
<td width="60" align="center"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%} %>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p墔ina del historial del paciente (pac/historia.jsp)");
|
||||
}
|
||||
%>
|
||||
Reference in New Issue
Block a user