añado jsp
This commit is contained in:
@@ -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