685 lines
27 KiB
Plaintext
685 lines
27 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.StringTokenizer" %>
|
|
|
|
<%
|
|
// LogTarisan.logger.log(NivelLog.INFO, "Inicio página de gestor de perfiles (med/gestor_perfiles.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 gestor de perfiles (med/gestor_perfiles.jsp)");
|
|
|
|
try
|
|
{
|
|
|
|
// Definicion de variables
|
|
String strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
|
String strParametroMenu="";
|
|
String strCampoNombre="";
|
|
StringBuffer strSql = new StringBuffer();
|
|
int intPagina=0;
|
|
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"));
|
|
|
|
|
|
Tamensaje tamensaje = new Tamensaje();
|
|
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
|
tamensaje = pertamensaje.obtenerMensaje(5);
|
|
|
|
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
|
|
|
PersistenciaTamedico perTamedico = new PersistenciaTamedico();
|
|
Tamedico tamedico = new Tamedico();
|
|
int maxDeterminaciones = 25;
|
|
maxDeterminaciones = perTamedico.obtenerNumeroDeterminaciones(intMedico);
|
|
|
|
int especialidad = ((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/>", " ");
|
|
}
|
|
}
|
|
%>
|
|
|
|
|
|
|
|
<html>
|
|
<head>
|
|
<title>Gestión Perfiles</title>
|
|
<link rel="shortcut icon" href="../../img/logo.ico" />
|
|
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
|
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
|
|
|
|
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
|
<script language="JavaScript" src="../../js/funciones.js"></script>
|
|
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
|
<script language="JavaScript" src="../../js/menu_med.js"></script>
|
|
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
|
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
|
|
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
|
</head>
|
|
<script language="javascript" type="text/javascript">
|
|
<!--
|
|
var vElementosPerfil = new Array();
|
|
|
|
function pasar() {
|
|
obj=document.getElementById('sel1');
|
|
if (obj.selectedIndex==-1) return;
|
|
for (i=0; opt=obj.options[i]; i++)
|
|
if (opt.selected) {
|
|
valor=opt.value; // almacenar value
|
|
txt=obj.options[i].text; // almacenar el texto
|
|
obj.options[i]=null; // borrar el item si está seleccionado
|
|
obj2=document.getElementById('sel2');
|
|
if (obj2.options[0].value=='-') // si solo está la opción inicial borrarla
|
|
obj2.options[0]=null;
|
|
opc = new Option(txt,valor);
|
|
eval(obj2.options[obj2.options.length]=opc);
|
|
}
|
|
if(obj.options.length==0)
|
|
{
|
|
opc=new Option('-','-');
|
|
obj.options[0]=opc;
|
|
}
|
|
}
|
|
|
|
function borrar_perfil(valor)
|
|
{
|
|
obj=document.getElementById(valor);
|
|
//var answer = confirm ("Are you having fun?")
|
|
/*if(confirm('Seguro que deseas borrar el perfil??'))
|
|
{
|
|
obj.submit();
|
|
}*/
|
|
modal({
|
|
type : 'confirm',
|
|
title : '¡Atención!',
|
|
text : '¿Seguro que deseas borrar el perfil?',
|
|
callback: function(result){
|
|
if (result){
|
|
obj.submit();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function quitar() {
|
|
obj=document.getElementById('sel2');
|
|
if (obj.selectedIndex==-1) return;
|
|
for (i=0; opt=obj.options[i]; i++)
|
|
if (opt.selected) {
|
|
obj2=document.getElementById('sel1');
|
|
if (obj2.options.length >= <%= maxDeterminaciones%>){
|
|
//alert("No puedes crear perfiles de mas de " + <%= maxDeterminaciones %> + " actos");
|
|
modal({type:'error',title:'¡Atención!',text:'No puedes crear perfiles de mas de ' + <%= maxDeterminaciones %> + ' actos.',});
|
|
}else{
|
|
valor=opt.value; // almacenar value
|
|
txt=obj.options[i].text; // almacenar el texto
|
|
obj.options[i]=null; // borrar el item si está seleccionado
|
|
obj2=document.getElementById('sel1');
|
|
if (obj2.options[0].value=='-') // si solo está la opción inicial borrarla
|
|
obj2.options[0]=null;
|
|
opc = new Option(txt,valor);
|
|
eval(obj2.options[obj2.options.length]=opc);
|
|
}
|
|
}
|
|
|
|
if(obj.options.length==0)
|
|
{
|
|
opc=new Option('-','-');
|
|
obj.options[0]=opc;
|
|
}
|
|
}
|
|
|
|
function enviar()
|
|
{
|
|
obj=document.getElementById('sel1');
|
|
if(obj.options.length==1 && obj.options[0].value=='-')
|
|
{
|
|
//alert("No hay analiticas en el perfil, añade alguna");
|
|
modal({type:'error',title:'¡Atención!',text:'No hay analiticas en el perfil, añade alguna.',});
|
|
}
|
|
else if (document.frmModifyPerfil.descripcion.value.length < 3)
|
|
{
|
|
//alert("El nombre del perfil tiene que tener más de 3 letras");
|
|
modal({type:'error',title:'¡Atención!',text:'El nombre del perfil tiene que tener más de 3 letras.',});
|
|
}
|
|
else
|
|
{
|
|
txt="";
|
|
for(i=0; opt=obj.options[i]; i++)
|
|
{
|
|
txt=obj.options[i].value+", "+txt;
|
|
}
|
|
document.frmModifyPerfil.valores.value=txt;
|
|
document.frmModifyPerfil.submit();
|
|
}
|
|
}
|
|
|
|
function enviar_buscador(){
|
|
var vElementos = "";
|
|
var vCodigos = "";
|
|
obj=document.getElementById('sel1');
|
|
for (i=0; opt=obj.options[i]; i++)
|
|
{
|
|
vElementos = vElementos + obj.options[i].text + "¬";
|
|
vCodigos = vCodigos + obj.options[i].value + "¬";
|
|
}
|
|
vElementos = vElementos.substring(0,(vElementos.length) - 1);
|
|
vCodigos = vCodigos.substring(0,(vCodigos.length) - 1);
|
|
if(vElementos.length<=1)
|
|
{
|
|
opc=new Option('-','-');
|
|
obj.options[0]=opc;
|
|
document.frmBuscador.submit();
|
|
}else{
|
|
//vElementos = vElementos.substring(0,vElementos.lenght - 1);
|
|
//document.frmBuscador.vDeter_buscador.value = vElementos;
|
|
document.getElementById("vDeter_buscador").value= vElementos;
|
|
document.getElementById("vCod_buscador").value= vCodigos;
|
|
//document.getElementById("frmBuscador").submit();
|
|
document.frmBuscador.submit();
|
|
}
|
|
|
|
}
|
|
|
|
function enviar_frmNuevoPerfil()
|
|
{
|
|
document.frmNuevoPerfil.submit();
|
|
//document.frmModifyPerfil.submit();
|
|
}
|
|
|
|
function enviar_frmDetallesPerfil(valor)
|
|
{
|
|
obj=document.getElementById(valor);
|
|
obj.submit();
|
|
//document.frmDetallesPerfil+valor.submit();
|
|
}
|
|
|
|
function paginacion(pagina)
|
|
{
|
|
document.frmPaginacion.pagina.value=pagina;
|
|
document.frmPaginacion.submit();
|
|
}
|
|
|
|
function anularTeclaIntro(e){
|
|
if (e.keyCode == 13) { //controlo que se ha pulsado la tecla "intro"
|
|
return false;
|
|
}
|
|
}
|
|
|
|
//-->
|
|
</script>
|
|
</head>
|
|
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
|
|
<div class="marco">
|
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
|
<tr>
|
|
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
|
<td>
|
|
<table width="100%">
|
|
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
|
<tr>
|
|
<td>
|
|
<div id="contenedorNoticia">
|
|
<br>
|
|
<div class="tituloNoticia">
|
|
<p class="marquee"><%=strNoticia %></p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<!-- Cabecera de Navegación superior //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
|
<tr>
|
|
<td><script language="JavaScript">bloques();</script></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<!-- Cuerpo de la página //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
|
<tr valign="top">
|
|
<!--<td width="180">//-->
|
|
<td width="5%">
|
|
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr valign="top">
|
|
<td colspan="2"><img src="<%=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="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
|
<td width="565">
|
|
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
|
<tr>
|
|
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
|
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
|
|
<td class="txt" valign="top">
|
|
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
|
|
<table border="0" align="center" width="95%">
|
|
|
|
<form name="frmPaginacion" action="gestor_perfiles.jsp?x=<%=strParametroMenu%>" method="post">
|
|
<input type="hidden" name="pagina" value="1" />
|
|
</form>
|
|
<!-- FORM PAGINACION!!!!!!!!!!! -->
|
|
|
|
<%
|
|
if(request.getParameter("detalles")==null && request.getParameter("nuevo") == null)
|
|
{
|
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Mostramos el listado de los perfiles que tiene definidos el médico.");
|
|
//mostramos el listado de los perfiles que tiene definidos el médico de la sesión.
|
|
// int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
|
PersistenciaTagruana per = new PersistenciaTagruana();
|
|
Vector vSeleccion = null;
|
|
try{
|
|
vSeleccion = per.obtenerGrupos(intPagina, intMedico);
|
|
}
|
|
catch(ExcepcionTarisan exT)
|
|
{
|
|
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan al obtener los grupos del medico");
|
|
}
|
|
int espe = 0;
|
|
|
|
boolean fondo=true;
|
|
if (vSeleccion.size()!=0)
|
|
{
|
|
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">Código Perfil</td>
|
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver</td>
|
|
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td>
|
|
</tr><%
|
|
|
|
Tagruana tag = new Tagruana();
|
|
for(int i = 0; i < vSeleccion.size(); i++)
|
|
{
|
|
if(fondo)
|
|
{
|
|
fondo = false;
|
|
%>
|
|
<tr class="filaA trResultados" style="height:20px">
|
|
<%
|
|
}
|
|
else
|
|
{
|
|
fondo = true;
|
|
%>
|
|
<tr class="filaB trResultados" style="height:20px">
|
|
<%
|
|
}
|
|
espe = ParametrosConfiguracion.analiticas;
|
|
tag = (Tagruana)vSeleccion.elementAt(i);
|
|
%><td class="txt" align="center" class="txt"><%=tag.getGrupo() %></td>
|
|
<td align="center" class="txt"><%=tag.getDescripcion()%></td>
|
|
<td align="center"><form id="frmDetallesPerfil<%=i %>" name="frmDetallesPerfil<%=i %>" action="gestor_perfiles.jsp?x=13" method="post" style="margin-bottom: 0px;"><input type="hidden" name="pagina" value="1"/><input type="hidden" name="detalles" value="<%=tag.getGrupo() %>"/><a href="javascript:enviar_frmDetallesPerfil('frmDetallesPerfil<%=i %>')" class="enlace"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></a></form></td>
|
|
<td align="center"><form id="frmEliminarPerfil<%=i %>" name="frmEliminarPerfil" action="verify_cambios_perfil.jsp?x=13" method="post" style="margin-bottom: 0px;"><input type="hidden" name="especialidad" value="<%=espe %>"/><input type="hidden" name="borrar" value="<%=tag.getGrupo() %>"/><a href="javascript:borrar_perfil('frmEliminarPerfil<%=i %>')" class="enlace">Eliminar Perfil</a></form></td>
|
|
|
|
</tr>
|
|
<%
|
|
}
|
|
|
|
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
|
<tr><td colspan="3"></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)
|
|
}
|
|
%><tr><td><form name="frmNuevoPerfil" action="gestor_perfiles.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="nuevo" value="<%=espe %>"/><a href="javascript:enviar_frmNuevoPerfil()" class="enlace">Añadir Perfil</a></form></td></tr><%
|
|
}
|
|
else if(request.getParameter("nuevo") == null && request.getParameter("borrar") == null)
|
|
{
|
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El médico ha pulsado en ver detalles.");
|
|
//El médico ha pulsado en ver detalles
|
|
PersistenciaTagruana per = new PersistenciaTagruana();
|
|
int grp = 0;
|
|
int med = 0;
|
|
grp = Integer.parseInt(request.getParameter("detalles"));
|
|
med = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
|
Vector vSeleccion = per.obtenerActosMedicos(grp, med);
|
|
String descripcion = "";
|
|
String nosacar ="";
|
|
Tagruana tag = new Tagruana();
|
|
tag = (Tagruana)vSeleccion.elementAt(0);
|
|
descripcion = tag.getDescripcion().trim();
|
|
%>
|
|
<tr>
|
|
<td>
|
|
<form name="frmModifyPerfil" action="verify_cambios_perfil.jsp?x=13" method="post">
|
|
<label for="descripcion" class="txtNegrita">Nombre del Perfil: </label><input type="text" name="descripcion" class="txt" value="<%=descripcion %>" />
|
|
<br/><br/>
|
|
<label for="sel1" class="txtNegrita">Contenido Actual del perfil:</label><br/>
|
|
<select id="sel1" name="sel1" size="5" class="txt">
|
|
<%
|
|
int grupo = 0;
|
|
int espe = 0;
|
|
|
|
if (request.getParameter("vDeter_buscador")!=null){
|
|
String strDeter = (String)request.getParameter("vDeter_buscador");
|
|
String strCod = (String)request.getParameter("vCod_buscador");
|
|
StringTokenizer st1 = new StringTokenizer(strDeter, "¬");
|
|
StringTokenizer st2 = new StringTokenizer(strCod, "¬");
|
|
while (st1.hasMoreTokens())
|
|
{
|
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Se procesan las determinaciones "+strDeter);
|
|
//obtenemos los valores especificos para cada determinacion
|
|
String token1 = st1.nextToken();
|
|
String token2 = st2.nextToken();
|
|
if(token1.length()>0)
|
|
{
|
|
String descripDeter = token1;
|
|
int codigoDeter = Integer.parseInt(token2);
|
|
%><option value="<%=codigoDeter %>"><%=descripDeter.trim() %></option><%
|
|
grupo = Integer.parseInt(request.getParameter("detalles"));
|
|
espe = ParametrosConfiguracion.analiticas;
|
|
nosacar = nosacar + ", " +codigoDeter;
|
|
}
|
|
}
|
|
|
|
}else{
|
|
for(int i = 0; i < vSeleccion.size(); i++)
|
|
{
|
|
tag = (Tagruana)vSeleccion.elementAt(i);
|
|
%><option value="<%=tag.getActo() %>"><%=tag.getDescripcionActo().trim() %></option><%
|
|
grupo = Integer.parseInt(request.getParameter("detalles"));
|
|
espe = ParametrosConfiguracion.analiticas;
|
|
|
|
nosacar = nosacar + ", " +tag.getActo();
|
|
}
|
|
}
|
|
%>
|
|
</select>
|
|
<%
|
|
if (nosacar.compareTo("")!=0){
|
|
nosacar = nosacar.substring(2);
|
|
}
|
|
String buscador = (request.getParameter("txt_buscar_deter") == null)?"%":"%"+request.getParameter("txt_buscar_deter")+"%";
|
|
//Vector vSeleccion2 = per.listar_actos_buscador_excluidos(nosacar, buscador);
|
|
PersistenciaTtactmed perTtactmed = new PersistenciaTtactmed();
|
|
Vector vSeleccion2 = perTtactmed.listar_actos_buscador_excluidos_por_especialidad(nosacar, buscador, especialidad);
|
|
%>
|
|
<br/><img src="<%=request.getContextPath()%>/img/arriba.png" onclick="quitar()"><img src="<%=request.getContextPath()%>/img/abajo.png" onclick="pasar()">
|
|
<br/>
|
|
<label for="sel2" class="txtNegrita">Pruebas disponibles:</label>
|
|
<br/>
|
|
<select id="sel2" size="15" class="txt">
|
|
<%Ttactmed ttactmed = null;
|
|
for(int i = 0; i < vSeleccion2.size(); i++)
|
|
{
|
|
ttactmed = (Ttactmed)vSeleccion2.elementAt(i);
|
|
%><option value="<%=ttactmed.getActo() %>"><%=ttactmed.getDescripcion().trim() %></option><%
|
|
}
|
|
%>
|
|
</select></p>
|
|
<input type="hidden" name="valores" />
|
|
<input type="hidden" name="grupo" value="<%=grupo %>" />
|
|
<input type="hidden" name="espe" value="<%=espe %>" />
|
|
|
|
</form>
|
|
|
|
<br/><br/>
|
|
<form name="frmBuscador" id="frmBuscador" action="gestor_perfiles.jsp?x=<%=strParametroMenu %>" method="post">
|
|
<input type="hidden" name="detalles" value="<%=grp %>"/>
|
|
<input type="hidden" name="vDeter_buscador" id="vDeter_buscador" value=""/>
|
|
<input type="hidden" name="vCod_buscador" id="vCod_buscador" value=""/>
|
|
<label for="txt_buscar_deter" class="txtNegrita">Buscar prueba:</label>
|
|
<input type="text" name="txt_buscar_deter" class="txt" value="<%=(request.getParameter("txt_buscar_deter") == null)?"":request.getParameter("txt_buscar_deter") %>" onkeypress="return anularTeclaIntro(event)"/>
|
|
<a href="javascript:enviar_buscador()" class="enlace">Buscar</a>
|
|
</form>
|
|
<br/><br/><br/>
|
|
<a class="enlace" href="javascript:enviar()">Guardar Cambios</a>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
|
|
}
|
|
else if (request.getParameter("borrar") != null)
|
|
{
|
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El médico ha pulsado en eliminar perfil.");
|
|
//el médico ha pulsado en eliminar perfil
|
|
%>
|
|
<tr><td>Borrar perfil: <%=request.getParameter("borrar") %></td></tr>
|
|
<%
|
|
|
|
}
|
|
else if (request.getParameter("nuevo") != null)
|
|
{
|
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El médico ha pulsado en crear nuevo perfil.");
|
|
//El médico ha pulsado en crear nuevo perfil
|
|
String nosacar ="";
|
|
String descripcion = "";
|
|
%>
|
|
<tr>
|
|
<td>
|
|
<form name="frmModifyPerfil" action="verify_cambios_perfil.jsp?x=13" method="post">
|
|
<label class="txtNegrita"><%=tamensaje.getMensaje() %></label>
|
|
<br/><br/><br/>
|
|
<label for="descripcion" class="txtNegrita">Nombre del Perfil:</label><input type="text" class="txt" name="descripcion" value="<%=descripcion %>" />
|
|
<br/><br/>
|
|
<label for="sel1" class="txtNegrita">Contenido Actual del perfil:</label><br/>
|
|
<select id="sel1" name="sel1" class="txt" size="5" class="txt">
|
|
<%
|
|
if (request.getParameter("vDeter_buscador")!=null){
|
|
String strDeter = (String)request.getParameter("vDeter_buscador");
|
|
String strCod = (String)request.getParameter("vCod_buscador");
|
|
StringTokenizer st1 = new StringTokenizer(strDeter, "¬");
|
|
StringTokenizer st2 = new StringTokenizer(strCod, "¬");
|
|
while (st1.hasMoreTokens())
|
|
{
|
|
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Se procesan las determinaciones "+strDeter);
|
|
//obtenemos los valores especificos para cada determinacion
|
|
String token1 = st1.nextToken();
|
|
String token2 = st2.nextToken();
|
|
if(token1.length()>0)
|
|
{
|
|
String descripDeter = token1;
|
|
int codigoDeter = Integer.parseInt(token2);
|
|
%><option value="<%=codigoDeter %>"><%=descripDeter.trim() %></option><%
|
|
nosacar = nosacar + ", " +codigoDeter;
|
|
}
|
|
}
|
|
if (strDeter == ""){
|
|
%><option value="-">-</option><%
|
|
}
|
|
|
|
}else{
|
|
%><option value="-">-</option><%
|
|
}
|
|
%>
|
|
</select>
|
|
|
|
<%
|
|
PersistenciaTagruana perTaGru = new PersistenciaTagruana();
|
|
int max = 0;
|
|
max = perTaGru.getMaxGrupo();
|
|
if (nosacar.compareTo("")!=0){
|
|
nosacar = nosacar.substring(2);
|
|
}
|
|
String buscador = (request.getParameter("txt_buscar_deter") == null)?"%":"%"+request.getParameter("txt_buscar_deter")+"%";
|
|
//int especialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
|
|
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
|
//Vector vSeleccion = per.obtenerAnalisisNivelesVisiblesPorEspecialidad(especialidad, buscador);
|
|
Vector vSeleccion = per.listar_actos_buscador_excluidos_por_especialidad(nosacar, buscador, especialidad);
|
|
int grupo = max;
|
|
int espe = 0;
|
|
|
|
%>
|
|
<br/><img src="<%=request.getContextPath()%>/img/arriba.png" onclick="quitar()"><img src="<%=request.getContextPath()%>/img/abajo.png" onclick="pasar()">
|
|
<br/>
|
|
<label for="sel2" class="txtNegrita">Pruebas disponibles:</label><br/>
|
|
<select id="sel2" size="15" class="txt">
|
|
<%
|
|
if (vSeleccion.size()!=0){
|
|
Ttactmed ttactmed = null;
|
|
for(int i = 0; i < vSeleccion.size(); i++)
|
|
{
|
|
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
|
|
%><option value="<%=ttactmed.getActo() %>"><%=ttactmed.getDescripcion().trim() %></option><%
|
|
espe = ttactmed.getEspecialidad();
|
|
}
|
|
}
|
|
%>
|
|
</select></p>
|
|
<input type="hidden" name="valores" />
|
|
<input type="hidden" name="grupo" value="<%=grupo %>" />
|
|
<input type="hidden" name="espe" value="<%=espe %>" />
|
|
</form>
|
|
|
|
<br/><br/>
|
|
<form name="frmBuscador" id="frmBuscador" action="gestor_perfiles.jsp?x=<%=strParametroMenu %>" method="post">
|
|
<input type="hidden" name="nuevo" value="5"/>
|
|
<input type="hidden" name="vDeter_buscador" id="vDeter_buscador" value=""/>
|
|
<input type="hidden" name="vCod_buscador" id="vCod_buscador" value=""/>
|
|
<label for="txt_buscar_deter" class="txtNegrita">Buscar prueba:</label>
|
|
<input type="text" name="txt_buscar_deter" class="txt" value="<%=(request.getParameter("txt_buscar_deter") == null)?"":request.getParameter("txt_buscar_deter") %>" onkeypress="return anularTeclaIntro(event)"/>
|
|
<a href="javascript:enviar_buscador()" class="enlace">Buscar</a>
|
|
</form>
|
|
<br/><br/><br/>
|
|
<a class="enlace" href="javascript:enviar()">Guardar Cambios</a>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<%
|
|
// quitar el espacio detras del % y subirlo aquí encima del <% para añadir el formulario de búsqueda.
|
|
// <form name="frmNuevoPerfil" action="gestor_perfiles.jsp?x=<%=strParametroMenu % >" method="post"><input type="hidden" name="nuevo" value="<%=espe % >"/><label for="txt_buscar_deter" class="txt">Buscar entre las pruebas disponibles:</label><input type="text" name="txt_buscar_deter" class="txt" value="<%=(request.getParameter("txt_buscar_deter") == null)?"":request.getParameter("txt_buscar_deter") % >"/><a href="javascript:enviar_frmNuevoPerfil()" class="enlace">Buscar</a></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>
|
|
<%
|
|
}
|
|
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");
|
|
}
|
|
catch(ExcepcionTarisan exT)
|
|
{
|
|
|
|
}
|
|
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestion de perfiles (med/gestor_perfiles.jsp)");
|
|
}
|
|
%>
|