219 lines
6.8 KiB
Plaintext
219 lines
6.8 KiB
Plaintext
<%@ page import="com.tarisan.control.*" %>
|
|
<%@ page import="com.tarisan.data.*" %>
|
|
<%@ page import="com.tarisan.excepcion.*" %>
|
|
<%@ page import="com.tarisan.log.*" %>
|
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
|
<%@ page import="java.sql.*" %>
|
|
<%@ page import="java.util.Vector" %>
|
|
<%@ page import="java.util.Calendar" %>
|
|
|
|
<%
|
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de franquicias dentales (pac/franquicias_dentales.jsp)");
|
|
|
|
response.setHeader("Expires", "0");
|
|
response.setHeader("Pragma", "no-cache");
|
|
response.setHeader("Cache-Control", "no-cache");
|
|
HttpSession sesion = request.getSession(true);
|
|
|
|
String mensaje = null;
|
|
mensaje = (String)sesion.getAttribute("ERROR");
|
|
sesion.setAttribute("ERROR", "");
|
|
|
|
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
|
{
|
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
|
response.sendRedirect("../../html/login.html");
|
|
}
|
|
else
|
|
{
|
|
|
|
//Obtención del perfil del usuario conectado
|
|
StringBuffer perfil = new StringBuffer();
|
|
perfil.append("|");
|
|
perfil.append(sesion.getAttribute("PERFIL"));
|
|
perfil.append("|");
|
|
|
|
Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
|
|
//String noticia = Utilidades.leerNoticias("/root/apache-tomcat-6.0.20/webapps/tarisan/noticias.txt");
|
|
%>
|
|
|
|
<html>
|
|
<head>
|
|
<title>Módulo de Franquicias dentales</title>
|
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
|
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
|
<script language="JavaScript" src="../../js/menu_pac.js"></script>
|
|
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
|
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
|
|
</head>
|
|
|
|
<script language="javascript">
|
|
<!--
|
|
//-->
|
|
</script>
|
|
|
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="noticia_importante();">
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
|
|
<style type="text/css">
|
|
.mensajes {
|
|
width:150px;
|
|
height:150px;
|
|
background:#FFFF00;
|
|
color:#C02331;
|
|
padding:1px;
|
|
margin:10px;
|
|
float:center;
|
|
text-align:center;
|
|
font-family:Verdana, Arial;
|
|
font-size: 12;
|
|
font-weight: bold;
|
|
display:none;
|
|
}
|
|
</style>
|
|
<!-- Logotipo de IMQ de Navarra //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
|
<tr valign="bottom">
|
|
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<!-- Datos del usuario conectado //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
|
<tr>
|
|
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<!-- Cabecera de Navegación superior //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
|
<tr>
|
|
<td><script language="JavaScript">bloques();</script></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<!-- Cuerpo de la página //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" align="center">
|
|
<tr valign="top">
|
|
<td width="180">
|
|
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr valign="top">
|
|
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
<table cellpadding="0" cellspacing="0" border="0" width="165">
|
|
<tr valign="top">
|
|
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
|
|
<td width="150" class="menuOn"><b>FRANQUICIAS DENTALES</b></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>
|
|
<td width="565">
|
|
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
|
<tr>
|
|
<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>
|
|
<td class="txt" valign="top">
|
|
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
|
<br/>
|
|
<table border="0" width="100%" align="center">
|
|
<tr>
|
|
<td class="txtnegrita" align="center">El paciente tiene la siguiente franquicia dental: </td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
</tr>
|
|
<%
|
|
PersistenciaTTFranquiciasDentales per = new PersistenciaTTFranquiciasDentales();
|
|
|
|
long longColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
|
int intEntidadnew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadIMQ();
|
|
int intEspecialidadnew = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
|
int intContrato = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato();
|
|
|
|
Calendar cal = Calendar.getInstance() ;
|
|
Integer anio = cal.get(Calendar.YEAR);
|
|
int franquicia = 0;
|
|
franquicia = per.obtenerNumeroFranquicia(intEspecialidadnew, intEntidadnew, longColectivonew,anio);
|
|
|
|
|
|
|
|
if (franquicia==0) //No se han encontrado datos al buscar una franquicia por entidad
|
|
{
|
|
int franquiciaPorContrato = 0;
|
|
franquiciaPorContrato = per.obtenerNumeroFranquiciaPorContrato(intContrato);
|
|
|
|
if (franquiciaPorContrato==0) //No se han encontrado datos al buscar una franquicia por contrato
|
|
{
|
|
%>
|
|
<tr>
|
|
<td colspan="4"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4" align="center"><span class="txt">No tiene franquicias asociadas</span></td>
|
|
</tr>
|
|
<%
|
|
}
|
|
else
|
|
{
|
|
%>
|
|
<tr>
|
|
<td colspan="4"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4" align="center" class="txt"><span class="txtNegrita"><a href=<%=request.getContextPath()+"/pdfdental/franquicia_"+ franquiciaPorContrato +".pdf"%> target="blank">Franquicia</a></span></td>
|
|
</tr>
|
|
<%
|
|
}
|
|
}
|
|
else
|
|
{
|
|
%>
|
|
<tr>
|
|
<td colspan="4"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4" align="center" class="txt"><span class="txtNegrita"><a href=<%=request.getContextPath()+"/pdfdental/franquicia_"+ franquicia +".pdf"%> target="blank">Franquicia</a></span></td>
|
|
</tr>
|
|
<%
|
|
}
|
|
%>
|
|
<tr>
|
|
<td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right"><a href="../pac/gestor.jsp" class="enlace">Volver</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|
|
<%
|
|
}
|
|
LogTarisan.logger.log(NivelLog.INFO, "Final página de franquicias dentales (pac/franquicias_dentales.jsp)");
|
|
%>
|