añado jsp
This commit is contained in:
@@ -0,0 +1,551 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + ": Inicio página de analista (pac/analista.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de analista (pac/analista.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
String strAutorizacion="";
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
int intPagina=0;
|
||||
String strRespuesta="";
|
||||
boolean blnPeticionCapturada=false;
|
||||
Object aCondiciones[]=null;
|
||||
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||
java.sql.Date dtFechaActual = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||
PersistenciaVTaprescaTtactmed per = new PersistenciaVTaprescaTtactmed();
|
||||
Vector vSeleccion=null;
|
||||
int mostrarBotonPDF = 0;
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro descripcion para las busquedas
|
||||
if (request.getParameter("autorizacion")!=null)
|
||||
strAutorizacion = (String)request.getParameter("autorizacion");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro respuesta para sacar el mensaje según se haya capturado o no
|
||||
if (request.getParameter("respuesta")!=null)
|
||||
strRespuesta = (String)request.getParameter("respuesta");
|
||||
|
||||
|
||||
//obtenemos las prescripciones de los analisis en caso de que se haya introducido un numero de autorizacion
|
||||
if (!strAutorizacion.equalsIgnoreCase("")) //El usuario ha introducido el numero de autorizacion
|
||||
{
|
||||
PersistenciaTaresana perTa = new PersistenciaTaresana();
|
||||
|
||||
if(!perTa.peticionCapturada(Long.parseLong(strAutorizacion))){
|
||||
per = new PersistenciaVTaprescaTtactmed();
|
||||
vSeleccion = per.obtenerPrescripcionAnalisis(Long.parseLong(strAutorizacion), intColectivo, dblPoliza, intBeneficiario, intEspecialidad, intPagina,((Usuario)sesion.getAttribute("USUARIO")).getMedico());
|
||||
}else{
|
||||
blnPeticionCapturada=true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*if (vSeleccion != null & vSeleccion.size()!=0)
|
||||
{
|
||||
//Comprobamos si existe ya el analisis en la tabla taresana
|
||||
//PersistenciaTaresana perTaresana = new PersistenciaTaresana();
|
||||
/*if (perTaresana.existeAnalisis(((VTapresca_ttactmed)vSeleccion.elementAt(0)).getPrescriptor(), intEspecialidad, intColectivo, dblPoliza, intBeneficiario, dtFechaActual)) //existe un analisis ya aceptado por el analista
|
||||
blnExisteAnalisisAceptado=true;*/
|
||||
//}
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Analista </title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
function aceptarAnalisis(aceptar)
|
||||
{
|
||||
if (aceptar==0)
|
||||
{
|
||||
/*alert("Para poder aceptar el análisis debe realizar una búsqueda previa del mismo.");*/
|
||||
document.frmAnalista.autorizacion.focus();
|
||||
modal({type:'error',title:'Atención!',text:'Para poder aceptar el análisis debe realizar una búsqueda previa del mismo.',});
|
||||
}
|
||||
else if (aceptar==2)
|
||||
{
|
||||
/*alert("La petición solicitada ya ha sido aceptada.");*/
|
||||
document.frmAnalista.autorizacion.focus();
|
||||
modal({type:'error',title:'Atención!',text:'La petición solicitada ya ha sido aceptada.',});
|
||||
}
|
||||
else
|
||||
{
|
||||
var boton = document.getElementById('okimprimir');
|
||||
boton.disabled = true;
|
||||
document.frmAceptarAnalisis.submit();
|
||||
/*alert("Petición adjudicada correctamente"); */
|
||||
}
|
||||
}
|
||||
|
||||
function mostrarPrescripciones()
|
||||
{
|
||||
if (validarAutorizacion(document.frmAnalista.autorizacion))
|
||||
document.frmAnalista.submit();
|
||||
}
|
||||
|
||||
function validarAutorizacion(autorizacion)
|
||||
{
|
||||
if (document.frmAnalista.autorizacion.value.length == 7){
|
||||
document.frmAnalista.autorizacion.value = "0" + document.frmAnalista.autorizacion.value;
|
||||
}else if(document.frmAnalista.autorizacion.value.length == 6){
|
||||
document.frmAnalista.autorizacion.value = "00" + document.frmAnalista.autorizacion.value;
|
||||
}
|
||||
|
||||
//var blnValorCorrecto = (soloNumeros(autorizacion.value) && document.frmAnalista.autorizacion.value.length == 8);
|
||||
var blnValorCorrecto = soloNumeros(autorizacion.value);
|
||||
if (!blnValorCorrecto)
|
||||
{
|
||||
//alert("La autorización debe ser un valor numérico de 8 dígitos.");
|
||||
//alert("La autorización debe ser un valor numérico.");
|
||||
autorizacion.focus();
|
||||
modal({type:'error',title:'Atención!',text:'La autorización debe ser un valor numérico.',});
|
||||
}
|
||||
|
||||
return blnValorCorrecto;
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmAnalista.pagina.value=pagina;
|
||||
document.frmAnalista.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmAnalista.autorizacion.focus()">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||
</tr>-->
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
<!--<tr valign="top">
|
||||
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0" width="75%"></td>
|
||||
</tr>-->
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td> -->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<table border="0" align="center" width="100%" cellpadding="0">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<%
|
||||
if (blnPeticionCapturada)
|
||||
{
|
||||
%>
|
||||
<td><input type="button" name="aceptar" value="Aceptar" id="okimprimir" onclick="javascript:aceptarAnalisis(2)" class="menu"></td>
|
||||
<%
|
||||
}
|
||||
else if ((vSeleccion==null || vSeleccion.size()==0)){
|
||||
%>
|
||||
<td><input type="button" name="aceptar" value="Aceptar" id="okimprimir" onclick="javascript:aceptarAnalisis(0)" class="menu"></td>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<td><input type="button" name="aceptar" value="Aceptar" id="okimprimir" onclick="javascript:aceptarAnalisis(1)" class="menu"></td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<form name="frmAceptarAnalisis" action="../../servlet/GestorPacientes" method="post">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_ANALISTA_ACEPTAR_ANALISIS%>">
|
||||
<input type="hidden" name="autorizacion" value="<%=strAutorizacion%>">
|
||||
</form>
|
||||
<form name="frmAnalista" action="analista.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:return validarAutorizacion(this.autorizacion)">
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita">Número de autorización: </span></td>
|
||||
<td><input type="text" size="10" name="autorizacion" class="txt" maxlength="10" value='<%=strAutorizacion%>'></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:mostrarPrescripciones()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
</tr>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<%
|
||||
if (!strAutorizacion.equalsIgnoreCase("")) //El usuario ha introducido el numero de autorizacion
|
||||
{
|
||||
if (blnPeticionCapturada) //ya existe un analisis
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(8); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else if (vSeleccion==null || vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(9); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else //no existe un analisis previo. Se muestran los datos de la prescripcion.
|
||||
{
|
||||
mostrarBotonPDF = 1;
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
VTapresca_Ttactmed vtapresca_tarisanttactmed = new VTapresca_Ttactmed();
|
||||
String strInforme = ((VTapresca_Ttactmed)vSeleccion.elementAt(0)).getInforme();
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
vtapresca_tarisanttactmed = (VTapresca_Ttactmed)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<td class="<%=estilo%>" align="center"><%=vtapresca_tarisanttactmed.getActo()%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vtapresca_tarisanttactmed.getDescripcionActoMedico()%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita">Informe:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><textarea name="informe" rows="4" cols="50" class="txt" readonly="readonly"><%=strInforme%></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<table border="0" align="center" width="100%" cellpadding="0">
|
||||
<tr>
|
||||
<td class="" align="left">
|
||||
<%
|
||||
if(mostrarBotonPDF==1){
|
||||
String resultado = ""+strAutorizacion;
|
||||
/*resultado = (resultado.length()<8)?"0"+resultado:resultado;*/
|
||||
File fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
/*fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+Integer.valueOf(strAutorizacion).toString()+".PDF");*/
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_analiticas+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="4"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
/*fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_analiticas+Integer.valueOf(strAutorizacion).toString()+".PDF");*/
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_analiticas+resultado+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="4"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p>PDF inexistente</p><%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mostrarBotonPDF = 0;
|
||||
|
||||
%>
|
||||
</td>
|
||||
<%
|
||||
if (/*intRespuesta == 1*/strRespuesta.compareTo("1")==0){
|
||||
%><td class="txtnegrita" align="center" style="color:blue">Petición adjudicada correctamente<td> <%
|
||||
}else if (/*intRespuesta == 2*/strRespuesta.compareTo("2")==0){
|
||||
%><td class="txtnegrita" align="center" style="color:rgb(189, 2, 2);">No se puede capturar el análisis. El acto no tiene precio<td><%
|
||||
}
|
||||
%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de analista (pac/analista.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,901 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ page import="java.math.BigDecimal"%>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="com.tarisan.util.DES" %>
|
||||
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/analitica.jsp)");
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
/*else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/pac/solicitudAnaliticaNiveles.jsp?x=4&pagina=1");
|
||||
}*/
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de analitica (pac/analitica.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
// Definicion de variables param2
|
||||
boolean desplazado = false;
|
||||
String strParametroMenu="";
|
||||
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||
int intPagina = 0;
|
||||
int pteExtraccion = 0; /* Indica si la analítica esta pte de extraccion para indicarlo en el apartado de regenerar pdf */
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
StringBuffer strSql2 = new StringBuffer();
|
||||
StringBuffer strSql_requestid = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
Object bCondiciones[]=null;
|
||||
Object Condiciones[]=null;
|
||||
Object aCondiciones_requestid[]=null;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
int intImpresion = 0;
|
||||
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||
|
||||
String strListaElementosPrescripcion = "";
|
||||
String strInformePrescripcion = "";
|
||||
String strAutorizacion="";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro informePrescripcion utilizado para realizar la impresion
|
||||
if (request.getParameter("informePrescripcion")!=null)
|
||||
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||
|
||||
//atributo autorizacion utilizado para realizar la impresion
|
||||
if (request.getAttribute("autorizacion")!=null) {
|
||||
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||
}
|
||||
|
||||
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||
{
|
||||
desplazado = true;
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
String pathSpgif = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
pathSpgif = path + "/..";
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Analítica </title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
var despla = <%= desplazado %>;
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
|
||||
function obtenerInformePrescripcion()
|
||||
{
|
||||
//preparamos el informe de prescripcion
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||
//dependiendo del navegador el salto de linea es diferente.
|
||||
//explorer => \r\n
|
||||
//netscape 6 => \n
|
||||
<%
|
||||
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||
%>
|
||||
|
||||
//cogemos los valores del informe sin comillas simples
|
||||
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original
|
||||
while(informePrescripcion.indexOf("~")!=-1)
|
||||
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||
|
||||
return informePrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
|
||||
function mostrarAnalisis(autorizacion, path)
|
||||
{
|
||||
//var url = path + "/servlet/GestorPacientes?OPCION=<%=Constantes.OPC_PAC_REGISTRAR_LOG_ANALISIS%>&autorizacion=" + autorizacion;
|
||||
//var ventana = window.open(url,"analisis" + autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
//var ventanaAnalisis = window.open('<%=request.getContextPath()%>'+ '/peticiones/' + autorizacion + '.pdf',autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>.pdf";
|
||||
document.frmImprimirPeticion.submit();
|
||||
|
||||
}
|
||||
|
||||
function mostrarPDFIzasa(path)
|
||||
{
|
||||
var ventanaAnalisis = window.open("",analisis,"");
|
||||
}
|
||||
|
||||
function mostrarResultadoAnalisis(autorizacion, path)
|
||||
{
|
||||
var ventanaAnalisis = window.open('<%=request.getContextPath()%>'+ '/jsp/resultado_analitica.jsp?peticion='+ autorizacion,autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
}
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) {//se efectua la impresion
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impAnalitica.jsp?autorizacion=<%=strAutorizacion%>');
|
||||
//var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function nuevaPrescripcion(tieneAnalisis)
|
||||
{
|
||||
if ((tieneAnalisis=="no") || (despla==true))
|
||||
{
|
||||
<!-- Para la nueva pagina de solicitud de analiticas con niveles hemos cambiado este destino -->
|
||||
<!-- document.frmSolicitudPrescripcion.action = " %=request.getContextPath()%>/jsp/pac/solicitudAnalitica.jsp?x= %=strParametroMenu%>"; -->
|
||||
<!-- por este otro: solicitudAnaliticaNiveles.jsp -->
|
||||
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/solicitudAnaliticaNiveles.jsp?x=<%=strParametroMenu%>";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/justificacionAnalitica.jsp?x=<%=strParametroMenu%>";
|
||||
}
|
||||
|
||||
document.frmSolicitudPrescripcion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPrescripcion.pagina.value=pagina;
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
|
||||
function submitform()
|
||||
{
|
||||
document.frmAnalitica.submit();
|
||||
}
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=pathSpgif%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<%
|
||||
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||
<form name="frmPrescripcion" action="analitica.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||
<form name="frmSolicitudPrescripcion" action="" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<%
|
||||
|
||||
//Creación de la tabla presentación de resultados
|
||||
PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico();
|
||||
String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();
|
||||
/*Vector vSeleccion = per.listado_analiticas_paciente(cole, poli, orde, dtFechaAnalisis, intPagina);*/
|
||||
|
||||
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
/*Vector vSeleccion2 = per.listado_analiticas_por_tarjeta(pac, intPagina);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Nueva select resultados analitica tapresca_tarisan. Tenemos resultados: " + vSeleccion2.size());*/
|
||||
|
||||
String vael = null;
|
||||
|
||||
/*for(int i = 0; i < vSeleccion2.size(); i++)
|
||||
{
|
||||
vSeleccion.addElement(vSeleccion2.elementAt(i));
|
||||
}*/
|
||||
|
||||
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
Vector vSeleccion = per.listado_analiticas_por_paciente(cole, poli, orde, dtFechaAnalisis, pac, medico, intPagina);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados analitica tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||
/*int prueba = per.prueba_conexion();*/
|
||||
|
||||
/*Vector vPagiancion = new Vector();
|
||||
vPagiancion = Utilidades.ObtenerPaginacionDeUnVector(vSeleccion, intPagina);*/
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(67).getMensaje() %></span></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="6" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="6" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha Solicitud</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver Resultados</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Regenerar Resultados</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
VTaresanaTamedico vTaresanaTamedico = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
vTaresanaTamedico = (VTaresanaTamedico)vSeleccion.elementAt(i);
|
||||
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
|
||||
{
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getAutorizacion()%></td>
|
||||
<%
|
||||
}
|
||||
else //campo autorizacion tiene un valor valido
|
||||
{
|
||||
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
String peticion = ""+vTaresanaTamedico.getAutorizacion();
|
||||
/*peticion = (peticion.length()<8)?"0"+peticion:peticion;*/
|
||||
String peticionE = ""+vTaresanaTamedico.getAutorizacionEncriptada();
|
||||
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_analiticas;
|
||||
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="4"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
|
||||
ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la ubicación vieja
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<span align="center"><%=peticion%></span>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
|
||||
PersistenciaPaciente perPac = new PersistenciaPaciente();
|
||||
Paciente pacient = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
|
||||
|
||||
String autorizado = pacient.getAutorizado();
|
||||
if(autorizado == null)
|
||||
autorizado = "N";
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizado: "+pacient.getAutorizado());
|
||||
String igua = vTaresanaTamedico.getIgualada();
|
||||
if(igua == null)
|
||||
igua = "0";
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Igua: "+igua);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, vTaresanaTamedico.getAutorizacion());
|
||||
|
||||
String resultado = ""+vTaresanaTamedico.getAutorizacion();
|
||||
String resultadoE = ""+vTaresanaTamedico.getAutorizacionEncriptada();
|
||||
String igualadaE = ""+vTaresanaTamedico.getIgualadaEncriptada();
|
||||
|
||||
//Buscar los PDF con ceros
|
||||
String resultadoConCeros=resultado;
|
||||
do{
|
||||
resultadoConCeros = (resultado.length()<8)?"0"+resultadoConCeros:resultadoConCeros;
|
||||
}while (resultadoConCeros.length() < 8);
|
||||
|
||||
if((autorizado.toUpperCase().compareTo("S") == 0) || usu.getMedico() == vTaresanaTamedico.getPrescriptor())
|
||||
{
|
||||
|
||||
// 16/06/2018 Nuvea comprobación para mostrar los pdfs que subimos a mano(ej: los desplazados que se hacen la extracción en CSM)
|
||||
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_analiticas;
|
||||
File fichero = new File(direccion+resultado+".pdf");
|
||||
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="1"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (vTaresanaTamedico.getExtraccion()!=0 && vTaresanaTamedico.getExtraccion()!=3){ // Mirar si la analítica está pendiente de extracción
|
||||
|
||||
if(igua.compareTo("0") != 0){ //Comprobar si se trata de una autorización que está en Tarisan y GPC
|
||||
%>
|
||||
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
|
||||
<input type="hidden" name="requestID" value="<%=/*igua*/igualadaE%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
if(vTaresanaTamedico.isPeticionConGuion())
|
||||
{
|
||||
%>
|
||||
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
|
||||
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getAutorizacion()*/resultadoE%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form>
|
||||
<%
|
||||
}
|
||||
else if(vTaresanaTamedico.getAutorizacion() < 999999 && !(vTaresanaTamedico.getAutorizacion()>700000 && vTaresanaTamedico.getAutorizacion()<799999))
|
||||
{
|
||||
%>
|
||||
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
|
||||
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getAutorizacion()*/resultadoE%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form>
|
||||
<%
|
||||
}
|
||||
else{
|
||||
//PAC.ruta_pdf
|
||||
/*String resultado = ""+vTaresanaTamedico.getAutorizacion();
|
||||
resultado = (resultado.length()<8)?"0"+resultado:resultado;*/
|
||||
/*String*/ direccion = ParametrosConfiguracion.ruta_pdf_resultados_analiticas;
|
||||
/*File*/ fichero = new File(direccion+resultado+".pdf");
|
||||
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="1"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(direccion+resultado+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="1"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
direccion = ParametrosConfiguracion.ruta_pdf_resultados;
|
||||
fichero = new File(direccion+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="16"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(direccion+resultado+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="16"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
//Buscamos en los mismos sitios pero con los ceros en el nombre del PDF
|
||||
DES encrypter = new DES(""+medico);
|
||||
String resultadoConCerosE = encrypter.encrypt(resultadoConCeros);
|
||||
|
||||
|
||||
direccion = ParametrosConfiguracion.ruta_pdf_resultados_analiticas;
|
||||
fichero = new File(direccion+resultadoConCeros+".pdf");
|
||||
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="1"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoConCerosE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(direccion+resultadoConCeros+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="1"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoConCerosE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
direccion = ParametrosConfiguracion.ruta_pdf_resultados;
|
||||
fichero = new File(direccion+resultadoConCeros+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="16"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoConCerosE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(direccion+resultadoConCeros+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="16"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoConCerosE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver Resultado" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><% //Resultados Pendientes
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(vTaresanaTamedico.getExtraccion()==3){
|
||||
/* Controlamos las peticiones anuladas desde GPC */
|
||||
pteExtraccion = 3;
|
||||
%><p>Petición anulada en GPC</p><%
|
||||
}
|
||||
else{
|
||||
pteExtraccion = 1;
|
||||
%><p>Pendiente de Extracción</p><%
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p><%=pertamensaje.obtenerMensaje(66).getMensaje() %></p><% //Pendiente de Autorización del paciente
|
||||
}
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
/*PersistenciaPaciente perPac = new PersistenciaPaciente();
|
||||
Paciente pacient = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
|
||||
|
||||
String autorizado = pacient.getAutorizado();
|
||||
if(autorizado == null)
|
||||
autorizado = "N";
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizado: "+pacient.getAutorizado());
|
||||
String igua = vTaresanaTamedico.getIgualada();
|
||||
if(igua == null)
|
||||
igua = "0";
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Igua: "+igua);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, vTaresanaTamedico.getAutorizacion());
|
||||
autorizado="S";*/
|
||||
if(((autorizado.toUpperCase().compareTo("S") == 0) || usu.getMedico() == vTaresanaTamedico.getPrescriptor()) && pteExtraccion==0)
|
||||
{
|
||||
if(igua.compareTo("0") != 0){ //Comprobar si se trata de una autorización que está en Tarisan y GPC
|
||||
//File fichero = new File(ParametrosConfiguracion.ruta_pdf_resultados_analiticas+Long.valueOf(igua.toString())+".pdf");
|
||||
%>
|
||||
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
|
||||
<input type="hidden" name="requestID" value="<%=/*igua*/igualadaE%>">
|
||||
<input type="hidden" name="borrarPDF" value="1">
|
||||
<input type="submit" value="Regenerar" class="enlace"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
if(vTaresanaTamedico.getAutorizacion() < 999999 && !(vTaresanaTamedico.getAutorizacion()>700000 && vTaresanaTamedico.getAutorizacion()<799999)) //Comprobar si es de izasa
|
||||
{
|
||||
//File fichero = new File(ParametrosConfiguracion.ruta_pdf_resultados_analiticas+Long.valueOf(vTaresanaTamedico.getAutorizacion()).toString()+".pdf");
|
||||
%>
|
||||
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
|
||||
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getAutorizacion()*/resultadoE%>">
|
||||
<input type="hidden" name="borrarPDF" value="1">
|
||||
<input type="submit" value="Regenerar" class="enlace"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
%><p>PDF no regenerable</p><%
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pteExtraccion = 0;
|
||||
%><p>PDF no regenerable</p><%//Pendiente de Autorización del paciente
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
</td>
|
||||
<%
|
||||
int diaHoy = hoy.getDate();
|
||||
int mesHoy = hoy.getMonth();
|
||||
int anoHoy = hoy.getYear();
|
||||
|
||||
int diaAnalisis = vTaresanaTamedico.getFecha().getDate();
|
||||
int mesAnalisis = vTaresanaTamedico.getFecha().getMonth();
|
||||
int anoAnalisis = vTaresanaTamedico.getFecha().getYear();
|
||||
|
||||
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){ %>
|
||||
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/solicitudAnaliticaNiveles.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=vTaresanaTamedico.getAutorizacion()%>&pagina=1" class="enlaceAnalisis">Editar</a></td>
|
||||
<%}else{ %>
|
||||
<td class="<%=estilo%>" align="center">-</td>
|
||||
<%}%>
|
||||
|
||||
</tr>
|
||||
<%
|
||||
/*strSql_requestid.delete(0,strSql_requestid.length());*/
|
||||
}
|
||||
%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="6" align="center"><a href="javascript:nuevaPrescripcion('si')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/analitica.jsp?x=4&pagina=1" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/analitica.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPagina() - 1%>" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/analitica.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPagina() + 1%>" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/analitica.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="4"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de analitica (pac/analitica.jsp)");
|
||||
}
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,702 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.util.DES" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ page import="java.math.BigDecimal"%>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/anatomia.jsp)");
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de anatomia patologica (pac/anatomia.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
// Definicion de variables param2
|
||||
boolean desplazado = false;
|
||||
String strParametroMenu="";
|
||||
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
StringBuffer strSql2 = new StringBuffer();
|
||||
StringBuffer strSql_requestid = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
Object bCondiciones[]=null;
|
||||
Object Condiciones[]=null;
|
||||
Object aCondiciones_requestid[]=null;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
int intImpresion = 0;
|
||||
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||
|
||||
String strListaElementosPrescripcion = "";
|
||||
String strInformePrescripcion = "";
|
||||
String strAutorizacion="";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro informePrescripcion utilizado para realizar la impresion
|
||||
if (request.getParameter("informePrescripcion")!=null)
|
||||
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||
|
||||
//atributo autorizacion utilizado para realizar la impresion
|
||||
if (request.getAttribute("autorizacion")!=null) {
|
||||
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||
}
|
||||
|
||||
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||
{
|
||||
desplazado = true;
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Anatomía Patoloógica</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
var despla = <%= desplazado %>;
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
|
||||
function obtenerInformePrescripcion()
|
||||
{
|
||||
//preparamos el informe de prescripcion
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||
//dependiendo del navegador el salto de linea es diferente.
|
||||
//explorer => \r\n
|
||||
//netscape 6 => \n
|
||||
<%
|
||||
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||
%>
|
||||
|
||||
//cogemos los valores del informe sin comillas simples
|
||||
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original
|
||||
while(informePrescripcion.indexOf("~")!=-1)
|
||||
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||
|
||||
return informePrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) {//se efectua la impresion
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function nuevaPrescripcion(tieneAnalisis)
|
||||
{
|
||||
if ((tieneAnalisis=="no") || (despla==true))
|
||||
{
|
||||
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/solicitudAnatomiaNiveles.jsp?x=<%=strParametroMenu%>";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/justificacionAnalitica.jsp?x=<%=strParametroMenu%>&tipo=anato";
|
||||
}
|
||||
|
||||
document.frmSolicitudPrescripcion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPrescripcion.pagina.value=pagina;
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
|
||||
function submitform()
|
||||
{
|
||||
document.frmAnalitica.submit();
|
||||
}
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<%
|
||||
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||
<form name="frmPrescripcion" action="anatomia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||
<form name="frmSolicitudPrescripcion" action="" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<%
|
||||
|
||||
//Creación de la tabla presentación de resultados
|
||||
PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico();
|
||||
String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();
|
||||
|
||||
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
Vector vSeleccion = per.listado_anatomia_por_paciente(cole, poli, orde, dtFechaAnalisis, pac, medico, intPagina);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados analitica tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||
|
||||
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(71).getMensaje() %></span></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha Solicitud</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver resultados</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
VTaresanaTamedico vTaresanaTamedico = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
vTaresanaTamedico = (VTaresanaTamedico)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
|
||||
{
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getAutorizacion()%></td>
|
||||
<%
|
||||
}
|
||||
else //campo autorizacion tiene un valor valido
|
||||
{
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
String peticion = ""+vTaresanaTamedico.getAutorizacion();
|
||||
String peticionE = vTaresanaTamedico.getAutorizacionEncriptada();
|
||||
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_ap;
|
||||
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="6"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
|
||||
ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Buesco en la ubicación vieja
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<span align="center"><%=peticion%></span>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
PersistenciaPaciente perPac = new PersistenciaPaciente();
|
||||
Paciente pacient = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
|
||||
|
||||
String autorizado = pacient.getAutorizado();
|
||||
if(autorizado == null)
|
||||
autorizado = "N";
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizado: "+pacient.getAutorizado());
|
||||
String igua = vTaresanaTamedico.getIgualada();
|
||||
if(igua == null)
|
||||
igua = "0";
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Igua: "+igua);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, vTaresanaTamedico.getAutorizacion());
|
||||
autorizado = "S";
|
||||
if((autorizado.toUpperCase().compareTo("S") == 0) || usu.getMedico() == vTaresanaTamedico.getPrescriptor())
|
||||
{
|
||||
|
||||
if(vTaresanaTamedico.getEpisodio()!=0){
|
||||
|
||||
Integer Nuevoepisodio = vTaresanaTamedico.getEpisodio();
|
||||
Hce_doc_ext_ap hce_doc_ext_ap = null;
|
||||
PersistenciaHce_doc_ext_ap nueva_per = new PersistenciaHce_doc_ext_ap();
|
||||
Vector nuevos_pdfs = new Vector();
|
||||
try{
|
||||
nuevos_pdfs = nueva_per.seleccionar(Nuevoepisodio);
|
||||
}catch(ExcepcionTarisan ex){
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
|
||||
if (nuevos_pdfs == null) {
|
||||
%><p>No hay archivos</p><%
|
||||
}
|
||||
else {
|
||||
for (int f=0; f < nuevos_pdfs.size() ; f++) {
|
||||
hce_doc_ext_ap = (Hce_doc_ext_ap)nuevos_pdfs.elementAt(f);
|
||||
String filename = hce_doc_ext_ap.getNombre_doc();
|
||||
|
||||
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia_CSM;
|
||||
File archivo = new File(direccion+filename+".pdf");
|
||||
|
||||
if(archivo.exists())
|
||||
{
|
||||
DES encrypter = new DES(""+medico);
|
||||
String dirE = encrypter.encrypt(filename);
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="21"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=dirE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}else
|
||||
{
|
||||
%><p>No hay resultados</p><%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia;
|
||||
File fichero = new File(direccion+peticion+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="2"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(direccion+peticion+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="2"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
direccion = ParametrosConfiguracion.ruta_pdf_resultados;
|
||||
fichero = new File(direccion+peticion+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="16"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(direccion+peticion+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="16"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p>No hay PDF<!-- < %=/*pertamensaje.obtenerMensaje(6).getMensaje()*/ %>--></p><% //Resultados Pendientes
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<p><%=pertamensaje.obtenerMensaje(66).getMensaje() %></p>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<%
|
||||
int diaHoy = hoy.getDate();
|
||||
int mesHoy = hoy.getMonth();
|
||||
int anoHoy = hoy.getYear();
|
||||
|
||||
int diaAnalisis = vTaresanaTamedico.getFecha().getDate();
|
||||
int mesAnalisis = vTaresanaTamedico.getFecha().getMonth();
|
||||
int anoAnalisis = vTaresanaTamedico.getFecha().getYear();
|
||||
|
||||
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){ %>
|
||||
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/solicitudAnatomiaNiveles.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=vTaresanaTamedico.getAutorizacion()%>&pagina=1" class="enlaceAnalisis">Editar</a></td>
|
||||
<%}else{ %>
|
||||
<td class="<%=estilo%>" align="center">-</td>
|
||||
<%}%>
|
||||
<%
|
||||
strSql_requestid.delete(0,strSql_requestid.length());
|
||||
}
|
||||
%>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion('si')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||
</tr>
|
||||
<%
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=1" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPagina() - 1%>" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPagina() + 1%>" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="6"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de anatomia (pac/anatomia.jsp)");
|
||||
}
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,660 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.util.DES" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ page import="java.math.BigDecimal"%>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/anatomia.jsp)");
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de anatomia patologica (pac/anatomia.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
// Definicion de variables param2
|
||||
boolean desplazado = false;
|
||||
String strParametroMenu="";
|
||||
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
StringBuffer strSql2 = new StringBuffer();
|
||||
StringBuffer strSql_requestid = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
Object bCondiciones[]=null;
|
||||
Object Condiciones[]=null;
|
||||
Object aCondiciones_requestid[]=null;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
int intImpresion = 0;
|
||||
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||
|
||||
String strListaElementosPrescripcion = "";
|
||||
String strInformePrescripcion = "";
|
||||
String strAutorizacion="";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro informePrescripcion utilizado para realizar la impresion
|
||||
if (request.getParameter("informePrescripcion")!=null)
|
||||
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||
|
||||
//atributo autorizacion utilizado para realizar la impresion
|
||||
if (request.getAttribute("autorizacion")!=null) {
|
||||
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||
}
|
||||
|
||||
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||
{
|
||||
desplazado = true;
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Anatomía Patológica</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
var despla = <%= desplazado %>;
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("�") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("�")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("�"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("�") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
|
||||
function obtenerInformePrescripcion()
|
||||
{
|
||||
//preparamos el informe de prescripcion
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||
//dependiendo del navegador el salto de linea es diferente.
|
||||
//explorer => \r\n
|
||||
//netscape 6 => \n
|
||||
<%
|
||||
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||
%>
|
||||
|
||||
//cogemos los valores del informe sin comillas simples
|
||||
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original
|
||||
while(informePrescripcion.indexOf("~")!=-1)
|
||||
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||
|
||||
return informePrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) {//se efectua la impresion
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function nuevaPrescripcion(tieneAnalisis)
|
||||
{
|
||||
if ((tieneAnalisis=="no") || (despla==true))
|
||||
{
|
||||
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/solicitudAnatomiaNiveles.jsp?x=<%=strParametroMenu%>";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/justificacionAnalitica.jsp?x=<%=strParametroMenu%>&tipo=anato";
|
||||
}
|
||||
|
||||
document.frmSolicitudPrescripcion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPrescripcion.pagina.value=pagina;
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
|
||||
function submitform()
|
||||
{
|
||||
document.frmAnalitica.submit();
|
||||
}
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<%
|
||||
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||
<form name="frmPrescripcion" action="anatomia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||
<form name="frmSolicitudPrescripcion" action="" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<%
|
||||
|
||||
//Creación de la tabla presentación de resultados
|
||||
PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico();
|
||||
String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();
|
||||
|
||||
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
Vector vSeleccion = per.listado_anatomia_por_paciente(cole, poli, orde, dtFechaAnalisis, pac, medico, intPagina);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados analitica tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||
|
||||
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(71).getMensaje() %></span></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha Solicitud</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver resultados</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
VTaresanaTamedico vTaresanaTamedico = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
vTaresanaTamedico = (VTaresanaTamedico)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
|
||||
{
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getAutorizacion()%></td>
|
||||
<%
|
||||
}
|
||||
else //campo autorizacion tiene un valor valido
|
||||
{
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%></td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
String peticion = ""+vTaresanaTamedico.getAutorizacion();
|
||||
String peticionE = vTaresanaTamedico.getAutorizacionEncriptada();
|
||||
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_ap;
|
||||
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="6"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
|
||||
ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Buesco en la ubicación vieja
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<span align="center"><%=peticion%></span>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
PersistenciaPaciente perPac = new PersistenciaPaciente();
|
||||
Paciente pacient = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
Usuario usu = (Usuario)sesion.getAttribute("USUARIO");
|
||||
|
||||
String autorizado = pacient.getAutorizado();
|
||||
if(autorizado == null)
|
||||
autorizado = "N";
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizado: "+pacient.getAutorizado());
|
||||
String igua = vTaresanaTamedico.getIgualada();
|
||||
if(igua == null)
|
||||
igua = "0";
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Igua: "+igua);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, vTaresanaTamedico.getAutorizacion());
|
||||
autorizado = "S";
|
||||
if((autorizado.toUpperCase().compareTo("S") == 0) || usu.getMedico() == vTaresanaTamedico.getPrescriptor())
|
||||
{
|
||||
|
||||
if(vTaresanaTamedico.getEpisodio()!=0){
|
||||
|
||||
|
||||
String episodio = ""+vTaresanaTamedico.getEpisodio();
|
||||
String episodioE = ""+vTaresanaTamedico.getEpisodioEncriptado();
|
||||
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia;
|
||||
Vector<String> children = Utilidades.buscar_ficheros(episodio,direccion);
|
||||
|
||||
if (children == null) {
|
||||
%><p>No hay archivos</p><%
|
||||
}
|
||||
else {
|
||||
for (int f=0; f < children.size() ; f++) {
|
||||
String filename = children.elementAt(f);
|
||||
DES encrypter = new DES(""+medico);
|
||||
String dirE = encrypter.encrypt(filename);
|
||||
%><form name="resultados" action="<%=/*request.getContextPath()*/%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="2"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*dirE*/%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=/*Constantes.OPC_PAC_VER_PDF*/%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
String resultado = ""+vTaresanaTamedico.getAutorizacion();
|
||||
/*resultado = (resultado.length()<8)?"0"+resultado:resultado;*/
|
||||
String resultadoE = ""+vTaresanaTamedico.getAutorizacionEncriptada();
|
||||
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia;
|
||||
File fichero = new File(direccion+resultado+".pdf");
|
||||
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="2"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(direccion+Long.valueOf(vTaresanaTamedico.getAutorizacion()).toString()+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="2"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<p><%=pertamensaje.obtenerMensaje(66).getMensaje() %></p>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<%
|
||||
int diaHoy = hoy.getDate();
|
||||
int mesHoy = hoy.getMonth();
|
||||
int anoHoy = hoy.getYear();
|
||||
|
||||
int diaAnalisis = vTaresanaTamedico.getFecha().getDate();
|
||||
int mesAnalisis = vTaresanaTamedico.getFecha().getMonth();
|
||||
int anoAnalisis = vTaresanaTamedico.getFecha().getYear();
|
||||
|
||||
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){ %>
|
||||
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/solicitudAnatomiaNiveles.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=vTaresanaTamedico.getAutorizacion()%>&pagina=1" class="enlaceAnalisis">Editar</a></td>
|
||||
<%}else{ %>
|
||||
<td class="<%=estilo%>" align="center">-</td>
|
||||
<%}%>
|
||||
<%
|
||||
strSql_requestid.delete(0,strSql_requestid.length());
|
||||
}
|
||||
%>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion('si')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||
</tr>
|
||||
<%
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=1" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPagina() - 1%>" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPagina() + 1%>" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/anatomia.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="6"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de anatomia (pac/anatomia.jsp)");
|
||||
}
|
||||
|
||||
%>
|
||||
+441
@@ -0,0 +1,441 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
<%@ page import="java.math.BigDecimal"%>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/ats.jsp)");
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de ats (pac/ats.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
// Definicion de variables param2
|
||||
String strParametroMenu="";
|
||||
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
StringBuffer strSql2 = new StringBuffer();
|
||||
StringBuffer strSql_requestid = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
Object bCondiciones[]=null;
|
||||
Object Condiciones[]=null;
|
||||
Object aCondiciones_requestid[]=null;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
int intImpresion = 0;
|
||||
String strAutorizacion="";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//atributo autorizacion utilizado para realizar la impresion
|
||||
if (request.getAttribute("autorizacion")!=null) {
|
||||
/*strAutorizacion=(String)request.getAttribute("autorizacion"); */
|
||||
strAutorizacion=""+request.getAttribute("autorizacion");
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>ATS</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery-ui.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery-ui.min.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/theme.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-ui.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-ui.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) {//se efectua la impresion
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impAnalitica.jsp?autorizacion=<%=strAutorizacion%>');
|
||||
//var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function nuevaPrescripcion()
|
||||
{
|
||||
document.frmSolicitudPrescripcion.action = "<%=request.getContextPath()%>/jsp/pac/prescripcion_ats.jsp?x=<%=strParametroMenu%>";
|
||||
document.frmSolicitudPrescripcion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPrescripcion.pagina.value=pagina;
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<%
|
||||
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||
<form name="frmPrescripcion" action="ats.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<!-- formulario para enviar la peticion a la pagina de prescripcion ats -->
|
||||
<form name="frmSolicitudPrescripcion" action="" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<%
|
||||
|
||||
//Creación de la tabla presentación de resultados
|
||||
PersistenciaTaconaut per = new PersistenciaTaconaut();
|
||||
String tarj = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta() )).toString();
|
||||
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
Vector vSeleccion = per.ObtenerPrescripcionesPorPaciente(tarj, medico, intPagina);
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt">El paciente no tiene ninguna prescripción ats efectuada.</span></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva prescripción</a></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha Modificacion</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorizacion</td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
Taconaut taconaut = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
taconaut = (Taconaut)vSeleccion.elementAt(i);
|
||||
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<td class="<%=estilo%>" align="center"><%=(sdfFormateadorFecha.format(taconaut.getFechaModificacion())==null)?"":sdfFormateadorFecha.format(taconaut.getFechaModificacion())%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=taconaut.getActo()%></td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
String peticion = ""+taconaut.getAutorizacion();
|
||||
String peticionE = ""+taconaut.getAutorizacionEncriptada();
|
||||
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_ats;
|
||||
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="7"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
|
||||
ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la ubicación vieja
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<span align="center"><%=peticion%></span>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="4" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva prescripción</a></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/ats.jsp?x=13&pagina=1" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/ats.jsp?x=13&pagina=<%=per.getPaginacion().getNumeroPagina() - 1%>" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/ats.jsp?x=13&pagina=<%=per.getPaginacion().getNumeroPagina() + 1%>" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/ats.jsp?x=13&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="7"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de ats (pac/ats.jsp)");
|
||||
}
|
||||
%>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,512 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ page import="java.math.BigDecimal"%>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/analitica.jsp)");
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
/*else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/pac/solicitudAnaliticaNiveles.jsp?x=4&pagina=1");
|
||||
}*/
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de peticiones (pac/peticiones.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
// Definicion de variables param2
|
||||
boolean desplazado = false;
|
||||
String strParametroMenu="";
|
||||
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
StringBuffer strSql2 = new StringBuffer();
|
||||
StringBuffer strSql_requestid = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
Object bCondiciones[]=null;
|
||||
Object Condiciones[]=null;
|
||||
Object aCondiciones_requestid[]=null;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
int intImpresion = 0;
|
||||
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
|
||||
String strListaElementosPrescripcion = "";
|
||||
String strInformePrescripcion = "";
|
||||
String strAutorizacion="";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro informePrescripcion utilizado para realizar la impresion
|
||||
if (request.getParameter("informePrescripcion")!=null)
|
||||
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||
|
||||
//atributo autorizacion utilizado para realizar la impresion
|
||||
if (request.getAttribute("autorizacion")!=null) {
|
||||
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||
}
|
||||
|
||||
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||
{
|
||||
desplazado = true;
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Autorización</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
var despla = <%= desplazado %>;
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) {//se efectua la impresion
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impAnalitica.jsp?autorizacion=<%=strAutorizacion%>');
|
||||
//var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function nuevaPrescripcion()
|
||||
{
|
||||
document.frmSolicitudPrescripcion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPrescripcion.pagina.value=pagina;
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<%
|
||||
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||
<form name="frmPrescripcion" action="autorizacion.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||
<form name="frmSolicitudPrescripcion" action="<%=request.getContextPath()%>/jsp/pac/autorizacion.jsp?x=<%=strParametroMenu%>&pagina=1" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<%
|
||||
|
||||
//Creación de la tabla presentación de resultados
|
||||
PersistenciaTapresca per = new PersistenciaTapresca();
|
||||
/*String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();*/
|
||||
|
||||
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
String vael = null;
|
||||
|
||||
Vector vSeleccion = per.listado_peticiones_por_paciente(intMedico, pac, intPagina, /*4*/5); //El último número es el tipo de petición (en este caso autorizaciones)
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados peticiones tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||
/*int prueba = per.prueba_conexion();*/
|
||||
|
||||
/*Vector vPagiancion = new Vector();
|
||||
vPagiancion = Utilidades.ObtenerPaginacionDeUnVector(vSeleccion, intPagina);*/
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(70).getMensaje() %></span></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace">Nueva Petición</a></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha Solicitud</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Especialidad</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Texto</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
Tapresca tapresca = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
tapresca = (Tapresca)vSeleccion.elementAt(i);
|
||||
String txt = "";
|
||||
txt = tapresca.getTexto();
|
||||
if (txt == null){
|
||||
txt = "-";
|
||||
}
|
||||
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (tapresca.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
|
||||
{
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tapresca.getFecha())%></td>
|
||||
<%
|
||||
}
|
||||
else //campo autorizacion tiene un valor valido
|
||||
{
|
||||
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tapresca.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
String peticion = ""+tapresca.getAutorizacion();
|
||||
/*peticion = (peticion.length()<8)?"0"+peticion:peticion;*/
|
||||
String peticionE = tapresca.getAutorizacionEncriptada();
|
||||
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_autorizaciones;
|
||||
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="8"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
|
||||
ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la ubicación vieja
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<span align="center"><%=peticion%></span>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td class="<%=estilo%>" align="center"><%=tapresca.getEspecialidad()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=txt%></td>
|
||||
<%
|
||||
int diaHoy = hoy.getDate();
|
||||
int mesHoy = hoy.getMonth();
|
||||
int anoHoy = hoy.getYear();
|
||||
|
||||
int diaAnalisis = tapresca.getFecha().getDate();
|
||||
int mesAnalisis = tapresca.getFecha().getMonth();
|
||||
int anoAnalisis = tapresca.getFecha().getYear();
|
||||
|
||||
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){
|
||||
PersistenciaTaespeci perTaes = new PersistenciaTaespeci();
|
||||
/*int pa = perTaes.paginaDeLaEspecialidad(tapresca.getEspecialidad());*/
|
||||
int pa = 1;
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/autorizacion.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=tapresca.getAutorizacion()%>&pagina=<%=pa%>" class="enlaceAnalisis">Editar</a></td>
|
||||
<%}else{ %>
|
||||
<td class="<%=estilo%>" align="center">-</td>
|
||||
<%}%>
|
||||
<%
|
||||
strSql_requestid.delete(0,strSql_requestid.length());
|
||||
}
|
||||
%>
|
||||
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva Petición</a></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/autorizaciones.jsp?x=3&pagina=1" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/autorizaciones.jsp?x=3&pagina=<%=per.getPaginacion().getNumeroPagina() - 1%>" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/autorizaciones.jsp?x=3&pagina=<%=per.getPaginacion().getNumeroPagina() + 1%>" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/autorizaciones.jsp?x=3&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="8"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de analitica (pac/analitica.jsp)");
|
||||
}
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,323 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
<%
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de pacientes (pac/detallePacientes.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de pacientes (med/detallePacientes.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
String strFecha = "";
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
int intPagina = 0;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
Object aCondiciones[]=null;
|
||||
java.sql.Date hoy = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro fecha que indica el año para el que desea realizar la impresion
|
||||
if (request.getParameter("fecha")!=null)
|
||||
strFecha=(String)request.getParameter("fecha");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
int intImpresion = 0;
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion = Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Pacientes</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmDetallePacientes.pagina.value=pagina;
|
||||
document.frmDetallePacientes.submit();
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC" height="230px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="4" align="center" class="txtnegrita">DETALLE DIARIO DE PACIENTES</td>
|
||||
</tr>
|
||||
<%
|
||||
//Creación de la tabla presentación de resultados
|
||||
aCondiciones = new Object[4];
|
||||
aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||
aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||
aCondiciones[2] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||
aCondiciones[3] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
|
||||
|
||||
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
|
||||
Vector vSeleccion = per.detalle_paciente_diario(intPagina, aCondiciones);
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
VTamovextTaclient vTamovextTaclient = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
vTamovextTaclient = (VTamovextTaclient)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=/*vTamovextTaclient.getNombre() + " " + */vTamovextTaclient.getApellidos()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final página de pacientes (pac/detallePacientes.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,628 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Base64" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.util.DES" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.sql.Timestamp" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="java.math.BigDecimal"%>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de diagnostico (pac/diagnostico_NEW.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
sesion.setAttribute("USUARIO", null);
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de diagnostico (pac/diagnostico_NEW.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
Calendar calFechaRx = Calendar.getInstance();
|
||||
calFechaRx.add(Calendar.MONTH, -ParametrosConfiguracion.periodoRx);
|
||||
java.sql.Date dtFechaRx = new java.sql.Date(calFechaRx.getTime().getTime());
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
int intImpresion = 0;
|
||||
|
||||
String strListaElementosPrescripcion = "";
|
||||
String strInformePrescripcion = "";
|
||||
String strAutorizacion="";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro informePrescripcion utilizado para realizar la impresion
|
||||
if (request.getParameter("informePrescripcion")!=null)
|
||||
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||
|
||||
//atributo autorizacion utilizado para realizar la impresion
|
||||
if (request.getAttribute("autorizacion")!=null) {
|
||||
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Diagnostico</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery-ui.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery-ui.min.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/theme.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-ui.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-ui.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
|
||||
function obtenerInformePrescripcion()
|
||||
{
|
||||
//preparamos el informe de prescripcion
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||
//dependiendo del navegador el salto de linea es diferente.
|
||||
//explorer => \r\n
|
||||
//netscape 6 => \n
|
||||
<%
|
||||
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||
%>
|
||||
|
||||
//cogemos los valores del informe sin comillas simples
|
||||
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original
|
||||
while(informePrescripcion.indexOf("~")!=-1)
|
||||
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||
|
||||
return informePrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) { //se efectua la impresion
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDiagnostico.jsp?autorizacion=<%=strAutorizacion%>');
|
||||
//var ventanaDiagnos = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function nuevaPrescripcion()
|
||||
{
|
||||
document.frmSolicitudPrescripcion.submit();
|
||||
}
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPrescripcion.pagina.value=pagina;
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC" height="220"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||
<form name="frmPrescripcion" action="diagnostico.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<!-- formulario para enviar la peticion a la pagina de solicitud de diagnostico -->
|
||||
<form name="frmSolicitudPrescripcion" action="<%=request.getContextPath()%>/jsp/pac/solicitudDiagnosticoNiveles.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<%
|
||||
Paciente pac = new Paciente();
|
||||
pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
|
||||
//Creación de la tabla presentación de resultados
|
||||
String colec,pol,ord;
|
||||
colec = Long.valueOf(pac.getTarjeta().getColectivo()).toString();
|
||||
pol = new BigDecimal(pac.getTarjeta().getPoliza()).toString();
|
||||
ord = Integer.valueOf(pac.getTarjeta().getBeneficiario()).toString();
|
||||
int med = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
|
||||
PersistenciaVTaprescaTaclient per = new PersistenciaVTaprescaTaclient();
|
||||
/*Vector vSeleccion = per.listado_diagnostico_gpc_por_cliente(numafil, intPagina);*/
|
||||
Vector vSeleccion = per.listado_rx_por_paciente(colec, pol, ord, dtFechaRx, med, intPagina);
|
||||
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Resultados radiodiagnosticos: " + vSeleccion.size());
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><span class="txt">El paciente no tiene ningún radiodiagnóstico efectuado durante los últimos <%=ParametrosConfiguracion.periodoAnalisis%> meses.</span></td>
|
||||
</tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva prescripción</a></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prescriptor</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Prueba Realizada</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Informe</td>
|
||||
<%
|
||||
//Para evitar que salga el enlace de ver las imágenes
|
||||
//<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver Imagenes</td> %>
|
||||
|
||||
</tr>
|
||||
<%
|
||||
|
||||
/*VTaresanaTaclient vTaresanaTaclient = null;*/
|
||||
Ttrayos ttrayos = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
/*vTaresanaTaclient = (VTaresanaTaclient)vSeleccion.elementAt(i); */
|
||||
ttrayos = (Ttrayos)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
|
||||
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
String peticion = ""+ttrayos.getPeticion() ;
|
||||
/*peticion = (peticion.length()<8)?"0"+peticion:peticion;*/
|
||||
String peticionE = ""+ttrayos.getPeticionEncriptada();
|
||||
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_rx;
|
||||
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="14"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=sdfFormateadorFecha.format(ttrayos.getFecha())%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
|
||||
ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la ubicación vieja
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=sdfFormateadorFecha.format(ttrayos.getFecha())%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<span align="center"><%=sdfFormateadorFecha.format(ttrayos.getFecha())%></span>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td class="<%=estilo%>" align="center"><%=ttrayos.getPrescriptor()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=ttrayos.getPrueba()%></td>
|
||||
<td class="<%=estilo%>" align="center"><table><tr>
|
||||
<%
|
||||
String episodioE = ttrayos.getEpisodioEncriptado();
|
||||
String nhc = "NHC_"+ttrayos.getNhc().trim();
|
||||
String filtro = ttrayos.getEpisodio()+"_";
|
||||
String direccion = ParametrosConfiguracion.ruta_pdf_informes_rx+nhc+"/";
|
||||
|
||||
|
||||
File dir = new File(ParametrosConfiguracion.ruta_pdf_informes_rx+nhc+"/");
|
||||
/*Vector<String> archivos = Utilidades.buscar_ficheros_recursivo_rx(dir);*/
|
||||
Vector<String> archivos = Utilidades.buscar_informes_rx(dir,filtro);
|
||||
|
||||
if ((archivos == null)||(archivos.size() == 0)) {
|
||||
%><%="No hay informe"%><%
|
||||
}
|
||||
else {
|
||||
for (int f=0; f < archivos.size() ; f++) {
|
||||
String filename = archivos.elementAt(f);
|
||||
DES encrypter = new DES(""+med);
|
||||
/*String*/ ruta = filename.substring(ParametrosConfiguracion.ruta_pdf_informes_rx.length());
|
||||
String[] partes = ruta.split("\\.");
|
||||
ruta = partes[0];
|
||||
String rutaE = encrypter.encrypt(ruta);
|
||||
String MostrarNombre = "Informe " + (f+1);
|
||||
%><td><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px;float:left">
|
||||
<input type="hidden" name="tipo" value="3"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=rutaE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=MostrarNombre %>" class="enlace"></input>
|
||||
</form></td><%
|
||||
}
|
||||
}
|
||||
|
||||
%></tr></table></td>
|
||||
|
||||
<% /*Con esta url accedemos al pacs para ver las imágenes.
|
||||
https://pacs.clinicasanmiguel.es:8443/Login2.aspx?User="+usuario_codificado+"&Pass="+password_codificado+"&UID="+uid+"&IdPaciente="+num_paciente +"&IdEstudio=&Accession="+num_estudio+"&RequestId=&Modalidades=XSPACS/
|
||||
https://pacs.clinicasanmiguel.es:8443/Login2.aspx?User===QZ0F2bklmZ&Pass=xEjNxQTMxEDMyYDM4ATZ0F2bklmZ&UID=2.16.840.1.113883.2.1.3.7.1000043610&IdPaciente=&IdEstudio=&Accession=43610&RequestId=&Modalidades=XSPACS/
|
||||
uid = '2.16.840.1.113883.2.1.3.7.100000000' + num_estudio (36 caracteres)
|
||||
idpaciente=
|
||||
*/
|
||||
/* String exploracion = new String();
|
||||
exploracion = (Integer.valueOf(vTaresanaTaclient.getAutorizacion())).toString();
|
||||
for(int conta = 0; conta < 5 - longitud ; conta++)
|
||||
{
|
||||
exploracion = "0" + exploracion;
|
||||
}*/
|
||||
/*
|
||||
//Usuario=invertir(base64("fidoate"))
|
||||
//passwd=((fidoate+system.time)base64)invertido
|
||||
//
|
||||
//*/
|
||||
/*String usuario = "fidoate";
|
||||
String passwd = "fidoate";
|
||||
Calendar cal = Calendar.getInstance();
|
||||
int minutos = cal.get(Calendar.MINUTE);
|
||||
cal.set(Calendar.MINUTE, minutos+30);
|
||||
String tiempovalidez = passwd;*/
|
||||
//cal.get(Calendar.HOUR_OF_DAY) + (cal.get(Calendar.MINUTE)+30) + "00";
|
||||
/* if(cal.get(Calendar.DAY_OF_MONTH) < 10){
|
||||
tiempovalidez = tiempovalidez + "0" + cal.get(Calendar.DAY_OF_MONTH);
|
||||
}
|
||||
else{
|
||||
tiempovalidez = tiempovalidez + cal.get(Calendar.DAY_OF_MONTH);
|
||||
}
|
||||
if(cal.get(Calendar.MONTH)+1 < 10){
|
||||
tiempovalidez = tiempovalidez + "0" + (cal.get(Calendar.MONTH)+1);
|
||||
}
|
||||
else{
|
||||
tiempovalidez = tiempovalidez + (cal.get(Calendar.MONTH)+1);
|
||||
}
|
||||
tiempovalidez = tiempovalidez + cal.get(Calendar.YEAR);
|
||||
if(cal.get(Calendar.HOUR_OF_DAY)<10){
|
||||
tiempovalidez = tiempovalidez + "0" + cal.get(Calendar.HOUR_OF_DAY);
|
||||
}
|
||||
else{
|
||||
tiempovalidez = tiempovalidez + cal.get(Calendar.HOUR_OF_DAY);
|
||||
}
|
||||
if(cal.get(Calendar.MINUTE) < 10){
|
||||
tiempovalidez = tiempovalidez + "0" + cal.get(Calendar.MINUTE);
|
||||
}
|
||||
else{
|
||||
tiempovalidez = tiempovalidez + cal.get(Calendar.MINUTE);
|
||||
}
|
||||
tiempovalidez = tiempovalidez + "00";
|
||||
usuario = Utilidades.invertir_string(Base64.encode(usuario));
|
||||
//passwd = Utilidades.invertir_string(Base64.encode("fidoate11112011182200"));
|
||||
//https://192.168.2.192/tarisan/jsp/pac/ fidoate06132011103300
|
||||
passwd = Utilidades.invertir_string(Base64.encode(tiempovalidez));*/
|
||||
|
||||
//para que funcione bien el enlace que está aquí comentado hay que quitar los espacios entre el % y el > en:
|
||||
//<%=passwd% >
|
||||
//<%=exploracion% >
|
||||
//<%=vTaresanaTamedico.getAutorizacion()% >
|
||||
|
||||
//<td class="enlace"><a target="blank" href="https://pacs.clinicasanmiguel.es:8443/Login2.aspx?User=<%=usuario% >&Pass=<%=passwd% >&UID=2.16.840.1.113883.2.1.3.7.1<%=exploracion% >&IdPaciente=&IdEstudio=&Accession=<%=vTaresanaTamedico.getAutorizacion()% >&RequestId=&Modalidades=XSPACS/">Ver imagenes</a></td>
|
||||
|
||||
%>
|
||||
|
||||
<%
|
||||
/*}*/
|
||||
%>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace">Nueva prescripción</a></td>
|
||||
</tr>
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/diagnostico.jsp?x=4&pagina=1" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/diagnostico.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPagina() - 1%>" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/diagnostico.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPagina() + 1%>" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/diagnostico.jsp?x=4&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="14"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de diagnostico (pac/diagnostico.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,885 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de otras especialidades (pac/especialidades.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de otras especialidades (pac/especialidades.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strMensajeSinElementos="No ha seleccionado ninguna especialidad.";
|
||||
String strParametroMenu="";
|
||||
String strCampoNombre="";
|
||||
String strListaElementos="";
|
||||
String strListaCodigoElementos="";
|
||||
String strInforme="";
|
||||
int intImpresion = 0;
|
||||
int intPagina = 0;
|
||||
int paginacion = 0;
|
||||
String strModifiAut="";
|
||||
boolean modificar = false;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
|
||||
String strListaElementosPrescripcion = "";
|
||||
String strInformePrescripcion = "";
|
||||
String strAutorizacion="";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro descripcion para las busquedas
|
||||
if (request.getParameter("nombre")!=null)
|
||||
strCampoNombre = (String)request.getParameter("nombre");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaElementos")!=null)
|
||||
strListaElementos=(String)request.getParameter("listaElementos");
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaCodigoElementos")!=null)
|
||||
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro informePrescripcion utilizado para realizar la impresion
|
||||
if (request.getParameter("informePrescripcion")!=null)
|
||||
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||
|
||||
//atributo autorizacion utilizado para realizar la impresion
|
||||
if (request.getAttribute("autorizacion")!=null)
|
||||
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||
|
||||
//parametro informe para mostrar el informe introducido por el medico
|
||||
if (request.getParameter("informe")!=null)
|
||||
strInforme=(String)request.getParameter("informe");
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null)
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
|
||||
//parametro autorizacion que se pasa cuando se ha pulsado en editar peticion
|
||||
if (request.getParameter("modifiAuto")!=null)
|
||||
strModifiAut=(String)request.getParameter("modifiAuto");
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
Tamensaje tamensajeJS = new Tamensaje();
|
||||
tamensajeJS = pertamensaje.obtenerMensaje(4);
|
||||
|
||||
if (strModifiAut!=null && strModifiAut.compareTo("")!=0){
|
||||
|
||||
if ((request.getParameter("paginacion")!=null)&&(request.getParameter("paginacion").compareTo("")!=0)) {
|
||||
paginacion=Integer.parseInt(request.getParameter("paginacion"));
|
||||
}
|
||||
if (paginacion==0){
|
||||
modificar = true;
|
||||
PersistenciaTapresca per = new PersistenciaTapresca();
|
||||
Vector vSeleccion = new Vector();
|
||||
vSeleccion = per.obtenerEspecialidadOtrasPeticiones(Long.parseLong(strModifiAut));
|
||||
if (vSeleccion.size()!=0) //No se han encontrado datos
|
||||
{
|
||||
Tapresca tapresca = new Tapresca();
|
||||
tapresca = (Tapresca)vSeleccion.firstElement();
|
||||
strListaCodigoElementos = ""+tapresca.getEspecialidad();
|
||||
PersistenciaTaespeci perTaespeci = new PersistenciaTaespeci();
|
||||
strListaElementos = perTaespeci.obtenerDescripcionEspecialidad(tapresca.getEspecialidad());
|
||||
strListaElementosPrescripcion = strListaElementos;
|
||||
strInforme = tapresca.getTexto();
|
||||
}
|
||||
}else{
|
||||
paginacion=0;
|
||||
}
|
||||
}
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Especialidades</title>
|
||||
<link rel="shortcut icon" href="<%=request.getContextPath()%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||
var vElementos = new Array();
|
||||
var vCodigoElementos = new Array();
|
||||
var intNumeroCheckBoxes = 0;
|
||||
var mensajeNoMasActos = "<%=tamensajeJS.getMensaje()%>";
|
||||
var modifi = <%=modificar%>;
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) { //se efectua la impresion
|
||||
//alert("dentro de impresion " + <%=request.getContextPath()%>);
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impEspecialidades.jsp?autorizacion=<%=strAutorizacion%>');
|
||||
//var ventanaEspec = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>.pdf";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function anular()
|
||||
{
|
||||
vElementos = new Array();
|
||||
escribirListaElementos();
|
||||
|
||||
vCodigoElementos = new Array();
|
||||
|
||||
//limpiamos la seleccion de las checkboxes
|
||||
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||
eval("document.frmEspecialidades.checkbox" + i + ".checked=false");
|
||||
|
||||
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||
document.frmPrescripcion.informePrescripcion.value="";
|
||||
document.frmEspecialidades.listaElementos.value="";
|
||||
document.frmEspecialidades.listaCodigoElementos.value="";
|
||||
document.frmEspecialidades.informe.value="";
|
||||
}
|
||||
|
||||
function imprimir()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||
prepararEnvioFormInformePrescripcion();
|
||||
if (modifi){
|
||||
document.frmPrescripcion.listaElementosPrescripcion.value = '<%=strListaElementos%>';
|
||||
|
||||
document.frmPrescripcion.listaCodigoElementosPrescripcion.value = '<%=strListaCodigoElementos%>';
|
||||
/*modifi=false;*/
|
||||
}
|
||||
|
||||
|
||||
if (document.frmPrescripcion.listaElementosPrescripcion.value=="") {
|
||||
/*alert("Debe seleccionar algún elemento para realizar la prescripción.");*/
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||
} else if (document.frmPrescripcion.informePrescripcion.value.length < 1) {
|
||||
/*alert("Debe rellenar el Informe.");*/
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe rellenar el Informe.',});
|
||||
}else {
|
||||
//comprobamos que tenga menos de mil caracteres
|
||||
if (document.frmPrescripcion.informePrescripcion.value.length > 1000)
|
||||
document.frmPrescripcion.informePrescripcion.value=document.frmPrescripcion.informePrescripcion.value.substring(0,1000);
|
||||
//enviamos el formulario
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||
{
|
||||
var textoElementos="";
|
||||
var textoCodigoElementos="";
|
||||
|
||||
if (vElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de descripciones
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
textoElementos+= "¬" + vElementos[i];
|
||||
}
|
||||
textoElementos+="¬";
|
||||
|
||||
}
|
||||
campoElementos.value=textoElementos;
|
||||
|
||||
|
||||
if (vCodigoElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de codigos
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||
}
|
||||
textoCodigoElementos+= "¬";
|
||||
}
|
||||
campoCodigoElementos.value=textoCodigoElementos;
|
||||
|
||||
}
|
||||
|
||||
function prepararEnvioFormInformePrescripcion()
|
||||
{
|
||||
document.frmPrescripcion.informePrescripcion.value = document.frmEspecialidades.informe.value;
|
||||
}
|
||||
|
||||
function inicializarListaElementos()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementos = '<%=strListaElementosAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementos.indexOf("~")!=-1)
|
||||
lstElementos = lstElementos.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
if (lstElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
while (lstElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//preparamos la lista de codigos
|
||||
|
||||
//cogemos los valores de la lista de codigos
|
||||
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||
|
||||
//inicializamos el array de elementos con sus valores
|
||||
var i=0;
|
||||
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
|
||||
function aniadirElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
|
||||
//añadimos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||
|
||||
|
||||
//añadimos codigo elemento
|
||||
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||
}
|
||||
|
||||
function eliminarElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
var vNuevosElementos=new Array();
|
||||
var vNuevosCodigoElementos=new Array();
|
||||
var j=0;
|
||||
|
||||
//eliminamos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
if(vElementos[i]!=elementoConComillaSimple)
|
||||
{
|
||||
vNuevosElementos[j]=vElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vElementos = vNuevosElementos;
|
||||
|
||||
//eliminamos codigo elemento
|
||||
j=0;
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
if(vCodigoElementos[i]!=codigoElemento)
|
||||
{
|
||||
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vCodigoElementos = vNuevosCodigoElementos;
|
||||
modifi=false;
|
||||
}
|
||||
|
||||
function escribirListaElementos()
|
||||
{
|
||||
if (modifi){
|
||||
vElementos[0]= '<%=strListaElementos%>';
|
||||
/*modifi=false;*/
|
||||
}
|
||||
|
||||
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||
if (vElementos.length==0) //no hay ningun elemento
|
||||
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||
else //hay algun elemento
|
||||
{
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
texto = texto + "</table>";
|
||||
|
||||
//escribimos la lista de elementos dependiendo del navegador
|
||||
if (document.all)
|
||||
{
|
||||
document.all['elementos'].innerHTML = texto;
|
||||
}
|
||||
else if (document.getElementById)
|
||||
{
|
||||
document.getElementById('elementos').innerHTML = texto;
|
||||
}
|
||||
else if (document.layers)
|
||||
{
|
||||
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||
document.layers['elementos'].document.open();
|
||||
document.layers['elementos'].document.write(texto);
|
||||
document.layers['elementos'].document.close();
|
||||
}
|
||||
}
|
||||
|
||||
function tratarCheckBox(checkbox, codigoElemento)
|
||||
{
|
||||
if (vElementos.length>=1) //hay seleccionados 1 elemento. No puede seleccionar mas elementos.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
checkbox.checked=false;
|
||||
/*alert(mensajeNoMasActos);*/
|
||||
modal({type:'error',title:'¡Atención!',text:mensajeNoMasActos,});
|
||||
}
|
||||
else //se quita la seleccion de una prescripcion
|
||||
{
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
else //tiene seleccionados menos que 1 elemento. Le dejamos que seleccione sin ningun problema.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
aniadirElemento(checkbox.value, codigoElemento);
|
||||
else
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
|
||||
function obtenerInformePrescripcion()
|
||||
{
|
||||
//preparamos el informe de prescripcion
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||
//dependiendo del navegador el salto de linea es diferente.
|
||||
//explorer => \r\n
|
||||
//netscape 6 => \n
|
||||
<%
|
||||
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||
%>
|
||||
|
||||
//cogemos los valores del informe sin comillas simples
|
||||
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original
|
||||
while(informePrescripcion.indexOf("~")!=-1)
|
||||
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||
|
||||
return informePrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
|
||||
function informarParametroCampoBusqueda()
|
||||
{
|
||||
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strCampoNombreAux=strCampoNombre.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos el valor del campo de busqueda sin comillas simples
|
||||
var lstCampoBusqueda = '<%=strCampoNombreAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
|
||||
while(lstCampoBusqueda.indexOf("~")!=-1)
|
||||
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
|
||||
|
||||
document.frmEspecialidades.nombre.value=lstCampoBusqueda;
|
||||
}
|
||||
|
||||
function comprobarTamanio()
|
||||
{
|
||||
return (document.frmEspecialidades.informe.value.length < 1000)
|
||||
}
|
||||
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value=campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||
document.frmEspecialidades.pagina.value=1;
|
||||
pasarAMayusculas(document.frmEspecialidades.nombre);
|
||||
document.frmEspecialidades.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
|
||||
document.frmEspecialidades.pagina.value=pagina;
|
||||
pasarAMayusculas(document.frmEspecialidades.nombre);
|
||||
document.frmEspecialidades.paginacion.value=1;
|
||||
document.frmEspecialidades.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<table border="0" align="center" width="100%" cellpadding="0">
|
||||
<%
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="button" name="aceptar" value="OK/Imprimir" onclick="javascript:imprimir()" class="menu"></td>
|
||||
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=1" method="post">
|
||||
<input type="hidden" name="listaElementosPrescripcion" value="<%=strListaElementos%>">
|
||||
<input type="hidden" name="listaCodigoElementosPrescripcion" value="<%=strListaCodigoElementos%>">
|
||||
<input type="hidden" name="informePrescripcion" value="">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_ESPECIALIDADES%>">
|
||||
<input type="hidden" name="modifiAuto" value="<%=strModifiAut%>">
|
||||
</form>
|
||||
<form name="frmEspecialidades" action="<%=request.getContextPath()%>/jsp/pac/especialidades.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||
<table border="0" align="left" width="60%">
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita"><%=pertamensaje.obtenerMensaje(50).getMensaje() %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" align="right">
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita"><%=pertamensaje.obtenerMensaje(46).getMensaje() %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="informe" rows="4" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInforme%></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita"><%=pertamensaje.obtenerMensaje(49).getMensaje() %> </span></td>
|
||||
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
<input type="hidden" name="listaElementos" value="">
|
||||
<input type="hidden" name="listaCodigoElementos" value="">
|
||||
<input type="hidden" name="modifiAuto" value="<%=strModifiAut%>">
|
||||
<input type="hidden" name="paginacion" value="">
|
||||
</tr>
|
||||
<%
|
||||
PersistenciaTaespeci per = new PersistenciaTaespeci();
|
||||
Vector vSeleccion = per.listado_especialidades(strCampoNombre, intPagina);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Especialidades: " + vSeleccion.size());
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||
//-->
|
||||
</script>
|
||||
<tr>
|
||||
<td width="1%"></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(41).getMensaje() %></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
Taespeci taespeci = null;
|
||||
String estilo = "";
|
||||
String strDescripcionSinComilla="";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
taespeci = (Taespeci)vSeleccion.elementAt(i);
|
||||
|
||||
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||
strDescripcionSinComilla = taespeci.getDescripcion().replace('\'', '~');
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (modificar){
|
||||
if (strListaElementos.indexOf(taespeci.getDescripcion())!=-1){
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||
<%
|
||||
}
|
||||
}else {
|
||||
if (strListaElementos.indexOf("¬" + taespeci.getDescripcion() + "¬")!=-1){
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<td class="<%=estilo%>" align="left"><%=taespeci.getDescripcion()%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</form>
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="10"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de otras especialidades (pac/especialidades.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,916 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion (pac/facturacion.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion == null)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión no iniciada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
else if(sesion.getAttribute("PACIENTE") == null)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Paciente borrado ¿Ha pulsado 'history back'?");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/pac/gestor.jsp");
|
||||
}
|
||||
//else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) != 0 )
|
||||
else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado() != (ParametrosConfiguracion.bin_chipcard_propios))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Es desplazado, lo mandamos a chipcard");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/pac/facturacion_chipcard.jsp?x=0&pagina=1");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de facturacion (pac/facturacion.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
// Definicion de variables
|
||||
String mensaje = null;
|
||||
mensaje = (String)sesion.getAttribute("ERROR");
|
||||
String strMensajeSinElementos="";
|
||||
if(mensaje == null || (mensaje.trim().compareTo("") == 0))
|
||||
{
|
||||
strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||
}
|
||||
else
|
||||
{
|
||||
strMensajeSinElementos=mensaje;
|
||||
}
|
||||
String strParametroMenu="";
|
||||
String strCampoNombre="";
|
||||
String strListaElementos="";
|
||||
String strListaCodigoElementos="";
|
||||
int intImpresion = 0;
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
|
||||
String strEsPrimeraVisita = "";
|
||||
String strConRevisionHoy = "";
|
||||
String strListaElementosPrescripcion = "";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
StringBuffer perfilIguala = new StringBuffer();
|
||||
perfilIguala.append(sesion.getAttribute("PERFIL"));
|
||||
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro descripcion para las busquedas
|
||||
if (request.getParameter("nombre")!=null)
|
||||
strCampoNombre = (String)request.getParameter("nombre");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaElementos")!=null)
|
||||
strListaElementos=(String)request.getParameter("listaElementos");
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaCodigoElementos")!=null)
|
||||
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//atributo ENC que obtiene la peticion encriptada
|
||||
String factE = "";
|
||||
if (sesion.getAttribute("ENC")!=null) {
|
||||
factE = (String)sesion.getAttribute("ENC");
|
||||
sesion.removeAttribute("ENC");
|
||||
}
|
||||
|
||||
|
||||
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||
String tarjeta = String.valueOf(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta());
|
||||
if(((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado() != ParametrosConfiguracion.bin_chipcard_propios)
|
||||
tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado();
|
||||
PersistenciaTapolfac perTapolfac = new PersistenciaTapolfac();
|
||||
Integer blnEsPolizaIgualaMedico = perTapolfac.esPolizaIgualaMedico(intMedico, intColectivo, dblPoliza);
|
||||
|
||||
|
||||
|
||||
PersistenciaTaprimer perTaprimer = new PersistenciaTaprimer();
|
||||
if (perTaprimer.esPrimeraVisita( intMedico, intColectivo, dblPoliza, intBeneficiario) )
|
||||
strEsPrimeraVisita = "si";
|
||||
else
|
||||
strEsPrimeraVisita = "no";
|
||||
|
||||
PersistenciaTamovext perTamovex = new PersistenciaTamovext();
|
||||
strConRevisionHoy = "no";
|
||||
//if(perTamovex.tieneRevisionHoy(intMedico, ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado(), true))
|
||||
if(perTamovex.tieneRevisionHoyColPolOrd(intMedico, intColectivo, dblPoliza, intBeneficiario, true))
|
||||
strConRevisionHoy = "si";
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
String pathSpgif = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
pathSpgif = path + "/..";
|
||||
}else if (request.getContextPath().indexOf("servlet")==-1){
|
||||
path = "/tarisan";
|
||||
}
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title>Especialidades</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||
var vElementos = new Array();
|
||||
var vCodigoElementos = new Array();
|
||||
var intNumeroCheckBoxes = 0;
|
||||
var esPrimeraVisita = '<%=strEsPrimeraVisita%>';
|
||||
var tienerevisionhoy = '<%=strConRevisionHoy%>';
|
||||
var codigoPrimeraVisita = <%=ParametrosConfiguracion.codigoPrimeraVisita%>;
|
||||
var codigoVisitaSucesiva = <%=ParametrosConfiguracion.codigoVisitaSucesiva%>;
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) { //se efectua la impresion
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=factE%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function anular()
|
||||
{
|
||||
vElementos = new Array();
|
||||
escribirListaElementos();
|
||||
|
||||
vCodigoElementos = new Array();
|
||||
|
||||
//limpiamos la seleccion de las checkboxes
|
||||
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||
eval("document.frmFacturacion.checkbox" + i + ".checked=false");
|
||||
|
||||
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||
document.frmFacturacion.listaElementos.value="";
|
||||
document.frmFacturacion.listaCodigoElementos.value="";
|
||||
}
|
||||
|
||||
function imprimir()
|
||||
{
|
||||
var boton = document.getElementById('okimprimir');
|
||||
boton.disabled = true;
|
||||
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||
|
||||
if (document.frmPrescripcion.listaElementosPrescripcion.value=="")
|
||||
{
|
||||
boton.disabled = false;
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||
/*alert("Debe seleccionar algún elemento para realizar la prescripción.");*/
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||
{
|
||||
var textoElementos="";
|
||||
var textoCodigoElementos="";
|
||||
|
||||
if (vElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de descripciones
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
textoElementos+= "¬" + vElementos[i];
|
||||
}
|
||||
textoElementos+="¬";
|
||||
|
||||
}
|
||||
campoElementos.value=textoElementos;
|
||||
|
||||
|
||||
if (vCodigoElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de codigos
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||
}
|
||||
textoCodigoElementos+= "¬";
|
||||
}
|
||||
campoCodigoElementos.value=textoCodigoElementos;
|
||||
|
||||
}
|
||||
|
||||
function inicializarListaElementos()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementos = '<%=strListaElementosAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementos.indexOf("~")!=-1)
|
||||
lstElementos = lstElementos.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
if (lstElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
while (lstElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//preparamos la lista de codigos
|
||||
|
||||
//cogemos los valores de la lista de codigos
|
||||
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||
|
||||
//inicializamos el array de elementos con sus valores
|
||||
var i=0;
|
||||
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
|
||||
function aniadirElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
|
||||
//añadimos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||
|
||||
|
||||
//añadimos codigo elemento
|
||||
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||
}
|
||||
|
||||
function eliminarElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
var vNuevosElementos=new Array();
|
||||
var vNuevosCodigoElementos=new Array();
|
||||
var j=0;
|
||||
|
||||
//eliminamos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
if(vElementos[i]!=elementoConComillaSimple)
|
||||
{
|
||||
vNuevosElementos[j]=vElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vElementos = vNuevosElementos;
|
||||
|
||||
//eliminamos codigo elemento
|
||||
j=0;
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
if(vCodigoElementos[i]!=codigoElemento)
|
||||
{
|
||||
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vCodigoElementos = vNuevosCodigoElementos;
|
||||
}
|
||||
|
||||
function escribirListaElementos()
|
||||
{
|
||||
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||
if (vElementos.length==0) //no hay ningun elemento
|
||||
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||
else //hay algun elemento
|
||||
{
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
texto = texto + "</table>";
|
||||
|
||||
//escribimos la lista de elementos dependiendo del navegador
|
||||
if (document.all)
|
||||
{
|
||||
document.all['elementos'].innerHTML = texto;
|
||||
}
|
||||
else if (document.getElementById)
|
||||
{
|
||||
document.getElementById('elementos').innerHTML = texto;
|
||||
}
|
||||
else if (document.layers)
|
||||
{
|
||||
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||
document.layers['elementos'].document.open();
|
||||
document.layers['elementos'].document.write(texto);
|
||||
document.layers['elementos'].document.close();
|
||||
}
|
||||
}
|
||||
|
||||
function tratarCheckBox(checkbox, codigoElemento)
|
||||
{
|
||||
var consultaRevision = false; //variable que controla si se ha marcado una consulta y una revision a la vez
|
||||
|
||||
if (vElementos.length>=5) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
checkbox.checked=false;
|
||||
modal({type:'error',title:'¡Atención!',text:'No pueden imputarse más actos médicos.',});
|
||||
/*alert("No pueden imputarse más actos médicos");*/
|
||||
}
|
||||
else //se quita la seleccion de una prescripcion
|
||||
{
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
else //tiene seleccionados menos que 5 elementos. Le dejamos que seleccione sin ningun problema.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
//Comprobamos que no se pueda seleccionar una consulta y una revision a la vez
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
if(vCodigoElementos[i]==1)
|
||||
{
|
||||
if (codigoElemento==2){
|
||||
checkbox.checked=false;
|
||||
/*alert("No puede imputarse una consulta y una revision a la vez"); */
|
||||
consultaRevision = true;
|
||||
modal({type:'error',title:'¡Atención!',text:'No puede imputarse una consulta y una revision a la vez.',});
|
||||
}
|
||||
}else if(vCodigoElementos[i]==2)
|
||||
{
|
||||
if (codigoElemento==1){
|
||||
checkbox.checked=false;
|
||||
/*alert("No puede imputarse una consulta y una revision a la vez"); */
|
||||
consultaRevision = true;
|
||||
modal({type:'error',title:'¡Atención!',text:'No puede imputarse una consulta y una revision a la vez.',});
|
||||
}
|
||||
}
|
||||
}
|
||||
//comprobamos si se permite seleccionar la primera visita o la visita sucesiva
|
||||
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
|
||||
if ( codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") //selecciona primera visita y no es la primera visita o seleciona la visita sucesiva y es primera vista
|
||||
{
|
||||
checkbox.checked=false;
|
||||
modal({type:'error',title:'¡Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta.',});
|
||||
/*alert("Imposible imputarse ese acto médico ya ha tenido consulta.");*/
|
||||
}
|
||||
else if(( codigoElemento == codigoVisitaSucesiva && tienerevisionhoy == "si" )||( codigoElemento == 1 && tienerevisionhoy == "si" ))
|
||||
{
|
||||
checkbox.checked=false;
|
||||
modal({type:'error',title:'¡Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.',});
|
||||
/*alert("Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.");*/
|
||||
}
|
||||
else{
|
||||
if (consultaRevision == false){
|
||||
aniadirElemento(checkbox.value, codigoElemento);
|
||||
}
|
||||
}
|
||||
consultaRevision = false;
|
||||
}
|
||||
else
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
function informarParametroCampoBusqueda()
|
||||
{
|
||||
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strCampoNombreAux=strCampoNombre.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos el valor del campo de busqueda sin comillas simples
|
||||
var lstCampoBusqueda = '<%=strCampoNombreAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
|
||||
while(lstCampoBusqueda.indexOf("~")!=-1)
|
||||
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
|
||||
|
||||
document.frmFacturacion.nombre.value=lstCampoBusqueda;
|
||||
}
|
||||
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value=campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
document.frmFacturacion.pagina.value=1;
|
||||
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||
document.frmFacturacion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
document.frmFacturacion.pagina.value=pagina;
|
||||
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||
document.frmFacturacion.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<%
|
||||
if ((blnEsPolizaIgualaMedico == 0) || ((blnEsPolizaIgualaMedico != 0) && perfilIguala.toString().compareTo("01")!=0)){
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - PERFIL TARISAN: " + perfilIguala.toString() + " " + blnEsPolizaIgualaMedico);
|
||||
%>
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<table border="0" align="center" width="100%" cellpadding="0">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<!--<td colspan="4" align="right">-->
|
||||
<td colspan="4" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="button" name="aceptar" id="okimprimir" value="OK" onclick="javascript:imprimir()" class="menu"></td>
|
||||
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=1" method="post">
|
||||
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_FACTURACION%>">
|
||||
</form>
|
||||
<form name="frmFacturacion" action="<%=request.getContextPath()%>/jsp/pac/facturacion.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||
<table border="0" align="center" width="60%">
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita">Imputación de actos médicos:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">
|
||||
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||
</td>
|
||||
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="60" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita">Nombre acto médico: </span></td>
|
||||
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
<input type="hidden" name="listaElementos" value="">
|
||||
<input type="hidden" name="listaCodigoElementos" value="">
|
||||
</tr>
|
||||
<%
|
||||
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||
long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||
double dblPolizanew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||
int contrato = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato();
|
||||
|
||||
Vector vSeleccion = per.obtenerActosAutoprescribibles(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), contrato, intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Actos: " + vSeleccion.size());
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||
//-->
|
||||
</script>
|
||||
<tr>
|
||||
<td width="1%"></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
Ttactmed ttactmed = null;
|
||||
String estilo = "";
|
||||
String strDescripcionSinComilla="";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
|
||||
|
||||
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||
strDescripcionSinComilla = ttactmed.getDescripcion().replace('\'', '~');
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1)
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=ttactmed.getActo()%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=ttactmed.getDescripcion()%></td>
|
||||
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(per.obtenerPrecioActoMedico(((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), ttactmed.getActo(), ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad()), PersistenciaParametros.decimales)%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</form>
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
else {
|
||||
%>
|
||||
<table border="0" align="center" width="60%">
|
||||
<form name="frmFacturacion" action="" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
<input type="hidden" name="listaElementos" value="">
|
||||
<input type="hidden" name="listaCodigoElementos" value="">
|
||||
</form>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<%
|
||||
if (blnEsPolizaIgualaMedico == 1){ %>
|
||||
<td align="center" class="txtNegrita"><%=pertamensaje.obtenerMensaje(12).getMensaje() %></td>
|
||||
<%}
|
||||
else { %>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
<%
|
||||
}%>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="11"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de facturacion (pac/facturacion.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,885 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion (pac/facturacion_chipcard.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - \n\n\nTarjeta desplazado en sesion, contrato: "+tarjeta.getContrato()+" entidad imq: "+tarjeta.getEntidadIMQ() + " - " + tarjeta.getColectivo() + " - " + tarjeta.getPoliza()+ " - " +tarjeta.getBeneficiario());
|
||||
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
|
||||
else if(sesion.getAttribute("PACIENTE") == null)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Paciente borrado Ha pulsado 'history back'?");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/pac/gestor.jsp");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de facturacion (pac/facturacion_chipcard.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
// Definicion de variables
|
||||
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||
boolean strMensajeEnRojo = false;
|
||||
if(sesion.getAttribute("mensaje") != null )
|
||||
{
|
||||
strMensajeSinElementos =sesion.getAttribute("mensaje").toString();
|
||||
}
|
||||
sesion.setAttribute("mensaje", null);
|
||||
String strParametroMenu="";
|
||||
String strCampoNombre="";
|
||||
String strListaElementos="";
|
||||
String strListaCodigoElementos="";
|
||||
int intImpresion = 0;
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
|
||||
String strEsPrimeraVisita = "";
|
||||
String strEsPrimeraVisitaDesplazado = "";
|
||||
String strConRevisionHoy = "";
|
||||
String strListaElementosPrescripcion = "";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
StringBuffer perfilIguala = new StringBuffer();
|
||||
perfilIguala.append(sesion.getAttribute("PERFIL"));
|
||||
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro descripcion para las busquedas
|
||||
if (request.getParameter("nombre")!=null)
|
||||
strCampoNombre = (String)request.getParameter("nombre");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaElementos")!=null)
|
||||
strListaElementos=(String)request.getParameter("listaElementos");
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaCodigoElementos")!=null)
|
||||
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
|
||||
}
|
||||
|
||||
String mensaje = (String)sesion.getAttribute("RESULTADO");
|
||||
sesion.setAttribute("RESULTADO", null);
|
||||
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||
//int intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||
//int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||
//double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||
|
||||
/*
|
||||
PersistenciaTapolfac perTapolfac = new PersistenciaTapolfac();
|
||||
Integer blnEsPolizaIgualaMedico = perTapolfac.esPolizaIgualaMedico(intMedico, intColectivo, dblPoliza);
|
||||
|
||||
|
||||
PersistenciaTaprimer perTaprimer = new PersistenciaTaprimer();
|
||||
if (perTaprimer.esPrimeraVisita( intMedico, intColectivo, dblPoliza, intBeneficiario) )
|
||||
strEsPrimeraVisita = "si";
|
||||
else
|
||||
strEsPrimeraVisita = "no";
|
||||
*/
|
||||
PersistenciaTamovext perTamovex = new PersistenciaTamovext();
|
||||
if(perTamovex.tieneRevisionHoy(intMedico, tarjeta.getTarjetaDesplazado(), true))
|
||||
strConRevisionHoy = "si";
|
||||
else
|
||||
strConRevisionHoy = "no";
|
||||
|
||||
if(perTamovex.esPrimeraVisitaDesplazado(intMedico, tarjeta.getTarjetaDesplazado(), false))
|
||||
strEsPrimeraVisitaDesplazado = "si";
|
||||
else
|
||||
strEsPrimeraVisitaDesplazado = "no";
|
||||
|
||||
|
||||
PersistenciaTaprimer perTapri = new PersistenciaTaprimer();
|
||||
if(perTapri.esPrimeraVisita(intMedico, tarjeta.getColectivo(), tarjeta.getPoliza(), tarjeta.getBeneficiario()))
|
||||
strEsPrimeraVisita = "si";
|
||||
else
|
||||
strEsPrimeraVisita = "no";
|
||||
/*if(tarjeta.getEntidadChipcard() == (ParametrosConfiguracion.bin_chipcard_propios) || (tarjeta.getBeneficiario() + tarjeta.getColectivo())>0)
|
||||
{
|
||||
if(perTapri.esPrimeraVisita(intMedico, tarjeta.getColectivo(), tarjeta.getPoliza(), tarjeta.getBeneficiario()))
|
||||
strEsPrimeraVisita = "si";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(perTamovex.esPrimeraVisitaDesplazado(intMedico, tarjeta.getTarjetaDesplazado(), false))
|
||||
strEsPrimeraVisita = "si";
|
||||
}*/
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Es primera visita?: "+strEsPrimeraVisita+", es primera visita para desplazado: "+strEsPrimeraVisitaDesplazado);
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
String pathSpgif = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
pathSpgif = path + "/..";
|
||||
}else if (request.getContextPath().indexOf("servlet")==-1){
|
||||
path = "/../tarisan";
|
||||
}
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title>Especialidades para desplazados</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||
var vElementos = new Array();
|
||||
var vCodigoElementos = new Array();
|
||||
var intNumeroCheckBoxes = 0;
|
||||
var esPrimeraVisita = '<%=strEsPrimeraVisita%>';
|
||||
var esPrimeraVisitaDesplaz = '<%=strEsPrimeraVisitaDesplazado%>';
|
||||
var tienerevisionhoy = '<%=strConRevisionHoy%>';
|
||||
var codigoPrimeraVisita = <%=ParametrosConfiguracion.codigoPrimeraVisita%>
|
||||
var codigoVisitaSucesiva = <%=ParametrosConfiguracion.codigoVisitaSucesiva%>
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) { //se efectua la impresion
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impFacturacion.jsp');
|
||||
//window.open('https://infor-roumenov/tarisan/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf');
|
||||
//var ventanaFact = window.open('<%=request.getContextPath()%>/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Impresion","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()+"_"+((Tarjeta)((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta()).getPoliza()%>.pdf";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function anular()
|
||||
{
|
||||
vElementos = new Array();
|
||||
escribirListaElementos();
|
||||
|
||||
vCodigoElementos = new Array();
|
||||
|
||||
//limpiamos la seleccion de las checkboxes
|
||||
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||
eval("document.frmFacturacion.checkbox" + i + ".checked=false");
|
||||
|
||||
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||
document.frmFacturacion.listaElementos.value="";
|
||||
document.frmFacturacion.listaCodigoElementos.value="";
|
||||
}
|
||||
|
||||
function imprimir()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||
var boton = document.getElementById('okimprimir');
|
||||
boton.disabled = true;
|
||||
if (document.frmPrescripcion.listaElementosPrescripcion.value=="")
|
||||
{
|
||||
boton.disabled = false;
|
||||
//alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||
modal({type:'error',title:'Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||
{
|
||||
var textoElementos="";
|
||||
var textoCodigoElementos="";
|
||||
|
||||
if (vElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de descripciones
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
textoElementos+= "¬" + vElementos[i];
|
||||
}
|
||||
textoElementos+="¬";
|
||||
|
||||
}
|
||||
campoElementos.value=textoElementos;
|
||||
|
||||
|
||||
if (vCodigoElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de codigos
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||
}
|
||||
textoCodigoElementos+= "¬";
|
||||
}
|
||||
campoCodigoElementos.value=textoCodigoElementos;
|
||||
|
||||
}
|
||||
|
||||
function inicializarListaElementos()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementos = '<%=strListaElementosAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementos.indexOf("~")!=-1)
|
||||
lstElementos = lstElementos.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
if (lstElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
while (lstElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//preparamos la lista de codigos
|
||||
|
||||
//cogemos los valores de la lista de codigos
|
||||
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||
|
||||
//inicializamos el array de elementos con sus valores
|
||||
var i=0;
|
||||
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
|
||||
function aniadirElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
|
||||
//añadimos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||
|
||||
|
||||
//añadimos codigo elemento
|
||||
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||
}
|
||||
|
||||
function eliminarElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
var vNuevosElementos=new Array();
|
||||
var vNuevosCodigoElementos=new Array();
|
||||
var j=0;
|
||||
|
||||
//eliminamos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
if(vElementos[i]!=elementoConComillaSimple)
|
||||
{
|
||||
vNuevosElementos[j]=vElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vElementos = vNuevosElementos;
|
||||
|
||||
//eliminamos codigo elemento
|
||||
j=0;
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
if(vCodigoElementos[i]!=codigoElemento)
|
||||
{
|
||||
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vCodigoElementos = vNuevosCodigoElementos;
|
||||
}
|
||||
|
||||
function escribirListaElementos()
|
||||
{
|
||||
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||
if (vElementos.length==0) //no hay ningun elemento
|
||||
{
|
||||
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||
}
|
||||
else //hay algun elemento
|
||||
{
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
texto = texto + "</table>";
|
||||
|
||||
//escribimos la lista de elementos dependiendo del navegador
|
||||
if (document.all)
|
||||
{
|
||||
document.all['elementos'].innerHTML = texto;
|
||||
}
|
||||
else if (document.getElementById)
|
||||
{
|
||||
document.getElementById('elementos').innerHTML = texto;
|
||||
}
|
||||
else if (document.layers)
|
||||
{
|
||||
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||
document.layers['elementos'].document.open();
|
||||
document.layers['elementos'].document.write(texto);
|
||||
document.layers['elementos'].document.close();
|
||||
}
|
||||
}
|
||||
|
||||
function tratarCheckBox(checkbox, codigoElemento)
|
||||
{
|
||||
if (vElementos.length>=1) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
checkbox.checked=false;
|
||||
//alert("No puede imputarse más actos médicos");
|
||||
modal({type:'error',title:'Atención!',text:'No puede imputarse más actos médicos.',});
|
||||
}
|
||||
else //se quita la seleccion de una prescripcion
|
||||
{
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
else //tiene seleccionados menos que 5 elementos. Le dejamos que seleccione sin ningun problema.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
//comprobamos si se permite seleccionar la primera visita o la visita sucesiva
|
||||
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
|
||||
if ( (codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoPrimeraVisita && esPrimeraVisitaDesplaz == "no") ) //selecciona primera visita y no es la primera visita o seleciona la visita sucesiva y es primera vista
|
||||
{
|
||||
checkbox.checked=false;
|
||||
//alert("Imposible imputarse ese acto médico ya ha tenido consulta.");
|
||||
modal({type:'error',title:'Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta.',});
|
||||
}
|
||||
else if( codigoElemento == codigoVisitaSucesiva && tienerevisionhoy == "si" || ( codigoElemento == 1 && tienerevisionhoy == "si" ))
|
||||
{
|
||||
checkbox.checked=false;
|
||||
//alert("Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.");
|
||||
modal({type:'error',title:'Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.',});
|
||||
}
|
||||
else
|
||||
aniadirElemento(checkbox.value, codigoElemento);
|
||||
}
|
||||
else
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
function informarParametroCampoBusqueda()
|
||||
{
|
||||
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strCampoNombreAux=strCampoNombre.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos el valor del campo de busqueda sin comillas simples
|
||||
var lstCampoBusqueda = '<%=strCampoNombreAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
|
||||
while(lstCampoBusqueda.indexOf("~")!=-1)
|
||||
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
|
||||
|
||||
document.frmFacturacion.nombre.value=lstCampoBusqueda;
|
||||
}
|
||||
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value=campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
document.frmFacturacion.pagina.value=1;
|
||||
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||
document.frmFacturacion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
document.frmFacturacion.pagina.value=pagina;
|
||||
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||
document.frmFacturacion.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<table border="0" align="center" width="100%" cellpadding="0">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<!--<td colspan="4" align="right">-->
|
||||
<td colspan="4" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="button" name="aceptar" value="OK" id="okimprimir" onclick="javascript:imprimir()" class="menu"></td>
|
||||
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=0" method="post">
|
||||
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||
<input type="hidden" name="autorizacion" value="1">
|
||||
<input type="hidden" name="especialidad" value="<%=intEspecialidad %>">
|
||||
<input type="hidden" name="medico" value="<%=intMedico%>">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_FACTURACION_CHIPCARD%>">
|
||||
</form>
|
||||
<form name="frmFacturacion" action="<%=request.getContextPath()%>/jsp/pac/facturacion_chipcard.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||
<table border="0" align="center" width="60%">
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita"><%=pertamensaje.obtenerMensaje(44).getMensaje() %></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">
|
||||
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||
</td>
|
||||
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="60" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||
</tr>
|
||||
<%
|
||||
if(mensaje != null)
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><span class="txtnegrita" bgcolor="#FFAAAA"><%=mensaje %></span></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita"><%=pertamensaje.obtenerMensaje(43).getMensaje() %> </span></td>
|
||||
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
<input type="hidden" name="listaElementos" value="">
|
||||
<input type="hidden" name="listaCodigoElementos" value="">
|
||||
</tr>
|
||||
<%
|
||||
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||
aCondiciones = new Object[1];
|
||||
aCondiciones[0] = Integer.valueOf(intEspecialidad);
|
||||
String actos = "";
|
||||
|
||||
//obtenemos los actos incluidos en la autorización
|
||||
Vector vSeleccion = per.obtenerActosAutoprescribiblesDespla(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), ((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Actos autoprescriblibles desplazados: " + vSeleccion.size());
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<tr>
|
||||
<td width="1%"></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(40).getMensaje() %></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(41).getMensaje() %></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(42).getMensaje() %></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
Ttactmed ttactmed = null;
|
||||
String estilo = "";
|
||||
String strDescripcionSinComilla="";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
|
||||
|
||||
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||
strDescripcionSinComilla = ttactmed.getDescripcion().replace('\'', '~');
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1)
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=ttactmed.getActo()%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=ttactmed.getDescripcion()%></td>
|
||||
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(ttactmed.getPrecio(), PersistenciaParametros.decimales)%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="11"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje());
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Es desplazado?: "+((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard());
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - \n\n\nTarjeta desplazado en sesion, contrato: "+tarjeta.getContrato()+" entidad imq: "+tarjeta.getEntidadIMQ()+", pista2: "+((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPista2()+"-->"+tarjeta.getPista2() );
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de facturacion (pac/facturacion_chipcard.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,599 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion_iguala (pac/facturacion_iguala.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de facturacion_iguala (pac/facturacion_iguala.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||
String strParametroMenu="";
|
||||
String strCampoNombre="";
|
||||
String strListaElementos="";
|
||||
String strListaCodigoElementos="";
|
||||
int intImpresion = 0;
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
|
||||
String strEsPrimeraVisita = "";
|
||||
String strListaElementosPrescripcion = "";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro descripcion para las busquedas
|
||||
if (request.getParameter("nombre")!=null)
|
||||
strCampoNombre = (String)request.getParameter("nombre");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaElementos")!=null)
|
||||
strListaElementos=(String)request.getParameter("listaElementos");
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaCodigoElementos")!=null)
|
||||
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||
|
||||
|
||||
PersistenciaTaprimer perTaprimer = new PersistenciaTaprimer();
|
||||
if (perTaprimer.esPrimeraVisita( intMedico, intColectivo, dblPoliza, intBeneficiario) )
|
||||
strEsPrimeraVisita = "si";
|
||||
else
|
||||
strEsPrimeraVisita = "no";
|
||||
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title>Especialidades</title>
|
||||
<link rel="shortcut icon" href="<%=request.getContextPath()%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac_iguala.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||
var vElementos = new Array();
|
||||
var vCodigoElementos = new Array();
|
||||
var intNumeroCheckBoxes = 0;
|
||||
var esPrimeraVisita = '<%=strEsPrimeraVisita%>';
|
||||
var codigoPrimeraVisita = <%=ParametrosConfiguracion.codigoPrimeraVisita%>
|
||||
var codigoVisitaSucesiva = <%=ParametrosConfiguracion.codigoVisitaSucesiva%>
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) { //se efectua la impresion
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impFacturacion.jsp');
|
||||
//window.open('https://infor-roumenov/tarisan/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf');
|
||||
//var ventanaFact = window.open('<%=request.getContextPath()%>/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Impresion","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()+"_"+((Tarjeta)((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta()).getPoliza()%>.pdf";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function anular()
|
||||
{
|
||||
vElementos = new Array();
|
||||
escribirListaElementos();
|
||||
|
||||
vCodigoElementos = new Array();
|
||||
|
||||
//limpiamos la seleccion de las checkboxes
|
||||
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||
eval("document.frmFacturacion.checkbox" + i + ".checked=false");
|
||||
|
||||
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||
document.frmFacturacion.listaElementos.value="";
|
||||
document.frmFacturacion.listaCodigoElementos.value="";
|
||||
}
|
||||
|
||||
function imprimir()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||
|
||||
if (document.frmPrescripcion.listaElementosPrescripcion.value==""){
|
||||
//alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||
{
|
||||
var textoElementos="";
|
||||
var textoCodigoElementos="";
|
||||
|
||||
if (vElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de descripciones
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
textoElementos+= "¬" + vElementos[i];
|
||||
}
|
||||
textoElementos+="¬";
|
||||
|
||||
}
|
||||
campoElementos.value=textoElementos;
|
||||
|
||||
|
||||
if (vCodigoElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de codigos
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||
}
|
||||
textoCodigoElementos+= "¬";
|
||||
}
|
||||
campoCodigoElementos.value=textoCodigoElementos;
|
||||
|
||||
}
|
||||
|
||||
function inicializarListaElementos()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementos = '<%=strListaElementosAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementos.indexOf("~")!=-1)
|
||||
lstElementos = lstElementos.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
if (lstElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
while (lstElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//preparamos la lista de codigos
|
||||
|
||||
//cogemos los valores de la lista de codigos
|
||||
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||
|
||||
//inicializamos el array de elementos con sus valores
|
||||
var i=0;
|
||||
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
|
||||
function aniadirElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
|
||||
//añadimos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||
|
||||
|
||||
//añadimos codigo elemento
|
||||
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||
}
|
||||
|
||||
function eliminarElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
var vNuevosElementos=new Array();
|
||||
var vNuevosCodigoElementos=new Array();
|
||||
var j=0;
|
||||
|
||||
//eliminamos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
if(vElementos[i]!=elementoConComillaSimple)
|
||||
{
|
||||
vNuevosElementos[j]=vElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vElementos = vNuevosElementos;
|
||||
|
||||
//eliminamos codigo elemento
|
||||
j=0;
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
if(vCodigoElementos[i]!=codigoElemento)
|
||||
{
|
||||
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vCodigoElementos = vNuevosCodigoElementos;
|
||||
}
|
||||
|
||||
function escribirListaElementos()
|
||||
{
|
||||
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||
if (vElementos.length==0) //no hay ningun elemento
|
||||
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||
else //hay algun elemento
|
||||
{
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
texto = texto + "</table>";
|
||||
|
||||
//escribimos la lista de elementos dependiendo del navegador
|
||||
if (document.all)
|
||||
{
|
||||
document.all['elementos'].innerHTML = texto;
|
||||
}
|
||||
else if (document.getElementById)
|
||||
{
|
||||
document.getElementById('elementos').innerHTML = texto;
|
||||
}
|
||||
else if (document.layers)
|
||||
{
|
||||
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||
document.layers['elementos'].document.open();
|
||||
document.layers['elementos'].document.write(texto);
|
||||
document.layers['elementos'].document.close();
|
||||
}
|
||||
}
|
||||
|
||||
function tratarCheckBox(checkbox, codigoElemento)
|
||||
{
|
||||
if (vElementos.length>=5) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
checkbox.checked=false;
|
||||
//alert("No puede imputarse más actos médicos");
|
||||
modal({type:'error',title:'¡Atención!',text:'No puede imputarse más actos médicos.',});
|
||||
}
|
||||
else //se quita la seleccion de una prescripcion
|
||||
{
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
else //tiene seleccionados menos que 5 elementos. Le dejamos que seleccione sin ningun problema.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
//comprobamos si se permite seleccionar la primera visita o la visita sucesiva
|
||||
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
|
||||
if ( codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no" ) //selecciona primera visita y no es la primera visita o seleciona la visita sucesiva y es primera vista
|
||||
{
|
||||
checkbox.checked=false;
|
||||
//alert("Imposible imputarse ese acto médico.");
|
||||
modal({type:'error',title:'¡Atención!',text:'Imposible imputarse ese acto médico.',});
|
||||
}
|
||||
else
|
||||
aniadirElemento(checkbox.value, codigoElemento);
|
||||
}
|
||||
else
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
function informarParametroCampoBusqueda()
|
||||
{
|
||||
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strCampoNombreAux=strCampoNombre.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos el valor del campo de busqueda sin comillas simples
|
||||
var lstCampoBusqueda = '<%=strCampoNombreAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
|
||||
while(lstCampoBusqueda.indexOf("~")!=-1)
|
||||
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
|
||||
|
||||
document.frmFacturacion.nombre.value=lstCampoBusqueda;
|
||||
}
|
||||
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value=campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
document.frmFacturacion.pagina.value=1;
|
||||
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||
document.frmFacturacion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
document.frmFacturacion.pagina.value=pagina;
|
||||
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||
document.frmFacturacion.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<%=pertamensaje.obtenerMensaje(12).getMensaje() %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="11"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de facturacion_iguala (pac/facturacion_iguala.jsp)");
|
||||
}
|
||||
%>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,216 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de firma de autorización (pac/firma_autorizacion.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de firma de autorización (pac/firma_autorizacion.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Firma de autorización del beneficiario</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function imprimir()
|
||||
{
|
||||
VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/html/imp/firmaAutorizacion.html');
|
||||
}
|
||||
|
||||
function enviar(firmado)
|
||||
{
|
||||
if(firmado)
|
||||
{
|
||||
document.frmAutorizacion.OPCION.value = <%= Constantes.OPC_PAC_FIRMA_BENEFICIARIO %>;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frmAutorizacion.OPCION.value = <%= Constantes.OPC_PAC_GESTOR %>;
|
||||
}
|
||||
|
||||
document.frmAutorizacion.submit();
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:imprimir()">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||
<tr valign="top">
|
||||
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||
<td width="150" class="menuOff"><b>AUTORIZACION DEL BENEFICIARIO</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr><td colspan="2" class="txtnegrita" align="center">Le recordamos que una vez firmado el consentimiento, para que este tenga validez deberá ser remitido al IMQ.</br>Hasta entonces este aviso continuará apareciendo. Gracias</td></tr>
|
||||
<tr><td colspan="2">¿Firma el beneficiario la autorización?</td></tr>
|
||||
<tr>
|
||||
<form name="frmAutorizacion" action="../../servlet/GestorPacientes" method="post">
|
||||
<td>
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td colspan="2" align="center"><a href="javascript:enviar(true);" class="enlace">Aceptar</a> <a href="javascript:enviar(false);" class="enlace">Cancelar</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_FACTURACION%>">
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect("./error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de firma de autorización (pac/firma_autorizacion.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,457 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de gestión de pacientes (pac/gestor.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
String mensaje = null;
|
||||
mensaje = (String)sesion.getAttribute("ERROR");
|
||||
sesion.setAttribute("ERROR", "");
|
||||
String aviso = null;
|
||||
aviso = (String)sesion.getAttribute("AVISO");
|
||||
sesion.setAttribute("AVISO", "");
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " -Inicio página de gestión de pacientes (pac/gestor.jsp)");
|
||||
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//String noticia = Utilidades.leerNoticias("/root/apache-tomcat-6.0.20/webapps/tarisan/noticias.txt");
|
||||
Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
||||
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
String pathSpgif = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
pathSpgif = path + "/..";
|
||||
}
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title>Módulo de Gestión de Pacientes</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery.modal.min.js"></script>
|
||||
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
|
||||
</head>
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function validar()
|
||||
{
|
||||
if(document.frmTarjeta.TARJETA.value != "")
|
||||
{
|
||||
document.frmTarjeta.submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
/*alert("Tiene que pasar la Tarjeta del Paciente");*/
|
||||
modal({type:'error',title:'Atención!',text:'Tiene que pasar la Tarjeta del Paciente.',});
|
||||
document.frmTarjeta.TARJETA.value = "";
|
||||
document.frmTarjeta.TROQUELADO.value="";
|
||||
document.frmTarjeta.TARJETA.focus();
|
||||
document.frmTarjeta.TROQUELADO.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function borrarCampo()
|
||||
{
|
||||
document.frmTarjeta.TARJETA.value = "";
|
||||
document.frmTarjeta.TARJETA.focus();
|
||||
}
|
||||
|
||||
function validar_embosado()
|
||||
{
|
||||
|
||||
var troque = document.frmTarjeta.TROQUELADO.value;
|
||||
while(troque.indexOf(' ')>0){
|
||||
troque = troque.replace(' ','');
|
||||
}
|
||||
|
||||
if(document.frmTarjeta.TARJETA.value != "" && troque != "" && troque.length <= 40)
|
||||
{
|
||||
document.frmTarjeta.TROQUELADO.value = troque;
|
||||
document.frmTarjeta.submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
/*alert("Para conseguir una mejor gestión de los desplazados necesitamos que vuelva a pasar la tarjeta en el campo correspondiente y que introduzca los dígitos que aparecen en la tarjeta, como se muestra en la imagen \nGracias.");*/
|
||||
modal({type:'error',title:'Atención!',text:'Para conseguir una mejor gestión de los desplazados necesitamos que vuelva a pasar la tarjeta en el campo correspondiente y que introduzca los dígitos que aparecen en la tarjeta, como se muestra en la imagen \nGracias.',});
|
||||
document.frmTarjeta.TARJETA.value = "";
|
||||
document.frmTarjeta.TROQUELADO.value="";
|
||||
document.frmTarjeta.TARJETA.focus();
|
||||
document.frmTarjeta.TROQUELADO.focus();
|
||||
document.frmTarjeta.TROQUELADO.value="";
|
||||
}
|
||||
}
|
||||
|
||||
function detecta(){
|
||||
var navegador = navigator.vendor;
|
||||
alert(navigator.vendor);
|
||||
switch (navegador)
|
||||
{
|
||||
case "Microsoft Internet Explorer":
|
||||
/*alert("Su navegador es Internet Explorer");*/
|
||||
modal({type:'error',title:'Atención!',text:'Su navegador es Internet Explorer.',});
|
||||
break;
|
||||
case "Netscape":
|
||||
/*alert("Su navegador es Mozilla o Google Chrome");*/
|
||||
modal({type:'error',title:'Atención!',text:'Su navegador es Mozilla o Google Chrome.',});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function leer()
|
||||
{
|
||||
document.frmNoticias.submit();
|
||||
}
|
||||
|
||||
function noticia_importante()
|
||||
{
|
||||
VerText('mensajes1',1);
|
||||
document.frmTarjeta.TARJETA.value="";
|
||||
document.frmTarjeta.TARJETA.focus();
|
||||
var obj = document.frmTarjeta.TROQUELADO;
|
||||
if(obj)
|
||||
{
|
||||
document.frmTarjeta.TROQUELADO.value="";
|
||||
document.frmTarjeta.TROQUELADO.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function clear(){
|
||||
var texto = document.getElementById('usrtxt');
|
||||
texto.value ="";
|
||||
texto.setAttribute("autocomplete", "off");
|
||||
texto = document.getElementById('pwdtxt');
|
||||
texto.value="";
|
||||
texto.setAttribute("autocomplete", "off");
|
||||
texto = document.getElementById('usrtxt');
|
||||
texto.focus();
|
||||
}
|
||||
|
||||
function VerText(m,s)
|
||||
{
|
||||
obj=document.getElementById(m);
|
||||
if(s==1)obj.style.display="block";
|
||||
if(s==0)obj.style.display="none";
|
||||
}
|
||||
|
||||
function disableautocompletion(id){
|
||||
var passwordControl = document.getElementById(id);
|
||||
passwordControl.setAttribute("autocomplete", "off");
|
||||
}
|
||||
|
||||
function setFocus(){
|
||||
document.getElementById("tartxt").focus();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="noticia_importante();setFocus();">
|
||||
<div class="marco">
|
||||
<!-- Logotipo de IMQ de Navarra
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr valign="bottom">
|
||||
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>//-->
|
||||
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!--<tr>
|
||||
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||
</tr> -->
|
||||
</table>
|
||||
|
||||
<!--<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<span class="noticiaSpan">NOTICIAS:</span>
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br>-->
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||
<tr valign="top">
|
||||
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||
<td width="150" class="menuOn"><b>TARJETA DE PACIENTE</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<span id="mensajes1" class="mensajes">
|
||||
<!-- <p>Atención:<br/>Ya pueden pasar las tarjetas de TODOS LOS DESPLAZADOS, excepto en ATS, Rehabilitación, Podología y Analistas. <br/><a href="https://tarisan.imqnavarra.com/tarisan/COMPANIASALASQUEDACOBERTURAELCUADROMEDICOPERTENECIENTEAIMQ.pdf" target="_blank">Ver compañias incluidas</a></p> -->
|
||||
<p>No pasar tarjetas de DESPLAZADOS en ATS, Rehabilitación, Podología y Analistas. <br/><a href="https://tarisan.imqnavarra.com/tarisan/COMPANIASALASQUEDACOBERTURAELCUADROMEDICOPERTENECIENTEAIMQ.pdf" target="_blank">Ver compañias incluidas</a></p>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!--<tr valign="top">
|
||||
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0" width="75%"></td>
|
||||
</tr>-->
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td> -->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" width="100%" align="center">
|
||||
<%
|
||||
if (aviso!=null && aviso.length() > 0){
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="center" class="menuOn"><%=aviso %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
if (mensaje!=null && mensaje.length() > 0){
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="center" class="menuOn"><%=mensaje %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
if(request.getParameter("embosado")!=null)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Página para introducir el troquelado");
|
||||
%>
|
||||
<form name="frmTarjeta" action="../../servlet/GestorPacientes?OPCION=<%=Constantes.OPC_PAC_PASO_TARJETA %>" method="post" autocomplete="off">
|
||||
<tr>
|
||||
<td align="center" class="txtnegrita">Introduzca los números de la tarjeta:</td>
|
||||
<td><input type="text" size="40" name="TROQUELADO" id="trqld" class="txt" value=""></td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" class="txtnegrita">Pase la tarjeta:</td>
|
||||
<td><input type="password" size="40" name="TARJETA" id="tar" class="txt" value="" onfocus="javascript:document.frmTarjeta.TARJETA.text=''"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><a href="javascript:validar_embosado()" class="enlace">Validar</a></td>
|
||||
</tr>
|
||||
</form>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
%>
|
||||
<form name="frmTarjeta" action="../../servlet/GestorPacientes?OPCION=<%=Constantes.OPC_PAC_PASO_TARJETA %>" method="post">
|
||||
<tr>
|
||||
<!-- <td align="center" class="txtnegrita">Pase la tarjeta:</td>-->
|
||||
<td align="center" class="txtnegrita">Pase la tarjeta: <input type="password" size="40" name="TARJETA" class="txt" id="tartxt" value="" onlostfocus="javascript:detecta()" onfocus="javascript:document.frmTarjeta.TARJETA.text=''"> <a href="javascript:validar()" class="enlace">Validar</a> <a href="javascript:borrarCampo()" class="enlace">Borrar</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td colspan="2" align="center"><a href="javascript:validar()" class="enlace">Validar</a></td>
|
||||
</tr>-->
|
||||
</form>
|
||||
<!-- <tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td align="center" class="txtnegrita">INTRODUCción MANUAL DEL TROQUELADO DE LA TARJETA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" class="txtnegrita">Si no funciona el pase de la Tarjeta utilice esta opción para identificar al asegurado:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><a href="troquelado.jsp" class="enlace">Introducir Troquelado</a></td>
|
||||
</tr>
|
||||
</table> -->
|
||||
<%
|
||||
|
||||
}%>
|
||||
<%
|
||||
if(request.getParameter("embosado")!=null)
|
||||
{
|
||||
%>
|
||||
<table border="0" width="100%" align="center">
|
||||
<tr><td align="center" class="txtnegrita">Para conseguir una mejor gestión de los desplazados necesitamos que vuelva a pasar la tarjeta en el campo correspondiente y que introduzca los dígitos que aparecen en la tarjeta, como se muestra en la imagen a continuación:</td></tr>
|
||||
<tr><td align="center"><img src="https://tarisan.imqnavarra.com/tarisan/img/tarjeta_embossado.jpg" width="400" height="130"/></td></tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<table border="0" width="100%" align="center">
|
||||
<tr><td align="center" class="txt"><a href="https://tarisan.imqnavarra.com/tarisan/manual.pdf" target="_blank"><img src="<%=request.getContextPath()%>/img/iconoManual.gif"></a></td></tr>
|
||||
</table>
|
||||
<!--<br/> -->
|
||||
<div id="thawteseal" style="text-align:center;" title="Click para Verificar - Este sitio confía en Thawte SSL para asegurar la confidencialidad de sus comunicaciones.">
|
||||
<div><script type="text/javascript" src="https://seal.thawte.com/getthawteseal?host_name=tarisan.imqnavarra.com&size=S&lang=es"></script></div>
|
||||
<div><a href="http://www.thawte.com/products/" target="_blank" style="color:#000000; text-decoration:none; font:bold 10px arial,sans-serif; margin:0px; padding:0px;">Acerca de los certificados SSL</a></div>
|
||||
</div>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
</td>
|
||||
<!-- <td width="15%">
|
||||
<div class="noticiaLateral">
|
||||
<span>Noticias en el lateral derecho</span>
|
||||
</div>
|
||||
</td>-->
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
//Basta con ponerle a cualquier elemento el id="idAviso"
|
||||
if(document.getElementById ("idAviso")){
|
||||
window.setInterval (parpadear, 500);
|
||||
var color = "#C02331"; //color del blink
|
||||
function parpadear () {
|
||||
var aviso = document.getElementById ("idAviso");
|
||||
color = (color == "#C02331")? "#000000" : "#C02331";
|
||||
aviso.style.color = color;
|
||||
}
|
||||
}
|
||||
|
||||
if(document.getElementById ("fondoParpadeo")){
|
||||
window.setInterval (parpadear, 500);
|
||||
var color = "#F3D195"; //color del blink
|
||||
function parpadear () {
|
||||
var fondo = document.getElementById ("fondoParpadeo");
|
||||
color = (color == "#F3D195")? "#E8AD79" : "#F3D195";
|
||||
fondo.style.background = color;
|
||||
}
|
||||
}
|
||||
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de pacientes (pac/gestor.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,198 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de gestión de pacientes (pac/gestor.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de gestión de pacientes (pac/gestor.jsp)");
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Módulo de Gestión de Pacientes</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
||||
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
|
||||
</head>
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function validar()
|
||||
{
|
||||
if(document.frmTarjeta.TARJETA.value != "")
|
||||
{
|
||||
document.frmTarjeta.submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
/*alert("Tiene que pasar la Tarjeta del Paciente");*/
|
||||
modal({type:'error',title:'¡Atención!',text:'Tiene que pasar la Tarjeta del Paciente.',});
|
||||
document.frmTarjeta.TARJETA.focus();
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmTarjeta.TARJETA.focus()">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||
<tr valign="top">
|
||||
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||
<td width="150" class="menuOff"><b>TARJETA DE PACIENTE IMQ</b></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||
<td width="150" class="menuOn"><b>TARJETA DE PACIENTE CHIPCARD</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" width="100%" align="center">
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<form name="frmTarjeta" action="../../servlet/GestorPacientes?OPCION=<%= Constantes.OPC_PAC_PASO_TARJETA %>" method="post">
|
||||
<tr>
|
||||
<td align="center" class="txtnegrita">Pase la tarjeta:</td>
|
||||
<td><input type="password" size="80" name="TARJETA" class="txt" value=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><a href="javascript:validar()" class="enlace">Validar</a></td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de pacientes (pac/gestor.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,407 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio p墔ina del historial del paciente (pac/historia.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesi鏮 invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p墔ina del historial del paciente (pac/historia.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
|
||||
//Obtenci鏮 del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Historial Paciente</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/Javascript">
|
||||
<!--
|
||||
function comprobarTamanio()
|
||||
{
|
||||
return (document.frmHistoriaPaciente.texto.value.length < 255)
|
||||
}
|
||||
|
||||
function actualizarHistoriaPaciente()
|
||||
{
|
||||
if (esVacia(document.frmHistoriaPaciente.texto.value)) //la textarea esta vacia
|
||||
{
|
||||
//alert("Debe introducir alguna indicaci鏮.");
|
||||
modal({type:'error',title:',tenci鏮!',text:'Debe introducir alguna indicaci鏮.',});
|
||||
document.frmHistoriaPaciente.texto.value="";
|
||||
document.frmHistoriaPaciente.texto.focus();
|
||||
}
|
||||
else //la textarea no esta vacia
|
||||
{
|
||||
//comprobamos que tenga menos de mil caracteres
|
||||
if (document.frmHistoriaPaciente.texto.value.length > 255)
|
||||
document.frmHistoriaPaciente.texto.value=document.frmHistoriaPaciente.texto.value.substring(0,255);
|
||||
|
||||
document.frmHistoriaPaciente.texto.value = document.frmHistoriaPaciente.texto.value.toUpperCase();
|
||||
frmHistoriaPaciente.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function deshacer()
|
||||
{
|
||||
document.frmHistoriaPaciente.reset();
|
||||
document.frmHistoriaPaciente.texto.focus();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPaginacionHistoriaPaciente.pagina.value=pagina;
|
||||
document.frmPaginacionHistoriaPaciente.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmHistoriaPaciente.texto.focus()">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegaci鏮 superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la p墔ina //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Men� de navegaci鏮 del m鏚ulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<%
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
//Creaci鏮 de la tabla presentaci鏮 de resultados
|
||||
PersistenciaTamovmpo per = new PersistenciaTamovmpo();
|
||||
Vector vSeleccion = per.listado_historia_paciente(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario(), intPagina);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Listado historia paciente: " + vSeleccion.size());
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<form name="frmHistoriaPaciente" action="../../servlet/GestorPacientes" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="txtNegrita" align="left">Indicaciones:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="texto" rows="5" cols="70" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<input type="hidden" name="x" value="<%=strParametroMenu%>">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_ACTUALIZAR_HISTORIA_PACIENTE%>">
|
||||
</form>
|
||||
<form name="frmPaginacionHistoriaPaciente" action="historia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td width="60" align="center"><a href="javascript:actualizarHistoriaPaciente()" class="enlace">OK</a></td>
|
||||
<td width="60" align="center"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span class="txt">P墔ina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci鏮</td>
|
||||
</tr>
|
||||
<%
|
||||
Tamovmpo tamovmpo = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
tamovmpo = (Tamovmpo)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tamovmpo.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=tamovmpo.getTexto()%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">萖timo</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">萖timo</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<form name="frmHistoriaPaciente" action="../../servlet/GestorPacientes" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="txtNegrita" align="left">Indicaciones:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="texto" rows="5" cols="70" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<input type="hidden" name="x" value="<%=strParametroMenu%>">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_ACTUALIZAR_HISTORIA_PACIENTE%>">
|
||||
</form>
|
||||
<form name="frmPaginacionHistoriaPaciente" action="historia.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td width="60" align="center"><a href="javascript:actualizarHistoriaPaciente()" class="enlace">OK</a></td>
|
||||
<td width="60" align="center"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%} %>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p墔ina del historial del paciente (pac/historia.jsp)");
|
||||
}
|
||||
%>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 86 B |
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
@@ -0,0 +1,250 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio p墔ina de justificacion de la analitica (pac/justificacionAnalitica.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesi鏮 invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p墔ina de justificacion de la analitica (pac/justificacionAnalitica.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
String strTipo="";
|
||||
String paginaSolicitud = "solicitudAnaliticaNiveles.jsp";
|
||||
|
||||
//Obtenci鏮 del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro tipo para saber si la justificacion es de tipo anatomia patologica o anal癃ica
|
||||
if (request.getParameter("tipo")!=null)
|
||||
paginaSolicitud="solicitudAnatomiaNiveles.jsp";
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Anal癃ica</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
function comprobarTamanio()
|
||||
{
|
||||
return (document.frmJustificacionPrescripcion.justificacionPrescripcion.value.length < 1000)
|
||||
}
|
||||
|
||||
function enviar()
|
||||
{
|
||||
|
||||
//Eliminamos los saltos de linea que esten despues del ultimo elemento
|
||||
quitarUltimosSaltosLinea(document.frmJustificacionPrescripcion.justificacionPrescripcion);
|
||||
|
||||
if (esVacia(document.frmJustificacionPrescripcion.justificacionPrescripcion.value))
|
||||
{
|
||||
//alert("Debe introducir la justificaci鏮 de la nueva prescripci鏮.");
|
||||
modal({type:'error',title:',tenci鏮!',text:'Debe introducir la justificaci鏮 de la nueva prescripci鏮.',});
|
||||
document.frmJustificacionPrescripcion.justificacionPrescripcion.value="";
|
||||
document.frmJustificacionPrescripcion.justificacionPrescripcion.focus();
|
||||
}
|
||||
else
|
||||
document.frmJustificacionPrescripcion.submit();
|
||||
}
|
||||
function deshacer()
|
||||
{
|
||||
document.frmJustificacionPrescripcion.reset();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmJustificacionPrescripcion.justificacionPrescripcion.focus()">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegaci鏮 superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la p墔ina //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Men� de navegaci鏮 del m鏚ulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<form name="frmJustificacionPrescripcion" action="<%=paginaSolicitud%>?x=<%=strParametroMenu%>&pagina=1" method="post">
|
||||
<td align="center">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<!-- <td align="left" class="txtNegrita">Indique la justificaci鏮 de prescribir una nueva anal癃ica: </span></td> -->
|
||||
<td align="left" class="txtNegrita">Indique la justificaci鏮 de la nueva prescripci鏮: </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="justificacionPrescripcion" rows="8" cols="80" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table boreder="0" align="center">
|
||||
<tr>
|
||||
<td width="70"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
|
||||
<td width="70"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p墔ina de justificacion de la analitica (pac/justificacionAnalitica.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,230 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio p墔ina de justificacion del diagnostico (pac/justificacionDiagnostico.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesi鏮 invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p墔ina de justificacion del diagnostico (pac/justificacionDiagnostico.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
|
||||
//Obtenci鏮 del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Diagn鏀tico</title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
function comprobarTamanio()
|
||||
{
|
||||
return (document.frmJustificacionPrescripcion.justificacionPrescripcion.value.length < 1000)
|
||||
}
|
||||
|
||||
function enviar()
|
||||
{
|
||||
if (esVacia(document.frmJustificacionPrescripcion.justificacionPrescripcion.value))
|
||||
{
|
||||
//alert("Debe introducir la justificaci鏮 del nuevo an嫮isis.");
|
||||
modal({type:'error',title:',tenci鏮!',text:'Debe introducir la justificaci鏮 del nuevo an嫮isis.',});
|
||||
document.frmJustificacionPrescripcion.justificacionPrescripcion.focus();
|
||||
}
|
||||
else
|
||||
document.frmJustificacionPrescripcion.submit();
|
||||
}
|
||||
function deshacer()
|
||||
{
|
||||
document.frmJustificacionPrescripcion.reset();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmJustificacionPrescripcion.justificacionPrescripcion.focus()">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegaci鏮 superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la p墔ina //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Men� de navegaci鏮 del m鏚ulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<form name="frmJustificacionPrescripcion" action="solicitudDiagnosticoNiveles.jsp?x=<%=strParametroMenu%>&pagina=1" method="post">
|
||||
<td align="center">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita">Indique la justificaci鏮 de prescribir una nueva radiograf燰: </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="justificacionPrescripcion" rows="8" cols="80" class="txt" onkeypress="javascript:return comprobarTamanio()"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table boreder="0" align="center">
|
||||
<tr>
|
||||
<td width="70"><a href="javascript:deshacer()" class="enlace">Deshacer</a></td>
|
||||
<td width="70"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p墔ina de justificacion del diagnostico (pac/justificacionDiagnostico.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,586 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ page import="java.math.BigDecimal"%>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analitica (pac/analitica.jsp)");
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
/*else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/pac/solicitudAnaliticaNiveles.jsp?x=4&pagina=1");
|
||||
}*/
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de peticiones (pac/peticiones.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
// Definicion de variables param2
|
||||
boolean desplazado = false;
|
||||
String strParametroMenu="";
|
||||
Calendar calFechaAnalisis = Calendar.getInstance();
|
||||
calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis);
|
||||
java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime());
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
StringBuffer strSql2 = new StringBuffer();
|
||||
StringBuffer strSql_requestid = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
Object bCondiciones[]=null;
|
||||
Object Condiciones[]=null;
|
||||
Object aCondiciones_requestid[]=null;
|
||||
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
|
||||
int intImpresion = 0;
|
||||
java.util.Date hoy = Calendar.getInstance().getTime();
|
||||
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
|
||||
String strListaElementosPrescripcion = "";
|
||||
String strInformePrescripcion = "";
|
||||
String strAutorizacion="";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro informePrescripcion utilizado para realizar la impresion
|
||||
if (request.getParameter("informePrescripcion")!=null)
|
||||
strInformePrescripcion=(String)request.getParameter("informePrescripcion");
|
||||
|
||||
//atributo autorizacion utilizado para realizar la impresion
|
||||
if (request.getAttribute("autorizacion")!=null) {
|
||||
strAutorizacion=(String)request.getAttribute("autorizacion");
|
||||
}
|
||||
|
||||
if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0)
|
||||
{
|
||||
desplazado = true;
|
||||
}
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Otras Peticiones</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
var despla = <%= desplazado %>;
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
|
||||
function obtenerInformePrescripcion()
|
||||
{
|
||||
//preparamos el informe de prescripcion
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor del informe
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||
//dependiendo del navegador el salto de linea es diferente.
|
||||
//explorer => \r\n
|
||||
//netscape 6 => \n
|
||||
<%
|
||||
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
|
||||
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
|
||||
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
|
||||
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
|
||||
%>
|
||||
|
||||
//cogemos los valores del informe sin comillas simples
|
||||
var informePrescripcion = '<%=strInformePrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original
|
||||
while(informePrescripcion.indexOf("~")!=-1)
|
||||
informePrescripcion = informePrescripcion.replace("~", "'");
|
||||
|
||||
return informePrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) {//se efectua la impresion
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impAnalitica.jsp?autorizacion=<%=strAutorizacion%>');
|
||||
//var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strAutorizacion%>.pdf',"<%=strAutorizacion%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=strAutorizacion%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function nuevaPrescripcion()
|
||||
{
|
||||
document.frmSolicitudPrescripcion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmPrescripcion.pagina.value=pagina;
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
|
||||
function submitform()
|
||||
{
|
||||
document.frmAnalitica.submit();
|
||||
}
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<%
|
||||
//tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<!-- formulario para realizar la paginacion en caso necesario -->
|
||||
<form name="frmPrescripcion" action="peticiones.jsp?x=<%=strParametroMenu%>" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<!-- formulario para enviar la peticion a la pagina de solicitud de analitica -->
|
||||
<form name="frmSolicitudPrescripcion" action="<%=request.getContextPath()%>/jsp/pac/especialidades.jsp?x=<%=strParametroMenu%>&pagina=1" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
<%
|
||||
|
||||
//Creación de la tabla presentación de resultados
|
||||
PersistenciaTapresca per = new PersistenciaTapresca();
|
||||
String cole = (Long.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() )).toString();
|
||||
String poli = new BigDecimal(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()).toString();
|
||||
String orde = (Integer.valueOf( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() )).toString();
|
||||
|
||||
Paciente pac = (Paciente)sesion.getAttribute("PACIENTE");
|
||||
String vael = null;
|
||||
|
||||
Vector vSeleccion = per.listado_peticiones_por_paciente(intMedico, pac, intPagina, /*5*/6 ); //El último número es el tipo de petición (en este caso especialidades)
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Resultados peticiones tapresca_tarisan. Tenemos resultados: " + vSeleccion.size());
|
||||
/*int prueba = per.prueba_conexion();*/
|
||||
|
||||
/*Vector vPagiancion = new Vector();
|
||||
vPagiancion = Utilidades.ObtenerPaginacionDeUnVector(vSeleccion, intPagina);*/
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(70).getMensaje() %></span></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><a href="javascript:nuevaPrescripcion('no')" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha Solicitud</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticion</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Especialidad</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Texto</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Modificar</td>
|
||||
</tr>
|
||||
<%
|
||||
|
||||
Tapresca tapresca = null;
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
tapresca = (Tapresca)vSeleccion.elementAt(i);
|
||||
String txt = "";
|
||||
txt = tapresca.getTexto();
|
||||
if (txt == null){
|
||||
txt = "-";
|
||||
}
|
||||
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (tapresca.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
|
||||
{
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tapresca.getFecha())%></td>
|
||||
<%
|
||||
}
|
||||
else //campo autorizacion tiene un valor valido
|
||||
{
|
||||
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tapresca.getFecha())%></td>
|
||||
<td class="<%=estilo%>" align="center">
|
||||
<%
|
||||
String peticion = ""+tapresca.getAutorizacion();
|
||||
/*peticion = (peticion.length()<8)?"0"+peticion:peticion;*/
|
||||
String peticionE = tapresca.getAutorizacionEncriptada();
|
||||
String ruta = ParametrosConfiguracion.ruta_pdf_peticiones_especialidades;
|
||||
File ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="10"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
|
||||
ficheroPeticion = new File(ruta+peticion+".pdf");
|
||||
if(ficheroPeticion.exists()) //Busco en la ubicación vieja
|
||||
{
|
||||
%>
|
||||
<form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPeticion.getName()*/peticionE%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="<%=peticion%>" class="enlacePeticion"></input>
|
||||
</form>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<span align="center"><%=peticion%></span>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td class="<%=estilo%>" align="center"><%=tapresca.getEspecialidad()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=txt%></td>
|
||||
<%
|
||||
int diaHoy = hoy.getDate();
|
||||
int mesHoy = hoy.getMonth();
|
||||
int anoHoy = hoy.getYear();
|
||||
|
||||
int diaAnalisis = tapresca.getFecha().getDate();
|
||||
int mesAnalisis = tapresca.getFecha().getMonth();
|
||||
int anoAnalisis = tapresca.getFecha().getYear();
|
||||
|
||||
if ((diaHoy==diaAnalisis)&&(mesHoy==mesAnalisis)&&(anoHoy==anoAnalisis)){
|
||||
PersistenciaTaespeci perTaes = new PersistenciaTaespeci();
|
||||
int pa = perTaes.paginaDeLaEspecialidad(tapresca.getEspecialidad());
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><a href="<%=request.getContextPath()%>/jsp/pac/especialidades.jsp?x=<%=strParametroMenu%>&modifiAuto=<%=tapresca.getAutorizacion()%>&pagina=<%=pa%>" class="enlaceAnalisis">Editar</a></td>
|
||||
<%}else{ %>
|
||||
<td class="<%=estilo%>" align="center">-</td>
|
||||
<%}%>
|
||||
<%
|
||||
strSql_requestid.delete(0,strSql_requestid.length());
|
||||
}
|
||||
%>
|
||||
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center"><a href="javascript:nuevaPrescripcion()" class="enlace"><%=pertamensaje.obtenerMensaje(68).getMensaje() %></a></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/peticiones.jsp?x=6&pagina=1" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/peticiones.jsp?x=6&pagina=<%=per.getPaginacion().getNumeroPagina() - 1%>" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<!--<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>-->
|
||||
<td width="70" align="right"><a href="<%=request.getContextPath()%>/jsp/pac/peticiones.jsp?x=6&pagina=<%=per.getPaginacion().getNumeroPagina() + 1%>" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<!--<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>-->
|
||||
<td width="70" align="left"><a href="<%=request.getContextPath()%>/jsp/pac/peticiones.jsp?x=6&pagina=<%=per.getPaginacion().getNumeroPaginasTotales()%>" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="10"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex);
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de analitica (pac/analitica.jsp)");
|
||||
}
|
||||
|
||||
%>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,541 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + ": Inicio página de radiologo (pac/radiologo.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de radiologo (pac/radiologo.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu="";
|
||||
String strAutorizacion="";
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
int intPagina=0;
|
||||
String strRespuesta="";
|
||||
boolean blnPeticionCapturada=false;
|
||||
Object aCondiciones[]=null;
|
||||
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||
int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
||||
java.sql.Date dtFechaActual = new java.sql.Date(Calendar.getInstance().getTime().getTime());
|
||||
PersistenciaVTaprescaTtactmed per = new PersistenciaVTaprescaTtactmed();
|
||||
Vector vSeleccion=null;
|
||||
int mostrarBotonPDF = 0;
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro descripcion para las busquedas
|
||||
if (request.getParameter("autorizacion")!=null)
|
||||
strAutorizacion = (String)request.getParameter("autorizacion");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro respuesta para sacar el mensaje según se haya capturado o no
|
||||
if (request.getParameter("respuesta")!=null)
|
||||
strRespuesta = (String)request.getParameter("respuesta");
|
||||
|
||||
|
||||
//obtenemos las prescripciones de los radiodiagnosticos en caso de que se haya introducido un numero de autorizacion
|
||||
if (!strAutorizacion.equalsIgnoreCase("")) //El usuario ha introducido el numero de autorizacion
|
||||
{
|
||||
PersistenciaTaresana perTa = new PersistenciaTaresana();
|
||||
|
||||
if(!perTa.peticionCapturada(Long.parseLong(strAutorizacion))){
|
||||
per = new PersistenciaVTaprescaTtactmed();
|
||||
vSeleccion = per.obtenerPrescripcionAnalisis(Long.parseLong(strAutorizacion), intColectivo, dblPoliza, intBeneficiario, intEspecialidad, intPagina,((Usuario)sesion.getAttribute("USUARIO")).getMedico());
|
||||
}else{
|
||||
blnPeticionCapturada=true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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>Radiólogo </title>
|
||||
<link rel="shortcut icon" href="../../img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
function aceptarAnalisis(aceptar)
|
||||
{
|
||||
if (aceptar==0)
|
||||
{
|
||||
//alert("Para poder aceptar el radiodiagnóstico debe realizar una búsqueda previa del mismo.");
|
||||
modal({type:'error',title:'Atención!',text:'Para poder aceptar el radiodiagnóstico debe realizar una búsqueda previa del mismo.',});
|
||||
document.frmRadiologo.autorizacion.focus();
|
||||
}
|
||||
else if (aceptar==2)
|
||||
{
|
||||
//alert("La petición solicitada ya ha sido aceptada.");
|
||||
modal({type:'error',title:'Atención!',text:'La petición solicitada ya ha sido aceptada.',});
|
||||
document.frmRadiologo.autorizacion.focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
var boton = document.getElementById('okimprimir');
|
||||
boton.disabled = true;
|
||||
document.frmAceptarRadiodiagnostico.submit();
|
||||
/*alert("Petición adjudicada correctamente"); */
|
||||
}
|
||||
}
|
||||
|
||||
function mostrarPrescripciones()
|
||||
{
|
||||
if (validarAutorizacion(document.frmRadiologo.autorizacion))
|
||||
document.frmRadiologo.submit();
|
||||
}
|
||||
|
||||
function validarAutorizacion(autorizacion)
|
||||
{
|
||||
if (document.frmRadiologo.autorizacion.value.length == 7){
|
||||
document.frmRadiologo.autorizacion.value = "0" + document.frmRadiologo.autorizacion.value;
|
||||
}else if(document.frmRadiologo.autorizacion.value.length == 6){
|
||||
document.frmRadiologo.autorizacion.value = "00" + document.frmRadiologo.autorizacion.value;
|
||||
}
|
||||
|
||||
//var blnValorCorrecto = (soloNumeros(autorizacion.value) && document.frmRadiologo.autorizacion.value.length == 8);
|
||||
var blnValorCorrecto = soloNumeros(autorizacion.value);
|
||||
if (!blnValorCorrecto)
|
||||
{
|
||||
//alert("La autorización debe ser un valor numérico de 8 dígitos.");
|
||||
//alert("La autorización debe ser un valor numérico.");
|
||||
modal({type:'error',title:'Atención!',text:'La autorización debe ser un valor numérico.',});
|
||||
autorizacion.focus();
|
||||
}
|
||||
|
||||
return blnValorCorrecto;
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frmRadiologo.pagina.value=pagina;
|
||||
document.frmRadiologo.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmRadiologo.autorizacion.focus()">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
||||
</tr>-->
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
<!--<tr valign="top">
|
||||
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0" width="75%"></td>
|
||||
</tr>-->
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td> -->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<table border="0" align="center" width="100%" cellpadding="0">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="2" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<%
|
||||
if (blnPeticionCapturada)
|
||||
{
|
||||
%>
|
||||
<td><input type="button" name="aceptar" value="Aceptar" id="okimprimir" onclick="javascript:aceptarAnalisis(2)" class="menu"></td>
|
||||
<%
|
||||
}
|
||||
else if ((vSeleccion==null || vSeleccion.size()==0)){
|
||||
%>
|
||||
<td><input type="button" name="aceptar" value="Aceptar" id="okimprimir" onclick="javascript:aceptarAnalisis(0)" class="menu"></td>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<td><input type="button" name="aceptar" value="Aceptar" id="okimprimir" onclick="javascript:aceptarAnalisis(1)" class="menu"></td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<form name="frmAceptarRadiodiagnostico" action="../../servlet/GestorPacientes" method="post">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_ANALISTA_ACEPTAR_RADIODIAGNOSTICO%>">
|
||||
<input type="hidden" name="autorizacion" value="<%=strAutorizacion%>">
|
||||
</form>
|
||||
<form name="frmRadiologo" action="radiologo.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:return validarAutorizacion(this.autorizacion)">
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita">Número de autorización: </span></td>
|
||||
<td><input type="text" size="10" name="autorizacion" class="txt" maxlength="10" value='<%=strAutorizacion%>'></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:mostrarPrescripciones()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
</form>
|
||||
</tr>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<%
|
||||
if (!strAutorizacion.equalsIgnoreCase("")) //El usuario ha introducido el numero de autorizacion
|
||||
{
|
||||
if (blnPeticionCapturada) //ya existe un analisis
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(8); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else if (vSeleccion==null || vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(9); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else //no existe un analisis previo. Se muestran los datos de la prescripcion.
|
||||
{
|
||||
mostrarBotonPDF = 1;
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
VTapresca_Ttactmed vtapresca_tarisanttactmed = new VTapresca_Ttactmed();
|
||||
String strInforme = ((VTapresca_Ttactmed)vSeleccion.elementAt(0)).getInforme();
|
||||
String estilo = "";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
vtapresca_tarisanttactmed = (VTapresca_Ttactmed)vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<td class="<%=estilo%>" align="center"><%=vtapresca_tarisanttactmed.getActo()%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=vtapresca_tarisanttactmed.getDescripcionActoMedico()%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita">Informe:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><textarea name="informe" rows="4" cols="50" class="txt" readonly="readonly"><%=strInforme%></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<table border="0" align="center" width="100%" cellpadding="0">
|
||||
<tr>
|
||||
<td class="" align="left">
|
||||
<%
|
||||
if(mostrarBotonPDF==1){
|
||||
String resultado = ""+strAutorizacion;
|
||||
/*resultado = (resultado.length()<8)?"0"+resultado:resultado;*/
|
||||
File fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_rx+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="14"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_rx+Integer.valueOf(strAutorizacion).toString()+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="14"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".pdf");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+Integer.valueOf(strAutorizacion).toString()+".PDF");
|
||||
if(fichero.exists())
|
||||
{
|
||||
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="15"/>
|
||||
<input type="hidden" name="nombrePDF" value="<%=fichero.getName()%>" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
<input type="submit" value="Ver PDF" class="enlace"></input>
|
||||
</form><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><p>PDF inexistente</p><%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mostrarBotonPDF = 0;
|
||||
|
||||
%>
|
||||
</td>
|
||||
<%
|
||||
if (/*intRespuesta == 1*/strRespuesta.compareTo("1")==0){
|
||||
%><td class="txtnegrita" align="center" style="color:blue">Petición adjudicada correctamente<td> <%
|
||||
}else if (/*intRespuesta == 2*/strRespuesta.compareTo("2")==0){
|
||||
%><td class="txtnegrita" align="center" style="color:rgb(189, 2, 2);">No se puede capturar el radiodiagnóstico. El acto no tiene precio<td><%
|
||||
}
|
||||
%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de radiologo (pac/radiologo.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,786 @@
|
||||
<%@ 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 recetas (pac/recetas.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 recetas (pac/recetas.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// Definicion de variables
|
||||
String strMensajeSinElementos="No ha seleccionado ninguna prescripción.";
|
||||
String strParametroMenu="";
|
||||
String strCampoNombre="";
|
||||
String strListaElementos="";
|
||||
String strInformeRecetas="";
|
||||
String strInformeRecetasPosologia="";
|
||||
String strInstruccionesPaciente="";
|
||||
String strDuracionTratamiento ="";
|
||||
String strRecetaE ="";
|
||||
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("listaElementosPrescripcion")!=null)
|
||||
strListaElementos=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro informe para mostrar el informe introducido por el medico para el farmaceutico
|
||||
if (request.getParameter("informePrescripcion")!=null)
|
||||
strInformeRecetas=(String)request.getParameter("informePrescripcion");
|
||||
|
||||
//parametro informe para mostrar la posologia
|
||||
if (request.getParameter("informePrescripcionPosologia")!=null)
|
||||
strInformeRecetasPosologia=(String)request.getParameter("informePrescripcionPosologia");
|
||||
|
||||
//parametro informe para mostrar el informe introducido por el medico
|
||||
if (request.getParameter("instruccionesPaciente")!=null)
|
||||
strInstruccionesPaciente=(String)request.getParameter("instruccionesPaciente");
|
||||
|
||||
//parametro informe para mostrar la duracion del tratamiento
|
||||
if (request.getParameter("dias")!=null)
|
||||
strDuracionTratamiento=(String)request.getParameter("dias");
|
||||
|
||||
//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 que recoge la receta encriptada
|
||||
if (sesion.getAttribute("receta")!=null){
|
||||
strRecetaE=(String)sesion.getAttribute("receta");
|
||||
sesion.removeAttribute("receta");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Recetas</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path %>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-ui.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||
var vElementos = new Array();
|
||||
var intNumeroCheckBoxes = 0;
|
||||
|
||||
function anular()
|
||||
{
|
||||
vElementos = new Array();
|
||||
escribirListaElementos();
|
||||
|
||||
//limpiamos la seleccion de las checkboxes
|
||||
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||
eval("document.frmMedicamentos.checkbox" + i + ".checked=false");
|
||||
|
||||
document.frmRecetas.listaElementosPrescripcion.value="";
|
||||
document.frmRecetas.informePrescripcion.value="";
|
||||
document.frmRecetas.informePrescripcionPosologia.value="";
|
||||
document.frmRecetas.instruccionesPaciente.value="";
|
||||
document.frmMedicamentos.listaElementosPrescripcion.value="";
|
||||
document.frmMedicamentos.informePrescripcion.value="";
|
||||
document.frmRecetas.dias.value="";
|
||||
}
|
||||
|
||||
function imprimir()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmRecetas.listaElementosPrescripcion);
|
||||
prepararEnvioFormInformeRecetas();
|
||||
|
||||
if (document.frmRecetas.listaElementosPrescripcion.value=="") {
|
||||
//alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||
} else if (document.frmRecetas.informePrescripcionPosologia.value.length < 1) {
|
||||
document.frmRecetas.informePrescripcionPosologia.focus();
|
||||
//alert("Debe rellenar la Posología.");
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe rellenar la Posología.',});
|
||||
} else if (document.frmRecetas.informePrescripcionPosologia.value.length > 170) {
|
||||
document.frmRecetas.informePrescripcionPosologia.focus();
|
||||
//alert("No puede intrododucir más de 170 caracteres en la Posología");
|
||||
modal({type:'error',title:'¡Atención!',text:'No puede intrododucir más de 170 caracteres en la Posología.',});
|
||||
} else if (document.frmRecetas.dias.value.length < 1) {
|
||||
document.frmRecetas.dias.focus();
|
||||
//alert("Debe rellenar la duración del tratamiento");
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe rellenar la duración del tratamiento.',});
|
||||
} else if (document.frmRecetas.dias.value.length > 400) {
|
||||
document.frmRecetas.dias.focus();
|
||||
//alert("No puede intrododucir más de 400 caracteres en la duración del tratamiento");
|
||||
modal({type:'error',title:'¡Atención!',text:'No puede intrododucir más de 400 caracteres en la duración del tratamiento.',});
|
||||
}else {
|
||||
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impRecetas.jsp');
|
||||
document.frmRecetas.action = "<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>";
|
||||
document.frmRecetas.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) { //se efectua la impresion
|
||||
//var ventana = window.open('<%=request.getContextPath()%>/peticiones/Receta_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Impresión Receta","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 ventana = window.open('<%=request.getContextPath()%>/peticiones/Receta_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Impresión Recetas","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 ventanaReceta= window.open('<%=request.getContextPath()%>/peticiones/Receta_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Recetas","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=/*((Usuario)sesion.getAttribute("USUARIO")).getMedico()*/strRecetaE%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function prepararEnvioFormListaElementos(campo)
|
||||
{
|
||||
var texto="";
|
||||
|
||||
if (vElementos.length>0)
|
||||
{
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
texto+= "¬" + vElementos[i];
|
||||
}
|
||||
texto+="¬";
|
||||
}
|
||||
campo.value=texto;
|
||||
}
|
||||
|
||||
function prepararEnvioFormInformeRecetas()
|
||||
{
|
||||
document.frmRecetas.informePrescripcion.value = document.frmMedicamentos.informePrescripcion.value;
|
||||
document.frmRecetas.informePrescripcionPosologia.value = document.frmMedicamentos.informePrescripcionPosologia.value;
|
||||
document.frmRecetas.instruccionesPaciente.value = document.frmMedicamentos.instruccionesPaciente.value;
|
||||
document.frmRecetas.dias.value = document.frmMedicamentos.dias.value;
|
||||
}
|
||||
|
||||
function inicializarListaElementos()
|
||||
{
|
||||
|
||||
//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++;
|
||||
}
|
||||
}
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmMedicamentos.listaElementosPrescripcion);
|
||||
escribirListaElementos();
|
||||
}
|
||||
|
||||
function aniadirElemento(elemento)
|
||||
{
|
||||
var elementoConComillaSimple=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;
|
||||
}
|
||||
|
||||
function eliminarElemento(elemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
var vNuevosElementos=new Array();
|
||||
var j=0;
|
||||
|
||||
//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;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if (vElementos.length>=1) //Ya ha seleccionado un 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");
|
||||
modal({type:'error',title:'¡Atención!',text:'No puede imputar más actos médicos.',});
|
||||
}
|
||||
else //se quita la seleccion de una prescripcion
|
||||
{
|
||||
eliminarElemento(checkbox.value);
|
||||
prepararEnvioFormListaElementos(document.frmMedicamentos.listaElementosPrescripcion);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}else{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
aniadirElemento(checkbox.value);
|
||||
else
|
||||
eliminarElemento(checkbox.value);
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmMedicamentos.listaElementosPrescripcion);
|
||||
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()
|
||||
{
|
||||
return vElementos;
|
||||
}
|
||||
function obtenerInformePrescripcion()
|
||||
{
|
||||
//Quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
|
||||
var informe = document.frmMedicamentos.informePrescripcion.value;
|
||||
|
||||
//cambiamos el salto de linea por la etiqueta <br>
|
||||
//dependiendo del navegador el salto de linea es diferente.
|
||||
//explorer => \r\n
|
||||
//netscape 6 => \n
|
||||
if (informe.indexOf("\r\n")!=-1)
|
||||
{
|
||||
while (informe.indexOf("\r\n")!=-1)
|
||||
informe=informe.replace("\r\n", "<br>");
|
||||
}
|
||||
else if (informe.indexOf("\n")!=-1)
|
||||
{
|
||||
while (informe.indexOf("\n")!=-1)
|
||||
informe=informe.replace("\n", "<br>");
|
||||
}
|
||||
|
||||
return informe;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//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.frmMedicamentos.nombre.value=lstCampoBusqueda;
|
||||
}
|
||||
|
||||
function comprobarTamanio()
|
||||
{
|
||||
return (document.frmMedicamentos.informePrescripcion.value.length < 1000)
|
||||
}
|
||||
|
||||
function comprobarTamanioPosologia()
|
||||
{
|
||||
return (document.frmMedicamentos.informePrescripcionPosologia.value.length < 200)
|
||||
}
|
||||
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value=campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmMedicamentos.listaElementosPrescripcion);
|
||||
document.frmMedicamentos.pagina.value=1;
|
||||
pasarAMayusculas(document.frmMedicamentos.nombre);
|
||||
document.frmMedicamentos.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmMedicamentos.listaElementosPrescripcion);
|
||||
document.frmMedicamentos.pagina.value=pagina;
|
||||
pasarAMayusculas(document.frmMedicamentos.nombre);
|
||||
document.frmMedicamentos.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>);">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=path%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<table border="0" align="center" width="100%" cellpadding="0">
|
||||
<%
|
||||
Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta();
|
||||
if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)
|
||||
{
|
||||
%>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<td colspan="3" 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="3">
|
||||
<form name="frmRecetas" action="" method="post">
|
||||
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||
<input type="hidden" name="informePrescripcion" value="">
|
||||
<input type="hidden" name="informePrescripcionPosologia" value="">
|
||||
<input type="hidden" name="instruccionesPaciente" value="">
|
||||
<input type="hidden" name="dias" value="">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_RECETAS%>">
|
||||
</form>
|
||||
<form name="frmMedicamentos" action="recetas.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 recetas:</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">Posología:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="informePrescripcionPosologia" rows="2" cols="40" class="txt" onkeypress="javascript:return comprobarTamanioPosologia()"><%=strInformeRecetasPosologia%></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita">Duración del tratamiento:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="dias" rows="2" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strDuracionTratamiento%></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita">Información al farmacéutico:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="informePrescripcion" rows="2" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInformeRecetas%></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita">Instrucciones al paciente:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<textarea name="instruccionesPaciente" rows="2" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInstruccionesPaciente%></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- <table border="0" align="left" width="60%">
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita">Duración del tratamiento: <input type="text" size="20" name="dias" class="txt"></td>
|
||||
</tr>
|
||||
</table> -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><img src="../../img/sp.gif" width="1" height="15" border="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita">Nombre medicamento: </span></td>
|
||||
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||
</tr>
|
||||
<%
|
||||
PersistenciaTamedica per = new PersistenciaTamedica();
|
||||
Vector vSeleccion = per.listado_medicamentos(strCampoNombre, intPagina);
|
||||
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<!-- 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>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
Tamedica tamedica = null;
|
||||
String estilo = "";
|
||||
String strDescripcionSinComilla="";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
tamedica = (Tamedica)vSeleccion.elementAt(i);
|
||||
|
||||
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||
strDescripcionSinComilla = tamedica.getDescripcion().replace('\'', '~');
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (strListaElementos.indexOf("¬" + tamedica.getDescripcion() + "¬")!=-1)
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this)"></td>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this)"></td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<td class="<%=estilo%>" align="left"><%=tamedica.getDescripcion()%></td>
|
||||
<td class="<%=estilo%>" align="center"><%=tamedica.getCodigo()%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</form>
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="13"/>
|
||||
<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 recetas (pac/recetas.jsp)");
|
||||
}
|
||||
%>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,965 @@
|
||||
<%@ 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 radiodiagnosticos con niveles (pac/solicitudDiagnosticoNiveles.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 radiodiagnosticos con niveles (pac/solicitudDiagnosticoNiveles.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="";
|
||||
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 radiodiagnosticos.
|
||||
//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('\'', '~');
|
||||
}
|
||||
|
||||
|
||||
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="shortcut icon" href="<%=request.getContextPath()%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath() %>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/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" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||
var vElementos = new Array();
|
||||
var vCodigoElementos = new Array();
|
||||
var intNumeroCheckBoxes = 0;
|
||||
var stringActosValidos = "";
|
||||
var stringActosValidosPerfiles ="";
|
||||
var stringActosJustificacion = "";
|
||||
|
||||
|
||||
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()
|
||||
{
|
||||
prepararImpresionListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||
prepararEnvioFormInformePrescripcion();
|
||||
|
||||
if (document.frmPrescripcion.listaElementosPrescripcion.value=="") {
|
||||
//alert("Debe seleccionar algún elemento para realizar la prescripción.");
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||
} else if (document.frmPrescripcion.informePrescripcion.value.length < 1) {
|
||||
//alert("Debe rellenar el informe");
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe rellenar el informe.',});
|
||||
} else {
|
||||
//comprobamos que tenga menos de mil caracteres
|
||||
if (document.frmPrescripcion.informePrescripcion.value.length > 1000)
|
||||
document.frmPrescripcion.informePrescripcion.value=document.frmPrescripcion.informePrescripcion.value.substring(0,1000);
|
||||
|
||||
//enviamos el formulario
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//Se prepara la lista de elementos
|
||||
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||
{
|
||||
var textoElementos="";
|
||||
var textoCodigoElementos="";
|
||||
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++)
|
||||
{
|
||||
//Buscar los acto válidos y sacar un pop up para avisar de aquellos no cubiertos para el paciente.
|
||||
var temp = new Array();
|
||||
temp = stringActosValidos.split('¬');
|
||||
var bueno = false;
|
||||
|
||||
if(DetectFirefox())
|
||||
{
|
||||
if(buscar_array_firefox(temp, vCodigoElementos[i]) > 0)
|
||||
{
|
||||
//El acto está cubierto para el paciente
|
||||
bueno = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(temp.indexOf(vCodigoElementos[i]) > 0)
|
||||
{
|
||||
//El acto está cubierto para el paciente
|
||||
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...");
|
||||
modal({type:'error',title:'¡Atención!',text:'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.frmDiagnostico.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.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
|
||||
}
|
||||
|
||||
function aniadirElemento(elemento, codigoElemento, justificacion)
|
||||
{
|
||||
var elementoConComillaSimple=elemento+ " « "+justificacion;
|
||||
var nocargar=false;
|
||||
|
||||
if (justificacion==""){
|
||||
elementoConComillaSimple=elemento;
|
||||
}else{
|
||||
elementoConComillaSimple=elemento+" « "+justificacion;
|
||||
}
|
||||
|
||||
//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 vNuevosElementos=new Array();
|
||||
var vNuevosCodigoElementos=new Array();
|
||||
var j=0;
|
||||
var pos=0;
|
||||
|
||||
//Buscamos la posición del elemento seleccionado en el array de códigos de elementos(vCodigoElementos) y la guardamos en una variable(pos)
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
if(vCodigoElementos[i]==codigoElemento)
|
||||
{
|
||||
pos=i;
|
||||
}
|
||||
}
|
||||
|
||||
//eliminamos descripcion elemento
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
if(i!=pos)
|
||||
{
|
||||
vNuevosElementos[j]=vElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vElementos = vNuevosElementos;
|
||||
|
||||
//eliminamos codigo elemento
|
||||
j=0;
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
if(i!=pos)
|
||||
{
|
||||
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] + ", 'justificacion_" + vCodigoElementos[i] + "', false)\" 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, justificacion, need_justify)
|
||||
{
|
||||
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");
|
||||
modal({type:'error',title:'¡Atención!',text:'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 25 elementos. Le dejamos que seleccione sin ningun problema.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
if(need_justify) //El elemento necesita justificación
|
||||
{
|
||||
var justi = document.getElementById(justificacion).value;
|
||||
if (justi == "")
|
||||
{
|
||||
alert("Debe justificar la solicitud de esta determinación.")
|
||||
//modal({type:'error',title:'¡Atención!',text:'Debe justificar la solicitud de esta determinación.',});
|
||||
checkbox.checked=false;
|
||||
}else
|
||||
{
|
||||
aniadirElemento(checkbox.value, codigoElemento, justi);
|
||||
}
|
||||
}
|
||||
else //No necesita justificación
|
||||
{
|
||||
aniadirElemento(checkbox.value, codigoElemento, '');
|
||||
}
|
||||
}
|
||||
else //Se descheckea un elemento. Se elimina de la lista
|
||||
{
|
||||
checkbox.checked=false;
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
|
||||
}
|
||||
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
document.frmDiagnostico.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.frmDiagnostico.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.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();prepararCampoJustificacion();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="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_DIAGNOSTICO%>">
|
||||
<input type="hidden" name="justificacionPrescripcion" value='<%=strJustificacionPrescripcion%>'>
|
||||
</form>
|
||||
<form name="frmDiagnostico" action="<%=request.getContextPath()%>/jsp/pac/solicitudDiagnosticoNiveles.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="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="<%=intPagina%>">
|
||||
<input type="hidden" name="listaElementos" value="">
|
||||
<input type="hidden" name="listaCodigoElementos" value="">
|
||||
<input type="hidden" name="justificacionPrescripcion">
|
||||
</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();
|
||||
int tarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa();
|
||||
int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
int perfil_med = Integer.parseInt((String)sesion.getAttribute("PERFIL"));
|
||||
int visibilidad = 0;
|
||||
/*
|
||||
# Definición de pérfiles
|
||||
PERFIL.ADMINISTRADOR = 0
|
||||
PERFIL.ANALISTA1 = 4
|
||||
PERFIL.ANALISTA2 = 17
|
||||
PERFIL.CABECERA = 1
|
||||
PERFIL.PODOLOGIA = 53
|
||||
PERFIL.REHABILITACION = 37
|
||||
PERFIL.ATS = 50
|
||||
PERFIL.DENTISTA = 19
|
||||
*/
|
||||
if(perfil_med == 0)
|
||||
visibilidad = 4;
|
||||
else if(perfil_med == 1)
|
||||
visibilidad = 2;
|
||||
else
|
||||
visibilidad = 1;
|
||||
|
||||
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||
Vector vSeleccion_Validos = null;
|
||||
Vector vSeleccion_Con_Justificacion = 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.obtenerRadiodiagnosticosNiveles(0, intContratonew, intColectivonew, dblPolizanew, "%", tarifa, medico);
|
||||
vSeleccion_Validos= per.obtenerRadiodiagnosticosNivelesTTACTMED_GPC(0, intContratonew, intColectivonew, dblPolizanew, "%", tarifa, medico);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Obtener todos los actos, es desplazado");
|
||||
//vSeleccion_Validos= per.obtenerRadiodiagnosticosNivelesDesplazados(0, "%", medico);
|
||||
vSeleccion_Validos= per.obtenerRadiodiagnosticosNivelesDesplazadosTTACTMED_GPC(0, "%", medico);
|
||||
}
|
||||
|
||||
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.obtenerRadiodiagnosticosNiveles(intPagina, intContratonew, intColectivonew, dblPolizanew, strCampoNombre, tarifa, medico);
|
||||
vSeleccion= per.obtenerRadiodiagnosticosNivelesTTACTMED_GPC(intPagina, intContratonew, intColectivonew, dblPolizanew, strCampoNombre, tarifa, medico);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Obtener todos los actos, es desplazado");
|
||||
//vSeleccion= per.obtenerRadiodiagnosticosNivelesDesplazados(intPagina, strCampoNombre, medico);
|
||||
vSeleccion= per.obtenerRadiodiagnosticosNivelesDesplazadosTTACTMED_GPC(intPagina, strCampoNombre, medico);
|
||||
}
|
||||
|
||||
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 - Justificació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 class="trResultados">
|
||||
<%
|
||||
if (strListaCodigoElementos.indexOf("¬" + ttactmed.getActo() + "¬")!=-1)
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>, 'justificacion_<%=ttactmed.getActo()%>', <%=(ttactmed.getVisibilidad()<=visibilidad)?"false":"true" %>)"></td>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>, 'justificacion_<%=ttactmed.getActo() %>', <%=(ttactmed.getVisibilidad()<=visibilidad)?"false":"true" %>)"></td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><table style="margin:auto;width:100%"><tr ><td align="left" class="<%=estilo%>"><%=ttactmed.getDescripcion()%></td><td align="right"><input <%=(ttactmed.getVisibilidad()<=visibilidad)?"disabled=\"disabled\"":"" %> type="text" id="justificacion_<%=ttactmed.getActo() %>" name="justificacion_<%=ttactmed.getActo() %>" value=""/></td></tr></table></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 con niveles(pac/solicitudAnaliticaNiveles.jsp)");
|
||||
}
|
||||
%>
|
||||
@@ -0,0 +1,270 @@
|
||||
<%@ 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 para introducir el troquelado cuando falle el paso de la tarjeta (pac/troquelado.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
String mensaje = null;
|
||||
mensaje = (String)sesion.getAttribute("ERROR");
|
||||
sesion.setAttribute("ERROR", "");
|
||||
String aviso = null;
|
||||
aviso = (String)sesion.getAttribute("AVISO");
|
||||
sesion.setAttribute("AVISO", "");
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
//LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " -Inicio página para introducir el troquelado cuando falle el paso de la tarjeta (pac/troquelado.jsp)");
|
||||
|
||||
|
||||
//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");
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Módulo de Gestión de Pacientes</title>
|
||||
<link rel="shortcut icon" href="<%=request.getContextPath()%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath() %>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
|
||||
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
|
||||
</head>
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function validar_embosado()
|
||||
{
|
||||
var troque = document.frmTroquelado.TROQUELADO_SIN_TARJETA.value;
|
||||
|
||||
if(troque != "" && troque.length <= 40)
|
||||
{
|
||||
while(troque.indexOf(' ')>0){
|
||||
troque = troque.replace(' ','');
|
||||
}
|
||||
document.frmTroquelado.TROQUELADO_SIN_TARJETA.value = troque;
|
||||
document.frmTroquelado.submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
//alert("Debe introducir los dígitos que aparecen en la tarjeta, como se muestra en la imagen \nGracias.");
|
||||
document.frmTroquelado.TROQUELADO_SIN_TARJETA.value="";
|
||||
document.frmTroquelado.TROQUELADO_SIN_TARJETA.focus();
|
||||
modal({type:'error',title:'Atención!',text:'Debe introducir los dígitos que aparecen en la tarjeta, como se muestra en la imagen \nGracias.',});
|
||||
}
|
||||
}
|
||||
|
||||
function borrarCampo()
|
||||
{
|
||||
document.frmTroquelado.TROQUELADO_SIN_TARJETA.value="";
|
||||
document.frmTroquelado.TROQUELADO_SIN_TARJETA.focus();
|
||||
}
|
||||
|
||||
function focus(){
|
||||
document.frmTroquelado.TROQUELADO_SIN_TARJETA.focus();
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="focus();">
|
||||
<div class="marco">
|
||||
<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>
|
||||
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
||||
<tr valign="top">
|
||||
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
||||
<td width="150" class="menuOn"><b>TARJETA DE PACIENTE</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</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" width="100%" align="center">
|
||||
<%
|
||||
if (aviso!=null){
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="center" class="menuOn"><%=aviso %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
if (mensaje!=null){
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="center" class="menuOn"><%=mensaje %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<form name="frmTroquelado" action="../../servlet/GestorPacientes?OPCION=<%=Constantes.OPC_PAC_PASO_TARJETA %>" method="post" autocomplete="off">
|
||||
<tr>
|
||||
<td align="right" class="txtnegrita">Introduzca los números de la tarjeta:</td>
|
||||
<td align="left"><input type="text" size="40" name="TROQUELADO_SIN_TARJETA" id="TROQUELADO_SIN_TARJETA" class="txt" value=""> <a href="javascript:validar_embosado()" class="enlace">Validar</a> <a href="javascript:borrarCampo()" class="enlace">Borrar</a></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td colspan="2" align="center"><a href="javascript:validar_embosado()" class="enlace">Validar</a></td>
|
||||
</tr>-->
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><img src="https://tarisan.imqnavarra.com/tarisan/img/tarjeta_embossado.jpg" width="400" height="130"/></td><
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align=left> <a href="gestor.jsp" class="enlace">Volver</a></td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%}
|
||||
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página para introducir el troquelado cuando falle el paso de la tarjeta (pac/troquelado.jsp)");
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,422 @@
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
<%@ 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墔ina de solicitud de volantes de ingreso (pac/volante_medico.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(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p墔ina de solicitud de volantes de ingreso (pac/volante_medico.jsp)");
|
||||
|
||||
// Definicion de variables
|
||||
boolean boolActosValidosCargados=false;
|
||||
int intImpresion = 0;
|
||||
String strFile = "Ingreso_" + ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
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鏮 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 impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
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>Solicitud Volante Ingreso</title>
|
||||
<link rel="shortcut icon" href="<%=request.getContextPath()%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath() %>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="<%=request.getContextPath()%>/js/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" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
|
||||
|
||||
function imprimir()
|
||||
{
|
||||
var error = false;
|
||||
//comprobamos que tenga menos de mil caracteres
|
||||
|
||||
//<input type="hidden" name="nom_paciente" value="josejavier"/>
|
||||
//<input type="hidden" name="fec_paciente" value="1/1/1979"/>
|
||||
//<input type="hidden" name="dir_paciente" value="calle primicia, 18"/>
|
||||
//<input type="hidden" name="nif_paciente" value="16595597q"/>
|
||||
//<input type="hidden" name="OPCION" value="< %=Constantes.OPC_PAC_VOLANTE_INGRESO %>"/>
|
||||
//<input type="hidden" name="justificacionPrescripcion" value='< %=strJustificacionPrescripcion%>'/>
|
||||
//<input type="hidden" name="acto_medico" value="1"/>
|
||||
//<input type="hidden" name="motivo_ingreso" value="1"/>
|
||||
//<input type="hidden" name="diagnostico" value="juicio diagn鏀tico"/>
|
||||
if(document.frmPrescripcion.nombre.value.length<3 && !error)
|
||||
{
|
||||
//alert("El nombre del paciente debe tener mas de 3 letras");
|
||||
document.frmPrescripcion.nombre.focus();
|
||||
error = true;
|
||||
modal({type:'error',title:',tenci鏮!',text:'El nombre del paciente debe tener mas de 3 letras.',});
|
||||
}
|
||||
else if(document.frmPrescripcion.fecha.value.length<4 && !error)
|
||||
{
|
||||
//alert("Verifique la fecha.")
|
||||
document.frmPrescripcion.fecha.focus();
|
||||
error = true;
|
||||
modal({type:'error',title:',tenci鏮!',text:'Verifique la fecha.',});
|
||||
}
|
||||
else if(document.frmPrescripcion.direccion.value.length<10 && !error)
|
||||
{
|
||||
//alert("El domicilio debe tener al menos 10 caracteres");
|
||||
document.frmPrescripcion.direccion.focus();
|
||||
error = true;
|
||||
modal({type:'error',title:',tenci鏮!',text:'El domicilio debe tener al menos 10 caracteres.',});
|
||||
}
|
||||
else if(document.frmPrescripcion.dni.value.length<5 && !error)
|
||||
{
|
||||
//alert("Verifique el dni");
|
||||
document.frmPrescripcion.dni.focus();
|
||||
error = true;
|
||||
modal({type:'error',title:',tenci鏮!',text:'Verifique el dni.',});
|
||||
}
|
||||
else if(document.frmPrescripcion.acto.value == 0 && !error)
|
||||
{
|
||||
//alert("Seleccione un acto medico");
|
||||
error = true;
|
||||
modal({type:'error',title:',tenci鏮!',text:'Seleccione un acto medico.',});
|
||||
}
|
||||
else if(document.frmPrescripcion.motivo.value == 0 && !error)
|
||||
{
|
||||
//alert("Seleccione un motivo de ingreso");
|
||||
error = true;
|
||||
modal({type:'error',title:',tenci鏮!',text:'Seleccione un motivo de ingreso.',});
|
||||
}
|
||||
else if(document.frmPrescripcion.juicio.value.length < 10 && !error)
|
||||
{
|
||||
//alert("El juicio debe tener mas de 10 caracteres");
|
||||
document.frmPrescripcion.juicio.focus();
|
||||
error = true;
|
||||
modal({type:'error',title:',tenci鏮!',text:'El juicio debe tener mas de 10 caracteres.',});
|
||||
}
|
||||
else if(document.frmPrescripcion.peticion.value.length < 10 && !error)
|
||||
{
|
||||
//alert("El motivo de la peticion debe tener mas de 10 caracteres");
|
||||
document.frmPrescripcion.peticion.focus();
|
||||
error = true;
|
||||
modal({type:'error',title:',tenci鏮!',text:'El motivo de la peticion debe tener mas de 10 caracteres.',});
|
||||
}
|
||||
|
||||
if (document.frmPrescripcion.diagnostico.value.length > 1000)
|
||||
document.frmPrescripcion.diagnostico.value=document.frmPrescripcion.diagnostico.value.substring(0,1000);
|
||||
//enviamos el formulario
|
||||
if(!error)
|
||||
{
|
||||
document.frmPrescripcion.nom_paciente.value = document.frmPrescripcion.nombre.value;
|
||||
document.frmPrescripcion.fec_paciente.value = document.frmPrescripcion.fecha.value;
|
||||
document.frmPrescripcion.dir_paciente.value = document.frmPrescripcion.direccion.value;
|
||||
document.frmPrescripcion.nif_paciente.value = document.frmPrescripcion.dni.value;
|
||||
document.frmPrescripcion.acto_medico.value = document.frmPrescripcion.acto.value;
|
||||
document.frmPrescripcion.motivo_ingreso.value = document.frmPrescripcion.motivo.value;
|
||||
document.frmPrescripcion.diagnostico.value = document.frmPrescripcion.juicio.value;
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) {//se efectua la impresion
|
||||
var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strFile%>.pdf',"<%=strFile%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- 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>
|
||||
<!--<tr>
|
||||
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></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="<%=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墔ina (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></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<%
|
||||
try{
|
||||
PersistenciaPaciente perPa = new PersistenciaPaciente();
|
||||
String direccion = perPa.obtenerDomicilio(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta(),intMedico);
|
||||
Calendar fecnac = perPa.obtenerFechaNacimiento(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta(),intMedico);
|
||||
String fecha_nacimiento = fecnac.get(Calendar.DAY_OF_MONTH) + "/" + (fecnac.get(Calendar.MONTH)+1) + "/" + fecnac.get(Calendar.YEAR);
|
||||
String nif = perPa.obtenerNIF(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta(),intMedico);
|
||||
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||
Vector vSeleccion = per.obtenerTodosActosPorEspecialidad(0, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad());
|
||||
Ttactmed taact = new Ttactmed();
|
||||
Vector vSeleccion2 = per.obtenerMotivosIngreso();
|
||||
%>
|
||||
<table>
|
||||
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&imp=1" method="post">
|
||||
<tr><td><label for="nombre" class="txt">Nombre del Paciente: </label><input type="text" size="50" class="txt" disabled="disabled" name="nombre" value="<%= ((Paciente)sesion.getAttribute("PACIENTE")).getNombre().substring(16) %>"/></td><td>
|
||||
<input type="hidden" name="nom_paciente" value=""/></td></tr>
|
||||
<tr><td><label for="nombre" class="txt">Fecha Nacimiento: </label><input type="text" disabled="disabled" class="txt" name="fecha" value="<%=fecha_nacimiento%>"/></td><td>
|
||||
<input type="hidden" name="fec_paciente" value=""/></td></tr>
|
||||
<tr><td><label for="nombre" class="txt">Domicilio: </label><input type="text" size="70" class="txt" disabled="disabled" name="direccion" value="<%= direccion%>"/></td><td>
|
||||
<input type="hidden" name="dir_paciente" value=""/></td></tr>
|
||||
<tr><td><label for="nombre" class="txt">NIF: </label><input type="text" class="txt" disabled="disabled" name="dni" value="<%= nif%>"/></td><td>
|
||||
<input type="hidden" name="nif_paciente" value=""/></td></tr>
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VOLANTE_INGRESO %>"/>
|
||||
<tr><td><label class="txt">Póliza: </label><label class="txt"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() +" - "+((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza()+" - "+((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario() %></label></td><td></td></tr>
|
||||
<tr><td><label class="txt">Facultativo: </label><label class="txt"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab() %></label></td><td></td></tr>
|
||||
<tr><td><label class="txt">Seleccione un acto médico / quirúrgico: </label>
|
||||
<input type="hidden" name="acto_medico" value=""/><select name="acto" class="txt">
|
||||
<%
|
||||
if (vSeleccion.size() > 0) {
|
||||
%>
|
||||
<option value="">Seleccione...</option>
|
||||
<%
|
||||
}
|
||||
else{
|
||||
%>
|
||||
<option value="">No se encuentran actos</option>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%
|
||||
for(int j = 0; j < vSeleccion.size(); j++)
|
||||
{
|
||||
taact = (Ttactmed)vSeleccion.elementAt(j);
|
||||
%>
|
||||
<option value="<%=taact.getActo() %>"><%=taact.getDescripcion().trim() %></option>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</select></td><td>
|
||||
<input type="hidden" name="motivo_ingreso" value=""/><input type="hidden" name="motivo_peticion" value=""/></td></tr>
|
||||
<tr><td><label class="txt" for="peticion">Indique el motivo petición: </label><input type="text" size="100" class="txt" name="peticion" value=""/></td><td></td></tr>
|
||||
<tr><td><label class="txt" for="juicio">Indique el juicio diagnostico: </label><input type="text" size="100" class="txt" name="juicio" value=""/></td><td>
|
||||
<input type="hidden" name="autorizacion" value=""/><input type="hidden" name="diagnostico" value=""/></td></tr>
|
||||
<tr><td><label class="txt" for="motivo">Seleccione un motivo: </label>
|
||||
<select name="motivo" class="txt">
|
||||
<%
|
||||
if(vSeleccion2.size() > 0)
|
||||
{%>
|
||||
<option value="">Seleccione...</option><%
|
||||
}
|
||||
else
|
||||
{
|
||||
%><option value="">No se encuentran elementos</option><%
|
||||
}
|
||||
for(int j=0; j<vSeleccion2.size(); j++)
|
||||
{
|
||||
taact = (Ttactmed)vSeleccion2.elementAt(j);
|
||||
%><option value="<%=taact.getActo() %>"><%=taact.getDescripcion().trim() %></option><%
|
||||
}
|
||||
%>
|
||||
</select></td><td></td></tr>
|
||||
</form>
|
||||
</table>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
|
||||
response.sendRedirect(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鏮 de la p墔ina al usuario.");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p墔ina de solicitud de volantes de ingreso (pac/volante_medico.jsp)");
|
||||
}
|
||||
%>
|
||||
Reference in New Issue
Block a user