añado jsp
This commit is contained in:
@@ -0,0 +1,435 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="com.tarisan.util.DES" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de peticiones capturadas (med/peticiones_capturadas.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de peticiones capturadas (med/peticiones_capturadas.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
String strCampoFecha="";
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
int intPagina=0;
|
||||
Object aCondiciones[]=null;
|
||||
int intExito = 0;
|
||||
int tipo = 0; //tipo de peticion para buscar el pdf en su carpeta
|
||||
String texto = "";
|
||||
int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa();
|
||||
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro descripcion para las busquedas
|
||||
if (request.getParameter("fecha")!=null)
|
||||
strCampoFecha = (String)request.getParameter("fecha");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
int intImpresion = 0;
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion = Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//parametro exito para saber si se ha hecho la insert o no
|
||||
if (request.getParameter("exito")!=null)
|
||||
intExito = Integer.parseInt(request.getParameter("exito"));
|
||||
|
||||
//atributo ENC que obtiene la peticion encriptada
|
||||
String peticionE = "";
|
||||
if (sesion.getAttribute("ENC")!=null) {
|
||||
peticionE = (String)sesion.getAttribute("ENC");
|
||||
sesion.removeAttribute("ENC");
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
if (intEspecialidad == ParametrosConfiguracion.analiticas){
|
||||
tipo = 5;
|
||||
texto = "INTRODUCIR DATOS DE ANALÍTICA MANUALMENTE";
|
||||
}else if (intEspecialidad == ParametrosConfiguracion.radiodiagnostico){
|
||||
texto = "INTRODUCIR DATOS DE RADIODIAGNÓSTICO MANUALMENTE";
|
||||
tipo = 18;
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Peticiones capturadas</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_med.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function informarParametroCampoBusqueda()
|
||||
{
|
||||
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strCampoFechaAux=strCampoFecha.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos el valor del campo de busqueda sin comillas simples
|
||||
var lstCampoBusqueda = '<%=strCampoFechaAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
|
||||
while(lstCampoBusqueda.indexOf("~")!=-1)
|
||||
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
|
||||
|
||||
document.frmPeticionesCapturadas.fecha.value=lstCampoBusqueda;
|
||||
}
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) { //se efectua la impresion
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=peticionE%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value=campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
document.frmPeticionesCapturadas.pagina.value=1;
|
||||
//pasarAMayusculas(document.frmPeticionesCapturadas.fecha);
|
||||
//document.frmPeticionesCapturadas.submit();
|
||||
if (document.frmPeticionesCapturadas.fecha.value!=""){
|
||||
if (valorFecha(document.frmPeticionesCapturadas.fecha)){
|
||||
document.frmPeticionesCapturadas.submit();
|
||||
}
|
||||
}else{
|
||||
document.frmPeticionesCapturadas.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPeticionesCapturadas.pagina.value=pagina;
|
||||
//pasarAMayusculas(document.frmPeticionesCapturadas.fecha);
|
||||
//document.frmPeticionesCapturadas.submit();
|
||||
if (document.frmPeticionesCapturadas.fecha.value!=""){
|
||||
if (valorFecha(document.frmPeticionesCapturadas.fecha)){
|
||||
document.frmPeticionesCapturadas.submit();
|
||||
}
|
||||
}else{
|
||||
document.frmPeticionesCapturadas.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function imprimirPeCap(){
|
||||
document.frmImprimirPeticiones.fec.value = document.frmPeticionesCapturadas.fecha.value;
|
||||
document.frmImprimirPeticiones.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>);">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr><td colspan="5" align="left"><a href="introducir_paciente.jsp?x=16" class="enlace"><%=texto %></a></td></tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr>
|
||||
<form name="frmPeticionesCapturadas" action="peticiones_capturadas.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita">Fecha (dd-mm-aaaa): </span></td>
|
||||
<td><input type="text" size="12" name="fecha" class="txt" maxlength="10"></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
</tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<%
|
||||
|
||||
|
||||
/*PersistenciaTtactmedGPC per = new PersistenciaTtactmedGPC();
|
||||
Vector vSeleccion = per.listadoDeterminacionesAnaliticas(strCampoNombre, intPagina);*/
|
||||
PersistenciaTapecap per = new PersistenciaTapecap();
|
||||
Vector vSeleccion = per.obtenerPeticionesCapturadas(medico, strCampoFecha, intPagina);
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><span class="txt"><%= pertamensaje.obtenerMensaje(10).getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Codigo</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorización</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Compañía</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
|
||||
</tr>
|
||||
<%
|
||||
Tapecap tapecap = null;
|
||||
String estilo = "";
|
||||
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
tapecap = (Tapecap)vSeleccion.elementAt(i);
|
||||
|
||||
String aut = "";
|
||||
if (tapecap.getAutorizacion()!=-1){
|
||||
aut = ""+tapecap.getAutorizacion();
|
||||
}
|
||||
|
||||
String strPrescriptor = "";
|
||||
if (tapecap.getPrescriptor()!=null){
|
||||
strPrescriptor = ""+tapecap.getPrescriptor();
|
||||
}
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<td class="<%=estilo%>" align="center"><%=tapecap.getCodigo() %></td>
|
||||
<td class="<%=estilo%>" align="left"><%=tapecap.getApellidos()%>, <%=tapecap.getNombre()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=aut %></td>
|
||||
<td class="<%=estilo%>" align="center"><%=tapecap.getCompañia() %></td>
|
||||
<td class="<%=estilo%>" align="left"><%=strPrescriptor %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="5"></td></tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<tr>
|
||||
<td><form name="frmImprimirPeticiones" action="<%=request.getContextPath()%>/servlet/GestorMedicos?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="fec" value="">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_IMPRIMIR_PETICIONES%>">
|
||||
<input type="button" name="imprimir" value="Imprimir Peticiones" onclick="javascript:imprimirPeCap()" class="enlace">
|
||||
</form></td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
<%if(intExito != 0)
|
||||
{
|
||||
%><table border="0" align="center">
|
||||
<tr><td class="txtnegrita"><font color="blue">Analítica introducida correctamente</font></td></tr>
|
||||
</table><%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="<%=tipo%>"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de peticiones capturadas (med/peticiones_capturadas.jsp)");
|
||||
}
|
||||
%>
|
||||
Reference in New Issue
Block a user