From e1227c3b2ab3182f77a89e15202be94b8dd29c74 Mon Sep 17 00:00:00 2001 From: "m4gn3to@gmail.com" Date: Mon, 9 Jun 2025 13:55:08 +0200 Subject: [PATCH] =?UTF-8?q?a=C3=B1ado=20jsp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jsp/Basura/med/Copia de detallePacientes.jsp | 328 ++++ jsp/Basura/med/analisis_15122005.jsp | 272 ++++ jsp/Basura/med/detallePacientes_15122005.jsp | 345 ++++ jsp/Basura/med/detalle_analista.jsp | 200 +++ jsp/Basura/med/liquidacion_15122005.jsp | 284 ++++ jsp/Basura/med/pdf_liquidacion.jsp | 18 + jsp/Basura/pac/Copia de especialidades.jsp | 783 +++++++++ jsp/Basura/pac/estomatologia.jsp | 745 +++++++++ jsp/Basura/pac/facturacion_estoma.jsp | 806 ++++++++++ jsp/Basura/pac/franquicias_dentales.jsp | 218 +++ jsp/Basura/pac/gestor_NEW.jsp | 156 ++ jsp/Basura/pac/solicitudAnalitica.jsp | 990 ++++++++++++ jsp/Basura/pac/solicitudDiagnostico.jsp | 720 +++++++++ jsp/adm/descarga_pdfs_autorizaciones.jsp | 608 +++++++ jsp/adm/detalle_usuario.jsp | 309 ++++ jsp/adm/img/sp.gif | Bin 0 -> 86 bytes jsp/adm/img/sp_imp.gif | Bin 0 -> 43 bytes jsp/adm/img/transparent.gif | Bin 0 -> 43 bytes jsp/adm/lista_usuarios.jsp | 330 ++++ jsp/adm/movimientos_tamovext.jsp | 235 +++ jsp/adm/mto_actos.jsp | 411 +++++ jsp/adm/mto_analiticas.jsp | 176 ++ jsp/adm/mto_niveles.jsp | 383 +++++ jsp/adm/mto_peticiones.jsp | 465 ++++++ jsp/adm/mto_taconaut.jsp | 404 +++++ jsp/adm/mto_tamovext.jsp | 453 ++++++ jsp/adm/otras_autorizaciones.jsp | 233 +++ jsp/adm/poner_en_produccion.jsp | 236 +++ jsp/adm/simulado.jsp | 131 ++ jsp/cambio_clave.jsp | 178 +++ jsp/entorno_grafico.jsp | 193 +++ jsp/error.jsp | 247 +++ jsp/errorIguala.jsp | 223 +++ jsp/hora.jsp | 51 + jsp/imp/impAutorizacion.jsp | 174 ++ jsp/imp/impDetallePacientes.jsp | 140 ++ jsp/imp/impDiagnostico.jsp | 164 ++ jsp/imp/impEspecialidades.jsp | 164 ++ jsp/imp/impFacturacion.jsp | 131 ++ jsp/imp/impRecetas.jsp | 156 ++ jsp/listado_session.jsp | 154 ++ jsp/med/actos.jsp | 343 ++++ jsp/med/analisis.jsp | 604 +++++++ jsp/med/ap.jsp | 509 ++++++ jsp/med/buscar_paciente.jsp | 396 +++++ jsp/med/cabecera.jsp | 426 +++++ jsp/med/detalleIRPF.jsp | 363 +++++ jsp/med/detallePacientes.jsp | 656 ++++++++ jsp/med/detalle_historico_liquidacion.jsp | 229 +++ jsp/med/detalle_liquidacion_analista.jsp | 317 ++++ jsp/med/detalle_liquidacion_radiologo.jsp | 317 ++++ jsp/med/determinaciones.jsp | 344 ++++ jsp/med/gestor.jsp | 164 ++ jsp/med/gestor_perfiles.jsp | 684 ++++++++ jsp/med/historico_ats.jsp | 351 ++++ jsp/med/historico_liquidacion.jsp | 768 +++++++++ jsp/med/historico_volantes.jsp | 315 ++++ jsp/med/igualados.jsp | 336 ++++ jsp/med/img/sp.gif | Bin 0 -> 86 bytes jsp/med/img/sp_imp.gif | Bin 0 -> 43 bytes jsp/med/img/transparent.gif | Bin 0 -> 43 bytes jsp/med/incidencia.jsp | 442 ++++++ jsp/med/introducir_paciente.jsp | 597 +++++++ jsp/med/liquidacion.jsp | 317 ++++ jsp/med/liquidacion_analista.jsp | 303 ++++ jsp/med/liquidacion_radiologo.jsp | 303 ++++ jsp/med/medicamentos.jsp | 335 ++++ jsp/med/noticias.jsp | 487 ++++++ jsp/med/password.jsp | 280 ++++ jsp/med/peticiones_capturadas.jsp | 435 +++++ jsp/med/preaviso.jsp | 203 +++ jsp/med/prescripciones.jsp | 350 ++++ jsp/med/verify_cambios_perfil.jsp | 220 +++ jsp/nuevo_ver_pdf.jsp | 64 + jsp/otras_propiedades.jsp | 80 + jsp/pac/analista.jsp | 551 +++++++ jsp/pac/analitica.jsp | 901 +++++++++++ jsp/pac/anatomia.jsp | 702 ++++++++ jsp/pac/anatomia_old.jsp | 660 ++++++++ jsp/pac/ats.jsp | 441 ++++++ jsp/pac/autorizacion.jsp | 1044 ++++++++++++ jsp/pac/autorizaciones.jsp | 512 ++++++ jsp/pac/detallePacientes.jsp | 323 ++++ jsp/pac/diagnostico.jsp | 628 ++++++++ jsp/pac/especialidades.jsp | 885 +++++++++++ jsp/pac/facturacion.jsp | 916 +++++++++++ jsp/pac/facturacion_chipcard.jsp | 885 +++++++++++ jsp/pac/facturacion_iguala.jsp | 599 +++++++ jsp/pac/facturacion_odon.jsp | 1082 +++++++++++++ jsp/pac/facturacion_rehabpod.jsp | 1071 +++++++++++++ jsp/pac/firma_autorizacion.jsp | 216 +++ jsp/pac/gestor.jsp | 457 ++++++ jsp/pac/gestor_chipcard.jsp | 198 +++ jsp/pac/historia.jsp | 407 +++++ jsp/pac/img/sp.gif | Bin 0 -> 86 bytes jsp/pac/img/sp_imp.gif | Bin 0 -> 43 bytes jsp/pac/img/transparent.gif | Bin 0 -> 43 bytes jsp/pac/justificacionAnalitica.jsp | 250 +++ jsp/pac/justificacionDiagnostico.jsp | 230 +++ jsp/pac/peticiones.jsp | 586 +++++++ jsp/pac/prescripcion_ats.jsp | 1056 ++++++++++++ jsp/pac/radiologo.jsp | 541 +++++++ jsp/pac/recetas.jsp | 786 +++++++++ jsp/pac/solicitudAnaliticaNiveles.jsp | 1497 ++++++++++++++++++ jsp/pac/solicitudAnatomiaNiveles.jsp | 1100 +++++++++++++ jsp/pac/solicitudDiagnosticoNiveles.jsp | 965 +++++++++++ jsp/pac/troquelado.jsp | 270 ++++ jsp/pac/volante_medico.jsp | 422 +++++ jsp/plantilla_limpia.jsp | 160 ++ jsp/propiedades_sistema.jsp | 81 + jsp/propiedades_tarisan.jsp | 62 + jsp/resultado_analitica.jsp | 197 +++ jsp/test_itext.jsp | 108 ++ jsp/test_log.jsp | 51 + jsp/test_persistencia.jsp | 172 ++ jsp/ventana_intralab.jsp | 46 + jsp/ver_pdf.jsp | 58 + jsp/ver_peticiones_pdf.jsp | 58 + 118 files changed, 44926 insertions(+) create mode 100644 jsp/Basura/med/Copia de detallePacientes.jsp create mode 100644 jsp/Basura/med/analisis_15122005.jsp create mode 100644 jsp/Basura/med/detallePacientes_15122005.jsp create mode 100644 jsp/Basura/med/detalle_analista.jsp create mode 100644 jsp/Basura/med/liquidacion_15122005.jsp create mode 100644 jsp/Basura/med/pdf_liquidacion.jsp create mode 100644 jsp/Basura/pac/Copia de especialidades.jsp create mode 100644 jsp/Basura/pac/estomatologia.jsp create mode 100644 jsp/Basura/pac/facturacion_estoma.jsp create mode 100644 jsp/Basura/pac/franquicias_dentales.jsp create mode 100644 jsp/Basura/pac/gestor_NEW.jsp create mode 100644 jsp/Basura/pac/solicitudAnalitica.jsp create mode 100644 jsp/Basura/pac/solicitudDiagnostico.jsp create mode 100644 jsp/adm/descarga_pdfs_autorizaciones.jsp create mode 100644 jsp/adm/detalle_usuario.jsp create mode 100644 jsp/adm/img/sp.gif create mode 100644 jsp/adm/img/sp_imp.gif create mode 100644 jsp/adm/img/transparent.gif create mode 100644 jsp/adm/lista_usuarios.jsp create mode 100644 jsp/adm/movimientos_tamovext.jsp create mode 100644 jsp/adm/mto_actos.jsp create mode 100644 jsp/adm/mto_analiticas.jsp create mode 100644 jsp/adm/mto_niveles.jsp create mode 100644 jsp/adm/mto_peticiones.jsp create mode 100644 jsp/adm/mto_taconaut.jsp create mode 100644 jsp/adm/mto_tamovext.jsp create mode 100644 jsp/adm/otras_autorizaciones.jsp create mode 100644 jsp/adm/poner_en_produccion.jsp create mode 100644 jsp/adm/simulado.jsp create mode 100644 jsp/cambio_clave.jsp create mode 100644 jsp/entorno_grafico.jsp create mode 100644 jsp/error.jsp create mode 100644 jsp/errorIguala.jsp create mode 100644 jsp/hora.jsp create mode 100644 jsp/imp/impAutorizacion.jsp create mode 100644 jsp/imp/impDetallePacientes.jsp create mode 100644 jsp/imp/impDiagnostico.jsp create mode 100644 jsp/imp/impEspecialidades.jsp create mode 100644 jsp/imp/impFacturacion.jsp create mode 100644 jsp/imp/impRecetas.jsp create mode 100644 jsp/listado_session.jsp create mode 100644 jsp/med/actos.jsp create mode 100644 jsp/med/analisis.jsp create mode 100644 jsp/med/ap.jsp create mode 100644 jsp/med/buscar_paciente.jsp create mode 100644 jsp/med/cabecera.jsp create mode 100644 jsp/med/detalleIRPF.jsp create mode 100644 jsp/med/detallePacientes.jsp create mode 100644 jsp/med/detalle_historico_liquidacion.jsp create mode 100644 jsp/med/detalle_liquidacion_analista.jsp create mode 100644 jsp/med/detalle_liquidacion_radiologo.jsp create mode 100644 jsp/med/determinaciones.jsp create mode 100644 jsp/med/gestor.jsp create mode 100644 jsp/med/gestor_perfiles.jsp create mode 100644 jsp/med/historico_ats.jsp create mode 100644 jsp/med/historico_liquidacion.jsp create mode 100644 jsp/med/historico_volantes.jsp create mode 100644 jsp/med/igualados.jsp create mode 100644 jsp/med/img/sp.gif create mode 100644 jsp/med/img/sp_imp.gif create mode 100644 jsp/med/img/transparent.gif create mode 100644 jsp/med/incidencia.jsp create mode 100644 jsp/med/introducir_paciente.jsp create mode 100644 jsp/med/liquidacion.jsp create mode 100644 jsp/med/liquidacion_analista.jsp create mode 100644 jsp/med/liquidacion_radiologo.jsp create mode 100644 jsp/med/medicamentos.jsp create mode 100644 jsp/med/noticias.jsp create mode 100644 jsp/med/password.jsp create mode 100644 jsp/med/peticiones_capturadas.jsp create mode 100644 jsp/med/preaviso.jsp create mode 100644 jsp/med/prescripciones.jsp create mode 100644 jsp/med/verify_cambios_perfil.jsp create mode 100644 jsp/nuevo_ver_pdf.jsp create mode 100644 jsp/otras_propiedades.jsp create mode 100644 jsp/pac/analista.jsp create mode 100644 jsp/pac/analitica.jsp create mode 100644 jsp/pac/anatomia.jsp create mode 100644 jsp/pac/anatomia_old.jsp create mode 100644 jsp/pac/ats.jsp create mode 100644 jsp/pac/autorizacion.jsp create mode 100644 jsp/pac/autorizaciones.jsp create mode 100644 jsp/pac/detallePacientes.jsp create mode 100644 jsp/pac/diagnostico.jsp create mode 100644 jsp/pac/especialidades.jsp create mode 100644 jsp/pac/facturacion.jsp create mode 100644 jsp/pac/facturacion_chipcard.jsp create mode 100644 jsp/pac/facturacion_iguala.jsp create mode 100644 jsp/pac/facturacion_odon.jsp create mode 100644 jsp/pac/facturacion_rehabpod.jsp create mode 100644 jsp/pac/firma_autorizacion.jsp create mode 100644 jsp/pac/gestor.jsp create mode 100644 jsp/pac/gestor_chipcard.jsp create mode 100644 jsp/pac/historia.jsp create mode 100644 jsp/pac/img/sp.gif create mode 100644 jsp/pac/img/sp_imp.gif create mode 100644 jsp/pac/img/transparent.gif create mode 100644 jsp/pac/justificacionAnalitica.jsp create mode 100644 jsp/pac/justificacionDiagnostico.jsp create mode 100644 jsp/pac/peticiones.jsp create mode 100644 jsp/pac/prescripcion_ats.jsp create mode 100644 jsp/pac/radiologo.jsp create mode 100644 jsp/pac/recetas.jsp create mode 100644 jsp/pac/solicitudAnaliticaNiveles.jsp create mode 100644 jsp/pac/solicitudAnatomiaNiveles.jsp create mode 100644 jsp/pac/solicitudDiagnosticoNiveles.jsp create mode 100644 jsp/pac/troquelado.jsp create mode 100644 jsp/pac/volante_medico.jsp create mode 100644 jsp/plantilla_limpia.jsp create mode 100644 jsp/propiedades_sistema.jsp create mode 100644 jsp/propiedades_tarisan.jsp create mode 100644 jsp/resultado_analitica.jsp create mode 100644 jsp/test_itext.jsp create mode 100644 jsp/test_log.jsp create mode 100644 jsp/test_persistencia.jsp create mode 100644 jsp/ventana_intralab.jsp create mode 100644 jsp/ver_pdf.jsp create mode 100644 jsp/ver_peticiones_pdf.jsp diff --git a/jsp/Basura/med/Copia de detallePacientes.jsp b/jsp/Basura/med/Copia de detallePacientes.jsp new file mode 100644 index 0000000..856119b --- /dev/null +++ b/jsp/Basura/med/Copia de detallePacientes.jsp @@ -0,0 +1,328 @@ +<%@ 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" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de pacientes (med/detallePacientes.jsp)"); + + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + + if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null)) + { + LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada"); + response.sendRedirect("../../html/login.html"); + } + else + { + try + { + +// Definicion de variables +String strParametroMenu=""; +String strFecha = ""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas); +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 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")); +%> + + + +Pacientes + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + +
+ + + + + + + + + +
+
+ + + + + + +
+
+ + + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + + strSql.append("SELECT tamovext.fecha, tamovext.precio as precioActoMedico, ttactmed.descripcion as descripcionActoMedico, ttclient.nombre, ttclient.apellidos"); + strSql.append(" FROM tamovext, ttactmed, ttbenefi, ttclient"); + strSql.append(" WHERE tamovext.acto=ttactmed.acto"); + strSql.append(" and tamovext.especialidad=ttactmed.especialidad"); + strSql.append(" and tamovext.medico=?"); + strSql.append(" and tamovext.especialidad=?"); + strSql.append(" and tamovext.colectivo=ttbenefi.colectivo"); + strSql.append(" and tamovext.poliza=ttbenefi.poliza"); + strSql.append(" and tamovext.orden=ttbenefi.orden"); + strSql.append(" and ttbenefi.cliente=ttclient.cliente"); + strSql.append(" and ttbenefi.fecha_baja is null"); + strSql.append(" ORDER BY tamovext.fecha"); + + aCondiciones = new Object[2]; + aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + + PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient(); + Vector vSeleccion = per.seleccionar(strSql.toString(), intPagina, aCondiciones); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + 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); +%> + + + + + + +<% + } + + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
 
+ + + + + + + +
Fecha (dd-mm-aaaa):  Imprimir
+
 
 
No se ha encontrado ningún dato.
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
FechaNombreDescripciónPrecio
<%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%><%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%><%=vTamovextTaclient.getDescripcionActoMedico()%><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+
+
+ + + + +<% + } + catch(ExcepcionTarisan ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje()); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje()); + response.sendRedirect("../error.jsp"); + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex); + response.sendRedirect("../error.jsp"); + } + } + LogTarisan.logger.log(NivelLog.INFO, "Final página de pacientes (med/detallePacientes.jsp)"); +%> diff --git a/jsp/Basura/med/analisis_15122005.jsp b/jsp/Basura/med/analisis_15122005.jsp new file mode 100644 index 0000000..88f6500 --- /dev/null +++ b/jsp/Basura/med/analisis_15122005.jsp @@ -0,0 +1,272 @@ +<%@ 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" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de analisis (med/analisis.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 + { + try + { + +// Definicion de variables +String strParametroMenu=""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas); +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 pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); +%> + + + +Análisis + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + +
+ + + + + + + + + +
+
+ + + + + + +
+
+ + + + + + + + + +<% +//Creación de la tabla presentación de resultados + + + + PersistenciaVTaresanaTaclient per = new PersistenciaVTaresanaTaclient(); + Vector vSeleccion = per.listado_analisis_por_medico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(),intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + +<% + VTaresanaTaclient vTaresanaTaclient = 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); +%> + + <% + if (vTaresanaTaclient.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido. + { + %> + + + <% + } + else //campo autorizacion tiene un valor valido + { + %> + + + <% + } + %> + +<% + } + + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
 
 
No se ha encontrado ningún dato.
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
FechaNombre
<%=sdfFormateadorFecha.format(vTaresanaTaclient.getFecha())%><%=vTaresanaTaclient.getNombre() + " " + vTaresanaTaclient.getApellidos()%><%=sdfFormateadorFecha.format(vTaresanaTaclient.getFecha())%><%=vTaresanaTaclient.getNombre() + " " + vTaresanaTaclient.getApellidos()%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+
+
+ + + + +<% + } + + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex); + response.sendRedirect("../error.jsp"); + } + } + LogTarisan.logger.log(NivelLog.INFO, "Final página de analisis (med/analisis.jsp)"); +%> diff --git a/jsp/Basura/med/detallePacientes_15122005.jsp b/jsp/Basura/med/detallePacientes_15122005.jsp new file mode 100644 index 0000000..bbc2093 --- /dev/null +++ b/jsp/Basura/med/detallePacientes_15122005.jsp @@ -0,0 +1,345 @@ +<%@ 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" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de pacientes (med/detallePacientes.jsp)"); + + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + + if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null)) + { + LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada"); + response.sendRedirect("../../html/login.html"); + } + else + { + try + { + +// Definicion de variables +String strParametroMenu=""; +String strFecha = ""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas); +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 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")); +} +%> + + + +Pacientes + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + +
+ + + + + + + + + +
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + + strSql.append("SELECT tamovext.fecha, tamovext.precio as precioActoMedico, ttactmed.descripcion as descripcionActoMedico, ttclient.nombre, ttclient.apellidos"); + strSql.append(" FROM tamovext, ttactmed, ttbenefi, ttclient"); + strSql.append(" WHERE tamovext.acto=ttactmed.acto"); + strSql.append(" and tamovext.especialidad=ttactmed.especialidad"); + strSql.append(" and tamovext.medico=?"); + strSql.append(" and tamovext.especialidad=?"); + strSql.append(" and tamovext.colectivo=ttbenefi.colectivo"); + strSql.append(" and tamovext.poliza=ttbenefi.poliza"); + strSql.append(" and tamovext.orden=ttbenefi.orden"); + strSql.append(" and tamovext.entidad=ttbenefi.entidad"); + strSql.append(" and ttbenefi.cliente=ttclient.cliente"); + strSql.append(" ORDER BY tamovext.fecha"); + + aCondiciones = new Object[2]; + aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + + PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient(); + Vector vSeleccion = per.seleccionar(strSql.toString(), intPagina, aCondiciones); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + 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); +%> + + + + + + +<% + } + + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
 
+ + + + + + + +
Fecha (dd-mm-aaaa):  Imprimir
+
 
 
No se ha encontrado ningún dato.
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
FechaNombreDescripciónPrecio
<%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%><%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%><%=vTamovextTaclient.getDescripcionActoMedico()%><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+
+
+ + + + +<% + } + catch(ExcepcionTarisan ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje()); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje()); + response.sendRedirect("../error.jsp"); + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex); + response.sendRedirect("../error.jsp"); + } + } + LogTarisan.logger.log(NivelLog.INFO, "Final página de pacientes (med/detallePacientes.jsp)"); +%> diff --git a/jsp/Basura/med/detalle_analista.jsp b/jsp/Basura/med/detalle_analista.jsp new file mode 100644 index 0000000..dcbd444 --- /dev/null +++ b/jsp/Basura/med/detalle_analista.jsp @@ -0,0 +1,200 @@ +<%@ 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.Calendar" %> +<%@ page import="java.sql.*" %> +<%@ page import="java.util.Vector" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de detalles analisis por analista (med/detalle_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 + { + 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")); + +int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); +%> + + + + +Gestión Perfiles + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + +
+ + + + + + + + + + + +
+
+ + + + + + +
+
+ + + <% + LogTarisan.logger.log(NivelLog.DEBUG, "LLega 134"); + PersistenciaTamovext perTamo = new PersistenciaTamovext(); + + Calendar hoy = Calendar.getInstance(); + java.sql.Date hoyjava = new java.sql.Date(hoy.getTimeInMillis()); + java.sql.Date hace30dias = Utilidades.sumarFechasDias(hoyjava, -30); + Vector analiticas = perTamo.AnaliticasCapturadas(medico, hace30dias, hoyjava); + %> + + + <% + if(analiticas.size()>0) + { + %> + + + + + + <% + for(int i=0;i + + + + + + <% + } + } + %> + +
Ver desde fecha:
hasta fecha:
AutorizacionPacienteFecha
<%=aResultados[1] %><%=aResultados[0] %><%=Utilidades.formatear_fecha((java.sql.Date)aResultados[2]) %>
+ + +
+
+ + + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de detalles analisis por analista (med/detalle_analista.jsp)"); +%> diff --git a/jsp/Basura/med/liquidacion_15122005.jsp b/jsp/Basura/med/liquidacion_15122005.jsp new file mode 100644 index 0000000..cea8faf --- /dev/null +++ b/jsp/Basura/med/liquidacion_15122005.jsp @@ -0,0 +1,284 @@ +<%@ 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" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de liquidaciones (med/liquidacion.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 + { + try + { + +// Definicion de variables +String strParametroMenu=""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +double dblImporteTotal=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 pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); +%> + + + +Liquidaciones + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + +
+ + + + + + + + + +
+
+ + + + + + +
+
+ + + + + + + + + +<% +//Creación de la tabla presentación de resultados + strSql.append("SELECT TAMOVEXT.Acto, Count(TAMOVEXT.Acto) as cantidad, TAMOVEXT.Precio as precioActoMedico, ttactmed.descripcion as descripcionActoMedico"); + strSql.append(" FROM TAMOVEXT, ttactmed"); + strSql.append(" WHERE (TAMOVEXT.Acto = ttactmed.Acto)"); + strSql.append(" AND (TAMOVEXT.Especialidad = ttactmed.Especialidad)"); + strSql.append(" AND TAMOVEXT.Medico=?"); + strSql.append(" AND TAMOVEXT.Especialidad=?"); + strSql.append(" GROUP BY TAMOVEXT.Acto, TAMOVEXT.Precio, ttactmed.descripcion"); + strSql.append(" ORDER BY TAMOVEXT.Acto ASC"); + + aCondiciones = new Object[2]; + aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + + PersistenciaVTamovextTtactmed per = new PersistenciaVTamovextTtactmed(); + Vector vSeleccion = per.seleccionar(strSql.toString(), intPagina, aCondiciones); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + + VTamovextTtactmed vTamovextttactmed = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + vTamovextttactmed = (VTamovextTtactmed)vSeleccion.elementAt(i); + + //vamos calculando el importe total + dblImporteTotal=dblImporteTotal + vTamovextttactmed.getImporteActoMedico(); +%> + + + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + + + + + + +<% + } //fin else (vSeleccion.size()!=0) +%> +
 
 
No se ha encontrado ningún dato.
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
CódigoDescripciónCantidadPrecioImporte
<%=vTamovextttactmed.getActo()%><%=vTamovextttactmed.getDescripcionActoMedico()%><%=vTamovextttactmed.getCantidad()%><%=Utilidades.formatearDouble(vTamovextttactmed.getPrecioActoMedico(),PersistenciaParametros.decimales)%><%=Utilidades.formatearDouble(vTamovextttactmed.getImporteActoMedico(),PersistenciaParametros.decimales)%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
 
Importe total: <%=Utilidades.formatearDouble(dblImporteTotal,PersistenciaParametros.decimales)%>
+
+
+ + + + +<% + } + catch(ExcepcionTarisan ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje()); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje()); + response.sendRedirect("../error.jsp"); + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex); + response.sendRedirect("../error.jsp"); + } + } + LogTarisan.logger.log(NivelLog.INFO, "Final página de gestión de liquidaciones (med/liquidacion.jsp)"); +%> diff --git a/jsp/Basura/med/pdf_liquidacion.jsp b/jsp/Basura/med/pdf_liquidacion.jsp new file mode 100644 index 0000000..8621c9f --- /dev/null +++ b/jsp/Basura/med/pdf_liquidacion.jsp @@ -0,0 +1,18 @@ +<%@ page import="com.itextpdf.text.Document" %> +<%@ page import="com.itextpdf.text.DocumentException" %> +<%@ page import="com.itextpdf.text.Paragraph" %> +<%@ page import="com.itextpdf.text.Phrase" %> +<%@ page import="com.itextpdf.text.pdf.*" %> +<%@ page import="com.itextpdf.text.Font" %> +<%@ page import="com.itextpdf.text.Chunk" %> +<%@ page import="com.itextpdf.text.PageSize" %> +<%@ page import="com.itextpdf.text.Image" %> +<%@ page import="com.itextpdf.text.pdf.PdfPTable" %> +<%@ page import="com.itextpdf.text.FontFactory" %> +<%@ page import="com.itextpdf.text.BaseColor" %> + + +<% + + +%> \ No newline at end of file diff --git a/jsp/Basura/pac/Copia de especialidades.jsp b/jsp/Basura/pac/Copia de especialidades.jsp new file mode 100644 index 0000000..2230912 --- /dev/null +++ b/jsp/Basura/pac/Copia de especialidades.jsp @@ -0,0 +1,783 @@ +<%@ 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 + { + 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; +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")); +%> + + + +Especialidades + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("PACIENTE") %>
+ + + + + + + + +
+ + + + + + + + + +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + +<% + + strSql.append("SELECT ESPECIALIDAD, DESCRIPCION"); + strSql.append(" FROM TAESPECI"); + strSql.append(" WHERE ESPECIALIDAD <> ?"); + + //comprobamos si se trata de una busqueda de especialidades + if (!strCampoNombre.equalsIgnoreCase("")) + { + if (strCampoNombre.endsWith("*")) + strCampoNombre=strCampoNombre.replace('*', '%'); + else + strCampoNombre="%" + strCampoNombre + "%"; + + strSql.append(" AND DESCRIPCION LIKE ?"); + + aCondiciones = new Object[2]; + aCondiciones[1] = strCampoNombre; + } + else + aCondiciones = new Object[1]; + + aCondiciones[0] = Integer.valueOf(0); + + strSql.append(" ORDER BY DESCRIPCION"); + + PersistenciaTaespeci per = new PersistenciaTaespeci(); + Vector vSeleccion = per.seleccionar(strSql.toString(), intPagina, aCondiciones); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("�" + taespeci.getDescripcion() + "�")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
+ + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
Prescripción de especialista:
+
+
+ + + + + + + +
Informe:
+ +
+
+ + + + + + + +
Especialidad:  Buscar
+
 
No se ha encontrado ningún dato.
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
Descripción
<%=taespeci.getDescripcion()%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+
+
+ + + + +<% + } + catch(ExcepcionTarisan ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "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, "Final página de otras especialidades (pac/especialidades.jsp)"); +%> diff --git a/jsp/Basura/pac/estomatologia.jsp b/jsp/Basura/pac/estomatologia.jsp new file mode 100644 index 0000000..279137b --- /dev/null +++ b/jsp/Basura/pac/estomatologia.jsp @@ -0,0 +1,745 @@ +<%@ 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.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, "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 ) + { + LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada"); + response.sendRedirect(request.getContextPath() + "/jsp/pac/facturacion_chipcard.jsp?x=12&pagina=1"); + } + else + { + 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 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(); +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(); + +%> + + +Especialidades + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("PACIENTE") %>
+ + + + + + + + +
+ + + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + +<% + PersistenciaTTFranquiciasDentales per = new PersistenciaTTFranquiciasDentales(); + + long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo(); + int intEntidadnew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadIMQ(); + int intEspecialidadnew = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + + Calendar cal = Calendar.getInstance() ; + Integer anio = cal.get(Calendar.YEAR); + Vector vSeleccion = per.obtenerFranquicia(intEspecialidadnew, intEntidadnew, intColectivonew,anio,strCampoNombre,intPagina); + + + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + + + +<% + TTFranquiciasDentales ttFranquiciasDentales = null; + String estilo = ""; + String strDescripcionSinComilla=""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + ttFranquiciasDentales = (TTFranquiciasDentales)vSeleccion.elementAt(i); + + //hacemos el tratamiento por si viene comilla simple en la descripcion + strDescripcionSinComilla = ttFranquiciasDentales.getDescripcion().replace('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("¬" + ttFranquiciasDentales.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
+ + + + + + +
+
+
+ + + +
+
+ + + + + + + + + +
Imputación de actos médicos:
+
+
+
+ + + + + + + +
Nombre acto médico:  Buscar
+
 
No se ha encontrado ningún dato.
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
ActoDescripciónPrecio
<%=ttFranquiciasDentales.getActo()%><%=ttFranquiciasDentales.getDescripcion()%><%=Utilidades.formatearDouble(ttFranquiciasDentales.getPrecio(), PersistenciaParametros.decimales)%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+
+
+ + + + +<% + } + catch(ExcepcionTarisan ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "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, "Final página de facturacion (pac/facturacion.jsp)"); +%> diff --git a/jsp/Basura/pac/facturacion_estoma.jsp b/jsp/Basura/pac/facturacion_estoma.jsp new file mode 100644 index 0000000..4a6c475 --- /dev/null +++ b/jsp/Basura/pac/facturacion_estoma.jsp @@ -0,0 +1,806 @@ +<%@ 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_estoma (pac/facturacion_estoma.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(sesion.getAttribute("PACIENTE") == null) + { + LogTarisan.logger.log(NivelLog.INFO, "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, "Sesión invalidada"); + response.sendRedirect(request.getContextPath() + "/jsp/pac/facturacion_chipcard.jsp?x=0&pagina=1"); + } + else + { + 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("|"); + 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")); +} + +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"; + + + +%> + + +Estomatología + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("PACIENTE") %>
+ + + + + + + + +
+ + + + + + + + + +
+
+<% + if ((blnEsPolizaIgualaMedico == 0) || ((blnEsPolizaIgualaMedico != 0) && perfilIguala.toString().compareTo("01")!=0)){ + LogTarisan.logger.log(NivelLog.INFO, "PERFIL TARISAN: " + perfilIguala.toString() + " " + blnEsPolizaIgualaMedico); + %> + + + + + + +
+ + + + + + + + + + + + + + + + + + +<% + PersistenciaTtactmed per = new PersistenciaTtactmed(); + long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo(); + double dblPolizanew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(); + + //Esta es la consulta que le cuesta 20seg. devolver + Vector vSeleccion = per.obtenerActosAutoprescribibles(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato(), intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre); + + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
+ + + + + + +
+
+
+ + + +
+
+ + + + + + + + + +
Imputación de actos médicos:
+
+
+
+ + + + + + + +
Nombre acto médico:  Buscar
+
 
No parece tener cobertura dental...
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
ActoDescripciónPrecio
<%=ttactmed.getActo()%><%=ttactmed.getDescripcion()%><%=Utilidades.formatearDouble(per.obtenerPrecioActoMedico(((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), ttactmed.getActo(), ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad()), PersistenciaParametros.decimales)%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+
+<% +} +else { +%> + + + + + + + + + + + + + + + + + + + + <% + if (blnEsPolizaIgualaMedico == 1){ %> + + <%} + else { %> + + <% + }%> + + +
 
 
 
Paciente con IGUALA suyaPaciente con IGUALA de otro profesional
+<% +} +%> +
+ + + + +<% + } + catch(ExcepcionTarisan ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "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, "Final página de facturacion_estoma (pac/facturacion_estoma.jsp)"); +%> diff --git a/jsp/Basura/pac/franquicias_dentales.jsp b/jsp/Basura/pac/franquicias_dentales.jsp new file mode 100644 index 0000000..49eaa34 --- /dev/null +++ b/jsp/Basura/pac/franquicias_dentales.jsp @@ -0,0 +1,218 @@ +<%@ 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"); +%> + + + +Módulo de Franquicias dentales + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + +
+ + + + + + + + + +
+ + + + + +
+
+
+ + + + + + +
+
+
+ + + + + + + + <% + 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 + { + %> + + + + + + + <% + } + else + { + %> + + + + + + + <% + } + } + else + { + %> + + + + + + + <% + } + %> + + + + + + +
El paciente tiene la siguiente franquicia dental:
 
 
No tiene franquicias asociadas
 
target="blank">Franquicia
 
target="blank">Franquicia
 
Volver
+
+
+ + + +<% + } + LogTarisan.logger.log(NivelLog.INFO, "Final página de franquicias dentales (pac/franquicias_dentales.jsp)"); +%> diff --git a/jsp/Basura/pac/gestor_NEW.jsp b/jsp/Basura/pac/gestor_NEW.jsp new file mode 100644 index 0000000..383d6bc --- /dev/null +++ b/jsp/Basura/pac/gestor_NEW.jsp @@ -0,0 +1,156 @@ +<%@ 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 + { + +//Obtención del perfil del usuario conectado +StringBuffer perfil = new StringBuffer(); +perfil.append("|"); +perfil.append(sesion.getAttribute("PERFIL")); +perfil.append("|"); +%> + + + +Módulo de Gestión de Pacientes + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
<%= sesion.getAttribute("USUARIO") %>
+ +
+ + + + + + +
+ +
+ + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + +
 
Pase la tarjeta:
 
Validar
+
+
+ + + + +<% + } + LogTarisan.logger.log(NivelLog.INFO, "Final página de gestión de pacientes (pac/gestor.jsp)"); +%> diff --git a/jsp/Basura/pac/solicitudAnalitica.jsp b/jsp/Basura/pac/solicitudAnalitica.jsp new file mode 100644 index 0000000..ee4926a --- /dev/null +++ b/jsp/Basura/pac/solicitudAnalitica.jsp @@ -0,0 +1,990 @@ +<%@ 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 analiticas (pac/solicitudAnalitica.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 analiticas (pac/solicitudAnalitica.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=""; +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ó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 analisis. +//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('\'', '~'); +} + +//parametro grupo que indica que el usuario selecciona los actos medicos de un grupo de analisis +//tenemos que cargar los actos medicos de ese grupo +if (request.getParameter("seleccionGrupo")!=null) +{ + strGrupo=(String)request.getParameter("grupo"); + if ( ((String)request.getParameter("seleccionGrupo")).equalsIgnoreCase("si") && strGrupo!="") + { + Vector vActosGrupo = perTagruana.obtenerActosMedicos(Integer.parseInt(strGrupo),intMedico); + + if (vActosGrupo.size()>0) + { + tagruana=null; + if(strListaElementos.length() == 0) + strListaElementos="¬"+strListaElementos; + + if(strListaCodigoElementos.length() == 0) + strListaCodigoElementos="¬"+strListaCodigoElementos; + + for (i=0;i", " "); + } +} +%> + + + +Analítica + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + +
+ +
+ + + + + + +
<%= sesion.getAttribute("PACIENTE") %>
+
+ + + + + + + +
+ + + + + + + + +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +<% + 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(); + PersistenciaTtactmed per = new PersistenciaTtactmed(); + Vector vSeleccion_Validos = 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.obtenerActosPorEspecialidad(0, ParametrosConfiguracion.analiticas,intContratonew,intColectivonew,dblPolizanew, "%"); + } + else + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Obtener todos los actos, es desplazado"); + vSeleccion_Validos= per.obtenerActosPorEspecialidad(0, ParametrosConfiguracion.analiticas, "%"); + } + + if(vSeleccion_Validos.size()>0 && !boolActosValidosCargados) + { + Ttactmed ttactmed2=null; + for(int j=0;j + + + <% + } + } + Vector vSeleccion = null; + if(pac.getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) == 0) + { + vSeleccion= per.obtenerActosPorEspecialidad(intPagina, ParametrosConfiguracion.analiticas,intContratonew,intColectivonew,dblPolizanew, strCampoNombre); + } + else + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Obtener todos los actos, es desplazado"); + vSeleccion= per.obtenerActosPorEspecialidad(intPagina, ParametrosConfiguracion.analiticas, strCampoNombre); + } + + if (vSeleccion.size()==0) //No se han encontrado datos + { + %> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
+ + + + + + +
+
+
+ + + + + +
+
+ + + + + + + +
Prescripción de diagnóstico:
+
+
+ + + + + + + + + + + + + +
Grupos de análisis:
+ <% + + Vector vGrupos = perTagruana.obtenerGruposAnalisis(intMedico); + tagruana = null; + %> + +
Informe:
+ +
+
+ + + + + + + +
Nombre acto médico:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
+
 
<% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
Descripción
<%=ttactmed.getDescripcion()%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+
+
+
+ + + +<% + } + 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 (pac/solicitudAnalitica.jsp)"); + } +%> diff --git a/jsp/Basura/pac/solicitudDiagnostico.jsp b/jsp/Basura/pac/solicitudDiagnostico.jsp new file mode 100644 index 0000000..36fdb42 --- /dev/null +++ b/jsp/Basura/pac/solicitudDiagnostico.jsp @@ -0,0 +1,720 @@ +<%@ 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 diagnostico (pac/solicitudDiagnostico.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 diagnostico (pac/solicitudDiagnostico.jsp)"); + + try + { + +// Definicion de variables +String strMensajeSinElementos="No ha seleccionado ningún acto médico."; +String strParametroMenu=""; +String strCampoNombre=""; +String strListaElementos=""; +String strListaCodigoElementos=""; +String strInforme=""; +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("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"); + +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("
", " "); + } +} +%> + + + +Diagnóstico + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + +
+ +
+ + + + + + + +
<%= sesion.getAttribute("PACIENTE") %>
+
+ + + + + + + + +
+ + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +<% + 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(); + PersistenciaTtactmed per = new PersistenciaTtactmed(); + Vector vSeleccion = null; + + if(pac.getDesplazado() == null) + pac.setDesplazado(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard()); + + if(pac.getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) == 0) + { + vSeleccion = per.obtenerActosPorEspecialidad(intPagina, ParametrosConfiguracion.radiodiagnostico,intContratonew,intColectivonew,dblPolizanew, strCampoNombre); + } + else + { + if(strCampoNombre.length()==0) + strCampoNombre="%"; + vSeleccion = per.obtenerActosPorEspecialidad(intPagina, ParametrosConfiguracion.radiodiagnostico, strCampoNombre); + } + + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
+ + + + + + +
+
+
+ + + + + +
+
+ + + + + + + +
Prescripción de diagnóstico:
+
+
+ + + + + + + +
Informe:
+ +
+
+ + + + + + + +
Nombre acto médico:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
+
 
<% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
Descripción
<%=ttactmed.getDescripcion()%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+
+
+
+ + + +<% + } + 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 diagnostico (pac/solicitudDiagnostico.jsp)"); + } +%> diff --git a/jsp/adm/descarga_pdfs_autorizaciones.jsp b/jsp/adm/descarga_pdfs_autorizaciones.jsp new file mode 100644 index 0000000..882b186 --- /dev/null +++ b/jsp/adm/descarga_pdfs_autorizaciones.jsp @@ -0,0 +1,608 @@ +<%@ 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.io.*" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de de mantenimiento de autorizaciones (adm/mto_taconaut.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 + { + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + String mensaje = ""; + int CampoMedico = 0; + long CampoPoliza = 0; + int CampoColectivo = 0; + int CampoOrden = 0; + int intPagina = 0; + StringBuffer strSql = new StringBuffer(); + Object aCondiciones[] = null; + + //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 medico para las busquedas + if (request.getParameter("medico")!=null){ + if (request.getParameter("medico").compareTo("")!=0){ + CampoMedico = Integer.parseInt(request.getParameter("medico")); + } + } + + //parametro poliza para las busquedas + if (request.getParameter("poliza")!=null) + CampoPoliza = Long.parseLong(request.getParameter("poliza")); + + //parametro medico para las busquedas + if (request.getParameter("colectivo")!=null) + CampoColectivo = Integer.parseInt(request.getParameter("colectivo")); + + //parametro poliza para las busquedas + if (request.getParameter("orden")!=null) + CampoOrden = Integer.parseInt(request.getParameter("orden")); + + //parametro pagina para realizar la paginacion + if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + + if(sesion.getAttribute("MENSAJE")!=null) + { + mensaje=(String)sesion.getAttribute("MENSAJE"); + sesion.removeAttribute("MENSAJE"); + } + + 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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; +%> + + + +Mantenimiento autorizaciones + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + +
+ + + + + + + + +
+
+ + + + + + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ <%=pertamensaje.obtenerMensaje(20).getMensaje() %> + + value="<%=CampoMedico %>"<%}%>/> +
+ <%=pertamensaje.obtenerMensaje(21).getMensaje() %> + + value="<%=CampoColectivo %>"<%}%>/> +
+ + + value="<%=CampoPoliza %>"<%}%>/> +
+ + + value="<%=CampoOrden %>"<%}%>/> +
+ <%=pertamensaje.obtenerMensaje(24).getMensaje() %> +
 
+ + <%if(CampoMedico >= 0 && CampoPoliza > 0 && CampoColectivo >= 0 && CampoOrden >= 0) + { + PersistenciaTaconaut pertacon = new PersistenciaTaconaut(); + PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut(); + Vector vSeleccion = pertacon.BuscarAutorizacionPorMedicoYPoliza(CampoMedico,CampoColectivo,CampoPoliza,CampoOrden,intPagina); + if(vSeleccion.size()>0) + { + LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion del medico "+CampoMedico+" con poliza "+CampoPoliza+" esta en taconaut"); + %> + + <%if (intPagina != 0){ %> + + + + <% }%> + + + + + + <% + String estilo = ""; + for(int i=0;i + + + + + + <% + } + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + } //fin if(pagina!=0) %> +
Página <%=pertacon.getPaginacion().getNumeroPagina()%> de <%=pertacon.getPaginacion().getNumeroPaginasTotales()%>
<%=pertamensaje.obtenerMensaje(18).getMensaje() %><%=pertamensaje.obtenerMensaje(17).getMensaje() %><%=pertamensaje.obtenerMensaje(16).getMensaje() %>
<%= vSeleccion.get(i)%> + <% + //mostrar el bot�n de resultados + %>
+ + +
<% + %> +
+ <% + String resultado = ""+vSeleccion.get(i).toString(); + //resultado = (resultado.length()<8)?"0"+resultado:resultado; + File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf"); + if(fichero.exists()) + { + //mostrar el bot�n de resultados + %>
+ + +
<% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF"); + if(fichero.exists()) + { + //mostrar el bot�n de resultados + %>
+ + +
<% + } + else + { + %>

<%=pertamensaje.obtenerMensaje(6).getMensaje() %>

<% + } + } + %> +
+ + + <%if (pertacon.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (pertacon.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+ <% + } + else + { + boolean yaExisteEnTaconaut = false; + LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion del medico "+CampoMedico+" con poliza "+CampoPoliza+" no esta en taconaut la buscamos en ttmovaut"); + vSeleccion = perttmov.BuscarAutorizacionPorMedicoYPoliza(CampoMedico,CampoColectivo,CampoPoliza,CampoOrden,intPagina); + if(vSeleccion.size() > 0) + { + %> + + <%if (intPagina != 0){ %> + + + + <% }%> + + + + + + <% + String estilo = ""; + for(int i=0;i0){ + tacon = (Taconaut)vSeleccion2.get(i); + yaExisteEnTaconaut = true; + } + int gesigu = 0; + if(tacon.getFromGesigu()) + gesigu = 1; + + if (!yaExisteEnTaconaut){ + pertacon.CrearAutorizacionValida(Long.parseLong(tacon.getAutorizacion()), tacon.getMedico(), tacon.getEspecialidad(), tacon.getActo(), tacon.getCantidad(), gesigu, ""); + } + + /*if(pertacon.CrearAutorizacionValida(Integer.parseInt(tacon.getAutorizacion()), tacon.getMedico(), tacon.getEspecialidad(), tacon.getActo(), tacon.getCantidad(), gesigu, "")) + {*/ + %> + + + + + + <% + /* } + else + { */ + %> + + <% + // } + } + %> + <% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + } //fin if(pagina!=0) %> +
Página <%=perttmov.getPaginacion().getNumeroPagina()%> de <%=perttmov.getPaginacion().getNumeroPaginasTotales()%>
<%=pertamensaje.obtenerMensaje(18).getMensaje() %><%=pertamensaje.obtenerMensaje(17).getMensaje() %><%=pertamensaje.obtenerMensaje(16).getMensaje() %>
<%= tacon.getAutorizacion()%> + <% + //mostrar el bot�n de resultados + %>
+ + +
<% + %> +
+ <% + String resultado = ""+vSeleccion.get(i).toString(); + //resultado = (resultado.length()<8)?"0"+resultado:resultado; + File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf"); + if(fichero.exists()) + { + //mostrar el bot�n de resultados + %>
+ + +
<% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF"); + if(fichero.exists()) + { + //mostrar el bot�n de resultados + %>
+ + +
<% + } + else + { + %>

<%=pertamensaje.obtenerMensaje(6).getMensaje() %>

<% + } + } + %> +
+ + + <%if (perttmov.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (perttmov.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+ <% + } + else + { + %> + + +
<%=pertamensaje.obtenerMensaje(13).getMensaje() %>
+ <% + } + } + } + %> +
<%=mensaje %>
+
+ + + +
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de autorizaciones (adm/mto_taconaut.jsp)"); +%> diff --git a/jsp/adm/detalle_usuario.jsp b/jsp/adm/detalle_usuario.jsp new file mode 100644 index 0000000..b866d55 --- /dev/null +++ b/jsp/adm/detalle_usuario.jsp @@ -0,0 +1,309 @@ +<%@ 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="com.tarisan.util.Utilidades" %> +<%@ page import="java.sql.*" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.util.Vector" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de detalle de usuario (adm/detalle_usuario.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 + { + try + { + + // Definicion de variables + String strParametroMenu = ""; + int intMedico = 0; + String blo = ""; + SimpleDateFormat sdf = new SimpleDateFormat(PersistenciaParametros.formatoFechas); + + //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 medico para la selección de los datos del mismo + if (request.getParameter("medico")!=null){ + intMedico = Integer.parseInt(request.getParameter("medico"));} + + //parametro bloqueo para combrobar despues si se ha modificado + if (request.getParameter("bloqueado")!=null){ + blo = (String)request.getParameter("bloqueado");} + + 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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; +%> + + + +Detalle de usuario + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + +
+ + + + + + + + +
+
+ + + + + + + +
+
+ + + + +<% + PersistenciaTamedico per = new PersistenciaTamedico(); + Tamedico tamedico = per.seleccionar(intMedico); + + + String bloqueo = ""; + String fechaUltAcceso = ""; + String fechaCaducidad = ""; + Calendar calCaducidad = Calendar.getInstance(); + + if (tamedico != null) + { + if(tamedico.getBloqueoClave() != null) + { + bloqueo = tamedico.getBloqueoClave().toUpperCase(); + } + + if(tamedico.getFechaUltimoAcceso() != null) + { + fechaUltAcceso = sdf.format(tamedico.getFechaUltimoAcceso()); + } + + if(tamedico.getFechaModifClave() != null) + { + calCaducidad.setTime((java.util.Date)tamedico.getFechaModifClave()); + } + calCaducidad.add(Calendar.DATE, ParametrosConfiguracion.diasCaducidad); + fechaCaducidad = sdf.format(calCaducidad.getTime()); +%> + + + + + + + + + +<% + } +%> +
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Código:
Resetear clave:
Nombre:
Apellidos:
Especialidad:
Bloqueo:
Ultimo acceso:
Caducidad de clave:
Deshacer   Aceptar
+
+
+
+
+ + + +<% + } + catch(ExcepcionTarisan ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje()); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje()); + response.sendRedirect("../error.jsp"); + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de detalle de usuario (adm/detalle_usuario.jsp)"); +%> diff --git a/jsp/adm/img/sp.gif b/jsp/adm/img/sp.gif new file mode 100644 index 0000000000000000000000000000000000000000..88870419315135da84bcc93711ff9bbf7fb01429 GIT binary patch literal 86 zcmZ?wbhEHblx47Bn8*ME|G@yrQ2fcl$iTqFpaT*G$ulsi_w=tk{g!|6oGrJyH{aXy ho4@Um$Fygi%U+$@_Ky4bC!g!zdY}I~*UZXb4FL3aBpm<% literal 0 HcmV?d00001 diff --git a/jsp/adm/img/sp_imp.gif b/jsp/adm/img/sp_imp.gif new file mode 100644 index 0000000000000000000000000000000000000000..076c7538e60cdfc58adf59c9f231302eaf5ab4a7 GIT binary patch literal 43 scmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE7Dgb&paUX6G7d~kE{qJ;0Lp3yIRF3v literal 0 HcmV?d00001 diff --git a/jsp/adm/img/transparent.gif b/jsp/adm/img/transparent.gif new file mode 100644 index 0000000000000000000000000000000000000000..d794434481d0414bcfe6d6d73fc97045fa134b06 GIT binary patch literal 43 qcmZ?wbhEHbWMp7u_`m=H|NsA2{K>+|02I&x@j)^SOiVtE4Aub7RR?ka literal 0 HcmV?d00001 diff --git a/jsp/adm/lista_usuarios.jsp b/jsp/adm/lista_usuarios.jsp new file mode 100644 index 0000000..079d0d0 --- /dev/null +++ b/jsp/adm/lista_usuarios.jsp @@ -0,0 +1,330 @@ +<%@ 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 del listado de usuarios (adm/lista_usuarios.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 + { + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + String strCampoApellido = ""; + int intPagina = 0; + //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 apellido para las busquedas + if (request.getParameter("apellido")!=null) + strCampoApellido = (String)request.getParameter("apellido"); + + //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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; +%> + + + +Lista de Usuarios + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + +
+ + + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + + + + + + + + +<% + + PersistenciaUsuario per = new PersistenciaUsuario(); + + Vector vSeleccion = per.listado_usuarios(intPagina, strCampoApellido); + + if (vSeleccion.size() == 0) //No se han encontrado datos + { +%> + + + + + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + + +<% + } +%> + + + + + + + +<% + Tamedico tamedico = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + tamedico = (Tamedico)vSeleccion.elementAt(i); +%> + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> + + + + + +
 
+ + + + + + + +
Apellido:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
+
 
 
<% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
ApellidosNombreCódigo
<%=tamedico.getApellidos()%><%=tamedico.getNombre()%><%=tamedico.getMedico()%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+
+
+
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de listado de usuarios (adm/lista_usuarios.jsp)"); +%> diff --git a/jsp/adm/movimientos_tamovext.jsp b/jsp/adm/movimientos_tamovext.jsp new file mode 100644 index 0000000..a2874b9 --- /dev/null +++ b/jsp/adm/movimientos_tamovext.jsp @@ -0,0 +1,235 @@ +<%@ 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 de mantenimiento actos imputados (adm/movimientos_tamovext.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 + { + try + { + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + String mensaje = ""; + long CampoAutorizacion = 0; + int intPagina = 0; + StringBuffer strSql = new StringBuffer(); + Object aCondiciones[] = null; + //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 apellido para las busquedas + if (request.getParameter("num_aut")!=null) + CampoAutorizacion = Long.parseLong(request.getParameter("num_aut")); + + //parametro pagina para realizar la paginacion + if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + + if(sesion.getAttribute("MENSAJE")!=null) + { + mensaje=(String)sesion.getAttribute("MENSAJE"); + sesion.removeAttribute("MENSAJE"); + } + LogTarisan.logger.log(NivelLog.DEBUG, "Llega 62"); + + + 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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; +%> + + + +Mantenimiento actos imputados + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + +
+ + + + + + + + +
+
+ + + + + + + +
+
+ <%PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut(); + TTMovaut ttmov = perttmov.ObtenerAutorizacionTTmovaut(CampoAutorizacion); + PersistenciaTamovext pertamo = new PersistenciaTamovext(); + Vector resul = pertamo.ObtenerMovimientosMismaPolizaYMedico(ttmov.get_medico(), ttmov.get_especialidad1(), ttmov.get_acto1(), ttmov.get_entidad(), ttmov.get_colectivo(), ttmov.get_poliza(), ttmov.get_orden()); + %> + + <% + if(resul != null) + { + if(resul.size()>0) + { + %> + + <% + for(int i=0; i + + <% + } + %> + + <% + } + } + else + { + %> + + <% + } + %> +
FechaActoEspecialidadMédico
<%=Utilidades.formatear_fecha(tamo.getFecha()) %><%=tamo.getActo() %><%=tamo.getEspecialidad() %><%=tamo.getMedico() %>
<%=pertamensaje.obtenerMensaje(30).getMensaje() %>
No se han encontrado movimientos
imputados a esa autorización
+
+
+
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de autorizaciones (adm/movimientos_tamovext.jsp)"); +%> diff --git a/jsp/adm/mto_actos.jsp b/jsp/adm/mto_actos.jsp new file mode 100644 index 0000000..f71c6d7 --- /dev/null +++ b/jsp/adm/mto_actos.jsp @@ -0,0 +1,411 @@ +<%@ 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 mantenimiento de niveles analíticos (adm/mto_actos.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 + { + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + String strParametroEspe = "0"; + String strDescripcionActo = ""; + int intPagina = 0; + + //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 especialidad para saber si el combo tiene seleccionada una especialidad y mostrar los actos de cada especialidad o no + if (request.getParameter("especialidad")!=null) + strParametroEspe=(String)request.getParameter("especialidad"); + + //parametro pagina para realizar la paginacion + if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + + //parametro acto para las busquedas + if (request.getParameter("hiddenActo")!=null) + strDescripcionActo = (String)request.getParameter("hiddenActo"); + + 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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; + +%> + + + +Mantenimiento Actos + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + +
+ + + + + + + + +
+
+ + + + + + +
+ + + + + + + + <% if (Integer.parseInt(strParametroEspe)!=0){ + Vector vTanivAct = new Vector(); + vTanivAct = per.ObtenerActos(Integer.parseInt(strParametroEspe),intPagina,strDescripcionActo); + if (vTanivAct.size() == 0) //No se han encontrado datos + { + %> + +
+ + + + + <% PersistenciaTanivelEspecialidadTanivelActo per = new PersistenciaTanivelEspecialidadTanivelActo(); + Vector vSeleccion = per.obtenerEspecialidades(); + + if (vSeleccion.size() == 0) //No se han encontrado datos + { + %> + + + + + + + + + <% + }else{ + + %> + + <% } + + %> + +
Especialidad:
 
<% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
+
 
+ + + + + + +
 
<% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
+ + <% + }else{ + if (intPagina != 0){ //se tiene en cuenta la paginacion + %> + +
+ + + + + + + +
Descripcion Acto:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
+
+ + + + <% + } + %> + + + + + + <% + TanivelActo TanivAct = null; + String estilo = ""; + for(int i = 0; i < vTanivAct.size(); i++){ + TanivAct = (TanivelActo)vTanivAct.elementAt(i); + String descripcionActo = ""; + descripcionActo = per.ObtenerDescripcionActo(TanivAct.getActo(),Integer.parseInt(strParametroEspe)); + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + %> + + + + + + + + + + + <% + } + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + } //fin if(pagina!=0) + %> + + + + + + + + +
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
CodigoActoNivel
<%=TanivAct.getActo()%> <%=descripcionActo%>
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
Aceptar
+ <% + } + } + + %> +
+ + + + +
+
+ + + + + +
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de niveles analíticos (adm/mto_actos.jsp)"); +%> diff --git a/jsp/adm/mto_analiticas.jsp b/jsp/adm/mto_analiticas.jsp new file mode 100644 index 0000000..32b2b7b --- /dev/null +++ b/jsp/adm/mto_analiticas.jsp @@ -0,0 +1,176 @@ +<%@ 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 mantenimiento de niveles analíticos (adm/mto_analiticas.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 + { + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + int intPagina = 0; + + //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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; +%> + + + +Mantenimiento de Analíticas + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + +
+ + + + + + + + +
+
+ + + + + + +
Mantenimiento de nivelesMantenimiento de actos
+
+
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de niveles analíticos (adm/mto_analiticas.jsp)"); +%> diff --git a/jsp/adm/mto_niveles.jsp b/jsp/adm/mto_niveles.jsp new file mode 100644 index 0000000..2531aeb --- /dev/null +++ b/jsp/adm/mto_niveles.jsp @@ -0,0 +1,383 @@ +<%@ 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 mantenimiento de niveles analíticos (adm/mto_niveless.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 + { + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + String strParametroEspe = "0"; + String strParametroEspeSol = "0"; + int intPagina = 0; + + //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"); + + if (request.getParameter("especialidad")!=null) + strParametroEspe=(String)request.getParameter("especialidad"); + + if (request.getParameter("especialidadSolicitada")!=null) + strParametroEspeSol=(String)request.getParameter("especialidadSolicitada"); + + 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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; + +%> + + + +Mantenimiento Niveles + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + + +
+ + + + + + + + +
+
+ + + + + +
+ + + + +
+ + + + + + <% PersistenciaTanivelEspecialidadTanivelActo per = new PersistenciaTanivelEspecialidadTanivelActo(); + Vector vSeleccion = per.obtenerEspecialidades(); + + if (vSeleccion.size() == 0) //No se han encontrado datos + { + %> + + + <% + }else{ + + %> + + <% } + + %> + +
 Especialidad: <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
+
+
+
+ <% if (Integer.parseInt(strParametroEspe)!=0){ + %> + + + + <% + Vector vTanivEspeSolicitada = new Vector(); + vTanivEspeSolicitada = per.obtenerEspecialidadesSolicitadas(Integer.parseInt(strParametroEspe)); + if (vTanivEspeSolicitada.size() == 0) //No se han encontrado datos + { + %> + + + + + + + + + <% + }else{ + + %> + + <% } + + %> + +
Especialidad Solicitada:
 
<%=tamensaje.getMensaje() %>
+
+
+ <% if (Integer.parseInt(strParametroEspeSol)!=0){ + + Vector vTanivEspe = new Vector(); + vTanivEspe = per.ObtenerNiveles(Integer.parseInt(strParametroEspe),Integer.parseInt(strParametroEspeSol)); + if (vTanivEspe.size() == 0) //No se han encontrado datos + { + %> + + + + + + + + +
 
<%=tamensaje.getMensaje() %>
+ + <% + }else{ + %> +
+ + + + + + <% + TanivelEspecialidad TanivEsp = null; + String estilo = ""; + for(int i = 0; i < vTanivEspe.size(); i++){ + TanivEsp = (TanivelEspecialidad)vTanivEspe.elementAt(i); + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + %> + + + + + + + + + <% + } + %> + + + + + + +
NivelVisibilidad
<%=TanivEsp.getNivel()%>
Aceptar
+ +
+ <% + } + } + } + + %> +
+ + + +
+
+
+
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de niveles analíticos (adm/mto_niveles.jsp)"); +%> diff --git a/jsp/adm/mto_peticiones.jsp b/jsp/adm/mto_peticiones.jsp new file mode 100644 index 0000000..dbe1421 --- /dev/null +++ b/jsp/adm/mto_peticiones.jsp @@ -0,0 +1,465 @@ +<%@ 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.io.*" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de de mantenimiento de autorizaciones (adm/mto_taconaut.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 + { + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + String mensaje = ""; + int CampoMedico = 0; + long CampoPoliza = 0; + int CampoColectivo = 0; + int CampoOrden = 0; + int intPagina = 0; + StringBuffer strSql = new StringBuffer(); + Object aCondiciones[] = null; + + //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 medico para las busquedas + if (request.getParameter("medico")!=null){ + if (request.getParameter("medico").compareTo("")==0){ + CampoMedico = 0; + }else{ + CampoMedico = Integer.parseInt(request.getParameter("medico")); + } + + } + + //parametro poliza para las busquedas + if (request.getParameter("poliza")!=null) + CampoPoliza = Integer.parseInt(request.getParameter("poliza")); + + //parametro medico para las busquedas + if (request.getParameter("colectivo")!=null) + CampoColectivo = Integer.parseInt(request.getParameter("colectivo")); + + //parametro poliza para las busquedas + if (request.getParameter("orden")!=null) + CampoOrden = Integer.parseInt(request.getParameter("orden")); + + //parametro pagina para realizar la paginacion + if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + + if(sesion.getAttribute("MENSAJE")!=null) + { + mensaje=(String)sesion.getAttribute("MENSAJE"); + sesion.removeAttribute("MENSAJE"); + } + + 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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; +%> + + + +Mantenimiento autorizaciones + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + +
+ + + + + + + + +
+
+ + + + + + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ <%=pertamensaje.obtenerMensaje(20).getMensaje() %> + + value="<%=CampoMedico %>"<%}%>/> +
+ <%=pertamensaje.obtenerMensaje(21).getMensaje() %> + + value="<%=CampoColectivo %>"<%}%>/> +
+ + + value="<%=CampoPoliza %>"<%}%>/> +
+ + + value="<%=CampoOrden %>"<%}%>/> +
+ <%=pertamensaje.obtenerMensaje(24).getMensaje() %> +
 
+ + <%if(CampoMedico >= 0 && CampoPoliza > 0 && CampoColectivo >= 0 && CampoOrden >= 0) + { + PersistenciaTapresca per = new PersistenciaTapresca(); + Vector vSeleccion = per.obtenerPeticiones(CampoMedico,CampoColectivo,CampoPoliza,CampoOrden,intPagina); + if(vSeleccion.size()>0) + { + LogTarisan.logger.log(NivelLog.DEBUG, "La peticion del medico "+CampoMedico+" con poliza "+CampoPoliza+" esta en tapreca_tarisan"); + %> + + <%if (intPagina != 0){ %> + + + + <% }%> + + + + + <% + String estilo = ""; + for(int i=0;i + + + + + <% + } + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + } //fin if(pagina!=0) %> +
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
PeticionesVer PDF
<%= vSeleccion.get(i)%> + <% + String resultado = ""+vSeleccion.get(i).toString(); + //resultado = (resultado.length()<8)?"0"+resultado:resultado; + File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf"); + if(fichero.exists()) + { + //mostrar el botón de resultados + %>
+ + +
<% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF"); + if(fichero.exists()) + { + //mostrar el botón de resultados + %>
+ + +
<% + } + else + { + %>

<%=pertamensaje.obtenerMensaje(6).getMensaje() %>

<% + } + } + %> +
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+ <% + }else{ + %> + + + + +
No hay peticiones para los datos introducidos
+ <% + } + } + %> +
<%=mensaje %>
+
+ + + +
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de autorizaciones (adm/mto_taconaut.jsp)"); +%> diff --git a/jsp/adm/mto_taconaut.jsp b/jsp/adm/mto_taconaut.jsp new file mode 100644 index 0000000..d9714a1 --- /dev/null +++ b/jsp/adm/mto_taconaut.jsp @@ -0,0 +1,404 @@ +<%@ 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.io.*" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de de mantenimiento de autorizaciones (adm/mto_taconaut.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 + { + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + String mensaje = ""; + long CampoAutorizacion = 0; + int intPagina = 0; + StringBuffer strSql = new StringBuffer(); + Object aCondiciones[] = null; + + //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 apellido para las busquedas + if (request.getParameter("autorizacion")!=null) + CampoAutorizacion = Long.parseLong(request.getParameter("autorizacion")); + + //parametro pagina para realizar la paginacion + if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + + if(sesion.getAttribute("MENSAJE")!=null) + { + mensaje=(String)sesion.getAttribute("MENSAJE"); + sesion.removeAttribute("MENSAJE"); + } + + 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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; +%> + + + +Mantenimiento autorizaciones + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + +
+ + + + + + + + +
+
+ + + + + + + <% + } + } + } + %> + +
+
+ + + + + + + + <%if(CampoAutorizacion > 0) + { + PersistenciaTaconaut pertacon = new PersistenciaTaconaut(); + PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut(); + if(pertacon.BuscarAutorizacion(CampoAutorizacion)) + { + LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion "+CampoAutorizacion+" esta en taconaut"); + Vector vSeleccion = pertacon.ObtenerAutorizacionADM(CampoAutorizacion); + if(vSeleccion.size()>0) + { + %> +
<%=pertamensaje.obtenerMensaje(31).getMensaje() %>
 
<%=pertamensaje.obtenerMensaje(24).getMensaje() %>
 
+ + <% + for(int i=0;i +
+
+ + + + + + + + + + + <% + } + %> +
AutorizaciónActoEspecialidadCantidad
<%=tacon.getAutorizacion() %><%=tacon.getActo() %><%=tacon.getEspecialidad() %>Actualizar
+ <% + String resultado = ""+tacon.getAutorizacion(); + //resultado = (resultado.length()<8)?"0"+resultado:resultado; + File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf"); + if(fichero.exists()) + { + %>
+ + +
<% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf+Integer.valueOf(tacon.getAutorizacion()).toString()+".PDF"); + if(fichero.exists()) + { + %>
+ + +
<% + } + else + { + %>

<%=pertamensaje.obtenerMensaje(15).getMensaje() %>

<% + } + } + + %> +
+ <% + } + } + else + { + LogTarisan.logger.log(NivelLog.DEBUG, "La autorizacion "+CampoAutorizacion+" no esta en taconaut la buscamos en ttmovaut"); + Vector vSeleccion = perttmov.ObtenerAutorizacionADM(CampoAutorizacion); + if(vSeleccion.size() > 0) + { + %> + + + <% + for(int i=0;i +
+
+ + + + + + + + + + + <% + } + else + { + %> + + <% + } + } + %> +
AutorizaciónActoEspecialidadCantidad
<%=tacon.getAutorizacion() %><%=tacon.getActo() %><%=tacon.getEspecialidad() %>Actualizar
+ <% + String resultado = ""+tacon.getAutorizacion(); + //resultado = (resultado.length()<8)?"0"+resultado:resultado; + File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf"); + if(fichero.exists()) + { + %>
+ + +
<% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf+Integer.valueOf(tacon.getAutorizacion()).toString()+".PDF"); + if(fichero.exists()) + { + %>
+ + +
<% + } + else + { + %>

<%=pertamensaje.obtenerMensaje(15).getMensaje() %>

<% + } + } + + %> +
<%=pertamensaje.obtenerMensaje(14).getMensaje() %>
+ <% + } + else + { + %> +
<%=pertamensaje.obtenerMensaje(13).getMensaje() %>
<%=mensaje %>
+
+ + + +
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de autorizaciones (adm/mto_taconaut.jsp)"); +%> diff --git a/jsp/adm/mto_tamovext.jsp b/jsp/adm/mto_tamovext.jsp new file mode 100644 index 0000000..70136e5 --- /dev/null +++ b/jsp/adm/mto_tamovext.jsp @@ -0,0 +1,453 @@ +<%@ 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.io.*" %> + + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de de mantenimiento de actos imputados (adm/mto_tamovext.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 + { + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + int CampoMedico = 0; + String CampoFecha = ""; + String CampoApellido1 = ""; + String CampoApellido2 = ""; + String CampoNombre = ""; + int intPagina = 0; + int intEliminar = 0; + StringBuffer strSql = new StringBuffer(); + Object aCondiciones[] = null; + + //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 medico para las busquedas + if (request.getParameter("medico")!=null) + CampoMedico = Integer.parseInt(request.getParameter("medico")); + + //parametro fecha para las busquedas + if (request.getParameter("fecha")!=null) + CampoFecha = (String)request.getParameter("fecha"); + + //parametro apellido1 para las busquedas + if (request.getParameter("apellido1")!=null) + CampoApellido1 = (String)request.getParameter("apellido1"); + + //parametro apellido2 para las busquedas + if (request.getParameter("apellido2")!=null) + CampoApellido2 = (String)request.getParameter("apellido2"); + + //parametro nombre para las busquedas + if (request.getParameter("nombre")!=null) + CampoNombre = (String)request.getParameter("nombre"); + + //parametro pagina para realizar la paginacion + if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + + //parametro eliminar para eliminar un movimiento de tamovext + if (request.getParameter("eliminar")!=null) + intEliminar=Integer.parseInt(request.getParameter("eliminar")); + + 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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; +%> + + + +Mantenimiento autorizaciones + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + +
+ + + + + + + + +
+
+ + + + + +
+
+ + <% + if (intEliminar == 1) + { + int intMedico=Integer.parseInt(request.getParameter("hiddenMedico")); + int intActo=Integer.parseInt(request.getParameter("hiddenActo")); + int intEspe=Integer.parseInt(request.getParameter("hiddenEspecialidad")); + int intNumseq=Integer.parseInt(request.getParameter("hiddenNumseq")); + int intColec=Integer.parseInt(request.getParameter("hiddenColectivo")); + int intPoliza=Integer.parseInt(request.getParameter("hiddenPoliza")); + int intOrden=Integer.parseInt(request.getParameter("hiddenOrden")); + String strFecha=(String)(request.getParameter("hiddenFecha")); + + PersistenciaTamovext pert = new PersistenciaTamovext(); + boolean resultado = false; + resultado = pert.EliminarMovimientoImputado(intMedico, intEspe, intActo, intNumseq, intColec, intPoliza, intOrden, strFecha); + intEliminar=0; + } + + %> + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ <%=pertamensaje.obtenerMensaje(20).getMensaje() %> + + value="<%=CampoMedico %>"<%}%>/> +
+ <%=pertamensaje.obtenerMensaje(25).getMensaje() %> + + value="<%=CampoFecha %>"<%}%>/> +
+ + + value="<%=CampoApellido1 %>"<%}%>/> +
+ + + value="<%=CampoApellido2 %>"<%}%>/> +
+ + + value="<%=CampoNombre %>"<%}%>/> +
+ <%=pertamensaje.obtenerMensaje(24).getMensaje() %> +
 
