añado jsp
This commit is contained in:
@@ -0,0 +1,916 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
<%
|
||||
//LogTarisan.logger.log(NivelLog.INFO, "Inicio página de facturacion (pac/facturacion.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion == null)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión no iniciada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect(request.getContextPath() + "/html/login.html");
|
||||
}
|
||||
else if(sesion.getAttribute("PACIENTE") == null)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Paciente borrado ¿Ha pulsado 'history back'?");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/pac/gestor.jsp");
|
||||
}
|
||||
//else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado().compareTo(ParametrosConfiguracion.bin_chipcard_propios) != 0 )
|
||||
else if ( ((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado() != (ParametrosConfiguracion.bin_chipcard_propios))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Es desplazado, lo mandamos a chipcard");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/pac/facturacion_chipcard.jsp?x=0&pagina=1");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio página de facturacion (pac/facturacion.jsp)");
|
||||
|
||||
try
|
||||
{
|
||||
// Definicion de variables
|
||||
String mensaje = null;
|
||||
mensaje = (String)sesion.getAttribute("ERROR");
|
||||
String strMensajeSinElementos="";
|
||||
if(mensaje == null || (mensaje.trim().compareTo("") == 0))
|
||||
{
|
||||
strMensajeSinElementos="No ha seleccionado ningún acto médico.";
|
||||
}
|
||||
else
|
||||
{
|
||||
strMensajeSinElementos=mensaje;
|
||||
}
|
||||
String strParametroMenu="";
|
||||
String strCampoNombre="";
|
||||
String strListaElementos="";
|
||||
String strListaCodigoElementos="";
|
||||
int intImpresion = 0;
|
||||
int intPagina = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[]=null;
|
||||
|
||||
String strEsPrimeraVisita = "";
|
||||
String strConRevisionHoy = "";
|
||||
String strListaElementosPrescripcion = "";
|
||||
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
StringBuffer perfilIguala = new StringBuffer();
|
||||
perfilIguala.append(sesion.getAttribute("PERFIL"));
|
||||
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro descripcion para las busquedas
|
||||
if (request.getParameter("nombre")!=null)
|
||||
strCampoNombre = (String)request.getParameter("nombre");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaElementos")!=null)
|
||||
strListaElementos=(String)request.getParameter("listaElementos");
|
||||
|
||||
//parametro listaPrescripciones para mostrar las prescripciones seleccionadas
|
||||
if (request.getParameter("listaCodigoElementos")!=null)
|
||||
strListaCodigoElementos=(String)request.getParameter("listaCodigoElementos");
|
||||
|
||||
//parametro listaElementosPrescripciones utilizado para realizar la impresion
|
||||
if (request.getParameter("listaElementosPrescripcion")!=null)
|
||||
strListaElementosPrescripcion=(String)request.getParameter("listaElementosPrescripcion");
|
||||
|
||||
//parametro impresion que nos indica que se ha de realizar una impresion
|
||||
if (request.getParameter("imp")!=null) {
|
||||
intImpresion=Integer.parseInt(request.getParameter("imp"));
|
||||
}
|
||||
|
||||
//atributo ENC que obtiene la peticion encriptada
|
||||
String factE = "";
|
||||
if (sesion.getAttribute("ENC")!=null) {
|
||||
factE = (String)sesion.getAttribute("ENC");
|
||||
sesion.removeAttribute("ENC");
|
||||
}
|
||||
|
||||
|
||||
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
|
||||
long intColectivo = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||
int intBeneficiario = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario();
|
||||
double dblPoliza = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||
String tarjeta = String.valueOf(((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjeta());
|
||||
if(((Paciente)sesion.getAttribute("PACIENTE")).getDesplazado() != ParametrosConfiguracion.bin_chipcard_propios)
|
||||
tarjeta = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado();
|
||||
PersistenciaTapolfac perTapolfac = new PersistenciaTapolfac();
|
||||
Integer blnEsPolizaIgualaMedico = perTapolfac.esPolizaIgualaMedico(intMedico, intColectivo, dblPoliza);
|
||||
|
||||
|
||||
|
||||
PersistenciaTaprimer perTaprimer = new PersistenciaTaprimer();
|
||||
if (perTaprimer.esPrimeraVisita( intMedico, intColectivo, dblPoliza, intBeneficiario) )
|
||||
strEsPrimeraVisita = "si";
|
||||
else
|
||||
strEsPrimeraVisita = "no";
|
||||
|
||||
PersistenciaTamovext perTamovex = new PersistenciaTamovext();
|
||||
strConRevisionHoy = "no";
|
||||
//if(perTamovex.tieneRevisionHoy(intMedico, ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getTarjetaDesplazado(), true))
|
||||
if(perTamovex.tieneRevisionHoyColPolOrd(intMedico, intColectivo, dblPoliza, intBeneficiario, true))
|
||||
strConRevisionHoy = "si";
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
|
||||
String path = request.getContextPath();
|
||||
String pathSpgif = request.getContextPath();
|
||||
if (request.getContextPath().indexOf("tarisan")==-1){
|
||||
path = path + "/tarisan";
|
||||
pathSpgif = path + "/..";
|
||||
}else if (request.getContextPath().indexOf("servlet")==-1){
|
||||
path = "/tarisan";
|
||||
}
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title>Especialidades</title>
|
||||
<link rel="shortcut icon" href="<%=path%>/img/logo.ico" />
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/estilos.css">
|
||||
<link rel="STYLESHEET" type="text/css" href="<%=path%>/css/jquery.modal.css">
|
||||
|
||||
<script language="JavaScript" src="<%=path%>/js/imprimir.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/menu_pac.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/funciones.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="<%=path%>/js/jquery.modal.min.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
|
||||
var vElementos = new Array();
|
||||
var vCodigoElementos = new Array();
|
||||
var intNumeroCheckBoxes = 0;
|
||||
var esPrimeraVisita = '<%=strEsPrimeraVisita%>';
|
||||
var tienerevisionhoy = '<%=strConRevisionHoy%>';
|
||||
var codigoPrimeraVisita = <%=ParametrosConfiguracion.codigoPrimeraVisita%>;
|
||||
var codigoVisitaSucesiva = <%=ParametrosConfiguracion.codigoVisitaSucesiva%>;
|
||||
|
||||
function comprobarImpresion(impresion)
|
||||
{
|
||||
if (impresion==1) { //se efectua la impresion
|
||||
document.frmImprimirPeticion.nombrePDF.value = "<%=factE%>";
|
||||
document.frmImprimirPeticion.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function anular()
|
||||
{
|
||||
vElementos = new Array();
|
||||
escribirListaElementos();
|
||||
|
||||
vCodigoElementos = new Array();
|
||||
|
||||
//limpiamos la seleccion de las checkboxes
|
||||
for (var i=0;i<intNumeroCheckBoxes;i++)
|
||||
eval("document.frmFacturacion.checkbox" + i + ".checked=false");
|
||||
|
||||
document.frmPrescripcion.listaElementosPrescripcion.value="";
|
||||
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
|
||||
document.frmFacturacion.listaElementos.value="";
|
||||
document.frmFacturacion.listaCodigoElementos.value="";
|
||||
}
|
||||
|
||||
function imprimir()
|
||||
{
|
||||
var boton = document.getElementById('okimprimir');
|
||||
boton.disabled = true;
|
||||
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
|
||||
|
||||
if (document.frmPrescripcion.listaElementosPrescripcion.value=="")
|
||||
{
|
||||
boton.disabled = false;
|
||||
modal({type:'error',title:'¡Atención!',text:'Debe seleccionar algún elemento para realizar la prescripción.',});
|
||||
/*alert("Debe seleccionar algún elemento para realizar la prescripción.");*/
|
||||
}
|
||||
else
|
||||
{
|
||||
document.frmPrescripcion.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
|
||||
{
|
||||
var textoElementos="";
|
||||
var textoCodigoElementos="";
|
||||
|
||||
if (vElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de descripciones
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
textoElementos+= "¬" + vElementos[i];
|
||||
}
|
||||
textoElementos+="¬";
|
||||
|
||||
}
|
||||
campoElementos.value=textoElementos;
|
||||
|
||||
|
||||
if (vCodigoElementos.length>0) //array con elementos
|
||||
{
|
||||
//preparamos la lista de codigos
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
textoCodigoElementos+= "¬" + vCodigoElementos[i];
|
||||
}
|
||||
textoCodigoElementos+= "¬";
|
||||
}
|
||||
campoCodigoElementos.value=textoCodigoElementos;
|
||||
|
||||
}
|
||||
|
||||
function inicializarListaElementos()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosAux=strListaElementos.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementos = '<%=strListaElementosAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementos.indexOf("~")!=-1)
|
||||
lstElementos = lstElementos.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
if (lstElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
while (lstElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementos[i] = lstElementos.substring(0, lstElementos.indexOf("¬"));
|
||||
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//preparamos la lista de codigos
|
||||
|
||||
//cogemos los valores de la lista de codigos
|
||||
var lstCodigoElementos = '<%=strListaCodigoElementos%>';
|
||||
|
||||
//inicializamos el array de elementos con sus valores
|
||||
var i=0;
|
||||
if (lstCodigoElementos!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
while (lstCodigoElementos.indexOf("¬")!=-1)
|
||||
{
|
||||
vCodigoElementos[i] = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
|
||||
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
|
||||
function aniadirElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
|
||||
//añadimos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//para mostrarlo correctamente. En el array se almacenan los valores reales, con comillas simples.
|
||||
//El elemento viene con ese caracter especial que sustituye a la comilla simple, porque si no, a la hora de
|
||||
//asignar el valor original a la propiedad value del checkbox, si el valor original contiene ', kaska. Pensara que es
|
||||
//final de string. Para evitar eso, antes de asignar a la propiedad value remplazamos la comilla por ese valor especial.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
vElementos[vElementos.length]=elementoConComillaSimple;
|
||||
|
||||
|
||||
//añadimos codigo elemento
|
||||
vCodigoElementos[vCodigoElementos.length]=codigoElemento;
|
||||
}
|
||||
|
||||
function eliminarElemento(elemento, codigoElemento)
|
||||
{
|
||||
var elementoConComillaSimple=elemento;
|
||||
var vNuevosElementos=new Array();
|
||||
var vNuevosCodigoElementos=new Array();
|
||||
var j=0;
|
||||
|
||||
//eliminamos descripcion elemento
|
||||
|
||||
//En caso de que el elemento tenga tenga el caracter (~), se sustituye por una comilla simple (')
|
||||
//ya que en el array se almacenan los valores reales, con comillas simples.
|
||||
while(elementoConComillaSimple.indexOf("~")!=-1)
|
||||
elementoConComillaSimple = elementoConComillaSimple.replace("~", "'");
|
||||
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
if(vElementos[i]!=elementoConComillaSimple)
|
||||
{
|
||||
vNuevosElementos[j]=vElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vElementos = vNuevosElementos;
|
||||
|
||||
//eliminamos codigo elemento
|
||||
j=0;
|
||||
for (var i=0; i<vCodigoElementos.length; i++)
|
||||
{
|
||||
if(vCodigoElementos[i]!=codigoElemento)
|
||||
{
|
||||
vNuevosCodigoElementos[j]=vCodigoElementos[i];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vCodigoElementos = vNuevosCodigoElementos;
|
||||
}
|
||||
|
||||
function escribirListaElementos()
|
||||
{
|
||||
var texto="<table border='0' cellpadding='0' cellspacing='0'>";
|
||||
if (vElementos.length==0) //no hay ningun elemento
|
||||
texto+= "<tr><td class='txt'>" + mensajeSinElementos + "</td></tr>";
|
||||
else //hay algun elemento
|
||||
{
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
texto+= "<tr><td class='txtNegrita' valign='top'>- </td><td class='txt'>" + vElementos[i] + "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
texto = texto + "</table>";
|
||||
|
||||
//escribimos la lista de elementos dependiendo del navegador
|
||||
if (document.all)
|
||||
{
|
||||
document.all['elementos'].innerHTML = texto;
|
||||
}
|
||||
else if (document.getElementById)
|
||||
{
|
||||
document.getElementById('elementos').innerHTML = texto;
|
||||
}
|
||||
else if (document.layers)
|
||||
{
|
||||
texto = "<layer top='0' left='0'>"+texto+"</layer>";
|
||||
document.layers['elementos'].document.open();
|
||||
document.layers['elementos'].document.write(texto);
|
||||
document.layers['elementos'].document.close();
|
||||
}
|
||||
}
|
||||
|
||||
function tratarCheckBox(checkbox, codigoElemento)
|
||||
{
|
||||
var consultaRevision = false; //variable que controla si se ha marcado una consulta y una revision a la vez
|
||||
|
||||
if (vElementos.length>=5) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
checkbox.checked=false;
|
||||
modal({type:'error',title:'¡Atención!',text:'No pueden imputarse más actos médicos.',});
|
||||
/*alert("No pueden imputarse más actos médicos");*/
|
||||
}
|
||||
else //se quita la seleccion de una prescripcion
|
||||
{
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
else //tiene seleccionados menos que 5 elementos. Le dejamos que seleccione sin ningun problema.
|
||||
{
|
||||
if (checkbox.checked==true) //se selecciona una prescripcion
|
||||
{
|
||||
//Comprobamos que no se pueda seleccionar una consulta y una revision a la vez
|
||||
for (var i=0; i<vElementos.length; i++)
|
||||
{
|
||||
if(vCodigoElementos[i]==1)
|
||||
{
|
||||
if (codigoElemento==2){
|
||||
checkbox.checked=false;
|
||||
/*alert("No puede imputarse una consulta y una revision a la vez"); */
|
||||
consultaRevision = true;
|
||||
modal({type:'error',title:'¡Atención!',text:'No puede imputarse una consulta y una revision a la vez.',});
|
||||
}
|
||||
}else if(vCodigoElementos[i]==2)
|
||||
{
|
||||
if (codigoElemento==1){
|
||||
checkbox.checked=false;
|
||||
/*alert("No puede imputarse una consulta y una revision a la vez"); */
|
||||
consultaRevision = true;
|
||||
modal({type:'error',title:'¡Atención!',text:'No puede imputarse una consulta y una revision a la vez.',});
|
||||
}
|
||||
}
|
||||
}
|
||||
//comprobamos si se permite seleccionar la primera visita o la visita sucesiva
|
||||
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
|
||||
if ( codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") //selecciona primera visita y no es la primera visita o seleciona la visita sucesiva y es primera vista
|
||||
{
|
||||
checkbox.checked=false;
|
||||
modal({type:'error',title:'¡Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta.',});
|
||||
/*alert("Imposible imputarse ese acto médico ya ha tenido consulta.");*/
|
||||
}
|
||||
else if(( codigoElemento == codigoVisitaSucesiva && tienerevisionhoy == "si" )||( codigoElemento == 1 && tienerevisionhoy == "si" ))
|
||||
{
|
||||
checkbox.checked=false;
|
||||
modal({type:'error',title:'¡Atención!',text:'Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.',});
|
||||
/*alert("Imposible imputarse ese acto médico ya ha tenido consulta o revision hoy.");*/
|
||||
}
|
||||
else{
|
||||
if (consultaRevision == false){
|
||||
aniadirElemento(checkbox.value, codigoElemento);
|
||||
}
|
||||
}
|
||||
consultaRevision = false;
|
||||
}
|
||||
else
|
||||
eliminarElemento(checkbox.value, codigoElemento);
|
||||
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
escribirListaElementos();
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
function obtenerArrayListaElementosPrescripcion()
|
||||
{
|
||||
|
||||
//preparamos la lista de descripciones
|
||||
|
||||
//Quitamos las comillas simples para que al asignar el valor de la lista de elementos
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strListaElementosPrescripcionAux=strListaElementosPrescripcion.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos los valores de la lista sin comillas simples
|
||||
var lstElementosPrescripcion = '<%=strListaElementosPrescripcionAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en el array de elementos
|
||||
while(lstElementosPrescripcion.indexOf("~")!=-1)
|
||||
lstElementosPrescripcion = lstElementosPrescripcion.replace("~", "'");
|
||||
|
||||
//inicializamos el array de elementos con sus valores originales
|
||||
var i=0;
|
||||
var vElementosPrescripcion = new Array();
|
||||
if (lstElementosPrescripcion!="") //la lista no esta vacia
|
||||
{
|
||||
//quitamos el primer caracter separador
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
while (lstElementosPrescripcion.indexOf("¬")!=-1)
|
||||
{
|
||||
vElementosPrescripcion[i] = lstElementosPrescripcion.substring(0, lstElementosPrescripcion.indexOf("¬"));
|
||||
lstElementosPrescripcion=lstElementosPrescripcion.substring(lstElementosPrescripcion.indexOf("¬") + 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return vElementosPrescripcion;
|
||||
}
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
//FUNCION UTILIZADA DESE LA PANTALLA DE IMPRESION PARA OBTENER LA LISTA DE ELEMENTOS
|
||||
//********************************************************************************************************************
|
||||
//********************************************************************************************************************
|
||||
|
||||
function informarParametroCampoBusqueda()
|
||||
{
|
||||
//Quitamos las comillas simples para que al asignar el valor del campo de busqueda
|
||||
//no kaske, ya que en esa asignacion se utiliza comillas simples
|
||||
<%
|
||||
String strCampoNombreAux=strCampoNombre.replace('\'', '~');
|
||||
%>
|
||||
|
||||
//cogemos el valor del campo de busqueda sin comillas simples
|
||||
var lstCampoBusqueda = '<%=strCampoNombreAux%>';
|
||||
//restauramos las comillas simples para ponerlos con su valor original en campo de busqueda
|
||||
while(lstCampoBusqueda.indexOf("~")!=-1)
|
||||
lstCampoBusqueda = lstCampoBusqueda.replace("~", "'");
|
||||
|
||||
document.frmFacturacion.nombre.value=lstCampoBusqueda;
|
||||
}
|
||||
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value=campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
document.frmFacturacion.pagina.value=1;
|
||||
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||
document.frmFacturacion.submit();
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
prepararEnvioFormListaElementos(document.frmFacturacion.listaElementos, document.frmFacturacion.listaCodigoElementos);
|
||||
document.frmFacturacion.pagina.value=pagina;
|
||||
pasarAMayusculas(document.frmFacturacion.nombre);
|
||||
document.frmFacturacion.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
|
||||
<div class="marco">
|
||||
<!-- Datos del usuario conectado //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="565">
|
||||
<%
|
||||
if ((blnEsPolizaIgualaMedico == 0) || ((blnEsPolizaIgualaMedico != 0) && perfilIguala.toString().compareTo("01")!=0)){
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - PERFIL TARISAN: " + perfilIguala.toString() + " " + blnEsPolizaIgualaMedico);
|
||||
%>
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1px" bgcolor="#CCCCCC"></td>
|
||||
<td class="txt" valign="top">
|
||||
<table border="0" align="center" width="100%" cellpadding="0">
|
||||
|
||||
<!-- Presentacion de los resultados -->
|
||||
<tr>
|
||||
<!--<td colspan="4" align="right">-->
|
||||
<td colspan="4" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input type="button" name="aceptar" id="okimprimir" value="OK" onclick="javascript:imprimir()" class="menu"></td>
|
||||
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
|
||||
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&pagina=1&imp=1" method="post">
|
||||
<input type="hidden" name="listaElementosPrescripcion" value="">
|
||||
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_FACTURACION%>">
|
||||
</form>
|
||||
<form name="frmFacturacion" action="<%=request.getContextPath()%>/jsp/pac/facturacion.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
|
||||
<table border="0" align="center" width="60%">
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita">Imputación de actos médicos:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">
|
||||
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
|
||||
</td>
|
||||
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="60" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td><span class="txtnegrita">Nombre acto médico: </span></td>
|
||||
<td><input type="text" size="50" name="nombre" class="txt"></td>
|
||||
<td> </td>
|
||||
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
<input type="hidden" name="listaElementos" value="">
|
||||
<input type="hidden" name="listaCodigoElementos" value="">
|
||||
</tr>
|
||||
<%
|
||||
PersistenciaTtactmed per = new PersistenciaTtactmed();
|
||||
long intColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
|
||||
double dblPolizanew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza();
|
||||
int contrato = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato();
|
||||
|
||||
Vector vSeleccion = per.obtenerActosAutoprescribibles(intPagina, ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad(), contrato, intColectivonew, dblPolizanew,((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), strCampoNombre);
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Actos: " + vSeleccion.size());
|
||||
if (vSeleccion.size()==0) //No se han encontrado datos
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (intPagina != 0){ //se tiene en cuenta la paginacion
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="4" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<!-- Para saber cuantas checkbox tenemos en la pagina y poder hacer la anulacion de las selecciones -->
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
intNumeroCheckBoxes = <%=vSeleccion.size()%>
|
||||
//-->
|
||||
</script>
|
||||
<tr>
|
||||
<td width="1%"></td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
Ttactmed ttactmed = null;
|
||||
String estilo = "";
|
||||
String strDescripcionSinComilla="";
|
||||
for(int i = 0; i < vSeleccion.size(); i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
|
||||
|
||||
//hacemos el tratamiento por si viene comilla simple en la descripcion
|
||||
strDescripcionSinComilla = ttactmed.getDescripcion().replace('\'', '~');
|
||||
%>
|
||||
<tr class="trResultados">
|
||||
<%
|
||||
if (strListaElementos.indexOf("¬" + ttactmed.getDescripcion() + "¬")!=-1)
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttactmed.getActo()%>)"></td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<td class="<%=estilo%>" align="center"><%=ttactmed.getActo()%></td>
|
||||
<td class="<%=estilo%>" align="left"><%=ttactmed.getDescripcion()%></td>
|
||||
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(per.obtenerPrecioActoMedico(((Usuario)sesion.getAttribute("USUARIO")).getTarifa(), ttactmed.getActo(), ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad()), PersistenciaParametros.decimales)%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</form>
|
||||
|
||||
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0)
|
||||
%>
|
||||
<%
|
||||
} //fin else (vSeleccion.size()!=0)
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
else {
|
||||
%>
|
||||
<table border="0" align="center" width="60%">
|
||||
<form name="frmFacturacion" action="" method="post">
|
||||
<input type="hidden" name="pagina" value="1">
|
||||
<input type="hidden" name="listaElementos" value="">
|
||||
<input type="hidden" name="listaCodigoElementos" value="">
|
||||
</form>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="txtNegrita"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<%
|
||||
if (blnEsPolizaIgualaMedico == 1){ %>
|
||||
<td align="center" class="txtNegrita"><%=pertamensaje.obtenerMensaje(12).getMensaje() %></td>
|
||||
<%}
|
||||
else { %>
|
||||
<td align="center" class="txtNegrita"><% tamensaje = pertamensaje.obtenerMensaje(11); %><%=tamensaje.getMensaje() %></td>
|
||||
<%
|
||||
}%>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="frmImprimirPeticion" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="width:50%;margin-bottom: 0px">
|
||||
<input type="hidden" name="tipo" value="11"/>
|
||||
<input type="hidden" name="nombrePDF" value="" />
|
||||
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(ExcepcionTarisan ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de facturacion (pac/facturacion.jsp)");
|
||||
}
|
||||
%>
|
||||
Reference in New Issue
Block a user