añado jsp
This commit is contained in:
@@ -0,0 +1,656 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
<%
|
||||
// LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de pacientes (med/detallePacientes.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de pacientes (med/detallePacientes.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
String strFecha = "";
|
||||
String strFechaHasta = "";
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
int intPagina = 0;
|
||||
int borrarActo = 0;
|
||||
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
Object aCondiciones[]=null;
|
||||
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro fecha que indica el año para el que desea realizar la impresion
|
||||
if (request.getParameter("fecha")!=null)
|
||||
strFecha=(String)request.getParameter("fecha");
|
||||
|
||||
//parametro fecha que indica el año para el que desea realizar la impresion
|
||||
if (request.getParameter("fechaHasta")!=null)
|
||||
strFechaHasta=(String)request.getParameter("fechaHasta");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
int intImpresion = 0;
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion = Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("borrarActo")!=null){
|
||||
borrarActo = Integer.parseInt(request.getParameter("borrarActo"));
|
||||
}
|
||||
|
||||
//atributo ENC que obtiene la peticion encriptada
|
||||
String detalleE = "";
|
||||
if (sesion.getAttribute("ENC")!=null) {
|
||||
detalleE = (String)sesion.getAttribute("ENC");
|
||||
sesion.removeAttribute("ENC");
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Pacientes</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_med.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmDetallePacientes.borrarActo.value=0;
|
||||
document.frmDetallePacientes.pagina.value=pagina;
|
||||
document.frmDetallePacientes.submit();
|
||||
}
|
||||
|
||||
function comprobarFecha()
|
||||
{
|
||||
if (document.frmDetallePacientes.fecha.value!="")
|
||||
{
|
||||
return valorFecha(document.frmDetallePacientes.fecha);
|
||||
}
|
||||
else
|
||||
{
|
||||
//alert("Introduzca la fecha.");
|
||||
modal({type:'error',title:'Atención!',text:'Introduzca la fecha Desde.',});
|
||||
document.frmDetallePacientes.fecha.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function comprobarFechaHasta()
|
||||
{
|
||||
if (document.frmDetallePacientes.fechaHasta.value!="")
|
||||
{
|
||||
return valorFecha(document.frmDetallePacientes.fechaHasta);
|
||||
}
|
||||
else
|
||||
{
|
||||
//alert("Introduzca la fecha.");
|
||||
modal({type:'error',title:'Atención!',text:'Introduzca la fecha Hasta.',});
|
||||
document.frmDetallePacientes.fechaHasta.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function fechasCorrectas()
|
||||
{
|
||||
var Fecha_aux1 = document.frmDetallePacientes.fecha.value.split("-");
|
||||
var Fecha1 = new Date(parseInt(Fecha_aux1[2]),parseInt(Fecha_aux1[1]-1),parseInt(Fecha_aux1[0]));
|
||||
var AnyoFecha1 = Fecha1.getFullYear();
|
||||
var MesFecha1 = Fecha1.getMonth();
|
||||
var DiaFecha1 = Fecha1.getDate();
|
||||
|
||||
var Fecha_aux2 = document.frmDetallePacientes.fechaHasta.value.split("-");
|
||||
var Fecha2 = new Date(parseInt(Fecha_aux2[2]),parseInt(Fecha_aux2[1]-1),parseInt(Fecha_aux2[0]));
|
||||
var AnyoFecha2 = Fecha2.getFullYear();
|
||||
var MesFecha2 = Fecha2.getMonth();
|
||||
var DiaFecha2 = Fecha2.getDate();
|
||||
|
||||
if (AnyoFecha2 < AnyoFecha1){
|
||||
modal({type:'error',title:'Atención!',text:'La fecha Desde debe ser menor que la fecha Hasta.',});
|
||||
document.frmDetallePacientes.fechaHasta.focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
if (AnyoFecha1 == AnyoFecha2 && MesFecha2 < MesFecha1){
|
||||
modal({type:'error',title:'Atención!',text:'La fecha Desde debe ser menor que la fecha Hasta.',});
|
||||
document.frmDetallePacientes.fechaHasta.focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
if (AnyoFecha1 == AnyoFecha2 && MesFecha1 == MesFecha2 && DiaFecha2 < DiaFecha1){
|
||||
modal({type:'error',title:'Atención!',text:'La fecha Desde debe ser menor que la fecha Hasta.',});
|
||||
document.frmDetallePacientes.fechaHasta.focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function imprimir()
|
||||
{
|
||||
if (comprobarFecha()==true && comprobarFechaHasta()==true) {
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
|
||||
//alert(document.frmDetallePacientes.fecha.value);
|
||||
if (fechasCorrectas()==true) {
|
||||
document.frmDetallePacientes.action = "<%=request.getContextPath()%>/servlet/GestorPacientes?OPCION=<%=Constantes.OPC_MED_DETALLE_PACIENTE %>";
|
||||
document.frmDetallePacientes.submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) { //se efectua la impresion
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=detalleE%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function cambiar_mes(option)
|
||||
{
|
||||
//alert(option.value);
|
||||
document.frmDetallePacientes.cambio_mes.value=1;
|
||||
//document.frmDetallePacientes.mes.value=option.value;
|
||||
document.frmDetallePacientes.borrarActo.value=0;
|
||||
document.frmDetallePacientes.submit();
|
||||
}
|
||||
|
||||
/*function borrar_acto(medico,fecha,acto,colectivo,poliza,orden,espe,numseq,auto)
|
||||
{
|
||||
if(confirm('Seguro que deseas eliminar el acto imputado?'))
|
||||
{
|
||||
document.frmDetallePacientes.borrarActo.value=1;
|
||||
document.frmDetallePacientes.bFecha.value=fecha;
|
||||
document.frmDetallePacientes.bActo.value=acto;
|
||||
document.frmDetallePacientes.bMedico.value=medico;
|
||||
document.frmDetallePacientes.bCol.value=colectivo;
|
||||
document.frmDetallePacientes.bPol.value=poliza;
|
||||
document.frmDetallePacientes.bOrd.value=orden;
|
||||
document.frmDetallePacientes.bEspe.value=espe;
|
||||
document.frmDetallePacientes.bNumseq.value=numseq;
|
||||
document.frmDetallePacientes.bAuto.value=auto;
|
||||
document.frmDetallePacientes.submit();
|
||||
}
|
||||
}*/
|
||||
|
||||
function borrar_acto(medico,fecha,acto,colectivo,poliza,orden,espe,numseq,auto)
|
||||
{
|
||||
modal({
|
||||
type : 'confirm',
|
||||
title : 'Atención!',
|
||||
text : 'Seguro que deseas eliminar el acto imputado?',
|
||||
callback: function(result){
|
||||
if (result){
|
||||
document.frmDetallePacientes.borrarActo.value=1;
|
||||
document.frmDetallePacientes.bFecha.value=fecha;
|
||||
document.frmDetallePacientes.bActo.value=acto;
|
||||
document.frmDetallePacientes.bMedico.value=medico;
|
||||
document.frmDetallePacientes.bCol.value=colectivo;
|
||||
document.frmDetallePacientes.bPol.value=poliza;
|
||||
document.frmDetallePacientes.bOrd.value=orden;
|
||||
document.frmDetallePacientes.bEspe.value=espe;
|
||||
document.frmDetallePacientes.bNumseq.value=numseq;
|
||||
document.frmDetallePacientes.bAuto.value=auto;
|
||||
document.frmDetallePacientes.submit();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:comprobarImpresion(<%=intImpresion%>);">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<%
|
||||
SimpleDateFormat sdfFormateadorFecha2 = new SimpleDateFormat("MM/yyyy");
|
||||
java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||
String fec1 = sdfFormateadorFecha2.format(dtFecha);
|
||||
|
||||
String[] parts = fec1.split("/");
|
||||
Integer mes1 = Integer.parseInt(parts[0]);
|
||||
Integer ano1 = Integer.parseInt(parts[1]);
|
||||
|
||||
String fec2 = "";
|
||||
String fec3 = "";
|
||||
if (mes1 == 1){
|
||||
fec2 = "12/" + (ano1 -1);
|
||||
fec3 = "11/" + (ano1 -1);
|
||||
} else{
|
||||
if (mes1 == 2){
|
||||
fec3 = "12/" + (ano1 -1);
|
||||
} else{
|
||||
fec3 = (mes1 - 2) + "/" + ano1;
|
||||
if (fec3.length() == 6){
|
||||
fec3 = "0" + fec3;
|
||||
}
|
||||
}
|
||||
fec2 = (mes1 - 1) + "/" + ano1;
|
||||
if (fec2.length() == 6){
|
||||
fec2 = "0" + fec2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String strCambio_mes = "";
|
||||
if (request.getParameter("cambio_mes")!=null){
|
||||
strCambio_mes = request.getParameter("cambio_mes");
|
||||
}
|
||||
String strMes = "";
|
||||
if (strCambio_mes.compareTo("1") == 0){
|
||||
strMes = request.getParameter("mes");
|
||||
} else {
|
||||
if (request.getParameter("mes")!=null){
|
||||
strMes = request.getParameter("mes");
|
||||
} else{
|
||||
strMes = sdfFormateadorFecha2.format(dtFecha);
|
||||
}
|
||||
}
|
||||
|
||||
%>
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
</tr>
|
||||
<form name="frmDetallePacientes" action="detallePacientes.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||
<input type="hidden" name="informePrescripcion" value="">
|
||||
<input type="hidden" name="borrarActo" value="">
|
||||
<input type="hidden" name="bFecha" value="">
|
||||
<input type="hidden" name="bActo" value="">
|
||||
<input type="hidden" name="bCol" value="">
|
||||
<input type="hidden" name="bPol" value="">
|
||||
<input type="hidden" name="bOrd" value="">
|
||||
<input type="hidden" name="bNumseq" value="">
|
||||
<input type="hidden" name="bEspe" value="">
|
||||
<input type="hidden" name="bMedico" value="">
|
||||
<input type="hidden" name="bAuto" value="">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_DETALLE_PACIENTE%>">
|
||||
<input type="hidden" id="cambio_mes" name="cambio_mes" value="0">
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<select name="mes" onchange="cambiar_mes(this);" style="margin-left:2em;">
|
||||
<option value="<%=fec1 %>" <%=(fec1.compareTo(strMes) == 0)?"selected":"" %>><%=fec1 %></option>
|
||||
<option value="<%=fec2 %>" <%=(fec2.compareTo(strMes) == 0)?"selected":"" %>><%=fec2 %></option>
|
||||
<option value="<%=fec3 %>" <%=(fec3.compareTo(strMes) == 0)?"selected":"" %>><%=fec3 %></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita">Desde (dd-mm-aaaa): </span></td>
|
||||
<td><input type="text" size="12" name="fecha" class="txt" value="<%=strFecha%>" maxlength="10"></td>
|
||||
<td> </td>
|
||||
<td><span class="txtnegrita">Hasta (dd-mm-aaaa): </span></td>
|
||||
<td><input type="text" size="12" name="fechaHasta" class="txt" value="<%=strFechaHasta%>" maxlength="10"></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:imprimir()" class="enlace">Imprimir</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<tr><td colspan="4"> </td></tr>
|
||||
<%
|
||||
//Creación de la tabla presentación de resultados
|
||||
|
||||
if (borrarActo==1){ //Se ha pulsado en eliminar acto
|
||||
String bFecha="";
|
||||
int bActo=0;
|
||||
int bCol=0;
|
||||
double bPol=0;
|
||||
int bOrd=0;
|
||||
int bNumseq=0;
|
||||
int bEspe=0;
|
||||
int bMedico=0;
|
||||
long bAuto=0;
|
||||
if (request.getParameter("bFecha")!=null){
|
||||
bFecha=(String)request.getParameter("bFecha");
|
||||
bFecha = bFecha.replace('-','/');
|
||||
}
|
||||
if (request.getParameter("bActo")!=null){
|
||||
bActo=Integer.parseInt(request.getParameter("bActo"));
|
||||
}
|
||||
if (request.getParameter("bCol")!=null){
|
||||
bCol=Integer.parseInt(request.getParameter("bCol"));
|
||||
}
|
||||
if (request.getParameter("bPol")!=null){
|
||||
bPol=Double.parseDouble(request.getParameter("bPol"));
|
||||
}
|
||||
if (request.getParameter("bOrd")!=null){
|
||||
bOrd=Integer.parseInt(request.getParameter("bOrd"));
|
||||
}
|
||||
if (request.getParameter("bNumseq")!=null){
|
||||
bNumseq=Integer.parseInt(request.getParameter("bNumseq"));
|
||||
}
|
||||
if (request.getParameter("bEspe")!=null){
|
||||
bEspe=Integer.parseInt(request.getParameter("bEspe"));
|
||||
}
|
||||
if (request.getParameter("bMedico")!=null){
|
||||
bMedico=Integer.parseInt(request.getParameter("bMedico"));
|
||||
}
|
||||
if (request.getParameter("bAuto")!=null){
|
||||
bAuto=Long.parseLong(request.getParameter("bAuto"));
|
||||
}
|
||||
|
||||
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
|
||||
if (per.borrar_acto(bMedico, bFecha, bActo, bCol, bPol, bOrd, bEspe, bNumseq, bAuto)){
|
||||
%><tr><td colspan="5" align="center" class="txtNegrita"><font color="blue">Acto eliminado correctamente</font></td></tr><%
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
aCondiciones = new Object[8];
|
||||
aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||
aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||
aCondiciones[2] = String.valueOf( strMes );
|
||||
aCondiciones[3] = String.valueOf( strMes );
|
||||
aCondiciones[4] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||
aCondiciones[5] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||
aCondiciones[6] = String.valueOf( strMes );
|
||||
aCondiciones[7] = String.valueOf( strMes );
|
||||
|
||||
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
|
||||
Vector vSeleccion = per.detalle_paciente_tamovext_espia(intPagina, aCondiciones);
|
||||
|
||||
/*aCondiciones = new Object[4];
|
||||
aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||
aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||
aCondiciones[2] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||
aCondiciones[3] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||
|
||||
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
|
||||
Vector vSeleccion = per.detalle_paciente(intPagina, aCondiciones);*/
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
VTamovextTaclient vTamovextTaclient = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
vTamovextTaclient = (VTamovextTaclient)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=/*vTamovextTaclient.getNombre() + " " + */vTamovextTaclient.getApellidos()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
|
||||
<%
|
||||
/*int diaHoy = hoy.getDate();
|
||||
int mesHoy = hoy.getMonth();
|
||||
int anoHoy = hoy.getYear();
|
||||
|
||||
int diaActo = vTamovextTaclient.getFecha().getDate();
|
||||
int mesActo = vTamovextTaclient.getFecha().getMonth();
|
||||
int anoActo = vTamovextTaclient.getFecha().getYear(); */
|
||||
|
||||
Calendar fechaLimite = Calendar.getInstance();
|
||||
fechaLimite.add(Calendar.DATE, -5);
|
||||
|
||||
// if ((diaHoy==diaActo)&&(mesHoy==mesActo)&&(anoHoy==anoActo)){
|
||||
if(vTamovextTaclient.getFecha().getTime() <= hoy.getTime() && vTamovextTaclient.getFecha().getTime() >= fechaLimite.getTime().getTime()) {%>
|
||||
<td class="<%=estilo%>" align="center"><a href="javascript:borrar_acto('<%=vTamovextTaclient.getMedico()%>','<%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%>','<%=vTamovextTaclient.getActo()%>','<%=vTamovextTaclient.getColec()%>','<%=vTamovextTaclient.getPoliza()%>','<%=vTamovextTaclient.getOrden()%>','<%=vTamovextTaclient.getEspecialidad()%>','<%=vTamovextTaclient.getNumseq()%>','<%=vTamovextTaclient.getAutorizacion()%>')" class="enlaceAnalisis">Eliminar</a></td>
|
||||
<%}else{ %>
|
||||
<td class="<%=estilo%>" align="center">-</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="5"></td></tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="9"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final página de pacientes (med/detallePacientes.jsp)");
|
||||
}
|
||||
%>
|
||||
Reference in New Issue
Block a user