+ + <%if(CampoMedico > 0) + { + PersistenciaTamovext per = new PersistenciaTamovext(); + Vector vSeleccion = per.MovimientosImputados(intPagina,CampoMedico,CampoFecha,CampoApellido1,CampoApellido2,CampoNombre); + if(vSeleccion.size()>0) + { + LogTarisan.logger.log(NivelLog.DEBUG, "Los movimientos del medico "+CampoMedico+" estan en tamovext"); + %> + + <%if (intPagina != 0){ %> + + + + <% }%> + + + + + + + + <% + String estilo = ""; + for(int i=0;i + + + + + + <%if ((Integer.valueOf(aResultados[3].toString())) != 32){ %> + + <% }else { %> + + <%} %> + + + <% + } + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + } //fin if(pagina!=0) %> +
Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
MédicoFechaActoAseguradoEliminar
<%= aResultados[0] %><%= aResultados[1] %> <%= aResultados[2] %><%= aResultados[4] +" "+ aResultados[5] +", "+ aResultados[6]%> EliminarAdeslas
+ + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
+
+ <% + }else{ + %> + + + + +
<%=pertamensaje.obtenerMensaje(29).getMensaje() %>
+ <% + } + } + %> +
+
+ + + +
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de actos imputados (adm/mto_tamovext.jsp)"); +%> diff --git a/jsp/adm/otras_autorizaciones.jsp b/jsp/adm/otras_autorizaciones.jsp new file mode 100644 index 0000000..252fc77 --- /dev/null +++ b/jsp/adm/otras_autorizaciones.jsp @@ -0,0 +1,233 @@ +<%@ 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 de mantenimiento de autorizaciones (adm/movimientos_tamovext.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 + { + try + { + //Obtención del perfil del usuario conectado + LogTarisan.logger.log(NivelLog.DEBUG, "Llega 27"); + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + String mensaje = ""; + long CampoAutorizacion = 0; + int intPagina = 0; + StringBuffer strSql = new StringBuffer(); + Object aCondiciones[] = null; + LogTarisan.logger.log(NivelLog.DEBUG, "Llega 40"); + //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 apellido para las busquedas + if (request.getParameter("num_aut")!=null) + CampoAutorizacion = Long.parseLong(request.getParameter("num_aut")); + + //parametro pagina para realizar la paginacion + if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + + if(sesion.getAttribute("MENSAJE")!=null) + { + mensaje=(String)sesion.getAttribute("MENSAJE"); + sesion.removeAttribute("MENSAJE"); + } + LogTarisan.logger.log(NivelLog.DEBUG, "Llega 62"); + + boolean mostrarNoticia = true; + PersistenciaTanoticias perTaNo = new PersistenciaTanoticias(); + Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera(); + Vector vNoticias = new Vector(); + String strNoticia = ""; + String noticias =""; + String espacio = ""; + for(int x = 0; x < 100; x++){ + espacio = espacio + " "; + } + 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 + espacio + tanoticia.getNoticia(); + }else{ + strNoticia = tanoticia.getNoticia(); + } + strNoticia = strNoticia.replaceAll("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; +%> + + + +Mantenimiento autorizaciones + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + + +
+ + + + + + + + +
+
+ + + + + + + +
+
+ <%PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut(); + Vector resul = perttmov.ObtenerAutorizacionesPoliza(CampoAutorizacion); + %> +
+ + <% + if(resul != null) + { + if(resul.size()>0) + { + %> + + <% + for(int i=0; i + + <% + } + } + } + else + { + %> + + <% + } + %> +
AutorizacionFechaEspecialidadMédicoDetalles
<%=ttmov.get_autorizacion() %><%=Utilidades.formatear_fecha(ttmov.get_fecha_autorizacion()) %><%=ttmov.get_especialidad1() %><%=ttmov.get_medico() %>Ver
No se han encontrado autorizaciones
para este asegurado
+
+
+
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de mantenimiento de autorizaciones (adm/movimientos_tamovext.jsp)"); +%> \ No newline at end of file diff --git a/jsp/adm/poner_en_produccion.jsp b/jsp/adm/poner_en_produccion.jsp new file mode 100644 index 0000000..c6c7698 --- /dev/null +++ b/jsp/adm/poner_en_produccion.jsp @@ -0,0 +1,236 @@ +<%@ 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.io.BufferedWriter" %> +<%@ page import="java.io.File" %> +<%@ page import="java.io.FileWriter" %> +<%@ page import="java.io.IOException" %> + + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de poner cambios en producción (adm/poner_en_produccion.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 + { + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + // Definicion de variables + String strParametroMenu = ""; + int intCrearArchivo = 0; + int intPagina = 0; + int intMensaje = 0; + String strMensaje = ""; + + //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 crearArchivo + if (request.getParameter("crearArchivo")!=null) + intCrearArchivo=Integer.parseInt(request.getParameter("crearArchivo")); + + 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("
", " "); + } + } + //Lo pongo a false para que no salga la noticia + mostrarNoticia = false; + + if (intCrearArchivo==1){ + + String ruta = "/tmp/ponerCambios/semaforo.txt"; + File archivo = new File(ruta); + BufferedWriter bw; + if(archivo.exists()) { + intMensaje = 1; + strMensaje = "¡El archivo ya existe!"; + } else { + bw = new BufferedWriter(new FileWriter(archivo)); + bw.write("Este archivo indica que hay cambios para poner en Tarisan. "); + bw.write("Por la noche se ejecutará un corntab que subirá los cambios a producción. "); + bw.write("El crontab ejecuta /root/tarisan_en_produccion_crontab.sh"); + bw.close(); + intMensaje = 1; + strMensaje = "¡Archivo creado correctamente!"; + } + + } +%> + + + +Mantenimiento de Analíticas + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
<%= sesion.getAttribute("USUARIO") %>
+
+
+
+

<%=strNoticia %>

+
+
+
+
+ + + + + + +
+ +
+ + + + + + + + +
+ + + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + <% + if (intMensaje == 1){ + %> + + + + + <% + } + %> +

PONER CAMBIOS EN PRODUCCIÓN

Genera el archivo /tmp/ponerCambios/semaforo.txt. Hay un crontab que se ejecuta cada noche y sube los cambios simepre que encuentre el archivo.

El crontab ejecuta el archivo /root/tarisan_en_produccion_crontab.sh

<%=strMensaje %>

+
+
+ + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de poner cambios en producción (adm/poner_en_produccion.jsp)"); +%> diff --git a/jsp/adm/simulado.jsp b/jsp/adm/simulado.jsp new file mode 100644 index 0000000..ce96105 --- /dev/null +++ b/jsp/adm/simulado.jsp @@ -0,0 +1,131 @@ +<%@ 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.io.*" %> + +<% + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + int usuario = 0; + String strusu = ""; + + //parametro usuario + strusu = sesion.getAttribute("U").toString(); + usuario = Integer.parseInt(strusu); + +%> + + + +Simulación usuarios + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
SIMULACIÓN DE USUARIOS
+
+ + + + + + + + + + +
+ Usuario: + + +
+ Entrar  Cancelar +
+
+
+
+
+
+ + + diff --git a/jsp/cambio_clave.jsp b/jsp/cambio_clave.jsp new file mode 100644 index 0000000..997bd8a --- /dev/null +++ b/jsp/cambio_clave.jsp @@ -0,0 +1,178 @@ +<%@ 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" %> + +<% + 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, "Sesion invalidada"); + response.sendRedirect("../html/login.html"); + } + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio pagina de cambio de clave (cambio_clave.jsp)"); + + try + { + + Tamensaje tamensaje = new Tamensaje(); + PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); +%> + + + +Cambio de clave + + + + + + + + + + +
+ + + + + + +
+ + +
<%= sesion.getAttribute("USUARIO") %>
+
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + +
+
+
+ + + + + + + +
+
+ + + + + + + + + + + + + +
 
Por favor introduzca su nueva clave de acceso
 
+ + + + + + + + + + + + + +
Clave nueva:
Confirmar clave:
Deshacer   Aceptar   <%=pertamensaje.obtenerMensaje(30).getMensaje() %>
+
+
+
+
+ + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); + sesion.setAttribute("ERROR", "Error en la presentacion de la pagina al usuario."); + response.sendRedirect("./error.jsp"); + } + } + LogTarisan.logger.log(NivelLog.INFO, "Final pagina de cambio de clave (cambio_clave.jsp)"); +%> diff --git a/jsp/entorno_grafico.jsp b/jsp/entorno_grafico.jsp new file mode 100644 index 0000000..301749c --- /dev/null +++ b/jsp/entorno_grafico.jsp @@ -0,0 +1,193 @@ +<%@ page import="java.util.Calendar" %> +<%@ page import="java.util.Date" %> +<%@ page import="java.util.Vector" %> + +<%@ page import="java.awt.Button" %> +<%@ page import="java.awt.Color" %> +<%@ page import="java.awt.Font" %> +<%@ page import="java.awt.Frame" %> +<%@ page import="java.awt.GraphicsEnvironment" %> +<%@ page import="java.awt.GraphicsConfiguration" %> +<%@ page import="java.awt.GraphicsDevice" %> +<%@ page import="java.awt.GraphicsConfigTemplate" %> +<%@ page import="java.awt.TextField" %> + +<%@ page import="javax.swing.JFrame" %> +<%@ page import="java.awt.Canvas" %> +<%@ page import="java.awt.Rectangle" %> + + + + + +Entorno gráfico + + + +<% +Date fecha = new Date(); +Calendar calendario = Calendar.getInstance(); +calendario.setTime(fecha); + +String dia = String.valueOf(calendario.get(Calendar.DATE)); +if(dia.length() == 1) +{ + dia = "0" + dia; +} +String mes = String.valueOf(calendario.get(Calendar.MONTH) + 1); +if(mes.length() == 1) +{ + mes = "0" + mes; +} +String ano = String.valueOf(calendario.get(Calendar.YEAR)); +String hora = String.valueOf(calendario.get(Calendar.HOUR_OF_DAY)); +if(hora.length() == 1) +{ + hora = "0" + hora; +} +String minutos = String.valueOf(calendario.get(Calendar.MINUTE)); +if(minutos.length() == 1) +{ + minutos = "0" + minutos; +} +String segundos = String.valueOf(calendario.get(Calendar.SECOND)); +if(segundos.length() == 1) +{ + segundos = "0" + segundos; +} + +out.print("
"); +out.print("Fecha = " + dia + "/" + mes + "/" + ano); +out.print("    "); +out.print("Hora = " + hora + ":" + minutos + ":" + segundos); +out.print("
"); +%> + + +Entorno gráfico +
+ +<% + + out.println("
    "); + out.println("
  • awt.toolkit: " + System.getProperties().get("awt.toolkit")); + out.println("
  • java.awt.graphicsenv: " + System.getProperties().get("java.awt.graphicsenv")); + + out.println("
"); + + + try + { + out.println("
    "); + + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + out.println("
  • GraphicsEnvironment --> " + ge); + out.println("
"); + + GraphicsDevice gd = ge.getDefaultScreenDevice(); + out.println("
    "); + out.println("
  • GraphicsDevice default--> " + gd); + out.println("
"); + + GraphicsDevice[] gds = ge.getScreenDevices(); + GraphicsConfiguration[] gc = null; + GraphicsConfiguration bestGc = null; + out.println("
    "); + for(int i = 0; i < gds.length; i++) + { + out.println("
  • GraphicsDevice[" + i + "] --> " + gds[i] + "; getType()=" + gds[i].getType() + "; getIDstring()=" + gds[i].getIDstring()); + gc = gds[i].getConfigurations(); + out.println("
      "); + for(int j = 0; j < gc.length; j++) + { + out.println("
    • GraphicsConfiguration[" + j + "] --> " + gc[j] + "; getColorModel()=" + gc[j].getColorModel() + "; getDevice()=" + gc[j].getDevice()); + } + out.println("
    • GraphicsConfiguration default --> " + gds[i].getDefaultConfiguration()); + out.println("
    "); + } + out.println("
"); + + Font[] fuentes = ge.getAllFonts(); + out.println("
    "); + for(int i = 0; i < fuentes.length; i++) + { + out.println("
  • Fuente[" + i + "] --> nombre:" + fuentes[i].getFontName() + ", familia " + fuentes[i].getFamily()); + } + out.println("
"); + + String[] familias = ge.getAvailableFontFamilyNames(); + out.println("
    "); + for(int i = 0; i < familias.length; i++) + { + out.println("
  • Familia[" + i + "] --> " + familias[i]); + } + out.println("
"); + } + catch(Throwable ex) + { + out.println("
  • Excepción en manejo de entorno gráfico: " + ex); + } + + + + out.println("
    "); + out.println("Prueba de clases de java.awt"); + out.println("
      "); + + try + { + Color color = new Color(100, 125, 12); + out.println("
    • Color --> " + color); + } + catch(Throwable ex) + { + out.println("
    • Excepción en Color --> " + ex); + } + + try + { + Frame ventana = new Frame("ventana de prueba"); + out.println("
    • Frame --> " + ventana); + } + catch(Throwable ex) + { + out.println("
    • Excepción en Frame --> " + ex); + } + + try + { + Button boton = new Button("botón de prueba"); + out.println("
    • Button --> " + boton); + } + catch(Throwable ex) + { + out.println("
    • Excepción en Button --> " + ex); + } + + try + { + Font fuente = new Font("LucidaSansRegular", Font.PLAIN, 12); + out.println("
    • Fuente --> " + fuente); + } + catch(Throwable ex) + { + out.println("
    • Excepción en Font --> " + ex); + } + + try + { + TextField campo = new TextField("campo de texto"); + out.println("
    • TextField --> " + campo); + } + catch(Throwable ex) + { + out.println("
    • Excepción en TextField --> " + ex); + } + + out.println("
    "); + +%> + +
    + + \ No newline at end of file diff --git a/jsp/error.jsp b/jsp/error.jsp new file mode 100644 index 0000000..dae7d67 --- /dev/null +++ b/jsp/error.jsp @@ -0,0 +1,247 @@ +<%@ page import="com.tarisan.data.Usuario" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.util.Utilidades" %> +<%@ page import="com.tarisan.control.*" %> +<%@ page import="com.tarisan.data.*" %> +<%@ page import="java.util.Vector" %> +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de error (error.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("ERROR") == 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 error (error.jsp)"); + + String mensaje = null; + String vuelta = null; + String vuelta_dental = null; + String destino = null; + + mensaje = (String)sesion.getAttribute("ERROR"); + if(mensaje == null || (mensaje.trim().compareTo("") == 0)) + { + mensaje = "Se ha producido un error al realizar la consulta"; + } + sesion.removeAttribute("ERROR"); + + vuelta = (String)sesion.getAttribute("VUELTA"); + if(vuelta == null) + { + destino = "javascript:history.back();"; + } + else + { + destino = "../jsp/pac/facturacion_odon.jsp?x=1&pagina=1"; + } + vuelta_dental = (String)sesion.getAttribute("VUELTA_DENTAL"); + if(vuelta_dental == null) + { + destino = "javascript:history.back();"; + } + else + { + destino = "../jsp/pac/estomatologia.jsp?x=1&pagina=1"; + } + + Usuario usuario = (Usuario)sesion.getAttribute("USUARIO"); + + Tamensaje tamensaje = new Tamensaje(); + PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + + boolean mostrarNoticia = true; + String strNoticia = ""; + if(usuario == null) + { + mostrarNoticia = false; + }else{ + PersistenciaTanoticias perTaNo = new PersistenciaTanoticias(); + Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera(); + Vector vNoticias = new Vector(); + 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("
    ", " "); + } + } + } + +%> + + + +Error en Tarisan + + + + + + + + + + +
    + + + + + +
    + + + <% + if(usuario == null) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + + + +
     <%= usuario %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + + +
    +
    +
    + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
     
    <%= mensaje %>
     
    Contacte con el administrador del sistema
     
    <%=pertamensaje.obtenerMensaje(30).getMensaje() %>
    +
    +
    +
    + + + +<% + } + LogTarisan.logger.log(NivelLog.INFO, "Final página de error (error.jsp)"); +%> + diff --git a/jsp/errorIguala.jsp b/jsp/errorIguala.jsp new file mode 100644 index 0000000..118199b --- /dev/null +++ b/jsp/errorIguala.jsp @@ -0,0 +1,223 @@ +<%@ page import="com.tarisan.data.Usuario" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.util.Utilidades" %> +<%@ page import="com.tarisan.control.*" %> +<%@ page import="com.tarisan.data.*" %> +<%@ page import="java.util.Vector" %> +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página de error (errorIguala.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("ERROR") == 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 error (errorIguala.jsp)"); + + String mensaje = null; + + Tamensaje tamensaje = new Tamensaje(); + PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + + mensaje = (String)sesion.getAttribute("ERROR"); + if(mensaje == null || (mensaje.trim().compareTo("") == 0)) + { + mensaje = pertamensaje.obtenerMensaje(12).getMensaje() ; + } + sesion.removeAttribute("ERROR"); + + Usuario usuario = (Usuario)sesion.getAttribute("USUARIO"); + + boolean mostrarNoticia = true; + String strNoticia = ""; + if(usuario == null) + { + mostrarNoticia = false; + }else{ + PersistenciaTanoticias perTaNo = new PersistenciaTanoticias(); + Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera(); + Vector vNoticias = new Vector(); + 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("
    ", " "); + } + } + } +%> + + + +Error en Tarisan + + + + + + + + + + +
    + + + + + +
    + + + <% + if(usuario == null) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + + + +
     <%= usuario %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + + +
    +
    +
    + + + + + + +
    +
    + + + + + + + + + + + + + + + +
     
    <%= mensaje %>
     
    <%=pertamensaje.obtenerMensaje(32).getMensaje() %>
     
    <%=pertamensaje.obtenerMensaje(30).getMensaje() %>
    +
    +
    +
    + + + +<% + } + LogTarisan.logger.log(NivelLog.INFO, "Final página de error (errorIguala.jsp)"); +%> + diff --git a/jsp/hora.jsp b/jsp/hora.jsp new file mode 100644 index 0000000..1828367 --- /dev/null +++ b/jsp/hora.jsp @@ -0,0 +1,51 @@ + +<%@ page import="java.util.Date" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.util.GregorianCalendar" %> +<%@ page import="java.util.TimeZone" %> +<%@ page import="java.util.*" %> + +<% +Date fecha = new Date(); +Calendar calendario = Calendar.getInstance(); +calendario.setTime(fecha); +java.util.TimeZone tZone = TimeZone.getTimeZone("Europe/Madrid"); + tZone.setID("Europe/Madrid"); + tZone.setDefault(tZone); + Locale loCurrentLocale = new Locale("ES", "ES"); + GregorianCalendar gcHoy = new GregorianCalendar( tZone, loCurrentLocale); +%> + + + Control de Horas + + + + + + + +
    +Hora del Calendar: <%=calendario.getTime()%> + +
    +Hora del Calendar (con TimeZone): <%=calendario.getTime()%> + +
    +Hora del Date: <%=fecha%> + + + diff --git a/jsp/imp/impAutorizacion.jsp b/jsp/imp/impAutorizacion.jsp new file mode 100644 index 0000000..84718e8 --- /dev/null +++ b/jsp/imp/impAutorizacion.jsp @@ -0,0 +1,174 @@ +<%@ page import="com.tarisan.control.ParametrosConfiguracion" %> +<%@ page import="com.tarisan.data.Paciente" %> +<%@ page import="com.tarisan.data.Usuario" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="com.tarisan.util.Utilidades" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de peticion de autorizacion (imp/impAutorizacion.jsp)"); + + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + + try + { +// Definicion de variables +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy"); +java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime()); +String strMensajeSinElementos="No ha seleccionado ningún acto médico."; +String strAutorizacion = (String)request.getParameter("autorizacion"); +String strCentro = (String)request.getParameter("centro"); +%> + + + +Impresión Autorización + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    <%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%>
    +

    + + + + + + + + + + + + + + + + + + +
    Nº de póliza:<%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%>   <%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%>
    <%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%> + + + + + +
    Nº Solicitud:<%=strAutorizacion%>
    +
     
    Ruego faciliten las siguientes autorizaciones:
    +
    +
    +
    + + + + +
    <%=strCentro%>
    +
    + + + + + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); +%> + +<% + } + + LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de peticion de autorizacion (imp/impAutorizacion.jsp)"); +%> diff --git a/jsp/imp/impDetallePacientes.jsp b/jsp/imp/impDetallePacientes.jsp new file mode 100644 index 0000000..be3d238 --- /dev/null +++ b/jsp/imp/impDetallePacientes.jsp @@ -0,0 +1,140 @@ +<%@ page import="com.tarisan.control.*" %> +<%@ page import="com.tarisan.data.*" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="java.util.Vector" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.util.Utilidades" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.text.SimpleDateFormat" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de pacientes (imp/impDetallePacientes.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"); +%> + +<% + } + else + { + try + { +// Definicion de variables +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas); + +String strFecha = (String)request.getParameter("fecha"); +String[] arrFecha = strFecha.split("-"); +java.sql.Date dtFecha = new java.sql.Date(java.sql.Date.valueOf(arrFecha[2] + "-" + arrFecha[1] + "-" + arrFecha[0]).getTime()); +double dblImporteTotal=0; + +%> + + + +Impresión Detalle Pacientes + + + + + + + + + + + + + + + + + + + + + + + + + +<% + + PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient(); + + Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + Integer especialidad = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + Vector vSeleccion = per.detalle_pacientes(medico, especialidad, dtFecha); + + + VTamovextTaclient vTamovextTaclient = null; + for(int i = 0; i < vSeleccion.size(); i++) + { + vTamovextTaclient = (VTamovextTaclient)vSeleccion.elementAt(i); + dblImporteTotal+=vTamovextTaclient.getPrecioActoMedico(); +%> + + + + + +<% + } +%> + + + + + + + + + + + +

    --- RELAción ACTOS MédicoS REALIZADOS ---
    + + + + + + + +
    FECHA:<%=strFecha%>      <%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%>
    +

    Nombre PacienteActo realizadoImporte

    <%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%><%=vTamovextTaclient.getDescripcionActoMedico()%><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%>
     
     
    Importe ....<%=Utilidades.formatearDouble(dblImporteTotal,PersistenciaParametros.decimales)%>
    + + + + + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); +%> + +<% + } + } + LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de pacientes (imp/impDetallePacientes.jsp)"); +%> diff --git a/jsp/imp/impDiagnostico.jsp b/jsp/imp/impDiagnostico.jsp new file mode 100644 index 0000000..0159fd8 --- /dev/null +++ b/jsp/imp/impDiagnostico.jsp @@ -0,0 +1,164 @@ +<%@ page import="com.tarisan.control.ParametrosConfiguracion" %> +<%@ page import="com.tarisan.data.Paciente" %> +<%@ page import="com.tarisan.data.Usuario" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="com.tarisan.util.Utilidades" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de diagnostico (imp/impDiagnostico.jsp)"); + + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + + try + { +// Definicion de variables +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy"); +java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime()); +String strMensajeSinElementos="No ha seleccionado ningún acto médico."; +String strAutorizacion = (String)request.getParameter("autorizacion"); +%> + + + +Impresión Diagnóstico + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    <%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%>
    +

    + + + + + + + + + + + + + + + + + + +
    Nº de póliza:<%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%>   <%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%>
    <%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%> + + + + + +
    Nº Autorización:<%=strAutorizacion%>
    +
     
    Ruego faciliten las siguientes exploraciones:
    +
    +
    +
    + + + + + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); +%> + +<% + } + + LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de diagnostico (imp/impDiagnostico.jsp)"); +%> diff --git a/jsp/imp/impEspecialidades.jsp b/jsp/imp/impEspecialidades.jsp new file mode 100644 index 0000000..98fda89 --- /dev/null +++ b/jsp/imp/impEspecialidades.jsp @@ -0,0 +1,164 @@ +<%@ page import="com.tarisan.control.ParametrosConfiguracion" %> +<%@ page import="com.tarisan.data.Paciente" %> +<%@ page import="com.tarisan.data.Usuario" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="com.tarisan.util.Utilidades" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de especialidades (imp/impEspecialidades.jsp)"); + + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + + try + { +// Definicion de variables +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy"); +java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime()); +String strMensajeSinElementos="No ha seleccionado ningún acto médico."; +String strAutorizacion = (String)request.getParameter("autorizacion"); +%> + + + +Impresión Especialidades + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    <%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%>
    +

    + + + + + + + + + + + + + + + + + + +
    Nº de póliza:<%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%>   <%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%>
    <%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%> + + + + + +
    Nº Autorización:<%=strAutorizacion%>
    +
     
    Ruego autoricen las siguientes exploraciones:
    +
    +
    +
    + + + + + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); +%> + +<% + } + + LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de especialidades (imp/impEspecialidades.jsp)"); +%> diff --git a/jsp/imp/impFacturacion.jsp b/jsp/imp/impFacturacion.jsp new file mode 100644 index 0000000..5306039 --- /dev/null +++ b/jsp/imp/impFacturacion.jsp @@ -0,0 +1,131 @@ +<%@ page import="com.tarisan.control.ParametrosConfiguracion" %> +<%@ page import="com.tarisan.data.Paciente" %> +<%@ page import="com.tarisan.data.Usuario" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="com.tarisan.util.Utilidades" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de facturacion (imp/impFacturacion.jsp)"); + + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + + try + { +// Definicion de variables +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy"); +java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime()); +String strMensajeSinElementos="No ha seleccionado ningún acto médico."; +%> + + + +Impresión Facturación + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    <%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%>
    +

    + + + + + + + + + + + + + + + + + +
    Nº de póliza:<%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%>   <%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%>
    <%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%>
     
    Asistencia prestada
    +
    +
    +
    + + + + + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); +%> + +<% + } + + LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de facturacion (imp/impFacturacion.jsp)"); +%> diff --git a/jsp/imp/impRecetas.jsp b/jsp/imp/impRecetas.jsp new file mode 100644 index 0000000..6c7ef05 --- /dev/null +++ b/jsp/imp/impRecetas.jsp @@ -0,0 +1,156 @@ +<%@ page import="com.tarisan.control.ParametrosConfiguracion" %> +<%@ page import="com.tarisan.data.Paciente" %> +<%@ page import="com.tarisan.data.Usuario" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="com.tarisan.util.Utilidades" %> + +<% + LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de recetas (imp/impRecetas.jsp)"); + + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + + try + { +// Definicion de variables +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat("dd/MM/yyyy"); +java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime()); +String strMensajeSinElementos="No ha seleccionado ningún acto médico."; +%> + + + +Impresión Recetas + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    <%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%>
    <%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%>
    +

    + + + + + + + + + + + + + + + + + +
    Nº de póliza:<%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%>   <%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%>
    <%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%>
     
    DP./
    +
    +
    +
    + + + + + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex); +%> + +<% + } + + LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de recetas (imp/impRecetas.jsp)"); +%> diff --git a/jsp/listado_session.jsp b/jsp/listado_session.jsp new file mode 100644 index 0000000..0a62283 --- /dev/null +++ b/jsp/listado_session.jsp @@ -0,0 +1,154 @@ +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Enumeration" %> +<%@ page import="java.util.Date" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.util.Vector" %> +<%@ page import="java.io.ByteArrayOutputStream" %> +<%@ page import="java.io.ObjectOutputStream" %> +<%@ page import="java.io.NotSerializableException" %> + + + + +<% + Date fecha = null; + SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss"); + Calendar calendario = Calendar.getInstance(); + + out.print("
    "); + out.print("Fecha = " + sdf.format(calendario.getTime())); + out.print("
    "); + + HttpSession miSession = request.getSession(true); + Object valor = null; + int total = 0; + Vector salidaListado; + StringBuffer elementoListado; + String nombre; + + Enumeration listaSession = miSession.getAttributeNames(); + + out.print("
    "); + out.print("LISTADO DE LOS OBJETOS DE SESIÓN
    "); + if((listaSession != null) && (listaSession.hasMoreElements())) + { + out.println("
      " ); + ByteArrayOutputStream o; + ObjectOutputStream buf; + boolean serial; + salidaListado = new Vector(); + + for(; listaSession.hasMoreElements();) + { + serial = false; + nombre = (String)listaSession.nextElement(); + + elementoListado = new StringBuffer(); + elementoListado.append("
    • "); + elementoListado.append(nombre); + elementoListado.append(""); + + valor = miSession.getAttribute(nombre); + elementoListado.append(" --> "); + elementoListado.append(valor.getClass().getName()); + elementoListado.append(" --> "); + elementoListado.append(valor); + + try + { + o = new ByteArrayOutputStream(); + buf = new ObjectOutputStream(o); + buf.writeObject(valor); + buf.flush(); + elementoListado.append(" --> "); + elementoListado.append(o.size()); + elementoListado.append(" bytes"); + total += o.size(); + } + catch(NotSerializableException ex) + { + elementoListado.append(" --> ??? bytes"); + } + salidaListado.addElement(elementoListado.toString()); + } + o = null; + buf = null; + + for(int ind = 0; ind < salidaListado.size(); ind++) + { + out.println((String)salidaListado.elementAt(ind)); + } + + out.println("
    " ); + out.println( "TOTAL(aproximado) = " + total + " bytes" ); + } + else + { + out.println( "No existen objetos almacenados en la sesión" ); + } + + + out.print("
    "); + out.print("
    "); + out.print("LISTADO DE LAS COOKIES
    "); + + Cookie[] listaCookies = request.getCookies(); + + if((listaCookies != null) && (listaCookies.length > 0)) + { + Cookie unaCookie; + int duracion; + salidaListado = new Vector(); + + out.println("
      " ); + + for(int ind = 0; ind < listaCookies.length; ind++) + { + unaCookie = listaCookies[ind]; + + elementoListado = new StringBuffer(); + elementoListado.append("
    • "); + elementoListado.append(unaCookie.getName()); + elementoListado.append(" --> "); + elementoListado.append(unaCookie.getValue()); + + duracion = unaCookie.getMaxAge(); + + elementoListado.append(" [duración = "); + if (duracion >= 0) + { + fecha.setTime((long)(duracion*1000)); + calendario.setTime(fecha); + + elementoListado.append(calendario.get(Calendar.HOUR_OF_DAY)); + elementoListado.append("h."); + elementoListado.append(calendario.get(Calendar.MINUTE)); + elementoListado.append("m."); + elementoListado.append(calendario.get(Calendar.SECOND)); + elementoListado.append("s."); + elementoListado.append(calendario.get(Calendar.MILLISECOND)); + elementoListado.append("ms"); + elementoListado.append("]"); + } + else + { + elementoListado.append("hasta que se cierre el navegador]"); + } + salidaListado.addElement(elementoListado.toString()); + } + + for(int ind = 0; ind < salidaListado.size(); ind++) + { + out.println((String)salidaListado.elementAt(ind)); + } + + out.println("
    " ); + } + else + { + out.println( "No existen cookies" ); + } + +%> + + \ No newline at end of file diff --git a/jsp/med/actos.jsp b/jsp/med/actos.jsp new file mode 100644 index 0000000..a58a4e1 --- /dev/null +++ b/jsp/med/actos.jsp @@ -0,0 +1,343 @@ +<%@ 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" %> + +<% + /* LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de actos médicos (med/actos.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 actos médicos (med/actos.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strCampoNombre=""; +StringBuffer strSql = new StringBuffer(); +int intPagina=0; +Object aCondiciones[]=null; +int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa(); +int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + +//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(); + +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("
    ", " "); + } +} + +%> + + + +Actos Médicos + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + + + + +<% + + + PersistenciaTtactmed per = new PersistenciaTtactmed(); + Vector vSeleccion = per.listadoActosMedico(intTarifa, intEspecialidad, strCampoNombre, intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + +<% + Ttactmed TTACTMED = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + TTACTMED = (Ttactmed)vSeleccion.elementAt(i); +%> + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
     
    + + + + + + + +
    Descripción:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    DescripciónCódigoImporte
    <%=TTACTMED.getDescripcion()%><%=TTACTMED.getActo()%><%=Utilidades.formatearDouble(TTACTMED.getPrecio(),PersistenciaParametros.decimales)%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    + + + +<% + } + 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 gestión de actos médicos (med/gestor.jsp)"); + } +%> diff --git a/jsp/med/analisis.jsp b/jsp/med/analisis.jsp new file mode 100644 index 0000000..b3c6c6c --- /dev/null +++ b/jsp/med/analisis.jsp @@ -0,0 +1,604 @@ +<%@ page import="com.tarisan.control.*" %> +<%@ page import="com.tarisan.control.PersistenciaVTaprescaTaclient" %> +<%@ 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.math.BigDecimal"%> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.io.*" %> + +<% + // LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de analisis (med/analisis.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 analisis (med/analisis.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strApe1=""; +String strApe2=""; +String strNom=""; +Calendar calFechaAnalisis = Calendar.getInstance(); +calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis); +java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime()); +StringBuffer strSql_requestid = new StringBuffer(); +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +int pteExtraccion = 0; /* Indica si la analítica esta pte de extraccion para indicarlo en el apartado de regenerar pdf */ +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas); +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 pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + +//parametro x para marcar la opcion del menu en la que se encuentra el usuario +if (request.getParameter("ap1")!=null) + strApe1=(String)request.getParameter("ap1"); + +//parametro x para marcar la opcion del menu en la que se encuentra el usuario +if (request.getParameter("ap2")!=null) + strApe2=(String)request.getParameter("ap2"); + +//parametro x para marcar la opcion del menu en la que se encuentra el usuario +if (request.getParameter("nom")!=null) + strNom=(String)request.getParameter("nom"); + +Tamensaje tamensaje = new Tamensaje(); +PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + /*Vector vTamensajes = new Vector(); +String strCodigos = "6,7"; +vTamensajes = pertamensaje.obtenerMensajes(strCodigos); + +pertamensaje.obtenerMensaje(10).getMensaje();*/ + +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("
    ", " "); + } +} + +%> + + + +Análisis + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    +
    + + + + + + + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + + PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico(); + //Vector vSeleccion = per.listado_analiticas_por_medico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), dtFechaAnalisis, intPagina); + Vector vSeleccion = per.listado_analiticas_por_medico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), dtFechaAnalisis, strApe1, strApe2, strNom, intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + //VTaresanaTaclient vTaresanaTaclient = null; + VTaresanaTamedico vTaresanaTamedico = 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); + vTaresanaTamedico = (VTaresanaTamedico)vSeleccion.elementAt(i); +%> + + <% + if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido. + { + %> + + + <% + } + else //campo autorizacion tiene un valor valido + { + %> + + + + + <% + strSql_requestid.delete(0,strSql_requestid.length()); + } + %> + +<% + } + + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
     
    + Apellido1: + + Apellido2: + + Nombre: + + Buscar +
     
    <%=pertamensaje.obtenerMensaje(10).getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    FechaNombreVer ResultadosRegenerar Resultados
    <%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%><%=/*vTaresanaTaclient.getNombre() + " " + */vTaresanaTamedico.getApellidos()%> + <% + String peticion = ""+vTaresanaTamedico.getAutorizacion(); + 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 + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%> + <% + } + } + %> +
    + <% + String nombreCompleto = ""; + if ((""+vTaresanaTamedico.getAutorizacion()).startsWith(""+((Usuario)sesion.getAttribute("USUARIO")).getMedico())){ + nombreCompleto = vTaresanaTamedico.getApellidos(); + }else{ + nombreCompleto = vTaresanaTamedico.getApellidos()+" "+vTaresanaTamedico.getNombre(); + } + ruta = ParametrosConfiguracion.ruta_pdf_peticiones_analiticas; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la nueva ubicación + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=nombreCompleto%> + <% + } + } + %> +
    + <% + String resultado = ""+vTaresanaTamedico.getAutorizacion(); + String resultadoE = vTaresanaTamedico.getAutorizacionEncriptada(); + String igualadaE = ""+vTaresanaTamedico.getIgualadaEncriptada(); + Usuario usu = (Usuario)sesion.getAttribute("USUARIO"); + + /*if(usu.getMedico() == vTaresanaTamedico.getPrescriptor()) + {*/ + + if (vTaresanaTamedico.getExtraccion()==0 || vTaresanaTamedico.getExtraccion()==2){ // Mirar si la analítica está pendiente de extracción + + if(vTaresanaTamedico.getIgualada().compareTo("0") != 0){ //Comprobar si se trata de una autorización que está en Tarisan y GPC + %> + +
    + + +
    + <% + }else{ + if(vTaresanaTamedico.isPeticionConGuion()) + { + LogTarisan.logger.log(NivelLog.DEBUG, "Autorizacion con guión"); + %> + +
    + + +
    + <% + } + else if(vTaresanaTamedico.getAutorizacion() < 999999 && !(vTaresanaTamedico.getAutorizacion()>700000 && vTaresanaTamedico.getAutorizacion()<799999)) + { + LogTarisan.logger.log(NivelLog.DEBUG, "Autorizacion < 999999"); + %> + +
    + + +
    + <% + } + else{ + + + //PAC.ruta_pdf + String direccion = ParametrosConfiguracion.ruta_pdf_resultados_analiticas; + File fichero = new File(direccion+resultado+".pdf"); + + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+resultado+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + direccion = ParametrosConfiguracion.ruta_pdf_resultados; + fichero = new File(direccion+resultado+".pdf"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+resultado+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + %>

    <%=pertamensaje.obtenerMensaje(6).getMensaje() %>

    <% //Resultados Pendientes + } + } + } + } + } + } + }else if(vTaresanaTamedico.getExtraccion()==3){ + /* Controlamos las peticiones anuladas desde GPC */ + pteExtraccion = 3; + %>

    Petición anulada en GPC

    <% + } + + else { + pteExtraccion = 1; + %>

    Pendiente de Extracción

    <% + } + + %> +
    + <% + if(usu.getMedico() == vTaresanaTamedico.getPrescriptor() && pteExtraccion==0) + { + if(vTaresanaTamedico.getIgualada().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"); + %> +
    + + + +
    + <% + }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"); + %> +
    + + + +
    + <% + }else{ + %>

    PDF no regenerable

    <% + } + } + } + else + { + pteExtraccion = 0; + %>

    PDF no regenerable

    <%//Pendiente de Autorización del paciente + } + %> +
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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 analisis (med/analisis.jsp)"); + } +%> diff --git a/jsp/med/ap.jsp b/jsp/med/ap.jsp new file mode 100644 index 0000000..dba84fc --- /dev/null +++ b/jsp/med/ap.jsp @@ -0,0 +1,509 @@ +<%@ page import="com.tarisan.control.*" %> +<%@ page import="com.tarisan.control.PersistenciaVTaprescaTaclient" %> +<%@ 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="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.sql.*" %> +<%@ page import="java.util.Vector" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.math.BigDecimal"%> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.io.*" %> + +<% + // LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de anatomía patológica (med/ap.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 anatomía patológica (med/ap.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +Calendar calFechaAnalisis = Calendar.getInstance(); +calFechaAnalisis.add(Calendar.MONTH, -ParametrosConfiguracion.periodoAnalisis); +java.sql.Date dtFechaAnalisis = new java.sql.Date(calFechaAnalisis.getTime().getTime()); +StringBuffer strSql_requestid = new StringBuffer(); +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas); +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 pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + +Tamensaje tamensaje = new Tamensaje(); +PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + /*Vector vTamensajes = new Vector(); +String strCodigos = "6,7"; +vTamensajes = pertamensaje.obtenerMensajes(strCodigos); + +pertamensaje.obtenerMensaje(10).getMensaje();*/ +boolean directorioListado = false; +Vector archivos = new Vector(); +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("
    ", " "); + } +} + +%> + + + +Anatomía Patológica + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    +
    + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + PersistenciaVTaprescaTamedico per = new PersistenciaVTaprescaTamedico(); + Vector vSeleccion = per.listado_anatomia_por_medico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), dtFechaAnalisis, intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + +<% + //VTaresanaTaclient vTaresanaTaclient = null; + VTaresanaTamedico vTaresanaTamedico = 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); + vTaresanaTamedico = (VTaresanaTamedico)vSeleccion.elementAt(i); +%> + + <% + if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido. + { + %> + + + <% + } + else //campo autorizacion tiene un valor valido + { + %> + + + + <% + strSql_requestid.delete(0,strSql_requestid.length()); + } + %> + +<% + } + + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <%=pertamensaje.obtenerMensaje(10).getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    FechaNombreVer Resultados
    <%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%><%=/*vTaresanaTaclient.getNombre() + " " + */vTaresanaTamedico.getApellidos()%> + <% + 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 + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%> + <% + } + } + %> +
    + <% + ruta = ParametrosConfiguracion.ruta_pdf_peticiones_ap; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la nueva ubicación + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=vTaresanaTamedico.getApellidos()%> + <% + } + } + %> +
    + <% + String resultado = ""+vTaresanaTamedico.getAutorizacion(); + String resultadoE = vTaresanaTamedico.getAutorizacionEncriptada(); + String igualadaE = ""+vTaresanaTamedico.getIgualadaEncriptada(); + Usuario usu = (Usuario)sesion.getAttribute("USUARIO"); + + if(usu.getMedico() == vTaresanaTamedico.getPrescriptor()) + { + if(vTaresanaTamedico.getEpisodio()!=0){ + String episodio = ""+vTaresanaTamedico.getEpisodio(); + String episodioE = ""+vTaresanaTamedico.getEpisodioEncriptado(); + String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia_CSM; + /*if (!directorioListado){ + archivos = Utilidades.buscar_ficheros_directorio(direccion); + directorioListado = true; + } + Vector children = Utilidades.buscar_ficheros_array(episodio, archivos);*/ + + /*String[] children = Utilidades.buscar_ficheros3(episodio,direccion);*/ + Vector children = Utilidades.buscar_ficheros(episodio,direccion); + + + if (children.size()==0) { + %>

    No hay PDF

    <% + } + else { + for (int f=0; f < children.size() ; f++) { + String filename = children.elementAt(f); + DES encrypter = new DES(""+((Usuario)sesion.getAttribute("USUARIO")).getMedico()); + String dirE = encrypter.encrypt(filename); + %>
    + + + + +
    <% + } + } + }else{ + //PAC.ruta_pdf + String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia; + File fichero = new File(direccion+resultado+".pdf"); + + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+resultado+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + direccion = ParametrosConfiguracion.ruta_pdf_resultados; + fichero = new File(direccion+resultado+".pdf"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+resultado+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + %>

    No hay PDF

    <% //Resultados Pendientes + } + } + } + } + } + } + else + { + %> +

    <%=pertamensaje.obtenerMensaje(7).getMensaje() %>

    + <% + } + %> +
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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 anatomía patológica (med/ap.jsp)"); + } +%> diff --git a/jsp/med/buscar_paciente.jsp b/jsp/med/buscar_paciente.jsp new file mode 100644 index 0000000..ae6d676 --- /dev/null +++ b/jsp/med/buscar_paciente.jsp @@ -0,0 +1,396 @@ +<%@ 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" %> + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página de peticiones capturadas (med/peticiones_capturadas.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 buscar pacientes (med/buscar_paciente.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strCampoFecha=""; +StringBuffer strSql = new StringBuffer(); +int intPagina=0; +int intBuscarPaciente=0; +String intIdentificador=""; +String troquelado = ""; +String mensajeNoEncontrado = ""; +Object aCondiciones[]=null; +int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa(); +int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + +//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("fecha")!=null) + strCampoFecha = (String)request.getParameter("fecha"); + +//parametro pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + +//parametro pagina para realizar la paginacion +if (request.getParameter("buscarPaciente")!=null) + intBuscarPaciente=Integer.parseInt(request.getParameter("buscarPaciente")); + +troquelado = (String)request.getParameter("troque"); + + +Tamensaje tamensaje = new Tamensaje(); +PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + +int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); +String ape = ""; +String nom = ""; +String dir = ""; +String fec = ""; +String tel = ""; +String nif = ""; +String ent = ""; +String tar = ""; + +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("
    ", " "); + } +} +%> + + + +Peticiones capturadas + + + + + + + + + + + + + +
    + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + <% + //Se ha pulsado en Buscar Paciente + + PersistenciaTapecap per = new PersistenciaTapecap(); + Tapecap tapecap = null; + Vector vSeleccion = per.buscarPaciente(troquelado, intPagina); + if (vSeleccion==null || vSeleccion.size()==0) //No se han encontrado datos + {%> + + + + + + +<% + } + else //no existe un analisis previo. Se muestran los datos de la prescripcion. + { + if (intPagina != 0){ //se tiene en cuenta la paginacion + %> + + + + <% + } + %> + + + + + + + + + + + + <% + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + + tapecap = (Tapecap)vSeleccion.elementAt(i); + if (tapecap.getApellidos()!=null){ + ape = tapecap.getApellidos(); + } + if (tapecap.getNombre()!=null){ + nom = tapecap.getNombre().trim(); + } + if (tapecap.getDireccion()!=null){ + dir = tapecap.getDireccion(); + } + if (tapecap.getFecha_nac()!=null){ + fec = tapecap.getFecha_nac().toString(); + /*fec = fec.replace('/','-');*/ + String[] arrFecha = fec.split("-"); + fec = arrFecha[2] + "-" + arrFecha[1] + "-" + arrFecha[0]; + } + if (tapecap.getTelefono()!=null){ + tel = tapecap.getTelefono().trim(); + } + if (tapecap.getNif()!=null){ + nif = tapecap.getNif().trim(); + } + if (tapecap.getCompañia()!=null){ + ent = tapecap.getCompañia(); + } + if (tapecap.getIdentificador()!=null){ + tar = tapecap.getIdentificador(); + } + %> + + + + + + + + + + + <% + } + %> + + <% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + } //fin if(pagina!=0) + } //fin else (vSeleccion.size()!=0) + %> + + + + + + + + + + + + + + + + + + + +
     
    No se ha encontrado el paciente
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    NombreDireccionFecha NacimientoTelefonoDniCompañiaTarjetaSeleccionar
    <%=nom + " " + ape%><%=dir%><%=fec%><%=tel%><%=nif%><%=ent%><%=tar%>Seleccionar
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
     
     
    +
    + +
    +
    +
    +
    +
    + + + +<% + } + 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 buscar pacientes (med/buscar_paciente.jsp)"); + } +%> diff --git a/jsp/med/cabecera.jsp b/jsp/med/cabecera.jsp new file mode 100644 index 0000000..abaad1b --- /dev/null +++ b/jsp/med/cabecera.jsp @@ -0,0 +1,426 @@ +<%@ 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.io.*" %> + +<% + // LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de cabecera (med/cabecera.jsp)"); + + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + + String mensaje = ""; + mensaje = (String)sesion.getAttribute("MSG"); + sesion.setAttribute("MSG", ""); + + 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 cabecera (med/cabecera.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +Usuario usuario = (Usuario)sesion.getAttribute("USUARIO"); +int intMedico=((Usuario)sesion.getAttribute("USUARIO")).getMedico(); +int intEspecialidad=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); +String strNombre = ""; +String strDireccion = ""; +String strPoblacion = ""; +String strTelefono = ""; +String strColegiado = ""; +String strEspe = ""; +String strErrorLogo = ""; +String strEmail = ""; +Integer intEmail = 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 err para controlar los errores del logotipo al subirlo al servidor +if (request.getParameter("err")!=null) + strErrorLogo=(String)request.getParameter("err"); + +//parametro intEmail para poner el focus en el email +if (request.getParameter("email")!=null){ + intEmail=Integer.parseInt(request.getParameter("email")); +} + + +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("
    ", " "); + } +} +%> + + + +Cabecera + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + + <%PersistenciaTamedico per = new PersistenciaTamedico(); %> + + + + + + + + +
    + <% + if (mensaje!="" && mensaje!=null){ //Mostrar mensaje de cambios guardados ok + %> +

    <%=mensaje %>

    + <% + } + %> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nombre:
    Dirección:
    Población:
    Teléfono:
    Email:
    Nº de colegiado:
    Especialidad:
    Deshacer   Aceptar
    +
    + +
    + Logotipo +
    +
    + Posición Recetas +
    + />IZQUIERDA
    + />DERECHA + +
    +
    +
    +
    +

    + + + + +

    + Eliminar +
    +
    + <% + File imagenJPG = new File(ParametrosConfiguracion.ruta_logotipos+"/"+intMedico+".jpg"); + File imagenPNG = new File(ParametrosConfiguracion.ruta_logotipos+"/"+intMedico+".png"); + File imagenGIF = new File(ParametrosConfiguracion.ruta_logotipos+"/"+intMedico+".gif"); + File imagenBMP = new File(ParametrosConfiguracion.ruta_logotipos+"/"+intMedico+".bmp"); + if(imagenJPG.exists()) + { + //mostrar el logotipo del médico + %> + + <% + }else if(imagenPNG.exists()) + { + %> + + <% + } + else if(imagenGIF.exists()) + { + %> + + <% + } + else if(imagenBMP.exists()) + { + %> + + <% + } + else{ + //mostrar cuadrado en blanco + %> + + <% + } + %> +
    +
    +
    + + + +
    +
    +
    +
    + + +<% if (intEmail==1)//Controlar si hay que poner el focus en algun textbox +{ + %> + + <% + intEmail=0; +} %> + +<% + } + 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 cabecera (med/cabecera.jsp)"); + } +%> diff --git a/jsp/med/detalleIRPF.jsp b/jsp/med/detalleIRPF.jsp new file mode 100644 index 0000000..d4aa326 --- /dev/null +++ b/jsp/med/detalleIRPF.jsp @@ -0,0 +1,363 @@ +<%@ 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.util.Calendar" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="com.tarisan.util.DES" %> + +<% + // LogTarisan.logger.log(NivelLog.INFO, "Inicio página detalle IRPF (med/detalleIRPF.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 detalle IRPF (med/detalleIRPF.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strCampoAnio=String.valueOf(Calendar.getInstance().get(Calendar.YEAR)); +StringBuffer strSql = new StringBuffer(); +int intPagina=0; +Object aCondiciones[]=null; +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas); + +//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("anio")!=null) + strCampoAnio = (String)request.getParameter("anio"); + +//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")); +} + +//atributo ENC que obtiene la peticion encriptada +String irpfE = ""; +if (sesion.getAttribute("ENC")!=null) { + irpfE = (String)sesion.getAttribute("ENC"); + sesion.removeAttribute("ENC"); +} + +Tamensaje tamensaje = new Tamensaje(); +PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + +boolean mostrarNoticia = true; +PersistenciaTanoticias perTaNo = new PersistenciaTanoticias(); +Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera(); +Vector vNoticias = new Vector(); +String strNoticia = ""; +String noticias =""; +String separador = " ---//--- "; +if(vSeleccionNot.size()==0){ + mostrarNoticia = false; +}else{ + mostrarNoticia = true; + Tanoticias tanoticia = null; + for(int i = 0; i < vSeleccionNot.size(); i++) + { + tanoticia = (Tanoticias)vSeleccionNot.elementAt(i); + if (i!=0){ + strNoticia = strNoticia + separador + tanoticia.getNoticia(); + }else{ + strNoticia = tanoticia.getNoticia(); + } + strNoticia = strNoticia.replaceAll("
    ", " "); + } +} +%> + + + +I.R.P.F. + + + + + + + + + + + + + + + +
    + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + <% + int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + + PersistenciaTaliquimedi perTaliqui = new PersistenciaTaliquimedi(); + boolean retencion = perTaliqui.tiene_retencion_por_taliquimedico(intMedico); + + if (retencion){ + %> + + + + + + + + <% + PersistenciaTadremed per = new PersistenciaTadremed(); + Vector vSeleccion = per.listado_detalle_irpf(strCampoAnio, intMedico/*, intPagina*/); + + if (vSeleccion.size()==0) //No se han encontrado datos + { + %> + + + + + + + <% + } + else + { + %> + + + + + + + <% + Tadremed tadremed = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + tadremed = (Tadremed)vSeleccion.elementAt(i); + %> + + + + + + <% + } + %> + + + + + + + + + + <% + } //fin else (vSeleccion.size()!=0) + + }else{ + %> + + + + + + + + + + + + + + + + + + <% + } + %> +
     
    + + + + + + + +
    Año:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
     
    No existe información para el año seleccionado.
    FechaImporte devengadoRetención
    <%=sdfFormateadorFecha.format(tadremed.getFecha())%><%=Utilidades.formatearDouble(tadremed.getImporte(),PersistenciaParametros.decimales)%><%=Utilidades.formatearDouble(tadremed.getIrpf(),PersistenciaParametros.decimales)%>
     
      +
    + + + +
    +
     
     
     
     
     
    El médico no tiene retenciones.
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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 detalle IRPF (med/detalleIRPF.jsp)"); + } +%> diff --git a/jsp/med/detallePacientes.jsp b/jsp/med/detallePacientes.jsp new file mode 100644 index 0000000..ebc514e --- /dev/null +++ b/jsp/med/detallePacientes.jsp @@ -0,0 +1,656 @@ +<%@ page import="com.tarisan.control.*" %> +<%@ page import="com.tarisan.data.*" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.util.Utilidades" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.sql.*" %> +<%@ page import="java.util.Vector" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Calendar" %> + +<% + // LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de pacientes (med/detallePacientes.jsp)"); + + response.setHeader("Expires", "0"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + HttpSession sesion = request.getSession(true); + + if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null)) + { + LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada"); + response.sendRedirect("../../html/login.html"); + } + else + { + + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de pacientes (med/detallePacientes.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strFecha = ""; +String strFechaHasta = ""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +int borrarActo = 0; + +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas); +Object aCondiciones[]=null; +java.util.Date hoy = Calendar.getInstance().getTime(); + +//Obtención del perfil del usuario conectado +StringBuffer perfil = new StringBuffer(); +perfil.append("|"); +perfil.append(sesion.getAttribute("PERFIL")); +perfil.append("|"); + +//Obtenemos los valores de los parametros que se pasan a la pagina +//En caso de que no se le pasen parametros, quedaram inicializados +//a sus valores por defecto + +//parametro x para marcar la opcion del menu en la que se encuentra el usuario +if (request.getParameter("x")!=null) + strParametroMenu=(String)request.getParameter("x"); + +//parametro fecha que indica el año para el que desea realizar la impresion +if (request.getParameter("fecha")!=null) + strFecha=(String)request.getParameter("fecha"); + + //parametro fecha que indica el año para el que desea realizar la impresion +if (request.getParameter("fechaHasta")!=null) + strFechaHasta=(String)request.getParameter("fechaHasta"); + +//parametro pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + +//parametro impresion que nos indica que se ha de realizar una impresion +int intImpresion = 0; +if (request.getParameter("imp")!=null) { + intImpresion = Integer.parseInt(request.getParameter("imp")); +} + +//parametro x para marcar la opcion del menu en la que se encuentra el usuario +if (request.getParameter("borrarActo")!=null){ + borrarActo = Integer.parseInt(request.getParameter("borrarActo")); +} + +//atributo ENC que obtiene la peticion encriptada +String detalleE = ""; +if (sesion.getAttribute("ENC")!=null) { + detalleE = (String)sesion.getAttribute("ENC"); + sesion.removeAttribute("ENC"); +} + +Tamensaje tamensaje = new Tamensaje(); +PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + +boolean mostrarNoticia = true; +PersistenciaTanoticias perTaNo = new PersistenciaTanoticias(); +Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera(); +Vector vNoticias = new Vector(); +String strNoticia = ""; +String noticias =""; +String separador = " ---//--- "; +if(vSeleccionNot.size()==0){ + mostrarNoticia = false; +}else{ + mostrarNoticia = true; + Tanoticias tanoticia = null; + for(int i = 0; i < vSeleccionNot.size(); i++) + { + tanoticia = (Tanoticias)vSeleccionNot.elementAt(i); + if (i!=0){ + strNoticia = strNoticia + separador + tanoticia.getNoticia(); + }else{ + strNoticia = tanoticia.getNoticia(); + } + strNoticia = strNoticia.replaceAll("
    ", " "); + } +} +%> + + + +Pacientes + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + <% + SimpleDateFormat sdfFormateadorFecha2 = new SimpleDateFormat("MM/yyyy"); + java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime()); + String fec1 = sdfFormateadorFecha2.format(dtFecha); + + String[] parts = fec1.split("/"); + Integer mes1 = Integer.parseInt(parts[0]); + Integer ano1 = Integer.parseInt(parts[1]); + + String fec2 = ""; + String fec3 = ""; + if (mes1 == 1){ + fec2 = "12/" + (ano1 -1); + fec3 = "11/" + (ano1 -1); + } else{ + if (mes1 == 2){ + fec3 = "12/" + (ano1 -1); + } else{ + fec3 = (mes1 - 2) + "/" + ano1; + if (fec3.length() == 6){ + fec3 = "0" + fec3; + } + } + fec2 = (mes1 - 1) + "/" + ano1; + if (fec2.length() == 6){ + fec2 = "0" + fec2; + } + + } + + String strCambio_mes = ""; + if (request.getParameter("cambio_mes")!=null){ + strCambio_mes = request.getParameter("cambio_mes"); + } + String strMes = ""; + if (strCambio_mes.compareTo("1") == 0){ + strMes = request.getParameter("mes"); + } else { + if (request.getParameter("mes")!=null){ + strMes = request.getParameter("mes"); + } else{ + strMes = sdfFormateadorFecha2.format(dtFecha); + } + } + + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + + if (borrarActo==1){ //Se ha pulsado en eliminar acto + String bFecha=""; + int bActo=0; + int bCol=0; + double bPol=0; + int bOrd=0; + int bNumseq=0; + int bEspe=0; + int bMedico=0; + long bAuto=0; + if (request.getParameter("bFecha")!=null){ + bFecha=(String)request.getParameter("bFecha"); + bFecha = bFecha.replace('-','/'); + } + if (request.getParameter("bActo")!=null){ + bActo=Integer.parseInt(request.getParameter("bActo")); + } + if (request.getParameter("bCol")!=null){ + bCol=Integer.parseInt(request.getParameter("bCol")); + } + if (request.getParameter("bPol")!=null){ + bPol=Double.parseDouble(request.getParameter("bPol")); + } + if (request.getParameter("bOrd")!=null){ + bOrd=Integer.parseInt(request.getParameter("bOrd")); + } + if (request.getParameter("bNumseq")!=null){ + bNumseq=Integer.parseInt(request.getParameter("bNumseq")); + } + if (request.getParameter("bEspe")!=null){ + bEspe=Integer.parseInt(request.getParameter("bEspe")); + } + if (request.getParameter("bMedico")!=null){ + bMedico=Integer.parseInt(request.getParameter("bMedico")); + } + if (request.getParameter("bAuto")!=null){ + bAuto=Long.parseLong(request.getParameter("bAuto")); + } + + PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient(); + if (per.borrar_acto(bMedico, bFecha, bActo, bCol, bPol, bOrd, bEspe, bNumseq, bAuto)){ + %><% + } + } + + + + aCondiciones = new Object[8]; + aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + aCondiciones[2] = String.valueOf( strMes ); + aCondiciones[3] = String.valueOf( strMes ); + aCondiciones[4] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + aCondiciones[5] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + aCondiciones[6] = String.valueOf( strMes ); + aCondiciones[7] = String.valueOf( strMes ); + + PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient(); + Vector vSeleccion = per.detalle_paciente_tamovext_espia(intPagina, aCondiciones); + + /*aCondiciones = new Object[4]; + aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + aCondiciones[2] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + aCondiciones[3] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + + PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient(); + Vector vSeleccion = per.detalle_paciente(intPagina, aCondiciones);*/ + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + + +<% + 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); +%> + + + + + + <% + /*int diaHoy = hoy.getDate(); + int mesHoy = hoy.getMonth(); + int anoHoy = hoy.getYear(); + + int diaActo = vTamovextTaclient.getFecha().getDate(); + int mesActo = vTamovextTaclient.getFecha().getMonth(); + int anoActo = vTamovextTaclient.getFecha().getYear(); */ + + Calendar fechaLimite = Calendar.getInstance(); + fechaLimite.add(Calendar.DATE, -5); + + // if ((diaHoy==diaActo)&&(mesHoy==mesActo)&&(anoHoy==anoActo)){ + if(vTamovextTaclient.getFecha().getTime() <= hoy.getTime() && vTamovextTaclient.getFecha().getTime() >= fechaLimite.getTime().getTime()) {%> + + <%}else{ %> + + <%}%> + +<% + } + + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
     
    + +
    + + + + + + + + + + +
    Desde (dd-mm-aaaa):  Hasta (dd-mm-aaaa):  Imprimir
    +
     
    Acto eliminado correctamente
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    FechaNombreDescripciónPrecioEliminar
    <%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%><%=/*vTamovextTaclient.getNombre() + " " + */vTamovextTaclient.getApellidos()%><%=vTamovextTaclient.getDescripcionActoMedico()%><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%>Eliminar-
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + catch(ExcepcionTarisan ex) + { + LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje()); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex.getMensaje()); + response.sendRedirect("../error.jsp"); + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex); + sesion.setAttribute("ERROR", "ExcepcionTarisan: " + ex); + response.sendRedirect("../error.jsp"); + } + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final página de pacientes (med/detallePacientes.jsp)"); + } +%> diff --git a/jsp/med/detalle_historico_liquidacion.jsp b/jsp/med/detalle_historico_liquidacion.jsp new file mode 100644 index 0000000..6ccf55d --- /dev/null +++ b/jsp/med/detalle_historico_liquidacion.jsp @@ -0,0 +1,229 @@ +<%@ 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, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de detalle historico de liquidacion (med/detalle_historico_liquidacion.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 detalle historico de liquidacion (med/detalle_historico_liquidacion.jsp)"); + + try + { + +// Definicion de variables +String strMensajeSinElementos="No ha seleccionado ningún acto médico."; +String strParametroMenu=""; +String strCampocalendar=""; +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("calendar")!=null) + strCampocalendar = (String)request.getParameter("calendar"); + +//parametro pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + +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("
    ", " "); + } +} +%> + + + +Detalle hist&oacuete;rico liquidación + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + <% + aCondiciones = new Object[4]; + aCondiciones[0] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + + aCondiciones[1] = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + String[] result = strCampocalendar.split("/"); + int i=2; + for(String s : result){ + aCondiciones[i] = new String(s); + i++; + } + PersistenciaTaliquimedidet perta = new PersistenciaTaliquimedidet(); + Integer val = 0; + val = (Integer)aCondiciones[0]; + int med = val.intValue(); + val = (Integer)aCondiciones[1]; + int espe = val.intValue(); + String valor = (String)aCondiciones[2]; + val = Integer.parseInt(valor); + int mes = val.intValue(); + valor = (String)aCondiciones[3]; + val = Integer.parseInt(valor); + int anio = val.intValue(); + Vector resul = perta.buscarDetalles(med, mes, anio, intPagina); + %> +
    + + <% + for(int j=0;j + + <% + } + %> + +
    FacturaAseguradoEntidadColectivoPolizaOrdenFecha GastoDescripcion
    <%=t.getFactura() %><%=t.getApellidos() %>
    +
    +
    +
    + + + +<% + } + 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 detalle historico de liquidacion (med/detalle_historico_liquidacion.jsp)"); + } +%> diff --git a/jsp/med/detalle_liquidacion_analista.jsp b/jsp/med/detalle_liquidacion_analista.jsp new file mode 100644 index 0000000..25b0cb8 --- /dev/null +++ b/jsp/med/detalle_liquidacion_analista.jsp @@ -0,0 +1,317 @@ +<%@ page import="com.tarisan.control.*" %> +<%@ page import="com.tarisan.data.*" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.util.Utilidades" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.sql.*" %> +<%@ page import="java.util.Vector" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Calendar" %> + +<% + // LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de liquidaciones (med/liquidacion.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 liquidaciones (med/liquidacion.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +long longAutorizacion = 0; +double dblImporteTotal=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 pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + +//parametro pagina para realizar la paginacion +if (request.getParameter("au")!=null) + longAutorizacion=Long.parseLong(request.getParameter("au")); + +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("
    ", " "); + } +} +%> + + + +Liquidaciones + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + int intEspe = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + + PersistenciaTamovext per = new PersistenciaTamovext(); + Vector vSeleccion = per.MovimientosCapturadosDetallePorAutorizacion(intPagina, intMedico, longAutorizacion, intEspe); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + + + + + + +<% + } +%> + + + + + +<% + + //Tamovext tamovext= null; + //Object tamovext= null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + Object[] resultados = vSeleccion.elementAt(i); + +%> + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + + + + +<% + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
     <%=vSeleccion.elementAt(0)[1]%> - <%=vSeleccion.elementAt(0)[0]%> - <%=vSeleccion.elementAt(0)[2]%> 
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    ActoDescripcionPrecio
    <%=resultados[3]%><%=resultados[4]%><%=resultados[5]%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
     
    Volver
    +
    +
    +
    + + + +<% + } + 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 gestión de liquidaciones (med/liquidacion.jsp)"); + } +%> diff --git a/jsp/med/detalle_liquidacion_radiologo.jsp b/jsp/med/detalle_liquidacion_radiologo.jsp new file mode 100644 index 0000000..5a85663 --- /dev/null +++ b/jsp/med/detalle_liquidacion_radiologo.jsp @@ -0,0 +1,317 @@ +<%@ page import="com.tarisan.control.*" %> +<%@ page import="com.tarisan.data.*" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="com.tarisan.util.Utilidades" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.sql.*" %> +<%@ page import="java.util.Vector" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Calendar" %> + +<% + // LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de detalle de liquidaciones de radiologos (med/detalle_liquidacion_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 detalle de liquidaciones de radiologos (med/detalle_liquidacion_radiologo.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +long longAutorizacion = 0; +double dblImporteTotal=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 pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + +//parametro pagina para realizar la paginacion +if (request.getParameter("au")!=null) + longAutorizacion=Long.parseLong(request.getParameter("au")); + +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("
    ", " "); + } +} +%> + + + +Liquidaciones + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + int intEspe = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + + PersistenciaTamovext per = new PersistenciaTamovext(); + Vector vSeleccion = per.MovimientosCapturadosDetallePorAutorizacion(intPagina, intMedico, longAutorizacion, intEspe); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + + + + + + +<% + } +%> + + + + + +<% + + //Tamovext tamovext= null; + //Object tamovext= null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + Object[] resultados = vSeleccion.elementAt(i); + +%> + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + + + + +<% + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
     <%=vSeleccion.elementAt(0)[1]%> - <%=vSeleccion.elementAt(0)[0]%> - <%=vSeleccion.elementAt(0)[2]%> 
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    ActoDescripcionPrecio
    <%=resultados[3]%><%=resultados[4]%><%=resultados[5]%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
     
    Volver
    +
    +
    +
    + + + +<% + } + 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 detalle de liquidaciones de radiologos (med/detalle_liquidacion_radiologo.jsp)"); + } +%> diff --git a/jsp/med/determinaciones.jsp b/jsp/med/determinaciones.jsp new file mode 100644 index 0000000..7a6e989 --- /dev/null +++ b/jsp/med/determinaciones.jsp @@ -0,0 +1,344 @@ +<%@ 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" %> + +<% + // LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de determinaciones analíticas (med/determinaciones.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 determinaciones analíticas (med/determinaciones.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strCampoNombre=""; +StringBuffer strSql = new StringBuffer(); +int intPagina=0; +Object aCondiciones[]=null; +int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa(); +int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + +//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(); + +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("
    ", " "); + } +} +%> + + + +Actos Médicos + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + + + + +<% + + + PersistenciaTtactmedGPC per = new PersistenciaTtactmedGPC(); + Vector vSeleccion = per.listadoDeterminacionesAnaliticas(strCampoNombre, intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + +<% + TtactmedGPC ttactmedGPC = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + ttactmedGPC = (TtactmedGPC)vSeleccion.elementAt(i); +%> + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
     
    + + + + + + + +
    Descripción:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    DescripciónCódigoOMC
    <%=ttactmedGPC.getDescripcion_gpc()%><%=ttactmedGPC.getActo()%><%=ttactmedGPC.getOmc()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    + + + +<% + } + 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 determinaciones analíticas (med/determinaciones.jsp)"); + } +%> diff --git a/jsp/med/gestor.jsp b/jsp/med/gestor.jsp new file mode 100644 index 0000000..56432c0 --- /dev/null +++ b/jsp/med/gestor.jsp @@ -0,0 +1,164 @@ +<%@ 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 médicos (med/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 médicos (med/gestor.jsp)"); + + +//Obtención del perfil del usuario conectado +StringBuffer perfil = new StringBuffer(); +perfil.append("|"); +perfil.append(sesion.getAttribute("PERFIL")); +perfil.append("|"); + +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("
    ", " "); + } +} +%> + + + +Módulo de Gestión de Médicos + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + +<% +//Creación de la tabla presentación de resultados +%> + + + + + + + +
     
    <%=pertamensaje.obtenerMensaje(30).getMensaje() %>
    +
    +
    +
    + + + +<% +LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de médicos (med/gestor.jsp)"); + } +%> \ No newline at end of file diff --git a/jsp/med/gestor_perfiles.jsp b/jsp/med/gestor_perfiles.jsp new file mode 100644 index 0000000..04c63d6 --- /dev/null +++ b/jsp/med/gestor_perfiles.jsp @@ -0,0 +1,684 @@ +<%@ 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("
    ", " "); + } +} +%> + + + + + +Gestión Perfiles + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + <% + 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 + %> + + + + <% + } + %> + + + + + + <% + + Tagruana tag = new Tagruana(); + for(int i = 0; i < vSeleccion.size(); i++) + { + if(fondo) + { + fondo = false; + %> + + <% + } + else + { + fondo = true; + %> + + <% + } + espe = ParametrosConfiguracion.analiticas; + tag = (Tagruana)vSeleccion.elementAt(i); + %> + + + + + + <% + } + + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + } //fin if(pagina!=0) + } + %><% + } + 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(); + %> + + + + <% + + } + 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 + %> + + <% + + } + 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 = ""; + %> + + + + + <% + // quitar el espacio detras del % y subirlo aquí encima del <% para añadir el formulario de búsqueda. + // "/>Buscar + } + %> +
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Código PerfilDescripciónVerEliminar
    <%=tag.getGrupo() %><%=tag.getDescripcion()%>
    <%=pertamensaje.obtenerMensaje(17).getMensaje() %>
    Eliminar Perfil
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    Añadir Perfil
    +
    + +

    +
    + + <% + 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); + %> +
    +
    + +
    +

    + + + + +
    + +

    +
    + + + + + " onkeypress="return anularTeclaIntro(event)"/> + Buscar +
    +


    + Guardar Cambios +
    Borrar perfil: <%=request.getParameter("borrar") %>
    +
    + +


    + +

    +
    + + + <% + 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; + + %> +
    +
    +
    +

    + + + +
    + +

    +
    + + + + + " onkeypress="return anularTeclaIntro(event)"/> + Buscar +
    +


    + Guardar Cambios + +
    + + +
    +
    +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/med/historico_ats.jsp b/jsp/med/historico_ats.jsp new file mode 100644 index 0000000..af524d2 --- /dev/null +++ b/jsp/med/historico_ats.jsp @@ -0,0 +1,351 @@ +<%@ 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.io.*" %> + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio pagina del historico de prescripciones ats (med/historico_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("../../html/login.html"); + } + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio pagina del historico de prescripciones ats (med/historico_ats.jsp)"); + + try + { + +//Obtención del perfil del usuario conectado +StringBuffer perfil = new StringBuffer(); +perfil.append("|"); +perfil.append(sesion.getAttribute("PERFIL")); +perfil.append("|"); + +// Definicion de variables +String strParametroMenu=""; +String strCampoNombre=""; +int intPagina=1; +int especialidad=0; + +//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")); + +especialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + +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("
    ", " "); + } +} +%> + + + +Histórico Prescripciones ATS + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + +
    + +
    + + + <% + PersistenciaTaconaut pertacon = new PersistenciaTaconaut(); + Vector vSeleccion = pertacon.ObtenerPrescripcionesPorMedico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(),intPagina); + if(vSeleccion.size() == 0) + { + %> + + + <% + } + else + { + + if (intPagina != 0){ //se tiene en cuenta la paginacion + %> + + + + <% + } + %> + + + + + + + <% + Taconaut ta = new Taconaut(); + PersistenciaTtactmed tm = new PersistenciaTtactmed(); + String estilo = ""; + for(int i=0; i + + + + + + + <% + } + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + + } + } + + %> +
    No Se han realizado prescripciones de actos para los ATS
    Página <%=pertacon.getPaginacion().getNumeroPagina()%> de <%=pertacon.getPaginacion().getNumeroPaginasTotales()%>
    AutorizacionActoInforme
    + <% + String resultado = ""+ta.getAutorizacion().toString(); + String resultadoE = ta.getAutorizacionEncriptada(); + File fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_ats+resultado+".pdf"); //Buscar en ubicacion vieja + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_ats+resultado+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".pdf"); //Buscar en ubicacion nueva + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + %>

    <%=pertamensaje.obtenerMensaje(7).getMensaje() %>

    <% + } + } + } + } + %> +
    <%=tm.obtenerNombreActo(ta.getActo(), ta.getEspecialidad()) %><%=ta.getInforme() %>
    + + + <%if (pertacon.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (pertacon.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    + + + +<% + } + 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("../error.jsp"); + } + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página del historico de prescripciones ats (med/historico_ats.jsp)"); + } +%> \ No newline at end of file diff --git a/jsp/med/historico_liquidacion.jsp b/jsp/med/historico_liquidacion.jsp new file mode 100644 index 0000000..d5471c2 --- /dev/null +++ b/jsp/med/historico_liquidacion.jsp @@ -0,0 +1,768 @@ +<%@page import="com.tarisan.persistencia.DataStore"%> +<%@ 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.*" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.io.*" %> +<%@ page import="com.itextpdf.text.Font" %> +<%@ page import="com.itextpdf.text.Image" %> +<%@ page import="com.itextpdf.text.Document" %> +<%@ page import="com.itextpdf.text.DocumentException" %> +<%@ page import="com.itextpdf.text.Paragraph" %> +<%@ page import="com.itextpdf.text.Phrase" %> +<%@ page import="com.itextpdf.text.pdf.*" %> +<%@ page import="com.itextpdf.text.PageSize" %> +<%@ page import="com.itextpdf.text.FontFactory" %> +<%@ page import="com.itextpdf.text.BaseColor" %> +<%@ page import="com.itextpdf.text.Element" %> +<%@ page import="com.tarisan.util.DES" %> + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página del histórico liquidaciones (med/historico_liquidacion.jsp)"); + //JJ Fuerzo un cambio para provocar la descarga + + 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 del histórico liquidaciones (med/historico_liquidacion.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +StringBuffer strSql = new StringBuffer(); +String sql = new String(); +int intPagina = 0; +double dblImporteTotal=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 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("
    ", " "); + } +} +%> + + + +Histórico Liquidaciones + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    +
    +<% +//Creación de la tabla presentación de resultados + int medico = 0; + int esp = 0; + medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + esp = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() ); + if(request.getParameter("pagina")==null) + { + SimpleDateFormat sdfFormateadorFecha = new SimpleDateFormat("MM/yyyy"); + java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime()); + sdfFormateadorFecha.format(dtFecha); + + PersistenciaTaliquimedi per = new PersistenciaTaliquimedi(); + Vector vSeleccion = per.listado_fechas_liquidaciones(medico); + + if(vSeleccion.size()==0) + { + %> + + + + +
    <%=pertamensaje.obtenerMensaje(52).getMensaje() %>
    + <% + } + else + { + %> + + + + +
    <%=pertamensaje.obtenerMensaje(53).getMensaje() %> + + <%=pertamensaje.obtenerMensaje(24).getMensaje() %> +
    + <% + vSeleccion=null; + } + } + else{ + //ha pulsado en buscar + String strMes = request.getParameter("mes"); + int prueba01 = strMes.toString().indexOf("s"); + int prueba02 = 0; + if(strMes.toString().indexOf("os")>0) + { + //Ha seleccionado la opción de todos, para ver un resumen de sus liquidaciones + %> +

    <%=pertamensaje.obtenerMensaje(51).getMensaje() %>


    + + + <% + PersistenciaTaliquimedi per = new PersistenciaTaliquimedi(); + boolean retencion = per.tiene_retencion(medico); + //Primero vamos a ver si el médico origen tiene retención o no... + Vector vSeleccion = new Vector(); + if(retencion) + { + vSeleccion = per.listado_resumen_todas_liquidaciones_con_retencion(medico); + } + else + { + vSeleccion = per.listado_resumen_todas_liquidaciones_sin_retencion(medico); + } + boolean fondo = true; + DecimalFormat df = new DecimalFormat("#.##"); + %> + + + + + + + + <% + //while(resul.next()) + int i=0; + do{ + if(fondo) + { + fondo = false; + %> + + <% + } + else + { + fondo = true; + %> + + <% + } + + if(retencion) + { + %> + + + + + + <% + i=i+4; + } + else + { + %> + + + + + + <% + i=i+3; + } + %> + + <% + + }while(i + +
    <%=pertamensaje.obtenerMensaje(54).getMensaje() %><%=pertamensaje.obtenerMensaje(55).getMensaje() %><%=pertamensaje.obtenerMensaje(56).getMensaje() %><%=pertamensaje.obtenerMensaje(57).getMensaje() %><%=pertamensaje.obtenerMensaje(17).getMensaje() %>
    <%=vSeleccion.elementAt(i).toString().trim() %><%=df.format(vSeleccion.elementAt(i+1)) %><%=df.format(vSeleccion.elementAt(i+3)) %><%=df.format(vSeleccion.elementAt(i+2)) %> + + + + + + <%=vSeleccion.elementAt(i).toString().trim() %><%=df.format(vSeleccion.elementAt(i+1)) %><%=df.format(vSeleccion.elementAt(i+2)) %> +
    + + + +
    +
    + <% + } + else + { + //Ha seleccionado un mes/año, generamos la tabla en hmtl y si no existe el PDF + /*String file="/root/apache-tomcat-6.0.20/webapps/tarisan/liquidaciones/"+medico+"_"+strMes.toString().replace('/', '_')+".pdf"; + String file_detalle="/root/apache-tomcat-6.0.20/webapps/tarisan/liquidaciones/detalle_"+medico+"_"+strMes.toString().replace('/', '_')+".pdf";*/ + String file=ParametrosConfiguracion.ruta_pdf_liquidaciones+medico+"_"+strMes.toString().replace('/', '_')+".pdf"; + String file_detalle=ParametrosConfiguracion.ruta_pdf_liquidaciones+"detalle_"+medico+"_"+strMes.toString().replace('/', '_')+".pdf"; + boolean exists = (new File(file)).exists(); + boolean exists_detalle = (new File(file_detalle)).exists(); + boolean generado = false; + boolean generado_detalle = false; + Font fuente= new Font(Font.getFamily("ARIAL"), 12, Font.BOLD); + + String encabezado = null; + String detalles_fra = null; + String pie = null; + Document documento = new Document(PageSize.A4); + + /*Ahora definimos la tabla donde el arguemento recibido indica el numero de columnas y la propiedad setWidthPercentage permite indicarle que ocupe todo el ancho de la pagina*/ + float[] colsWidth = {1f, 4f, 1f, 1f, 1f}; + //PdfPTable table = new PdfPTable(colsWidth); + PdfPTable tabla=new PdfPTable(colsWidth); + tabla.setWidthPercentage(100); + + Connection conexion = ParametrosConfiguracion.dataStore.obtenerConexion(); + int medico_origen = medico; + PersistenciaTaliquimedi per = new PersistenciaTaliquimedi(); + boolean retencion = per.tiene_retencion_por_taliquimedico(medico); + if (!exists) + { + //no existe el pdf de la liquidación que quiere ver, la generamos para que se guarde y poderla mostrar si quiere. + //para evitar añadir varios pies si el fichero se generó en una consulta anterior + generado = true; + + /*Está generando el pdf, luego ha pulsado en el detalle de la liquidación: lo metemos en el log: + medico, fecha, fecha_peticion, correlativo, tabla, sentencia, observaciones + */ + + SimpleDateFormat sdfFormateadorFecha = new SimpleDateFormat("dd/MM/yyyy"); + java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime()); + sdfFormateadorFecha.format(dtFecha); + java.sql.Timestamp timeStampDate = new Timestamp(dtFecha.getTime()); + PersistenciaTareglog per_ta = new PersistenciaTareglog(); + Integer sig_correlativo = per_ta.obtenerUltimoValorCorrelativo(medico,timeStampDate); + + Calendar cal = Calendar.getInstance(); + cal.setTime(dtFecha); + per_ta.insertarLog(medico, timeStampDate, cal, sig_correlativo, "liquidaxs", "genera el pdf", "el medico accede al histórico de liquidaciones y consulta el mes "+strMes+" generando el pdf correspondiente"); + + //obtenemos los datos del médico necesarios, primero vemos el médico origen: + medico_origen = per.obtener_medico_origen(medico); + + PersistenciaVTTbancosTamedico perTtbanTamed = new PersistenciaVTTbancosTamedico(); + Vector vSeleccion = perTtbanTamed.obtenerMedico_por_medico_y_mes(medico, strMes, intPagina); + + if (vSeleccion.size()!=0) //Se han encontrado datos + { + VTtbancosTamedico vTtbancosTamedico = null; + vTtbancosTamedico = (VTtbancosTamedico)vSeleccion.elementAt(0); + + String nif = vTtbancosTamedico.getNif(); + String nombre = vTtbancosTamedico.getNombre().trim(); + String apellidos = vTtbancosTamedico.getApellidos(); + String direccion = vTtbancosTamedico.getDireccion(); + String cp = vTtbancosTamedico.getCp(); + String poblacion = vTtbancosTamedico.getPoblacion(); + String descripcion = vTtbancosTamedico.getDescripcion(); + int sucursal = vTtbancosTamedico.getIban_sucursal(); + String cuenta = vTtbancosTamedico.getIban_cuenta().trim(); + + if(medico_origen != medico) + { + Vector vSeleccion2 = perTtbanTamed.obtenerMedico_por_medico_origen(medico_origen, intPagina); + if (vSeleccion2.size()!=0) //Se han encontrado datos + { + VTtbancosTamedico vTtbancosTamedico2 = null; + vTtbancosTamedico2 = (VTtbancosTamedico)vSeleccion2.elementAt(0); + + nif = vTtbancosTamedico2.getNif(); + nombre = vTtbancosTamedico2.getNombre().trim(); + apellidos = vTtbancosTamedico2.getApellidos(); + direccion = vTtbancosTamedico2.getDireccion(); + cp = vTtbancosTamedico2.getCp(); + poblacion = vTtbancosTamedico2.getPoblacion(); + descripcion = vTtbancosTamedico2.getDescripcion(); + sucursal = vTtbancosTamedico2.getIban_sucursal(); + cuenta = vTtbancosTamedico2.getIban_cuenta().trim(); + } + } + encabezado="Factura Para: "+medico_origen+"\n"+"Igual. Med. Qui. y de E. De Navarra S.A."+"\n"+"AVENIDA BAYONA 4"+"\n"+"31011 PAMPLONA"+"\n"+"CIF: A31005432"+"\n"+"\n"; + + detalles_fra="\nHonorarios del: "+strMes+"\n"+ "Fecha Factura: "+String.format("%1$te/%1$tm/%1$tY", vTtbancosTamedico.getFecha_factura())+"\n Factura Numero: "+medico_origen+"/"+vTtbancosTamedico.getFactura()+" N.I.F: "+nif+"\n"+"\n"+"\n"+"\n"; + + float[] columnas = {1f, 1f}; + PdfPTable detalles_medico=new PdfPTable(columnas); + PdfPCell celda01 = new PdfPCell(); + celda01.setBorder(0); + detalles_medico.addCell(celda01); + PdfPCell celda02 = new PdfPCell(new Paragraph(nombre+" "+apellidos+"\n"+direccion+"\n"+cp+" "+poblacion+"\n",FontFactory.getFont("arial",10,Font.NORMAL,BaseColor.BLACK))); + celda02.setBorder(0); + detalles_medico.addCell(celda02); + + + + //prueba: + Paragraph linea = new Paragraph(encabezado,fuente); + + //Definimos un parrafo + Phrase para=new Phrase(detalles_fra,FontFactory.getFont("arial",10,Font.NORMAL,BaseColor.BLACK)); + + + //El pie tambión es un párrafo + SimpleDateFormat formatearFecha = new SimpleDateFormat("dd 'de' MMMM 'de' yyyy"); + //String.format("%1$te/%1$tm/%1$tY", result.getDate("FECHA_FACTURA") + pie = "Banco: "+descripcion+"\nSucursal: "+sucursal+"\nCuenta: "+cuenta+" Pamplona a "+formatearFecha.format(vTtbancosTamedico.getFecha_factura()); + + //Pasamos la fecha a un String y la agregamos a un parrafo + Paragraph fecha=new Paragraph(String.format("%1$te/%1$tm/%1$tY", vTtbancosTamedico.getFecha_factura())+"\n"+"\n"); + + //Ahora definimos la tabla donde el arguemento recibido indica el numero de columnas y la propiedad setWidthPercentage permite indicarle que ocupe todo el ancho de lapagina*/ + + PdfWriter.getInstance(documento, new FileOutputStream(file)); + documento.open(); + documento.add(linea); + documento.add(detalles_medico); + documento.add(para); + + PdfPCell celda1 =new PdfPCell (new Paragraph("Cód. Acto",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED))); + PdfPCell celda2 =new PdfPCell (new Paragraph("Descripción",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED))); + PdfPCell celda3 =new PdfPCell (new Paragraph("Cant.",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED))); + PdfPCell celda4 =new PdfPCell (new Paragraph("Precio",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED))); + PdfPCell celda5 =new PdfPCell (new Paragraph("Importe",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED))); + + celda1.setBorder(1); + celda1.setBorderWidthTop(1); + celda1.setBorderWidthBottom(1); + celda1.setHorizontalAlignment(Element.ALIGN_RIGHT); + celda1.setVerticalAlignment(Element.ALIGN_MIDDLE); + celda2.setBorder(1); + celda2.setBorderWidthTop(1); + celda2.setBorderWidthBottom(1); + celda2.setVerticalAlignment(Element.ALIGN_MIDDLE); + celda3.setBorder(1); + celda3.setBorderWidthTop(1); + celda3.setBorderWidthBottom(1); + celda3.setHorizontalAlignment(Element.ALIGN_RIGHT); + celda3.setVerticalAlignment(Element.ALIGN_MIDDLE); + celda4.setBorder(1); + celda4.setBorderWidthTop(1); + celda4.setBorderWidthBottom(1); + celda4.setHorizontalAlignment(Element.ALIGN_RIGHT); + celda4.setVerticalAlignment(Element.ALIGN_MIDDLE); + celda5.setBorder(1); + celda5.setBorderWidthTop(1); + celda5.setBorderWidthBottom(1); + celda5.setHorizontalAlignment(Element.ALIGN_RIGHT); + celda5.setVerticalAlignment(Element.ALIGN_MIDDLE); + tabla.addCell(celda1); + tabla.addCell(celda2); + tabla.addCell(celda3); + tabla.addCell(celda4); + tabla.addCell(celda5); + + } + } + PersistenciaTaliquimedidet perTaDet = new PersistenciaTaliquimedidet(); + + int mes = Integer.parseInt(((String)strMes).substring(0, 2)); + int anio = Integer.parseInt(((String)strMes).substring(3)); + generado_detalle = perTaDet.generarPdfDetalle(medico, mes, anio); + Double importe = 0.0; + + Vector vSeleccion = per.listado_detalle_liquidaciones_medicos(medico, strMes, intPagina); + %> +

    <%=pertamensaje.obtenerMensaje(58).getMensaje() %> <%=request.getParameter("mes") %>


    + <% + %> + + <% + if (vSeleccion.size()==0) //No se han encontrado datos + { + %> + + + + + + + <% + } + else + { + %> + + + + + + + + <% + boolean fondo = true; + DecimalFormat df = new DecimalFormat("#.##"); + Taliquimedi taliquimedi = null; + for(int i = 0; i < vSeleccion.size(); i++) + { + + if(fondo) + { + fondo = false; + %> + + <% + } + else + { + fondo = true; + %> + + <% + } + taliquimedi = (Taliquimedi)vSeleccion.elementAt(i); + String act = String.valueOf(taliquimedi.getActo()); + String cant = String.valueOf(taliquimedi.getCantidad()); + %> + + + + + + + <% + if(generado) + { + //si generando el pdf genero la tabla para añadírsela + + /*Definimos las celdas que seran los encabezados de la tabla*/ + PdfPCell celda1 =new PdfPCell (new Paragraph(act.trim(),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + PdfPCell celda2 =new PdfPCell (new Paragraph(taliquimedi.getDescripcion().trim(),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + PdfPCell celda3 =new PdfPCell (new Paragraph(cant.trim(),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + PdfPCell celda4 =new PdfPCell (new Paragraph(df.format(taliquimedi.getPrecio()),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + PdfPCell celda5 =new PdfPCell (new Paragraph(df.format(taliquimedi.getImporte()),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + + celda1.setBorder(0); + celda1.setHorizontalAlignment(Element.ALIGN_RIGHT); + celda1.setVerticalAlignment(Element.ALIGN_MIDDLE); + celda2.setBorder(0); + celda3.setBorder(0); + celda3.setHorizontalAlignment(Element.ALIGN_RIGHT); + celda3.setVerticalAlignment(Element.ALIGN_MIDDLE); + celda4.setBorder(0); + celda4.setHorizontalAlignment(Element.ALIGN_RIGHT); + celda4.setVerticalAlignment(Element.ALIGN_MIDDLE); + celda5.setBorder(0); + celda5.setHorizontalAlignment(Element.ALIGN_RIGHT); + celda5.setVerticalAlignment(Element.ALIGN_MIDDLE); + + tabla.addCell(celda1); + tabla.addCell(celda2); + tabla.addCell(celda3); + tabla.addCell(celda4); + tabla.addCell(celda5); + } + importe = importe + taliquimedi.getImporte(); + } + + /* + Si el medico tiene retencion + */ + %> + + + <% + Double irpf = 0.0; + Double total = 0.0; + if(retencion) + { + irpf = importe*0.15; + total = importe - irpf; + %> + + + <% + } + else + { + total = importe;%> + + <% + } + %> + + + + + + + + + + + +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    <%=pertamensaje.obtenerMensaje(40).getMensaje() %><%=pertamensaje.obtenerMensaje(41).getMensaje() %><%=pertamensaje.obtenerMensaje(59).getMensaje() %><%=pertamensaje.obtenerMensaje(42).getMensaje() %><%=pertamensaje.obtenerMensaje(60).getMensaje() %>
    <%=act.trim() %><%=taliquimedi.getDescripcion().trim() %><%=cant.trim() %><%=df.format(taliquimedi.getPrecio()) %><%=df.format(taliquimedi.getImporte()) %>
         
     <%=pertamensaje.obtenerMensaje(61).getMensaje() %> <%=df.format(importe) %>  
     <%=pertamensaje.obtenerMensaje(56).getMensaje() %>: <%=df.format(irpf) %>  
     <%=pertamensaje.obtenerMensaje(62).getMensaje() %> <%=df.format(total) %>  
     <%=pertamensaje.obtenerMensaje(62).getMensaje() %> <%=df.format(importe) %>  
     <%=pertamensaje.obtenerMensaje(63).getMensaje() %>   
      + <% + String strMedico = ""+medico; + DES encrypter = new DES(strMedico); + String doc = medico +"_"+strMes.toString().replace('/', '_'); + String docEncriptado = encrypter.encrypt(doc); + /*File ficheroPDF = new File(ParametrosConfiguracion.ruta_pdf_liquidaciones+medico +"_"+strMes.toString().replace('/', '_')+".pdf");*/ + File ficheroPDF = new File(ParametrosConfiguracion.ruta_pdf_liquidaciones+doc+".pdf"); + if(ficheroPDF.exists()) + { + %> +
    +
    + + + + +
    + <% + } + else + { + %>

    No hay PDF

    <% + } + %> +
    + <% + String docDetalle = "detalle_"+medico +"_"+strMes.toString().replace('/', '_'); + String docDetalleEncriptado = encrypter.encrypt(docDetalle); + File ficheroDetalle = new File(ParametrosConfiguracion.ruta_pdf_liquidaciones+docDetalle+".pdf"); + if(ficheroDetalle.exists()) + { + %> +
    + + + + +
    <% + } + else + { + %>

    No hay Detalle

    <% + } + %> +
      
    + <% + + if(generado) + { + PdfPTable resumen=new PdfPTable(2); + resumen.setWidthPercentage(40); + PdfPCell celda1 =new PdfPCell (new Paragraph("Importe total:",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + celda1.setBorder(0); + PdfPCell celda2 =new PdfPCell (new Paragraph(df.format(importe),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + celda2.setBorder(0); + celda2.setHorizontalAlignment(Element.ALIGN_RIGHT); + resumen.addCell(celda1); + resumen.addCell(celda2); + if(retencion) + { + celda1 =new PdfPCell (new Paragraph("I.R.P.F. ",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + celda2 =new PdfPCell (new Paragraph(df.format(irpf),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + celda1.setBorder(0); + celda2.setBorder(0); + celda2.setHorizontalAlignment(Element.ALIGN_RIGHT); + resumen.addCell(celda1); + resumen.addCell(celda2); + } + celda1 =new PdfPCell (new Paragraph("Total Liquidacion:",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + celda2 =new PdfPCell (new Paragraph(df.format(total),FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + celda1.setBorder(0); + celda2.setBorder(0); + celda2.setHorizontalAlignment(Element.ALIGN_RIGHT); + resumen.addCell(celda1); + resumen.addCell(celda2); + + + Paragraph fin=new Paragraph(pie,FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK)); + + + documento.add(tabla); + documento.add(new Paragraph("\n\n\n",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + documento.add(resumen); + documento.add(new Paragraph("\n\n\n",FontFactory.getFont("arial",8,Font.NORMAL,BaseColor.BLACK))); + documento.add(fin); + documento.close(); + } + importe = irpf = total = null; + df = null; + } + } +} + %> + +
    + + + + +<% + } + 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 del histórico de liquidaciones (med/historico_liquidacion.jsp)"); + } +%> diff --git a/jsp/med/historico_volantes.jsp b/jsp/med/historico_volantes.jsp new file mode 100644 index 0000000..dc58581 --- /dev/null +++ b/jsp/med/historico_volantes.jsp @@ -0,0 +1,315 @@ +<%@ 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 historico volantes ingreso (med/historico_volantes.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 historico volantes ingreso (med/historico_volantes.jsp)"); + + try + { + +// Definicion de variables +String strFile = "Ingreso_" + ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); +int intImpresion = 0; + +String strParametroMenu=""; +String strCampoNombre=""; +StringBuffer strSql = new StringBuffer(); +int intPagina=0; +Object aCondiciones[]=null; +boolean borrados = false; +String ver_borrados = ""; + +//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 impresion que nos indica que se ha de realizar una impresion +if (request.getParameter("imp")!=null) { + intImpresion=Integer.parseInt(request.getParameter("imp")); +} + +if(request.getParameter("borrados")!=null){ + borrados = true; + ver_borrados = "disabled=\"disabled\""; +} + +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("
    ", " "); + } +} +%> + + + +Gestión Perfiles + + + + + + + + + + + + + + + +
    + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + <%if(!borrados){ %> + + <% + } + else + { + %><% + } + PersistenciaTavolin perTavol = new PersistenciaTavolin(); + Vector vSeleccion = new Vector(); + if(borrados) + vSeleccion = perTavol.volantes_por_prescriptor(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), intPagina, 1); + else + vSeleccion = perTavol.volantes_por_prescriptor(((Usuario)sesion.getAttribute("USUARIO")).getMedico(), intPagina); + + if(vSeleccion.size() > 0) + { + if (intPagina != 0){ //se tiene en cuenta la paginacion + %> + + + + <% + } + %> + + <% + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + Tavolin tavol = (Tavolin)vSeleccion.elementAt(i); + PersistenciaTtactmed perta = new PersistenciaTtactmed(); + Integer especialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + String fecha = tavol.get_fecha().toString().substring(8, 10)+"/"+tavol.get_fecha().toString().substring(5, 7)+"/"+tavol.get_fecha().toString().substring(0, 4); + %> + + + + + + + + + + + + + + + <% + } + } + else + { + %> + + <% + } + %> +
    Ver borrados
    Ocultar borrados
    Página de
    NombreActo MédicoMotivo IngresoJuicio diagnósticoFecha<%=pertamensaje.obtenerMensaje(17).getMensaje() %>Eliminar
    <%=tavol.get_nombre() %><%=perta.obtenerNombreActo(tavol.get_acto(), especialidad) %><%=perta.obtenerDescripcionMotivoIngreso(tavol.get_motivo()) %><%=tavol.get_juicio() %><%=fecha %> name="aceptar" value="OK/Imprimir" class="txt">
    class="txt" onclick="eliminar('eliminar_volante<%=i %>')"/>
    <%=pertamensaje.obtenerMensaje(19).getMensaje() %>
    +
    +
    +
    + + + +<% + } + 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("../error.jsp"); + } + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de historico de volantes de ingreso (med/historico_volantes.jsp)"); + } +%> \ No newline at end of file diff --git a/jsp/med/igualados.jsp b/jsp/med/igualados.jsp new file mode 100644 index 0000000..0651fac --- /dev/null +++ b/jsp/med/igualados.jsp @@ -0,0 +1,336 @@ +<%@ 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 igualados (med/igualados.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 igualados (med/igualados.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strBuscarIguala=""; +StringBuffer strSql = new StringBuffer(); +int intPagina=0; +Double dblPoliza=null; +int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); +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 pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + +if (request.getParameter("buscar")!=null) + strBuscarIguala=request.getParameter("buscar"); + +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("
    ", " "); + } +} +%> + + + +Igualados + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + +<% + PersistenciaTapolfac per = new PersistenciaTapolfac(); + Vector vSeleccion = per.listado_igualados(strBuscarIguala, intMedico, intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + Tapolfac tapolfac = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + tapolfac = (Tapolfac)vSeleccion.elementAt(i); + dblPoliza = Double.valueOf(tapolfac.getPoliza()); +%> + + + + + + +<% + } +%> +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + + + + + + + +<% + } //fin else (vSeleccion.size()!=0) +%> +
    + + + + + + + + + +
    Apellido del igualado <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Nombre aseguradoNº colectivoNº pólizaNº Beneficiarios
    <%=tapolfac.getTitular()%><%=tapolfac.getColec()%><%=dblPoliza.longValue()%><%=tapolfac.getBeneficiarios()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
     
    Nº total de beneficiarios: <%=per.obtenerNumTotalBeneficiarios(intMedico)%>
    Nº total de pólizas: <%=per.obtenerNumerPolizasMedicos(intMedico)%>
    +
    +
    +
    + + + +<% + } + 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 gestión de actos médicos (med/gestor.jsp)"); + } +%> diff --git a/jsp/med/img/sp.gif b/jsp/med/img/sp.gif new file mode 100644 index 0000000000000000000000000000000000000000..88870419315135da84bcc93711ff9bbf7fb01429 GIT binary patch literal 86 zcmZ?wbhEHblx47Bn8*ME|G@yrQ2fcl$iTqFpaT*G$ulsi_w=tk{g!|6oGrJyH{aXy ho4@Um$Fygi%U+$@_Ky4bC!g!zdY}I~*UZXb4FL3aBpm<% literal 0 HcmV?d00001 diff --git a/jsp/med/img/sp_imp.gif b/jsp/med/img/sp_imp.gif new file mode 100644 index 0000000000000000000000000000000000000000..076c7538e60cdfc58adf59c9f231302eaf5ab4a7 GIT binary patch literal 43 scmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE7Dgb&paUX6G7d~kE{qJ;0Lp3yIRF3v literal 0 HcmV?d00001 diff --git a/jsp/med/img/transparent.gif b/jsp/med/img/transparent.gif new file mode 100644 index 0000000000000000000000000000000000000000..d794434481d0414bcfe6d6d73fc97045fa134b06 GIT binary patch literal 43 qcmZ?wbhEHbWMp7u_`m=H|NsA2{K>+|02I&x@j)^SOiVtE4Aub7RR?ka literal 0 HcmV?d00001 diff --git a/jsp/med/incidencia.jsp b/jsp/med/incidencia.jsp new file mode 100644 index 0000000..7beb9fb --- /dev/null +++ b/jsp/med/incidencia.jsp @@ -0,0 +1,442 @@ +<%@ 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.io.*" %> + +<% + // LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio página de determinaciones analíticas (med/determinaciones.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 incicdencias (med/incidencia.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strMensaje=""; +String strCorreo = ""; +String mensajeError= ""; +String strAdjunto = ""; +String strAdjuntos = ""; +String strAsuntoCorreo = ""; +String strMensajeCorreo = ""; +String strTarjetaCorreo = ""; +String strError = ""; +Integer intLimpiarAdjuntos = 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("msg")!=null) + strMensaje = (String)request.getParameter("msg"); + +//parametro adjunto con el nombre del archivo adjuntado +if (request.getParameter("adjunto")!=null) + strAdjunto = (String)request.getParameter("adjunto"); + +//parametro asunto del correo a enviar +if (request.getParameter("asunto")!=null) + strAsuntoCorreo = (String)request.getParameter("asunto"); + +//parametro mensaje del correo a enviar +if (request.getParameter("mensaje")!=null) + strMensajeCorreo = (String)request.getParameter("mensaje"); + +//parametro tarjeta del correo a enviar +if (request.getParameter("tarjeta")!=null) + strTarjetaCorreo = (String)request.getParameter("tarjeta"); + +//parametro limpiar adjuntos que se hace la primera vez que se entra +if (request.getParameter("limpiarAdjuntos")!=null) + intLimpiarAdjuntos = Integer.parseInt(request.getParameter("limpiarAdjuntos")); + +//parametro error de la subida del adjunto +if (request.getParameter("err")!=null) + strError = (String)request.getParameter("err"); + +//Si el médico no tiene el correo guardado en la cabecera, redirijimos a cabecera.jsp para que lo meta +Integer noTieneEmail = 0; +Tamedico tamedico = new Tamedico(); +PersistenciaTamedico pertamedico = new PersistenciaTamedico(); +int intMedico=((Usuario)sesion.getAttribute("USUARIO")).getMedico(); +tamedico = pertamedico.seleccionar(intMedico); +if (tamedico.getEmailCab()==null){ + noTieneEmail = 1; + mensajeError = "Para crear una incidencia debe tener registrado su correo electrónico:"; +}else{ + strCorreo = tamedico.getEmailCab(); + if (!Utilidades.validarEmail(strCorreo)){ + noTieneEmail = 1; + mensajeError = "Debe utilizar una dirección de correo válida."; + } +} + +File dir = new File(ParametrosConfiguracion.ruta_adjuntos+"/"); +Vector archivos = Utilidades.buscar_ficheros_recursivo(dir); + +if (intLimpiarAdjuntos==1){ + if (archivos != null) { + for (int f=0; f < archivos.size() ; f++) { + String path = archivos.elementAt(f); + LogTarisan.logger.log(NivelLog.DEBUG, "Eliminamos todos los adjuntos. Ruta de adjunto "+f+": " + path); + File adjunto = new File(path); + if(adjunto.exists()) + { + adjunto.delete(); + } + } + } +}else{ + if (archivos != null) { + for (int f=0; f < archivos.size() ; f++) { + String path = archivos.elementAt(f); + String[] partes = path.split("/"); + String filename = partes[6]; + strAdjuntos += partes[6] + "--"; + } + } +} + +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("
    ", " "); + } +} +%> + + + +Incidencias + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    +
    +
    + SISTEMA DE INCIDENCIAS DE TARISAN +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     

    *Para el correcto funcionamiento del sistema de incidencias debe comprobar en la sección "CABECERA" que tiene una cuenta de correo válida.

     
     Descripción breve:
     
     
     Detalle de la Incidencia:
      + +
     
     Pase la tarjeta para registrarla:
     
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + <% + if (strMensaje.compareTo("")!=0){ + %> + + + + + <% + } + + if (strError.compareTo("")!=0){ + %> + + + + + <% + } + %> +
     Adjuntar archivos:
      +
    + + + + + + + + + <% + if (intLimpiarAdjuntos!=1){ + if (archivos != null) { + for (int f=0; f < archivos.size() ; f++) { + String path = archivos.elementAt(f); + String[] partes = path.split("/"); + String filename = partes[6]; + %> + <%= filename%> + X + <% + } + } + } + %> +
    +
     
     Enviar
     
     
     

    <%= strMensaje %>

     

    <%= strError %>

    +
    + +
    + + +
    +
    +
    +
    + + + +<% + } + 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 determinaciones analíticas (med/incidencia.jsp)"); + } +%> diff --git a/jsp/med/introducir_paciente.jsp b/jsp/med/introducir_paciente.jsp new file mode 100644 index 0000000..f0257f3 --- /dev/null +++ b/jsp/med/introducir_paciente.jsp @@ -0,0 +1,597 @@ +<%@ 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" %> + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página de peticiones capturadas (med/peticiones_capturadas.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 introducir paciente (med/introducir_paciente.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strCampoFecha=""; +StringBuffer strSql = new StringBuffer(); +int intPagina=0; +int intBuscarPaciente=0; +String troquelado = ""; +String mensajeNoEncontrado = ""; +Object aCondiciones[]=null; +int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa(); +int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + +//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("fecha")!=null) + strCampoFecha = (String)request.getParameter("fecha"); + +//parametro pagina para realizar la paginacion +if (request.getParameter("pagina")!=null) + intPagina=Integer.parseInt(request.getParameter("pagina")); + +//parametro pagina para realizar la paginacion +if (request.getParameter("buscarPaciente")!=null) + intBuscarPaciente=Integer.parseInt(request.getParameter("buscarPaciente")); + + +Tamensaje tamensaje = new Tamensaje(); +PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + +int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); +String ape = ""; +String nom = ""; +String dir = ""; +String fec = ""; +String tel = ""; +String nif = ""; +String ent = ""; +String tar = ""; + +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("
    ", " "); + } +} +%> + + + +Introducir Paciente + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + +
    +
    + + + <% + //Se ha pulsado en Buscar Paciente + /*if (intBuscarPaciente==1){ + troquelado = (String)request.getParameter("troque"); + PersistenciaTapecap per = new PersistenciaTapecap(); + Tapecap tapecap = null; + Vector vSeleccion = per.buscarPaciente(troquelado, intPagina); + if (vSeleccion.size()==0) //No se han encontrado datos + { + mensajeNoEncontrado = "No se ha encontrado el paciente"; + } + else + { + tapecap = (Tapecap)vSeleccion.firstElement(); + if (tapecap.getApellidos()!=null){ + ape = tapecap.getApellidos(); + } + if (tapecap.getNombre()!=null){ + nom = tapecap.getNombre().trim(); + } + if (tapecap.getDireccion()!=null){ + dir = tapecap.getDireccion(); + } + if (tapecap.getFecha_nac()!=null){ + fec = tapecap.getFecha_nac().toString(); + String[] arrFecha = fec.split("-"); + fec = arrFecha[2] + "-" + arrFecha[1] + "-" + arrFecha[0]; + } + if (tapecap.getTelefono()!=null){ + tel = tapecap.getTelefono().trim(); + } + if (tapecap.getNif()!=null){ + nif = tapecap.getNif().trim(); + } + if (tapecap.getCompañia()!=null){ + ent = tapecap.getCompañia(); + } + } + }*/ + + if (intBuscarPaciente==1){ + if (request.getParameter("nom")!=null) + nom=(String)request.getParameter("nom"); + + if (request.getParameter("ape")!=null) + ape=(String)request.getParameter("ape"); + + if (request.getParameter("dir")!=null) + dir=(String)request.getParameter("dir"); + + if (request.getParameter("fec")!=null) + fec=(String)request.getParameter("fec"); + + if (request.getParameter("tel")!=null) + tel=(String)request.getParameter("tel"); + + if (request.getParameter("nif")!=null) + nif=(String)request.getParameter("nif"); + + if (request.getParameter("ent")!=null) + ent=(String)request.getParameter("ent"); + + if (request.getParameter("tar")!=null) + tar=(String)request.getParameter("tar"); + } + + + + %> + + + + +

    DATOS BÁSICOS DE LA ANALÍTICA

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + <%=mensajeNoEncontrado %> +
     
    + Apellidos: + + +
    + Nombre: + + +
    + + + +
    + + + +
    + Telefono: + + +
    + DNI: + + +
    + + + +
    + + + + Buscar Paciente +
    + Peticionario: + + +
    + Especialidad: + + +
    + Autorizacion: + + +
     
    + Introducir Paciente +
     
    + +
    + + + + +
    +
    +
    +
    +
    + + + +<% + } + 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 peticiones capturadas (med/peticiones_capturadas.jsp)"); + } +%> diff --git a/jsp/med/liquidacion.jsp b/jsp/med/liquidacion.jsp new file mode 100644 index 0000000..0ec65e9 --- /dev/null +++ b/jsp/med/liquidacion.jsp @@ -0,0 +1,317 @@ +<%@ 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 liquidaciones (med/liquidacion.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 liquidaciones (med/liquidacion.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +double dblImporteTotal=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 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("
    ", " "); + } +} +%> + + + +Liquidaciones + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + SimpleDateFormat sdfFormateadorFecha = new SimpleDateFormat("MM/yyyy"); + java.sql.Date dtFecha = new java.sql.Date(Calendar.getInstance().getTime().getTime()); + sdfFormateadorFecha.format(dtFecha); + + int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + + PersistenciaVTamovextTtactmed per = new PersistenciaVTamovextTtactmed(); + Vector vSeleccion = per.listado_liquidaciones_por_medico(intMedico, intEspecialidad, sdfFormateadorFecha.format(dtFecha), intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + + VTamovextTtactmed vTamovextttactmed = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + vTamovextttactmed = (VTamovextTtactmed)vSeleccion.elementAt(i); + + //vamos calculando el importe total + dblImporteTotal=dblImporteTotal + vTamovextttactmed.getImporteActoMedico(); +%> + + + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + + + + + + +<% + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    CódigoDescripciónCantidadPrecioImporte
    <%=vTamovextttactmed.getActo()%><%=vTamovextttactmed.getDescripcionActoMedico()%><%=vTamovextttactmed.getCantidad()%><%=Utilidades.formatearDouble(vTamovextttactmed.getPrecioActoMedico(),PersistenciaParametros.decimales)%><%=Utilidades.formatearDouble(vTamovextttactmed.getImporteActoMedico(),PersistenciaParametros.decimales)%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
     
    Importe total: <%=Utilidades.formatearDouble(dblImporteTotal,PersistenciaParametros.decimales)%>
    +
    +
    +
    + + + +<% + } + 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 gestión de liquidaciones (med/liquidacion.jsp)"); + } +%> diff --git a/jsp/med/liquidacion_analista.jsp b/jsp/med/liquidacion_analista.jsp new file mode 100644 index 0000000..b541168 --- /dev/null +++ b/jsp/med/liquidacion_analista.jsp @@ -0,0 +1,303 @@ +<%@ 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 liquidaciones (med/liquidacion.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 liquidaciones (med/liquidacion.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +double dblImporteTotal=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 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("
    ", " "); + } +} +%> + + + +Liquidaciones + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + int intEspe = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + + PersistenciaTamovext per = new PersistenciaTamovext(); + Vector vSeleccion = per.MovimientosCapturadosPorMedico(intPagina, intMedico, intEspe); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + +<% + + //Tamovext tamovext= null; + //Object tamovext= null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + Object[] aResultados = vSeleccion.elementAt(i); + +%> + + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + +<% + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    AutorizaciónPacientefechaPrecio
    <%=aResultados[1]%><%=aResultados[0]%><%=Utilidades.formatear_fecha((java.sql.Date)aResultados[2])%><%=aResultados[3]%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    + + + +<% + } + 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 gestión de liquidaciones (med/liquidacion.jsp)"); + } +%> diff --git a/jsp/med/liquidacion_radiologo.jsp b/jsp/med/liquidacion_radiologo.jsp new file mode 100644 index 0000000..5fc2a6e --- /dev/null +++ b/jsp/med/liquidacion_radiologo.jsp @@ -0,0 +1,303 @@ +<%@ 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 liquidaciones (med/liquidacion.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 liquidaciones de radiólogos (med/liquidacion_radiologo.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +StringBuffer strSql = new StringBuffer(); +int intPagina = 0; +double dblImporteTotal=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 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("
    ", " "); + } +} +%> + + + +Liquidaciones + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + +<% +//Creación de la tabla presentación de resultados + int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + int intEspe = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + + PersistenciaTamovext per = new PersistenciaTamovext(); + Vector vSeleccion = per.MovimientosCapturadosPorMedico(intPagina, intMedico, intEspe); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + +<% + + //Tamovext tamovext= null; + //Object tamovext= null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + Object[] aResultados = vSeleccion.elementAt(i); + +%> + + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + +<% + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    AutorizaciónPacientefechaPrecio
    <%=aResultados[1]%><%=aResultados[0]%><%=Utilidades.formatear_fecha((java.sql.Date)aResultados[2])%><%=aResultados[3]%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    + + + +<% + } + 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 gestión de liquidaciones de radiólogos (med/liquidacion_radiologo.jsp)"); + } +%> diff --git a/jsp/med/medicamentos.jsp b/jsp/med/medicamentos.jsp new file mode 100644 index 0000000..d91788f --- /dev/null +++ b/jsp/med/medicamentos.jsp @@ -0,0 +1,335 @@ +<%@ 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 medicamentos (med/medicamentos.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 medicamentos (med/medicamentos.jsp)"); + + try + { + +// Definicion de variables +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(); + +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("
    ", " "); + } +} +%> + + + +Medicamentos + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + + + + +<% + PersistenciaTamedica per = new PersistenciaTamedica(); + Vector vSeleccion = per.listado_medicamentos(strCampoNombre, intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + +<% + Tamedica tamedica = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + tamedica = (Tamedica)vSeleccion.elementAt(i); +%> + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
     
    + + + + + + + +
    Nombre medicamento:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    DescripciónCódigo
    <%=tamedica.getDescripcion()%><%=tamedica.getCodigo()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    + + + +<% + } + 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 medicamentos (med/medicamentos.jsp)"); + } +%> diff --git a/jsp/med/noticias.jsp b/jsp/med/noticias.jsp new file mode 100644 index 0000000..e16e633 --- /dev/null +++ b/jsp/med/noticias.jsp @@ -0,0 +1,487 @@ +<%@ 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" %> + +<% + /* LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de noticias (med/noticias.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 noticias (med/noticias.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strCampoNombre=""; +StringBuffer strSql = new StringBuffer(); +int intPagina=0; +Object aCondiciones[]=null; +SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas); +int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa(); +int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + +//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")); + +//Probando WebServiceEntidad +String saludo = ""; +if (request.getParameter("saludo")!=null) + saludo = (String)request.getParameter("saludo"); + +Tamensaje tamensaje = new Tamensaje(); +PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + +Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + +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("
    ", " "); + } +} +%> + + + +Noticias + + + + + + + + + + + + +
    + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    + +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + <% + //Noticias del cuerpo de la página + PersistenciaTanoticias per = new PersistenciaTanoticias(); + + if(request.getParameter("todas")!=null) //Se ha pulsado en ver todas las noticias + { + %> +
    +
    + TODAS LAS NOTICIAS +
    +
    + + <% + Vector vSeleccion = per.obtener_noticias(medico,intEspecialidad,intPagina); + if(vSeleccion.size()==0){ + %> + + + + + + + <% + }else{ + if (intPagina != 0){ //se tiene en cuenta la paginacion + + %> + + + + <% + } + %> + + + + + <% + Tanoticias tanoticia = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + tanoticia = (Tanoticias)vSeleccion.elementAt(i); + %> + + + + + <% + } + %> + + + <% + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) + %> + + + +
     
    No hay noticias
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    DescripcionFecha
    <%=tanoticia.getNoticia()%><%=sdfFormateadorFecha.format(tanoticia.getFecha())%>
     
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    + NOTICIAS SIN LEER +
    +
    +
    + <% + }else{ //Mostramos las noticias no leidas + %> +
    +
    + NOTICIAS SIN LEER +
    +
    + + <% + if(request.getParameter("leida")!=null) + { + int not = 0; + not=Integer.parseInt(request.getParameter("leida")); + boolean leida = per.insertarNoticiaLeida(not, medico); + } + + + Vector vSeleccion = per.obtener_noticias_no_leidas(medico,intEspecialidad,intPagina); + if(vSeleccion.size()==0){ + %> + + + + + + + <% + }else{ + if (intPagina != 0){ //se tiene en cuenta la paginacion + + %> + + + + <% + } + %> + + + + + + <% + Tanoticias tanoticia = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + tanoticia = (Tanoticias)vSeleccion.elementAt(i); + %> + + + + + + <% + } + %> + + + <% + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + + <% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) + %> + + + +
     
    No hay noticias sin leer
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    DescripcionFechaMarcar como leída
    <%=tanoticia.getNoticia()%><%=sdfFormateadorFecha.format(tanoticia.getFecha())%> +
    + + Leída +
    +
     
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    + + TODAS LAS NOTICIAS +
    +
    +
    + <% + } + %> +
    +
    +
    + + + +<% + } + 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 noticias (med/noticias.jsp)"); + } +%> diff --git a/jsp/med/password.jsp b/jsp/med/password.jsp new file mode 100644 index 0000000..356861a --- /dev/null +++ b/jsp/med/password.jsp @@ -0,0 +1,280 @@ +<%@ 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 password (med/password.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 password (med/password.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; + +//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"); + + +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("
    ", " "); + } +} +%> + + + +Password + + + + + + + +<% +if( ((String)sesion.getAttribute("PERFIL")).equalsIgnoreCase(Constantes.PERFIL_ADMINISTRADOR) ) +{ +%> + +<% +} +else +{ +%> + +<% +} +%> + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + +
    Clave anterior:
    Clave nueva:
    Confirmar clave:
    Deshacer   Aceptar
    +
    +
    +
    +
    + + + +<% + } + 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 password (med/password.jsp)"); + } +%> diff --git a/jsp/med/peticiones_capturadas.jsp b/jsp/med/peticiones_capturadas.jsp new file mode 100644 index 0000000..825d711 --- /dev/null +++ b/jsp/med/peticiones_capturadas.jsp @@ -0,0 +1,435 @@ +<%@ 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="com.tarisan.util.DES" %> + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página de peticiones capturadas (med/peticiones_capturadas.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 peticiones capturadas (med/peticiones_capturadas.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strCampoFecha=""; +StringBuffer strSql = new StringBuffer(); +int intPagina=0; +Object aCondiciones[]=null; +int intExito = 0; +int tipo = 0; //tipo de peticion para buscar el pdf en su carpeta +String texto = ""; +int intTarifa = ((Usuario)sesion.getAttribute("USUARIO")).getTarifa(); +int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); + +//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("fecha")!=null) + strCampoFecha = (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")); +} + +//parametro exito para saber si se ha hecho la insert o no +if (request.getParameter("exito")!=null) + intExito = Integer.parseInt(request.getParameter("exito")); + +//atributo ENC que obtiene la peticion encriptada +String peticionE = ""; +if (sesion.getAttribute("ENC")!=null) { + peticionE = (String)sesion.getAttribute("ENC"); + sesion.removeAttribute("ENC"); +} + +Tamensaje tamensaje = new Tamensaje(); +PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje(); + +int medico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + +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("
    ", " "); + } +} + +if (intEspecialidad == ParametrosConfiguracion.analiticas){ + tipo = 5; + texto = "INTRODUCIR DATOS DE ANALÍTICA MANUALMENTE"; +}else if (intEspecialidad == ParametrosConfiguracion.radiodiagnostico){ + texto = "INTRODUCIR DATOS DE RADIODIAGNÓSTICO MANUALMENTE"; + tipo = 18; +} +%> + + + +Peticiones capturadas + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + +
    +
    + + + + + + + + + + + + +<% + + + /*PersistenciaTtactmedGPC per = new PersistenciaTtactmedGPC(); + Vector vSeleccion = per.listadoDeterminacionesAnaliticas(strCampoNombre, intPagina);*/ + PersistenciaTapecap per = new PersistenciaTapecap(); + Vector vSeleccion = per.obtenerPeticionesCapturadas(medico, strCampoFecha, intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + Tapecap tapecap = null; + String estilo = ""; + + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + tapecap = (Tapecap)vSeleccion.elementAt(i); + + String aut = ""; + if (tapecap.getAutorizacion()!=-1){ + aut = ""+tapecap.getAutorizacion(); + } + + String strPrescriptor = ""; + if (tapecap.getPrescriptor()!=null){ + strPrescriptor = ""+tapecap.getPrescriptor(); + } +%> + + + + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + +<% + } //fin else (vSeleccion.size()!=0) +%> + <%if(intExito != 0) + { + %>
    <%=texto %>
     
    + + + + + + + +
    Fecha (dd-mm-aaaa):  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
     
    <%= pertamensaje.obtenerMensaje(10).getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    CodigoNombreAutorizaciónCompañíaPrescriptor
    <%=tapecap.getCodigo() %><%=tapecap.getApellidos()%>, <%=tapecap.getNombre()%><%=aut %><%=tapecap.getCompañia() %><%=strPrescriptor %>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    + + + +
    + +
    Analítica introducida correctamente
    <% + } + %> +
    +
    + + + +
    +
    + + + +
    + + + +<% + } + 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 peticiones capturadas (med/peticiones_capturadas.jsp)"); + } +%> diff --git a/jsp/med/preaviso.jsp b/jsp/med/preaviso.jsp new file mode 100644 index 0000000..37a0553 --- /dev/null +++ b/jsp/med/preaviso.jsp @@ -0,0 +1,203 @@ +<%@ 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" %> + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página de preaviso de caducidad de clave (med/preaviso.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 preaviso de caducidad de clave (med/preaviso.jsp)"); + + try + { + //Obtención del perfil del usuario conectado + StringBuffer perfil = new StringBuffer(); + perfil.append("|"); + perfil.append(sesion.getAttribute("PERFIL")); + perfil.append("|"); + + //Obtención del mensaje de preaviso de caducidad de fecha + String mensaje = (String)sesion.getAttribute("ERROR"); + if((mensaje == null) || (mensaje.trim().compareTo("") == 0)) + { + mensaje = "Se ha producido un error al realizar la consulta"; + } + sesion.removeAttribute("ERROR"); + + String paginaRedirigida = ""; + if(((String)sesion.getAttribute("PERFIL")).compareTo(Constantes.PERFIL_ADMINISTRADOR) == 0) + { + //paginaRedirigida = "../../servlet/GestorAdministracion?OPCION=" + Constantes.OPC_ADM_USUARIO_LISTA; + paginaRedirigida = "../../servlet/GestorMedicos?OPCION=" + Constantes.OPC_MED_PASSWORD; + } + else + { + //paginaRedirigida = "../../servlet/GestorMedicos?OPCION=" + Constantes.OPC_MED_LIQUIDACION; + paginaRedirigida = "../../servlet/GestorMedicos?OPCION=" + Constantes.OPC_MED_PASSWORD; + } + + + 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("
    ", " "); + } + } +%> + + + +Preaviso de caducidad de clave + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + +
     
    <%= mensaje %>
     
    Continuar
     
    +
    +
    +
    + + + +<% + } + 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 preaviso de caducidad de clave (med/preaviso.jsp)"); + + } +%> \ No newline at end of file diff --git a/jsp/med/prescripciones.jsp b/jsp/med/prescripciones.jsp new file mode 100644 index 0000000..ef57d89 --- /dev/null +++ b/jsp/med/prescripciones.jsp @@ -0,0 +1,350 @@ +<%@ 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.util.Calendar" %> + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página de pescripciones (med/prescripciones.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 pescripciones (med/prescripciones.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strCampoAnio=String.valueOf(Calendar.getInstance().get(Calendar.YEAR)); +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("anio")!=null) + strCampoAnio = (String)request.getParameter("anio"); + +//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("
    ", " "); + } +} +%> + + + +Prescripciones + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + + + + +<% + PersistenciaVTaprescrTamedico per = new PersistenciaVTaprescrTamedico(); + int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + Vector vSeleccion = per.listado_prescripciones(strCampoAnio, intMedico, intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0) { //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + +<% + VTaprescrTamedico vTaprescrTamedico = null; + String estilo = ""; + for(int i = 0; i < vSeleccion.size(); i++) + { + if (i % 2 == 0) + { + estilo = "filaA"; + } + else + { + estilo = "filaB"; + } + vTaprescrTamedico = (VTaprescrTamedico)vSeleccion.elementAt(i); +%> + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + + + <% + if (!strCampoAnio.equalsIgnoreCase("")) + { + %> + + <% + } + else + { + %> + + <% + } + %> + +<% + } //fin else (vSeleccion.size()!=0) +%> +
     
    + + + + + + + +
    Año:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
     
    No existe información para el año seleccionado.
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Nombre facultativoImporte
    <%=vTaprescrTamedico.getNombre() + " " + vTaprescrTamedico.getApellidos()%><%=Utilidades.formatearDouble(vTaprescrTamedico.getImporte(),PersistenciaParametros.decimales)%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
     
    Importe total: <%=Utilidades.formatearDouble(per.obtenerImporteTotal(intMedico,Integer.parseInt(strCampoAnio)), PersistenciaParametros.decimales)%>Importe total: <%=Utilidades.formatearDouble(per.obtenerImporteTotal(intMedico,0), PersistenciaParametros.decimales)%>
    +
    +
    +
    + + + +<% + } + 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 prescripciones (med/prescripciones.jsp)"); + } +%> diff --git a/jsp/med/verify_cambios_perfil.jsp b/jsp/med/verify_cambios_perfil.jsp new file mode 100644 index 0000000..be1bce6 --- /dev/null +++ b/jsp/med/verify_cambios_perfil.jsp @@ -0,0 +1,220 @@ +<%@ 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 gestor de perfiles (med/verify_cambios_perfil.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/verify_cambios_perfil.jsp)"); + + +// 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")); + +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("
    ", " "); + } +} +%> + + + +Gestión Perfiles + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    +
    + + <% + String valores = request.getParameter("valores"); + String borrar = request.getParameter("borrar"); + //LogTarisan.logger.log(NivelLog.INFO, "Llega 136"); + if(valores != null) + { + int grupo = Integer.parseInt(request.getParameter("grupo")); + int espe = Integer.parseInt(request.getParameter("espe")); + String descrip = request.getParameter("descripcion"); + int medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + valores = valores.substring(0, valores.length()); + int i=0; + //LogTarisan.logger.log(NivelLog.INFO, "Llega 145: "+grupo+", espe: "+espe+", descrip:"+descrip+", medico:"+medico); + PersistenciaTagruana perTag = new PersistenciaTagruana(); + perTag.borrar_actos(grupo, espe, medico); + i = perTag.insertar_actos(grupo, espe, medico, valores, descrip); + %> + + <% + descrip = null; + } + else + { + //LogTarisan.logger.log(NivelLog.INFO, "Llega 168:"+borrar); + int medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() ); + int espe = Integer.parseInt(request.getParameter("especialidad")); + PersistenciaTagruana perTag = new PersistenciaTagruana(); + perTag.borrar_actos(Integer.parseInt(request.getParameter("borrar")), espe, medico); + %> + + <% + //sql=null; + medico = espe = 0; + } + valores = borrar = null; + %> + + +
    Se han insertado los <%=i %> análisis del perfil: <%=descrip %>
    Se ha borrado el perfil correctamente.
     
    Volver
    +
    +
    +
    + + + +<% +LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestion de perfiles (med/verify_cambios_perfil.jsp)"); + } +%> diff --git a/jsp/nuevo_ver_pdf.jsp b/jsp/nuevo_ver_pdf.jsp new file mode 100644 index 0000000..825f2f7 --- /dev/null +++ b/jsp/nuevo_ver_pdf.jsp @@ -0,0 +1,64 @@ +<%@ 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.io.*" %> + + + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página de visionado de pdfs (pac/ver_pdf.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 ver pdf"); + response.sendRedirect("../html/login.html"); + } + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de visionado de pdfs (pac/ver_pdf.jsp)"); + + //../../resultados/<%=fichero.getName() +// if (request.getParameter("x")!=null) +// strParametroMenu=(String)request.getParameter("x"); + String fichero = ""; + if(request.getParameter("fichero")!=null) + { + fichero = (String)request.getParameter("fichero"); + } + else + { + //LogTarisan.logger.log(NivelLog.DEBUG, "getparameter.fichero es null"+sesion.getAttribute("fichero")); + if(sesion.getAttribute("fichero")!=null) + { + //LogTarisan.logger.log(NivelLog.DEBUG, "getattribute.fichero es: "+sesion.getAttribute("fichero")); + fichero=(String)sesion.getAttribute("fichero"); + } + } + + /*File miFile = new File("//root/resultados/"+fichero);*/ + File miFile = new File("//var/lib/tomcat/webapps/tarisan/resultados/"+fichero); + String fi = ""; + fi = miFile.getName(); + + LogTarisan.logger.log(NivelLog.DEBUG, "Se va a mostrar el fichero: "+request.getContextPath()+"/resultados/"+fichero); + %> + + + Your browser does not support embedded PDF files. + + +<% +LogTarisan.logger.log(NivelLog.INFO, "Final página de visionado de pdfs (pac/ver_pdf.jsp)"); +} +%> \ No newline at end of file diff --git a/jsp/otras_propiedades.jsp b/jsp/otras_propiedades.jsp new file mode 100644 index 0000000..e6faae0 --- /dev/null +++ b/jsp/otras_propiedades.jsp @@ -0,0 +1,80 @@ +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Arrays" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.util.Date" %> +<%@ page import="java.util.Enumeration" %> +<%@ page import="java.util.Properties" %> +<%@ page import="java.util.StringTokenizer" %> + + + + + +Consulta de diversas propiedades + + + + + +

    Propiedades del sistema

    + +<% + SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss"); + Calendar calendario = Calendar.getInstance(); + + out.print("
    "); + out.print(sdf.format(calendario.getTime())); + out.print("
    "); + +// Properties propiedades = System.getProperties(); + String nombrePropiedad; +// String valorPropiedad; +// String arrayPropiedades[] = new String[propiedades.size()]; +// String arrayValores[]; +// StringTokenizer stValores; +// int i = 0; +// int k; + +// out.println("Consulta de diversas propiedades: "); + + out.println("
      "); + out.println("
    • request: " + request + "
    • "); + out.println("
    • response: " + response + "
    • "); + out.println("
    • session: " + session + "
    • "); + + out.println("
    • session.getServletContext(): " + session.getServletContext() + "
    • "); + out.println("
    • session.getServletContext().getServerInfo(): " + session.getServletContext().getServerInfo() + "
    • "); + out.println("
    • session.getServletContext().getMajorVersion(): " + session.getServletContext().getMajorVersion() + "
    • "); + out.println("
    • session.getServletContext().getMinorVersion(): " + session.getServletContext().getMinorVersion() + "
    • "); + + out.println("
    • session.getServletContext().getAttributeNames(): " + session.getServletContext().getAttributeNames() + "
    • "); + out.println("
        "); + for(Enumeration enu = session.getServletContext().getAttributeNames(); enu.hasMoreElements();) + { + nombrePropiedad = (String)enu.nextElement(); + out.println("
      • " + nombrePropiedad + ": " + session.getServletContext().getAttribute(nombrePropiedad) + "
      • "); + } + out.println("
      "); + + out.println("
    • session.getServletContext().getInitParameterNames(): " + session.getServletContext().getInitParameterNames() + "
    • "); + out.println("
        "); + for(Enumeration enu = session.getServletContext().getInitParameterNames(); enu.hasMoreElements();) + { + nombrePropiedad = (String)enu.nextElement(); + out.println("
      • " + nombrePropiedad + ": " + session.getServletContext().getInitParameter(nombrePropiedad) + "
      • "); + } + out.println("
      "); + + + out.println("
    • super.pageContext: " + super.toString() + "
    • "); +// out.println("
    • super.pageContext.getAttributeNamesInScope(): " + super.pageContext.getAttributeNamesInScope(PageContext.PAGE_SCOPE) + "
    • "); +// out.println("
    • JspFactory.getPageContext(): " + JspFactory.getPageContext() + "
    • "); + + out.println("
    "); + out.println("
    "); +%> + + + + + \ No newline at end of file diff --git a/jsp/pac/analista.jsp b/jsp/pac/analista.jsp new file mode 100644 index 0000000..42ceaf5 --- /dev/null +++ b/jsp/pac/analista.jsp @@ -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("
    ", " "); + } +} + +%> + + + +Analista + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + + +
    + + + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + +<% + if (!strAutorizacion.equalsIgnoreCase("")) //El usuario ha introducido el numero de autorizacion + { + if (blnPeticionCapturada) //ya existe un analisis + { +%> + + + + + + +<% + } + else if (vSeleccion==null || vSeleccion.size()==0) //No se han encontrado datos + { + +%> + + + + + + +<% + } + else //no existe un analisis previo. Se muestran los datos de la prescripcion. + { + mostrarBotonPDF = 1; + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + +<% + 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); +%> + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + + + +<% + } //fin else (vSeleccion.size()!=0) + } +%> +
    + + + <% + if (blnPeticionCapturada) + { + %> + + <% + } + else if ((vSeleccion==null || vSeleccion.size()==0)){ + %> + + <% + } + else + { + %> + + <% + } + %> + +
    +
    + + + + + + + + + +
    Número de autorización:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(8); %><%=tamensaje.getMensaje() %>
     
    <% tamensaje = pertamensaje.obtenerMensaje(9); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    CódigoDescripción
    <%=vtapresca_tarisanttactmed.getActo()%><%=vtapresca_tarisanttactmed.getDescripcionActoMedico()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
     
    + + + + + + + +
    Informe:
    +
    + + + + <% + if (/*intRespuesta == 1*/strRespuesta.compareTo("1")==0){ + %> +
    + <% + 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()) + { + %>
    + + + + +
    <% + } + 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()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_analiticas+resultado+".pdf"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + 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()) + { + %>
    + + + + +
    <% + } + else + { + %>

    PDF inexistente

    <% + } + } + } + } + } + mostrarBotonPDF = 0; + + %> +
    Petición adjudicada correctamente <% + }else if (/*intRespuesta == 2*/strRespuesta.compareTo("2")==0){ + %>No se puede capturar el análisis. El acto no tiene precio<% + } + %> +
    +
    +
    +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/analitica.jsp b/jsp/pac/analitica.jsp new file mode 100644 index 0000000..e3c5a39 --- /dev/null +++ b/jsp/pac/analitica.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("
    ", " "); + } +} + +String path = request.getContextPath(); +String pathSpgif = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; + pathSpgif = path + "/.."; +} +%> + + + +Analítica + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + +
    + + + + + + + + +
    +
    + + + <% + //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) + { + + %> + + + + + + + <% + } + else + { + %> + + + + + + <% + }%> +
     
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    +
    + + + + + + + + + + + + + + +<% + +//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 + { + +%> + + + + + + + + + + + +<% + } + else + { + + if (intPagina != 0){ //se tiene en cuenta la paginacion + +%> + + + +<% + } +%> + + + + + + + + +<% + + 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); + +%> + + <% + if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido. + { + %> + + + + <% + } + else //campo autorizacion tiene un valor valido + { + + %> + + + + + + <% + 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)){ %> + + <%}else{ %> + + <%}%> + + + <% + /*strSql_requestid.delete(0,strSql_requestid.length());*/ + } + %> +<% + } +%> + + + + + +<% + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <%=pertamensaje.obtenerMensaje(67).getMensaje() %>
     
    <%=pertamensaje.obtenerMensaje(68).getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Fecha SolicitudPrescriptorPeticionVer ResultadosRegenerar ResultadosModificar
    <%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%><%=vTaresanaTamedico.getAutorizacion()%><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%> + <% + 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 + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=peticion%> + <% + } + } + %> +
    + <% + + 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()) + { + %>
    + + + + +
    <% + } + 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 + %> +
    + + +
    + <% + }else{ + if(vTaresanaTamedico.isPeticionConGuion()) + { + %> +
    + + +
    + <% + } + else if(vTaresanaTamedico.getAutorizacion() < 999999 && !(vTaresanaTamedico.getAutorizacion()>700000 && vTaresanaTamedico.getAutorizacion()<799999)) + { + %> +
    + + +
    + <% + } + 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()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+resultado+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + direccion = ParametrosConfiguracion.ruta_pdf_resultados; + fichero = new File(direccion+resultado+".pdf"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+resultado+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + 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()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+resultadoConCeros+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + direccion = ParametrosConfiguracion.ruta_pdf_resultados; + fichero = new File(direccion+resultadoConCeros+".pdf"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+resultadoConCeros+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + %>

    <%=pertamensaje.obtenerMensaje(6).getMensaje() %>

    <% //Resultados Pendientes + } + } + } + } + + + + + + + } + } + } + } + } + } + }else if(vTaresanaTamedico.getExtraccion()==3){ + /* Controlamos las peticiones anuladas desde GPC */ + pteExtraccion = 3; + %>

    Petición anulada en GPC

    <% + } + else{ + pteExtraccion = 1; + %>

    Pendiente de Extracción

    <% + } + + + } + + + } + else + { + %>

    <%=pertamensaje.obtenerMensaje(66).getMensaje() %>

    <% //Pendiente de Autorización del paciente + } + %> +
    + <% + /*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"); + %> +
    + + + +
    + <% + }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"); + %> +
    + + + +
    + <% + }else{ + %>

    PDF no regenerable

    <% + } + } + } + else + { + pteExtraccion = 0; + %>

    PDF no regenerable

    <%//Pendiente de Autorización del paciente + } + %> +
    Editar-
     
    <%=pertamensaje.obtenerMensaje(68).getMensaje() %>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } + +%> diff --git a/jsp/pac/anatomia.jsp b/jsp/pac/anatomia.jsp new file mode 100644 index 0000000..104574b --- /dev/null +++ b/jsp/pac/anatomia.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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + + +Anatomía Patoloógica + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + <% + //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) + { + + %> + + + + + + + <% + } + else + { + %> + + + + + + <% + }%> +
     
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    +
    + + + + + + + + + + + + + + +<% + +//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 + { +%> + + + + + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion + +%> + + + +<% + } +%> + + + + + + + +<% + + 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); +%> + + <% + if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido. + { + %> + + + + <% + } + else //campo autorizacion tiene un valor valido + { + %> + + + + + <% + 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)){ %> + + <%}else{ %> + + <%}%> + <% + strSql_requestid.delete(0,strSql_requestid.length()); + } + %> + +<% + } +%> + + + + +<% + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <%=pertamensaje.obtenerMensaje(71).getMensaje() %>
     
    <%=pertamensaje.obtenerMensaje(68).getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Fecha SolicitudPrescriptorPeticionVer resultadosModificar
    <%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%><%=vTaresanaTamedico.getAutorizacion()%><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%> + <% + 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 + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Buesco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=peticion%> + <% + } + } + %> +
    + <% + 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) { + %>

    No hay archivos

    <% + } + 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); + %>
    + + + + +
    <% + }else + { + %>

    No hay resultados

    <% + } + } + } + + + + }else{ + + String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia; + File fichero = new File(direccion+peticion+".pdf"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+peticion+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + direccion = ParametrosConfiguracion.ruta_pdf_resultados; + fichero = new File(direccion+peticion+".pdf"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+peticion+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + %>

    No hay PDF

    <% //Resultados Pendientes + } + } + } + } + + } + + + } + else + { + %> +

    <%=pertamensaje.obtenerMensaje(66).getMensaje() %>

    + <% + } + %> +
    Editar-
     
    <%=pertamensaje.obtenerMensaje(68).getMensaje() %>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } + +%> diff --git a/jsp/pac/anatomia_old.jsp b/jsp/pac/anatomia_old.jsp new file mode 100644 index 0000000..2bfa43d --- /dev/null +++ b/jsp/pac/anatomia_old.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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + + +Anatomía Patológica + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + <% + //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) + { + + %> + + + + + + + <% + } + else + { + %> + + + + + + <% + }%> +
     
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    +
    + + + + + + + + + + + + + + +<% + +//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 + { +%> + + + + + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion + +%> + + + +<% + } +%> + + + + + + + +<% + + 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); +%> + + <% + if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido. + { + %> + + + + <% + } + else //campo autorizacion tiene un valor valido + { + %> + + + + + <% + 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)){ %> + + <%}else{ %> + + <%}%> + <% + strSql_requestid.delete(0,strSql_requestid.length()); + } + %> + +<% + } +%> + + + + +<% + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <%=pertamensaje.obtenerMensaje(71).getMensaje() %>
     
    <%=pertamensaje.obtenerMensaje(68).getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Fecha SolicitudPrescriptorPeticionVer resultadosModificar
    <%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%><%=vTaresanaTamedico.getAutorizacion()%><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%><%=vTaresanaTamedico.getNombre() + " " + vTaresanaTamedico.getApellidos()%> + <% + 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 + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Buesco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=peticion%> + <% + } + } + %> +
    + <% + 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 children = Utilidades.buscar_ficheros(episodio,direccion); + + if (children == null) { + %>

    No hay archivos

    <% + } + else { + for (int f=0; f < children.size() ; f++) { + String filename = children.elementAt(f); + DES encrypter = new DES(""+medico); + String dirE = encrypter.encrypt(filename); + %>
    + + + + +
    <% + } + } + + + + }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()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(direccion+Long.valueOf(vTaresanaTamedico.getAutorizacion()).toString()+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + %>

    <%=pertamensaje.obtenerMensaje(6).getMensaje() %>

    <% + } + } + } + + + } + else + { + %> +

    <%=pertamensaje.obtenerMensaje(66).getMensaje() %>

    + <% + } + %> +
    Editar-
     
    <%=pertamensaje.obtenerMensaje(68).getMensaje() %>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } + +%> diff --git a/jsp/pac/ats.jsp b/jsp/pac/ats.jsp new file mode 100644 index 0000000..e5fc46f --- /dev/null +++ b/jsp/pac/ats.jsp @@ -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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + + +ATS + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + <% + //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) + { + + %> + + + + + + + <% + } + else + { + %> + + + + + + + <% + }%> +
     
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    +
    + + + + + + + + + + + + + + +<% + +//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 + { + +%> + + + + + + + + + + + +<% + } + else + { + + if (intPagina != 0){ //se tiene en cuenta la paginacion + +%> + + + +<% + } +%> + + + + + +<% + + 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); + +%> + + + + + <% + } + %> + + + + + + + +<% + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    El paciente no tiene ninguna prescripción ats efectuada.
     
    Nueva prescripción
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Fecha ModificacionActoAutorizacion
    <%=(sdfFormateadorFecha.format(taconaut.getFechaModificacion())==null)?"":sdfFormateadorFecha.format(taconaut.getFechaModificacion())%><%=taconaut.getActo()%> + <% + 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 + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=peticion%> + <% + } + } + %> +
     
    Nueva prescripción
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/autorizacion.jsp b/jsp/pac/autorizacion.jsp new file mode 100644 index 0000000..f0b2b64 --- /dev/null +++ b/jsp/pac/autorizacion.jsp @@ -0,0 +1,1044 @@ +<%@ 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 autorizacion (pac/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(request.getContextPath() + "/html/login.html"); + } + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de autorizacion (pac/autorizacion.jsp)"); + + try + { + +// Definicion de variables +String strMensajeSinElementos="No ha seleccionado ningún acto médico."; +String strParametroMenu=""; +String strCampoNombre=""; +String strInforme=""; +String strListaElementos=""; +String strListaCodigoElementos=""; +String strCentro=""; +int intImpresion = 0; +int intPagina = 0; +int paginacion = 0; +String strModifiAut=""; +boolean modificar = false; +StringBuffer strSql = new StringBuffer(); +Object aCondiciones[]=null; + +String strEsPrimeraVisita = ""; + +String strListaElementosPrescripcion = ""; +String strInformePrescripcion = ""; +String strAutorizacion=""; +String strCentroImpresion = ""; + +//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 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"); + +//atributo centro utilizado para realizar la impresion +if (request.getAttribute("centroImpresion")!=null) + strCentroImpresion=(String)request.getAttribute("centroImpresion"); + +//parametro impresion que nos indica que se ha de realizar una impresion +if (request.getParameter("imp")!=null) + intImpresion=Integer.parseInt(request.getParameter("imp")); + +//parametro centro que indica el centro donde se van a realizar los actos medicos +if (request.getParameter("centro")!=null) + strCentro=(String)request.getParameter("centro"); + +//parametro autorizacion que se pasa cuando se ha pulsado en editar peticion +if (request.getParameter("modifiAuto")!=null) + strModifiAut=(String)request.getParameter("modifiAuto"); + +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(); + +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.obtenerDatosAutorizacion(Long.parseLong(strModifiAut)); + if (vSeleccion.size()!=0) //No se han encontrado datos + { + Tapresca tapresca = new Tapresca(); + tapresca = (Tapresca)vSeleccion.firstElement(); + strListaCodigoElementos = ""+tapresca.getActo(); + PersistenciaTtactmed perTtactmed = new PersistenciaTtactmed(); + strListaElementos = perTtactmed.obtenerDescripcionActo(tapresca.getActo(),tapresca.getEspecialidad()); + strListaElementosPrescripcion = strListaElementos; + strInforme = tapresca.getTexto(); + } + }else{ + paginacion=0; + } +} + +LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Empezamos a pintar el 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("
    ", " "); + } +} + +String path = request.getContextPath(); +String pathSpgif = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; + pathSpgif = path + "/.."; +} +%> + + +Autorización + + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + +<% + Paciente pac = new 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(); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Asignados colectivo poliza contrato: " + intColectivonew + " - " + dblPolizanew + " - " + intContratonew); + PersistenciaTtactmed per = new PersistenciaTtactmed(); + Vector vSeleccion = null; + if(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios) == 0) + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Asegurado IMQ"); + vSeleccion = per.obtenerActosPeticionAutorizacion(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), intContratonew, intColectivonew, dblPolizanew, strCampoNombre, ((Usuario)sesion.getAttribute("USUARIO")).getTarifa()); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Actos:"+vSeleccion.size()); + } + else + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Busca:"+strCampoNombre); + if(strCampoNombre.length()==0) + strCampoNombre="%"; + vSeleccion = per.obtenerActosPeticionAutorizacion(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), strCampoNombre, ((Usuario)sesion.getAttribute("USUARIO")).getTarifa()); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Actos:"+vSeleccion.size()); + } + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (modificar){ + if (strListaElementos.indexOf(ttactmed.getDescripcion())!=-1){ + %> + + <% + }else{ + %> + + <% + } + }else { + if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + } + %> + + + +<% + } + +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) + } +%> + +
    + + + + + + + + + <% + } + else if (!(tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0)) + { + %> + + + + + + <% + } + else + { + %> +
    + <% + Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta(); + if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0) + { + %> +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
     
     
    Los desplazados deben pasar por las Oficinas IMQ para solicitar autorizaciones.
    + + + + + +
    +
    +
    + + + + + + +
    +
    + + + + + + + +
    + + + + + +
    Centros: + <% + PersistenciaTacentro perTacentro = new PersistenciaTacentro(); + Vector vCentros = perTacentro.obtenerCentros(); + Tacentro tacentro = null; + %> + +
    +
    + + + + +
    + + + + + + + + + +
    Petición de autorización de actos médicos:
    +
    +
    + + + + + + + +
    Informe:
    + +
    +
    +
    +
    + + + + + + + +
    Nombre acto médico:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    ActoDescripción
    <%=ttactmed.getActo()%><%=ttactmed.getDescripcion()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    + + + +
    +
    + + + +
    + + + +<% + } + 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 autorizacion (pac/autorizacion.jsp)"); + } +%> diff --git a/jsp/pac/autorizaciones.jsp b/jsp/pac/autorizaciones.jsp new file mode 100644 index 0000000..1756a17 --- /dev/null +++ b/jsp/pac/autorizaciones.jsp @@ -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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + + +Autorización + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + <% + //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) + { + + %> + + + + + + + <% + } + else + { + %> + + + + + + + <% + }%> +
     
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    +
    + + + + + + + + + + + + + + +<% + +//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 + { + +%> + + + + + + + + + + + +<% + } + else + { + + if (intPagina != 0){ //se tiene en cuenta la paginacion + +%> + + + +<% + } +%> + + + + + + + +<% + + 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 = "-"; + } + +%> + + <% + if (tapresca.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido. + { + %> + + <% + } + else //campo autorizacion tiene un valor valido + { + + %> + + + + + <% + 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; + %> + + <%}else{ %> + + <%}%> + <% + strSql_requestid.delete(0,strSql_requestid.length()); + } + %> + + +<% + } +%> + + + + + +<% + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <%=pertamensaje.obtenerMensaje(70).getMensaje() %>
     
    Nueva Petición
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Fecha SolicitudPeticionEspecialidadTextoModificar
    <%=sdfFormateadorFecha.format(tapresca.getFecha())%><%=sdfFormateadorFecha.format(tapresca.getFecha())%> + <% + 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 + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=peticion%> + <% + } + } + %> +
    <%=tapresca.getEspecialidad()%><%=txt%>Editar-
     
    Nueva Petición
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } + +%> diff --git a/jsp/pac/detallePacientes.jsp b/jsp/pac/detallePacientes.jsp new file mode 100644 index 0000000..5163f04 --- /dev/null +++ b/jsp/pac/detallePacientes.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("
    ", " "); + } +} +%> + + + +Pacientes + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    +
    + + + + + + +<% +//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 + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + 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); +%> + + + + + + +<% + } + + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
    DETALLE DIARIO DE PACIENTES
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    FechaNombreDescripciónPrecio
    <%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%><%=/*vTamovextTaclient.getNombre() + " " + */vTamovextTaclient.getApellidos()%><%=vTamovextTaclient.getDescripcionActoMedico()%><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/diagnostico.jsp b/jsp/pac/diagnostico.jsp new file mode 100644 index 0000000..655de01 --- /dev/null +++ b/jsp/pac/diagnostico.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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + + +Diagnostico + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    +
    + + <% + Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta(); + if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0) + { + %> + + + + + + <% + } + else + { + %> + + + + + + + + + + + + +<% +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 + { +%> + + + + + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + <% + //Para evitar que salga el enlace de ver las imágenes + // %> + + +<% + + /*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); +%> + + + + + + + + + <% /*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()% > + + // + + %> + + <% + /*}*/ + %> + +<% + } +%> + + + + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% +} //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) + + } +%> +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
     
     
    El paciente no tiene ningún radiodiagnóstico efectuado durante los últimos <%=ParametrosConfiguracion.periodoAnalisis%> meses.
     
    Nueva prescripción
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    FechaPrescriptorPrueba RealizadaInformeVer Imagenes
    + <% + 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 + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=sdfFormateadorFecha.format(ttrayos.getFecha())%> + <% + } + } + %> +
    <%=ttrayos.getPrescriptor()%><%=ttrayos.getPrueba()%> + <% + 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 archivos = Utilidades.buscar_ficheros_recursivo_rx(dir);*/ + Vector 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); + %><% + } + } + + %>
    + + + + +
    Ver imagenes
     
    Nueva prescripción
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } +%> \ No newline at end of file diff --git a/jsp/pac/especialidades.jsp b/jsp/pac/especialidades.jsp new file mode 100644 index 0000000..00af27c --- /dev/null +++ b/jsp/pac/especialidades.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("
    ", " "); + } +} +%> + + + +Especialidades + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    + + <% + Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta(); + if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0) + { + %> + + + + + + + <% + } + else + { + %> + + + + + + + + + + + + + + + + + + +<% + 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 + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (modificar){ + if (strListaElementos.indexOf(taespeci.getDescripcion())!=-1){ + %> + + <% + }else{ + %> + + <% + } + }else { + if (strListaElementos.indexOf("¬" + taespeci.getDescripcion() + "¬")!=-1){ + %> + + <% + }else{ + %> + + <% + } + } + %> + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) + } +%> +
     
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    + + + + + + +
    +
    +
    + + + + + +
    +
    + + + + + + + +
    <%=pertamensaje.obtenerMensaje(50).getMensaje() %>
    +
    +
    + + + + + + + +
    <%=pertamensaje.obtenerMensaje(46).getMensaje() %>
    + +
    +
    + + + + + + + +
    <%=pertamensaje.obtenerMensaje(49).getMensaje() %>  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    <%=pertamensaje.obtenerMensaje(41).getMensaje() %>
    <%=taespeci.getDescripcion()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/facturacion.jsp b/jsp/pac/facturacion.jsp new file mode 100644 index 0000000..775ef4a --- /dev/null +++ b/jsp/pac/facturacion.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("
    ", " "); + } +} + +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"; +} +%> + + +Especialidades + + + + + + + + + + + + + + + + +
    + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    +<% + 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); + %> + + + + + + +
    + + + + + + + + + + + + + + + + + + + +<% + 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 + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
    + + + + + + +
    +
    +
    + + + +
    +
    + + + + + + + + + +
    Imputación de actos médicos:
    +
    +
    +
    + + + + + + + +
    Nombre acto médico:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    ActoDescripciónPrecio
    <%=ttactmed.getActo()%><%=ttactmed.getDescripcion()%><%=Utilidades.formatearDouble(per.obtenerPrecioActoMedico(((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), ttactmed.getActo(), ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad()), PersistenciaParametros.decimales)%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +<% +} +else { +%> + + + + + + + + + + + + + + + + + + + + <% + if (blnEsPolizaIgualaMedico == 1){ %> + + <%} + else { %> + + <% + }%> + + +
     
     
     
    <%=pertamensaje.obtenerMensaje(12).getMensaje() %><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    +<% +} +%> +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/facturacion_chipcard.jsp b/jsp/pac/facturacion_chipcard.jsp new file mode 100644 index 0000000..b487e68 --- /dev/null +++ b/jsp/pac/facturacion_chipcard.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("
    ", " "); + } +} + +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"; +} +%> + + +Especialidades para desplazados + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + <% + if(mensaje != null) + { + %> + + + + <% + } + %> + + + + + + +<% + 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 + { +%> + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
    + + + + + + +
    +
    +
    + + + + + + +
    +
    + + + + + + + + + +
    <%=pertamensaje.obtenerMensaje(44).getMensaje() %>
    +
    +
    +
    + + + + + + + +
     <%=mensaje %>  
    +
    + + + + + + + +
    <%=pertamensaje.obtenerMensaje(43).getMensaje() %>  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    <%=pertamensaje.obtenerMensaje(40).getMensaje() %><%=pertamensaje.obtenerMensaje(41).getMensaje() %><%=pertamensaje.obtenerMensaje(42).getMensaje() %>
    <%=ttactmed.getActo()%><%=ttactmed.getDescripcion()%><%=Utilidades.formatearDouble(ttactmed.getPrecio(), PersistenciaParametros.decimales)%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    + + + + + + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/facturacion_iguala.jsp b/jsp/pac/facturacion_iguala.jsp new file mode 100644 index 0000000..498299c --- /dev/null +++ b/jsp/pac/facturacion_iguala.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("
    ", " "); + } +} +%> + + +Especialidades + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    +
    + + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + +
    + + + + + + + + +
    +
    + <%=pertamensaje.obtenerMensaje(12).getMensaje() %> +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/facturacion_odon.jsp b/jsp/pac/facturacion_odon.jsp new file mode 100644 index 0000000..170296f --- /dev/null +++ b/jsp/pac/facturacion_odon.jsp @@ -0,0 +1,1082 @@ +<%@ 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.util.DES" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.util.Calendar" %> + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion (pac/facturacion_odon.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(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"); + } + //SI ES ADESLAS LO MANDAMOS A FACTURACION CHIPCARD + else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_adeslas)==0) + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Paciente ADESLAS, lo mandamos a facturacion chipcard"); + response.sendRedirect(request.getContextPath() + "/jsp/pac/facturacion_chipcard.jsp?x=0&pagina=1"); + } + /*else if((((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato() != ParametrosConfiguracion.contrato_dental) && (((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato() != ParametrosConfiguracion.salud_con_cobertura_dental)) + { + LogTarisan.logger.log(NivelLog.INFO, "Redirección a franquicias_dentales.jsp"); + response.sendRedirect(request.getContextPath() + "/jsp/pac/franquicias_dentales.jsp?x=2&pagina=1"); + }*/ + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de facturacion_odon (pac/facturacion_odon.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 strEsPrimeraLimpieza = ""; + 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"; +if (perTaprimer.esPrimeraLimpieza( intMedico, intColectivo, dblPoliza, intBeneficiario) ) + strEsPrimeraLimpieza = "si"; +else + strEsPrimeraLimpieza = "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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + +Odontología + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + + +
    + + + + + + + + +
    +
    +<% + 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); + %> + + + + + + + + <% + PersistenciaTTFranquiciasDentales perT = 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 = perT.obtenerNumeroFranquicia(intEspecialidadnew, intEntidadnew, longColectivonew,anio); + + + + if (franquicia==0) //No se han encontrado datos al buscar una franquicia por entidad + { + int franquiciaPorContrato = 0; + franquiciaPorContrato = perT.obtenerNumeroFranquiciaPorContrato(intContrato); + + if (franquiciaPorContrato==0) //No se han encontrado datos al buscar una franquicia por contrato + { + %> + + + + + + + <% + } + else + { + + String franquiciaE = ""; + String strMedico = ""+((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + DES encrypter = new DES(strMedico); + franquiciaE = "franquicia_"+ franquiciaPorContrato; + franquiciaE = encrypter.encrypt(franquiciaE); + %> + + + + + + + + + + <% + } + } + else + { + String franquiciaE = ""; + String strMedico = ""+((Usuario)sesion.getAttribute("USUARIO")).getMedico(); + DES encrypter = new DES(strMedico); + franquiciaE = "franquicia_"+ franquicia; + franquiciaE = encrypter.encrypt(franquiciaE); + %> + + + + + + + + + + <% + } + %> +
    + + + + + + + + + + + + + + + + + + + +<% + PersistenciaTtactmed per = new PersistenciaTtactmed(); + long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo(); + double dblPolizanew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(); + PersistenciaPaciente perPa = new PersistenciaPaciente(); + int intEntidad = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadIMQ(); + Vector vSeleccion = new Vector(); + Vector vSeleccion2 = new Vector(); + + if(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)!=0) + { + 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() + " - Asegurado DESPLAZADO. Actos cubiertos: " + vSeleccion.size()); + }else{ + + + if(Utilidades.buscar_en_properties(""+((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato(), ParametrosConfiguracion.contrato_dental)){ + PersistenciaTabenefi perTaBen = new PersistenciaTabenefi(); + int cliente = perTaBen.obtenerNumCli(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta()); + int entidad = perTaBen.obtenerEntidad(cliente,((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta()); + long colec = perTaBen.obtenerColectivo(cliente,((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta()); + + if (perPa.tieneSalud(entidad,colec,intMedico)/*&&((colec!=-1)&&(entidad!=-1))*/){ //Comprueba si al pasar una tarjeta dental el paciente tiene tambien una arjeta de salud. Esto es para sacar todos los actos cubiertos. + PersistenciaTTColect perTTCol = new PersistenciaTTColect(); + int contratoSalud = perTTCol.obtenerContrato(entidad,colec); + + + vSeleccion = per.obtenerActosDentalesYSalud(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato(), intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre, contratoSalud); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Asegurado IMQ. Actos cubiertos: " + vSeleccion.size()); + + }else{ + vSeleccion = per.obtenerActosAutoprescribibles(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato(), intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Asegurado IMQ. Actos cubiertos: " + vSeleccion.size()); + } + }else{ + vSeleccion = per.obtenerActosAutoprescribibles(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato(), intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Asegurado IMQ. Actos cubiertos: " + vSeleccion.size()); + } + +/* vSeleccion = per.obtenerActosAutoprescribibles(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato(), intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Asegurado IMQ. Actos cubiertos: " + vSeleccion.size()); + + /*if(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato() == ParametrosConfiguracion.contrato_dental){*/ +/* if(Utilidades.buscar_en_properties(""+((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato(), ParametrosConfiguracion.contrato_dental)){ + PersistenciaTabenefi perTaBen = new PersistenciaTabenefi(); + int cliente = perTaBen.obtenerNumCli(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta()); + int entidad = perTaBen.obtenerEntidad(cliente,((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta()); + long colec = perTaBen.obtenerColectivo(cliente,((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta()); + + if (perPa.tieneSalud(entidad,colec,intMedico)/*&&((colec!=-1)&&(entidad!=-1))*//*){ //Comprueba si al pasar una tarjeta dental el paciente tiene tambien una arjeta de salud. Esto es para sacar todos los actos cubiertos. + PersistenciaTTColect perTTCol = new PersistenciaTTColect(); + int contratoSalud = perTTCol.obtenerContrato(entidad,colec); + + vSeleccion2 = per.obtenerActosAutoprescribibles(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), contratoSalud, intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El asegurado ha pasado una tarjeta dental pero también tiene una de salud. Sacamos sus actos: " + vSeleccion.size()); + + if (vSeleccion.size()!=0){ + if (vSeleccion2.size()!=0){ + Vector vAux = new Vector(); + for (int i=0;i < vSeleccion.size(); i++){ + vAux.add(vSeleccion.elementAt(i)); + } + for (int x=0;x < vSeleccion2.size(); x++){ + vAux.add(vSeleccion2.elementAt(x)); + } + vSeleccion = vAux; + } + } + + Utilidades.ordenarVectorTTActmed(vSeleccion); + } + }*/ + } + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
    + + + + + + +
    +
    +
    + + + +
    +
    + + + + + + + + + +
    Imputación de actos médicos:
    +
    +
    +
    + + + + + + + +
    Nombre acto médico:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    ActoDescripciónPrecio
    <%=ttactmed.getActo()%><%=ttactmed.getDescripcion()%><%=Utilidades.formatearDouble(per.obtenerPrecioActoMedico(((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), ttactmed.getActo(), ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad()), PersistenciaParametros.decimales)%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
     
    No tiene franquicias asociadas
     
     
    +
    + + + + +
    +
     
     
    +
    + + + + +
    +
    +<% +} +else { +%> + + + + + + + + + + + + + + + + + + + + <% + if (blnEsPolizaIgualaMedico == 1){ %> + + <%} + else { %> + + <% + }%> + + +
     
     
     
    <%=pertamensaje.obtenerMensaje(12).getMensaje() %><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    +<% +} +%> +
    +
    +
    + + + +
    + + + +<% + } + 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_odon (pac/facturacion_odon.jsp)"); + } +%> diff --git a/jsp/pac/facturacion_rehabpod.jsp b/jsp/pac/facturacion_rehabpod.jsp new file mode 100644 index 0000000..25827c8 --- /dev/null +++ b/jsp/pac/facturacion_rehabpod.jsp @@ -0,0 +1,1071 @@ +<%@ 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.Properties" %> + +<% + //LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion_rehabpod (pac/facturacion_rehabpod.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_rehabpod (pac/facturacion_rehabpod.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; + int intFinalizar = 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("|"); + 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){ + if (request.getParameter("nombre")!="") + strCampoNombre = (String)request.getParameter("nombre"); +} + +//parametro pagina para realizar la paginacion +if (request.getParameter("pagina")!=null){ + if (request.getParameter("pagina")!="") + intPagina=Integer.parseInt(request.getParameter("pagina")); +} + +//parametro listaPrescripciones para mostrar las prescripciones seleccionadas +if (request.getParameter("listaElementos")!=null){ + if (request.getParameter("listaElementos")!="") + strListaElementos=(String)request.getParameter("listaElementos"); +} + +//parametro listaPrescripciones para mostrar las prescripciones seleccionadas +if (request.getParameter("listaCodigoElementos")!=null){ + if (request.getParameter("listaCodigoElementos")!="") + strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos"); +} + +//parametro listaElementosPrescripciones utilizado para realizar la impresion +if (request.getParameter("listaElementosPrescripcion")!=null){ + if (request.getParameter("listaElementosPrescripcion")!="") + strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion"); +} + +//parametro impresion que nos indica que se ha de realizar una impresion +if (request.getParameter("imp")!=null) { + if (request.getParameter("imp")!="") + intImpresion=Integer.parseInt(request.getParameter("imp")); +} + +//parametro finalizar que nos indica que se ha pulsado el boton de finalizar una cura +if (request.getParameter("finalizar")!=null) { + if (request.getParameter("finalizar")!="") + intFinalizar=Integer.parseInt(request.getParameter("finalizar")); +} + +String mensaje = (String)sesion.getAttribute("RESULTADO"); +sesion.setAttribute("RESULTADO", null); +int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico(); +int intEspecialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(); +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 diagnostico= ""; + +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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + +Especialidades + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + +
    + + + + + + + + +
    +
    +<% +//comprobar si tiene una autorizacion válida +long longAutorizacion = 0; +PersistenciaTaconaut perTaconaut = new PersistenciaTaconaut(); +PersistenciaTTMovaut persistenciaTTMovaut = new PersistenciaTTMovaut(); +String tarjeta = ""; +if(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta() == 0) + tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado(); +else + tarjeta = String.valueOf(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta()); + +if(request.getParameter("nombre") != "" && request.getParameter("nombre") != null) //Se trata de una búsqueda +{ + longAutorizacion = Long.parseLong(request.getParameter("nombre")); + if(perTaconaut.BuscarAutorizacion(longAutorizacion, tarjeta)) + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Autorizacion: "+longAutorizacion); + else + longAutorizacion = -1; +} +else if(request.getParameter("autorizacion") != null) +{ + longAutorizacion = Long.parseLong(request.getParameter("autorizacion")); + if(perTaconaut.BuscarAutorizacion(longAutorizacion, tarjeta)) + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Autorizacion: "+longAutorizacion); + else + longAutorizacion = -1; +} +else +{ + int perfilsesion = Integer.parseInt((String)sesion.getAttribute("PERFIL")); + if( perfilsesion == Integer.parseInt(Constantes.PERFIL_ATS)) + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - es ATS buscamos en taconaut"); + longAutorizacion = perTaconaut.ultimaAutorizacion(intEspecialidad, tarjeta, strCampoNombre); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Autorizacion: "+longAutorizacion); + } + else + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - NO es ATS buscamos en ttmovaut: " + intEspecialidad + " perfilats:" + Constantes.PERFIL_ATS); + longAutorizacion = persistenciaTTMovaut.ObtenerAutorizacion((Paciente)sesion.getAttribute("PACIENTE"), intMedico); + } +} + + if (longAutorizacion != 0 && longAutorizacion != -1) + { + diagnostico = perTaconaut.ObtenerInforme(longAutorizacion); + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Tenemos autorizacion: "+longAutorizacion+" PERFIL TARISAN: " + perfilIguala.toString() + " - "); + %> + + + + + + + +
    + + + + + + + + + + + + + + <% + if(mensaje != null) + { + %> + + + + <% + } + %> + + + + + + +<% + //parametro finalizar que nos indica que se ha pulsado el boton de finalizar una cura + if (request.getParameter("finalizar")!=null) { + intFinalizar=Integer.parseInt(request.getParameter("finalizar")); + } + + PersistenciaTtactmed per = new PersistenciaTtactmed(); + long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo(); + double dblPolizanew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(); + + //Esta es la consulta que le cuesta 20seg. devolver + aCondiciones = new Object[1]; + aCondiciones[0] = Integer.valueOf(intEspecialidad); + String actos = ""; + PersistenciaTTMovaut perTTmovaut= new PersistenciaTTMovaut(); + //obtenemos los actos incluidos en la autorización + + Vector vSeleccion = null; + int perfilsesion = Integer.parseInt((String)sesion.getAttribute("PERFIL")); + PersistenciaTaconaut pertacon = new PersistenciaTaconaut(); + Long autoriza = longAutorizacion; + boolean autorizacionats = false; + if( perfilsesion == Integer.parseInt(Constantes.PERFIL_ATS) && autoriza != null) + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - valor autorizacion: " + longAutorizacion + ", autoriza: " + autoriza); + vSeleccion = pertacon.ObtenerActosAutorizados(autoriza); + autorizacionats = true; + } + else + { + vSeleccion = perTTmovaut.ObtenerActosAutorizados(longAutorizacion, intEspecialidad); + } + + if (vSeleccion.size()!=0) + { + for(int i = 0; i < vSeleccion.size(); i++) + { + if((Integer)vSeleccion.elementAt(i) > 0) + { + actos = actos + vSeleccion.elementAt(i).toString() + ", "; + } + } + actos = actos.substring(0, actos.length()-2); + } + //vSeleccion = per.seleccionar("select * from ttactmed where especialidad = ? and acto in ("+actos+")", intPagina, aCondiciones); + vSeleccion = per.listadoActosAutorizados(intEspecialidad, actos, intPagina); + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + + + + + +<% + 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); + + //obtenemos la tarjeta del paciente de sesion + tarjeta = ""; + if(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta() == 0) + tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado(); + else + tarjeta = String.valueOf(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta()); + + if(!autorizacionats) + { + perTaconaut = new PersistenciaTaconaut(); + if(!(perTaconaut.ComprobarAutorizacionValida(longAutorizacion, intMedico, ttactmed.getActo(), tarjeta))) + { + int cuantos = perTTmovaut.ObtenerCantidadActoAutorizado(longAutorizacion, ttactmed.getActo()); + //Insertamos la línea de la autorización y el número de sesiones en "Alberto". + if(perTaconaut.CrearAutorizacionValida(longAutorizacion, intMedico, intEspecialidad, ttactmed.getActo(), cuantos, 1, tarjeta)) + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - No hay autorizacion en taconaut pero si en ttmovaut. Creamos una nueva correctamente: "+longAutorizacion+" "+intMedico+" "+intEspecialidad+" "+ttactmed.getActo()+" "+cuantos+" 0 "+tarjeta); + } + } + } + + //hacemos el tratamiento por si viene comilla simple en la descripcion + strDescripcionSinComilla = ttactmed.getDescripcion().replace('\'', '~'); + %> + + <% + boolean habilitado = false; + boolean finalizado = false; + int sesiones =0; + if(!autorizacionats) + { + if (intFinalizar!=0){ + perTaconaut.ponerCuraACero(longAutorizacion, intMedico, ttactmed.getActo(), intEspecialidad); + } + habilitado = perTaconaut.PermitirImputarActo(longAutorizacion, intEspecialidad, intMedico, ttactmed.getActo(), tarjeta); + sesiones = perTaconaut.ObtenerSesionesPendientes(longAutorizacion, intMedico, ttactmed.getActo()); + finalizado = perTaconaut.esCuraFinalizada(longAutorizacion, intEspecialidad, intMedico, ttactmed.getActo(), tarjeta); + } + else + { + if (intFinalizar!=0){ + perTaconaut.ponerCuraACero(longAutorizacion, ttactmed.getActo(), intEspecialidad); + } + sesiones = perTaconaut.ObtenerSesionesPendientes(longAutorizacion, ttactmed.getActo()); + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - \n\n "+perTaconaut.PermitirImputarActo(longAutorizacion, intEspecialidad, ttactmed.getActo(), tarjeta)+"\n\n"); + + + if(ParametrosConfiguracion.actos_ats_curas.indexOf(String.valueOf(ttactmed.getActo() ))>0) + habilitado = perTaconaut.PermitirImputarActo(longAutorizacion, intEspecialidad, ttactmed.getActo(), tarjeta); + else + habilitado = true; + + finalizado = perTaconaut.esCuraFinalizada(longAutorizacion, intEspecialidad, ttactmed.getActo(), tarjeta); + + + } + + + if(habilitado && sesiones > 0 && !finalizado) + { + + if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + } + else + { + %> + + <% + } + %> + + + + <%if(sesiones <=2) + { + estilo = "filaC"; + } + %> + <% + int acto = ttactmed.getActo(); + /*if((acto==6000 || acto==6001 || acto==6002 || acto==6003) && !finalizado){*/ + if(Utilidades.buscar_en_properties(""+acto, ParametrosConfiguracion.actos_ats_curas) && !finalizado){ + + if(habilitado && sesiones > 0 && !finalizado){ + %><% + } + } + %> + +<% + intFinalizar=0; + } + +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
    + + + + + + +
    +
    +
    + + + + + + +
    +
    + + + + + + + + + +
    <%=pertamensaje.obtenerMensaje(44).getMensaje() %>
    +
    +
    +
    + + + + + + + +
     <%=mensaje %>  
    +
    + + + + + + + + + + + + + +
    <%=pertamensaje.obtenerMensaje(48).getMensaje() %>  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    <%=pertamensaje.obtenerMensaje(40).getMensaje() %><%=pertamensaje.obtenerMensaje(41).getMensaje() %><%=pertamensaje.obtenerMensaje(42).getMensaje() %><%=pertamensaje.obtenerMensaje(47).getMensaje() %>
    <%=ttactmed.getActo()%><%=ttactmed.getDescripcion()%><%=Utilidades.formatearDouble(per.obtenerPrecioActoMedico(((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), ttactmed.getActo(), ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad()), PersistenciaParametros.decimales)%><%=sesiones%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    Informe Diagnóstico:<%=diagnostico %>
    +
    +
    +<% +} +else { +%> + + + + + + + + + + + + + + + + + + + + <% + if (longAutorizacion == 0) + { + %> + + + + <% + }else if (longAutorizacion == -1) + { + %> + + + + + + + + + + + + <% + }%> +
     
     
     
    Paciente sin autorización activa, debe acudir a las oficinas de IMQ para solicitar una.
    La autorización introducida no es correcta.
     
    <%=pertamensaje.obtenerMensaje(30).getMensaje() %>
    +<% +} +%> +
    +
    +
    + + + +
    + + + +<% + } + 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_rehabpod (pac/facturacion_rehabpod.jsp)"); + } +%> diff --git a/jsp/pac/firma_autorizacion.jsp b/jsp/pac/firma_autorizacion.jsp new file mode 100644 index 0000000..e62759b --- /dev/null +++ b/jsp/pac/firma_autorizacion.jsp @@ -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("
    ", " "); + } + } +%> + + + +Firma de autorización del beneficiario + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    + + + + + +
    +
    +
    + + + + + + + +
    +
    + + + + + + + + + + + + +
    Le recordamos que una vez firmado el consentimiento, para que este tenga validez deberá ser remitido al IMQ.
    Hasta entonces este aviso continuará apareciendo. Gracias
    ¿Firma el beneficiario la autorización?
    + + + + +
    Aceptar Cancelar
    +
    +
    +
    +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/gestor.jsp b/jsp/pac/gestor.jsp new file mode 100644 index 0000000..c82a1d3 --- /dev/null +++ b/jsp/pac/gestor.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("
    ", " "); + } +} + +String path = request.getContextPath(); +String pathSpgif = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; + pathSpgif = path + "/.."; +} +%> + + +Módulo de Gestión de Pacientes + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + + +
    + + + + + + + + + +
    + + +

    No pasar tarjetas de DESPLAZADOS en ATS, Rehabilitación, Podología y Analistas.
    Ver compañias incluidas

    +
    +
    +
    +
    + + + + + +
    +
    + + <% + if (aviso!=null && aviso.length() > 0){ + %> + + + + + + + <% + } + if (mensaje!=null && mensaje.length() > 0){ + %> + + + + + + + <% + } + if(request.getParameter("embosado")!=null) + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Página para introducir el troquelado"); + %> + + + + + + + + + + + + + + <% + } + else + { + + %> + + + + + + + + + + + + <% + + }%> + <% + if(request.getParameter("embosado")!=null) + { + %> +
     
     
    Introduzca los números de la tarjeta:
    Pase la tarjeta:
    Validar
    Pase la tarjeta:  Validar    Borrar
     
    + + +
    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:
    + <% + } + else + { + %> +
    +
    +
    + + +
    + + +
    +
    + +
    + + + +
    + + + +<% + } + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de pacientes (pac/gestor.jsp)"); + } +%> diff --git a/jsp/pac/gestor_chipcard.jsp b/jsp/pac/gestor_chipcard.jsp new file mode 100644 index 0000000..3fdde39 --- /dev/null +++ b/jsp/pac/gestor_chipcard.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("
    ", " "); + } +} +%> + + + +Módulo de Gestión de Pacientes + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + + + +
    + + + + + + + + + +
    + + + + + + + + + +
    +
    +
    + + + + + + +
    +
    + + + + + + + + + + + + + + + + +
     
    Pase la tarjeta:
     
    Validar
    +
    +
    +
    + + + +<% +LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de pacientes (pac/gestor.jsp)"); + } +%> diff --git a/jsp/pac/historia.jsp b/jsp/pac/historia.jsp new file mode 100644 index 0000000..1a45d99 --- /dev/null +++ b/jsp/pac/historia.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ágina 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ón invalidada"); + response.sendRedirect("../../html/login.html"); + } + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página 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ó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")); + +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("
    ", " "); + } +} +%> + + + +Historial Paciente + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + +
    + + + + + + + + +
    +
    + + + + +
    +
    + + +<% + Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta(); + if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0) + { + %> + + + + + + <% + } + else + { + %> + + + + + +<% +//Creación de la tabla presentación 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 + { + +%> + + + + + + + + + + <%} %> +
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    +
    + + + + + + + + + + + + + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + +<% + 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); +%> + + + + +<% + } +%> +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + + + + +
    Indicaciones:
    + +
    + + + + + +
    OKDeshacer
    +
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    FechaDescripción
    <%=sdfFormateadorFecha.format(tamovmpo.getFecha())%><%=tamovmpo.getTexto()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
     
    +
    + + + + + + + + + + + + + + + + + + +<% + } //fin else (vSeleccion.size()!=0) +%> +
    Indicaciones:
    + +
    + + + + + +
    OKDeshacer
    +
    +
    +
    + + + + +<% + } + 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 del historial del paciente (pac/historia.jsp)"); + } +%> diff --git a/jsp/pac/img/sp.gif b/jsp/pac/img/sp.gif new file mode 100644 index 0000000000000000000000000000000000000000..88870419315135da84bcc93711ff9bbf7fb01429 GIT binary patch literal 86 zcmZ?wbhEHblx47Bn8*ME|G@yrQ2fcl$iTqFpaT*G$ulsi_w=tk{g!|6oGrJyH{aXy ho4@Um$Fygi%U+$@_Ky4bC!g!zdY}I~*UZXb4FL3aBpm<% literal 0 HcmV?d00001 diff --git a/jsp/pac/img/sp_imp.gif b/jsp/pac/img/sp_imp.gif new file mode 100644 index 0000000000000000000000000000000000000000..076c7538e60cdfc58adf59c9f231302eaf5ab4a7 GIT binary patch literal 43 scmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE7Dgb&paUX6G7d~kE{qJ;0Lp3yIRF3v literal 0 HcmV?d00001 diff --git a/jsp/pac/img/transparent.gif b/jsp/pac/img/transparent.gif new file mode 100644 index 0000000000000000000000000000000000000000..d794434481d0414bcfe6d6d73fc97045fa134b06 GIT binary patch literal 43 qcmZ?wbhEHbWMp7u_`m=H|NsA2{K>+|02I&x@j)^SOiVtE4Aub7RR?ka literal 0 HcmV?d00001 diff --git a/jsp/pac/justificacionAnalitica.jsp b/jsp/pac/justificacionAnalitica.jsp new file mode 100644 index 0000000..861153c --- /dev/null +++ b/jsp/pac/justificacionAnalitica.jsp @@ -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ágina 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ón invalidada"); + response.sendRedirect("../../html/login.html"); + } + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de justificacion de la analitica (pac/justificacionAnalitica.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; +String strTipo=""; +String paginaSolicitud = "solicitudAnaliticaNiveles.jsp"; + +//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 tipo para saber si la justificacion es de tipo anatomia patologica o analítica +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("
    ", " "); + } +} +%> + + + +Analítica + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    +
    + + + + + + + + + +
     
    + + + + + + + + + + + + + + + +
    Indique la justificación de la nueva prescripción:
    + +
     
    + + + + + + + +
    AceptarDeshacer
    +
    +
    +
    + + + + +<% + } + 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 justificacion de la analitica (pac/justificacionAnalitica.jsp)"); + } +%> diff --git a/jsp/pac/justificacionDiagnostico.jsp b/jsp/pac/justificacionDiagnostico.jsp new file mode 100644 index 0000000..b341176 --- /dev/null +++ b/jsp/pac/justificacionDiagnostico.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ágina 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ón invalidada"); + response.sendRedirect("../../html/login.html"); + } + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de justificacion del diagnostico (pac/justificacionDiagnostico.jsp)"); + + try + { + +// Definicion de variables +String strParametroMenu=""; + +//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"); + +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("
    ", " "); + } +} +%> + + + +Diagnóstico + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    +
    + + + + + + + + + +
     
    + + + + + + + + + + + + + + +
    Indique la justificación de prescribir una nueva radiografía:
    + +
     
    + + + + + + + +
    DeshacerAceptar
    +
    +
    +
    + + + + +<% + } + 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 justificacion del diagnostico (pac/justificacionDiagnostico.jsp)"); + } +%> diff --git a/jsp/pac/peticiones.jsp b/jsp/pac/peticiones.jsp new file mode 100644 index 0000000..835387b --- /dev/null +++ b/jsp/pac/peticiones.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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + + +Otras Peticiones + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + <% + //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) + { + + %> + + + + + + + <% + } + else + { + %> + + + + + + + <% + }%> +
     
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    +
    + + + + + + + + + + + + + + +<% + +//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 + { + +%> + + + + + + + + + + + +<% + } + else + { + + if (intPagina != 0){ //se tiene en cuenta la paginacion + +%> + + + +<% + } +%> + + + + + + + +<% + + 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 = "-"; + } + +%> + + <% + if (tapresca.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido. + { + %> + + <% + } + else //campo autorizacion tiene un valor valido + { + + %> + + + + + <% + 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()); + %> + + <%}else{ %> + + <%}%> + <% + strSql_requestid.delete(0,strSql_requestid.length()); + } + %> + + +<% + } +%> + + + + + +<% + if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) + + } //fin else (vSeleccion.size()!=0) +%> +
     
     
    <%=pertamensaje.obtenerMensaje(70).getMensaje() %>
     
    <%=pertamensaje.obtenerMensaje(68).getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Fecha SolicitudPeticionEspecialidadTextoModificar
    <%=sdfFormateadorFecha.format(tapresca.getFecha())%><%=sdfFormateadorFecha.format(tapresca.getFecha())%> + <% + 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 + { + %> +
    + + + + +
    + <% + }else{ + ruta = ParametrosConfiguracion.ruta_pdf_peticiones; + ficheroPeticion = new File(ruta+peticion+".pdf"); + if(ficheroPeticion.exists()) //Busco en la ubicación vieja + { + %> +
    + + + + +
    + <% + }else{ + %> + <%=peticion%> + <% + } + } + %> +
    <%=tapresca.getEspecialidad()%><%=txt%>Editar-
     
    <%=pertamensaje.obtenerMensaje(68).getMensaje() %>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } + +%> diff --git a/jsp/pac/prescripcion_ats.jsp b/jsp/pac/prescripcion_ats.jsp new file mode 100644 index 0000000..28a9734 --- /dev/null +++ b/jsp/pac/prescripcion_ats.jsp @@ -0,0 +1,1056 @@ +<%@ 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 prescripcion ats (pac/prescripcion_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 prescripcion ats (pac/prescripcion_ats.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 strUnidades=""; +String strInforme=""; +String strAutorizacion=""; +String strTextBox = ""; +int intPagina = 0; +int i=0; +StringBuffer strSql = new StringBuffer(); +Object aCondiciones[]=null; + +int intImpresion = 0; + +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("|"); + +String mensaje = ""; +mensaje = (String)sesion.getAttribute("ERROR"); +sesion.setAttribute("ERROR", ""); + +if(mensaje!=""){ + strMensajeSinElementos = "

    "+ mensaje + "

    "; +} + +//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 listaUnidades +if (request.getParameter("unidadesElementosPrescripcion")!=null) + strUnidades=(String)request.getParameter("unidadesElementosPrescripcion"); + +//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")); +} + +//atributo autorizacion utilizado para realizar la impresion +if (request.getAttribute("autorizacion")!=null) { + //strAutorizacion=(String)request.getAttribute("autorizacion"); + if(request.getAttribute("autorizacion").getClass() == Long.class) + { + strAutorizacion = String.valueOf(request.getAttribute("autorizacion")); + } + else + { + strAutorizacion = (String)request.getAttribute("autorizacion"); + } +} + +//parametro justificacion que contiene la justificacion del medico para hacer una nueva prescripcion. +//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('\'', '~'); +} + +//parametro nombreTextBox para saber a que caja de texto hay que ponerle el focus y hacerle parpadear cambiando su color +if (request.getParameter("nombreTextBox")!=null) +{ + strTextBox=(String)request.getParameter("nombreTextBox"); +} + + +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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + + +ATS + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    + + +<% + Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta(); + if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0) + { + %> + + + + + + + <% + } + else + { + %> + + + + + + + + + + + + + + + + + + + + +<% + 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(); + + // en los desplazados que están casados llega aquí sin asignar bien este valor + if(pac.getDesplazado() == null) + pac.setDesplazado(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadChipcard()); + + PersistenciaTtactmed per = new PersistenciaTtactmed(); + Vector vSeleccion = null; +// LogTarisan.logger.log(NivelLog.ERROR, "Peta por que al pasar la tarjeta de un desplazado \"casado\" no le asigna bien pac.getDesplazado: "); + if(pac.getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) == 0) + { + vSeleccion= per.obtenerActosPorEspecialidad(intPagina, 50,intContratonew,intColectivonew,dblPolizanew, strCampoNombre, 0); + } + else + { + LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Obtener todos los actos, es desplazado"); + vSeleccion= per.obtenerActosPorEspecialidad(intPagina, 50, strCampoNombre, 0); + } + + if (vSeleccion.size()==0) //No se han encontrado datos + { + %> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + <% + if (ttactmed.getActo()==6000 || ttactmed.getActo()==6001 || ttactmed.getActo()==6002 || ttactmed.getActo()==6003){%> + + <% + }else{ + %> + + <% } + %> + +<% + } + //if (request.getParameter("nombreTextBox")!=null)//Controlar si hay que poner el focus en algun textbox + if (strTextBox!="")//Controlar si hay que poner el focus en algun textbox + { + %> + + <% + strTextBox=""; + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) + } +%> +
     
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    + + + + + + +
    +
    +
    + + + + + + <% //ponemos la especialidad 50 fuego por que es la de los ats %> + + +
    +
    + + + + + + + + +
    <%=pertamensaje.obtenerMensaje(45).getMensaje() %>
    +
    +
    + + + + + + + + + + + + + + + + +
    + +
    + +
    <%=pertamensaje.obtenerMensaje(46).getMensaje() %>:
    + +
    + +
    +
    + + + + + + + +
    <%=pertamensaje.obtenerMensaje(43).getMensaje() %>  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    <%=pertamensaje.obtenerMensaje(41).getMensaje() %>Unidades
    <%=ttactmed.getDescripcion()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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 prescripcion ats (pac/prescripcion_ats.jsp)"); + } +%> diff --git a/jsp/pac/radiologo.jsp b/jsp/pac/radiologo.jsp new file mode 100644 index 0000000..33d6cf8 --- /dev/null +++ b/jsp/pac/radiologo.jsp @@ -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("
    ", " "); + } +} + +%> + + + +Radiólogo + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + + +
    + + + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + +<% + if (!strAutorizacion.equalsIgnoreCase("")) //El usuario ha introducido el numero de autorizacion + { + if (blnPeticionCapturada) //ya existe un analisis + { +%> + + + + + + +<% + } + else if (vSeleccion==null || vSeleccion.size()==0) //No se han encontrado datos + { + +%> + + + + + + +<% + } + else //no existe un analisis previo. Se muestran los datos de la prescripcion. + { + mostrarBotonPDF = 1; + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + +<% + 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); +%> + + + + +<% + } +%> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> + + + + + +<% + } //fin else (vSeleccion.size()!=0) + } +%> +
    + + + <% + if (blnPeticionCapturada) + { + %> + + <% + } + else if ((vSeleccion==null || vSeleccion.size()==0)){ + %> + + <% + } + else + { + %> + + <% + } + %> + +
    +
    + + + + + + + + + +
    Número de autorización:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(8); %><%=tamensaje.getMensaje() %>
     
    <% tamensaje = pertamensaje.obtenerMensaje(9); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    CódigoDescripción
    <%=vtapresca_tarisanttactmed.getActo()%><%=vtapresca_tarisanttactmed.getDescripcionActoMedico()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
     
    + + + + + + + +
    Informe:
    +
    + + + + <% + if (/*intRespuesta == 1*/strRespuesta.compareTo("1")==0){ + %> +
    + <% + 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()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_rx+Integer.valueOf(strAutorizacion).toString()+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".pdf"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+Integer.valueOf(strAutorizacion).toString()+".PDF"); + if(fichero.exists()) + { + %>
    + + + + +
    <% + } + else + { + %>

    PDF inexistente

    <% + } + } + } + } + } + mostrarBotonPDF = 0; + + %> +
    Petición adjudicada correctamente <% + }else if (/*intRespuesta == 2*/strRespuesta.compareTo("2")==0){ + %>No se puede capturar el radiodiagnóstico. El acto no tiene precio<% + } + %> +
    +
    +
    +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/recetas.jsp b/jsp/pac/recetas.jsp new file mode 100644 index 0000000..bf0a271 --- /dev/null +++ b/jsp/pac/recetas.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("
    ", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} +%> + + + +Recetas + + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    + +<% + Tarjeta tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta(); + if(!((Paciente)sesion.getAttribute("PACIENTE")).get_noesiguala_inactivar() && tarjeta.getEntidadChipcard().compareTo(ParametrosConfiguracion.bin_chipcard_propios)==0) + { + %> + + + + + + + <% + } + else + { + %> + + + + + + + + + + + + + + + +<% + PersistenciaTamedica per = new PersistenciaTamedica(); + Vector vSeleccion = per.listado_medicamentos(strCampoNombre, intPagina); + + if (vSeleccion.size()==0) //No se han encontrado datos + { +%> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaElementos.indexOf("¬" + tamedica.getDescripcion() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion %> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) + } +%> +
     
     
     
    <% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %>
    + + + + + + +
    +
    +
    + + + + + + +
    +
    + + + + + + + +
    Prescripción de recetas:
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Posología:
    + +
    Duración del tratamiento:
    + +
    Información al farmacéutico:
    + +
    Instrucciones al paciente:
    + +
    + +
    + + + + + + + +
    Nombre medicamento:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    DescripciónCódigo
    <%=tamedica.getDescripcion()%><%=tamedica.getCodigo()%>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    +
    + + + +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/solicitudAnaliticaNiveles.jsp b/jsp/pac/solicitudAnaliticaNiveles.jsp new file mode 100644 index 0000000..6cf0e2f --- /dev/null +++ b/jsp/pac/solicitudAnaliticaNiveles.jsp @@ -0,0 +1,1497 @@ +<%@ 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" %> +<% + //LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + ": Inicio página de solicitud de analiticas con niveles (pac/solicitudAnaliticaNiveles.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 analiticas con niveles (pac/solicitudAnaliticaNiveles.jsp)"); + + try + { + +// Definicion de variables +int vieneDeGrupo = 0; +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=""; +String strGrupo=""; +String strModifiAut=""; +String strJustificacionInforme=""; +String strJustificacionPres=""; +//String hiddenGrupo = ""; +String strTextBox = ""; +int intScroll = 0; +int intPagina = 0; +int prog = 0; +int paginacion = 0; +int i=0; +int intImpresion = 0; +String strAutorizacion = ""; +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 scroll para saber si hay que hacer scroll o no +if (request.getParameter("scroll")!=null) + intScroll = Integer.parseInt(request.getParameter("scroll")); + +//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")); +} + +//parametro autorizacion que se pasa cuando se ha pulsado en editar peticion +if (request.getParameter("modifiAuto")!=null) + strModifiAut=(String)request.getParameter("modifiAuto"); + +//parametro aut que nos indica la autorizacion que se va a imprimir +if (request.getParameter("aut")!=null) + strAutorizacion=(String)request.getParameter("aut"); + +//parametro justificacion que contiene la justificacion del medico para hacer un nuevo analisis. +//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('\'', '~'); +} +/*if (request.getParameter("grp")!=null) +{ + hiddenGrupo=(String)request.getParameter("grp"); +}*/ + +//parametro nombreTextBox para saber a que caja de texto hay que ponerle el focus y hacerle parpadear cambiando su color +if (request.getParameter("nombreTextBox")!=null) +{ + strTextBox=(String)request.getParameter("nombreTextBox"); +} + +PersistenciaTamedico perTamedico = new PersistenciaTamedico(); +Tamedico tamedico = new Tamedico(); +int maxDeterminaciones = 25; +maxDeterminaciones = perTamedico.obtenerNumeroDeterminaciones(intMedico); + +//parametro grupo que indica que el usuario selecciona los actos medicos de un grupo de analisis +//tenemos que cargar los actos medicos de ese grupo +if ((request.getParameter("seleccionGrupo")!=null)&&(request.getParameter("grupo")!=null)) +{ + + strGrupo=(String)request.getParameter("grupo"); + if ( ((String)request.getParameter("seleccionGrupo")).equalsIgnoreCase("si") && strGrupo!="") + { + Vector vActosGrupo = perTagruana.obtenerActosMedicos(Integer.parseInt(strGrupo),intMedico); + + if (vActosGrupo.size()>0) + { + tagruana=null; + if(strListaElementos.length() == 0) + strListaElementos="¬"+strListaElementos; + + if(strListaCodigoElementos.length() == 0) + strListaCodigoElementos="¬"+strListaCodigoElementos; + // + + int actosPorGrupo = Utilidades.contar_coincidencias(strListaCodigoElementos,"¬"); + + if (((actosPorGrupo-1) + vActosGrupo.size()) > maxDeterminaciones){ + %> + + <% + strGrupo=""; + }else{ + for (i=0;i", " "); + } +} + +String path = request.getContextPath(); +if (request.getContextPath().indexOf("tarisan")==-1){ + path = path + "/tarisan"; +} + +%> + + + +Analítica + + + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +<% + 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 + + Esta visibilidad se asigna a una especialidad o perfil del médico. Es con la que se compara la visibilidad de los actos. + Si la visibilidad es 1, los actos saldrán o no saldrán y lo harán con sus justificaciones, según se indique en las tablas TANIVEL_ACTO Y TANIVEL ESPECIALIDAD + Si la visibilidad es 2, los actos saldrán o no saldrán pero lo harán siempre sin pedir justificación + */ + 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.obtenerAnalisisNiveles(0, intContratonew, intColectivonew, dblPolizanew, "%", tarifa, medico); //Apuntando a desa contra TTACTMED + //vSeleccion_Validos= per.obtenerAnalisisNivelesTTACTMED_NUEVO(0, intContratonew, intColectivonew, dblPolizanew, "%", tarifa, medico); //Apuntando a real contra TTACTMED_NUEVO + vSeleccion_Validos= per.obtenerAnalisisNivelesTTACTMED_GPC(0, intContratonew, intColectivonew, dblPolizanew, "%", tarifa, medico); //Apuntando a real contra TTACTMED y TTACTMED_GPC + if (vieneDeGrupo==1) + vSeleccion_Con_Justificacion= per.obtenerAnalisisNivelesJustificacionTTACTMED_GPC(0, intContratonew, intColectivonew, dblPolizanew, "%", tarifa, medico); + //vSeleccion_Con_Justificacion= per.obtenerAnalisisNivelesJustificacion(0, intContratonew, intColectivonew, dblPolizanew, "%", tarifa, medico); + //vSeleccion_Con_Justificacion= per.obtenerAnalisisNivelesJustificacionTTACTMED_NUEVO(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.obtenerAnalisisNivelesDesplazados(0, "%", medico); + //vSeleccion_Validos= per.obtenerAnalisisNivelesDesplazadosTTACTMED_NUEVO(0, "%", medico); + vSeleccion_Validos= per.obtenerAnalisisNivelesDesplazadosTTACTMED_GPC(0, "%", medico); + if (vieneDeGrupo==1) + vSeleccion_Con_Justificacion= per.obtenerAnalisisNivelesDesplazadosJustificacionTTACTMED_GPC(0, "%", medico); + //vSeleccion_Con_Justificacion= per.obtenerAnalisisNivelesDesplazadosJustificacion(0, "%", medico); + //vSeleccion_Con_Justificacion= per.obtenerAnalisisNivelesDesplazadosJustificacionTTACTMED_NUEVO(0, "%", medico); + + } + + if(vSeleccion_Validos.size()>0 && !boolActosValidosCargados) + { + Ttactmed ttactmed2=null; + for(int j=0;j + + + <% + } + } + if (vieneDeGrupo==1){ + vieneDeGrupo=0; + if(vSeleccion_Con_Justificacion.size()>0) + { + Ttactmed ttactmed2=null; + for(int j=0;j + + + <% + } + } + } + Vector vSeleccion = null; + if(pac.getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) == 0) + { + //vSeleccion= per.obtenerAnalisisNiveles(intPagina, intContratonew, intColectivonew, dblPolizanew, strCampoNombre, tarifa, medico); + //vSeleccion= per.obtenerAnalisisNivelesTTACTMED_NUEVO(intPagina, intContratonew, intColectivonew, dblPolizanew, strCampoNombre, tarifa, medico); + vSeleccion= per.obtenerAnalisisNivelesTTACTMED_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.obtenerAnalisisNivelesDesplazados(intPagina, strCampoNombre, medico); + //vSeleccion= per.obtenerAnalisisNivelesDesplazadosTTACTMED_NUEVO(intPagina, strCampoNombre, medico); + vSeleccion= per.obtenerAnalisisNivelesDesplazadosTTACTMED_GPC(intPagina, strCampoNombre, medico); + } + + if (vSeleccion.size()==0) //No se han encontrado datos + { + %> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + Ttactmed ttactmed = null; + tamensaje = pertamensaje.obtenerMensaje(1); + 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('\'', '~'); +%> + + <% + if (strListaCodigoElementos.indexOf("¬" + ttactmed.getActo() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + +<% + } + if (strTextBox!="")//Controlar si hay que poner el focus en algun textbox + { + %> + + <% + strTextBox=""; + intScroll=1; + } %> + <% + if (intScroll==1){ + %> + + <% + intScroll=0; + } + %> + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion +%> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
    + + + + + + +
    +
    +
    + + + + + <% + String justificacion = ""; + if(strJustificacionPres.compareTo("")!=0){ + justificacion = strJustificacionPres; + }else{ + justificacion = strJustificacionPrescripcion; + }%> + + +
    +
    + + + + + + <% + if (request.getParameter("seleccionGrupo")!=null)//Controlar si viene de grupo o no + { + if ( ((String)request.getParameter("seleccionGrupo")).equalsIgnoreCase("si")) + { + vieneDeGrupo=1; + }else{ + vieneDeGrupo=0; + } + }else{ + vieneDeGrupo=0; + } + + %> + + + + + + + +
    Prescripción de diagnóstico:
    +
    +
    + + + + + + + + + + + + + +
    Grupos de análisis:
    + <% + + Vector vGrupos = perTagruana.obtenerGruposAnalisis(intMedico); + tagruana = null; + %> + +
    Informe:
    + <% + String info = ""; + if(strJustificacionInforme.compareTo("")!=0){ + info = strJustificacionInforme; + }else{ + info = strInforme; + }%> + +
    +
    + + + + + + + +
    Nombre acto médico:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Descripción - Justificación
    )">)"> + + + + + +
    <%=ttactmed.getDescripcion()%> type="text" id="justificacion_<%=ttactmed.getActo() %>" name="justificacion_<%=ttactmed.getActo() %>"/>
    +
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    + +
    +
    +
    + + + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/solicitudAnatomiaNiveles.jsp b/jsp/pac/solicitudAnatomiaNiveles.jsp new file mode 100644 index 0000000..f0daa6b --- /dev/null +++ b/jsp/pac/solicitudAnatomiaNiveles.jsp @@ -0,0 +1,1100 @@ +<%@ 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" %> +<% + //LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + ": Inicio página de solicitud de analiticas con niveles (pac/solicitudAnatomiaNiveles.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 anatomia patológica con niveles (pac/solicitudAnatomiaNiveles.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=""; +String strModifiAut=""; +String strJustificacionInforme=""; +String strJustificacionPres=""; +String strTextBox = ""; +int intScroll = 0; +int intPagina = 0; +int prog = 0; +int paginacion = 0; +int i=0; +int intImpresion = 0; +String strAutorizacion = ""; +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 scroll para saber si hay que hacer scroll o no +if (request.getParameter("scroll")!=null) + intScroll = Integer.parseInt(request.getParameter("scroll")); + +//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")); +} + +//parametro autorizacion que se pasa cuando se ha pulsado en editar peticion +if (request.getParameter("modifiAuto")!=null) + strModifiAut=(String)request.getParameter("modifiAuto"); + +//parametro aut que nos indica la autorizacion que se va a imprimir +if (request.getParameter("aut")!=null) + strAutorizacion=(String)request.getParameter("aut"); + +//parametro justificacion que contiene la justificacion del medico para hacer un nuevo analisis. +//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('\'', '~'); +} + +//parametro nombreTextBox para saber a que caja de texto hay que ponerle el focus y hacerle parpadear cambiando su color +if (request.getParameter("nombreTextBox")!=null) +{ + strTextBox=(String)request.getParameter("nombreTextBox"); +} + +PersistenciaTamedico perTamedico = new PersistenciaTamedico(); +Tamedico tamedico = new Tamedico(); +int maxDeterminaciones = 25; +maxDeterminaciones = perTamedico.obtenerNumeroDeterminaciones(intMedico); + +//Cargamos los actos de la petición que se ha decidido modificar +if (strModifiAut.compareTo("")!=0 ){ + if ((request.getParameter("progress")!=null)&&(request.getParameter("progress").compareTo("")!=0)) { + prog=Integer.parseInt(request.getParameter("progress")); + } + if (prog==0){ + if ((request.getParameter("paginacion")!=null)&&(request.getParameter("paginacion").compareTo("")!=0)) { + paginacion=Integer.parseInt(request.getParameter("paginacion")); + } + if (paginacion==0){ + PersistenciaTtactmed perTtactmed = new PersistenciaTtactmed(); + Vector vAnaliticas = perTtactmed.actosPorPeticion(Long.parseLong(strModifiAut)); + strListaElementos = "¬"; + strListaCodigoElementos = "¬"; + for (i=0;i", " "); + } +} +%> + + + +Anatomía Patoloógica + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +<% + 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 + + Esta visibilidad se asigna a una especialidad o perfil del médico. Es con la que se compara la visibilidad de los actos. + Si la visibilidad es 1, los actos saldrán o no saldrán y lo harán con sus justificaciones, según se indique en las tablas TANIVEL_ACTO Y TANIVEL ESPECIALIDAD + Si la visibilidad es 2, los actos saldrán o no saldrán pero lo harán siempre sin pedir justificación + */ + if(perfil_med == 0) + visibilidad = 4; + 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()); + + vSeleccion_Validos= per.obtenerAnatomiaNiveles(0,"%",medico); //Apuntando a real contra NOVAGPC + + if(vSeleccion_Validos.size()>0 && !boolActosValidosCargados) + { + Ttactmed ttactmed2=null; + for(int j=0;j + + + <% + } + } + + Vector vSeleccion = null; + vSeleccion= per.obtenerAnatomiaNiveles(intPagina, strCampoNombre, medico); + + if (vSeleccion.size()==0) //No se han encontrado datos + { + %> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + Ttactmed ttactmed = null; + tamensaje = pertamensaje.obtenerMensaje(1); + 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('\'', '~'); +%> + + <% + if (strListaCodigoElementos.indexOf("¬" + ttactmed.getActo() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + +<% + } + if (strTextBox!="")//Controlar si hay que poner el focus en algun textbox + { + %> + + <% + strTextBox=""; + intScroll=1; + } %> + <% + if (intScroll==1){ + %> + + <% + intScroll=0; + } + %> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion +%> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
    + + + + + + +
    +
    +
    + + + + + <% + String justificacion = ""; + if(strJustificacionPres.compareTo("")!=0){ + justificacion = strJustificacionPres; + }else{ + justificacion = strJustificacionPrescripcion; + }%> + + + +
    +
    + + + + + + + + + + + + +
    Prescripción de anatomía patológica:
    +
    +
    + + + + + + + +
    Informe:
    + <% + String info = ""; + if(strJustificacionInforme.compareTo("")!=0){ + info = strJustificacionInforme; + }else{ + info = strInforme; + }%> + +
    +
    + + + + + + + +
    Nombre acto médico:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Descripción - Justificación
    )">)"> + + + + + +
    <%=ttactmed.getDescripcion()%> type="text" id="justificacion_<%=ttactmed.getActo() %>" name="justificacion_<%=ttactmed.getActo() %>"/>
    +
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    + +
    +
    +
    + + + +<% + } + 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 anatomia patológica con niveles(pac/solicitudAnatomiaNiveles.jsp)"); + } +%> diff --git a/jsp/pac/solicitudDiagnosticoNiveles.jsp b/jsp/pac/solicitudDiagnosticoNiveles.jsp new file mode 100644 index 0000000..25877e5 --- /dev/null +++ b/jsp/pac/solicitudDiagnosticoNiveles.jsp @@ -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("
    ", " "); + } +} +%> + + + +Analítica + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + +<% + 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 + + + <% + } + } + 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 + { + %> + + + + + + +<% + } + else + { + if (intPagina != 0){ //se tiene en cuenta la paginacion +%> + + + +<% + } +%> + + + + + + + +<% + 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('\'', '~'); +%> + + <% + if (strListaCodigoElementos.indexOf("¬" + ttactmed.getActo() + "¬")!=-1) + { + %> + + <% + } + else + { + %> + + <% + } + %> + + +<% + } +%> + + +<% if (intPagina!=0){ //se tiene en cuenta la paginacion +%> + + + + +<% + } //fin if(pagina!=0) +%> +<% + } //fin else (vSeleccion.size()!=0) +%> +
    + + + + + + +
    +
    +
    + + + + + +
    +
    + + + + + + + +
    Prescripción de diagnóstico:
    +
    +
    + + + + + + + +
    Informe:
    + +
    +
    + + + + + + + +
    Nombre acto médico:  <%=pertamensaje.obtenerMensaje(24).getMensaje() %>
    +
     
    <% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %>
    Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%>
    Descripción - Justificación
    )">)">
    <%=ttactmed.getDescripcion()%> type="text" id="justificacion_<%=ttactmed.getActo() %>" name="justificacion_<%=ttactmed.getActo() %>" value=""/>
    + + + <%if (per.getPaginacion().esPrimeraPagina()){%> + + + + <%}else{%> + + + + <%}%> + + <%if (per.getPaginacion().esUltimaPagina()){%> + + + + <%}else{%> + + + + <%}%> + +
    primeroanteriorprimeroanteriorsiguienteúltimosiguienteúltimo
    +
    +
    +
    +
    + + + +<% + } + 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)"); + } +%> diff --git a/jsp/pac/troquelado.jsp b/jsp/pac/troquelado.jsp new file mode 100644 index 0000000..457df95 --- /dev/null +++ b/jsp/pac/troquelado.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("
    ", " "); + } +} +%> + + + +Módulo de Gestión de Pacientes + + + + + + + + + + + + + + + + +
    + + + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    +
    +
    + + + + + + + +
    + + <% + if (aviso!=null){ + %> + + + + + + + <% + } + if (mensaje!=null){ + %> + + + + + + + <% + } + %> + + + + + + + + + + + < + + + + + + + + + +
     
     
    Introduzca los números de la tarjeta: Validar    Borrar
     
     
             Volver
    +
    +
    +
    +
    + + + +<%} + + 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)"); + +%> diff --git a/jsp/pac/volante_medico.jsp b/jsp/pac/volante_medico.jsp new file mode 100644 index 0000000..b02784e --- /dev/null +++ b/jsp/pac/volante_medico.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ágina 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ó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 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ó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 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("
    ", " "); + } +} +%> + + + +Solicitud Volante Ingreso + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    +
    +
    +
    +

    <%=strNoticia %>

    +
    +
    +
    +
    + + + +
    + +
    + + + + + + + +
    <%= sesion.getAttribute("PACIENTE") %>
    +
    + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +
    + + + + + + +
    +
    + <% + 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(); + %> + + + + + + + + + + + + + + +
    "/> +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + +<% + } + 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 volantes de ingreso (pac/volante_medico.jsp)"); + } +%> diff --git a/jsp/plantilla_limpia.jsp b/jsp/plantilla_limpia.jsp new file mode 100644 index 0000000..d9b15e8 --- /dev/null +++ b/jsp/plantilla_limpia.jsp @@ -0,0 +1,160 @@ +<%@ 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 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 + { + 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")); +%> + + + +Gestión Perfiles + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    <%= sesion.getAttribute("USUARIO") %>
    + +
    + + + + + + +
    + +
    + + + + + + + + + +
    + + + + + + + + + +
    +
    + + + + + + + +
    +
    + + <% + + %> +
    + + +
    +
    + + + + +<% + } + catch(Exception ex) + { + LogTarisan.logger.log(NivelLog.ERROR, "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, "Final página de gestion de perfiles (med/gestor_perfiles.jsp)"); +%> diff --git a/jsp/propiedades_sistema.jsp b/jsp/propiedades_sistema.jsp new file mode 100644 index 0000000..4f85b7c --- /dev/null +++ b/jsp/propiedades_sistema.jsp @@ -0,0 +1,81 @@ +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Arrays" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.util.Date" %> +<%@ page import="java.util.Enumeration" %> +<%@ page import="java.util.Properties" %> +<%@ page import="java.util.StringTokenizer" %> +<%@ page import="java.util.Vector" %> + + + + + +Propiedades del sistema + + + + + +

    Propiedades del sistema

    + +<% + SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss"); + Calendar calendario = Calendar.getInstance(); + + out.print("
    "); + out.print("Fecha = " + sdf.format(calendario.getTime())); + out.print("
    "); + + Properties propiedades = System.getProperties(); + String nombrePropiedad; + String valorPropiedad; + String arrayPropiedades[] = new String[propiedades.size()]; + String arrayValores[]; + StringTokenizer stValores; + int i = 0; + int k; + + out.println("Propiedades del sistema: "); + + out.println("
      "); + for(Enumeration enu = propiedades.propertyNames(); enu.hasMoreElements();) + { + nombrePropiedad = (String)enu.nextElement(); + valorPropiedad = propiedades.getProperty(nombrePropiedad); + + if((nombrePropiedad.indexOf("path") >= 0) && (valorPropiedad.indexOf(System.getProperty("path.separator")) >= 0) && (valorPropiedad.length() > 1)) + { + k = 0; + stValores = new StringTokenizer(valorPropiedad, System.getProperty("path.separator")); + arrayValores = new String[stValores.countTokens()]; + while(stValores.hasMoreTokens()) + { + arrayValores[k++] = stValores.nextToken(); + } + + valorPropiedad = "
        "; + for(k = 0; k < arrayValores.length; k++) + { + valorPropiedad += "
      • " + arrayValores[k]; + } + valorPropiedad += "
      "; + } + arrayPropiedades[i++] = "
    • " + nombrePropiedad + ": " + valorPropiedad; + } + + Arrays.sort(arrayPropiedades); + + for(i = 0; i < arrayPropiedades.length; i++) + { + out.println(arrayPropiedades[i]); + } + + out.println("
    "); + out.println("
    "); +%> + + + + + \ No newline at end of file diff --git a/jsp/propiedades_tarisan.jsp b/jsp/propiedades_tarisan.jsp new file mode 100644 index 0000000..3252b49 --- /dev/null +++ b/jsp/propiedades_tarisan.jsp @@ -0,0 +1,62 @@ +<%@ page import="com.tarisan.control.ParametrosConfiguracion" %> +<%@ page import="com.tarisan.util.Utilidades" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Arrays" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.util.Date" %> +<%@ page import="java.util.Enumeration" %> +<%@ page import="java.util.Properties" %> +<%@ page import="java.util.ResourceBundle" %> +<%@ page import="java.util.StringTokenizer" %> +<%@ page import="java.util.Vector" %> + + + + + +Fichero de Propiedades de la aplicación Tarisan + + + + + +

    Fichero de Propiedades de la aplicación Tarisan

    + +<% + SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss"); + Calendar calendario = Calendar.getInstance(); + + out.print("
    "); + out.print(sdf.format(calendario.getTime())); + out.print("
    "); + + + Properties propiedades = Utilidades.resourceToProperties(ResourceBundle.getBundle(ParametrosConfiguracion.getNombrePropiedades())); + String nombrePropiedad; + String valorPropiedad; + String arrayPropiedades[] = new String[propiedades.size()]; + int i = 0; + + out.println("Propiedades de la aplicación Tarisan: " + ParametrosConfiguracion.getNombrePropiedades() + ".properties"); + out.println("
      "); + for(Enumeration enu = propiedades.propertyNames(); enu.hasMoreElements();) + { + nombrePropiedad = (String)enu.nextElement(); + valorPropiedad = propiedades.getProperty(nombrePropiedad); + arrayPropiedades[i++] = "
    • " + nombrePropiedad + ": " + valorPropiedad; + } + Arrays.sort(arrayPropiedades); + + for(i = 0; i < arrayPropiedades.length; i++) + { + out.println(arrayPropiedades[i]); + } + + out.println("
    "); + out.println("
    "); + +%> + + + + \ No newline at end of file diff --git a/jsp/resultado_analitica.jsp b/jsp/resultado_analitica.jsp new file mode 100644 index 0000000..3c7dc64 --- /dev/null +++ b/jsp/resultado_analitica.jsp @@ -0,0 +1,197 @@ +<%@ page import="java.net.*" %> +<%@ page import="java.io.*" %> +<%@ page import="org.xml.sax.*" %> +<%@ page import="org.w3c.dom.*" %> +<%@ page import="java.lang.*" %> +<%@ page import="java.security.MessageDigest" %> +<%@ page import="java.security.NoSuchAlgorithmException" %> +<%@ page import="javax.xml.parsers.*" %> +<%@ page import="com.tarisan.control.*" %> +<%@ page import="com.tarisan.data.*" %> +<%@ page import="com.tarisan.excepcion.*" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="java.util.Vector" %> +<%@ 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 resultados analitica (resultado_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 + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de resultados analitica (resultado_analitica.jsp)"); + + +%> +<%! +static StringBuffer hexValue(byte[] buffer) { + StringBuffer sbRet=new StringBuffer(buffer.length*2); + for (int i=0; i=0)&&(buffer[i]<=15)) sbRet.append("0"+Integer.toHexString(buffer[i]&0xff)); + else sbRet.append(Integer.toHexString(buffer[i]&0xff)); + } + return sbRet; +} + +static String Encrypt(String pPlainPassword) +{ + StringBuffer hexHashedPassword; + + try + { + if (pPlainPassword==null) hexHashedPassword=null; + else + { + MessageDigest hash = MessageDigest.getInstance("MD5"); + hash.update(pPlainPassword.getBytes()); + hexHashedPassword = hexValue(hash.digest()); + } + } catch (NoSuchAlgorithmException ex) { + hexHashedPassword=null; + } + return hexHashedPassword.toString() ; +} + +static String crypt_txt(String en, String clau, String func) +{ + + String m = ""; + char c = 'a'; + if (en==null) return null; + if (en.length()==0) return ""; + if (clau.compareTo("NOENCRPT") == 0) return en; + if (clau.compareTo("") == 0) clau = "iN3a1Abh"; + + if (func.compareTo("XE") == 0) + { + // Encriptar... + StringBuffer sbRet=new StringBuffer(en.length()*2); + int j=(-1); + char xor_val; + + for (int i=0; i= clau.length()) j = 0; + xor_val = (char) ((int)en.charAt(i) ^ (int)clau.charAt(j)); + // note: & 0xff is used to reset high bits + if ((xor_val>=0)&&(xor_val<=15)) sbRet.append("0"+Integer.toHexString(xor_val&0xff)); + else sbRet.append(Integer.toHexString(xor_val&0xff)); + } + m = sbRet.toString(); + } + + if (func.compareTo("XD") == 0) + { + // Desencriptar... + StringBuffer stringd=new StringBuffer(en.length()/2); + int j=(-1); + + for (int i=0;i= clau.length()) j = 0; + if (en.substring(i*2,(i*2)+2).compareTo("ZZ") == 0) j = (-1); + else{ + c=(char)(Integer.parseInt(en.substring(i*2,(i*2)+2),16)^(int)clau.charAt(j)); + stringd.append(c); + } + } + m = stringd.toString(); + } + return m; +} + +%> +<% +/* PARAMETROS NECESARIOS PARA LA COMUNICACIÓN CON EL PROGRAMA INTRALAB INSTALADO EN LA 192.168.2.166 DE IZASA */ + int campobusqueda=0; + String FiltroIntralab=""; + String IntralabMaxReport="10"; + String IntralabReportFormat="1"; + String AccesLevel="8"; + String TecnicalValidation="N"; + + String mydate=""; + String mynumber=request.getParameter("peticion"); + String mytipo="individual"; + String isAcumulado="NO"; + + Socket miCliente; + DataInputStream entrada; + DataOutputStream salida; + String recibido,liniarecibida,liniasalida,aux; + Document document; + recibido=new String(""); + + try + { + /**** PETICIÓN POR EL NÚMERO PARA OBTENER LA FECHA DE REALIZACIÓN DE IZASA *******************************************/ + /**** ABRIMOS DE NUEVO UN SOCKET PARA COMUNICACIÓN IZASA ***************************************************/ + miCliente = new Socket ("192.168.2.166", 8080); + entrada = new DataInputStream(miCliente.getInputStream() ); + salida = new DataOutputStream(miCliente.getOutputStream() ); + liniasalida=""; + salida.writeBytes(crypt_txt(liniasalida,"","XE")); + while (null != ((liniarecibida = crypt_txt(entrada.readLine(),"","XD")))) + { + recibido = recibido +liniarecibida+"\n"; + } + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = factory.newDocumentBuilder(); + document=builder.parse(new ByteArrayInputStream(recibido.getBytes())); + NodeList nl=document.getElementsByTagName("PATIENT"); + if (nl.getLength()>0) + { + mydate = (String)nl.item(0).getAttributes().getNamedItem("DATE").getNodeValue(); + } + entrada.close(); + salida.close(); + /**** FIN PETICIÓN POR EL NÚMERO PARA OBTENER LA FECHA DE REALIZACIÓN DE IZASA *******************************************/ + + /**** ABRIMOS DE NUEVO UN SOCKET PARA COMUNICACIÓN IZASA ***************************************************/ + /**** INICIO PETICIÓN DEFINITIVA ****/ + miCliente = new Socket ("192.168.2.166", 8080); + entrada = new DataInputStream(miCliente.getInputStream() ); + salida = new DataOutputStream(miCliente.getOutputStream() ); + liniasalida=""; + salida.writeBytes(crypt_txt(liniasalida,"","XE")); + while (null != ((liniarecibida = crypt_txt(entrada.readLine(),"","XD")))) + { + recibido = recibido +liniarecibida+"\n"; + } + entrada.close(); + salida.close(); + if (recibido.compareTo("\n")==0) + { + response.sendRedirect("lab_informe_vacio.jsp"); + return; + } + aux = recibido.replaceAll("á", "á"); + aux = aux.replaceAll("é", "é"); + aux = aux.replaceAll("í", "í"); + aux = aux.replaceAll("ó", "ó"); + aux = aux.replaceAll("ú", "ú"); + aux = aux.replaceAll("º", "º"); + out.println(aux); + } + catch( IOException e ) + { + response.sendRedirect("pac/gestor.jsp"); + return; + } + } + LogTarisan.logger.log(NivelLog.INFO, "Fin página de resultados analitica (resultado_analitica.jsp)"); +%> \ No newline at end of file diff --git a/jsp/test_itext.jsp b/jsp/test_itext.jsp new file mode 100644 index 0000000..0144b1f --- /dev/null +++ b/jsp/test_itext.jsp @@ -0,0 +1,108 @@ +<%@ page import="java.io.*" %> +<%@ page import="java.lang.*" %> +<%@ page import="com.itextpdf.text.Document" %> +<%@ page import="com.itextpdf.text.DocumentException" %> +<%@ page import="com.itextpdf.text.Paragraph" %> +<%@ page import="com.itextpdf.text.Phrase" %> +<%@ page import="com.itextpdf.text.pdf.*" %> +<%@ page import="com.itextpdf.text.Font" %> +<%@ page import="com.itextpdf.text.Chunk" %> +<%@ page import="com.itextpdf.text.PageSize" %> +<%@ page import="com.itextpdf.text.Image" %> +<%@ page import="com.itextpdf.text.pdf.PdfPTable" %> +<%@ page import="com.itextpdf.text.FontFactory" %> +<%@ page import="com.itextpdf.text.BaseColor" %> + + + + Control de PDF LIQUIDACION + + + + + +<% +out.println("Generacion de PDF"); +/*Primero definimos todas las cadenas del encabezado del documento y los demas datos autilizar*/ +String encabezado="Factura Para: 275"+"\n"+"Igualatorio Médico Quirurgico y de Especialidades de Navarra"+"\n"+"PAULINO CABALLERO 51"+"\n"+"31004 PAMPLONA"+"\n"+"CIF: A31005432"+"\n"+"\n"; + +/*colocaremos tambien la fecha de creacion*/ +java.util.Date date = new java.util.Date(); + +/*Fuente utilizada para formatear el encabezado en este caso sera arial 12 en negrita*/ +Font fuente= new Font(Font.getFamily("ARIAL"), 12, Font.BOLD); + +/*Definimos un texto que se incluira antes de la tabla*/ +String choro="Honorarios Enero 2012\n"+ "Fecha Factura: "+"\n"+ "Factura Numero: N.I.F: 11111111H "+"\n"+"\n"+"\n"+"\n"; + +/*Tambien haremos una tabla a partir de un par de arreglos en otro caso podria haber sido un resultset de una base de datos*/ +String[] columna1={ "1","2","990020","990021"}; +String[] columna2={ "CONSULTA","REVISION","INGRESO POR PROCESO MEDICO","INTERCONSULTA INGRESADOS"}; + +/*Ahora almacenaremos la imagen que ira en la parte superior y la alineamos a laizquierda*/ + +Image imagen=Image.getInstance(("/root/apache-tomcat-6.0.20/webapps/tarisan/liquidaciones/logo_imq.jpg")); +imagen.setAlignment(Image.LEFT | Image.TEXTWRAP); + + +/*Ahora que ya tenemos el contenido del documento empezaremos a estructurarlo*/ +try{ + System.out.println("1"); + +/*Primero pasaremos nuestras cadenas a elementos de iText*//*definimos una frase que sera el string encabezado y le aplicamos la fuente*/ +Paragraph linea = new Paragraph(encabezado,fuente); + +/*Definimos un parrafo*/ +Phrase para=new Phrase(choro); + +/*Pasamos la fecha a un String y la agregamos a un parrafo*/ +Paragraph fecha=new Paragraph(String.valueOf(date)+"\n"+"\n"); + +/*Ahora definimos la tabla donde el arguemento recibido indica el numero de columnas y la propiedad setWidthPercentage permite indicarle que ocupe todo el ancho de lapagina*/ +PdfPTable tabla=new PdfPTable(2);tabla.setWidthPercentage(100); + +/*Ahora que ya tenemos todos los elemtnos es hora de agregarlos al documento, para ello primeramente definimos un docuemnto e indicando el tamaño*/ +Document documento = new Document(PageSize.LETTER); + + +/*Definimos el nombre del archivo de salida con extension .PDF*/ +String file="/root/apache-tomcat-6.0.20/webapps/tarisan/peticiones/LIQUIDA.pdf"; + +/*a traves del siguiente metodo (getInstance)y un flujo de salida del paquete .ioasociamos el documento de iText con el archivo de java*/ +PdfWriter.getInstance(documento, new FileOutputStream(file)); + +/*Definimos las celdas que seran los encabezados de la tabla*/ +PdfPCell celda1 =new PdfPCell (new Paragraph("Columna1-ID",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED))); +PdfPCell celda2 =new PdfPCell (new Paragraph("Columna2-Valor",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED))); + +/*Abrimos el documento y agregamos los elementos en el orden que deben aparecer*/ +documento.open(); +documento.add(imagen); +documento.add(linea); +documento.add(para); +documento.add(fecha); +tabla.addCell(celda1); +tabla.addCell(celda2); + +/*Ahora a traves de un for insertaremos el contenido del arreglo en la tabla*/ +for(int i=0;i + + + diff --git a/jsp/test_log.jsp b/jsp/test_log.jsp new file mode 100644 index 0000000..df28358 --- /dev/null +++ b/jsp/test_log.jsp @@ -0,0 +1,51 @@ +<%@ page import="com.tarisan.control.ParametrosConfiguracion" %> +<%@ page import="com.tarisan.log.*" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Enumeration" %> +<%@ page import="java.util.Date" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.util.Vector" %> + + + + + +<% + SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss"); + Calendar calendario = Calendar.getInstance(); + + + out.print("
    "); + out.print("Fecha = " + sdf.format(calendario.getTime())); + out.print("
    "); + + out.println("
    "); + out.println("PARÁMETROS DE LOGS DE LA APLICACIÓN
    "); + + out.println("
      " ); + + out.print("
    • Nivel de LOG: "); + out.print(LogTarisan.getNivel()); + out.println("
    • "); + + out.print("
    • Path del fichero: "); + out.print(LogTarisan.getPathFichero()); + out.println("
    • "); + + out.print("
    • Nombre del fichero: "); + out.print(LogTarisan.getNombreFichero()); + out.println("
    • "); + + out.print("
    • Número de ficheros: "); + out.print(LogTarisan.getNumeroFicheros()); + out.println("
    • "); + + out.print("
    • Tamaño del fichero: "); + out.print(LogTarisan.getTamanoFichero()); + out.println("
    • "); + + out.println("
    " ); + +%> + + \ No newline at end of file diff --git a/jsp/test_persistencia.jsp b/jsp/test_persistencia.jsp new file mode 100644 index 0000000..0ff0635 --- /dev/null +++ b/jsp/test_persistencia.jsp @@ -0,0 +1,172 @@ +<%@ page import="com.tarisan.control.ParametrosConfiguracion" %> +<%@ page import="com.tarisan.excepcion.ExcepcionTarisan" %> +<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %> +<%@ page import="java.sql.*" %> +<%@ page import="java.text.SimpleDateFormat" %> +<%@ page import="java.util.Enumeration" %> +<%@ page import="java.util.Date" %> +<%@ page import="java.util.Calendar" %> +<%@ page import="java.util.Vector" %> + + + + + +<% + SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss"); + Calendar calendario = Calendar.getInstance(); + Connection conexion = null; + String sqlSelect = "SELECT MEDICO, NOMBRE, APELLIDOS FROM TAMEDICO"; + + out.println("
    "); + out.println("Fecha = " + sdf.format(calendario.getTime())); + out.println("
    "); + + out.println("
    "); + out.println("PARÁMETROS DE LA BASE DE DATOS
    "); + + out.println("
      " ); + + out.print("
    • Data Store de base de datos: "); + out.print(ParametrosConfiguracion.dataStore); + out.println("
    • "); + + out.print("
    • Usuario: "); + out.print(PersistenciaParametros.usuario); + out.println("
    • "); + + out.print("
    • Password: "); + out.print(PersistenciaParametros.password); + out.println("
    • "); + + out.print("
    • Maquina: "); + out.print(PersistenciaParametros.maquina); + out.println("
    • "); + + out.print("
    • Puerto: "); + out.print(PersistenciaParametros.puerto); + out.println("
    • "); + + out.print("
    • Instancia: "); + out.print(PersistenciaParametros.instancia); + out.println("
    • "); + + out.print("
    • Nombre del Data Source: "); + out.print(PersistenciaParametros.dataSource); + out.println("
    • "); + + out.println("
    " ); + + out.println("
    " ); + out.println("PROPIEDADES DE LA BASE DE DATOS
    "); + + try + { + out.println("
      " ); + + conexion = ParametrosConfiguracion.dataStore.obtenerConexion(); + DatabaseMetaData bd = conexion.getMetaData(); + + out.print("
    • Nombre BD: "); + out.print(bd.getDatabaseProductName()); + out.println("
    • "); + + out.print("
    • Versión BD: "); + out.print(bd.getDatabaseProductVersion()); + out.println("
    • "); + + out.print("
    • Usuario: "); + out.print(bd.getUserName()); + out.println("
    • "); + + out.print("
    • Cadena de conexión: "); + out.print(bd.getURL()); + out.println("
    • "); + + out.print("
    • Nombre del driver: "); + out.print(bd.getDriverName()); + out.println("
    • "); + + out.print("
    • Versión del driver: "); + out.print(bd.getDriverVersion()); + out.println("
    • "); + + out.println("
    " ); + + + out.println("
    " ); + out.println("PRUEBA DE SELECCIÓN EN LA BASE DE DATOS
    "); + + out.println("
      " ); + + out.print("
    • Conexión: "); + out.print(conexion); + out.println("
    • "); + + if(conexion != null) + { + out.print("
    • Sentencia SQL: "); + out.print(sqlSelect); + out.println("
    • "); + + PreparedStatement ps = conexion.prepareStatement(sqlSelect); + out.print("
    • PreparedStatement: "); + out.print(ps); + out.println("
    • "); + + ResultSet rs = ps.executeQuery(); + out.print("
    • ResultSet: "); + out.print(rs); + out.println("
    • "); + out.println("
        "); + while(rs.next()) + { + out.print("
      • "); + out.print(rs.getLong(1)); + out.print(": "); + out.print(rs.getString(2)); + out.print(" "); + out.print(rs.getString(3)); + out.println("
      • "); + } + out.println("
      "); + rs.close(); + out.println("
    • ResultSet cerrado: "); + out.println(rs); + out.println("
    • "); + + ParametrosConfiguracion.dataStore.liberarConexion(conexion); + out.print("
    • Conexión liberada: "); + out.print(conexion); + out.println("
    • "); + } + } + catch(ExcepcionTarisan sqle) + { + out.print("
    • ExcepcionTarisan: "); + out.print(sqle); + out.println("
    • "); + } + catch(SQLException sqle) + { + out.print("
    • SQLException: "); + out.print(sqle); + out.println("
    • "); + } + catch(Exception sqle) + { + out.print("
    • Exception: "); + out.print(sqle); + out.println("
    • "); + } + catch(Throwable sqle) + { + out.print("
    • Throwable: "); + out.print(sqle); + out.println("
    • "); + } + + out.println("
    " ); +%> + + \ No newline at end of file diff --git a/jsp/ventana_intralab.jsp b/jsp/ventana_intralab.jsp new file mode 100644 index 0000000..793daa0 --- /dev/null +++ b/jsp/ventana_intralab.jsp @@ -0,0 +1,46 @@ +<%@ 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" %> + + + +Análisis + + + + + + + + + + + + + + + +
    + +
    +Analisis + Analisisssssssss + + + diff --git a/jsp/ver_pdf.jsp b/jsp/ver_pdf.jsp new file mode 100644 index 0000000..bb25a32 --- /dev/null +++ b/jsp/ver_pdf.jsp @@ -0,0 +1,58 @@ +<%@ 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 visionado de pdfs (pac/ver_pdf.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 ver pdf"); + response.sendRedirect("../html/login.html"); + } + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de visionado de pdfs (pac/ver_pdf.jsp)"); + + //../../resultados/<%=fichero.getName() +// if (request.getParameter("x")!=null) +// strParametroMenu=(String)request.getParameter("x"); + String fichero = ""; + if(request.getParameter("fichero")!=null) + { + fichero = (String)request.getParameter("fichero"); + } + else + { + //LogTarisan.logger.log(NivelLog.DEBUG, "getparameter.fichero es null"+sesion.getAttribute("fichero")); + if(sesion.getAttribute("fichero")!=null) + { + //LogTarisan.logger.log(NivelLog.DEBUG, "getattribute.fichero es: "+sesion.getAttribute("fichero")); + fichero=(String)sesion.getAttribute("fichero"); + } + } + + LogTarisan.logger.log(NivelLog.DEBUG, "Se va a mostrar el fichero: "+request.getContextPath()+"/resultados/"+fichero); + %> + + + Your browser does not support embedded PDF files. + + +<% +LogTarisan.logger.log(NivelLog.INFO, "Final página de visionado de pdfs (pac/ver_pdf.jsp)"); +} +%> \ No newline at end of file diff --git a/jsp/ver_peticiones_pdf.jsp b/jsp/ver_peticiones_pdf.jsp new file mode 100644 index 0000000..e60b7f1 --- /dev/null +++ b/jsp/ver_peticiones_pdf.jsp @@ -0,0 +1,58 @@ +<%@ 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 visionado de pdfs (pac/ver_peticiones_pdf.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 ver pdf"); + response.sendRedirect("../html/login.html"); + } + else + { + LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de visionado de pdfs (pac/ver_peticiones_pdf.jsp)"); + + //../../resultados/<%=fichero.getName() +// if (request.getParameter("x")!=null) +// strParametroMenu=(String)request.getParameter("x"); + String fichero = ""; + if(request.getParameter("fichero")!=null) + { + fichero = (String)request.getParameter("fichero"); + } + else + { + //LogTarisan.logger.log(NivelLog.DEBUG, "getparameter.fichero es null"+sesion.getAttribute("fichero")); + if(sesion.getAttribute("fichero")!=null) + { + //LogTarisan.logger.log(NivelLog.DEBUG, "getattribute.fichero es: "+sesion.getAttribute("fichero")); + fichero=(String)sesion.getAttribute("fichero"); + } + } + + LogTarisan.logger.log(NivelLog.DEBUG, "Se va a mostrar el fichero: "+request.getContextPath()+"/peticiones/"+fichero); + %> + + + Your browser does not support embedded PDF files. + + +<% +LogTarisan.logger.log(NivelLog.INFO, "Final página de visionado de pdfs (pac/ver_peticiones_pdf.jsp)"); +} +%> \ No newline at end of file