Compare commits

...
5 Commits
Author SHA1 Message Date
m4gn3to 2b4c7a01d6 añado web-content 2025-06-09 13:55:43 +02:00
m4gn3to e1227c3b2a añado jsp 2025-06-09 13:55:08 +02:00
m4gn3to ce54d7a756 añado js 2025-06-09 13:54:42 +02:00
m4gn3to 3a9488b391 Merge branch 'main' of https://docker.imqnavarra.com:3000/jjripaper/tarisan_gitea into main 2025-06-09 13:53:56 +02:00
m4gn3to 3d2d732abb Añado calendar 2025-06-09 13:53:54 +02:00
154 changed files with 76931 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

+467
View File
@@ -0,0 +1,467 @@
/**
* alertify
* An unobtrusive customizable JavaScript notification system
*
* @author Fabien Doiron <fabien.doiron@gmail.com>
* @copyright Fabien Doiron 2012
* @license MIT <http://opensource.org/licenses/mit-license.php>
* @link http://www.github.com/fabien-d
* @module alertify
* @version 0.2.12
*/
/*global define*/
(function (global, undefined) {
"use strict";
var document = global.document,
Alertify;
Alertify = function () {
var _alertify = {},
dialogs = {},
isopen = false,
keys = { ENTER: 13, ESC: 27, SPACE: 32 },
queue = [],
$, elCallee, elCover, elDialog, elLog;
/**
* Markup pieces
* @type {Object}
*/
dialogs = {
buttons : {
holder : "<nav class=\"alertify-buttons\">{{buttons}}</nav>",
submit : "<button type=\"submit\" class=\"alertify-button alertify-button-ok\" id=\"alertify-ok\" />{{ok}}</button>",
ok : "<a href=\"#\" class=\"alertify-button alertify-button-ok\" id=\"alertify-ok\">{{ok}}</a>",
cancel : "<a href=\"#\" class=\"alertify-button alertify-button-cancel\" id=\"alertify-cancel\">{{cancel}}</a>"
},
input : "<input type=\"text\" class=\"alertify-text\" id=\"alertify-text\">",
message : "<p class=\"alertify-message\">{{message}}</p>",
log : "<article class=\"alertify-log{{class}}\">{{message}}</article>"
};
/**
* Shorthand for document.getElementById()
*
* @param {String} id A specific element ID
* @return {Object} HTML element
*/
$ = function (id) {
return document.getElementById(id);
};
/**
* Alertify private object
* @type {Object}
*/
_alertify = {
/**
* Labels object
* @type {Object}
*/
labels : {
ok : "Aceptar",
cancel : "Cancelar"
},
/**
* Delay number
* @type {Number}
*/
delay : 5000,
/**
* Set the proper button click events
*
* @param {Function} fn [Optional] Callback function
*
* @return {undefined}
*/
addListeners : function (fn) {
var btnReset = $("alertify-resetFocus"),
btnOK = $("alertify-ok") || undefined,
btnCancel = $("alertify-cancel") || undefined,
input = $("alertify-text") || undefined,
form = $("alertify-form") || undefined,
hasOK = (typeof btnOK !== "undefined"),
hasCancel = (typeof btnCancel !== "undefined"),
hasInput = (typeof input !== "undefined"),
val = "",
self = this,
ok, cancel, common, key, reset;
// ok event handler
ok = function (event) {
if (typeof event.preventDefault !== "undefined") event.preventDefault();
common(event);
if (typeof input !== "undefined") val = input.value;
if (typeof fn === "function") fn(true, val);
};
// cancel event handler
cancel = function (event) {
if (typeof event.preventDefault !== "undefined") event.preventDefault();
common(event);
if (typeof fn === "function") fn(false);
};
// common event handler (keyup, ok and cancel)
common = function (event) {
self.hide();
self.unbind(document.body, "keyup", key);
self.unbind(btnReset, "focus", reset);
if (hasInput) self.unbind(form, "submit", ok);
if (hasOK) self.unbind(btnOK, "click", ok);
if (hasCancel) self.unbind(btnCancel, "click", cancel);
};
// keyup handler
key = function (event) {
var keyCode = event.keyCode;
if (keyCode === keys.SPACE && !hasInput) ok(event);
if (keyCode === keys.ESC && hasCancel) cancel(event);
};
// reset focus to first item in the dialog
reset = function (event) {
if (hasInput) input.focus();
else if (hasCancel) btnCancel.focus();
else btnOK.focus();
};
// handle reset focus link
// this ensures that the keyboard focus does not
// ever leave the dialog box until an action has
// been taken
this.bind(btnReset, "focus", reset);
// handle OK click
if (hasOK) this.bind(btnOK, "click", ok);
// handle Cancel click
if (hasCancel) this.bind(btnCancel, "click", cancel);
// listen for keys, Cancel => ESC
this.bind(document.body, "keyup", key);
// bind form submit
if (hasInput) this.bind(form, "submit", ok);
// set focus on OK button or the input text
global.setTimeout(function () {
if (input) {
input.focus();
input.select();
}
else btnOK.focus();
}, 50);
},
/**
* Bind events to elements
*
* @param {Object} el HTML Object
* @param {Event} event Event to attach to element
* @param {Function} fn Callback function
*
* @return {undefined}
*/
bind : function (el, event, fn) {
if (typeof el.addEventListener === "function") {
el.addEventListener(event, fn, false);
} else if (el.attachEvent) {
el.attachEvent("on" + event, fn);
}
},
/**
* Build the proper message box
*
* @param {Object} item Current object in the queue
*
* @return {String} An HTML string of the message box
*/
build : function (item) {
var html = "",
type = item.type,
message = item.message;
html += "<div class=\"alertify-dialog\">";
if (type === "prompt") html += "<form id=\"alertify-form\">";
html += "<article class=\"alertify-inner\">";
html += dialogs.message.replace("{{message}}", message);
if (type === "prompt") html += dialogs.input;
html += dialogs.buttons.holder;
html += "</article>";
if (type === "prompt") html += "</form>";
html += "<a id=\"alertify-resetFocus\" class=\"alertify-resetFocus\" href=\"#\">Reset Focus</a>";
html += "</div>";
switch (type) {
case "confirm":
html = html.replace("{{buttons}}", dialogs.buttons.ok + dialogs.buttons.cancel);
html = html.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
break;
case "prompt":
html = html.replace("{{buttons}}", dialogs.buttons.submit + dialogs.buttons.cancel);
html = html.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
break;
case "alert":
html = html.replace("{{buttons}}", dialogs.buttons.ok);
html = html.replace("{{ok}}", this.labels.ok);
break;
default:
break;
}
elDialog.className = "alertify alertify-show alertify-" + type;
elCover.className = "alertify-cover";
return html;
},
/**
* Close the log messages
*
* @param {Object} elem HTML Element of log message to close
* @param {Number} wait [optional] Time (in ms) to wait before automatically hiding the message
*
* @return {undefined}
*/
close : function (elem, wait) {
var timer = (wait && !isNaN(wait)) ? +wait : this.delay; // Unary Plus: +"2" === 2
this.bind(elem, "click", function () {
elLog.removeChild(elem);
});
setTimeout(function () {
if (typeof elem !== "undefined" && elem.parentNode === elLog) elLog.removeChild(elem);
}, timer);
},
/**
* Create a dialog box
*
* @param {String} message The message passed from the callee
* @param {String} type Type of dialog to create
* @param {Function} fn [Optional] Callback function
* @param {String} placeholder [Optional] Default value for prompt input field
*
* @return {Object}
*/
dialog : function (message, type, fn, placeholder) {
// set the current active element
// this allows the keyboard focus to be resetted
// after the dialog box is closed
elCallee = document.activeElement;
// check to ensure the alertify dialog element
// has been successfully created
var check = function () {
if (elDialog && elDialog.scrollTop !== null) return;
else check();
};
// error catching
if (typeof message !== "string") throw new Error("message must be a string");
if (typeof type !== "string") throw new Error("type must be a string");
if (typeof fn !== "undefined" && typeof fn !== "function") throw new Error("fn must be a function");
// initialize alertify if it hasn't already been done
if (typeof this.init === "function") {
this.init();
check();
}
queue.push({ type: type, message: message, callback: fn, placeholder: placeholder });
if (!isopen) this.setup();
return this;
},
/**
* Extend the log method to create custom methods
*
* @param {String} type Custom method name
*
* @return {Function}
*/
extend : function (type) {
return function (message, wait) { this.log(message, type, wait); };
},
/**
* Hide the dialog and rest to defaults
*
* @return {undefined}
*/
hide : function () {
// remove reference from queue
queue.splice(0,1);
// if items remaining in the queue
if (queue.length > 0) this.setup();
else {
isopen = false;
elDialog.className = "alertify alertify-hide alertify-hidden";
elCover.className = "alertify-cover alertify-hidden";
// set focus to the last element or body
// after the dialog is closed
elCallee.focus();
}
},
/**
* Initialize Alertify
* Create the 2 main elements
*
* @return {undefined}
*/
init : function () {
// ensure legacy browsers support html5 tags
document.createElement("nav");
document.createElement("article");
document.createElement("section");
// cover
elCover = document.createElement("div");
elCover.setAttribute("id", "alertify-cover");
elCover.className = "alertify-cover alertify-hidden";
document.body.appendChild(elCover);
// main element
elDialog = document.createElement("section");
elDialog.setAttribute("id", "alertify");
elDialog.className = "alertify alertify-hidden";
document.body.appendChild(elDialog);
// log element
elLog = document.createElement("section");
elLog.setAttribute("id", "alertify-logs");
elLog.className = "alertify-logs";
document.body.appendChild(elLog);
// set tabindex attribute on body element
// this allows script to give it focus
// after the dialog is closed
document.body.setAttribute("tabindex", "0");
// clean up init method
delete this.init;
},
/**
* Show a new log message box
*
* @param {String} message The message passed from the callee
* @param {String} type [Optional] Optional type of log message
* @param {Number} wait [Optional] Time (in ms) to wait before auto-hiding the log
*
* @return {Object}
*/
log : function (message, type, wait) {
// check to ensure the alertify dialog element
// has been successfully created
var check = function () {
if (elLog && elLog.scrollTop !== null) return;
else check();
};
// initialize alertify if it hasn't already been done
if (typeof this.init === "function") {
this.init();
check();
}
this.notify(message, type, wait);
return this;
},
/**
* Add new log message
* If a type is passed, a class name "alertify-log-{type}" will get added.
* This allows for custom look and feel for various types of notifications.
*
* @param {String} message The message passed from the callee
* @param {String} type [Optional] Type of log message
* @param {Number} wait [Optional] Time (in ms) to wait before auto-hiding
*
* @return {undefined}
*/
notify : function (message, type, wait) {
var log = document.createElement("article");
log.className = "alertify-log" + ((typeof type === "string" && type !== "") ? " alertify-log-" + type : "");
log.innerHTML = message;
// prepend child
elLog.insertBefore(log, elLog.firstChild);
// triggers the CSS animation
setTimeout(function() { log.className = log.className + " alertify-log-show"; }, 50);
this.close(log, wait);
},
/**
* Set properties
*
* @param {Object} args Passing parameters
*
* @return {undefined}
*/
set : function (args) {
var k;
// error catching
if (typeof args !== "object" && args instanceof Array) throw new Error("args must be an object");
// set parameters
for (k in args) {
if (args.hasOwnProperty(k)) {
this[k] = args[k];
}
}
},
/**
* Initiate all the required pieces for the dialog box
*
* @return {undefined}
*/
setup : function () {
var item = queue[0];
isopen = true;
elDialog.innerHTML = this.build(item);
if (typeof item.placeholder === "string") $("alertify-text").value = item.placeholder;
this.addListeners(item.callback);
},
/**
* Unbind events to elements
*
* @param {Object} el HTML Object
* @param {Event} event Event to detach to element
* @param {Function} fn Callback function
*
* @return {undefined}
*/
unbind : function (el, event, fn) {
if (typeof el.removeEventListener === "function") {
el.removeEventListener(event, fn, false);
} else if (el.detachEvent) {
el.detachEvent("on" + event, fn);
}
}
};
return {
alert : function (message, fn) { _alertify.dialog(message, "alert", fn); return this; },
confirm : function (message, fn) { _alertify.dialog(message, "confirm", fn); return this; },
extend : _alertify.extend,
init : _alertify.init,
log : function (message, type, wait) { _alertify.log(message, type, wait); return this; },
prompt : function (message, fn, placeholder) { _alertify.dialog(message, "prompt", fn, placeholder); return this; },
success : function (message, wait) { _alertify.log(message, "success", wait); return this; },
error : function (message, wait) { _alertify.log(message, "error", wait); return this; },
set : function (args) { _alertify.set(args); },
labels : _alertify.labels
};
};
// AMD and window support
if (typeof define === "function") {
define([], function () { return new Alertify(); });
} else {
if (typeof global.alertify === "undefined") {
global.alertify = new Alertify();
}
}
}(this));
+65
View File
@@ -0,0 +1,65 @@
function bloques()
{
var color="#C02331";
var deshabilitado="#FFAAAA";
stCaja = '';
//stCaja += ' <table cellpadding="0" cellspacing="0" border="0">\n';
stCaja += ' <table cellpadding="0" cellspacing="0" border="0" width="100%">\n';
/*stCaja += ' <tr>\n';
stCaja += ' <td bgcolor="' + color + '"><img src="./img/sp.gif" width="1" height="1" border="0"></td>\n';
stCaja += ' <td bgcolor="' + color + '"><img src="./img/sp.gif" width="744" height="1" border="0"></td>\n';
stCaja += ' <td bgcolor="' + color + '"><img src="./img/sp.gif" width="1" height="1" border="0"></td>\n';
stCaja += ' </tr>\n';*/
stCaja += ' <tr>\n';
//stCaja += ' <td bgcolor="' + color + '"><img src="./img/sp.gif" width="1" height="18" border="0"></td>\n';
stCaja += ' <td >\n';
//stCaja += ' <table cellpadding="0" cellspacing="1" border="0" width="744" >\n';
stCaja += ' <table cellpadding="0" cellspacing="1" border="0" width="100%" >\n';
stCaja += ' <tr>\n';
//Enlaces de secciones
//var mostrarSeccion = seccionesAMostrar( pNG );
var seccionSeleccionada = getSeccion();
if(seccionSeleccionada == SECCION_MEDICOS)
{
// stCaja += ' <td class="txtBlqColor" width="150" bgcolor="' + deshabilitado + '"><img src="./img/sp.gif" width="15" height="1" border="0"><b>Gesti&oacute;n de M&eacute;dicos</b></a></td>';
// stCaja += ' <td width="150" bgcolor="' + color + '"><img src="./img/sp.gif" width="15" height="1" border="0"><a class="txtBlq" href="javascript:setSeccion(SECCION_PACIENTES);" onMouseOver="self.status=\'Gesti&oacute;n de Pacientes\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Gesti&oacute;n de Pacientes</b></a></td>';
stCaja += ' <td class="txtBlqColor" width="33%" bgcolor="' + deshabilitado + '" style="text-align:center"><b>Gesti&oacute;n de M&eacute;dicos</b></a></td>';
stCaja += ' <td width="33%" bgcolor="' + color + '" style="text-align:center"><a class="txtBlq" href="javascript:setSeccion(SECCION_PACIENTES);" onMouseOver="self.status=\'Gesti&oacute;n de Pacientes\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Gesti&oacute;n de Pacientes</b></a></td>';
}
else if(seccionSeleccionada == SECCION_PACIENTES)
{
// stCaja += ' <td width="150" bgcolor="' + color + '"><img src="./img/sp.gif" width="15" height="1" border="0"><a class="txtBlq" href="javascript:setSeccion(SECCION_MEDICOS);" onMouseOver="self.status=\'Gesti&oacute;n de M&eacute;dicos\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Gesti&oacute;n de M&eacute;dicos</b></a></td>';
// stCaja += ' <td class="txtBlqColor" width="150" bgcolor="' + deshabilitado + '"><img src="./img/sp.gif" width="15" height="1" border="0"><b>Gesti&oacute;n de Pacientes</b></a></td>';
stCaja += ' <td width="33%" bgcolor="' + color + '" style="text-align:center"><a class="txtBlq" href="javascript:setSeccion(SECCION_MEDICOS);" onMouseOver="self.status=\'Gesti&oacute;n de M&eacute;dicos\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Gesti&oacute;n de M&eacute;dicos</b></a></td>';
stCaja += ' <td class="txtBlqColor" width="33%" bgcolor="' + deshabilitado + '" style="text-align:center"><b>Gesti&oacute;n de Pacientes</b></a></td>';
}
else if(seccionSeleccionada == SECCION_ADMINISTRADOR)
{
// stCaja += ' <td colspan="2" class="txtBlqColor" width="300" bgcolor="' + deshabilitado + '"><img src="./img/sp.gif" width="15" height="1" border="0"><b>Administraci&oacute;n de Usuarios</b></a></td>';
stCaja += ' <td colspan="2" class="txtBlqColor" width="66%" bgcolor="' + deshabilitado + '" style="text-align:center"><b>Administraci&oacute;n</b></a></td>';
}
//stCaja += ' <td width="150" bgcolor="' + color + '"><img src="./img/sp.gif" width="15" height="1" border="0"><a class="txtBlq" href="javascript:setSeccion(SECCION_SALIR);" onMouseOver="self.status=\'Salir\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Salir</b></a>';
stCaja += ' <td width="33%" bgcolor="' + color + '" style="text-align:center"><a class="txtBlq" href="javascript:setSeccion(SECCION_SALIR);" onMouseOver="self.status=\'Salir\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Salir</b></a>';
stCaja += ' </td>\n';
stCaja += ' </tr>\n';
stCaja += ' </table>\n';
stCaja += ' </td>';
//stCaja += ' <td bgcolor="' + color + '"><img src="img/sp.gif" width="1" height="18" border="0"></td>\n';
stCaja += ' </tr>\n';
/*stCaja += ' <tr>\n';
stCaja += ' <td colspan="3" bgcolor="' + color + '"><img src="img/sp.gif" width="746" height="1" border="0"></td>\n';
stCaja += ' </tr>\n';*/
stCaja += ' </table>\n';
var rutaPagHTML = window.location.href;
//si la pagina que incluye este js es path.html.... no dibuja el bloque.
//if ( rutaPagHTML.indexOf("path.html")<0 )
document.write(stCaja);
}
+192
View File
@@ -0,0 +1,192 @@
<%@ 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 cambio de clave (cambio_clave.jsp)");
response.setHeader("Expires", "0");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
HttpSession sesion = request.getSession(true);
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
{
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
response.sendRedirect("../html/login.html");
}
else
{
try
{
%>
<html>
<head>
<title>Cambio de clave</title>
<link rel="STYLESHEET" type="text/css" href="../css/estilos.css">
<script language="JavaScript" src="../js/funciones.js"></script>
<script language="JavaScript" src="../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../js/bloques_tarisan.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function enviar()
{
var blnFormularioValido = true;
//comprobamos si la clave nueva es vacia o esta rellena solo con espacios
if (blnFormularioValido && esVacia(frmClave.clave_nueva.value))
{
alert("La clave es vacía o contiene únicamente espacios en blanco. Introduzca una clave válida.");
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
//comprobamos que el tamaño de la clave nueva no sea < 6
if (blnFormularioValido && frmClave.clave_nueva.value.length<6)
{
alert("La clave debe tener como mínimo 6 caracteres.");
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
//comprobamos que el valor de las claves introducidas sean iguales
if (blnFormularioValido && frmClave.clave_nueva.value != frmClave.confirmar_clave.value)
{
alert("Las claves introducidas no conciden.");
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
if (blnFormularioValido)
document.frmClave.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="document.frmClave.clave_nueva.focus();">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td>
<table cellpadding="0" cellspacing="0" border="0" width="165">
<tr valign="top">
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOff"><b><%=pertamensaje.obtenerMensaje(37).getMensaje() %></b></td>
</tr>
</table>
</td>
<td><img src="../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td colspan="2" class="txtnegrita" align="center"><%=pertamensaje.obtenerMensaje(36).getMensaje() %></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<form name="frmClave" action="../servlet/GestorMedicos" method="post">
<td>
<table border="0" align="center">
<tr>
<td align="right"><span class="txtnegrita"><%=pertamensaje.obtenerMensaje(34).getMensaje() %> </span></td></td>
<td><input type="password" size="30" name="clave_nueva" class="txt" value="" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita"><%=pertamensaje.obtenerMensaje(35).getMensaje() %> </span></td></td>
<td><input type="password" size="30" name="confirmar_clave" class="txt" value="" maxlength="50"></td>
</tr>
<tr>
<td colspan="2" align="center"><a href="javascript:frmClave.reset();frmClave.clave_nueva.focus()" class="enlace"><%=pertamensaje.obtenerMensaje(33).getMensaje() %></a>&nbsp;&nbsp;&nbsp;<a href="javascript:enviar()" class="enlace">Aceptar</a>&nbsp;&nbsp;&nbsp;<a href="javascript:history.back();" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ACTUALIZAR_ACCESO%>">
</form>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
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");
}
catch(ExcepcionTarisan eT)
{
LogTarisan.logger.log(NivelLog.ERROR, "Excepcion: " + eT);
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 cambio de clave (cambio_clave.jsp)");
%>
File diff suppressed because it is too large Load Diff
+193
View File
@@ -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" %>
<html>
<head>
<title>Entorno gr&aacute;fico</title>
</head>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="ffffff">
<%
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("<hr>");
out.print("Fecha = " + dia + "/" + mes + "/" + ano);
out.print("&nbsp;&nbsp;&nbsp;&nbsp;");
out.print("Hora = " + hora + ":" + minutos + ":" + segundos);
out.print("<hr>");
%>
<b><i><font size="+1">Entorno gr&aacute;fico</font></i></b>
<hr>
<%
out.println("<font size=\"-1\"><ul>");
out.println("<li><b>awt.toolkit: </b>" + System.getProperties().get("awt.toolkit"));
out.println("<li><b>java.awt.graphicsenv: </b>" + System.getProperties().get("java.awt.graphicsenv"));
out.println("</ul></font>");
try
{
out.println("<font size=\"-1\"><ul>");
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
out.println("<li><b>GraphicsEnvironment </b>--> " + ge);
out.println("</ul></font>");
GraphicsDevice gd = ge.getDefaultScreenDevice();
out.println("<font size=\"-1\"><ul>");
out.println("<li><b>GraphicsDevice default</b>--> " + gd);
out.println("</ul></font>");
GraphicsDevice[] gds = ge.getScreenDevices();
GraphicsConfiguration[] gc = null;
GraphicsConfiguration bestGc = null;
out.println("<font size=\"-1\"><ul>");
for(int i = 0; i < gds.length; i++)
{
out.println("<li><b>GraphicsDevice[" + i + "] </b>--> " + gds[i] + "; getType()=" + gds[i].getType() + "; getIDstring()=" + gds[i].getIDstring());
gc = gds[i].getConfigurations();
out.println("<font size=\"-1\"><ul>");
for(int j = 0; j < gc.length; j++)
{
out.println("<li><b>GraphicsConfiguration[" + j + "] </b>--> " + gc[j] + "; getColorModel()=" + gc[j].getColorModel() + "; getDevice()=" + gc[j].getDevice());
}
out.println("<li><b>GraphicsConfiguration default </b>--> " + gds[i].getDefaultConfiguration());
out.println("</ul></font>");
}
out.println("</ul></font>");
Font[] fuentes = ge.getAllFonts();
out.println("<font size=\"-1\"><ul>");
for(int i = 0; i < fuentes.length; i++)
{
out.println("<li><b>Fuente[" + i + "] </b>--> nombre:" + fuentes[i].getFontName() + ", familia " + fuentes[i].getFamily());
}
out.println("</ul></font>");
String[] familias = ge.getAvailableFontFamilyNames();
out.println("<font size=\"-1\"><ul>");
for(int i = 0; i < familias.length; i++)
{
out.println("<li><b>Familia[" + i + "] </b>--> " + familias[i]);
}
out.println("</ul></font>");
}
catch(Throwable ex)
{
out.println("<li><b>Excepción en manejo de entorno gráfico:</b> " + ex);
}
out.println("<hr>");
out.println("</b>Prueba de clases de java.awt</b>");
out.println("<font size=\"-1\"><ul>");
try
{
Color color = new Color(100, 125, 12);
out.println("<li>Color --> " + color);
}
catch(Throwable ex)
{
out.println("<li>Excepción en Color --> " + ex);
}
try
{
Frame ventana = new Frame("ventana de prueba");
out.println("<li>Frame --> " + ventana);
}
catch(Throwable ex)
{
out.println("<li>Excepción en Frame --> " + ex);
}
try
{
Button boton = new Button("botón de prueba");
out.println("<li>Button --> " + boton);
}
catch(Throwable ex)
{
out.println("<li>Excepción en Button --> " + ex);
}
try
{
Font fuente = new Font("LucidaSansRegular", Font.PLAIN, 12);
out.println("<li>Fuente --> " + fuente);
}
catch(Throwable ex)
{
out.println("<li>Excepción en Font --> " + ex);
}
try
{
TextField campo = new TextField("campo de texto");
out.println("<li>TextField --> " + campo);
}
catch(Throwable ex)
{
out.println("<li>Excepción en TextField --> " + ex);
}
out.println("</ul></font>");
%>
<hr>
</body>
</html>
+151
View File
@@ -0,0 +1,151 @@
<%@ 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.*" %>
<%
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);
String mensaje = null;
if(sesion.isNew() || (sesion.getAttribute("ERROR") == null))
{
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
response.sendRedirect("../html/login.html");
}
else
{
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");
Usuario usuario = (Usuario)sesion.getAttribute("USUARIO");
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
try
{
%>
<html>
<head>
<title>Error en Tarisan</title>
<link rel="STYLESHEET" type="text/css" href="../css/estilos.css">
<script language="JavaScript" src="../js/funciones.js"></script>
<script language="JavaScript" src="../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../js/bloques_tarisan.js"></script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<%
if(usuario == null)
{
%>
<td class="tituloTabla" align="center">&nbsp;</td>
<%
}
else
{
%>
<td class="tituloTabla" align="center"><%= usuario %></td>
<%
}
%>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td>
<table cellpadding="0" cellspacing="0" border="0" width="165">
<tr valign="top">
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOff"><b><%=pertamensaje.obtenerMensaje(39).getMensaje() %></b></td>
</tr>
</table>
</td>
<td><img src="../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<tr><td>&nbsp;</td></tr>
<tr><td class="txtnegrita" align="center"><%= mensaje %></td></tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td class="txt" align="center"><%=pertamensaje.obtenerMensaje(38).getMensaje() %></td>
</tr>
<tr>
<td align="right"><a href="javascript:history.back();" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
catch(Exception e){
LogTarisan.logger.log(NivelLog.INFO, "Final página de error (error.jsp)");
}
LogTarisan.logger.log(NivelLog.INFO, "Final página de error (error.jsp)");
%>
+142
View File
@@ -0,0 +1,142 @@
<%@ 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.*" %>
<%
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);
String mensaje = null;
if(sesion.isNew() || (sesion.getAttribute("ERROR") == null))
{
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
response.sendRedirect("../html/login.html");
}
else
{
mensaje = (String)sesion.getAttribute("ERROR");
if(mensaje == null || (mensaje.trim().compareTo("") == 0))
{
mensaje = "El paciente es una iguala suya.";
}
sesion.removeAttribute("ERROR");
Usuario usuario = (Usuario)sesion.getAttribute("USUARIO");
Tamensaje tamensaje = new Tamensaje();
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
%>
<html>
<head>
<title>Error en Tarisan</title>
<link rel="STYLESHEET" type="text/css" href="../css/estilos.css">
<script language="JavaScript" src="../js/funciones.js"></script>
<script language="JavaScript" src="../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../js/bloques_tarisan.js"></script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<%
if(usuario == null)
{
%>
<td class="tituloTabla" align="center">&nbsp;</td>
<%
}
else
{
%>
<td class="tituloTabla" align="center"><%= usuario %></td>
<%
}
%>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td>
<table cellpadding="0" cellspacing="0" border="0" width="165">
<tr valign="top">
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOff"><b>MENSAJE</b></td>
</tr>
</table>
</td>
<td><img src="../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<tr><td>&nbsp;</td></tr>
<tr><td class="txtnegrita" align="center"><%= mensaje %></td></tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td class="txt" align="center"><%=pertamensaje.obtenerMensaje(32).getMensaje() %></td>
</tr>
<tr>
<td align="right"><a href="javascript:history.back();" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página de error (errorIguala.jsp)");
%>
+276
View File
@@ -0,0 +1,276 @@
//valida que un string solo haya numeros
function soloNumeros(str1){
var formatoNumerico = /^([0-9])+$/; //solo numeros
return formatoNumerico.test(str1);
}
//********************************************************************************************************************
function esVacia(inputString)
{
var retValue = inputString;
var ch = retValue.substring(0, 1);
while (ch == " ") { // Check for spaces at the beginning of the string
retValue = retValue.substring(1, retValue.length);
ch = retValue.substring(0, 1);
}
return (retValue=="")
}
//********************************************************************************************************************
function quitarUltimosSaltosLinea(campo)
{
//Eliminamos los saltos de linea que esten despues del ultimo elemento
while (campo.value.indexOf("\r\n",campo.value.length-2)!=-1)
campo.value=campo.value.substring(0, campo.value.length-2);
}
//********************************************************************************************************************
//valida Fechas de con formato dd-mm-aaaa
function valorFecha(campo)
{
var resultado = true;
if (campo.value != "")
{
var diaMesAno = (campo.value).split("-");
if(isNaN(diaMesAno[0]) || isNaN(diaMesAno[1]) || isNaN(diaMesAno[2]))
{
resultado = false;
}
else if (diaMesAno.length < 3)
{
resultado = false;
}
else if (diaMesAno[0].length > 2 || diaMesAno[1].length > 2 || diaMesAno[2].length > 4)//fecha!=00-00-0000
{
resultado = false;
}
else if (diaMesAno[2] < 1900) //año menor que 1900
{
resultado = false;
}
else if (diaMesAno[0] > 31 || diaMesAno[0] <= 0)//dia mayor que 31
{
resultado = false;
}
else if (diaMesAno[1] > 12 || diaMesAno[1] <= 0)//mes mayor que 12
{
resultado = false;
}
else if (diaMesAno[0] == 31 && (diaMesAno[1] == 4 || diaMesAno[1] == 6 || diaMesAno[1] == 9 || diaMesAno[1] == 11) )//dia 31 en meses de 30
{
resultado = false;
}
else if (diaMesAno[1] == 2)
{
//febrero
var isleap = (diaMesAno[2]%4 == 0 && (diaMesAno[2]%100 != 0 || diaMesAno[2]%400 == 0));
if (diaMesAno[0] > 29 || (diaMesAno[0] == 29 && !isleap))
{
resultado = false;
}
}
}
if (!resultado)
{
respMalaValidacion("Debe introducir una fecha con el siguiente formato:\n dd-mm-aaaa", campo);
}
return resultado;
}
//********************************************************************************************************************
//Respuesta a una mala validacion de un campo
function respMalaValidacion(msg, campo)
{
if (msg!='')
{
if (msg.substring(0, 3) == 'msg') //miramos si es un codigo de mensaje
{
alert(eval(msg));
}
else
{
alert(msg);
}
}
if (campo.type == "text")
{
campo.select();
}
campo.focus();
return false;
}
/*--------------------------funcion marquee js -------------------------------*/
function marquee(a, b, noticia) {
var width = b.width();
var start_pos = a.width();
var end_pos = -width;
var longitudNoticia = noticia.length;
var longitudMarquee = 0;
longitudMarquee = longitudNoticia * 7.4;
var tiempo = 0;
/*tiempo = longitudMarquee * 35; MAS RAPIDO */
tiempo = longitudMarquee * 70;
function scroll() {
if (b.position().left <= -width) {
b.css('left', start_pos);
scroll();
}
else {
time = (parseInt(b.position().left, 10) - end_pos) *
(tiempo / (start_pos - end_pos)); // Increase or decrease speed by changing value 10000 (tiempo)
b.animate({
'left': -width
}, time, 'linear', function() {
scroll();
});
}
}
b.css({
'width': width,
'left': start_pos
});
/*scroll(a, b);*/
scroll();
b.mouseenter(function() { // Remove these lines
b.stop(); //
b.clearQueue(); // if you don't want
}); //
b.mouseleave(function() { // marquee to pause
/* scroll(a, b); */
scroll();//
}); // on mouse over
}
/*--------------------------funcion marquee js -------------------------------*/
function marqueeRapido(a, b, noticia) {
var width = b.width();
var start_pos = a.width();
var end_pos = -width;
var longitudNoticia = noticia.length;
var longitudMarquee = 0;
longitudMarquee = longitudNoticia * 7.4;
var tiempo = 0;
tiempo = longitudMarquee * 5;
/*tiempo = longitudMarquee * 70; MAS LENTO */
function scroll() {
if (b.position().left <= -width) {
b.css('left', start_pos);
scroll();
}
else {
time = (parseInt(b.position().left, 10) - end_pos) *
(tiempo / (start_pos - end_pos)); // Increase or decrease speed by changing value 10000 (tiempo)
b.animate({
'left': -width
}, time, 'linear', function() {
scroll();
});
}
}
b.css({
'width': width,
'left': start_pos
});
/*scroll(a, b);*/
scroll();
b.mouseenter(function() { // Remove these lines
b.stop(); //
b.clearQueue(); // if you don't want
}); //
b.mouseleave(function() { // marquee to pause
/* scroll(a, b); */
scroll();//
}); // on mouse over
}
//********************************************************************************************************************
//Pone la longitud de la noticia por css
function tamanioNoticia(noticia)
{
var longitudNoticia = noticia.length;
var longitudMarquee = 0;
var strLongitud = "";
longitudMarquee = longitudNoticia * 7.4;
strLongitud = "" + (longitudMarquee + 130) + "px";
var css = '' +
'.marquee {' +
'width:' + strLongitud +
'}' +
'';
head = document.head || document.getElementsByTagName('head')[0];
style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
head.appendChild(style);
}
//********************************************************************************************************************
function mostrarPDF(nombrePDF) {
var fileName = nombrePDF;
document.getElementById('dialog').dialog({
modal: true,
title: fileName,
width: 540,
height: 450,
buttons: {
Close: function () {
this.dialog('close');
}
},
open: function () {
var object = "<object data=\"{FileName}\" type=\"application/pdf\" width=\"500px\" height=\"300px\">";
object += "If you are unable to view file, you can download from <a href = \"{FileName}\">here</a>";
object += " or download <a target = \"_blank\" href = \"http://get.adobe.com/reader/\">Adobe PDF Reader</a> to view the file.";
object += "</object>";
object = object.replace(/{FileName}/g, "Files/" + fileName);
document.getElementById('dialog').html(object);
}
});
}
//********************************************************************************************************************
function validarEmail( email ) {
expr = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if ( !expr.test(email) ){
return false;
}else{
return true;
}
}
+51
View File
@@ -0,0 +1,51 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ 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);
%>
<html>
<head>
<title>Control de Horas</title>
</head>
<body>
<script>
var hora_actual = new Date()
hora = hora_actual.getHours();
minutos = hora_actual.getMinutes();
if (hora<10)
hora="0"+hora;
if (minutos<10)
minutos="0"+minutos;
document.write("<b>Hora de JavaScript: </b>");
document.write(hora+":"+minutos)
</script>
<br>
<b>Hora del Calendar: </b><%=calendario.getTime()%>
<br>
<b>Hora del Calendar (con TimeZone): </b><%=calendario.getTime()%>
<br>
<b>Hora del Date: </b><%=fecha%>
</body>
</html>
+35
View File
@@ -0,0 +1,35 @@
function preguntaImp()
{
top.contenidoPrincipal.location.href = '../../html/imp/fin_imprimiendo.html';
}
function imprimirHTML()
{
//imprimimos la pagina....
var NS = (navigator.appName == "Netscape");
var VERSION = parseInt(navigator.appVersion);
alert("Dentro de imprimirHTML");
if (NS || VERSION>4 || document.all)
{
//top.vacio.focus();
//alert("Dentro de IF");
//top.vacio.print()
}
else
{
//alert("Dentro de ELSE");
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(6, 2);
}
setTimeout("preguntaImp();", 3000);
}
function VentanaImpresion(contexto, urlAbsoluta)
{
var vLeft = (screen.availWidth-10-300)/2;
var vTop = (screen.availHeight-100-120)/2;
Vimprimir = window.open(urlAbsoluta,'Imprimir','width=300,height=120,left='+vLeft+',top='+vTop+",menubar=no,scrollbars=no,resizable=yes,location=no,status=no,toolbar=no,directories=no");
}
+160
View File
@@ -0,0 +1,160 @@
//var pathLOCAL = "../../";
//IMPORTANTE:
//El valor de esta variable se debe corresponder con el contexto de la aplicacion
//Si el contexto se cambia a otro distinto de tarisan, es necesario actualizar este valor,
//de lo contrario, las pantallas no se verán correctamente.
var pathLOCAL = "/tarisan/";
if (document.images) {
//bullets del menu de la izq
var bulletAbierto = new Image(); bulletAbierto.src = pathLOCAL+"img/gen_bullet_abierto.gif";
var bulletActivo = new Image(); bulletActivo.src = pathLOCAL+"img/gen_bullet_activo.gif";
var bulletCerrado = new Image(); bulletCerrado.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
var bulletSelect = new Image(); bulletSelect.src = pathLOCAL+"img/gen_bullet_select.gif";
var pbullet = new Image(); pbullet.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
}
var pNG="";
//Las diferentes secciones (menus horizontales)
var SECCION_ADMINISTRADOR = "00";
var SECCION_MEDICOS = "11";
var SECCION_PACIENTES = "12";
var SECCION_SALIR = "13";
function seccionesAMostrar( pNG )
{
var mostrarSeccion = new Array();
mostrarSeccion[MEDICO]= true; //Siempre se muestra
mostrarSeccion[PACIENTE]= false;
if( pNG.indexOf("MED") != -1 )
mostrarSeccion[MEDICO]= true;
if( pNG.indexOf("PAC") != -1 )
mostrarSeccion[PACIENTE]= true;
if( pNG.indexOf("ADM") != -1 )
mostrarSeccion[ADMINISTRADOR]= true;
return mostrarSeccion;
}
// Inicializamos x,y
var x = null;
var queryValues = getArgs();
if (queryValues.x){x = queryValues.x - 0};
var y=null;
//***************************************
function getPerfil()
{
var perfil = "";
perfil = getCookie("PERFIL");
if (!perfil)
{
perfil = ESPECIALISTA;//El perfil por defecto
setCookie("PERFIL",perfil);
}
return perfil;
}
function setCookie(nombre, valor) {
document.cookie = nombre + "=" + escape(valor);
}
function getCookie(nombre) {
var buscamos = nombre + "=";
if (document.cookie.length > 0)
{
i = document.cookie.indexOf(buscamos);
if (i != -1)
{
i += buscamos.length;
j = document.cookie.indexOf(";", i);
if (j == -1)
j = document.cookie.length;
return unescape(document.cookie.substring(i,j));
}
}
}
function cambiar(nombre,estado) {
if (document.images)
eval("document."+nombre+".src = "+estado+".src");
}
function getSeccion()
{
var seccionActual = "";
seccionActual = getCookie("SECCION");
if (!seccionActual)
{
seccionActual = SECCION_MEDICOS;//La seccion por defecto
setCookie("SECCION",seccionActual);
}
return seccionActual;
}
function setSeccion( idSeccion )
{
var seccionActual = "";
seccionActual = getCookie("SECCION");
if ( seccionActual != idSeccion )
{
if(idSeccion==SECCION_MEDICOS)
{
document.location.href = pathLOCAL + 'servlet/GestorMedicos?OPCION=4';
}
else if(idSeccion==SECCION_PACIENTES)
{
document.location.href = pathLOCAL + 'servlet/GestorPacientes?OPCION=0';
}
else if(idSeccion==SECCION_ADMINISTRADOR)
{
document.location.href = pathLOCAL + 'servlet/GestorAdministracion?OPCION=1';
}
else
{
document.location.href = pathLOCAL + 'servlet/Logout';
}
}
}
function getArgs() {
var args = new Object();
var query = location.search.substring(1); // quitamos el ? a la cadena
var pairs;
// El parámetro URL es especial, debe venir el último y a partir de él
//ya no se procesarán más parámetros, ya que le parámetro url puede tener
//a su vez sus propios parámetros.
var posUrl = query.indexOf("url=");
if (posUrl == -1)
posUrl = query.indexOf("url=");
if (posUrl > -1)
{
//Se ha encontrado el parámetro URL.
args["url"] = query.substring(posUrl+4);
query = query.substring(0,posUrl);
}
pairs = query.split("&"); // troceamos la cadena por los &
for (var i=0; i < pairs.length; i++) {
var pos = pairs[i].indexOf('='); // Busca nombre=valor
if (pos == -1) continue;
var argName = pairs[i].substring(0,pos); // el nombre
var argValue = pairs[i].substring(pos+1); // el valor
args [argName] = unescape(argValue); // lo guarda como propiedad
}
return args;
}
+10351
View File
File diff suppressed because it is too large Load Diff
+16617
View File
File diff suppressed because it is too large Load Diff
+13
View File
File diff suppressed because one or more lines are too long
+8
View File
File diff suppressed because one or more lines are too long
+154
View File
@@ -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" %>
<HTML>
<BODY>
<%
Date fecha = null;
SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss");
Calendar calendario = Calendar.getInstance();
out.print("<hr>");
out.print("Fecha = " + sdf.format(calendario.getTime()));
out.print("<hr>");
HttpSession miSession = request.getSession(true);
Object valor = null;
int total = 0;
Vector salidaListado;
StringBuffer elementoListado;
String nombre;
Enumeration listaSession = miSession.getAttributeNames();
out.print("<br>");
out.print("<b>LISTADO DE LOS OBJETOS DE SESI&Oacute;N</b><br>");
if((listaSession != null) && (listaSession.hasMoreElements()))
{
out.println("<font size=-1><ul>" );
ByteArrayOutputStream o;
ObjectOutputStream buf;
boolean serial;
salidaListado = new Vector();
for(; listaSession.hasMoreElements();)
{
serial = false;
nombre = (String)listaSession.nextElement();
elementoListado = new StringBuffer();
elementoListado.append("<li><b>");
elementoListado.append(nombre);
elementoListado.append("</b>");
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("</font></ul>" );
out.println( "<b>TOTAL(aproximado) = " + total + " bytes</b>" );
}
else
{
out.println( "No existen objetos almacenados en la sesión" );
}
out.print("<hr>");
out.print("<br>");
out.print("<b>LISTADO DE LAS COOKIES</b><br>");
Cookie[] listaCookies = request.getCookies();
if((listaCookies != null) && (listaCookies.length > 0))
{
Cookie unaCookie;
int duracion;
salidaListado = new Vector();
out.println("<font size=-1><ul>" );
for(int ind = 0; ind < listaCookies.length; ind++)
{
unaCookie = listaCookies[ind];
elementoListado = new StringBuffer();
elementoListado.append("<li><b>");
elementoListado.append(unaCookie.getName());
elementoListado.append("</b> --> ");
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("</font></ul>" );
}
else
{
out.println( "No existen cookies" );
}
%>
</BODY>
</HTML>
+278
View File
@@ -0,0 +1,278 @@
// ******************************************
// Cargamos las opciones del menu en un ARRAY
// ******************************************
// Inicializar las variables para la funci&oacute;n generaPath
var ADMINISTRADOR = "00";
var CABECERA = "01";
var ANALISTA = "02";
var ESPECIALISTA = "03";
var REHABPOD = "04";
var ATS = "05";
var ESTOMA = "06";
setCookie("SECCION", SECCION_ADMINISTRADOR);
// el 1er parametro es el texto que se muestra
// el 2o parametro es la URL a la que va el link
// el 3er parametro son los perfiles que admite esa opcion
// escribimos el 1er nivel de navegacion
var menu = new Array();
// Administraci&oacute;n del sistema
menu[0] = ["Usuarios", pathLOCAL + "jsp/adm/lista_usuarios.jsp?x=0&pagina=1", "00"];
menu[1] = ["Password", pathLOCAL + "jsp/med/password.jsp?x=1", "00"];
menu[2] = ["Mantenimiento Autorizaciones", pathLOCAL + "jsp/adm/mto_taconaut.jsp?x=2&pagina=1", "00"];
menu[3] = ["Mantenimiento Niveles Analiticos", pathLOCAL + "jsp/adm/mto_analiticas.jsp?x=3", "00"];
menu[4] = ["Mantenimiento Peticiones", pathLOCAL + "jsp/adm/mto_peticiones.jsp?x=4", "00"];
menu[5] = ["Mantenimiento actos imputados", pathLOCAL + "jsp/adm/mto_tamovext.jsp?x=5", "00"];
menu[6] = ["Poner Cambios en Produccion", pathLOCAL + "jsp/adm/poner_en_produccion.jsp?x=6", "00"];
//precargamos las imagenes
//if (document.images) {
//bullets del menu de la izq
var bulletAbierto = new Image(); bulletAbierto.src = pathLOCAL+"img/gen_bullet_abierto.gif";
var bulletActivo = new Image(); bulletActivo.src = pathLOCAL+"img/gen_bullet_activo.gif";
var bulletCerrado = new Image(); bulletCerrado.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
var bulletSelect = new Image(); bulletSelect.src = pathLOCAL+"img/gen_bullet_select.gif";
var pbullet = new Image(); pbullet.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
//}
var stContenedor = (document.layers)?"contenedorMenu.document.":"";
var esCargado = false;
var ponImgs = false;
var iContador = 0;
window.onload = Cargado;
function Cargado(){
esCargado = true;
}
// pNG --> perfilNavegacionGestion puede ser | 01 | 02 | 03 |
//Funci&oacute;n que determina si se escribe una opci&oacute;n de menú
//strAcceso debe contener las opciones de acceso de la opci&oacute;n
//a escribir (el tercer parámetro cuando se declaran las opciones).
//**** IR CONSTRUYENDO EL IF PARA LUEGO HACER UN EVAL ****
//EJ: Si strAcceso fuese |05|01&T2|
//El resultado seráa un eval de la cadena:
//((pNG.indexOf("05")) || ((pNG.indexOf("01")) && (pNG.indexOf("T2")))
function tiene(churroOpciones,condicion){
if (churroOpciones.indexOf("|"+condicion+"|")>=0)
return true;
else
return false;
}
function notiene(churroOpciones,condicion){
condicion=condicion.substring(1, condicion.length);
if (churroOpciones.indexOf("|"+condicion+"|")<0)
return true;
else
return false;
}
function escribirOpcionMenu(strAcceso){
var resultado = true;
var strCadenaBooleana = "";
//Troceamos el churro de accesos
var strVectorAcceso = strAcceso.split("|");
for (var i=0; i<strVectorAcceso.length; i++)
{
var strOpcion = strVectorAcceso[i];
if (i!=0)
strCadenaBooleana = strCadenaBooleana + " || ";
if (strOpcion.indexOf("&") > -1)
{
var strSubVectorAcceso2 = strOpcion.split("&");
var booPrimeraEntradaY = true;
strCadenaBooleana = strCadenaBooleana + " (";
for (var j=0;j<strSubVectorAcceso2.length;j++)
{
strOpcion = strSubVectorAcceso2[j];
if (j!=0)
strCadenaBooleana = strCadenaBooleana + " && ";
if (strOpcion.substring(0, 1) == "!")
strCadenaBooleana = strCadenaBooleana + "no";
strCadenaBooleana = strCadenaBooleana + "tiene(pNG,'"+ strOpcion + "')";
}
strCadenaBooleana = strCadenaBooleana + ") ";
}
else
{
if (strOpcion.substring(0, 1) == "!")
strCadenaBooleana = strCadenaBooleana + "no";
strCadenaBooleana = strCadenaBooleana + "tiene(pNG,'"+ strOpcion + "')";
}
}
if (strCadenaBooleana.length > 0)
resultado = eval(strCadenaBooleana);
else
resultado = false;
return resultado;
}
function construirMenuGst(){
var separador = '<tr valign="top"><td colspan="2"><img src="' + './img/sp.gif" width="1" height="8" border="0"></td></tr>';
var stOpcion = '<table cellpadding="0" cellspacing="0" border="0" width="165">\n';
for (i=0 ; i<menu.length; i++){
if ( escribirOpcionMenu(menu[i][2]) ){
if (i==x){
if (menu[i][1].indexOf("x=")>-1)
parametros = "";
else
parametros = "?x="+i;
stOpcion += '<tr valign="top">';
stOpcion += ' <td width="16" class="menuOnSelect"><img src="' + './img/sp.gif" name="bullet' + i + '" width="16" height="12" border="0"></td>\n';
if(menu[i][1]==location.pathname){
stOpcion += ' <td width="150" class="menuOnSelect"><a href="javascript:reescribirMenuGst('+i+');" class="menuOnSelect" onMouseOver="self.status=\''+ menu[i][0].toUpperCase() +'\';return true;" onMouseOut="self.status=\'\';return true;"><b>' + menu[i][0].toUpperCase() + '</b></a><br>\n';
}else
stOpcion += ' <td width="150" class="menuOnSelect"><a href=' + menu[i][1] +' class="menuOnSelect" onMouseOver="self.status=\''+ menu[i][0].toUpperCase() +'\';return true;" onMouseOut="self.status=\'\';return true;"><b>' + menu[i][0].toUpperCase() + '</b></a><br>\n';
stOpcion += "</td></tr>" + separador;
}
else {
if (menu[i][1].indexOf("x=")>-1)
parametros = "";
else
parametros = "?x="+i;
stOpcion += '<tr valign="top">';
stOpcion += ' <td width="16" class="menuBack"><img src="' + './img/sp.gif" name="bullet' + i +'" width="16" height="12" border="0"></td>\n';
if(menu[i][1]==location.pathname)
stOpcion += " <td width='150' class='menuBack'><a href=\"javascript:reescribirMenuGst("+i+");\" onMouseOver=\"cambiar('bullet" + i +"','bulletActivo');self.status='"+menu[i][0].toUpperCase()+"'; return true;\" onMouseOut=\"cambiar('bullet" + i +"','bulletCerrado');self.status=''; return true;\" class=\"menuOff\"><b>" + menu[i][0].toUpperCase() + "</b></a>";
else
stOpcion += " <td width='150' class='menuBack'><a href=" + menu[i][1] +" onMouseOver=\"cambiar('bullet" + i +"','bulletActivo');self.status='"+menu[i][0].toUpperCase()+"'; return true;\" onMouseOut=\"cambiar('bullet" + i +"','bulletCerrado');self.status=''; return true;\" class=\"menuOff\"><b>" + menu[i][0].toUpperCase() + "</b></a>";
stOpcion += "</td></tr>" + separador;
}
}
}
stOpcion += "</table>";
return stOpcion;
}
function escribirMenuGst(){
var stCapaMenu = (document.layers)?'<div id="contenedorMenu" style="position:relative;top:0px;left:0px;">\n\n':'<div id="contenedorMenu">\n\n';
stCapaMenu += (document.layers)?'<img src="/img/gen_bullet_cerrado.gif" width="165" height="1">':construirMenuGst();
stCapaMenu += '</div>';
document.write(stCapaMenu);
//hacemos un retardo si navega con un ie 4.x
if (document.all && navigator.appVersion.indexOf("MSIE 4.")>=0 )
setTimeout('reescribirMenuGst(x,y)',5800);
else
reescribirMenuGst(x,y);
}
function reescribirMenuGst(k,j){
x = k;
if((j<0) ||(j==null))
y = null;
else
y = j;
var stMenuDesplegado = "";
if (document.layers) {
if(document.contenedorMenu){
stMenuDesplegado = construirMenuGst();
document.layers["contenedorMenu"].document.open();
stHTML = '<layer top="0" left="0">'+stMenuDesplegado+'</layer>';
if(esCargado){
document.layers["contenedorMenu"].document.write(stHTML);
ponImgs = true;
}
document.layers["contenedorMenu"].document.close();
if(!esCargado){
iContador +=1;
if(iContador > 10)
esCargado = true;
setTimeout('reescribirMenuGst(x,y)',800);
}
}
else
setTimeout('reescribirMenuGst(x,y)',800);
}
else if (document.all) {
stMenuDesplegado = construirMenuGst();
document.all["contenedorMenu"].innerHTML = stMenuDesplegado;
ponImgs = true;
}
else if (document.getElementById) {
stMenuDesplegado = construirMenuGst();
document.getElementById("contenedorMenu").innerHTML = stMenuDesplegado;
ponImgs = true;
}
if(ponImgs){
for (i=0 ; i<menu.length; i++){
if ( escribirOpcionMenu(menu[i][2]) ){
if(i==x){
if (y<0 || y==null)
cambiar("bullet" + i,"bulletSelect");
else
cambiar("bullet" + i,"bulletAbierto");
/*if (!(subMenu[x]==null))
{
for (j=0 ; j<subMenu[x].length; j++)
{
if (escribirOpcionMenu(subMenu[x][j][2]))
{
if (j==y)
{
cambiar("pbullet" + i +j,"pbullet");
cambiar("sbullet" + i +j,"bulletSelect");
}
else{
cambiar("pbullet" + i +j,"pbullet");
cambiar("sbullet" + i +j,"bulletCerrado");
}
}
}
}*/
}
else
cambiar("bullet" + i,"bulletCerrado");
}
}
}
}
+297
View File
@@ -0,0 +1,297 @@
// ******************************************
// Cargamos las opciones del menu en un ARRAY
// ******************************************
// Inicializar las variables para la funci&oacute;n generaPath
var ADMINISTRADOR = "00";
var CABECERA = "01";
var ANALISTA = "02";
var ESPECIALISTA = "03";
var REHABPOD = "04";
var ATS = "05";
var ESTOMA = "06";
var ODON = "07";
var RADIOLOGO = "08";
setCookie("SECCION", SECCION_MEDICOS);
// el 1er parametro es el texto que se muestra
// el 2o parametro es la URL a la que va el link
// el 3er parametro son los perfiles que admite esa opcion
// escribimos el 1er nivel de navegacion
var menu = new Array();
// Gestion medicos
menu[0] = ["Cabecera", pathLOCAL + "jsp/med/cabecera.jsp?x=0", "01|02|03|04|05|06|07|08"];
menu[1] = ["Password", pathLOCAL + "jsp/med/password.jsp?x=1", "00|01|02|03|04|05|06|07|08"];
menu[2] = ["Actos M\u00E9dicos", pathLOCAL + "jsp/med/actos.jsp?x=2&pagina=1", "01|02|03|04|05|06|08"];
menu[3] = ["Liquidaci\u00F3n Actos Tarisan", pathLOCAL + "jsp/med/liquidacion.jsp?x=3", "01|03|04|05|06|07"];
menu[4] = ["Liquidaci\u00F3n Actos Tarisan", pathLOCAL + "jsp/med/liquidacion_analista.jsp?x=4&pagina=1", "02"];
menu[5] = ["Liquidaci\u00F3n Actos Tarisan", pathLOCAL + "jsp/med/liquidacion_radiologo.jsp?x=5&pagina=1", "08"];
menu[6] = ["Detalle Pacientes", pathLOCAL + "jsp/med/detallePacientes.jsp?x=6&pagina=1", "01|02|03|04|05|06|07|08"];
menu[7] = ["I.R.P.F.", pathLOCAL + "jsp/med/detalleIRPF.jsp?x=7&pagina=1", "01|02|03|04|05|06|08"];
menu[8] = ["Medicamentos", pathLOCAL + "jsp/med/medicamentos.jsp?x=8&pagina=1", "01|03"];
menu[9] = ["Prescripciones", pathLOCAL + "jsp/med/prescripciones.jsp?x=9&pagina=1", "01|03"];
menu[10] = ["An\u00E1lisis", pathLOCAL + "jsp/med/analisis.jsp?x=10&pagina=1", "01|03"];
menu[11] = ["Anatomia patol\u00F3gica", pathLOCAL + "jsp/med/ap.jsp?x=11&pagina=1", "01|03"];
menu[12] = ["Igualados", pathLOCAL + "jsp/med/igualados.jsp?x=12&pagina=1", "01"];
menu[13] = ["Gesti\u00F3n Perfiles", pathLOCAL + "jsp/med/gestor_perfiles.jsp?x=13&pagina=1", "01|03"];
menu[14] = ["Hist\u00F3rico liquidaciones", pathLOCAL + "jsp/med/historico_liquidacion.jsp?x=14", "01|02|03|04|05|06|07|08"];
menu[15] = ["Volantes Ingreso o CMA", pathLOCAL + "jsp/med/historico_volantes.jsp?x=15", "00"];
menu[16] = ["Prescripciones ATS", pathLOCAL + "jsp/med/historico_ats.jsp?x=16", "01|03|06"];
//menu[15] = ["Detalle An\u00E1lisis Capturados", pathLOCAL + "jsp/med/detalle_analista.jsp?x=15", "02"];
menu[17] = ["Imprimir An\u00E1lisis Capturados", pathLOCAL + "jsp/med/peticiones_capturadas.jsp?x=17&pagina=1", "02|08"];
menu[18] = ["Determinaciones Anal\u00edticas", pathLOCAL + "jsp/med/determinaciones.jsp?x=18&pagina=1", "01|02|03|04|05|06|07"];
menu[19] = ["Noticias", pathLOCAL + "jsp/med/noticias.jsp?x=19&pagina=1", "01|02|03|04|05|06|07|08"];
menu[20] = ["Incidencia", pathLOCAL + "jsp/med/incidencia.jsp?x=20&limpiarAdjuntos=1", "01|02|03|04|05|06|07|08"];
//precargamos las imagenes
//if (document.images) {
//bullets del menu de la izq
var bulletAbierto = new Image(); bulletAbierto.src = pathLOCAL+"img/gen_bullet_abierto.gif";
var bulletActivo = new Image(); bulletActivo.src = pathLOCAL+"img/gen_bullet_activo.gif";
var bulletCerrado = new Image(); bulletCerrado.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
var bulletSelect = new Image(); bulletSelect.src = pathLOCAL+"img/gen_bullet_select.gif";
var pbullet = new Image(); pbullet.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
//}
var stContenedor = (document.layers)?"contenedorMenu.document.":"";
var esCargado = false;
var ponImgs = false;
var iContador = 0;
window.onload = Cargado;
function Cargado(){
esCargado = true;
}
// pNG --> perfilNavegacionGestion puede ser | 01 | 02 | 03 |
//Funci&oacute;n que determina si se escribe una opci&oacute;n de menú
//strAcceso debe contener las opciones de acceso de la opci&oacute;n
//a escribir (el tercer parámetro cuando se declaran las opciones).
//**** IR CONSTRUYENDO EL IF PARA LUEGO HACER UN EVAL ****
//EJ: Si strAcceso fuese |05|01&T2|
//El resultado seráa un eval de la cadena:
//((pNG.indexOf("05")) || ((pNG.indexOf("01")) && (pNG.indexOf("T2")))
function tiene(churroOpciones,condicion){
if (churroOpciones.indexOf("|"+condicion+"|")>=0)
return true;
else
return false;
}
function notiene(churroOpciones,condicion){
condicion=condicion.substring(1, condicion.length);
if (churroOpciones.indexOf("|"+condicion+"|")<0)
return true;
else
return false;
}
function escribirOpcionMenu(strAcceso){
var resultado = true;
var strCadenaBooleana = "";
//Troceamos el churro de accesos
var strVectorAcceso = strAcceso.split("|");
for (var i=0; i<strVectorAcceso.length; i++)
{
var strOpcion = strVectorAcceso[i];
if (i!=0)
strCadenaBooleana = strCadenaBooleana + " || ";
if (strOpcion.indexOf("&") > -1)
{
var strSubVectorAcceso2 = strOpcion.split("&");
var booPrimeraEntradaY = true;
strCadenaBooleana = strCadenaBooleana + " (";
for (var j=0;j<strSubVectorAcceso2.length;j++)
{
strOpcion = strSubVectorAcceso2[j];
if (j!=0)
strCadenaBooleana = strCadenaBooleana + " && ";
if (strOpcion.substring(0, 1) == "!")
strCadenaBooleana = strCadenaBooleana + "no";
strCadenaBooleana = strCadenaBooleana + "tiene(pNG,'"+ strOpcion + "')";
}
strCadenaBooleana = strCadenaBooleana + ") ";
}
else
{
if (strOpcion.substring(0, 1) == "!")
strCadenaBooleana = strCadenaBooleana + "no";
strCadenaBooleana = strCadenaBooleana + "tiene(pNG,'"+ strOpcion + "')";
}
}
if (strCadenaBooleana.length > 0)
resultado = eval(strCadenaBooleana);
else
resultado = false;
return resultado;
}
function construirMenuGst(){
var separador = '<tr valign="top"><td colspan="2"><img src="' + './img/sp.gif" width="1" height="8" border="0"></td></tr>';
var stOpcion = '<table cellpadding="0" cellspacing="0" border="0" width="165">\n';
for (i=0 ; i<menu.length; i++){
if ( escribirOpcionMenu(menu[i][2]) ){
if (i==x){
if (menu[i][1].indexOf("x=")>-1)
parametros = "";
else
parametros = "?x="+i;
stOpcion += '<tr valign="top">';
stOpcion += ' <td width="16" class="menuOnSelect"><img src="' + './img/sp.gif" name="bullet' + i + '" width="16" height="12" border="0"></td>\n';
if(menu[i][1]==location.pathname){
stOpcion += ' <td width="150" class="menuOnSelect"><a href="javascript:reescribirMenuGst('+i+');" class="menuOnSelect" onMouseOver="self.status=\''+ menu[i][0].toUpperCase() +'\';return true;" onMouseOut="self.status=\'\';return true;"><b>' + menu[i][0].toUpperCase() + '</b></a><br>\n';
}else
stOpcion += ' <td width="150" class="menuOnSelect"><a href=' + menu[i][1] +' class="menuOnSelect" onMouseOver="self.status=\''+ menu[i][0].toUpperCase() +'\';return true;" onMouseOut="self.status=\'\';return true;"><b>' + menu[i][0].toUpperCase() + '</b></a><br>\n';
stOpcion += "</td></tr>" + separador;
}
else {
if (menu[i][1].indexOf("x=")>-1)
parametros = "";
else
parametros = "?x="+i;
stOpcion += '<tr valign="top">';
stOpcion += ' <td width="16" class="menuBack"><img src="' + './img/sp.gif" name="bullet' + i +'" width="16" height="12" border="0"></td>\n';
if(menu[i][1]==location.pathname)
stOpcion += " <td width='150' class='menuBack'><a href=\"javascript:reescribirMenuGst("+i+");\" onMouseOver=\"cambiar('bullet" + i +"','bulletActivo');self.status='"+menu[i][0].toUpperCase()+"'; return true;\" onMouseOut=\"cambiar('bullet" + i +"','bulletCerrado');self.status=''; return true;\" class=\"menuOff\"><b>" + menu[i][0].toUpperCase() + "</b></a>";
else
stOpcion += " <td width='150' class='menuBack'><a href=" + menu[i][1] +" onMouseOver=\"cambiar('bullet" + i +"','bulletActivo');self.status='"+menu[i][0].toUpperCase()+"'; return true;\" onMouseOut=\"cambiar('bullet" + i +"','bulletCerrado');self.status=''; return true;\" class=\"menuOff\"><b>" + menu[i][0].toUpperCase() + "</b></a>";
stOpcion += "</td></tr>" + separador;
}
}
}
stOpcion += "</table>";
return stOpcion;
}
function escribirMenuGst(){
var stCapaMenu = (document.layers)?'<div id="contenedorMenu" style="position:relative;top:0px;left:0px;">\n\n':'<div id="contenedorMenu">\n\n';
stCapaMenu += (document.layers)?'<img src="/img/gen_bullet_cerrado.gif" width="165" height="1">':construirMenuGst();
stCapaMenu += '</div>';
document.write(stCapaMenu);
//hacemos un retardo si navega con un ie 4.x
if (document.all && navigator.appVersion.indexOf("MSIE 4.")>=0 )
setTimeout('reescribirMenuGst(x,y)',5800);
else
reescribirMenuGst(x,y);
}
function reescribirMenuGst(k,j){
x = k;
if((j<0) ||(j==null))
y = null;
else
y = j;
var stMenuDesplegado = "";
if (document.layers) {
if(document.contenedorMenu){
stMenuDesplegado = construirMenuGst();
document.layers["contenedorMenu"].document.open();
stHTML = '<layer top="0" left="0">'+stMenuDesplegado+'</layer>';
if(esCargado){
document.layers["contenedorMenu"].document.write(stHTML);
ponImgs = true;
}
document.layers["contenedorMenu"].document.close();
if(!esCargado){
iContador +=1;
if(iContador > 10)
esCargado = true;
setTimeout('reescribirMenuGst(x,y)',800);
}
}
else
setTimeout('reescribirMenuGst(x,y)',800);
}
else if (document.all) {
stMenuDesplegado = construirMenuGst();
document.all["contenedorMenu"].innerHTML = stMenuDesplegado;
ponImgs = true;
}
else if (document.getElementById) {
stMenuDesplegado = construirMenuGst();
document.getElementById("contenedorMenu").innerHTML = stMenuDesplegado;
ponImgs = true;
}
if(ponImgs){
for (i=0 ; i<menu.length; i++){
if ( escribirOpcionMenu(menu[i][2]) ){
if(i==x){
if (y<0 || y==null)
cambiar("bullet" + i,"bulletSelect");
else
cambiar("bullet" + i,"bulletAbierto");
/*if (!(subMenu[x]==null))
{
for (j=0 ; j<subMenu[x].length; j++)
{
if (escribirOpcionMenu(subMenu[x][j][2]))
{
if (j==y)
{
cambiar("pbullet" + i +j,"pbullet");
cambiar("sbullet" + i +j,"bulletSelect");
}
else{
cambiar("pbullet" + i +j,"pbullet");
cambiar("sbullet" + i +j,"bulletCerrado");
}
}
}
}*/
}
else
cambiar("bullet" + i,"bulletCerrado");
}
}
}
}
+306
View File
@@ -0,0 +1,306 @@
// ******************************************
// Cargamos las opciones del menu en un ARRAY
// ******************************************
// Inicializar las variables para la función generaPath
var ADMINISTRADOR = "00";
var CABECERA = "01";
var ANALISTA = "02";
var ESPECIALISTA = "03";
var REHABPOD = "04";
var ATS = "05";
var ESTOMA = "06";
var ODON = "07";
var RADIOLOGO = "08";
setCookie( "SECCION",SECCION_PACIENTES);
// el 1er parametro es el texto que se muestra
// el 2o parametro es la URL a la que va el link
// el 3er parametro son los perfiles que admite esa opcion
// escribimos el 1er nivel de navegacion
var menu = new Array();
// Gestion pacientes
/*menu[0] = ["Facturaci\u00F3n", pathLOCAL + "jsp/pac/facturacion.jsp?x=0&pagina=1", "01|03|06"];
menu[1] = ["Facturaci\u00F3n", pathLOCAL + "jsp/pac/facturacion_rehabpod.jsp?x=1&pagina=1", "04|05"];
menu[2] = ["Facturaci\u00F3n", pathLOCAL + "jsp/pac/facturacion_odon.jsp?x=2&pagina=1", "07"];
menu[3] = ["Petici\u00F3n Autorizaci\u00F3n", pathLOCAL + "jsp/pac/autorizacion.jsp?x=3&pagina=1", "01|03"];
menu[4] = ["Anal\u00EDtica", pathLOCAL + "jsp/pac/analitica.jsp?x=4&pagina=1", "01|03"];
menu[5] = ["Radiodiagn\u00F3stico", pathLOCAL + "jsp/pac/diagnostico.jsp?x=5", "01|03|06"];
menu[6] = ["Anatom\u00EDa Patol\u00F3gica", pathLOCAL + "jsp/pac/anatomia.jsp?x=6&pagina=1", "01|03|06"];
menu[7] = ["Otras Peticiones", pathLOCAL + "jsp/pac/peticiones.jsp?x=7&pagina=1", "01|03"];
menu[8] = ["Recetas", pathLOCAL + "jsp/pac/recetas.jsp?x=8&pagina=1", "01|03|06|07|08"];
menu[9] = ["Historial de Paciente", pathLOCAL + "jsp/pac/historia.jsp?x=9&pagina=1", "01|03|04|05|06|07|08"];
menu[10] = ["Analista", pathLOCAL + "jsp/pac/analista.jsp?x=10", "02"];
menu[11] = ["Volante ingreso o CMA", pathLOCAL + "jsp/pac/volante_medico.jsp?x=11", "00"];
//menu[10] = ["Volante ingreso", pathLOCAL + "jsp/pac/volante_medico.jsp?x=10", "00|01|02|03|04|05|06|07|08"];
menu[12] = ["Prescripci\u00F3n ATS", pathLOCAL + "jsp/pac/ats.jsp?x=12&pagina=1", "01|03|06"];
menu[13] = ["Detalle de Pacientes", pathLOCAL + "jsp/pac/detallePacientes.jsp?x=13&pagina=1&imp=1", "01|03|04|05|06|07|08"];
menu[14] = ["Cambio Paciente", pathLOCAL + "servlet/GestorPacientes?OPCION=0", "01|02|03|04|05|06|07|08"];*/
menu[0] = ["Facturaci\u00F3n", pathLOCAL + "jsp/pac/facturacion.jsp?x=0&pagina=1", "01|03|06"];
menu[1] = ["Facturaci\u00F3n", pathLOCAL + "jsp/pac/facturacion_rehabpod.jsp?x=1&pagina=1", "04|05"];
menu[2] = ["Facturaci\u00F3n", pathLOCAL + "jsp/pac/facturacion_odon.jsp?x=2&pagina=1", "07"];
menu[3] = ["Petici\u00F3n Autorizaci\u00F3n", pathLOCAL + "jsp/pac/autorizaciones.jsp?x=3&pagina=1", "01|03"];
menu[4] = ["Anal\u00EDtica", pathLOCAL + "jsp/pac/analitica.jsp?x=4&pagina=1", "01|03"];
menu[5] = ["Radiodiagn\u00F3stico", pathLOCAL + "jsp/pac/diagnostico.jsp?x=5", "01|03|06"];
menu[6] = ["Anatom\u00EDa Patol\u00F3gica", pathLOCAL + "jsp/pac/anatomia.jsp?x=6&pagina=1", "01|03"];
menu[7] = ["Otras Peticiones", pathLOCAL + "jsp/pac/peticiones.jsp?x=7&pagina=1", "01|03"];
menu[8] = ["Recetas", pathLOCAL + "jsp/pac/recetas.jsp?x=8&pagina=1", "01|03|06|07"]; /* |08*/
menu[9] = ["Historial de Paciente", pathLOCAL + "jsp/pac/historia.jsp?x=9&pagina=1", "01|03|04|05|06|07"]; /* |08*/
menu[10] = ["Analista", pathLOCAL + "jsp/pac/analista.jsp?x=10", "02"];
menu[11] = ["Radi\u00F3logo", pathLOCAL + "jsp/pac/radiologo.jsp?x=11", "08"];
menu[12] = ["Volante ingreso o CMA", pathLOCAL + "jsp/pac/volante_medico.jsp?x=12", "00"];
//menu[10] = ["Volante ingreso", pathLOCAL + "jsp/pac/volante_medico.jsp?x=10", "00|01|02|03|04|05|06|07|08"];
menu[13] = ["Prescripci\u00F3n ATS", pathLOCAL + "jsp/pac/ats.jsp?x=13&pagina=1", "01|03|06"];
menu[14] = ["Detalle de Pacientes", pathLOCAL + "jsp/pac/detallePacientes.jsp?x=14&pagina=1&imp=1", "01|03|04|05|06|07"]; /* |08*/
menu[15] = ["Cambio Paciente", pathLOCAL + "servlet/GestorPacientes?OPCION=0", "01|02|03|04|05|06|07|08"];
//precargamos las imagenes
//if (document.images) {
//bullets del menu de la izq
var bulletAbierto = new Image(); bulletAbierto.src = pathLOCAL+"img/gen_bullet_abierto.gif";
var bulletActivo = new Image(); bulletActivo.src = pathLOCAL+"img/gen_bullet_activo.gif";
var bulletCerrado = new Image(); bulletCerrado.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
var bulletSelect = new Image(); bulletSelect.src = pathLOCAL+"img/gen_bullet_select.gif";
var pbullet = new Image(); pbullet.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
//}
var stContenedor = (document.layers)?"contenedorMenu.document.":"";
var esCargado = false;
var ponImgs = false;
var iContador = 0;
window.onload = Cargado;
function Cargado(){
esCargado = true;
}
// pNG --> perfilNavegacionGestion puede ser | 01 | 02 | 03 |
//Función que determina si se escribe una opción de menú
//strAcceso debe contener las opciones de acceso de la opción
//a escribir (el tercer parámetro cuando se declaran las opciones).
//**** IR CONSTRUYENDO EL IF PARA LUEGO HACER UN EVAL ****
//EJ: Si strAcceso fuese |05|01&T2|
//El resultado seráa un eval de la cadena:
//((pNG.indexOf("05")) || ((pNG.indexOf("01")) && (pNG.indexOf("T2")))
function tiene(churroOpciones,condicion){
if (churroOpciones.indexOf("|"+condicion+"|")>=0)
return true;
else
return false;
}
function notiene(churroOpciones,condicion){
condicion=condicion.substring(1, condicion.length);
if (churroOpciones.indexOf("|"+condicion+"|")<0)
return true;
else
return false;
}
function escribirOpcionMenu(strAcceso){
var resultado = true;
var strCadenaBooleana = "";
//Troceamos el churro de accesos
var strVectorAcceso = strAcceso.split("|");
for (var i=0; i<strVectorAcceso.length; i++)
{
var strOpcion = strVectorAcceso[i];
if (i!=0)
strCadenaBooleana = strCadenaBooleana + " || ";
if (strOpcion.indexOf("&") > -1)
{
var strSubVectorAcceso2 = strOpcion.split("&");
var booPrimeraEntradaY = true;
strCadenaBooleana = strCadenaBooleana + " (";
for (var j=0;j<strSubVectorAcceso2.length;j++)
{
strOpcion = strSubVectorAcceso2[j];
if (j!=0)
strCadenaBooleana = strCadenaBooleana + " && ";
if (strOpcion.substring(0, 1) == "!")
strCadenaBooleana = strCadenaBooleana + "no";
strCadenaBooleana = strCadenaBooleana + "tiene(pNG,'"+ strOpcion + "')";
}
strCadenaBooleana = strCadenaBooleana + ") ";
}
else
{
if (strOpcion.substring(0, 1) == "!")
strCadenaBooleana = strCadenaBooleana + "no";
strCadenaBooleana = strCadenaBooleana + "tiene(pNG,'"+ strOpcion + "')";
}
}
if (strCadenaBooleana.length > 0)
resultado = eval(strCadenaBooleana);
else
resultado = false;
return resultado;
}
function construirMenuGst(){
/*var separador = '<tr valign="top"><td colspan="2"><img src="' + './img/sp.gif" width="1" height="8" border="0"></td></tr>';*/
var separador = '<tr valign="top"><td colspan="2"><img src="' + pathLOCAL + '/img/sp.gif" width="1" height="8" border="0"></td></tr>';
var stOpcion = '<table cellpadding="0" cellspacing="0" border="0" width="165">\n';
for (i=0 ; i<menu.length; i++){
if ( escribirOpcionMenu(menu[i][2]) ){
if (i==x){
stOpcion += '<tr valign="top">';
stOpcion += ' <td width="16" class="menuOnSelect"><img src="' + './img/sp.gif" name="bullet' + i + '" width="16" height="12" border="0"></td>\n';
if(menu[i][1]==location.pathname){
stOpcion += ' <td width="150" class="menuOnSelect"><a href="javascript:reescribirMenuGst('+i+');" class="menuOnSelect" onMouseOver="self.status=\''+ menu[i][0].toUpperCase() +'\';return true;" onMouseOut="self.status=\'\';return true;"><b>' + menu[i][0].toUpperCase() + '</b></a><br>\n';
}else
stOpcion += ' <td width="150" class="menuOnSelect"><a href=' + menu[i][1] +' class="menuOnSelect" onMouseOver="self.status=\''+ menu[i][0].toUpperCase() +'\';return true;" onMouseOut="self.status=\'\';return true;"><b>' + menu[i][0].toUpperCase() + '</b></a><br>\n';
stOpcion += "</td></tr>" + separador;
}
else {
if (menu[i][1].indexOf("x=")>-1)
parametros = "";
else
parametros = "?x="+i;
stOpcion += '<tr valign="top">';
stOpcion += ' <td width="16" class="menuBack"><img src="' + './img/sp.gif" name="bullet' + i +'" width="16" height="12" border="0"></td>\n';
if(menu[i][1]==location.pathname)
stOpcion += " <td width='150' class='menuBack'><a href=\"javascript:reescribirMenuGst("+i+");\" onMouseOver=\"cambiar('bullet" + i +"','bulletActivo');self.status='"+menu[i][0].toUpperCase()+"'; return true;\" onMouseOut=\"cambiar('bullet" + i +"','bulletCerrado');self.status=''; return true;\" class=\"menuOff\"><b>" + menu[i][0].toUpperCase() + "</b></a>";
else
stOpcion += " <td width='150' class='menuBack'><a href=" + menu[i][1] +" onMouseOver=\"cambiar('bullet" + i +"','bulletActivo');self.status='"+menu[i][0].toUpperCase()+"'; return true;\" onMouseOut=\"cambiar('bullet" + i +"','bulletCerrado');self.status=''; return true;\" class=\"menuOff\"><b>" + menu[i][0].toUpperCase() + "</b></a>";
stOpcion += "</td></tr>" + separador;
}
}
}
stOpcion += "</table>";
return stOpcion;
}
function escribirMenuGst(){
var stCapaMenu = (document.layers)?'<div id="contenedorMenu" style="position:relative;top:0px;left:0px;">\n\n':'<div id="contenedorMenu">\n\n';
stCapaMenu += (document.layers)?'<img src="/img/gen_bullet_cerrado.gif" width="165" height="1">':construirMenuGst();
stCapaMenu += '</div>';
document.write(stCapaMenu);
//hacemos un retardo si navega con un ie 4.x
if (document.all && navigator.appVersion.indexOf("MSIE 4.")>=0 )
setTimeout('reescribirMenuGst(x,y)',5800);
else
reescribirMenuGst(x,y);
}
function reescribirMenuGst(k,j){
x = k;
if((j<0) ||(j==null))
y = null;
else
y = j;
var stMenuDesplegado = "";
if (document.layers) {
if(document.contenedorMenu){
stMenuDesplegado = construirMenuGst();
document.layers["contenedorMenu"].document.open();
stHTML = '<layer top="0" left="0">'+stMenuDesplegado+'</layer>';
if(esCargado){
document.layers["contenedorMenu"].document.write(stHTML);
ponImgs = true;
}
document.layers["contenedorMenu"].document.close();
if(!esCargado){
iContador +=1;
if(iContador > 10)
esCargado = true;
setTimeout('reescribirMenuGst(x,y)',800);
}
}
else
setTimeout('reescribirMenuGst(x,y)',800);
}
else if (document.all) {
stMenuDesplegado = construirMenuGst();
document.all["contenedorMenu"].innerHTML = stMenuDesplegado;
ponImgs = true;
}
else if (document.getElementById) {
stMenuDesplegado = construirMenuGst();
document.getElementById("contenedorMenu").innerHTML = stMenuDesplegado;
ponImgs = true;
}
if(ponImgs){
for (i=0 ; i<menu.length; i++){
if ( escribirOpcionMenu(menu[i][2]) ){
if(i==x){
if (y<0 || y==null)
cambiar("bullet" + i,"bulletSelect");
else
cambiar("bullet" + i,"bulletAbierto");
/*if (!(subMenu[x]==null))
{
for (j=0 ; j<subMenu[x].length; j++)
{
if (escribirOpcionMenu(subMenu[x][j][2]))
{
if (j==y)
{
cambiar("pbullet" + i +j,"pbullet");
cambiar("sbullet" + i +j,"bulletSelect");
}
else{
cambiar("pbullet" + i +j,"pbullet");
cambiar("sbullet" + i +j,"bulletCerrado");
}
}
}
}*/
}
else
cambiar("bullet" + i,"bulletCerrado");
}
}
}
}
+276
View File
@@ -0,0 +1,276 @@
// ******************************************
// Cargamos las opciones del menu en un ARRAY
// ******************************************
// Inicializar las variables para la funci&oacute;n generaPath
var ADMINISTRADOR = "00";
var CABECERA = "01";
var ANALISTA = "02";
var ESPECIALISTA = "03";
var REHABPOD = "04";
var ATS = "05";
var ESTOMA = "06";
setCookie( "SECCION",SECCION_PACIENTES);
// el 1er parametro es el texto que se muestra
// el 2o parametro es la URL a la que va el link
// el 3er parametro son los perfiles que admite esa opcion
// escribimos el 1er nivel de navegacion
var menu = new Array();
// Gestion pacientes
menu[0] = ["Facturaci&oacute;n", pathLOCAL + "jsp/pac/facturacion_iguala.jsp", "01|03"];
menu[1] = ["Autorizaci&oacute;n", pathLOCAL + "jsp/pac/autorizacion.jsp?x=1&pagina=1", "01|03"];
menu[2] = ["Anal&iacute;tica", pathLOCAL + "jsp/pac/analitica.jsp?x=2", "01|03"];
menu[3] = ["Radiodiagn&oacute;stico", pathLOCAL + "jsp/pac/diagnostico.jsp?x=3", "01|03"];
menu[4] = ["Otras Peticiones", pathLOCAL + "jsp/pac/especialidades.jsp?x=4&pagina=1", "01|03"];
menu[5] = ["Recetas", pathLOCAL + "jsp/pac/recetas.jsp?x=5&pagina=1", "01|03"];
menu[6] = ["Historial de Paciente", pathLOCAL + "jsp/pac/historia.jsp?x=6&pagina=1", "01|03"];
menu[7] = ["Analista", pathLOCAL + "jsp/pac/analista.jsp?x=7", "02"];
menu[8] = ["Cambio Paciente", pathLOCAL + "servlet/GestorPacientes?OPCION=0", "01|02|03"];
//precargamos las imagenes
//if (document.images) {
//bullets del menu de la izq
var bulletAbierto = new Image(); bulletAbierto.src = pathLOCAL+"img/gen_bullet_abierto.gif";
var bulletActivo = new Image(); bulletActivo.src = pathLOCAL+"img/gen_bullet_activo.gif";
var bulletCerrado = new Image(); bulletCerrado.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
var bulletSelect = new Image(); bulletSelect.src = pathLOCAL+"img/gen_bullet_select.gif";
var pbullet = new Image(); pbullet.src = pathLOCAL+"img/gen_bullet_cerrado.gif";
//}
var stContenedor = (document.layers)?"contenedorMenu.document.":"";
var esCargado = false;
var ponImgs = false;
var iContador = 0;
window.onload = Cargado;
function Cargado(){
esCargado = true;
}
// pNG --> perfilNavegacionGestion puede ser | 01 | 02 | 03 |
//Funci&oacute;n que determina si se escribe una opci&oacute;n de menú
//strAcceso debe contener las opciones de acceso de la opci&oacute;n
//a escribir (el tercer parámetro cuando se declaran las opciones).
//**** IR CONSTRUYENDO EL IF PARA LUEGO HACER UN EVAL ****
//EJ: Si strAcceso fuese |05|01&T2|
//El resultado seráa un eval de la cadena:
//((pNG.indexOf("05")) || ((pNG.indexOf("01")) && (pNG.indexOf("T2")))
function tiene(churroOpciones,condicion){
if (churroOpciones.indexOf("|"+condicion+"|")>=0)
return true;
else
return false;
}
function notiene(churroOpciones,condicion){
condicion=condicion.substring(1, condicion.length);
if (churroOpciones.indexOf("|"+condicion+"|")<0)
return true;
else
return false;
}
function escribirOpcionMenu(strAcceso){
var resultado = true;
var strCadenaBooleana = "";
//Troceamos el churro de accesos
var strVectorAcceso = strAcceso.split("|");
for (var i=0; i<strVectorAcceso.length; i++)
{
var strOpcion = strVectorAcceso[i];
if (i!=0)
strCadenaBooleana = strCadenaBooleana + " || ";
if (strOpcion.indexOf("&") > -1)
{
var strSubVectorAcceso2 = strOpcion.split("&");
var booPrimeraEntradaY = true;
strCadenaBooleana = strCadenaBooleana + " (";
for (var j=0;j<strSubVectorAcceso2.length;j++)
{
strOpcion = strSubVectorAcceso2[j];
if (j!=0)
strCadenaBooleana = strCadenaBooleana + " && ";
if (strOpcion.substring(0, 1) == "!")
strCadenaBooleana = strCadenaBooleana + "no";
strCadenaBooleana = strCadenaBooleana + "tiene(pNG,'"+ strOpcion + "')";
}
strCadenaBooleana = strCadenaBooleana + ") ";
}
else
{
if (strOpcion.substring(0, 1) == "!")
strCadenaBooleana = strCadenaBooleana + "no";
strCadenaBooleana = strCadenaBooleana + "tiene(pNG,'"+ strOpcion + "')";
}
}
if (strCadenaBooleana.length > 0)
resultado = eval(strCadenaBooleana);
else
resultado = false;
return resultado;
}
function construirMenuGst(){
var separador = '<tr valign="top"><td colspan="2"><img src="' + './img/sp.gif" width="1" height="8" border="0"></td></tr>';
var stOpcion = '<table cellpadding="0" cellspacing="0" border="0" width="165">\n';
for (i=0 ; i<menu.length; i++){
if ( escribirOpcionMenu(menu[i][2]) ){
if (i==x){
stOpcion += '<tr valign="top">';
stOpcion += ' <td width="16" class="menuOnSelect"><img src="' + './img/sp.gif" name="bullet' + i + '" width="16" height="12" border="0"></td>\n';
if(menu[i][1]==location.pathname){
stOpcion += ' <td width="150" class="menuOnSelect"><a href="javascript:reescribirMenuGst('+i+');" class="menuOnSelect" onMouseOver="self.status=\''+ menu[i][0].toUpperCase() +'\';return true;" onMouseOut="self.status=\'\';return true;"><b>' + menu[i][0].toUpperCase() + '</b></a><br>\n';
}else
stOpcion += ' <td width="150" class="menuOnSelect"><a href=' + menu[i][1] +' class="menuOnSelect" onMouseOver="self.status=\''+ menu[i][0].toUpperCase() +'\';return true;" onMouseOut="self.status=\'\';return true;"><b>' + menu[i][0].toUpperCase() + '</b></a><br>\n';
stOpcion += "</td></tr>" + separador;
}
else {
if (menu[i][1].indexOf("x=")>-1)
parametros = "";
else
parametros = "?x="+i;
stOpcion += '<tr valign="top">';
stOpcion += ' <td width="16" class="menuBack"><img src="' + './img/sp.gif" name="bullet' + i +'" width="16" height="12" border="0"></td>\n';
if(menu[i][1]==location.pathname)
stOpcion += " <td width='150' class='menuBack'><a href=\"javascript:reescribirMenuGst("+i+");\" onMouseOver=\"cambiar('bullet" + i +"','bulletActivo');self.status='"+menu[i][0].toUpperCase()+"'; return true;\" onMouseOut=\"cambiar('bullet" + i +"','bulletCerrado');self.status=''; return true;\" class=\"menuOff\"><b>" + menu[i][0].toUpperCase() + "</b></a>";
else
stOpcion += " <td width='150' class='menuBack'><a href=" + menu[i][1] +" onMouseOver=\"cambiar('bullet" + i +"','bulletActivo');self.status='"+menu[i][0].toUpperCase()+"'; return true;\" onMouseOut=\"cambiar('bullet" + i +"','bulletCerrado');self.status=''; return true;\" class=\"menuOff\"><b>" + menu[i][0].toUpperCase() + "</b></a>";
stOpcion += "</td></tr>" + separador;
}
}
}
stOpcion += "</table>";
return stOpcion;
}
function escribirMenuGst(){
var stCapaMenu = (document.layers)?'<div id="contenedorMenu" style="position:relative;top:0px;left:0px;">\n\n':'<div id="contenedorMenu">\n\n';
stCapaMenu += (document.layers)?'<img src="/img/gen_bullet_cerrado.gif" width="165" height="1">':construirMenuGst();
stCapaMenu += '</div>';
document.write(stCapaMenu);
//hacemos un retardo si navega con un ie 4.x
if (document.all && navigator.appVersion.indexOf("MSIE 4.")>=0 )
setTimeout('reescribirMenuGst(x,y)',5800);
else
reescribirMenuGst(x,y);
}
function reescribirMenuGst(k,j){
x = k;
if((j<0) ||(j==null))
y = null;
else
y = j;
var stMenuDesplegado = "";
if (document.layers) {
if(document.contenedorMenu){
stMenuDesplegado = construirMenuGst();
document.layers["contenedorMenu"].document.open();
stHTML = '<layer top="0" left="0">'+stMenuDesplegado+'</layer>';
if(esCargado){
document.layers["contenedorMenu"].document.write(stHTML);
ponImgs = true;
}
document.layers["contenedorMenu"].document.close();
if(!esCargado){
iContador +=1;
if(iContador > 10)
esCargado = true;
setTimeout('reescribirMenuGst(x,y)',800);
}
}
else
setTimeout('reescribirMenuGst(x,y)',800);
}
else if (document.all) {
stMenuDesplegado = construirMenuGst();
document.all["contenedorMenu"].innerHTML = stMenuDesplegado;
ponImgs = true;
}
else if (document.getElementById) {
stMenuDesplegado = construirMenuGst();
document.getElementById("contenedorMenu").innerHTML = stMenuDesplegado;
ponImgs = true;
}
if(ponImgs){
for (i=0 ; i<menu.length; i++){
if ( escribirOpcionMenu(menu[i][2]) ){
if(i==x){
if (y<0 || y==null)
cambiar("bullet" + i,"bulletSelect");
else
cambiar("bullet" + i,"bulletAbierto");
/*if (!(subMenu[x]==null))
{
for (j=0 ; j<subMenu[x].length; j++)
{
if (escribirOpcionMenu(subMenu[x][j][2]))
{
if (j==y)
{
cambiar("pbullet" + i +j,"pbullet");
cambiar("sbullet" + i +j,"bulletSelect");
}
else{
cambiar("pbullet" + i +j,"pbullet");
cambiar("sbullet" + i +j,"bulletCerrado");
}
}
}
}*/
}
else
cambiar("bullet" + i,"bulletCerrado");
}
}
}
}
+195
View File
@@ -0,0 +1,195 @@
<%@ 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
{
%>
<%!
static StringBuffer hexValue(byte[] buffer) {
StringBuffer sbRet=new StringBuffer(buffer.length*2);
for (int i=0; i<buffer.length; i++) {
// note: & 0xff is used to reset high bits
if ((buffer[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<en.length(); i++)
{
j = j + 1;
if (j >= 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<en.length()/2;i++)
{
j = j + 1;
if (j >= 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="<LIKENUMBER NUMBER='"+mynumber+"' FILTER='"+FiltroIntralab+"' USER='"+ "admin" + "' IPADDR='"+request.getRemoteAddr()+"' />";
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="<REPORT DATE='"+mydate+"' NUMBER='"+mynumber+"' ACCUMULATED='"+isAcumulado+"' USER='"+"admin"+"' MAXREPORT='"+IntralabMaxReport+"' FORMAT='"+IntralabReportFormat+"' ACCESLEVEL='"+AccesLevel+"' TECNICALVALIDATION='"+TecnicalValidation+"' FILTER='"+FiltroIntralab+"' IPADDR='"+request.getRemoteAddr()+"' />";
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("<ERROR='Error to Print'/>\n")==0)
{
response.sendRedirect("lab_informe_vacio.jsp");
return;
}
aux = recibido.replaceAll("á", "&aacute;");
aux = aux.replaceAll("é", "&eacute;");
aux = aux.replaceAll("í", "&iacute;");
aux = aux.replaceAll("ó", "&oacute;");
aux = aux.replaceAll("ú", "&uacute;");
aux = aux.replaceAll("º", "&ordm;");
out.println(aux);
}
catch( IOException e )
{
response.sendRedirect("default.jsp");
return;
}
}
LogTarisan.logger.log(NivelLog.INFO, "Fin página de resultados analitica (resultado_analitica.jsp)");
%>
+51
View File
@@ -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" %>
<HTML>
<BODY>
<%
SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss");
Calendar calendario = Calendar.getInstance();
out.print("<hr>");
out.print("Fecha = " + sdf.format(calendario.getTime()));
out.print("<hr>");
out.println("<br>");
out.println("<b>PAR&Aacute;METROS DE LOGS DE LA APLICACI&Oacute;N</b><br>");
out.println("<font size=-1><ul>" );
out.print("<li><b>Nivel de LOG: </b>");
out.print(LogTarisan.getNivel());
out.println("</li>");
out.print("<li><b>Path del fichero: </b>");
out.print(LogTarisan.getPathFichero());
out.println("</li>");
out.print("<li><b>Nombre del fichero: </b>");
out.print(LogTarisan.getNombreFichero());
out.println("</li>");
out.print("<li><b>N&uacute;mero de ficheros: </b>");
out.print(LogTarisan.getNumeroFicheros());
out.println("</li>");
out.print("<li><b>Tama&ntilde;o del fichero: </b>");
out.print(LogTarisan.getTamanoFichero());
out.println("</li>");
out.println("</font></ul>" );
%>
</BODY>
</HTML>
+172
View File
@@ -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" %>
<HTML>
<BODY>
<%
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("<hr>");
out.println("Fecha = " + sdf.format(calendario.getTime()));
out.println("<hr>");
out.println("<br>");
out.println("<b>PAR&Aacute;METROS DE LA BASE DE DATOS</b><br>");
out.println("<font size=-1><ul>" );
out.print("<li><b>Data Store de base de datos: </b>");
out.print(ParametrosConfiguracion.dataStore);
out.println("</li>");
out.print("<li><b>Usuario: </b>");
out.print(PersistenciaParametros.usuario);
out.println("</li>");
out.print("<li><b>Password: </b>");
out.print(PersistenciaParametros.password);
out.println("</li>");
out.print("<li><b>Maquina: </b>");
out.print(PersistenciaParametros.maquina);
out.println("</li>");
out.print("<li><b>Puerto: </b>");
out.print(PersistenciaParametros.puerto);
out.println("</li>");
out.print("<li><b>Instancia: </b>");
out.print(PersistenciaParametros.instancia);
out.println("</li>");
out.print("<li><b>Nombre del Data Source: </b>");
out.print(PersistenciaParametros.dataSource);
out.println("</li>");
out.println("</font></ul>" );
out.println("<hr>" );
out.println("<b>PROPIEDADES DE LA BASE DE DATOS</b><br>");
try
{
out.println("<font size=-1><ul>" );
conexion = ParametrosConfiguracion.dataStore.obtenerConexion();
DatabaseMetaData bd = conexion.getMetaData();
out.print("<li><b>Nombre BD: </b>");
out.print(bd.getDatabaseProductName());
out.println("</li>");
out.print("<li><b>Versi&oacute;n BD: </b>");
out.print(bd.getDatabaseProductVersion());
out.println("</li>");
out.print("<li><b>Usuario: </b>");
out.print(bd.getUserName());
out.println("</li>");
out.print("<li><b>Cadena de conexi&oacute;n: </b>");
out.print(bd.getURL());
out.println("</li>");
out.print("<li><b>Nombre del driver: </b>");
out.print(bd.getDriverName());
out.println("</li>");
out.print("<li><b>Versi&oacute;n del driver: </b>");
out.print(bd.getDriverVersion());
out.println("</li>");
out.println("</font></ul>" );
out.println("<hr>" );
out.println("<b>PRUEBA DE SELECCI&Oacute;N EN LA BASE DE DATOS</b><br>");
out.println("<font size=-1><ul>" );
out.print("<li><b>Conexión: </b>");
out.print(conexion);
out.println("</li>");
if(conexion != null)
{
out.print("<li><b>Sentencia SQL: </b>");
out.print(sqlSelect);
out.println("</li>");
PreparedStatement ps = conexion.prepareStatement(sqlSelect);
out.print("<li><b>PreparedStatement: </b>");
out.print(ps);
out.println("</li>");
ResultSet rs = ps.executeQuery();
out.print("<li><b>ResultSet: </b>");
out.print(rs);
out.println("</li>");
out.println("<ul>");
while(rs.next())
{
out.print("<li><b>");
out.print(rs.getLong(1));
out.print("</b>: ");
out.print(rs.getString(2));
out.print(" ");
out.print(rs.getString(3));
out.println("</li>");
}
out.println("</ul>");
rs.close();
out.println("<li><b>ResultSet cerrado: </b>");
out.println(rs);
out.println("</li>");
ParametrosConfiguracion.dataStore.liberarConexion(conexion);
out.print("<li><b>Conexión liberada: </b>");
out.print(conexion);
out.println("</li>");
}
}
catch(ExcepcionTarisan sqle)
{
out.print("<li><b>ExcepcionTarisan: </b>");
out.print(sqle);
out.println("</li>");
}
catch(SQLException sqle)
{
out.print("<li><b>SQLException: </b>");
out.print(sqle);
out.println("</li>");
}
catch(Exception sqle)
{
out.print("<li><b>Exception: </b>");
out.print(sqle);
out.println("</li>");
}
catch(Throwable sqle)
{
out.print("<li><b>Throwable: </b>");
out.print(sqle);
out.println("</li>");
}
out.println("</font></ul>" );
%>
</BODY>
</HTML>
+46
View File
@@ -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" %>
<html>
<head>
<title>Análisis</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmAnalisis.pagina.value=pagina;
document.frmAnalisis.submit();
}
function mostrarAnalisis(autorizacion, path)
{
var url = path + "/servlet/GestorMedicos?OPCION=<%=Constantes.OPC_MED_REGISTRAR_LOG_ANALISIS%>&autorizacion=" + autorizacion;
var ventana = window.open(url,"analisis" + autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
Analisis
<a href="javascript:window.open('https://192.168.2.69:8080/tarisan/jsp/resultado_analitica.jsp','Imprimir','width=300,height=120,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no');">Analisisssssssss</a>
</body>
</html>
@@ -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&aacute;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&oacute;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&oacute;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&ntilde;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"));
%>
<html>
<head>
<title>Pacientes</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/imprimir.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmDetallePacientes.pagina.value=pagina;
document.frmDetallePacientes.submit();
}
function comprobarImpresion()
{
if (document.frmDetallePacientes.fecha.value!="")
{
return valorFecha(document.frmDetallePacientes.fecha);
}
else
{
alert("Introduzca la fecha.");
document.frmDetallePacientes.fecha.focus();
return false;
}
}
function realizarImpresion()
{
if (comprobarImpresion()==true)
{
VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
return true;
}
else
return false;
}
function imprimir()
{
if (comprobarImpresion()==true) {
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
alert("Victor");
//var ventana =
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../../img/imq_grande.gif" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<form name="frmDetallePacientes" action="detallePacientes.jsp?x=<%=strParametroMenu%>" method="post" onsubmit="javascript:return realizarImpresion()">
<td colspan="4">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Fecha (dd-mm-aaaa): </span></td>
<td><input type="text" size="12" name="fecha" class="txt" value="<%=strFecha%>" maxlength="10"></td>
<td>&nbsp;</td>
<td><a href="javascript:imprimir()" class="enlace">Imprimir</a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
<tr><td colspan="4">&nbsp;</td></tr>
<%
//Creaci&oacute;n de la tabla presentaci&oacute;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
{
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center"><span class="txt">No se ha encontrado ning&uacute;n dato.</span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="4" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci&oacute;n</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
</tr>
<%
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);
%>
<tr>
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%></td>
<td class="<%=estilo%>" align="left"><%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%></td>
<td class="<%=estilo%>" align="left"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
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">&uacute;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">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
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&aacute;gina de pacientes (med/detallePacientes.jsp)");
%>
+272
View File
@@ -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"));
%>
<html>
<head>
<title>Análisis</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmAnalisis.pagina.value=pagina;
document.frmAnalisis.submit();
}
function mostrarAnalisis(autorizacion, path)
{
//var url = path + "/servlet/GestorMedicos?OPCION=<%=Constantes.OPC_MED_REGISTRAR_LOG_ANALISIS%>&autorizacion=" + autorizacion;
//var ventana = window.open(url,"analisis" + autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
var ventanaAnalisisMedico = window.open('<%=request.getContextPath()%>'+ '/peticiones/' + autorizacion + '.pdf',autorizacion,"dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<form name="frmAnalisis" action="analisis.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//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
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt">No se ha encontrado ningún dato.</span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="2" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
</tr>
<%
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);
%>
<tr>
<%
if (vTaresanaTaclient.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
{
%>
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTaclient.getFecha())%></td>
<td class="<%=estilo%>" align="left"><%=vTaresanaTaclient.getNombre() + " " + vTaresanaTaclient.getApellidos()%></td>
<%
}
else //campo autorizacion tiene un valor valido
{
%>
<td class="<%=estilo%>" align="center"><a href="javascript:mostrarAnalisis(<%=vTaresanaTaclient.getAutorizacion()%>, '<%=request.getContextPath()%>')" class="enlaceAnalisis"><%=sdfFormateadorFecha.format(vTaresanaTaclient.getFecha())%></a></td>
<td class="<%=estilo%>" align="left"><a href="javascript:mostrarAnalisis(<%=vTaresanaTaclient.getAutorizacion()%>, '<%=request.getContextPath()%>')" class="enlaceAnalisis"><%=vTaresanaTaclient.getNombre() + " " + vTaresanaTaclient.getApellidos()%></a></td>
<%
}
%>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="2">
<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>
</td>
</tr>
</table>
</body>
</html>
<%
}
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)");
%>
@@ -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&aacute;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&oacute;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&oacute;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&ntilde;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"));
}
%>
<html>
<head>
<title>Pacientes</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/imprimir.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmDetallePacientes.pagina.value=pagina;
document.frmDetallePacientes.submit();
}
function comprobarFecha()
{
if (document.frmDetallePacientes.fecha.value!="")
{
return valorFecha(document.frmDetallePacientes.fecha);
}
else
{
alert("Introduzca la fecha.");
document.frmDetallePacientes.fecha.focus();
return false;
}
}
function realizarImpresion()
{
if (comprobarImpresion()==true)
{
VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
return true;
}
else
return false;
}
function imprimir()
{
if (comprobarFecha()==true) {
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
document.frmDetallePacientes.action = "<%=request.getContextPath()%>/servlet/GestorPacientes?x=4&pagina=1&imp=1";
document.frmDetallePacientes.submit();
}
}
function comprobarImpresion(impresion)
{
if (impresion==1) { //se efectua la impresion
var ventana1 = window.open('<%=request.getContextPath()%>/peticiones/DetallePaciente_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Detalle","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:comprobarImpresion(<%=intImpresion%>);">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<form name="frmDetallePacientes" action="detallePacientes.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="listaElementosPrescripcion" value="">
<input type="hidden" name="informePrescripcion" value="">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_DETALLE_PACIENTE%>">
<td colspan="4">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Fecha (dd-mm-aaaa): </span></td>
<td><input type="text" size="12" name="fecha" class="txt" value="<%=strFecha%>" maxlength="10"></td>
<td>&nbsp;</td>
<td><a href="javascript:imprimir()" class="enlace">Imprimir</a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
<tr><td colspan="4">&nbsp;</td></tr>
<%
//Creaci&oacute;n de la tabla presentaci&oacute;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
{
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center"><span class="txt">No se ha encontrado ning&uacute;n dato.</span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="4" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci&oacute;n</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
</tr>
<%
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);
%>
<tr>
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%></td>
<td class="<%=estilo%>" align="left"><%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%></td>
<td class="<%=estilo%>" align="left"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
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">&uacute;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">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
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&aacute;gina de pacientes (med/detallePacientes.jsp)");
%>
+200
View File
@@ -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();
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Gesti&oacute;n Perfiles</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<link type="text/css" rel="stylesheet" href="../../css/dhtmlgoodies_calendar.css?random=20051112" media="screen"></LINK>
<SCRIPT type="text/javascript" src="../../js/dhtmlgoodies_calendar.js?random=20060118"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
</head>
<script language="JavaScript">
<!--
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<!-- Logotipo de IMQ de Navarra
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>//-->
<br>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="../../img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
<tr valign="top">
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0" width="75%"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<form>
<%
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<Object[]> analiticas = perTamo.AnaliticasCapturadas(medico, hace30dias, hoyjava);
%>
<tr><td class="txt" >Ver desde fecha:</td><td class="txt"><input class="txt" type="text" name="desdefecha" id="desdefecha" onclick="displayCalendar('desdefecha','dd/mm/yyyy',this)" value="<%=Utilidades.formatear_fecha(hace30dias) %>"></td></tr>
<tr><td class="txt" >hasta fecha:</td><td class="txt"><input class="txt" type="text" name="hastafecha" id="hastafecha" onclick="displayCalendar('hastafecha','dd/mm/yyyy',this)" value="<%=Utilidades.formatear_fecha(hoyjava) %>"></td><td><input type="button" value="buscar"></td></tr>
<%
if(analiticas.size()>0)
{
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorizacion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Paciente</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
</tr>
<%
for(int i=0;i<analiticas.size();i++)
{
Object[] aResultados = analiticas.get(i);
%>
<tr>
<td class="txt" align="center"><%=aResultados[1] %></td>
<td class="txt" align="center"><%=aResultados[0] %></td>
<td class="txt" align="center"><%=Utilidades.formatear_fecha((java.sql.Date)aResultados[2]) %></td>
</tr>
<%
}
}
%>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
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)");
%>
+284
View File
@@ -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&aacute;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&oacute;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&oacute;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"));
%>
<html>
<head>
<title>Liquidaciones</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacion.pagina.value=pagina;
document.frmLiquidacion.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmLiquidacion" action="liquidacion.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//Creaci&oacute;n de la tabla presentaci&oacute;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
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><span class="txt">No se ha encontrado ning&uacute;n dato.</span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="5" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">C&oacute;digo</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci&oacute;n</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Cantidad</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Importe</td>
</tr>
<%
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();
%>
<tr>
<td class="<%=estilo%>" align="center"><%=vTamovextttactmed.getActo()%></td>
<td class="<%=estilo%>" align="left"><%=vTamovextttactmed.getDescripcionActoMedico()%></td>
<td class="<%=estilo%>" align="center"><%=vTamovextttactmed.getCantidad()%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextttactmed.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextttactmed.getImporteActoMedico(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<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">&uacute;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">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="right"><span class="txtNegrita">Importe total: </span><span class="txt"><%=Utilidades.formatearDouble(dblImporteTotal,PersistenciaParametros.decimales)%></span></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
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&aacute;gina de gesti&oacute;n de liquidaciones (med/liquidacion.jsp)");
%>
+18
View File
@@ -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" %>
<%
%>
+783
View File
@@ -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&aacute;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&oacute;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&oacute;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"));
%>
<html>
<head>
<title>Especialidades</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
<script language="JavaScript">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;
function comprobarImpresion(impresion)
{
if (impresion==1) //se efectua la impresion
VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impEspecialidades.jsp?autorizacion=<%=strAutorizacion%>');
}
function anular()
{
vElementos = new Array();
escribirListaElementos();
vCodigoElementos = new Array();
//limpiamos la seleccion de las checkboxes
for (var i=0;i<intNumeroCheckBoxes;i++)
eval("document.frmEspecialidades.checkbox" + i + ".checked=false");
document.frmPrescripcion.listaElementosPrescripcion.value="";
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
document.frmPrescripcion.informePrescripcion.value="";
document.frmEspecialidades.listaElementos.value="";
document.frmEspecialidades.listaCodigoElementos.value="";
document.frmEspecialidades.informe.value="";
}
function imprimir()
{
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
prepararEnvioFormInformePrescripcion();
if (document.frmPrescripcion.listaElementosPrescripcion.value=="")
alert("Debe seleccionar alg&uacute;n elemento para realizar la prescripci&oacute;n.");
else
{
//comprobamos que tenga menos de mil caracteres
if (document.frmPrescripcion.informePrescripcion.value.length > 1000)
document.frmPrescripcion.informePrescripcion.value=document.frmPrescripcion.informePrescripcion.value.substring(0,1000);
//enviamos el formulario
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 prepararEnvioFormInformePrescripcion()
{
document.frmPrescripcion.informePrescripcion.value = document.frmEspecialidades.informe.value;
}
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.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
escribirListaElementos();
}
function aniadirElemento(elemento, codigoElemento)
{
var elementoConComillaSimple=elemento;
//a&ntilde;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&ntilde;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'>-&nbsp;</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)
{
if (vElementos.length>=1) //hay seleccionados 1 elemento. No puede seleccionar mas elementos.
{
if (checkbox.checked==true) //se selecciona una prescripcion
{
checkbox.checked=false;
alert("No puede imputar m&aacute;s actos m&eacute;dicos");
}
else //se quita la seleccion de una prescripcion
{
eliminarElemento(checkbox.value, codigoElemento);
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
escribirListaElementos();
}
}
else //tiene seleccionados menos que 1 elemento. Le dejamos que seleccione sin ningun problema.
{
if (checkbox.checked==true) //se selecciona una prescripcion
aniadirElemento(checkbox.value, codigoElemento);
else
eliminarElemento(checkbox.value, codigoElemento);
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.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;
}
function obtenerInformePrescripcion()
{
//preparamos el informe de prescripcion
//Quitamos las comillas simples para que al asignar el valor del informe
//no kaske, ya que en esa asignacion se utiliza comillas simples
//quitamos los saltos de linea en caso de que los haya y los sustituimos por la etiqueta <br>
//dependiendo del navegador el salto de linea es diferente.
//explorer => \r\n
//netscape 6 => \n
<%
String strInformePrescripcionAux=strInformePrescripcion.replace('\'', '~');
if (strInformePrescripcionAux.indexOf("\r\n")!=-1)
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\r\n", "<br>");
else if (strInformePrescripcionAux.indexOf("\n")!=-1)
strInformePrescripcionAux=strInformePrescripcionAux.replaceAll("\n", "<br>");
%>
//cogemos los valores del informe sin comillas simples
var informePrescripcion = '<%=strInformePrescripcionAux%>';
//restauramos las comillas simples para ponerlos con su valor original
while(informePrescripcion.indexOf("~")!=-1)
informePrescripcion = informePrescripcion.replace("~", "'");
return informePrescripcion;
}
//********************************************************************************************************************
//********************************************************************************************************************
//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.frmEspecialidades.nombre.value=lstCampoBusqueda;
}
function comprobarTamanio()
{
return (document.frmEspecialidades.informe.value.length < 1000)
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function buscar()
{
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
document.frmEspecialidades.pagina.value=1;
pasarAMayusculas(document.frmEspecialidades.nombre);
document.frmEspecialidades.submit();
}
function paginacion(pagina)
{
prepararEnvioFormListaElementos(document.frmEspecialidades.listaElementos, document.frmEspecialidades.listaCodigoElementos);
document.frmEspecialidades.pagina.value=pagina;
pasarAMayusculas(document.frmEspecialidades.nombre);
document.frmEspecialidades.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda();comprobarImpresion(<%=intImpresion%>)">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<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">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;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>
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<table border="0" align="center" width="100%" cellpadding="0">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="2" align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="button" name="aceptar" value="OK/Imprimir" onclick="javascript:imprimir()" class="menu"></td>
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<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="informePrescripcion" value="">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_ESPECIALIDADES%>">
</form>
<form name="frmEspecialidades" action="<%=request.getContextPath()%>/jsp/pac/especialidades.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
<table border="0" align="left" width="60%">
<tr>
<td align="left" class="txtNegrita">Prescripci&oacute;n de especialista:</td>
</tr>
<tr>
<td align="left">
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
</td>
</tr>
</table>
<table border="0" align="right">
<tr>
<td align="left" class="txtNegrita">Informe:</td>
</tr>
<tr>
<td align="left">
<textarea name="informe" rows="4" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInforme%></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
</tr>
<tr>
<td colspan="2">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Especialidad: </span></td>
<td><input type="text" size="50" name="nombre" class="txt"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar">Buscar</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>
<%
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
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt">No se ha encontrado ning&uacute;n dato.</span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="2" align="right"><span class="txt">P&aacute;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">Descripci&oacute;n</td>
</tr>
<%
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('\'', '~');
%>
<tr>
<%
if (strListaElementos.indexOf("" + taespeci.getDescripcion() + "")!=-1)
{
%>
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
<%
}
else
{
%>
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=taespeci.getEspecialidad()%>)"></td>
<%
}
%>
<td class="<%=estilo%>" align="left"><%=taespeci.getDescripcion()%></td>
</tr>
<%
}
%>
</form>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="2">
<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">&uacute;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">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<%
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
catch(ExcepcionTarisan ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "ExcepcionTarisan: " + ex.getMensaje());
sesion.setAttribute("ERROR", "Error en la presentaci&oacute;n de la p&aacute;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&oacute;n de la p&aacute;gina al usuario.");
response.sendRedirect(request.getContextPath() + "/jsp/error.jsp");
}
}
LogTarisan.logger.log(NivelLog.INFO, "Final p&aacute;gina de otras especialidades (pac/especialidades.jsp)");
%>
+745
View File
@@ -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();
%>
<html>
<head>
<title>Especialidades</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
<script language="JavaScript">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;
function comprobarImpresion(impresion)
{
if (impresion==1) { //se efectua la impresion
var ventanaFact = window.open('<%=request.getContextPath()%>/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()+"_"+((Tarjeta)((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta()).getPoliza()%>.pdf',"Impresion","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
}
}
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;
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'>-&nbsp;</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)
{
if (vElementos.length>=5) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
{
if (checkbox.checked==true) //se selecciona una prescripcion
{
checkbox.checked=false;
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 si se permite seleccionar la primera visita o la visita sucesiva
//(codigoElemento == codigoPrimeraVisita && esPrimeraVisita == "no") || (codigoElemento == codigoVisitaSucesiva && esPrimeraVisita == "si")
aniadirElemento(checkbox.value, codigoElemento);
}
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%>)">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Menú de navegación del módulo (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>
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<table border="0" align="center" width="100%" cellpadding="0">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="4" align="right">
<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_ESTOMATOLOGIA%>">
</form>
<form name="frmFacturacion" action="<%=request.getContextPath()%>/jsp/pac/estomatologia.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>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar">Buscar</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>
<%
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
{
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center"><span class="txt">No se ha encontrado ningún dato.</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>
<%
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('\'', '~');
%>
<tr>
<%
if (strListaElementos.indexOf("¬" + ttFranquiciasDentales.getDescripcion() + "¬")!=-1)
{
%>
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' checked="checked" onclick="javascript:tratarCheckBox(this, <%=ttFranquiciasDentales.getActo()%>)"></td>
<%
}
else
{
%>
<td><input type="checkbox" name="checkbox<%=i%>" value='<%=strDescripcionSinComilla%>' onclick="javascript:tratarCheckBox(this, <%=ttFranquiciasDentales.getActo()%>)"></td>
<%
}
%>
<td class="<%=estilo%>" align="center"><%=ttFranquiciasDentales.getActo()%></td>
<td class="<%=estilo%>" align="left"><%=ttFranquiciasDentales.getDescripcion()%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(ttFranquiciasDentales.getPrecio(), 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>
</td>
</tr>
</table>
</body>
</html>
<%
}
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)");
%>
+806
View File
@@ -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";
%>
<html>
<head>
<title>Estomatolog&iacute;a</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
<script language="JavaScript">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 codigoPrimeraVisita = <%=ParametrosConfiguracion.codigoPrimeraVisita%>;
var codigoVisitaSucesiva = <%=ParametrosConfiguracion.codigoVisitaSucesiva%>;
function comprobarImpresion(impresion)
{
if (impresion==1) { //se efectua la impresion
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impfacturacion_estoma.jsp');
//window.open('https://infor-roumenov/tarisan/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf');
var ventanaFact = window.open('<%=request.getContextPath()%>/peticiones/Fact_<%=((Usuario)sesion.getAttribute("USUARIO")).getMedico()%>.pdf',"Impresion","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
}
}
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;
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'>-&nbsp;</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)
{
if (vElementos.length>=5) //hay seleccionados 5 elementos. No puede seleccionar mas elementos.
{
if (checkbox.checked==true) //se selecciona una prescripcion
{
checkbox.checked=false;
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 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;
alert("Imposible imputarse ese acto médico ya ha tenido consulta.");
}
else if (codigoElemento == 2 && esPrimeraVisita == "si")
{
checkbox.checked=false;
alert("Imposible imputarse ese acto médico, no hay consulta previa.");
}
else
aniadirElemento(checkbox.value, codigoElemento);
}
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%>)">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="<%=request.getContextPath()%>/img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Datos del paciente introducido mediante la lectura de la tarjeta //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("PACIENTE") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Menú de navegación del módulo (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>
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<%
if ((blnEsPolizaIgualaMedico == 0) || ((blnEsPolizaIgualaMedico != 0) && perfilIguala.toString().compareTo("01")!=0)){
LogTarisan.logger.log(NivelLog.INFO, "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><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></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">
<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_estoma.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>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="buscar">Buscar</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();
//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
{
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center"><span class="txt">No parece tener cobertura dental...</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>
<%
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">&nbsp;</td>
<td></td>
</tr>
<tr>
<td align="left" class="txtNegrita">&nbsp;</td>
<td></td>
</tr>
<tr>
<td align="left" class="txtNegrita">&nbsp;</td>
<td></td>
</tr>
<tr>
<%
if (blnEsPolizaIgualaMedico == 1){ %>
<td align="center" class="txtNegrita">Paciente con IGUALA suya</td>
<%}
else { %>
<td align="center" class="txtNegrita">Paciente con IGUALA de otro profesional</td>
<%
}%>
<td></td>
</tr>
</table>
<%
}
%>
</td>
</tr>
</table>
</body>
</html>
<%
}
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)");
%>
+218
View File
@@ -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&aacute;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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
//Obtenci&oacute;n del perfil del usuario conectado
StringBuffer perfil = new StringBuffer();
perfil.append("|");
perfil.append(sesion.getAttribute("PERFIL"));
perfil.append("|");
Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
//String noticia = Utilidades.leerNoticias("/root/apache-tomcat-6.0.20/webapps/tarisan/noticias.txt");
%>
<html>
<head>
<title>M&oacute;dulo de Franquicias dentales</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_pac.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
</head>
<script language="javascript">
<!--
//-->
</script>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="noticia_importante();">
<script type="text/javascript">
</script>
<style type="text/css">
.mensajes {
width:150px;
height:150px;
background:#FFFF00;
color:#C02331;
padding:1px;
margin:10px;
float:center;
text-align:center;
font-family:Verdana, Arial;
font-size: 12;
font-weight: bold;
display:none;
}
</style>
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo de navegaci&oacute;n (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td>
<table cellpadding="0" cellspacing="0" border="0" width="165">
<tr valign="top">
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOn"><b>FRANQUICIAS DENTALES</b></td>
</tr>
</table>
</td>
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<br/>
<table border="0" width="100%" align="center">
<tr>
<td class="txtnegrita" align="center">El paciente tiene la siguiente franquicia dental: </td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<%
PersistenciaTTFranquiciasDentales per = new PersistenciaTTFranquiciasDentales();
long longColectivonew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo();
int intEntidadnew = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getEntidadIMQ();
int intEspecialidadnew = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
int intContrato = ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getContrato();
Calendar cal = Calendar.getInstance() ;
Integer anio = cal.get(Calendar.YEAR);
int franquicia = 0;
franquicia = per.obtenerNumeroFranquicia(intEspecialidadnew, intEntidadnew, longColectivonew,anio);
if (franquicia==0) //No se han encontrado datos al buscar una franquicia por entidad
{
int franquiciaPorContrato = 0;
franquiciaPorContrato = per.obtenerNumeroFranquiciaPorContrato(intContrato);
if (franquiciaPorContrato==0) //No se han encontrado datos al buscar una franquicia por contrato
{
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center"><span class="txt">No tiene franquicias asociadas</span></td>
</tr>
<%
}
else
{
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center" class="txt"><span class="txtNegrita"><a href=<%=request.getContextPath()+"/pdfdental/franquicia_"+ franquiciaPorContrato +".pdf"%> target="blank">Franquicia</a></span></td>
</tr>
<%
}
}
else
{
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center" class="txt"><span class="txtNegrita"><a href=<%=request.getContextPath()+"/pdfdental/franquicia_"+ franquicia +".pdf"%> target="blank">Franquicia</a></span></td>
</tr>
<%
}
%>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right"><a href="../pac/gestor.jsp" class="enlace">Volver</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final p&aacute;gina de franquicias dentales (pac/franquicias_dentales.jsp)");
%>
+156
View File
@@ -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("|");
%>
<html>
<head>
<title>Módulo de Gestión de Pacientes</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_pac.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<!-- No lleva pNG puesto que primero hay que pasar la tarjeta del paciente //-->
</head>
<script language="javascript">
<!--
function validar()
{
if(document.frmTarjeta.TARJETA.value != "")
{
document.frmTarjeta.submit();
}
else
{
alert("Tiene que pasar la Tarjeta del Paciente");
document.frmTarjeta.TARJETA.focus();
}
}
//-->
</script>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmTarjeta.TARJETA.focus()">
<!-- Logotipo de IMQ de Navarra //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>
<!-- Datos del usuario conectado //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="tituloTabla" align="center"><%= sesion.getAttribute("USUARIO") %></td>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td width="180">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td>
<table cellpadding="0" cellspacing="0" border="0" width="165">
<tr valign="top">
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOff"><b>TARJETA DE PACIENTE IMQ</b></td>
</tr>
<tr valign="top">
<td width="16" class="menuBack"><img src="../../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOff"><a href="gestor_chipcard.jsp">TARJETA DE PACIENTE CHIPCARD</a></td>
</tr>
</table>
</td>
<td><img src="../../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" width="100%" align="center">
<tr>
<td>&nbsp;</td>
</tr>
<form name="frmTarjeta" action="../../servlet/GestorPacientes?OPCION=<%= Constantes.OPC_PAC_PASO_TARJETA %>" method="post">
<tr>
<td align="center" class="txtnegrita">Pase la tarjeta:</td>
<td><input type="password" size="80" name="TARJETA" class="txt" value=""></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><a href="javascript:validar()" class="enlace">Validar</a></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página de gestión de pacientes (pac/gestor.jsp)");
%>
+990
View File
@@ -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<vActosGrupo.size();i++)
{
tagruana=(Tagruana)vActosGrupo.elementAt(i);
if(strListaElementos.indexOf(tagruana.getDescripcionActo()) == -1)
{
strListaElementos += tagruana.getDescripcionActo() + "¬";
strListaCodigoElementos += tagruana.getActo() + "¬";
}
}
}
}
}
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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Anal&iacute;tica</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/funciones.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">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 strParametroGrupoSeleccionado = '<%=strGrupo%>';
var stringActosValidos = "";
function anular()
{
strParametroGrupoSeleccionado="";
vElementos = new Array();
escribirListaElementos();
vCodigoElementos = new Array();
//limpiamos la seleccion de las checkboxes
for (var i=0;i<intNumeroCheckBoxes;i++)
eval("document.frmAnalitica.checkbox" + i + ".checked=false");
document.frmPrescripcion.listaElementosPrescripcion.value="";
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
document.frmPrescripcion.informePrescripcion.value="";
document.frmAnalitica.listaElementos.value="";
document.frmAnalitica.listaCodigoElementos.value="";
document.frmAnalitica.informe.value="";
document.frmAnalitica.grupo.value=""
document.frmAnalitica.seleccionGrupo.value=""
}
function imprimir()
{
prepararImpresionListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
prepararEnvioFormInformePrescripcion();
if (document.frmPrescripcion.listaElementosPrescripcion.value==""){
alert("Debe seleccionar algún elemento para realizar la prescripción.");
}else if(document.frmPrescripcion.informePrescripcion.value.length > 1000){
alert("El informe no puede superar los 1000 caracteres.");
}
else{
//comprobamos que tenga menos de mil caracteres
/*if (document.frmPrescripcion.informePrescripcion.value.length > 1000)
document.frmPrescripcion.informePrescripcion.value=document.frmPrescripcion.informePrescripcion.value.substring(0,1000);*/
//enviamos el formulario
document.frmPrescripcion.submit();
}
}
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (obj, fromIndex) {
if (fromIndex == null) {
fromIndex = 0;
} else if (fromIndex < 0) {
fromIndex = Math.max(0, this.length + fromIndex);
}
for (var i = fromIndex, j = this.length; i < j; i++) {
if (this[i] == obj && obj != 0)
return i;
}
return -1;
};
}
function prepararImpresionListaElementos(campoElementos, campoCodigoElementos)
{
var textoElementos="";
var textoCodigoElementos="";
if(vCodigoElementos.length>0)
{
for (var i=0; i<vCodigoElementos.length; i++)
{
textoCodigoElementos+= "¬" + vCodigoElementos[i];
textoElementos+= "¬" + vElementos[i];
}
textoCodigoElementos+= "¬";
textoElementos+="¬";
campoElementos.value=textoElementos;
campoCodigoElementos.value=textoCodigoElementos;
}
else
{
alert("Debe seleccionar algún elemento para realizar la prescripción.");
}
}
function DetectFirefox()
{
var resul = false;
var val = navigator.appName;
if(val.indexOf("Netscape") > -1)
{
resul = true;
}
return resul;
}
function buscar_array_firefox(obj, elemento)
{
var matriz = new Array();
matriz = obj;
for(var i=0; i<matriz.length; i++)
{
if(matriz[i] == elemento)
return i;
}
return -1;
}
function prepararEnvioFormListaElementos(campoElementos, campoCodigoElementos)
{
var textoElementos="";
var textoCodigoElementos="";
//stringActosValidos += "¬";
var posiciones_eliminar="";
var temp3 = new Array();
var temp2 = new Array();
var j=0;
if (vCodigoElementos.length>0) //array con elementos
{
//preparamos la lista de codigos
//Convertimos el string en array y buscamos el elemento actual dentro del array:
for (var i=0; i<vCodigoElementos.length; i++)
{
var temp = new Array();
temp = stringActosValidos.split('¬');
var bueno = false;
if(DetectFirefox())
{
if(buscar_array_firefox(temp, vCodigoElementos[i]) > 0)
{
bueno = true;
}
}
else
{
if(temp.indexOf(vCodigoElementos[i]) > 0)
{
//si lo encuentra va vien
bueno = true;
}
}
if(bueno)
{
textoCodigoElementos+= "¬" + vCodigoElementos[i];
textoElementos+= "¬" + vElementos[i];
temp3[j] = vCodigoElementos[i];
temp2[j] = vElementos[i];
j=j+1;
}
else
{
alert("El acto: "+vElementos[i].replace(/^\s+|\s+$/g,'')+" no está cubierto para este paciente, no saldrá en la petición...");
}
}
textoCodigoElementos+= "¬";
textoElementos+="¬";
}
campoElementos.value=textoElementos;
campoCodigoElementos.value=textoCodigoElementos;
vCodigoElementos = temp3;
vElementos = temp2;
}
function prepararEnvioFormInformePrescripcion()
{
document.frmPrescripcion.informePrescripcion.value = document.frmAnalitica.informe.value;
}
function inicializarListaElementos()
{
//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)
{
var string = lstCodigoElementos.substring(0, lstCodigoElementos.indexOf("¬"));
if(string.length > 0)
vCodigoElementos[i] = string;
lstCodigoElementos=lstCodigoElementos.substring(lstCodigoElementos.indexOf("¬") + 1);
i++;
}
}
//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)
{
var string = lstElementos.substring(0, lstElementos.indexOf("¬"));
if(string.length > 0)
vElementos[i] = string;
//lstElementos.substring(0, lstElementos.indexOf("¬"));
lstElementos=lstElementos.substring(lstElementos.indexOf("¬") + 1);
i++;
}
}
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
escribirListaElementos();
}
function aniadirElemento(elemento, codigoElemento)
{
var elementoConComillaSimple=elemento;
var nocargar=false;
//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("~", "'");
}
//añadimos descripcion elemento
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()
{
// USAR EL STRING EN LUGAR DEL ARRAY O MODIFICAR EL ARRAY
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'><input type='checkbox' onclick='javascript:tratarCheckBox(this, " + vCodigoElementos[i] + ")' checked='checked' value='"+vElementos[i]+"'></td><td class='txt'>" + vElementos[i] + "</td></tr>";
}
}
texto = texto + "</table>";
//alert(texto);
//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)
{
if (vElementos.length>=25) //hay seleccionados 25 elementos. No puede seleccionar mas elementos.
{
if (checkbox.checked==true) //se selecciona una prescripcion
{
checkbox.checked=false;
alert("No puede imputar más actos médicos");
}
else //se quita la seleccion de una prescripcion
{
eliminarElemento(checkbox.value, codigoElemento);
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
escribirListaElementos();
}
}
else //tiene seleccionados menos que 25 elementos. Le dejamos que seleccione sin ningun problema.
{
//alert("tiene menos de 25 elementos");
if (checkbox.checked==true) //se selecciona una prescripcion
{
// alert("Vamos a añadir un elemento");
aniadirElemento(checkbox.value, codigoElemento);
}
else
{
// alert("Vamos a quitar un elemento");
// alert("valores, checkbox: "+checkbox.value+"codigoelemento: "+codigoElemento);
eliminarElemento(checkbox.value, codigoElemento);
}
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
escribirListaElementos();
//buscar();
document.frmAnalitica.submit();
}
}
//********************************************************************************************************************
//********************************************************************************************************************
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
//********************************************************************************************************************
//********************************************************************************************************************
//el parametro justificacion proveniente de la jsp justificaccionDiagnostico, puede que tenga comillas simples.
//este valor hay que pasarlo como input oculto dentro del formulario.
//para evitar que kaske esta asignacion, hacemos tratamiento de las comillas.
//antes, en el codigo java, hemos sustituido las comillas simples por el caracter '~'.
//ahora sustituimos el valor '~' por las comillas simples.
function prepararCampoJustificacion()
{
var justificacionConComillas = document.frmPrescripcion.justificacionPrescripcion.value;
while (justificacionConComillas.indexOf("~")!=-1)
justificacionConComillas=justificacionConComillas.replace("~", "'");
document.frmAnalitica.justificacionPrescripcion.value = justificacionConComillas;
document.frmPrescripcion.justificacionPrescripcion.value = justificacionConComillas;
}
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.frmAnalitica.nombre.value=lstCampoBusqueda;
}
function comprobarTamanio()
{
return (document.frmAnalitica.informe.value.length < 1000)
}
function inicializarListaGrupos()
{
document.frmAnalitica.grupo.value = strParametroGrupoSeleccionado;
}
function tratarGrupoAnalisis(grupo)
{
if (grupo != "" && grupo!=strParametroGrupoSeleccionado)
{
document.frmAnalitica.seleccionGrupo.value = "si";
document.frmAnalitica.submit();
}
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function buscar()
{
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
document.frmAnalitica.pagina.value=1;
pasarAMayusculas(document.frmAnalitica.nombre);
document.frmAnalitica.submit();
}
function paginacion(pagina)
{
prepararEnvioFormListaElementos(document.frmAnalitica.listaElementos, document.frmAnalitica.listaCodigoElementos);
document.frmAnalitica.pagina.value=pagina;
pasarAMayusculas(document.frmAnalitica.nombre);
document.frmAnalitica.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();prepararCampoJustificacion();inicializarListaGrupos();informarParametroCampoBusqueda()">
<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">
<!-- 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="2" align="right">//-->
<td colspan="2" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="button" name="aceptar" value="OK/Imprimir" onclick="javascript:imprimir()" class="menu"></td>
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&imp=1" method="post">
<input type="hidden" name="listaElementosPrescripcion" value="">
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
<input type="hidden" name="informePrescripcion" value="">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_ANALITICA%>">
<input type="hidden" name="justificacionPrescripcion" value='<%=strJustificacionPrescripcion%>'>
</form>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/jsp/pac/solicitudAnalitica.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
<table border="0" align="left" width="60%">
<tr>
<td align="left" class="txtNegrita">Prescripción de diagnóstico:</td>
</tr>
<tr>
<td align="left">
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
</td>
</tr>
</table>
<table border="0" align="right">
<tr>
<td align="left" class="txtNegrita">Grupos de análisis:</td>
</tr>
<tr>
<td>
<%
Vector vGrupos = perTagruana.obtenerGruposAnalisis(intMedico);
tagruana = null;
%>
<select name="grupo" class="txt" onChange="javascript:tratarGrupoAnalisis(this.value)">
<%
if (vGrupos.size() > 0) {
%>
<option value="">Seleccione...</option>
<%
}
else{
%>
<option value="">Usuario sin grupos definidos</option>
<%
}
%>
<%
for(i = 0; i < vGrupos.size(); i++)
{
tagruana = (Tagruana)vGrupos.elementAt(i);
%>
<option value="<%=tagruana.getGrupo()%>"><%=tagruana.getDescripcion()%></option>
<%
}
%>
</select>
</td>
</tr>
<tr>
<td align="left" class="txtNegrita">Informe:</td>
</tr>
<tr>
<td align="left">
<textarea name="informe" rows="4" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInforme%></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="2" border="0"></td>
</tr>
<tr>
<td colspan="2">
<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>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace" 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="">
<input type="hidden" name="justificacionPrescripcion">
<input type="hidden" name="seleccionGrupo">
</tr>
<%
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<vSeleccion_Validos.size(); j++)
{
ttactmed2 = (Ttactmed)vSeleccion_Validos.elementAt(j);
%>
<!-- Para cargar en un string todos los actos autorizados a este paciente -->
<script language="javascript" type="text/javascript">
<!--
stringActosValidos += "¬"+<%=ttactmed2.getActo() %>;
//-->
</script>
<%
}
}
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
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" 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="2" 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">Descripción</td>
</tr>
<%
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('\'', '~');
%>
<tr>
<%
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="left"><%=ttactmed.getDescripcion()%></td>
</tr>
<%
}
%>
</form>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="2">
<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>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(ExcepcionTarisan ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
sesion.setAttribute("ERROR", "Error en la presentació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)");
}
%>
+720
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Diagnóstico</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/funciones.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/inicio_tarisan.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/menu_pac.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">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;
function anular()
{
vElementos = new Array();
escribirListaElementos();
vCodigoElementos = new Array();
//limpiamos la seleccion de las checkboxes
for (var i=0;i<intNumeroCheckBoxes;i++)
eval("document.frmDiagnostico.checkbox" + i + ".checked=false");
document.frmPrescripcion.listaElementosPrescripcion.value="";
document.frmPrescripcion.listaCodigoElementosPrescripcion.value="";
document.frmPrescripcion.informePrescripcion.value="";
document.frmDiagnostico.listaElementos.value="";
document.frmDiagnostico.listaCodigoElementos.value="";
document.frmDiagnostico.informe.value="";
}
function imprimir()
{
prepararEnvioFormListaElementos(document.frmPrescripcion.listaElementosPrescripcion, document.frmPrescripcion.listaCodigoElementosPrescripcion);
prepararEnvioFormInformePrescripcion();
if (document.frmPrescripcion.listaElementosPrescripcion.value=="") {
alert("Debe seleccionar algún elemento para realizar la prescripción.");
} else if (document.frmPrescripcion.informePrescripcion.value.length < 1) {
alert("Debe rellenar el informe!");
} else {
//comprobamos que tenga menos de mil caracteres
if (document.frmPrescripcion.informePrescripcion.value.length > 1000)
document.frmPrescripcion.informePrescripcion.value=document.frmPrescripcion.informePrescripcion.value.substring(0,1000);
//enviamos el formulario
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 prepararEnvioFormInformePrescripcion()
{
document.frmPrescripcion.informePrescripcion.value = document.frmDiagnostico.informe.value;
}
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.frmDiagnostico.listaElementos, document.frmDiagnostico.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'>-&nbsp;</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)
{
if (vElementos.length>=15) //hay seleccionados 15 elementos. No puede seleccionar mas elementos.
{
if (checkbox.checked==true) //se selecciona una prescripcion
{
checkbox.checked=false;
alert("No puede imputar más actos médicos");
}
else //se quita la seleccion de una prescripcion
{
eliminarElemento(checkbox.value, codigoElemento);
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
escribirListaElementos();
}
}
else //tiene seleccionados menos que 15 elementos. Le dejamos que seleccione sin ningun problema.
{
if (checkbox.checked==true) //se selecciona una prescripcion
aniadirElemento(checkbox.value, codigoElemento);
else
eliminarElemento(checkbox.value, codigoElemento);
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
escribirListaElementos();
}
}
//********************************************************************************************************************
//********************************************************************************************************************
//FUNCIONES UTILIZADAS PARA EL TRATAMIENTO DE LA SELECCION DE LOS CHECKBOXES DE LA GESTION DE PACIENTES
//********************************************************************************************************************
//********************************************************************************************************************
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.frmDiagnostico.nombre.value=lstCampoBusqueda;
}
function comprobarTamanio()
{
return (document.frmDiagnostico.informe.value.length < 1000)
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function buscar()
{
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
document.frmDiagnostico.pagina.value=1;
pasarAMayusculas(document.frmDiagnostico.nombre);
document.frmDiagnostico.submit();
}
function paginacion(pagina)
{
prepararEnvioFormListaElementos(document.frmDiagnostico.listaElementos, document.frmDiagnostico.listaCodigoElementos);
document.frmDiagnostico.pagina.value=pagina;
pasarAMayusculas(document.frmDiagnostico.nombre);
document.frmDiagnostico.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:inicializarListaElementos();informarParametroCampoBusqueda()">
<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>
<!--<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>//-->
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td> -->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
<td width="1px" bgcolor="#CCCCCC"></td>
<td class="txt" valign="top">
<table border="0" align="center" width="100%" cellpadding="0">
<!-- Presentacion de los resultados -->
<tr>
<!--<td colspan="2" align="right">//-->
<td colspan="2" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="button" name="aceptar" value="OK/Imprimir" onclick="javascript:imprimir()" class="menu"></td>
<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="5" height="1" border="0"></td>
<td><input type="button" name="anular" value="Anular" onclick="javascript:anular()" class="menu"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<form name="frmPrescripcion" action="<%=request.getContextPath()%>/servlet/GestorPacientes?x=<%=strParametroMenu%>&imp=1" method="post">
<input type="hidden" name="listaElementosPrescripcion" value="">
<input type="hidden" name="listaCodigoElementosPrescripcion" value="">
<input type="hidden" name="informePrescripcion" value="">
<input type="hidden" name="justificacionNiveles" value="false">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_PRESCRIPCION_DIAGNOSTICO%>">
</form>
<form name="frmDiagnostico" action="<%=request.getContextPath()%>/jsp/pac/solicitudDiagnostico.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
<table border="0" align="left" width="60%">
<tr>
<td align="left" class="txtNegrita">Prescripción de diagnóstico:</td>
</tr>
<tr>
<td align="left">
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txt"></div>
</td>
</tr>
</table>
<table border="0" align="right">
<tr>
<td align="left" class="txtNegrita">Informe:</td>
</tr>
<tr>
<td align="left">
<textarea name="informe" rows="4" cols="40" class="txt" onkeypress="javascript:return comprobarTamanio()"><%=strInforme%></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="15" border="0"></td>
</tr>
<tr>
<td colspan="2">
<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>&nbsp;</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>
<%
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
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" 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="2" 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">Descripción</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>
<%
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="left"><%=ttactmed.getDescripcion()%></td>
</tr>
<%
}
%>
</form>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="2">
<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>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(ExcepcionTarisan ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
sesion.setAttribute("ERROR", "Error en la presentació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)");
}
%>
+608
View File
@@ -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&aacute;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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
try
{
//Obtenci&oacute;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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Mantenimiento autorizaciones</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function buscar()
{
/*if(document.frm_buscar.medico.value.length == 0)
{
alert("Introduce un numero de medico");
document.frm_buscar.medico.focus();
}
else */ if (isNaN(document.frm_buscar.medico.value)){
alert("Introduce un numero de medico v&aacute;lido. S&oacute;lo se permiten n&uacute;meros");
document.frm_buscar.medico.value = "";
document.frm_buscar.medico.focus();
}
else if(document.frm_buscar.colectivo.value.length == 0)
{
alert("Introduce un numero de colectivo");
document.frm_buscar.colectivo.focus();
}
else if (isNaN(document.frm_buscar.colectivo.value)){
alert("Introduce un numero de colectivo v&aacute;lido. S&oacute;lo se permiten n&uacute;meros");
document.frm_buscar.colectivo.value = "";
document.frm_buscar.colectivo.focus();
}
else if(document.frm_buscar.poliza.value.length == 0)
{
alert("Introduce un numero de poliza");
document.frm_buscar.poliza.focus();
}
else if (isNaN(document.frm_buscar.poliza.value)){
alert("Introduce un numero de poliza v&aacute;lido. S&oacute;lo se permiten n&uacute;meros");
document.frm_buscar.poliza.value = "";
document.frm_buscar.poliza.focus();
}
else if(document.frm_buscar.orden.value.length == 0)
{
alert("Introduce un numero de orden");
document.frm_buscar.orden.focus();
}
else if (isNaN(document.frm_buscar.orden.value)){
alert("Introduce un numero de orden v&aacute;lido. S&oacute;lo se permiten n&uacute;meros");
document.frm_buscar.orden.value = "";
document.frm_buscar.orden.focus();
}
else
{
document.frm_buscar.submit();
}
}
function actualizar()
{
if(document.actualizar_autorizacion.cantidad.value < 0)
{
alert("Introduce un numero de sesiones disponibles valido")
document.actualizar_autorizacion.cantidad.focus();
}
else if (document.actualizar_autorizacion.cantidad.value.length < 1)
{
alert("Introduce un numero de sesiones disponibles valido")
document.actualizar_autorizacion.cantidad.focus();
}
else
{
document.actualizar_autorizacion.submit();
}
}
function paginacion(pagina)
{
document.frm_buscar.pagina.value = pagina;
document.frm_buscar.submit();
}
function enfocar()
{
if(document.actualizar_autorizacion === undefined)
document.frm_buscar.medico.focus();
else
document.actualizar_autorizacion.cantidad.focus();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegacin superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la pgina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men de navegacin del mdulo de navegacin (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la pgina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="90px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<form name="frm_buscar" action="descarga_pdfs_autorizaciones.jsp?x=<%=strParametroMenu%>" method="post" >
<input type="hidden" name="pagina" value="1" />
<table border="0" align="center">
<tr>
<td align="right">
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
</td>
<td>
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(21).getMensaje() %></span>
</td>
<td>
<input size="20" type="text" class="txt" id="colectivo" name="colectivo" <%if(CampoPoliza!=0){%>value="<%=CampoColectivo %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(22).getMensaje() %></label>
</td>
<td>
<input size="20" type="text" class="txt" id="poliza" name="poliza" <%if(CampoPoliza!=0){%>value="<%=CampoPoliza %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(23).getMensaje() %></label>
</td>
<td>
<input size="20" type="text" class="txt" id="orden" name="orden" <%if(CampoPoliza!=0){%>value="<%=CampoOrden %>"<%}%>/>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
</td>
</tr>
<tr>
<td colspan="2" align="right">&nbsp;</td>
</tr>
</table>
</form>
<%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");
%>
<table border="0" align="center" width="100%">
<%if (intPagina != 0){ %>
<tr>
<td colspan="2" align="right"><span class="txt">P&aacute;gina <%=pertacon.getPaginacion().getNumeroPagina()%> de <%=pertacon.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<% }%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(18).getMensaje() %></td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(16).getMensaje() %></td>
</tr>
<%
String estilo = "";
for(int i=0;i<vSeleccion.size();i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
%>
<tr>
<td class="<%=estilo%>" align="center"><%= vSeleccion.get(i)%></td>
<td class="<%=estilo%>" align="center">
<%
//mostrar el botn de resultados
%><form name="resultados" action="../adm/mto_taconaut.jsp?x=2" target="blank" method="post">
<input type="hidden" name="autorizacion" value="<%=vSeleccion.get(i) %>" />
<input type="submit" value="<%=pertamensaje.obtenerMensaje(65).getMensaje() %>" class="enlace"></input>
</form><%
%>
</td>
<td class="<%=estilo%>" colspan="2" align="center">
<%
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 botn de resultados
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="<%=pertamensaje.obtenerMensaje(64).getMensaje() %>" class="enlace"></input>
</form><%
}
else
{
fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF");
if(fichero.exists())
{
//mostrar el botn de resultados
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="<%=pertamensaje.obtenerMensaje(64).getMensaje() %>" class="enlace"></input>
</form><%
}
else
{
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
}
}
%>
</td>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="2">
<table border="0" align="center">
<tr>
<%if (pertacon.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(<%=pertacon.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (pertacon.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">&uacute;ltimo</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=pertacon.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=pertacon.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0) %>
</table>
<%
}
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)
{
%>
<table border="0" align="center" width="100%">
<%if (intPagina != 0){ %>
<tr>
<td colspan="2" align="right"><span class="txt">P&aacute;gina <%=perttmov.getPaginacion().getNumeroPagina()%> de <%=perttmov.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<% }%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(18).getMensaje() %></td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(16).getMensaje() %></td>
</tr>
<%
String estilo = "";
for(int i=0;i<vSeleccion.size();i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
Taconaut tacon = new Taconaut();
tacon = (Taconaut)vSeleccion.get(i);
//Vuelvo a buscar en taconaut por si la primera vez no ha encontrado la autorizacion porque tarjeta=0 y tarjeta_chipcard=nulll
Vector vSeleccion2 = pertacon.ObtenerAutorizacionADM(Long.parseLong(tacon.getAutorizacion()));
if (vSeleccion2.size()>0){
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, ""))
{*/
%>
<tr>
<td class="<%=estilo%>" align="center"><%= tacon.getAutorizacion()%></td>
<td class="<%=estilo%>" align="center">
<%
//mostrar el botn de resultados
%><form name="resultados" action="../adm/mto_taconaut.jsp?x=2" target="blank" method="post">
<input type="hidden" name="autorizacion" value="<%=tacon.getAutorizacion() %>" />
<input type="submit" value="Ver Detalle" class="enlace"></input>
</form><%
%>
</td>
<td class="<%=estilo%>" align="center">
<%
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 botn de resultados
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form><%
}
else
{
fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF");
if(fichero.exists())
{
//mostrar el botn de resultados
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form><%
}
else
{
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
}
}
%>
</td>
</tr>
<%
/* }
else
{ */
%>
<!-- <tr><td class="txt"><%=pertamensaje.obtenerMensaje(14).getMensaje() %></td></tr> -->
<%
// }
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="2">
<table border="0" align="center">
<tr>
<%if (perttmov.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(<%=perttmov.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (perttmov.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">&uacute;ltimo</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=perttmov.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=perttmov.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0) %>
</table>
<%
}
else
{
%>
<table border="0" align="center">
<tr><td class="txtnegrita"><%=pertamensaje.obtenerMensaje(13).getMensaje() %></td></tr>
</table>
<%
}
}
}
%>
<tr><td class="txt"><%=mensaje %></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci&oacute;n de la p&aacute;gina al usuario.");
response.sendRedirect("../error.jsp");
}
}
LogTarisan.logger.log(NivelLog.INFO, "Final p&aacute;gina de mantenimiento de autorizaciones (adm/mto_taconaut.jsp)");
%>
+309
View File
@@ -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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Detalle de usuario</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
function enviar()
{
//comprobamos que el se haya modificado el combobox o el checkbox
if ((document.frmUsuario.reset_clave.checked == true) || ((document.frmUsuario.bloqueado.value)!=(document.frmUsuario.valor_bloqueo_clave.value))){
document.frmUsuario.submit();
alert("Usuario modificado");
} else{
alert("No has modificado ningún valor");
}
}
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frmUsuario.valor_password.focus()">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="90px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<%
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());
%>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<form name="frmUsuario" action="../../servlet/GestorAdministracion" method="post">
<td>
<table border="0" align="center">
<tr>
<td align="right"><span class="txtnegrita">Código: </span></td></td>
<td><input type="text" size="20" name="medico" class="txt" readonly="yes" value="<%=tamedico.getMedico()%>" maxlength="6"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Resetear clave: </span></td>
<td><input name="reset_clave" type="checkbox" value="" /></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Nombre: </span></td>
<td><input type="text" size="80" name="nombre" class="txt" readonly="yes" value="<%=tamedico.getNombre()%>" maxlength="255"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Apellidos: </span></td>
<td><input type="text" size="80" name="apellidos" class="txt" readonly="yes" value="<%=tamedico.getApellidos()%>" maxlength="255"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Especialidad: </span></td></td>
<td><input type="text" size="4" name="especialidad" class="txt" readonly="yes" value="<%=tamedico.getEspecialidad()%>" maxlength="20"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Bloqueo: </span></td></td>
<td><select name="valor_bloqueo_clave"><%if (bloqueo.equals("S")
) {%>
<option selected="selected" value="S">Si</option>
<option value="N">No</option>
<%
}
else
{
%>
<option selected="selected" value="N">No</option>
<option value="S">Si</option>
<% } %>
</select></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Ultimo acceso: </span></td></td>
<td><input type="text" size="15" name="fecha_ult_acceso" class="txt" readonly="yes" value="<%=fechaUltAcceso%>" maxlength="10"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Caducidad de clave: </span></td></td>
<td><input type="text" size="15" name="valor_fecha_modif_clave" class="txt" value="<%=fechaCaducidad%>" maxlength="10" onblur="javascript:valorFecha(this)"></td>
</tr>
<tr>
<td colspan="2" align="center"><a href="javascript:frmUsuario.reset();frmUsuario.valor_password.focus()" class="enlace">Deshacer</a>&nbsp;&nbsp;&nbsp;<a href="javascript:enviar()" class="enlace">Aceptar</a></td>
</tr>
</table>
</td>
<input type="hidden" name="x" value="<%=strParametroMenu%>">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_USUARIO_DETALLE%>">
<input type="hidden" name="bloqueado" value="<%=bloqueo%>">
</form>
</tr>
<%
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(ExcepcionTarisan ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "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)");
%>
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

+330
View File
@@ -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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Lista de Usuarios</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function buscar()
{
document.frmListaUsuarios.pagina.value = 1;
pasarAMayusculas(document.frmListaUsuarios.apellido);
document.frmListaUsuarios.submit();
}
function paginacion(pagina)
{
document.frmListaUsuarios.pagina.value = pagina;
pasarAMayusculas(document.frmListaUsuarios.apellido);
document.frmListaUsuarios.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="document.frmListaUsuarios.apellido.focus();">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="90px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<form name="frmListaUsuarios" action="lista_usuarios.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.apellido)">
<td colspan="3">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Apellido: </span></td>
<td><input type="text" size="50" name="apellido" class="txt" value="<%=strCampoApellido%>"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<%
PersistenciaUsuario per = new PersistenciaUsuario();
Vector vSeleccion = per.listado_usuarios(intPagina, strCampoApellido);
if (vSeleccion.size() == 0) //No se han encontrado datos
{
%>
<!-- No hay registros -->
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<!-- No hay registros -->
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<!-- Hay registros -->
<tr>
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Apellidos</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
</tr>
<%
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);
%>
<tr>
<td class="<%=estilo%>" align="left"><a href="./detalle_usuario.jsp?x=0&medico=<%= tamedico.getMedico() %>" class="enlace"><%=tamedico.getApellidos()%></a></td>
<td class="<%=estilo%>" align="left"><%=tamedico.getNombre()%></td>
<td class="<%=estilo%>" align="center"><%=tamedico.getMedico()%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="3"></td></tr>
<tr>
<td colspan="3">
<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)
%>
<!-- Hay registros -->
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "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)");
%>
+235
View File
@@ -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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Mantenimiento actos imputados</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
function buscar()
{
document.frm_buscar.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="90px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<%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());
%>
<table border="0" align="center" width="100%">
<%
if(resul != null)
{
if(resul.size()>0)
{
%>
<tr><td class="txt">Fecha</td><td class="txt">Acto</td><td class="txt">Especialidad</td><td class="txt">M&eacute;dico</td></tr>
<%
for(int i=0; i<resul.size();i++)
{
Tamovext tamo = new Tamovext();
tamo = (Tamovext)resul.get(i);
%>
<tr><td class="txt"><%=Utilidades.formatear_fecha(tamo.getFecha()) %></td><td class="txt"><%=tamo.getActo() %></td><td class="txt"><%=tamo.getEspecialidad() %></td><td class="txt"><%=tamo.getMedico() %></td></tr>
<%
}
%>
<tr><td class="txt"><form name="frm_buscar" action="mto_taconaut.jsp?x=<%=strParametroMenu%>" method="post" ><input type="hidden" class="txt" id="autorizacion" name="autorizacion" value="<%=CampoAutorizacion %>"/><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></form></td></tr>
<%
}
}
else
{
%>
<tr><td class="txt">No se han encontrado movimientos <br/>imputados a esa autorizaci&oacute;n</td></tr>
<%
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "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)");
%>
+411
View File
@@ -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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Mantenimiento Actos</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
var modificado = 0;
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function MostrarActos(especialidad){
if (document.getElementById("mto_esp").value != 0){
document.getElementById("hiddenEspecialidad").value = document.getElementById("mto_esp").value;
document.getElementById("hiddenActo").value = "";
document.frmActos.submit();
}
}
function enviar(){
if (modificado == 1){
for (i=0;i<document.getElementById("nElementos").value;i++){
document.getElementById("hiddenNivel"+(i+1)).value = document.getElementById("mto_nivel"+(i+1)).value;
}
document.frmActosNiveles.submit();
alert("Nivel modificado");
} else{
alert("No has modificado ningun valor");
}
}
function paginacion(pagina){
document.getElementById("pagina").value = pagina;
document.getElementById("hiddenEspecialidad").value = document.getElementById("mto_esp").value;
document.frmActos.submit();
}
function buscar()
{
document.getElementById("pagina").value = 1;
pasarAMayusculas(document.getElementById("acto"));
document.getElementById("hiddenActo").value = document.getElementById("acto").value;
document.frmActos.submit();
}
-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<!-- Zona central //-->
<td width="565">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td colspan="3">
<table border="0" align="center">
<tr>
<td align="right"><span class="txtnegrita">Especialidad: </span></td>
<% PersistenciaTanivelEspecialidadTanivelActo per = new PersistenciaTanivelEspecialidadTanivelActo();
Vector vSeleccion = per.obtenerEspecialidades();
if (vSeleccion.size() == 0) //No se han encontrado datos
{
%>
<!-- No hay registros -->
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<!-- No hay registros -->
<%
}else{
%>
<td><select id="mto_esp" name="especialidades" onchange="MostrarActos()">
<option value=0>-- Seleccionar --</option>
<%
TanivelEspecialidad TanivEsp = null;
for(int i = 0; i < vSeleccion.size(); i++)
{
TanivEsp = (TanivelEspecialidad)vSeleccion.elementAt(i);
String descripcion = "";
descripcion = per.ObtenerDescripcion(TanivEsp.getEspecialidad());
%>
<option value="<%=TanivEsp.getEspecialidad()%>" <%=(strParametroEspe.compareTo(String.valueOf(TanivEsp.getEspecialidad()))==0)?"selected=selected":"" %>><%=descripcion %></option>
<%
}
%>
</select></td>
<% }
%>
</tr>
</table>
</td>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<% 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
{
%>
<!-- No hay registros -->
<table>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
</table>
<!-- No hay registros -->
<%
}else{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<!-- Hay registros -->
<tr>
<td colspan="3">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Descripcion Acto: </span></td>
<td><input type="text" size="50" name="acto" id="acto" class="txt" value="<%=strDescripcionActo%>"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
</tr>
<table cellpadding="0" border="0" width="90%" align="center">
<tr>
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr><form name="frmActosNiveles" action="../../servlet/GestorAdministracion" method="post">
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Codigo</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nivel</td>
</tr>
<%
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";
}
%>
<tr>
<td class="<%=estilo%>" align="center"><span class="txtnegrita"><%=TanivAct.getActo()%> </span></td>
<td class="<%=estilo%>" align="center"><span class="txtnegrita"><%=descripcionActo%> </span></td>
<td class="<%=estilo%>" align="center"><select id="mto_nivel<%=(i+1) %>" name="mto_visibilidad" onchange="modificado=1">
<option value=1 <%=(1==TanivAct.getNivel())?"selected=selected":"" %>>1</option>
<option value=2 <%=(2==TanivAct.getNivel())?"selected=selected":"" %>>2</option>
<option value=3 <%=(3==TanivAct.getNivel())?"selected=selected":"" %>>3</option>
</td>
<td><input type="hidden" name="hiddenActo<%=(i+1) %>" id="hiddenActo<%=(i+1) %>" value="<%=TanivAct.getActo()%>"></td>
<td><input type="hidden" name="hiddenNivel<%=(i+1)%>" id="hiddenNivel<%=(i+1)%>" value=""></td>
<td><input type="hidden" name="nElementos" id="nElementos" value="<%=vTanivAct.size()%>"></td>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="3"></td></tr>
<tr>
<td colspan="3">
<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)
%>
<input type="hidden" name="hiddenEspe" value="<%=strParametroEspe%>">
<tr>
<td><input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_ACT_NIVEL_ACTO%>"></td>
<td colspan="2" align="right"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
</tr>
</form>
</td>
</tr>
</table>
<%
}
}
%>
<form name="frmActos" action="../../servlet/GestorAdministracion" method="post">
<input type="hidden" name="pagina" id="pagina" value="1">
<input type="hidden" id="hiddenEspecialidad" name="hiddenEspecialidad" value="<%=Integer.parseInt(strParametroEspe)%>">
<input type="hidden" id="hiddenActo" name="hiddenActo" value="<%=strDescripcionActo%>">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_NIVELES_ACT%>">
</form>
</table>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "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)");
%>
+176
View File
@@ -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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Mantenimiento de Analíticas</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<!-- Zona central //-->
<td width="565">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
<td colspan="2" align="center"><a href="mto_niveles.jsp?x=3" class="enlace">Mantenimiento de niveles</a></td>
<td colspan="2" align="center"><a href="mto_actos.jsp?x=3" class="enlace">Mantenimiento de actos</a></td>
</tr>
</table>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "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)");
%>
+383
View File
@@ -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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Mantenimiento Niveles</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
var modificado = 0;
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function MostrarNiveles(especialidad){
if (document.getElementById("mto_esp").value != 0){
document.getElementById("hiddenEspecialidad").value = document.getElementById("mto_esp").value;
document.getElementById("hiddenEspecialidadSolicitada").value = 0;
document.frmNiveles.submit();
}
}
function MostrarEspecialidadesSolicitadas(){
if (document.getElementById("mto_esp_sol").value != 0){
document.getElementById("hiddenEspecialidadSolicitada").value = document.getElementById("mto_esp_sol").value;
document.frmNiveles.submit();
}
}
function enviar()
{
if (modificado == 1){
document.getElementById("hiddenVisi1").value = document.getElementById("mto_visibilidad1").value;
document.getElementById("hiddenVisi2").value = document.getElementById("mto_visibilidad2").value;
document.getElementById("hiddenVisi3").value = document.getElementById("mto_visibilidad3").value;
document.frmNivVis.submit();
alert("Visibilidad modificada");
} else{
alert("No has modificado ningun valor");
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<!-- Zona central //-->
<td width="565">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td colspan="3">
<table border="0" align="center">
<tr>
<td>&nbsp;</td>
<td align="right"><span class="txtnegrita">Especialidad: </span></td>
<% PersistenciaTanivelEspecialidadTanivelActo per = new PersistenciaTanivelEspecialidadTanivelActo();
Vector vSeleccion = per.obtenerEspecialidades();
if (vSeleccion.size() == 0) //No se han encontrado datos
{
%>
<!-- No hay registros -->
<td colspan="3" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
<%
}else{
%>
<td><select id="mto_esp" name="especialidades" onchange="MostrarNiveles()">
<option value=0>-- Seleccionar --</option>
<%
TanivelEspecialidad TanivEsp = null;
for(int i = 0; i < vSeleccion.size(); i++)
{
TanivEsp = (TanivelEspecialidad)vSeleccion.elementAt(i);
String descripcion = "";
descripcion = per.ObtenerDescripcion(TanivEsp.getEspecialidad());
%>
<option value="<%=TanivEsp.getEspecialidad()%>" <%=(strParametroEspe.compareTo(String.valueOf(TanivEsp.getEspecialidad()))==0)?"selected=selected":"" %>><%=descripcion %></option>
<%
}
%>
</select></td>
<% }
%>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<br/>
<% if (Integer.parseInt(strParametroEspe)!=0){
%>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td align="right"><span class="txtnegrita">Especialidad Solicitada: </span></td>
<%
Vector vTanivEspeSolicitada = new Vector();
vTanivEspeSolicitada = per.obtenerEspecialidadesSolicitadas(Integer.parseInt(strParametroEspe));
if (vTanivEspeSolicitada.size() == 0) //No se han encontrado datos
{
%>
<!-- No hay registros -->
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt"><%=tamensaje.getMensaje() %></span></td>
</tr>
<!-- No hay registros -->
<%
}else{
%>
<td><select id="mto_esp_sol" name="mto_esp_sol" onchange="MostrarEspecialidadesSolicitadas()">
<option value=0>-- Seleccionar --</option>
<%
TanivelEspecialidad TanivEspe = null;
for(int i = 0; i < vTanivEspeSolicitada.size(); i++)
{
TanivEspe = (TanivelEspecialidad)vTanivEspeSolicitada.elementAt(i);
String descripcionEspSol = "";
descripcionEspSol = per.ObtenerDescripcion(TanivEspe.getEspecialidad());
%>
<option value="<%=TanivEspe.getEspecialidad()%>"<%=(strParametroEspeSol.compareTo(String.valueOf(TanivEspe.getEspecialidad()))==0)?"selected=selected":"" %>><%=descripcionEspSol %></option>
<%
}
%>
</select></td>
<% }
%>
</tr>
</table>
<br/>
<br/>
<% 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
{
%>
<!-- No hay registros -->
<table>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt"><%=tamensaje.getMensaje() %></span></td>
</tr>
</table>
<!-- No hay registros -->
<%
}else{
%>
<form name="frmNivVis" action="../../servlet/GestorAdministracion" method="post">
<table cellpadding="0" border="0" width="90%" align="center">
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nivel</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Visibilidad</td>
</tr>
<%
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";
}
%>
<tr>
<td class="<%=estilo%>" align="center"><span class="txtnegrita"><%=TanivEsp.getNivel()%> </span></td>
<td class="<%=estilo%>" align="center"><select id="mto_visibilidad<%=(i+1) %>" name="mto_visibilidad" onchange="modificado=1">
<option value=0 <%=(0==TanivEsp.getVisibilidad())?"selected=selected":"" %>>0 - Invisible</option>
<option value=1 <%=(1==TanivEsp.getVisibilidad())?"selected=selected":"" %>>1 - Permitido</option>
<option value=2 <%=(2==TanivEsp.getVisibilidad())?"selected=selected":"" %>>2 - Justificable</option>
</td>
<td><input type="hidden" name="hiddenNivel<%=(i+1) %>" id="hiddenNivel<%=(i+1) %>" value="<%=TanivEsp.getNivel()%>"></td>
<td><input type="hidden" name="hiddenVisi<%=(i+1)%>" id="hiddenVisi<%=(i+1)%>" value=""></td>
</tr>
<%
}
%>
<input type="hidden" name="hiddenEspe" value="<%=strParametroEspe%>">
<input type="hidden" name="hiddenEspeS" value="<%=strParametroEspeSol%>">
<tr>
<td><input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_ACT_VISIBILI%>"></td>
<td colspan="2" align="right"><a href="javascript:enviar()" class="enlace">Aceptar</a></td>
</tr>
</table>
</form>
<%
}
}
}
%>
<form name="frmNiveles" action="../../servlet/GestorAdministracion" method="post">
<input type="hidden" id="hiddenEspecialidad" name="hiddenEspecialidad" value="<%=strParametroEspe%>">
<input type="hidden" id="hiddenEspecialidadSolicitada" name="hiddenEspecialidadSolicitada" value="<%=strParametroEspeSol%>">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_GES_NIVELES_ESPE%>">
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "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)");
%>
+465
View File
@@ -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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Mantenimiento autorizaciones</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function buscar()
{
/*if(document.frm_buscar.medico.value.length == 0)
{
alert("Introduce un numero de medico");
document.frm_buscar.medico.focus();
}
else */ if(isNaN(document.frm_buscar.medico.value))
{
alert("Solo puede introducir números en el campo médico");
document.frm_buscar.medico.value = "";
document.frm_buscar.medico.focus();
}
else if(document.frm_buscar.colectivo.value.length == 0)
{
alert("Introduce un numero de colectivo");
document.frm_buscar.colectivo.focus();
}
else if(isNaN(document.frm_buscar.colectivo.value))
{
alert("Solo puede introducir números en el campo colectivo");
document.frm_buscar.colectivo.value = "";
document.frm_buscar.colectivo.focus();
}
else if(document.frm_buscar.poliza.value.length == 0)
{
alert("Introduce un numero de poliza");
document.frm_buscar.poliza.focus();
}
else if(isNaN(document.frm_buscar.poliza.value))
{
alert("Solo puede introducir números en el campo poliza");
document.frm_buscar.poliza.value = "";
document.frm_buscar.poliza.focus();
}
else if(document.frm_buscar.orden.value.length == 0)
{
alert("Introduce un numero de orden");
document.frm_buscar.orden.focus();
}
else if(isNaN(document.frm_buscar.orden.value))
{
alert("Solo puede introducir números en el campo orden");
document.frm_buscar.orden.value = "";
document.frm_buscar.orden.focus();
}
else
{
document.frm_buscar.submit();
}
}
function actualizar()
{
if(document.actualizar_autorizacion.cantidad.value < 0)
{
alert("Introduce un numero de sesiones disponibles valido")
document.actualizar_autorizacion.cantidad.focus();
}
else if (document.actualizar_autorizacion.cantidad.value.length < 1)
{
alert("Introduce un numero de sesiones disponibles valido")
document.actualizar_autorizacion.cantidad.focus();
}
else
{
document.actualizar_autorizacion.submit();
}
}
function paginacion(pagina)
{
document.frm_buscar.pagina.value = pagina;
document.frm_buscar.submit();
}
function enfocar()
{
if(document.actualizar_autorizacion === undefined)
document.frm_buscar.medico.focus();
else
document.actualizar_autorizacion.cantidad.focus();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<form name="frm_buscar" action="mto_peticiones.jsp?x=<%=strParametroMenu%>" method="post" >
<input type="hidden" name="pagina" value="1" />
<table border="0" align="center">
<tr>
<td align="right">
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
</td>
<td>
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(21).getMensaje() %></span>
</td>
<td>
<input size="20" type="text" class="txt" id="colectivo" name="colectivo" <%if(CampoPoliza!=0 ){%>value="<%=CampoColectivo %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(22).getMensaje() %></label>
</td>
<td>
<input size="20" type="text" class="txt" id="poliza" name="poliza" <%if(CampoPoliza!=0){%>value="<%=CampoPoliza %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(23).getMensaje() %></label>
</td>
<td>
<input size="20" type="text" class="txt" id="orden" name="orden" <%if(CampoPoliza!=0){%>value="<%=CampoOrden %>"<%}%>/>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
</td>
</tr>
<tr>
<td colspan="2" align="right">&nbsp;</td>
</tr>
</table>
</form>
<%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");
%>
<table border="0" align="center" width="100%">
<%if (intPagina != 0){ %>
<tr>
<td colspan="2" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<% }%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Peticiones</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver PDF</td>
</tr>
<%
String estilo = "";
for(int i=0;i<vSeleccion.size();i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
%>
<tr>
<td class="<%=estilo%>" align="center"><%= vSeleccion.get(i)%></td>
<td class="<%=estilo%>" align="center">
<%
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
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form><%
}
else
{
fichero = new File(ParametrosConfiguracion.ruta_pdf+vSeleccion.get(i).toString()+".PDF");
if(fichero.exists())
{
//mostrar el botón de resultados
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form><%
}
else
{
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><%
}
}
%>
</td>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="2">
<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">&uacute;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">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0) %>
</table>
<%
}else{
%>
<table border="0" align="center" width="100%">
<tr>
<td class="txtnegrita">No hay peticiones para los datos introducidos</td>
</tr>
</table>
<%
}
}
%>
<tr><td class="txt"><%=mensaje %></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "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)");
%>
+404
View File
@@ -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&aacute;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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
try
{
//Obtenci&oacute;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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Mantenimiento autorizaciones</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function buscar()
{
if(document.frm_buscar.autorizacion.value.length < 3)
{
alert("Introduce un numero de autorizacion valido");
}
else
{
document.frm_buscar.submit();
}
}
function actualizar()
{
if(document.actualizar_autorizacion.cantidad.value < 0)
{
alert("Introduce un numero de sesiones disponibles valido")
document.actualizar_autorizacion.cantidad.focus();
}
else if (document.actualizar_autorizacion.cantidad.value.length < 1)
{
alert("Introduce un numero de sesiones disponibles valido")
document.actualizar_autorizacion.cantidad.focus();
}
else
{
document.actualizar_autorizacion.submit();
}
}
function paginacion(pagina)
{
document.frm_buscar.pagina.value = pagina;
document.frm_buscar.submit();
}
function enfocar()
{
if(document.actualizar_autorizacion === undefined)
document.frm_buscar.autorizacion.focus();
else
document.actualizar_autorizacion.cantidad.focus();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo de navegaci&oacute;n (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<tr><td><a href="<%=request.getContextPath()%>/jsp/adm/descarga_pdfs_autorizaciones.jsp?x=<%=strParametroMenu%>" class="enlace"><%=pertamensaje.obtenerMensaje(31).getMensaje() %></a></td></tr>
<tr><td>&nbsp;</td></tr>
<form name="frm_buscar" action="mto_taconaut.jsp?x=<%=strParametroMenu%>" method="post" >
<tr><td class="txt"><label>N&uacute;mero autorizaci&oacute;n:</label><input type="text" class="txt" id="autorizacion" name="autorizacion"/><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td></tr>
</form>
<tr><td>&nbsp;</td></tr>
<%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)
{
%>
<table>
<tr><td class="txt">Autorizaci&oacute;n</td><td class="txt">Acto</td><td class="txt">Especialidad</td><td class="txt">Cantidad</td></tr>
<%
for(int i=0;i<vSeleccion.size();i++)
{
Taconaut tacon = (Taconaut)vSeleccion.get(i);
%>
<form name="actualizar_autorizacion" action="<%=request.getContextPath()%>/servlet/GestorAdministracion?x=<%=strParametroMenu%>&pagina=1&imp=0" method="post">
<tr><td class="txt"><%=tacon.getAutorizacion() %></td><td class="txt"><%=tacon.getActo() %></td><td class="txt"><%=tacon.getEspecialidad() %></td><td class="txt"><input type="text" name="cantidad" id="cantidad" value="<%=tacon.getCantidad() %>"/></td><td class="txt"><a href="javascript:actualizar()" class="enlace">Actualizar</a></td></tr>
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_ACT_AUTORIZACION %>"/>
<input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>"/>
<input type="hidden" name="acto" value="<%=tacon.getActo() %>"/>
<input type="hidden" name="especialidad" value="<%=tacon.getEspecialidad() %>"/>
</form>
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="movimientos_autorizacion" action="movimientos_tamovext.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Movimientos imputados a esta autorizacion" class="enlace"></form></td></tr>
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="otras_autorizaciones" action="otras_autorizaciones.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Otras Autorizaciones del asegurado" class="enlace"></form></td></tr>
<tr><td></td><td></td><td></td><td></td>
<td class="txt">
<%
String resultado = ""+tacon.getAutorizacion();
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
if(fichero.exists())
{
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="Imprimir Petici&oacute;n" class="enlace"></input>
</form><%
}
else
{
fichero = new File(ParametrosConfiguracion.ruta_pdf+Integer.valueOf(tacon.getAutorizacion()).toString()+".PDF");
if(fichero.exists())
{
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="Imprimir Petici&oacute;n" class="enlace"></input>
</form><%
}
else
{
%><p><%=pertamensaje.obtenerMensaje(15).getMensaje() %></p><%
}
}
%>
</td>
</tr>
<%
}
%>
</table>
<%
}
}
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)
{
%>
<table>
<tr><td class="txt">Autorizaci&oacute;n</td><td class="txt">Acto</td><td class="txt">Especialidad</td><td class="txt">Cantidad</td></tr>
<%
for(int i=0;i<vSeleccion.size();i++)
{
Taconaut tacon = new Taconaut();
tacon = (Taconaut)vSeleccion.get(i);
int gesigu = 0;
if(tacon.getFromGesigu())
gesigu = 1;
if(pertacon.CrearAutorizacionValida(Long.parseLong(tacon.getAutorizacion()), tacon.getMedico(), tacon.getEspecialidad(), tacon.getActo(), tacon.getCantidad(), gesigu, ""))
{
%>
<form name="actualizar_autorizacion" action="<%=request.getContextPath()%>/servlet/GestorAdministracion?x=<%=strParametroMenu%>&pagina=1&imp=0" method="post">
<tr><td class="txt"><%=tacon.getAutorizacion() %></td><td class="txt"><%=tacon.getActo() %></td><td class="txt"><%=tacon.getEspecialidad() %></td><td class="txt"><input type="text" name="cantidad" id="cantidad" value="<%=tacon.getCantidad() %>"/></td><td class="txt"><a href="javascript:actualizar()" class="enlace">Actualizar</as></td></tr>
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_ADM_ACT_AUTORIZACION %>"/>
<input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>"/>
<input type="hidden" name="acto" value="<%=tacon.getActo() %>"/>
<input type="hidden" name="especialidad" value="<%=tacon.getEspecialidad() %>"/>
</form>
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="movimientos_autorizacion" action="movimientos_tamovext.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Movimientos imputados a esta autorizacion" class="enlace"></form></td></tr>
<tr><td></td><td></td><td></td><td></td><td class="txt"><form name="otras_autorizaciones" action="otras_autorizaciones.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="num_aut" value="<%=tacon.getAutorizacion() %>" /><input type="submit" value="Otras Autorizaciones del asegurado" class="enlace"></form></td></tr>
<tr><td></td><td></td><td></td><td></td>
<td class="txt">
<%
String resultado = ""+tacon.getAutorizacion();
//resultado = (resultado.length()<8)?"0"+resultado:resultado;
File fichero = new File(ParametrosConfiguracion.ruta_pdf+resultado+".pdf");
if(fichero.exists())
{
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="Imprimir Petici&oacute;n" class="enlace"></input>
</form><%
}
else
{
fichero = new File(ParametrosConfiguracion.ruta_pdf+Integer.valueOf(tacon.getAutorizacion()).toString()+".PDF");
if(fichero.exists())
{
%><form name="resultados" action="../ver_peticiones_pdf.jsp" target="blank" method="post">
<input type="hidden" name="fichero" value="<%=fichero.getName() %>" />
<input type="submit" value="Imprimir Petici&oacute;n" class="enlace"></input>
</form><%
}
else
{
%><p><%=pertamensaje.obtenerMensaje(15).getMensaje() %></p><%
}
}
%>
</td>
</tr>
<%
}
else
{
%>
<tr><td class="txt"><%=pertamensaje.obtenerMensaje(14).getMensaje() %></td></tr>
<%
}
}
%>
</table>
<%
}
else
{
%>
<tr><td class="txt"><%=pertamensaje.obtenerMensaje(13).getMensaje() %></td></tr>
<%
}
}
}
%>
<tr><td class="txt"><%=mensaje %></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci&oacute;n de la p&aacute;gina al usuario.");
response.sendRedirect("../error.jsp");
}
}
LogTarisan.logger.log(NivelLog.INFO, "Final p&aacute;gina de mantenimiento de autorizaciones (adm/mto_taconaut.jsp)");
%>
+453
View File
@@ -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&aacute;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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
try
{
//Obtenci&oacute;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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Mantenimiento autorizaciones</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function buscar()
{
pasarAMayusculas(document.frm_buscar.apellido1);
pasarAMayusculas(document.frm_buscar.apellido2);
pasarAMayusculas(document.frm_buscar.nombre);
var fechaBuena = true;
if(document.frm_buscar.medico.value.length == 0)
{
alert("Introduce un numero de medico");
document.frm_buscar.medico.focus();
fechaBuena = false;
}
else if(isNaN(document.frm_buscar.medico.value))
{
alert("Solo puede introducir n&uacute;meros en el campo m&eacute;dico");
document.frm_buscar.medico.value = "";
document.frm_buscar.medico.focus();
fechaBuena = false;
}
else if (document.frm_buscar.fecha.value!="")
{
fechaBuena = valorFecha(document.frm_buscar.fecha);
}
if (fechaBuena){
document.frm_buscar.submit();
}
}
function paginacion(pagina)
{
document.frm_buscar.pagina.value = pagina;
document.frm_buscar.submit();
}
function enfocar()
{
document.frm_buscar.medico.focus();
}
function eliminar(medico,fecha,acto,ape1,ape2,nom,espe,numseq,col,pol,orden)
{
if (confirm("Desea eliminaar el acto seleccionado? \n Medico: "+ medico +" -- Acto: "+ acto +" -- Fecha: "+ fecha +" \n Asegurado: "+ ape1.trim() +" "+ ape2.trim() +", "+ nom.trim())) {
document.frm_buscar.eliminar.value=1;
document.frm_buscar.hiddenMedico.value=medico;
document.frm_buscar.hiddenEspecialidad.value=espe;
document.frm_buscar.hiddenActo.value=acto;
document.frm_buscar.hiddenNumseq.value=numseq;
document.frm_buscar.hiddenColectivo.value=col;
document.frm_buscar.hiddenPoliza.value=pol;
document.frm_buscar.hiddenOrden.value=orden;
document.frm_buscar.hiddenFecha.value=fecha;
document.frm_buscar.submit();
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo de navegaci&oacute;n (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<%
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;
}
%>
<form name="frm_buscar" action="mto_tamovext.jsp?x=<%=strParametroMenu%>" method="post" >
<input type="hidden" name="pagina" value="1" />
<input type="hidden" name="eliminar" value="0" />
<input type="hidden" name="hiddenMedico" value="0" />
<input type="hidden" name="hiddenEspecialidad" value="0" />
<input type="hidden" name="hiddenActo" value="0" />
<input type="hidden" name="hiddenNumseq" value="0" />
<input type="hidden" name="hiddenColectivo" value="0" />
<input type="hidden" name="hiddenPoliza" value="0" />
<input type="hidden" name="hiddenOrden" value="0" />
<input type="hidden" name="hiddenFecha" value="0" />
<table border="0" align="center">
<tr>
<td align="right">
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
</td>
<td>
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(25).getMensaje() %></span>
</td>
<td>
<input size="20" type="text" class="txt" id="fecha" name="fecha" <%if(CampoFecha!="" ){%>value="<%=CampoFecha %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(26).getMensaje() %></label>
</td>
<td>
<input size="20" type="text" class="txt" id="apellido1" name="apellido1" <%if(CampoApellido1!=""){%>value="<%=CampoApellido1 %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(27).getMensaje() %></label>
</td>
<td>
<input size="20" type="text" class="txt" id="apellido2" name="apellido2" <%if(CampoApellido2!=""){%>value="<%=CampoApellido2 %>"<%}%>/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(28).getMensaje() %></label>
</td>
<td>
<input size="20" type="text" class="txt" id="nombre" name="nombre" <%if(CampoNombre!=""){%>value="<%=CampoNombre %>"<%}%>/>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
</td>
</tr>
<tr>
<td colspan="2" align="right">&nbsp;</td>
</tr>
</table>
<%if(CampoMedico > 0)
{
PersistenciaTamovext per = new PersistenciaTamovext();
Vector<Object[]> 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");
%>
<table border="0" align="center" width="100%">
<%if (intPagina != 0){ %>
<tr>
<td colspan="5" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<% }%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">M&eacute;dico</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Asegurado</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td>
</tr>
<%
String estilo = "";
for(int i=0;i<vSeleccion.size();i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
Object[] aResultados = vSeleccion.elementAt(i);
%>
<tr>
<td class="<%=estilo%>" align="center"><%= aResultados[0] %></td>
<td class="<%=estilo%>" align="center"><%= aResultados[1] %> </td>
<td class="<%=estilo%>" align="center"><%= aResultados[2] %></td>
<td class="<%=estilo%>" align="center"><%= aResultados[4] +" "+ aResultados[5] +", "+ aResultados[6]%> </td>
<%if ((Integer.valueOf(aResultados[3].toString())) != 32){ %>
<td class="<%=estilo%>" align="center"><a href="javascript:eliminar(<%= aResultados[0] %>,'<%= aResultados[1] %>',<%= aResultados[2] %>,'<%= aResultados[4] %>','<%= aResultados[5] %>','<%= aResultados[6] %>',<%= aResultados[7] %>,<%= aResultados[8] %>,<%= aResultados[9] %>,<%= aResultados[10] %>,<%= aResultados[11] %>)" class="enlace">Eliminar</a></td>
<% }else { %>
<td class="<%=estilo%>" align="center">Adeslas</td>
<%} %>
</tr>
</form>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<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">&uacute;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">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0) %>
</table>
<%
}else{
%>
<table border="0" align="center" width="100%">
<tr>
<td class="txtnegrita"><%=pertamensaje.obtenerMensaje(29).getMensaje() %></td>
</tr>
</table>
<%
}
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci&oacute;n de la p&aacute;gina al usuario.");
response.sendRedirect("../error.jsp");
}
}
LogTarisan.logger.log(NivelLog.INFO, "Final p&aacute;gina de mantenimiento de actos imputados (adm/mto_tamovext.jsp)");
%>
+233
View File
@@ -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 + "&nbsp;";
}
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("<br/>", " ");
}
}
//Lo pongo a false para que no salga la noticia
mostrarNoticia = false;
%>
<html>
<head>
<title>Mantenimiento autorizaciones</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
function buscar(aut)
{
document.frm_buscar.autorizacion.value = aut;
document.frm_buscar.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<%PersistenciaTTMovaut perttmov = new PersistenciaTTMovaut();
Vector resul = perttmov.ObtenerAutorizacionesPoliza(CampoAutorizacion);
%>
<form name="frm_buscar" action="mto_taconaut.jsp?x=<%=strParametroMenu%>" method="post" ><input type="hidden" class="txt" id="autorizacion" name="autorizacion" value=""/></form>
<table border="0" align="center" width="100%">
<%
if(resul != null)
{
if(resul.size()>0)
{
%>
<tr><td class="txt">Autorizacion</td><td class="txt">Fecha</td><td class="txt">Especialidad</td><td class="txt">M&eacute;dico</td><td class="txt">Detalles</td></tr>
<%
for(int i=0; i<resul.size();i++)
{
TTMovaut ttmov = new TTMovaut();
ttmov = perttmov.ObtenerAutorizacionTTmovaut((Integer)resul.get(i));
%>
<tr><td class="txt"><%=ttmov.get_autorizacion() %></td><td class="txt"><%=Utilidades.formatear_fecha(ttmov.get_fecha_autorizacion()) %></td><td class="txt"><%=ttmov.get_especialidad1() %></td><td class="txt"><%=ttmov.get_medico() %></td><td class="txt"><a href="javascript:buscar(<%=ttmov.get_autorizacion() %>)" class="enlace">Ver</a></td></tr>
<%
}
}
}
else
{
%>
<tr><td class="txt">No se han encontrado autorizaciones <br/>para este asegurado</td></tr>
<%
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "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)");
%>
+236
View File
@@ -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("<br/>", " ");
}
}
//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!";
}
}
%>
<html>
<head>
<title>Mantenimiento de Analíticas</title>
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function ponerCambios()
{
document.frmCrearArchivo.crearArchivo.value=1;
document.frmCrearArchivo.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<td width="5%">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<td width="565">
<form name="frmCrearArchivo" action="<%=request.getContextPath()%>/jsp/adm/poner_en_produccion.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="crearArchivo" value="">
</form>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="1px" bgcolor="#CCCCCC" height="50px"></td>
<td colspan="2" align="center"><h4 style="color:#43881A"><b>PONER CAMBIOS EN PRODUCCI&Oacute;N</b></h4></td>
</tr>
<tr>
<td width="1px" bgcolor="#CCCCCC" height="30px"></td>
<td colspan="2" align="center"><p style="color:#666666;font-size: small;">Genera el archivo <b>/tmp/ponerCambios/semaforo.txt</b>. Hay un crontab que se ejecuta cada noche y sube los cambios simepre que encuentre el archivo.</p></td>
</tr>
<tr>
<td width="1px" bgcolor="#CCCCCC"></td>
<td colspan="2" align="center"><p style="color:#666666;font-size: small;">El crontab ejecuta el archivo <b>/root/tarisan_en_produccion_crontab.sh</b></p></td>
</tr>
<tr>
<td width="1px" bgcolor="#CCCCCC" height="80px"></td>
<td colspan="2" align="center"><input type="button" name="btnPonerCambios" value='Activar Semáforo' onclick="javascript:ponerCambios()"></td>
</tr>
<%
if (intMensaje == 1){
%>
<tr>
<td width="1px" bgcolor="#CCCCCC" height="80px"></td>
<td colspan="2" align="center"><p class="franquicias"><%=strMensaje %></p></td>
</tr>
<%
}
%>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "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)");
%>
+131
View File
@@ -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);
%>
<html>
<head>
<title>Simulación usuarios</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath() %>/css/jquery.modal.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_adm.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/jquery.modal.min.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function entrar()
{
if(document.frm_simular.USUARIO.value.length == 0)
{
//alert("Introduce un numero de medico o pulse en Cancelar");
modal({type:'error',title:'¡Atención!',text:'Introduce un numero de medico o pulse en Cancelar.',});
document.frm_simular.USUARIO.focus();
}
else
{
document.frm_simular.SIMULADO.value=1;
document.frm_simular.submit();
}
}
function cancelar()
{
document.frm_simular.USUARIO.value=<%= usuario%>;
document.frm_simular.SIMULADO.value=0;
document.frm_simular.submit();
}
function volver()
{
document.frm_volver.submit();
}
function SePulsaEnter(event) {
if (event.which == 13 && !event.shiftKey) {
event.preventDefault();
entrar();
}
}
//-->
</script>
</head>
<body alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frm_simular.USUARIO.focus();" style="background-color:#FFFFFF">
<div style="width:250px; margin:0 auto; margin-top:30px; border:1px solid rgb(192, 35, 49);">
<table border="0" align="center" width="100%" >
<tr>
<td></td>
</tr>
<tr>
<td class="tituloTabla" align="center">SIMULACIÓN DE USUARIOS</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td>
<form name="frm_simular" action="../../servlet/Login" method="post" >
<input type="hidden" name="SIMULADO" id="SIMULADO" value="1">
<table border="0" align="center">
<tr>
<td align="right">
<span class="txtnegrita">Usuario:</span>
</td>
<td>
<input size="20" type="text" class="txt" id="USUARIO" name="USUARIO" value="" onkeypress="SePulsaEnter(event)"/>
</td>
</tr>
<tr>
<td align="right"></td>
<td align="right">
<a href="javascript:entrar()" class="enlace">Entrar</a>&nbsp;&nbsp;<a href="javascript:volver()" class="enlace">Cancelar</a>
</td>
</tr>
</table>
</form>
<form name="frm_volver" action="../../html/login.html" method="post" >
</form>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
</div>
</body>
</html>
+178
View File
@@ -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();
%>
<html>
<head>
<title>Cambio de clave</title>
<link rel="shortcut icon" href="../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../css/estilos.css">
<script language="JavaScript" src="../js/funciones.js"></script>
<script language="JavaScript" src="../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../js/bloques_tarisan.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function enviar()
{
var blnFormularioValido = true;
//comprobamos si la clave nueva es vacia o esta rellena solo con espacios
if (blnFormularioValido && esVacia(frmClave.clave_nueva.value))
{
alert("La clave es vac&iacute;a o contiene &uacute;nicamente espacios en blanco. Introduzca una clave v&aacute;lida.");
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
//comprobamos que el tama&ntilde;o de la clave nueva no sea < 6
if (blnFormularioValido && frmClave.clave_nueva.value.length<6)
{
alert("La clave debe tener como m&iacute;nimo 6 caracteres.");
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
//comprobamos que el valor de las claves introducidas sean iguales
if (blnFormularioValido && frmClave.clave_nueva.value != frmClave.confirmar_clave.value)
{
alert("Las claves introducidas no conciden.");
frmClave.clave_nueva.value="";
frmClave.confirmar_clave.value="";
frmClave.clave_nueva.focus();
blnFormularioValido=false;
}
if (blnFormularioValido)
document.frmClave.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="document.frmClave.clave_nueva.focus();">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
</table>
</td>
</tr>
</table>
<!-- Cuerpo de la pagina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menu de navegacion del modulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td>
<table cellpadding="0" cellspacing="0" border="0" width="165">
<tr valign="top">
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOff"><b>CLAVE DE ACCESO</b></td>
</tr>
</table>
</td>
<td><img src="../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la pagina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="90px"></td>
<td class="txt" valign="top">
<img src="../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td colspan="2" class="txtnegrita" align="center">Por favor introduzca su nueva clave de acceso</td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<form name="frmClave" action="../servlet/GestorMedicos" method="post">
<td>
<table border="0" align="center">
<tr>
<td align="right"><span class="txtnegrita">Clave nueva: </span></td></td>
<td><input type="password" size="30" name="clave_nueva" class="txt" value="" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Confirmar clave: </span></td></td>
<td><input type="password" size="30" name="confirmar_clave" class="txt" value="" maxlength="50"></td>
</tr>
<tr>
<td colspan="2" align="center"><a href="javascript:frmClave.reset();frmClave.clave_nueva.focus()" class="enlace">Deshacer</a>&nbsp;&nbsp;&nbsp;<a href="javascript:enviar()" class="enlace">Aceptar</a>&nbsp;&nbsp;&nbsp;<a href="javascript:history.back();" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ACTUALIZAR_ACCESO%>">
</form>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<%
}
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)");
%>
+193
View File
@@ -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" %>
<html>
<head>
<title>Entorno gr&aacute;fico</title>
</head>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="ffffff">
<%
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("<hr>");
out.print("Fecha = " + dia + "/" + mes + "/" + ano);
out.print("&nbsp;&nbsp;&nbsp;&nbsp;");
out.print("Hora = " + hora + ":" + minutos + ":" + segundos);
out.print("<hr>");
%>
<b><i><font size="+1">Entorno gr&aacute;fico</font></i></b>
<hr>
<%
out.println("<font size=\"-1\"><ul>");
out.println("<li><b>awt.toolkit: </b>" + System.getProperties().get("awt.toolkit"));
out.println("<li><b>java.awt.graphicsenv: </b>" + System.getProperties().get("java.awt.graphicsenv"));
out.println("</ul></font>");
try
{
out.println("<font size=\"-1\"><ul>");
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
out.println("<li><b>GraphicsEnvironment </b>--> " + ge);
out.println("</ul></font>");
GraphicsDevice gd = ge.getDefaultScreenDevice();
out.println("<font size=\"-1\"><ul>");
out.println("<li><b>GraphicsDevice default</b>--> " + gd);
out.println("</ul></font>");
GraphicsDevice[] gds = ge.getScreenDevices();
GraphicsConfiguration[] gc = null;
GraphicsConfiguration bestGc = null;
out.println("<font size=\"-1\"><ul>");
for(int i = 0; i < gds.length; i++)
{
out.println("<li><b>GraphicsDevice[" + i + "] </b>--> " + gds[i] + "; getType()=" + gds[i].getType() + "; getIDstring()=" + gds[i].getIDstring());
gc = gds[i].getConfigurations();
out.println("<font size=\"-1\"><ul>");
for(int j = 0; j < gc.length; j++)
{
out.println("<li><b>GraphicsConfiguration[" + j + "] </b>--> " + gc[j] + "; getColorModel()=" + gc[j].getColorModel() + "; getDevice()=" + gc[j].getDevice());
}
out.println("<li><b>GraphicsConfiguration default </b>--> " + gds[i].getDefaultConfiguration());
out.println("</ul></font>");
}
out.println("</ul></font>");
Font[] fuentes = ge.getAllFonts();
out.println("<font size=\"-1\"><ul>");
for(int i = 0; i < fuentes.length; i++)
{
out.println("<li><b>Fuente[" + i + "] </b>--> nombre:" + fuentes[i].getFontName() + ", familia " + fuentes[i].getFamily());
}
out.println("</ul></font>");
String[] familias = ge.getAvailableFontFamilyNames();
out.println("<font size=\"-1\"><ul>");
for(int i = 0; i < familias.length; i++)
{
out.println("<li><b>Familia[" + i + "] </b>--> " + familias[i]);
}
out.println("</ul></font>");
}
catch(Throwable ex)
{
out.println("<li><b>Excepción en manejo de entorno gráfico:</b> " + ex);
}
out.println("<hr>");
out.println("</b>Prueba de clases de java.awt</b>");
out.println("<font size=\"-1\"><ul>");
try
{
Color color = new Color(100, 125, 12);
out.println("<li>Color --> " + color);
}
catch(Throwable ex)
{
out.println("<li>Excepción en Color --> " + ex);
}
try
{
Frame ventana = new Frame("ventana de prueba");
out.println("<li>Frame --> " + ventana);
}
catch(Throwable ex)
{
out.println("<li>Excepción en Frame --> " + ex);
}
try
{
Button boton = new Button("botón de prueba");
out.println("<li>Button --> " + boton);
}
catch(Throwable ex)
{
out.println("<li>Excepción en Button --> " + ex);
}
try
{
Font fuente = new Font("LucidaSansRegular", Font.PLAIN, 12);
out.println("<li>Fuente --> " + fuente);
}
catch(Throwable ex)
{
out.println("<li>Excepción en Font --> " + ex);
}
try
{
TextField campo = new TextField("campo de texto");
out.println("<li>TextField --> " + campo);
}
catch(Throwable ex)
{
out.println("<li>Excepción en TextField --> " + ex);
}
out.println("</ul></font>");
%>
<hr>
</body>
</html>
+247
View File
@@ -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("<br/>", " ");
}
}
}
%>
<html>
<head>
<title>Error en Tarisan</title>
<link rel="shortcut icon" href="../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../css/estilos.css">
<script language="JavaScript" src="../js/funciones.js"></script>
<script language="JavaScript" src="../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../js/bloques_tarisan.js"></script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr>
<%
if(usuario == null)
{
%>
<td class="tituloTablaMedico" align="center">&nbsp;</td>
<%
}
else
{
%>
<td class="tituloTablaMedico" align="center"><%= usuario %></td>
<%
}
%>
</tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Logotipo de IMQ de Navarra
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>//-->
<!-- Datos del usuario conectado
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<%
if(usuario == null)
{
%>
<td class="tituloTabla" align="center">&nbsp;</td>
<%
}
else
{
%>
<td class="tituloTabla" align="center"><%= usuario %></td>
<%
}
%>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>//-->
<!-- Cuerpo de la pá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="../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td>
<table cellpadding="0" cellspacing="0" border="0" width="165">
<tr valign="top">
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOff"><b>MENSAJE</b></td>
</tr>
</table>
</td>
<td><img src="../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td> -->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
<td width="1px" bgcolor="#CCCCCC"></td>
<td class="txt" valign="top">
<img src="../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<tr><td>&nbsp;</td></tr>
<tr><td class="txtnegrita" align="center"><%= mensaje %></td></tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td class="txt" align="center">Contacte con el administrador del sistema</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center"><a href="<%=destino %>" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página de error (error.jsp)");
%>
+223
View File
@@ -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("<br/>", " ");
}
}
}
%>
<html>
<head>
<title>Error en Tarisan</title>
<link rel="shortcut icon" href="../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../css/estilos.css">
<script language="JavaScript" src="../js/funciones.js"></script>
<script language="JavaScript" src="../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../js/bloques_tarisan.js"></script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr>
<%
if(usuario == null)
{
%>
<td class="tituloTablaMedico" align="center">&nbsp;</td>
<%
}
else
{
%>
<td class="tituloTablaMedico" align="center"><%= usuario %></td>
<%
}
%>
</tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Logotipo de IMQ de Navarra
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td align="center"><img src="../img/Logo_rosca.jpg" border="0"></td>
</tr>
</table>
<br>//-->
<!-- Datos del usuario conectado
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<%
if(usuario == null)
{
%>
<td class="tituloTabla" align="center">&nbsp;</td>
<%
}
else
{
%>
<td class="tituloTabla" align="center"><%= usuario %></td>
<%
}
%>
</tr>
<tr>
<td bgcolor="#C02331"><img src="img/sp.gif" width="746" height="1" border="0"></td>
</tr>
</table>
<br>//-->
<!-- Cuerpo de la pá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="../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td>
<table cellpadding="0" cellspacing="0" border="0" width="165">
<tr valign="top">
<td width="16" class="menuBack"><img src="../img/gen_bullet_cerrado.gif" name="bullet" width="16" height="12" border="0"></td>
<td width="150" class="menuOff"><b>MENSAJE</b></td>
</tr>
</table>
</td>
<td><img src="../img/sp.gif" width="14" height="261" border="0"></td>
</tr>
</table>
</td>
<td bgcolor="#CCCCCC"><img src="../img/sp.gif" width="1" height="12" border="0"></td>
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="../img/sp.gif" width="4" height="261" border="0"></td>
<td class="txt" valign="top">
<img src="../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<tr><td>&nbsp;</td></tr>
<tr><td class="txtnegrita" align="center"><%= mensaje %></td></tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td class="txt" align="center"><%=pertamensaje.obtenerMensaje(32).getMensaje() %></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center"><a href="javascript:history.back();" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página de error (errorIguala.jsp)");
%>
+51
View File
@@ -0,0 +1,51 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ 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);
%>
<html>
<head>
<title>Control de Horas</title>
</head>
<body>
<script>
var hora_actual = new Date()
hora = hora_actual.getHours();
minutos = hora_actual.getMinutes();
if (hora<10)
hora="0"+hora;
if (minutos<10)
minutos="0"+minutos;
document.write("<b>Hora de JavaScript: </b>");
document.write(hora+":"+minutos)
</script>
<br>
<b>Hora del Calendar: </b><%=calendario.getTime()%>
<br>
<b>Hora del Calendar (con TimeZone): </b><%=calendario.getTime()%>
<br>
<b>Hora del Date: </b><%=fecha%>
</body>
</html>
+174
View File
@@ -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");
%>
<html>
<head>
<title>Impresión Autorización</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function escribirListaElementos()
{
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
var strInforme = top.self.opener.obtenerInformePrescripcion();
var texto="<table border='0' width='100%' cellpadding='5' cellspacing='0'>";
if (vElementos.length==0) //no hay ningun elemento
texto+= "<tr><td width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
else //hay algun elemento
{
for (var i=0; i<vElementos.length; i++)
{
texto+= "<tr><td width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
}
if (strInforme!="")
{
texto += "<tr><td width='2%' class='txtImpresion' colspan='2'>&nbsp;</td></tr>";
texto += "<tr><td class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + strInforme + "</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();
}
}
//-->
</script>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="5" align="left">
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><hr width="100%"></hr></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="5" align="left">
<tr>
<td class="txtImpresion" nowrap>Nº de póliza:</td>
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
<td class="txtImpresion">&nbsp;&nbsp;&nbsp;</td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
</tr>
<tr>
<td colspan="2" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
<td colspan="3">
<table border="0" cellpadding="0">
<tr>
<td class="txtImpresion">Nº Solicitud:</td>
<td class="txtImpresion"><%=strAutorizacion%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="5" class="txtImpresion">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="left" class="txtImpresion">Ruego faciliten las siguientes autorizaciones:</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="5" align="left">
<tr>
<td class="txtImpresion"><%=strCentro%></td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
escribirListaElementos();
imprimirHTML();
//-->
</script>
</body>
</html>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
//-->
</script>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de peticion de autorizacion (imp/impAutorizacion.jsp)");
%>
+140
View File
@@ -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&aacute;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&oacute;n invalidada");
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion_sesion.html';
//-->
</script>
<%
}
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;
%>
<html>
<head>
<title>Impresi&oacute;n Detalle Pacientes</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
</head>
<body>
<table width="100%" border="0" cellpadding="5">
<tr>
<td class="txtImpresion" colspan="3"><hr width="100%"></hr></td>
</tr>
<tr>
<td class="txtImpresion" colspan="3" align="left">--- RELAci&oacute;n ACTOS M&eacute;dicoS REALIZADOS ---</td>
</tr>
<tr>
<td colspan="3">
<table border="0">
<tr>
<td class="txtImpresion">FECHA:</td>
<td class="txtImpresion"><%=strFecha%></td>
<td class="txtImpresion">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="txtImpresion" colspan="3"><hr width="100%"></hr></td>
</tr>
<tr>
<td class="txtImpresion" align="left">Nombre Paciente</td>
<td class="txtImpresion" align="left">Acto realizado</td>
<td class="txtImpresion" align="right">Importe</td>
</tr>
<tr>
<td class="txtImpresion" colspan="3"><hr width="100%"></hr></td>
</tr>
<%
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();
%>
<tr>
<td class="txtImpresion" align="left"><%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%></td>
<td class="txtImpresion" align="left"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
<td class="txtImpresion" align="right"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
%>
<tr>
<td class="txtImpresion" colspan="3">&nbsp;</td>
</tr>
<tr>
<td class="txtImpresion" colspan="3">&nbsp;</td>
</tr>
<tr>
<td class="txtImpresion"></td>
<td class="txtImpresion" align="left">Importe ....</td>
<td class="txtImpresion" align="right"><%=Utilidades.formatearDouble(dblImporteTotal,PersistenciaParametros.decimales)%></td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
imprimirHTML();
//-->
</script>
</body>
</html>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
//-->
</script>
<%
}
}
LogTarisan.logger.log(NivelLog.INFO, "Final p&aacute;gina impresion de pacientes (imp/impDetallePacientes.jsp)");
%>
+164
View File
@@ -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");
%>
<html>
<head>
<title>Impresión Diagnóstico</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function escribirListaElementos()
{
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
var strInforme = top.self.opener.obtenerInformePrescripcion();
var texto="<table border='0' width='100%' cellpadding='5' cellspacing='0'>";
if (vElementos.length==0) //no hay ningun elemento
texto+= "<tr><td width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
else //hay algun elemento
{
for (var i=0; i<vElementos.length; i++)
{
texto+= "<tr><td width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
}
if (strInforme!="")
{
texto += "<tr><td width='2%' class='txtImpresion' colspan='2'>&nbsp;</td></tr>";
texto += "<tr><td class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + strInforme + "</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();
}
}
//-->
</script>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="5" align="left">
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><hr width="100%"></hr></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="5" align="left">
<tr>
<td class="txtImpresion" nowrap>Nº de póliza:</td>
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
<td class="txtImpresion">&nbsp;&nbsp;&nbsp;</td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
</tr>
<tr>
<td colspan="2" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
<td colspan="3">
<table border="0" cellpadding="0">
<tr>
<td class="txtImpresion">Nº Autorización:</td>
<td class="txtImpresion"><%=strAutorizacion%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="5" class="txtImpresion">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="left" class="txtImpresion">Ruego faciliten las siguientes exploraciones:</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
escribirListaElementos();
imprimirHTML();
//-->
</script>
</body>
</html>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
//-->
</script>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de diagnostico (imp/impDiagnostico.jsp)");
%>
+164
View File
@@ -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");
%>
<html>
<head>
<title>Impresión Especialidades</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function escribirListaElementos()
{
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
var strInforme = top.self.opener.obtenerInformePrescripcion();
var texto="<table border='0' width='100%' cellpadding='5' cellspacing='0'>";
if (vElementos.length==0) //no hay ningun elemento
texto+= "<tr><td width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
else //hay algun elemento
{
for (var i=0; i<vElementos.length; i++)
{
texto+= "<tr><td width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
}
if (strInforme!="")
{
texto += "<tr><td width='2%' class='txtImpresion' colspan='2'>&nbsp;</td></tr>";
texto += "<tr><td class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + strInforme + "</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();
}
}
//-->
</script>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="5" align="left">
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><hr width="100%"></hr></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="5" align="left">
<tr>
<td class="txtImpresion" nowrap>Nº de póliza:</td>
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
<td class="txtImpresion">&nbsp;&nbsp;&nbsp;</td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
</tr>
<tr>
<td colspan="2" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
<td colspan="3">
<table border="0" cellpadding="0">
<tr>
<td class="txtImpresion">Nº Autorización:</td>
<td class="txtImpresion"><%=strAutorizacion%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="5" class="txtImpresion">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="left" class="txtImpresion">Ruego autoricen las siguientes exploraciones:</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
escribirListaElementos();
imprimirHTML();
//-->
</script>
</body>
</html>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
//-->
</script>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de especialidades (imp/impEspecialidades.jsp)");
%>
+131
View File
@@ -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.";
%>
<html>
<head>
<title>Impresión Facturación</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function escribirListaElementos()
{
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
var texto="<table border='0' cellpadding='5' cellspacing='0'>";
if (vElementos.length==0) //no hay ningun elemento
texto+= "<tr><td class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
else //hay algun elemento
{
for (var i=0; i<vElementos.length; i++)
{
texto+= "<tr><td class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
}
}
document.all.elementos.innerHTML = texto + "</table>";
}
//-->
</script>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="5" align="left">
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><hr width="100%"></hr></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="5" align="left">
<tr>
<td class="txtImpresion">Nº de póliza:</td>
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
<td class="txtImpresion">&nbsp;&nbsp;&nbsp;</td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
</tr>
<tr>
<td colspan="5" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
</tr>
<tr>
<td colspan="5" class="txtImpresion">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="left" class="txtImpresion">Asistencia prestada</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
escribirListaElementos();
imprimirHTML();
//-->
</script>
</body>
</html>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
//-->
</script>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de facturacion (imp/impFacturacion.jsp)");
%>
+156
View File
@@ -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.";
%>
<html>
<head>
<title>Impresión Recetas</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function escribirListaElementos()
{
var mensajeSinElementos = "<%=strMensajeSinElementos%>";
var vElementos = top.self.opener.obtenerArrayListaElementosPrescripcion();
var strInforme = top.self.opener.obtenerInformePrescripcion();
var texto="<table border='0' width='100%' cellpadding='5' cellspacing='0'>";
if (vElementos.length==0) //no hay ningun elemento
texto+= "<tr><td align='left' width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + mensajeSinElementos + "</td></tr>";
else //hay algun elemento
{
for (var i=0; i<vElementos.length; i++)
{
texto+= "<tr><td align='left' width='2%' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + vElementos[i] + "</td></tr>";
}
if (strInforme!="")
{
texto += "<tr><td align='left' width='2%' class='txtImpresion' colspan='2'>&nbsp;</td></tr>";
texto += "<tr><td align='left' class='txtImpresion'>&nbsp;&nbsp;&nbsp;</td><td class='txtImpresion'>" + strInforme + "</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();
}
}
//-->
</script>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="5" align="left">
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getDireccionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getEspecialidadCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getPoblacionCab()%></td>
</tr>
<tr>
<td align="left" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getColegiadoCab()%></td>
<td align="right" class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getTelefonoCab()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><hr width="100%"></hr></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="5" align="left">
<tr>
<td class="txtImpresion" nowrap>Nº de póliza:</td>
<td class="txtImpresion"><%=Long.toString( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getColectivo() ) + Utilidades.formatearEntero( ((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getPoliza(), 12, 0)%></td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getTarjeta().getBeneficiario()%></td>
<td class="txtImpresion">&nbsp;&nbsp;&nbsp;</td>
<td class="txtImpresion"><%=((Paciente)sesion.getAttribute("PACIENTE")).getNombre()%></td>
</tr>
<tr>
<td colspan="5" align="left" class="txtImpresion"><%=ParametrosConfiguracion.ciudad + ", " + sdfFormateadorFecha.format(dtFecha)%></td>
</tr>
<tr>
<td colspan="5" class="txtImpresion">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="left" class="txtImpresion">DP./</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div id="elementos" style="position:relative;top:0px;left:0px;" class="txtImpresion"></div>
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
escribirListaElementos();
imprimirHTML();
//-->
</script>
</body>
</html>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
//-->
</script>
<%
}
LogTarisan.logger.log(NivelLog.INFO, "Final página impresion de recetas (imp/impRecetas.jsp)");
%>
+154
View File
@@ -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" %>
<HTML>
<BODY>
<%
Date fecha = null;
SimpleDateFormat sdf = new SimpleDateFormat("EEEE dd 'de' MMMM 'de' yyyy',' HH:mm:ss");
Calendar calendario = Calendar.getInstance();
out.print("<hr>");
out.print("Fecha = " + sdf.format(calendario.getTime()));
out.print("<hr>");
HttpSession miSession = request.getSession(true);
Object valor = null;
int total = 0;
Vector salidaListado;
StringBuffer elementoListado;
String nombre;
Enumeration listaSession = miSession.getAttributeNames();
out.print("<br>");
out.print("<b>LISTADO DE LOS OBJETOS DE SESI&Oacute;N</b><br>");
if((listaSession != null) && (listaSession.hasMoreElements()))
{
out.println("<font size=-1><ul>" );
ByteArrayOutputStream o;
ObjectOutputStream buf;
boolean serial;
salidaListado = new Vector();
for(; listaSession.hasMoreElements();)
{
serial = false;
nombre = (String)listaSession.nextElement();
elementoListado = new StringBuffer();
elementoListado.append("<li><b>");
elementoListado.append(nombre);
elementoListado.append("</b>");
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("</font></ul>" );
out.println( "<b>TOTAL(aproximado) = " + total + " bytes</b>" );
}
else
{
out.println( "No existen objetos almacenados en la sesión" );
}
out.print("<hr>");
out.print("<br>");
out.print("<b>LISTADO DE LAS COOKIES</b><br>");
Cookie[] listaCookies = request.getCookies();
if((listaCookies != null) && (listaCookies.length > 0))
{
Cookie unaCookie;
int duracion;
salidaListado = new Vector();
out.println("<font size=-1><ul>" );
for(int ind = 0; ind < listaCookies.length; ind++)
{
unaCookie = listaCookies[ind];
elementoListado = new StringBuffer();
elementoListado.append("<li><b>");
elementoListado.append(unaCookie.getName());
elementoListado.append("</b> --> ");
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("</font></ul>" );
}
else
{
out.println( "No existen cookies" );
}
%>
</BODY>
</HTML>
+343
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Actos Médicos</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
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.frmActosMedicos.nombre.value=lstCampoBusqueda;
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function buscar()
{
document.frmActosMedicos.pagina.value=1;
pasarAMayusculas(document.frmActosMedicos.nombre);
document.frmActosMedicos.submit();
}
function paginacion(pagina)
{
document.frmActosMedicos.pagina.value=pagina;
pasarAMayusculas(document.frmActosMedicos.nombre);
document.frmActosMedicos.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:informarParametroCampoBusqueda()">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<form name="frmActosMedicos" action="actos.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
<td colspan="3">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Descripción: </span></td>
<td><input type="text" size="50" name="nombre" class="txt"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<%
PersistenciaTtactmed per = new PersistenciaTtactmed();
Vector vSeleccion = per.listadoActosMedico(intTarifa, intEspecialidad, strCampoNombre, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" 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="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Importe</td>
</tr>
<%
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);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="left"><%=TTACTMED.getDescripcion()%></td>
<td class="<%=estilo%>" align="center"><%=TTACTMED.getActo()%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(TTACTMED.getPrecio(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="3"></td></tr>
<tr>
<td colspan="3">
<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>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de actos médicos (med/gestor.jsp)");
}
%>
+604
View File
@@ -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&aacute;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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p&aacute;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&iacute;tica esta pte de extraccion para indicarlo en el apartado de regenerar pdf */
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
Object aCondiciones[]=null;
//Obtenci&oacute;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("<br/>", " ");
}
}
%>
<html>
<head>
<title>An&aacute;lisis</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmAnalisis.pagina.value=pagina;
document.frmAnalisis.ap1.value=document.getElementById("buscar_apellido1").value.toUpperCase();
document.frmAnalisis.ap2.value=document.getElementById("buscar_apellido2").value.toUpperCase();
document.frmAnalisis.nom.value=document.getElementById("buscar_nombre").value.toUpperCase();
document.frmAnalisis.submit();
}
function enviar_frmAnalitica(valor)
{
obj=document.getElementById(valor);
obj.submit();
}
function buscarPaciente(){
document.frmAnalisis.ap1.value=document.getElementById("buscar_apellido1").value.toUpperCase();
document.frmAnalisis.ap2.value=document.getElementById("buscar_apellido2").value.toUpperCase();
document.frmAnalisis.nom.value=document.getElementById("buscar_nombre").value.toUpperCase();
document.frmAnalisis.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<form name="frmAnalisis" action="analisis.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
<input type="hidden" name="ap1" value="">
<input type="hidden" name="ap2" value="">
<input type="hidden" name="nom" value="">
</form>
<tr>
<td colspan="4" align="center" style="background-color:#EBEBEB">
<span class="txtnegrita" align="right">Apellido1: </span>
<input size="15" id="buscar_apellido1" name="buscar_apellido1" class="txt" value="<%=strApe1%>" maxlength="50" type="text">
<span class="txtnegrita" align="right">Apellido2: </span>
<input size="15" id="buscar_apellido2" name="buscar_apellido2" class="txt" value="<%=strApe2%>" maxlength="50" type="text">
<span class="txtnegrita" align="right">Nombre: </span>
<input size="15" id="buscar_nombre" name="buscar_nombre" class="txt" value="<%=strNom%>" maxlength="50" type="text">
<a href="javascript:buscarPaciente()" class="enlace">Buscar</a>
</td>
</tr>
<%
//Creaci&oacute;n de la tabla presentaci&oacute;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
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(10).getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="4" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver Resultados</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Regenerar Resultados</td>
</tr>
<%
//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);
%>
<tr class="trResultados">
<%
if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
{
%>
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
<td class="<%=estilo%>" align="left"><%=/*vTaresanaTaclient.getNombre() + " " + */vTaresanaTamedico.getApellidos()%></td>
<%
}
else //campo autorizacion tiene un valor valido
{
%>
<td class="<%=estilo%>" align="center">
<%
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&oacute;n
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="4"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%>" class="enlacePeticion"></input>
</form>
<%
}else{
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la ubicaci&oacute;n vieja
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="15"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%>" class="enlacePeticion"></input>
</form>
<%
}else{
%>
<span align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></span>
<%
}
}
%>
</td>
<td class="<%=estilo%>" align="center">
<%
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&oacute;n
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="4"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=nombreCompleto%>" class="enlacePeticion"></input>
</form>
<%
}else{
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la ubicaci&oacute;n vieja
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="15"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=nombreCompleto%>" class="enlacePeticion"></input>
</form>
<%
}else{
%>
<span align="center"><%=nombreCompleto%></span>
<%
}
}
%>
</td>
<td class="<%=estilo%>" align="center">
<%
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&iacute;tica est&aacute; pendiente de extracci&oacute;n
if(vTaresanaTamedico.getIgualada().compareTo("0") != 0){ //Comprobar si se trata de una autorizaci&oacute;n que est&aacute; en Tarisan y GPC
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getIgualada()*/igualadaE%>">
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form>
<%
}else{
if(vTaresanaTamedico.isPeticionConGuion())
{
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizacion con gui&oacute;n");
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getAutorizacion()*/resultadoE%>">
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form>
<%
}
else if(vTaresanaTamedico.getAutorizacion() < 999999 && !(vTaresanaTamedico.getAutorizacion()>700000 && vTaresanaTamedico.getAutorizacion()<799999))
{
LogTarisan.logger.log(NivelLog.DEBUG, "Autorizacion < 999999");
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getAutorizacion()*/resultadoE%>">
<input type="submit" value="Ver Resultado" class="enlace"></input>
</form>
<%
}
else{
//PAC.ruta_pdf
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_analiticas;
File fichero = new File(direccion+resultado+".pdf");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="1"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
fichero = new File(direccion+resultado+".PDF");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="1"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
direccion = ParametrosConfiguracion.ruta_pdf_resultados;
fichero = new File(direccion+resultado+".pdf");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="16"/>
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
fichero = new File(direccion+resultado+".PDF");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="16"/>
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
%><p><%=pertamensaje.obtenerMensaje(6).getMensaje() %></p><% //Resultados Pendientes
}
}
}
}
}
}
}else if(vTaresanaTamedico.getExtraccion()==3){
/* Controlamos las peticiones anuladas desde GPC */
pteExtraccion = 3;
%><p>Petici&oacute;n anulada en GPC</p><%
}
else {
pteExtraccion = 1;
%><p>Pendiente de Extracci&oacute;n</p><%
}
%>
<td class="<%=estilo%>" align="center">
<%
if(usu.getMedico() == vTaresanaTamedico.getPrescriptor() && pteExtraccion==0)
{
if(vTaresanaTamedico.getIgualada().compareTo("0") != 0){ //Comprobar si se trata de una autorizaci&oacute;n que est&aacute; en Tarisan y GPC
//File fichero = new File(ParametrosConfiguracion.ruta_pdf_resultados_analiticas+Long.valueOf(igua.toString())+".pdf");
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*igua*/igualadaE%>">
<input type="hidden" name="borrarPDF" value="1">
<input type="submit" value="Regenerar" class="enlace"></input>
</form>
<%
}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");
%>
<form name="frmAnalitica" action="<%=request.getContextPath()%>/servlet/resultados_analisis" method="post" target="_blank" style="margin-bottom: 0px;">
<input type="hidden" name="requestID" value="<%=/*vTaresanaTamedico.getAutorizacion()*/resultadoE%>">
<input type="hidden" name="borrarPDF" value="1">
<input type="submit" value="Regenerar" class="enlace"></input>
</form>
<%
}else{
%><p>PDF no regenerable</p><%
}
}
}
else
{
pteExtraccion = 0;
%><p>PDF no regenerable</p><%//Pendiente de Autorizaci&oacute;n del paciente
}
%>
</td>
</td>
<%
strSql_requestid.delete(0,strSql_requestid.length());
}
%>
</tr>
<%
}
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">&uacute;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">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
</table>
</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="1"/>
<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(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&aacute;gina de analisis (med/analisis.jsp)");
}
%>
+509
View File
@@ -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<String> archivos = new Vector<String>();
boolean mostrarNoticia = true;
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
Vector vNoticias = new Vector();
String strNoticia = "";
String noticias ="";
String separador = " ---//--- ";
if(vSeleccionNot.size()==0){
mostrarNoticia = false;
}else{
mostrarNoticia = true;
Tanoticias tanoticia = null;
for(int i = 0; i < vSeleccionNot.size(); i++)
{
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
if (i!=0){
strNoticia = strNoticia + separador + tanoticia.getNoticia();
}else{
strNoticia = tanoticia.getNoticia();
}
strNoticia = strNoticia.replaceAll("<br/>", " ");
}
}
%>
<html>
<head>
<title>Anatomía Patológica</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmAnalisis.pagina.value=pagina;
document.frmAnalisis.submit();
}
function enviar_frmAnalitica(valor)
{
obj=document.getElementById(valor);
obj.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<td width="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="../../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">
<!-- 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" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<form name="frmAnalisis" action="ap.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//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
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(10).getMensaje() %></span></td>
</tr>
<%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver Resultados</td>
</tr>
<%
//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);
%>
<tr class="trResultados">
<%
if (vTaresanaTamedico.getAutorizacion() == 0) //campo autorizacion nulo o inicializado a 0. Valor no valido.
{
%>
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></td>
<td class="<%=estilo%>" align="left"><%=/*vTaresanaTaclient.getNombre() + " " + */vTaresanaTamedico.getApellidos()%></td>
<%
}
else //campo autorizacion tiene un valor valido
{
%>
<td class="<%=estilo%>" align="center">
<%
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
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="6"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%>" class="enlacePeticion"></input>
</form>
<%
}else{
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la ubicación vieja
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="15"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%>" class="enlacePeticion"></input>
</form>
<%
}else{
%>
<span align="center"><%=sdfFormateadorFecha.format(vTaresanaTamedico.getFecha())%></span>
<%
}
}
%>
</td>
<td class="<%=estilo%>" align="center">
<%
ruta = ParametrosConfiguracion.ruta_pdf_peticiones_ap;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la nueva ubicación
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="6"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=vTaresanaTamedico.getApellidos()%>" class="enlacePeticion"></input>
</form>
<%
}else{
ruta = ParametrosConfiguracion.ruta_pdf_peticiones;
ficheroPeticion = new File(ruta+peticion+".pdf");
if(ficheroPeticion.exists()) //Busco en la ubicación vieja
{
%>
<form name="frmPeticiones" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="15"/>
<input type="hidden" name="nombrePDF" value="<%=peticionE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=vTaresanaTamedico.getApellidos()%>" class="enlacePeticion"></input>
</form>
<%
}else{
%>
<span align="center"><%=vTaresanaTamedico.getApellidos()%></span>
<%
}
}
%>
</td>
<td class="<%=estilo%>" align="center">
<%
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<String> children = Utilidades.buscar_ficheros_array(episodio, archivos);*/
/*String[] children = Utilidades.buscar_ficheros3(episodio,direccion);*/
Vector<String> children = Utilidades.buscar_ficheros(episodio,direccion);
if (children.size()==0) {
%><p>No hay PDF</p><%
}
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);
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="21"/>
<input type="hidden" name="nombrePDF" value="<%=dirE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
}
}else{
//PAC.ruta_pdf
String direccion = ParametrosConfiguracion.ruta_pdf_resultados_anatomia;
File fichero = new File(direccion+resultado+".pdf");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="2"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
fichero = new File(direccion+resultado+".PDF");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="2"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
direccion = ParametrosConfiguracion.ruta_pdf_resultados;
fichero = new File(direccion+resultado+".pdf");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="16"/>
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
fichero = new File(direccion+resultado+".PDF");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="16"/>
<input type="hidden" name="nombrePDF" value="<%=/*fichero.getName()*/resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"></input>
</form><%
}
else
{
%><p>No hay PDF<!-- < %=/*pertamensaje.obtenerMensaje(6).getMensaje()*/ %>--></p><% //Resultados Pendientes
}
}
}
}
}
}
else
{
%>
<p><%=pertamensaje.obtenerMensaje(7).getMensaje() %></p>
<%
}
%>
</td>
<%
strSql_requestid.delete(0,strSql_requestid.length());
}
%>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="3"></td></tr>
<tr>
<td colspan="3">
<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>
</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="1"/>
<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(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)");
}
%>
+396
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Peticiones capturadas</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function seleccionar(nom,ape,dir,fec,tel,nif,ent,tar){
document.frm_seleccionar.nom.value = nom;
document.frm_seleccionar.ape.value = ape;
document.frm_seleccionar.dir.value = dir;
document.frm_seleccionar.fec.value = fec;
document.frm_seleccionar.tel.value = tel;
document.frm_seleccionar.nif.value = nif;
document.frm_seleccionar.ent.value = ent;
document.frm_seleccionar.tar.value = tar;
document.frm_seleccionar.submit();
}
function paginacion(pagina,tro)
{
document.frm_buscar.pagina.value = pagina;
document.frm_buscar.troque.value = tro;
document.frm_buscar.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<form name="frm_buscar" action="buscar_paciente.jsp?x=16" method="post">
<input type="hidden" name="pagina" value="">
<input type="hidden" name="troque" value="">
</form>
<!-- Presentacion de los resultados -->
<%
//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
{%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt">No se ha encontrado el paciente</span></td>
</tr>
<%
}
else //no existe un analisis previo. Se muestran los datos de la prescripcion.
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="8" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Direccion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha Nacimiento</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Telefono</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Dni</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Compañia</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Tarjeta</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Seleccionar</td>
</tr>
<%
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();
}
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=nom + " " + ape%></td>
<td class="<%=estilo%>" align="left"><%=dir%></td>
<td class="<%=estilo%>" align="center"><%=fec%></td>
<td class="<%=estilo%>" align="left"><%=tel%></td>
<td class="<%=estilo%>" align="center"><%=nif%></td>
<td class="<%=estilo%>" align="left"><%=ent%></td>
<td class="<%=estilo%>" align="left"><%=tar%></td>
<td class="<%=estilo%>" align="center"><a href="javascript:seleccionar('<%=nom%>','<%=ape%>','<%=dir%>','<%=fec%>','<%=tel%>','<%=nif%>','<%=ent%>','<%=tar%>')" class="enlace">Seleccionar</a></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="2"></td></tr>
<tr>
<td colspan="8">
<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,'<%=troquelado%>')" class="enlace">primero</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>,'<%=troquelado%>')" 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%>,'<%=troquelado%>')" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>,'<%=troquelado%>')" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="8" align="center">
<form name="frmVolver" action="introducir_paciente.jsp?x=16&pagina=1" method="post">
<input type="submit" value="Volver" class="enlace">
</form>
</td>
</tr>
<form name="frm_seleccionar" action="introducir_paciente.jsp?x=16&pagina=1" method="post" >
<input type="hidden" name="pagina" value="1" />
<input type="hidden" name="buscarPaciente" value="1" />
<input type="hidden" name="troque" value="" />
<input type="hidden" name="nom" value="" />
<input type="hidden" name="dir" value="" />
<input type="hidden" name="fec" value="" />
<input type="hidden" name="tel" value="" />
<input type="hidden" name="nif" value="" />
<input type="hidden" name="ent" value="" />
<input type="hidden" name="ape" value="" />
<input type="hidden" name="tar" value="" />
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de buscar pacientes (med/buscar_paciente.jsp)");
}
%>
+426
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Cabecera</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function enviar()
{
elem=document.getElementsByName("ch");
if (elem[0].checked && elem[1].checked) {
//alert("Debe marcar una sola posición para el logotipo");
modal({type:'error',title:'¡Atención!',text:'Debe marcar una sola posición para el logotipo.',});
}
else if( (document.getElementById("verImagen").title!="") && (!elem[0].checked && !elem[1].checked) ){
//alert("Debe marcar una posición para el logotipo");
modal({type:'error',title:'¡Atención!',text:'Debe marcar una posición para el logotipo.',});
}
else if( (document.getElementById("verImagen").title=="") && (elem[0].checked || elem[1].checked) ){
//alert("No puedes marcar una posición porque no tienes seleccionado ningun logotipo");
modal({type:'error',title:'¡Atención!',text:'No puedes marcar una posición porque no tienes seleccionado ningun logotipo.',});
for(i=0;i<elem.length;i++) {
if (elem[i].checked) {
elem[i].checked = false;
}
}
}else{
if (elem[0].checked) {
document.frmCabecera.valor_logo_cab.value = elem[0].value;
}else if (elem[1].checked) {
document.frmCabecera.valor_logo_cab.value = elem[1].value;
}
if ((document.frmCabecera.valor_email_cab.value != "") && (!validarEmail(document.frmCabecera.valor_email_cab.value))){
modal({type:'error',title:'¡Atención!',text:'Debe introducir una direccion de correo válida.',callback: function(result){document.frmCabecera.valor_email_cab.focus();}});
}else{
document.frmCabecera.submit();
}
}
}
function eliminarLogo()
{
document.frmLogo.eliminar.value = 1;
document.frmLogo.submit();
}
function posicionarLogotipo()
{
elem=document.getElementsByName("ch");
for(i=0;i<elem.length;i++) {
if (elem[i].checked) { // objeto marcado
/*if (i==0){
elem[1].checked=false; // izquierda
}else{
elem[0].checked=false; // derecha
}*/
resultado = elem[i].value;
}
}
document.frmCabecera.valor_logo_cab.value = resultado;
}
-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td align="center" class="txtnegrita">
<%
if (mensaje!="" && mensaje!=null){ //Mostrar mensaje de cambios guardados ok
%>
<p style="color:blue"><%=mensaje %></p>
<%
}
%>
</td>
</tr>
<!-- PRUEBA DEL WEB SERVICE DE APEX //-->
<!--
<tr><td colspan="2"><a href="https://192.168.1.102:8181/ords/comercial/agentes" class="enlace">Probar restful sin parametro</a></td></tr>
<tr><td colspan="2"><a href="https://192.168.1.102:8181/ords/comercial/datos_agente/1" class="enlace">Probar restful con parametro</a></td></tr>
<tr><td colspan="2"><a href="https://192.168.1.102:8181/ords/comercial/actualizar/690369592" class="enlace">Probar restful procedure</a></td></tr>
<tr><td colspan="2">&nbsp;</td></tr> //-->
<%PersistenciaTamedico per = new PersistenciaTamedico(); %>
<tr>
<form name="frmCabecera" action="../../servlet/GestorMedicos" method="post">
<input type="hidden" name="x" value="<%=strParametroMenu%>">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ACTUALIZAR_CABECERA%>">
<input type="hidden" name="valor_logo_cab" value="" />
<td>
<table border="0" align="center">
<tr>
<td align="right"><span class="txtnegrita">Nombre: </span></td>
<td><input type="text" size="50" name="valor_nombre_cab" class="txt" value="<%=usuario.getNombreCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Dirección: </span></td>
<td><input type="text" size="80" name="valor_direccion_cab" class="txt" value="<%=usuario.getDireccionCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Población: </span></td>
<td><input type="text" size="50" name="valor_poblacion_cab" class="txt" value="<%=usuario.getPoblacionCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Teléfono: </span></td>
<td><input type="text" size="30" name="valor_telefono_cab" class="txt" value="<%=usuario.getTelefonoCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Email: </span></td>
<td><input type="text" size="30" name="valor_email_cab" class="txt" value="<%=usuario.getEmailCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Nº de colegiado: </span></td>
<td><input type="text" size="50" name="valor_Colegiado_cab" class="txt" value="<%=usuario.getColegiadoCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita">Especialidad: </span></td>
<td><input type="text" size="60" name="valor_especialidad_cab" class="txt" value="<%=usuario.getEspecialidadCab()%>" maxlength="50"></td>
</tr>
<tr>
<td align="right"></td>
<td></td>
</tr>
<tr>
<td align="right"><span class="txtnegrita"></span></td>
</tr>
<tr>
<td colspan="2" align="center"><a href="javascript:frmCabecera.reset()" class="enlace">Deshacer</a>&nbsp;&nbsp;&nbsp;<a href="javascript:enviar()" class="enlace">Aceptar</a></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<table border="0" align="center">
<fieldset style="border:1px solid #D8D8D8; width:80%; margin:0 auto">
<legend><span class="txtnegrita">Logotipo</span></legend>
<div style="float:left">
<fieldset style="border:1px solid #D8D8D8">
<legend>Posición Recetas</legend>
<form name="frmPosicionLogo" action="javascript:posicionarLogotipo()">
<input type="checkbox" name="ch" onclick="this.form.submit();" value="I" <%=((per.obtenerPosicionLogotipo(intMedico)!=null) && (per.obtenerPosicionLogotipo(intMedico).equals("I")))?"checked=checked":"" %>/>IZQUIERDA<br/>
<input type="checkbox" name="ch" onclick="this.form.submit();" value="D" <%=((per.obtenerPosicionLogotipo(intMedico)!=null) && (per.obtenerPosicionLogotipo(intMedico).equals("D")))?"checked=checked":"" %>/>DERECHA
</form>
</fieldset>
</div>
<div style="float:left">
<form name="frmLogo" enctype="multipart/form-data" action="../../../JavaBridgeTemplate621/uploader3.php" method="POST">
<input name="uploadedfile" type="file" /><br/><br/>
<input type="submit" value="Subir logotipo" />
<input type="hidden" name="medico" value="<%=intMedico %>" />
<input type="hidden" name="eliminar" value="" />
</form>
<br/><br/>
<a href="javascript:eliminarLogo()" class="enlace">Eliminar</a>
</div>
<div style="float:right">
<%
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
%>
<img id="verImagen" title=1 src="../../logotipos/<%=intMedico%>.jpg" width="80" height="80" style="border:1px solid grey" hspace="20"></img>
<%
}else if(imagenPNG.exists())
{
%>
<img id="verImagen" title=2 src="../../logotipos/<%=intMedico%>.png" width="80" height="80" style="border:1px solid grey" hspace="20"></img>
<%
}
else if(imagenGIF.exists())
{
%>
<img id="verImagen" title=3 src="../../logotipos/<%=intMedico%>.gif" width="80" height="80" style="border:1px solid grey" hspace="20"></img>
<%
}
else if(imagenBMP.exists())
{
%>
<img id="verImagen" title=4 src="../../logotipos/<%=intMedico%>.bmp" width="80" height="80" style="border:1px solid grey" hspace="20"></img>
<%
}
else{
//mostrar cuadrado en blanco
%>
<img id="verImagen" title="" src="" width="80" height="80" style="border:0.5px solid grey" hspace="20"></img>
<%
}
%>
</div>
<br/>
</fieldset>
<tr>
<td align="left" class="menuOn">
<%
if (strErrorLogo!=""){ //Mostrar mensaje de error de subida del logo
%>
<h3><%=strErrorLogo %></h3>
<%
}
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<% if (intEmail==1)//Controlar si hay que poner el focus en algun textbox
{
%>
<script language="javascript" type="text/javascript">
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "#FFAAAA"; }, 500);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "white"; }, 1000);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "#FFAAAA"; }, 1500);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "white"; }, 2000);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "#FFAAAA"; }, 2500);
setTimeout(function(){ document.frmCabecera.valor_email_cab.style.backgroundColor = "white"; }, 3000);
document.frmCabecera.valor_email_cab.focus();
</script>
<%
intEmail=0;
} %>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final página de cabecera (med/cabecera.jsp)");
}
%>
+363
View File
@@ -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墔ina 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鏮 invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p墔ina 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鏮 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("<br/>", " ");
}
}
%>
<html>
<head>
<title>I.R.P.F.</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function buscar()
{
var anio = document.frmDetalleIrpf.anio.value;
if ((anio.length<4 || !soloNumeros(anio)) && anio!="")
{
//alert("El a隳 debe ser un valor num廨ico de 4 digitos.");
modal({type:'error',title:'tenci鏮!',text:'El a隳 debe ser un valor num廨ico de 4 digitos.',});
document.frmDetalleIrpf.anio.focus();
}
else
{
document.frmDetalleIrpf.pagina.value=1;
document.frmDetalleIrpf.submit();
}
}
function paginacion(pagina)
{
document.frmDetalleIrpf.pagina.value=pagina;
document.frmDetalleIrpf.submit();
}
function comprobarImpresion(impresion)
{
if (impresion==1) { //se efectua la impresion
document.frmImprimirPeticion.nombrePDF.value = "<%=irpfE%>";
document.frmImprimirPeticion.submit();
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:comprobarImpresion(<%=intImpresion%>);">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci鏮 superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p墔ina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men de navegaci鏮 del m鏚ulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="3">&nbsp;</td></tr>
<%
int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
PersistenciaTaliquimedi perTaliqui = new PersistenciaTaliquimedi();
boolean retencion = perTaliqui.tiene_retencion_por_taliquimedico(intMedico);
if (retencion){
%>
<tr>
<form name="frmDetalleIrpf" action="detalleIRPF.jsp?x=<%=strParametroMenu%>" method="post">
<td colspan="3">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">A隳: </span></td>
<td><input type="text" size="4" name="anio" class="txt" value="<%=strCampoAnio%>" maxlength="4"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<%
PersistenciaTadremed per = new PersistenciaTadremed();
Vector vSeleccion = per.listado_detalle_irpf(strCampoAnio, intMedico/*, intPagina*/);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt">No existe informaci鏮 para el a隳 seleccionado.</span></td>
</tr>
<%
}
else
{
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Importe devengado</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Retenci鏮</td>
</tr>
<%
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);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(tadremed.getFecha())%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(tadremed.getImporte(),PersistenciaParametros.decimales)%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(tadremed.getIrpf(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="center">
<form name="frmLiqui" action="<%=request.getContextPath()%>/servlet/GestorMedicos" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="anio" value="<%=strCampoAnio%>"/>
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_GENERAR_DETALLE_IRPF%>">
<input type="submit" value="Certificado" class="enlace"/>
</form>
</td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
}else{
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><span class="txt">El m嶮ico no tiene retenciones.</span></td>
</tr><%
}
%>
</table>
</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="19"/>
<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(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final p墔ina detalle IRPF (med/detalleIRPF.jsp)");
}
%>
+656
View File
@@ -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&aacute;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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p&aacute;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&oacute;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&ntilde;o para el que desea realizar la impresion
if (request.getParameter("fecha")!=null)
strFecha=(String)request.getParameter("fecha");
//parametro fecha que indica el a&ntilde;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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Pacientes</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmDetallePacientes.borrarActo.value=0;
document.frmDetallePacientes.pagina.value=pagina;
document.frmDetallePacientes.submit();
}
function comprobarFecha()
{
if (document.frmDetallePacientes.fecha.value!="")
{
return valorFecha(document.frmDetallePacientes.fecha);
}
else
{
//alert("Introduzca la fecha.");
modal({type:'error',title:'Atenci&oacute;n!',text:'Introduzca la fecha Desde.',});
document.frmDetallePacientes.fecha.focus();
return false;
}
}
function comprobarFechaHasta()
{
if (document.frmDetallePacientes.fechaHasta.value!="")
{
return valorFecha(document.frmDetallePacientes.fechaHasta);
}
else
{
//alert("Introduzca la fecha.");
modal({type:'error',title:'Atenci&oacute;n!',text:'Introduzca la fecha Hasta.',});
document.frmDetallePacientes.fechaHasta.focus();
return false;
}
}
function fechasCorrectas()
{
var Fecha_aux1 = document.frmDetallePacientes.fecha.value.split("-");
var Fecha1 = new Date(parseInt(Fecha_aux1[2]),parseInt(Fecha_aux1[1]-1),parseInt(Fecha_aux1[0]));
var AnyoFecha1 = Fecha1.getFullYear();
var MesFecha1 = Fecha1.getMonth();
var DiaFecha1 = Fecha1.getDate();
var Fecha_aux2 = document.frmDetallePacientes.fechaHasta.value.split("-");
var Fecha2 = new Date(parseInt(Fecha_aux2[2]),parseInt(Fecha_aux2[1]-1),parseInt(Fecha_aux2[0]));
var AnyoFecha2 = Fecha2.getFullYear();
var MesFecha2 = Fecha2.getMonth();
var DiaFecha2 = Fecha2.getDate();
if (AnyoFecha2 < AnyoFecha1){
modal({type:'error',title:'Atenci&oacute;n!',text:'La fecha Desde debe ser menor que la fecha Hasta.',});
document.frmDetallePacientes.fechaHasta.focus();
return false;
}
else{
if (AnyoFecha1 == AnyoFecha2 && MesFecha2 < MesFecha1){
modal({type:'error',title:'Atenci&oacute;n!',text:'La fecha Desde debe ser menor que la fecha Hasta.',});
document.frmDetallePacientes.fechaHasta.focus();
return false;
}
else{
if (AnyoFecha1 == AnyoFecha2 && MesFecha1 == MesFecha2 && DiaFecha2 < DiaFecha1){
modal({type:'error',title:'Atenci&oacute;n!',text:'La fecha Desde debe ser menor que la fecha Hasta.',});
document.frmDetallePacientes.fechaHasta.focus();
return false;
}
else{
return true;
}
}
}
}
function imprimir()
{
if (comprobarFecha()==true && comprobarFechaHasta()==true) {
//VentanaImpresion('<%=request.getContextPath()%>','<%=request.getContextPath()%>/jsp/imp/impDetallePacientes.jsp?fecha='+document.frmDetallePacientes.fecha.value);
//alert(document.frmDetallePacientes.fecha.value);
if (fechasCorrectas()==true) {
document.frmDetallePacientes.action = "<%=request.getContextPath()%>/servlet/GestorPacientes?OPCION=<%=Constantes.OPC_MED_DETALLE_PACIENTE %>";
document.frmDetallePacientes.submit();
}
}
}
function comprobarImpresion(impresion)
{
if (impresion==1) { //se efectua la impresion
document.frmImprimirPeticion.nombrePDF.value = "<%=detalleE%>";
document.frmImprimirPeticion.submit();
}
}
function cambiar_mes(option)
{
//alert(option.value);
document.frmDetallePacientes.cambio_mes.value=1;
//document.frmDetallePacientes.mes.value=option.value;
document.frmDetallePacientes.borrarActo.value=0;
document.frmDetallePacientes.submit();
}
/*function borrar_acto(medico,fecha,acto,colectivo,poliza,orden,espe,numseq,auto)
{
if(confirm('Seguro que deseas eliminar el acto imputado?'))
{
document.frmDetallePacientes.borrarActo.value=1;
document.frmDetallePacientes.bFecha.value=fecha;
document.frmDetallePacientes.bActo.value=acto;
document.frmDetallePacientes.bMedico.value=medico;
document.frmDetallePacientes.bCol.value=colectivo;
document.frmDetallePacientes.bPol.value=poliza;
document.frmDetallePacientes.bOrd.value=orden;
document.frmDetallePacientes.bEspe.value=espe;
document.frmDetallePacientes.bNumseq.value=numseq;
document.frmDetallePacientes.bAuto.value=auto;
document.frmDetallePacientes.submit();
}
}*/
function borrar_acto(medico,fecha,acto,colectivo,poliza,orden,espe,numseq,auto)
{
modal({
type : 'confirm',
title : 'Atenci&oacute;n!',
text : 'Seguro que deseas eliminar el acto imputado?',
callback: function(result){
if (result){
document.frmDetallePacientes.borrarActo.value=1;
document.frmDetallePacientes.bFecha.value=fecha;
document.frmDetallePacientes.bActo.value=acto;
document.frmDetallePacientes.bMedico.value=medico;
document.frmDetallePacientes.bCol.value=colectivo;
document.frmDetallePacientes.bPol.value=poliza;
document.frmDetallePacientes.bOrd.value=orden;
document.frmDetallePacientes.bEspe.value=espe;
document.frmDetallePacientes.bNumseq.value=numseq;
document.frmDetallePacientes.bAuto.value=auto;
document.frmDetallePacientes.submit();
}
}
});
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:comprobarImpresion(<%=intImpresion%>);">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<%
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);
}
}
%>
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmDetallePacientes" action="detallePacientes.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="listaElementosPrescripcion" value="">
<input type="hidden" name="informePrescripcion" value="">
<input type="hidden" name="borrarActo" value="">
<input type="hidden" name="bFecha" value="">
<input type="hidden" name="bActo" value="">
<input type="hidden" name="bCol" value="">
<input type="hidden" name="bPol" value="">
<input type="hidden" name="bOrd" value="">
<input type="hidden" name="bNumseq" value="">
<input type="hidden" name="bEspe" value="">
<input type="hidden" name="bMedico" value="">
<input type="hidden" name="bAuto" value="">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_DETALLE_PACIENTE%>">
<input type="hidden" id="cambio_mes" name="cambio_mes" value="0">
<tr>
<td colspan="5">
<select name="mes" onchange="cambiar_mes(this);" style="margin-left:2em;">
<option value="<%=fec1 %>" <%=(fec1.compareTo(strMes) == 0)?"selected":"" %>><%=fec1 %></option>
<option value="<%=fec2 %>" <%=(fec2.compareTo(strMes) == 0)?"selected":"" %>><%=fec2 %></option>
<option value="<%=fec3 %>" <%=(fec3.compareTo(strMes) == 0)?"selected":"" %>><%=fec3 %></option>
</select>
</td>
</tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Desde (dd-mm-aaaa): </span></td>
<td><input type="text" size="12" name="fecha" class="txt" value="<%=strFecha%>" maxlength="10"></td>
<td>&nbsp;</td>
<td><span class="txtnegrita">Hasta (dd-mm-aaaa): </span></td>
<td><input type="text" size="12" name="fechaHasta" class="txt" value="<%=strFechaHasta%>" maxlength="10"></td>
<td>&nbsp;</td>
<td><a href="javascript:imprimir()" class="enlace">Imprimir</a></td>
</tr>
</table>
</td>
</tr>
<input type="hidden" name="pagina" value="1">
</form>
<tr><td colspan="4">&nbsp;</td></tr>
<%
//Creaci&oacute;n de la tabla presentaci&oacute;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)){
%><tr><td colspan="5" align="center" class="txtNegrita"><font color="blue">Acto eliminado correctamente</font></td></tr><%
}
}
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
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" 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="5" align="right"><span class="txt">P&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci&oacute;n</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td>
</tr>
<%
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);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%></td>
<td class="<%=estilo%>" align="center"><%=/*vTamovextTaclient.getNombre() + " " + */vTamovextTaclient.getApellidos()%></td>
<td class="<%=estilo%>" align="center"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
<td class="<%=estilo%>" align="center"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
<%
/*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()) {%>
<td class="<%=estilo%>" align="center"><a href="javascript:borrar_acto('<%=vTamovextTaclient.getMedico()%>','<%=sdfFormateadorFecha.format(vTamovextTaclient.getFecha())%>','<%=vTamovextTaclient.getActo()%>','<%=vTamovextTaclient.getColec()%>','<%=vTamovextTaclient.getPoliza()%>','<%=vTamovextTaclient.getOrden()%>','<%=vTamovextTaclient.getEspecialidad()%>','<%=vTamovextTaclient.getNumseq()%>','<%=vTamovextTaclient.getAutorizacion()%>')" class="enlaceAnalisis">Eliminar</a></td>
<%}else{ %>
<td class="<%=estilo%>" align="center">-</td>
<%}%>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<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">&uacute;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">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
} //fin else (vSeleccion.size()!=0)
%>
</table>
</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="9"/>
<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", "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&aacute;gina de pacientes (med/detallePacientes.jsp)");
}
%>
+229
View File
@@ -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&aacute;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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p&aacute;gina de detalle historico de liquidacion (med/detalle_historico_liquidacion.jsp)");
try
{
// Definicion de variables
String strMensajeSinElementos="No ha seleccionado ning&uacute;n acto m&eacute;dico.";
String strParametroMenu="";
String strCampocalendar="";
StringBuffer strSql = new StringBuffer();
int intPagina=0;
Object aCondiciones[]=null;
//Obtenci&oacute;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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Detalle hist&oacuete;rico liquidaci&oacute;n</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
</head>
<script language="javascript" type="text/javascript">
<!--
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<%
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);
%>
<table border="0" align="center" width="100%">
<tr><td>Factura</td><td>Asegurado</td><td>Entidad</td><td>Colectivo</td><td>Poliza</td><td>Orden</td><td>Fecha Gasto</td><td>Descripcion</td></tr>
<%
for(int j=0;j<resul.size();j++)
{
TaliquimediDet t = (TaliquimediDet)resul.get(j);
%>
<tr><td><%=t.getFactura() %></td><td><%=t.getApellidos() %></td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<%
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci&oacute;n de la p&aacute;gina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final p&aacute;gina de detalle historico de liquidacion (med/detalle_historico_liquidacion.jsp)");
}
%>
+317
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Liquidaciones</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacionAnalista.pagina.value=pagina;
document.frmLiquidacionAnalista.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmLiquidacionAnalista" action="detalle_liquidacion_analista.jsp?x=<%=strParametroMenu%>&au=<%=longAutorizacion%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//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<Object[]> vSeleccion = per.MovimientosCapturadosDetallePorAutorizacion(intPagina, intMedico, longAutorizacion, intEspe);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" 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 align="center"><span class="txt">&nbsp;</span></td>
<td align="center"><span class="tituloTabla"><%=vSeleccion.elementAt(0)[1]%> - <%=vSeleccion.elementAt(0)[0]%> - <%=vSeleccion.elementAt(0)[2]%></span></td>
<td align="center"><span class="txt">&nbsp;</span></td>
</tr>
<tr>
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripcion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
</tr>
<%
//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);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=resultados[3]%></td>
<td class="<%=estilo%>" align="left"><%=resultados[4]%></td>
<td class="<%=estilo%>" align="center"><%=resultados[5]%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.getPaginacion().esPrimeraPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><a href="liquidacion_analista.jsp?x=4&pagina=1" class="enlace">Volver</a></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "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)");
}
%>
+317
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Liquidaciones</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacionRadiologo.pagina.value=pagina;
document.frmLiquidacionRadiologo.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmLiquidacionRadiologo" action="detalle_liquidacion_radiologo.jsp?x=<%=strParametroMenu%>&au=<%=longAutorizacion%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//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<Object[]> vSeleccion = per.MovimientosCapturadosDetallePorAutorizacion(intPagina, intMedico, longAutorizacion, intEspe);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" 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 align="center"><span class="txt">&nbsp;</span></td>
<td align="center"><span class="tituloTabla"><%=vSeleccion.elementAt(0)[1]%> - <%=vSeleccion.elementAt(0)[0]%> - <%=vSeleccion.elementAt(0)[2]%></span></td>
<td align="center"><span class="txt">&nbsp;</span></td>
</tr>
<tr>
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripcion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
</tr>
<%
//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);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=resultados[3]%></td>
<td class="<%=estilo%>" align="left"><%=resultados[4]%></td>
<td class="<%=estilo%>" align="center"><%=resultados[5]%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.getPaginacion().esPrimeraPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="center"><a href="liquidacion_radiologo.jsp?x=5&pagina=1" class="enlace">Volver</a></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "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)");
}
%>
+344
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Actos Médicos</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
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.frmActosMedicos.nombre.value=lstCampoBusqueda;
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function buscar()
{
document.frmActosMedicos.pagina.value=1;
pasarAMayusculas(document.frmActosMedicos.nombre);
document.frmActosMedicos.submit();
}
function paginacion(pagina)
{
document.frmActosMedicos.pagina.value=pagina;
pasarAMayusculas(document.frmActosMedicos.nombre);
document.frmActosMedicos.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:informarParametroCampoBusqueda()">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<form name="frmActosMedicos" action="determinaciones.jsp?x=<%=strParametroMenu%>" method="post" onSubmit="javascript:pasarAMayusculas(this.nombre)">
<td colspan="3">
<table border="0" align="center">
<tr>
<td><span class="txtnegrita">Descripción: </span></td>
<td><input type="text" size="50" name="nombre" class="txt"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</tr>
</table>
</td>
<input type="hidden" name="pagina" value="1">
</form>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<%
PersistenciaTtactmedGPC per = new PersistenciaTtactmedGPC();
Vector vSeleccion = per.listadoDeterminacionesAnaliticas(strCampoNombre, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" 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="3" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">OMC</td>
</tr>
<%
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);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="left"><%=ttactmedGPC.getDescripcion_gpc()%></td>
<td class="<%=estilo%>" align="center"><%=ttactmedGPC.getActo()%></td>
<td class="<%=estilo%>" align="right"><%=ttactmedGPC.getOmc()%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="3"></td></tr>
<tr>
<td colspan="3">
<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>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final página de determinaciones analíticas (med/determinaciones.jsp)");
}
%>
+164
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Módulo de Gestión de Médicos</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
</head>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="ffffff"">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<%
//Creación de la tabla presentación de resultados
%>
<!-- Enlace para volver a la página anterior //-->
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="6" align="right"><a href="javascript:history.back();" class="enlace"><%=pertamensaje.obtenerMensaje(30).getMensaje() %></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestión de médicos (med/gestor.jsp)");
}
%>
+684
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Gesti&oacute;n Perfiles</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
</head>
<script language="javascript" type="text/javascript">
<!--
var vElementosPerfil = new Array();
function pasar() {
obj=document.getElementById('sel1');
if (obj.selectedIndex==-1) return;
for (i=0; opt=obj.options[i]; i++)
if (opt.selected) {
valor=opt.value; // almacenar value
txt=obj.options[i].text; // almacenar el texto
obj.options[i]=null; // borrar el item si está seleccionado
obj2=document.getElementById('sel2');
if (obj2.options[0].value=='-') // si solo está la opción inicial borrarla
obj2.options[0]=null;
opc = new Option(txt,valor);
eval(obj2.options[obj2.options.length]=opc);
}
if(obj.options.length==0)
{
opc=new Option('-','-');
obj.options[0]=opc;
}
}
function borrar_perfil(valor)
{
obj=document.getElementById(valor);
//var answer = confirm ("Are you having fun?")
/*if(confirm('Seguro que deseas borrar el perfil??'))
{
obj.submit();
}*/
modal({
type : 'confirm',
title : '¡Atención!',
text : '¿Seguro que deseas borrar el perfil?',
callback: function(result){
if (result){
obj.submit();
}
}
});
}
function quitar() {
obj=document.getElementById('sel2');
if (obj.selectedIndex==-1) return;
for (i=0; opt=obj.options[i]; i++)
if (opt.selected) {
obj2=document.getElementById('sel1');
if (obj2.options.length >= <%= maxDeterminaciones%>){
//alert("No puedes crear perfiles de mas de " + <%= maxDeterminaciones %> + " actos");
modal({type:'error',title:'¡Atención!',text:'No puedes crear perfiles de mas de ' + <%= maxDeterminaciones %> + ' actos.',});
}else{
valor=opt.value; // almacenar value
txt=obj.options[i].text; // almacenar el texto
obj.options[i]=null; // borrar el item si está seleccionado
obj2=document.getElementById('sel1');
if (obj2.options[0].value=='-') // si solo está la opción inicial borrarla
obj2.options[0]=null;
opc = new Option(txt,valor);
eval(obj2.options[obj2.options.length]=opc);
}
}
if(obj.options.length==0)
{
opc=new Option('-','-');
obj.options[0]=opc;
}
}
function enviar()
{
obj=document.getElementById('sel1');
if(obj.options.length==1 && obj.options[0].value=='-')
{
//alert("No hay analiticas en el perfil, añade alguna");
modal({type:'error',title:'¡Atención!',text:'No hay analiticas en el perfil, añade alguna.',});
}
else if (document.frmModifyPerfil.descripcion.value.length < 3)
{
//alert("El nombre del perfil tiene que tener más de 3 letras");
modal({type:'error',title:'¡Atención!',text:'El nombre del perfil tiene que tener más de 3 letras.',});
}
else
{
txt="";
for(i=0; opt=obj.options[i]; i++)
{
txt=obj.options[i].value+", "+txt;
}
document.frmModifyPerfil.valores.value=txt;
document.frmModifyPerfil.submit();
}
}
function enviar_buscador(){
var vElementos = "";
var vCodigos = "";
obj=document.getElementById('sel1');
for (i=0; opt=obj.options[i]; i++)
{
vElementos = vElementos + obj.options[i].text + "¬";
vCodigos = vCodigos + obj.options[i].value + "¬";
}
vElementos = vElementos.substring(0,(vElementos.length) - 1);
vCodigos = vCodigos.substring(0,(vCodigos.length) - 1);
if(vElementos.length<=1)
{
opc=new Option('-','-');
obj.options[0]=opc;
document.frmBuscador.submit();
}else{
//vElementos = vElementos.substring(0,vElementos.lenght - 1);
//document.frmBuscador.vDeter_buscador.value = vElementos;
document.getElementById("vDeter_buscador").value= vElementos;
document.getElementById("vCod_buscador").value= vCodigos;
//document.getElementById("frmBuscador").submit();
document.frmBuscador.submit();
}
}
function enviar_frmNuevoPerfil()
{
document.frmNuevoPerfil.submit();
//document.frmModifyPerfil.submit();
}
function enviar_frmDetallesPerfil(valor)
{
obj=document.getElementById(valor);
obj.submit();
//document.frmDetallesPerfil+valor.submit();
}
function paginacion(pagina)
{
document.frmPaginacion.pagina.value=pagina;
document.frmPaginacion.submit();
}
function anularTeclaIntro(e){
if (e.keyCode == 13) { //controlo que se ha pulsado la tecla "intro"
return false;
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="95%">
<form name="frmPaginacion" action="gestor_perfiles.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1" />
</form>
<!-- FORM PAGINACION!!!!!!!!!!! -->
<%
if(request.getParameter("detalles")==null && request.getParameter("nuevo") == null)
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Mostramos el listado de los perfiles que tiene definidos el médico.");
//mostramos el listado de los perfiles que tiene definidos el médico de la sesión.
// int intMedico = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
PersistenciaTagruana per = new PersistenciaTagruana();
Vector vSeleccion = null;
try{
vSeleccion = per.obtenerGrupos(intPagina, intMedico);
}
catch(ExcepcionTarisan exT)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan al obtener los grupos del medico");
}
int espe = 0;
boolean fondo=true;
if (vSeleccion.size()!=0)
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="4" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">C&oacute;digo Perfil</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripci&oacute;n</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Ver</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td>
</tr><%
Tagruana tag = new Tagruana();
for(int i = 0; i < vSeleccion.size(); i++)
{
if(fondo)
{
fondo = false;
%>
<tr class="filaA trResultados" style="height:20px">
<%
}
else
{
fondo = true;
%>
<tr class="filaB trResultados" style="height:20px">
<%
}
espe = ParametrosConfiguracion.analiticas;
tag = (Tagruana)vSeleccion.elementAt(i);
%><td class="txt" align="center" class="txt"><%=tag.getGrupo() %></td>
<td align="center" class="txt"><%=tag.getDescripcion()%></td>
<td align="center"><form id="frmDetallesPerfil<%=i %>" name="frmDetallesPerfil<%=i %>" action="gestor_perfiles.jsp?x=13" method="post" style="margin-bottom: 0px;"><input type="hidden" name="pagina" value="1"/><input type="hidden" name="detalles" value="<%=tag.getGrupo() %>"/><a href="javascript:enviar_frmDetallesPerfil('frmDetallesPerfil<%=i %>')" class="enlace"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></a></form></td>
<td align="center"><form id="frmEliminarPerfil<%=i %>" name="frmEliminarPerfil" action="verify_cambios_perfil.jsp?x=13" method="post" style="margin-bottom: 0px;"><input type="hidden" name="especialidad" value="<%=espe %>"/><input type="hidden" name="borrar" value="<%=tag.getGrupo() %>"/><a href="javascript:borrar_perfil('frmEliminarPerfil<%=i %>')" class="enlace">Eliminar Perfil</a></form></td>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="3"></td></tr>
<tr>
<td colspan="4">
<table border="0" align="center">
<tr>
<%if (per.getPaginacion().esPrimeraPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
}
%><tr><td><form name="frmNuevoPerfil" action="gestor_perfiles.jsp?x=<%=strParametroMenu%>" method="post"><input type="hidden" name="nuevo" value="<%=espe %>"/><a href="javascript:enviar_frmNuevoPerfil()" class="enlace">Añadir Perfil</a></form></td></tr><%
}
else if(request.getParameter("nuevo") == null && request.getParameter("borrar") == null)
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El médico ha pulsado en ver detalles.");
//El médico ha pulsado en ver detalles
PersistenciaTagruana per = new PersistenciaTagruana();
int grp = 0;
int med = 0;
grp = Integer.parseInt(request.getParameter("detalles"));
med = ((Usuario)sesion.getAttribute("USUARIO")).getMedico();
Vector vSeleccion = per.obtenerActosMedicos(grp, med);
String descripcion = "";
String nosacar ="";
Tagruana tag = new Tagruana();
tag = (Tagruana)vSeleccion.elementAt(0);
descripcion = tag.getDescripcion().trim();
%>
<tr>
<td>
<form name="frmModifyPerfil" action="verify_cambios_perfil.jsp?x=13" method="post">
<label for="descripcion" class="txtNegrita">Nombre del Perfil: </label><input type="text" name="descripcion" class="txt" value="<%=descripcion %>" />
<br/><br/>
<label for="sel1" class="txtNegrita">Contenido Actual del perfil:</label><br/>
<select id="sel1" name="sel1" size="5" class="txt">
<%
int grupo = 0;
int espe = 0;
if (request.getParameter("vDeter_buscador")!=null){
String strDeter = (String)request.getParameter("vDeter_buscador");
String strCod = (String)request.getParameter("vCod_buscador");
StringTokenizer st1 = new StringTokenizer(strDeter, "¬");
StringTokenizer st2 = new StringTokenizer(strCod, "¬");
while (st1.hasMoreTokens())
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Se procesan las determinaciones "+strDeter);
//obtenemos los valores especificos para cada determinacion
String token1 = st1.nextToken();
String token2 = st2.nextToken();
if(token1.length()>0)
{
String descripDeter = token1;
int codigoDeter = Integer.parseInt(token2);
%><option value="<%=codigoDeter %>"><%=descripDeter.trim() %></option><%
grupo = Integer.parseInt(request.getParameter("detalles"));
espe = ParametrosConfiguracion.analiticas;
nosacar = nosacar + ", " +codigoDeter;
}
}
}else{
for(int i = 0; i < vSeleccion.size(); i++)
{
tag = (Tagruana)vSeleccion.elementAt(i);
%><option value="<%=tag.getActo() %>"><%=tag.getDescripcionActo().trim() %></option><%
grupo = Integer.parseInt(request.getParameter("detalles"));
espe = ParametrosConfiguracion.analiticas;
nosacar = nosacar + ", " +tag.getActo();
}
}
%>
</select>
<%
if (nosacar.compareTo("")!=0){
nosacar = nosacar.substring(2);
}
String buscador = (request.getParameter("txt_buscar_deter") == null)?"%":"%"+request.getParameter("txt_buscar_deter")+"%";
//Vector vSeleccion2 = per.listar_actos_buscador_excluidos(nosacar, buscador);
PersistenciaTtactmed perTtactmed = new PersistenciaTtactmed();
Vector vSeleccion2 = perTtactmed.listar_actos_buscador_excluidos_por_especialidad(nosacar, buscador, especialidad);
%>
<br/><img src="<%=request.getContextPath()%>/img/arriba.png" onclick="quitar()"><img src="<%=request.getContextPath()%>/img/abajo.png" onclick="pasar()">
<br/>
<label for="sel2" class="txtNegrita">Pruebas disponibles:</label>
<br/>
<select id="sel2" size="15" class="txt">
<%Ttactmed ttactmed = null;
for(int i = 0; i < vSeleccion2.size(); i++)
{
ttactmed = (Ttactmed)vSeleccion2.elementAt(i);
%><option value="<%=ttactmed.getActo() %>"><%=ttactmed.getDescripcion().trim() %></option><%
}
%>
</select></p>
<input type="hidden" name="valores" />
<input type="hidden" name="grupo" value="<%=grupo %>" />
<input type="hidden" name="espe" value="<%=espe %>" />
</form>
<br/><br/>
<form name="frmBuscador" id="frmBuscador" action="gestor_perfiles.jsp?x=<%=strParametroMenu %>" method="post">
<input type="hidden" name="detalles" value="<%=grp %>"/>
<input type="hidden" name="vDeter_buscador" id="vDeter_buscador" value=""/>
<input type="hidden" name="vCod_buscador" id="vCod_buscador" value=""/>
<label for="txt_buscar_deter" class="txtNegrita">Buscar prueba:</label>
<input type="text" name="txt_buscar_deter" class="txt" value="<%=(request.getParameter("txt_buscar_deter") == null)?"":request.getParameter("txt_buscar_deter") %>" onkeypress="return anularTeclaIntro(event)"/>
<a href="javascript:enviar_buscador()" class="enlace">Buscar</a>
</form>
<br/><br/><br/>
<a class="enlace" href="javascript:enviar()">Guardar Cambios</a>
</td>
</tr>
<%
}
else if (request.getParameter("borrar") != null)
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El médico ha pulsado en eliminar perfil.");
//el médico ha pulsado en eliminar perfil
%>
<tr><td>Borrar perfil: <%=request.getParameter("borrar") %></td></tr>
<%
}
else if (request.getParameter("nuevo") != null)
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - El médico ha pulsado en crear nuevo perfil.");
//El médico ha pulsado en crear nuevo perfil
String nosacar ="";
String descripcion = "";
%>
<tr>
<td>
<form name="frmModifyPerfil" action="verify_cambios_perfil.jsp?x=13" method="post">
<label class="txtNegrita"><%=tamensaje.getMensaje() %></label>
<br/><br/><br/>
<label for="descripcion" class="txtNegrita">Nombre del Perfil:</label><input type="text" class="txt" name="descripcion" value="<%=descripcion %>" />
<br/><br/>
<label for="sel1" class="txtNegrita">Contenido Actual del perfil:</label><br/>
<select id="sel1" name="sel1" class="txt" size="5" class="txt">
<%
if (request.getParameter("vDeter_buscador")!=null){
String strDeter = (String)request.getParameter("vDeter_buscador");
String strCod = (String)request.getParameter("vCod_buscador");
StringTokenizer st1 = new StringTokenizer(strDeter, "¬");
StringTokenizer st2 = new StringTokenizer(strCod, "¬");
while (st1.hasMoreTokens())
{
LogTarisan.logger.log(NivelLog.DEBUG, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Se procesan las determinaciones "+strDeter);
//obtenemos los valores especificos para cada determinacion
String token1 = st1.nextToken();
String token2 = st2.nextToken();
if(token1.length()>0)
{
String descripDeter = token1;
int codigoDeter = Integer.parseInt(token2);
%><option value="<%=codigoDeter %>"><%=descripDeter.trim() %></option><%
nosacar = nosacar + ", " +codigoDeter;
}
}
if (strDeter == ""){
%><option value="-">-</option><%
}
}else{
%><option value="-">-</option><%
}
%>
</select>
<%
PersistenciaTagruana perTaGru = new PersistenciaTagruana();
int max = 0;
max = perTaGru.getMaxGrupo();
if (nosacar.compareTo("")!=0){
nosacar = nosacar.substring(2);
}
String buscador = (request.getParameter("txt_buscar_deter") == null)?"%":"%"+request.getParameter("txt_buscar_deter")+"%";
//int especialidad = ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad();
PersistenciaTtactmed per = new PersistenciaTtactmed();
//Vector vSeleccion = per.obtenerAnalisisNivelesVisiblesPorEspecialidad(especialidad, buscador);
Vector vSeleccion = per.listar_actos_buscador_excluidos_por_especialidad(nosacar, buscador, especialidad);
int grupo = max;
int espe = 0;
%>
<br/><img src="<%=request.getContextPath()%>/img/arriba.png" onclick="quitar()"><img src="<%=request.getContextPath()%>/img/abajo.png" onclick="pasar()">
<br/>
<label for="sel2" class="txtNegrita">Pruebas disponibles:</label><br/>
<select id="sel2" size="15" class="txt">
<%
if (vSeleccion.size()!=0){
Ttactmed ttactmed = null;
for(int i = 0; i < vSeleccion.size(); i++)
{
ttactmed = (Ttactmed)vSeleccion.elementAt(i);
%><option value="<%=ttactmed.getActo() %>"><%=ttactmed.getDescripcion().trim() %></option><%
espe = ttactmed.getEspecialidad();
}
}
%>
</select></p>
<input type="hidden" name="valores" />
<input type="hidden" name="grupo" value="<%=grupo %>" />
<input type="hidden" name="espe" value="<%=espe %>" />
</form>
<br/><br/>
<form name="frmBuscador" id="frmBuscador" action="gestor_perfiles.jsp?x=<%=strParametroMenu %>" method="post">
<input type="hidden" name="nuevo" value="5"/>
<input type="hidden" name="vDeter_buscador" id="vDeter_buscador" value=""/>
<input type="hidden" name="vCod_buscador" id="vCod_buscador" value=""/>
<label for="txt_buscar_deter" class="txtNegrita">Buscar prueba:</label>
<input type="text" name="txt_buscar_deter" class="txt" value="<%=(request.getParameter("txt_buscar_deter") == null)?"":request.getParameter("txt_buscar_deter") %>" onkeypress="return anularTeclaIntro(event)"/>
<a href="javascript:enviar_buscador()" class="enlace">Buscar</a>
</form>
<br/><br/><br/>
<a class="enlace" href="javascript:enviar()">Guardar Cambios</a>
</td>
</tr>
<%
// quitar el espacio detras del % y subirlo aquí encima del <% para añadir el formulario de búsqueda.
// <form name="frmNuevoPerfil" action="gestor_perfiles.jsp?x=<%=strParametroMenu % >" method="post"><input type="hidden" name="nuevo" value="<%=espe % >"/><label for="txt_buscar_deter" class="txt">Buscar entre las pruebas disponibles:</label><input type="text" name="txt_buscar_deter" class="txt" value="<%=(request.getParameter("txt_buscar_deter") == null)?"":request.getParameter("txt_buscar_deter") % >"/><a href="javascript:enviar_frmNuevoPerfil()" class="enlace">Buscar</a></form>
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
response.sendRedirect("../error.jsp");
}
catch(ExcepcionTarisan exT)
{
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final página de gestion de perfiles (med/gestor_perfiles.jsp)");
}
%>
+351
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Hist&oacute;rico Prescripciones ATS</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmPaginacion.pagina.value=pagina;
document.frmPaginacion.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<form name="frmPaginacion" action="historico_ats.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1" />
</form>
<table border="0" align="center" width="100%">
<%
PersistenciaTaconaut pertacon = new PersistenciaTaconaut();
Vector vSeleccion = pertacon.ObtenerPrescripcionesPorMedico(((Usuario)sesion.getAttribute("USUARIO")).getMedico(),intPagina);
if(vSeleccion.size() == 0)
{
%>
<!-- Presentacion de los resultados -->
<tr><td colspan="3" class="txt">No Se han realizado prescripciones de actos para los ATS</td></tr>
<tr><td colspan="3" class="txt"> </tr><%
}
else
{
if (intPagina != 0){ //se tiene en cuenta la paginacion
%>
<tr>
<td colspan="3" align="right"><span class="txt">Página <%=pertacon.getPaginacion().getNumeroPagina()%> de <%=pertacon.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Autorizacion</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Informe</td>
</tr>
<%
Taconaut ta = new Taconaut();
PersistenciaTtactmed tm = new PersistenciaTtactmed();
String estilo = "";
for(int i=0; i<vSeleccion.size();i++)
{
if (i % 2 == 0)
{
estilo = "filaA";
}
else
{
estilo = "filaB";
}
ta = (Taconaut)vSeleccion.elementAt(i);
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center">
<%
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())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="7"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=resultado%>" class="enlacePeticion"></input>
</form><%
}
else
{
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones_ats+resultado+".PDF");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="7"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=resultado%>" class="enlacePeticion"></input>
</form><%
}
else
{
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".pdf"); //Buscar en ubicacion nueva
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="15"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=resultado%>" class="enlacePeticion"></input>
</form><%
}
else
{
fichero = new File(ParametrosConfiguracion.ruta_pdf_peticiones+resultado+".PDF");
if(fichero.exists())
{
%><form name="resultados" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="15"/>
<input type="hidden" name="nombrePDF" value="<%=resultadoE%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="<%=resultado%>" class="enlacePeticion"></input>
</form><%
}
else
{
%><p><%=pertamensaje.obtenerMensaje(7).getMensaje() %></p><%
}
}
}
}
%>
</td>
<td class="<%=estilo%>" align="center"><%=tm.obtenerNombreActo(ta.getActo(), ta.getEspecialidad()) %></td>
<td class="<%=estilo%>" align="center"><%=ta.getInforme() %></td>
</tr>
<%
}
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="3"></td></tr>
<tr>
<td colspan="3">
<table border="0" align="center">
<tr>
<%if (pertacon.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(<%=pertacon.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (pertacon.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(<%=pertacon.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=pertacon.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
}
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(ExcepcionTarisan ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
sesion.setAttribute("ERROR", "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)");
}
%>
+768
View File
@@ -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&aacute;gina del hist&oacute;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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p&aacute;gina del hist&oacute;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&oacute;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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Hist&oacute;rico Liquidaciones</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacion.pagina.value=pagina;
document.frmLiquidacion.submit();
}
function enviar_frmLiquidacion()
{
document.frmLiquidacion.submit();
}
function verdetalles(valor)
{
obj=document.getElementById(valor);
obj.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" style="width:95%;border:0;margin:0 auto">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table style="width:100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td>
<form id="frmLiquidacion" name="frmLiquidacion" action="historico_liquidacion.jsp?x=<%=strParametroMenu%>" method="post">
<%
//Creaci&oacute;n de la tabla presentaci&oacute;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)
{
%>
<table border="0" width="90%" align="center">
<tr>
<td colspan="5" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(52).getMensaje() %></span></td>
</tr>
</table>
<%
}
else
{
%>
<table border="0" width="90%" align="center">
<tr>
<td colspan="5" align="center"><span class="txt"><%=pertamensaje.obtenerMensaje(53).getMensaje() %> <select name="mes">
<%
int i=0;
do{
%><option value="<%=vSeleccion.get(i) %>"><%=vSeleccion.get(i) %></option>
<%
i=i+1;
}while(i<vSeleccion.size());
%>
<option value="todos">Todos</option>
</select>
<input type="hidden" name="pagina" value="1">
<a href="javascript:enviar_frmLiquidacion()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
</span></td>
</tr>
</table>
<%
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&oacute;n de todos, para ver un resumen de sus liquidaciones
%>
<p style="text-align:center;margin:0px auto;"><span class="tituloTabla"><%=pertamensaje.obtenerMensaje(51).getMensaje() %></span></p><br/>
<table border="0" width="90%" align="center">
<%
PersistenciaTaliquimedi per = new PersistenciaTaliquimedi();
boolean retencion = per.tiene_retencion(medico);
//Primero vamos a ver si el m&eacute;dico origen tiene retenci&oacute;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("#.##");
%>
<tr class="tituloTabla">
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(54).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(55).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(56).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(57).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td>
</tr>
<%
//while(resul.next())
int i=0;
do{
if(fondo)
{
fondo = false;
%>
<tr class="filaA trResultados">
<%
}
else
{
fondo = true;
%>
<tr class="filaB trResultados">
<%
}
if(retencion)
{
%>
<td align="center"><%=vSeleccion.elementAt(i).toString().trim() %></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+1)) %></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+3)) %></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+2)) %></td>
<td align="center">
<form name="frmLiquidacion" action="historico_liquidacion.jsp?x=<%=strParametroMenu%>" method="post" style="margin-bottom: 0px">
<input type="hidden" name="pagina" value="1"/>
<input type="hidden" value="<%=vSeleccion.elementAt(i).toString().trim() %>" name="mes"/>
<input type="submit" value="Ver" class="enlace"/>
</form>
</td>
<%
i=i+4;
}
else
{
%>
<td align="center"><%=vSeleccion.elementAt(i).toString().trim() %></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+1)) %></td>
<td align="center"></td>
<td align="center"><%=df.format(vSeleccion.elementAt(i+2)) %></td>
<td align="center">
<form name="frmLiquidacion" action="historico_liquidacion.jsp?x=<%=strParametroMenu%>" method="post" style="margin-bottom: 0px">
<input type="hidden" name="pagina" value="1"/>
<input type="hidden" value="<%=vSeleccion.elementAt(i).toString().trim() %>" name="mes"/>
<input type="submit" value="Ver" class="enlace"/>
</form>
</td>
<%
i=i+3;
}
%>
</tr>
<%
}while(i<vSeleccion.size());
%>
</tr>
</table>
<%
}
else
{
//Ha seleccionado un mes/a&ntilde;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&oacute;n que quiere ver, la generamos para que se guarde y poderla mostrar si quiere.
//para evitar a&ntilde;adir varios pies si el fichero se gener&oacute; en una consulta anterior
generado = true;
/*Est&aacute; generando el pdf, luego ha pulsado en el detalle de la liquidaci&oacute;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&oacute;rico de liquidaciones y consulta el mes "+strMes+" generando el pdf correspondiente");
//obtenemos los datos del m&eacute;dico necesarios, primero vemos el m&eacute;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&oacute;n es un p&aacute;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&oacute;d. Acto",FontFactory.getFont("arial",10,Font.BOLD,BaseColor.RED)));
PdfPCell celda2 =new PdfPCell (new Paragraph("Descripci&oacute;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);
%>
<p style="text-align:center;margin:0px auto;"><span class="tituloTabla"><%=pertamensaje.obtenerMensaje(58).getMensaje() %> <%=request.getParameter("mes") %></p></span><br/>
<%
%>
<table border="0" width="90%" align="center">
<%
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="txt"><% tamensaje = pertamensaje.obtenerMensaje(10); %><%=tamensaje.getMensaje() %></span></td>
</tr>
<%
}
else
{
%>
<tr class="tituloTabla">
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(40).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(41).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(59).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(42).getMensaje() %></td>
<td align="center" class="cabeceraTabla" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(60).getMensaje() %></td>
</tr>
<%
boolean fondo = true;
DecimalFormat df = new DecimalFormat("#.##");
Taliquimedi taliquimedi = null;
for(int i = 0; i < vSeleccion.size(); i++)
{
if(fondo)
{
fondo = false;
%>
<tr class="filaA trResultados">
<%
}
else
{
fondo = true;
%>
<tr class="filaB trResultados">
<%
}
taliquimedi = (Taliquimedi)vSeleccion.elementAt(i);
String act = String.valueOf(taliquimedi.getActo());
String cant = String.valueOf(taliquimedi.getCantidad());
%>
<td cellspacing="1"><span class="txt"><%=act.trim() %></span></td>
<td><span class="txt"><%=taliquimedi.getDescripcion().trim() %></span></td>
<td align="right"><span class="txt"><%=cant.trim() %></span></td>
<td align="right"><span class="txt"><%=df.format(taliquimedi.getPrecio()) %></span></td>
<td align="right"><span class="txt"><%=df.format(taliquimedi.getImporte()) %></span></td>
</tr>
<%
if(generado)
{
//si generando el pdf genero la tabla para a&ntilde;ad&iacute;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
*/
%>
<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(61).getMensaje() %></span></td><td align="right"><span class="txt"> <%=df.format(importe) %></span></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<%
Double irpf = 0.0;
Double total = 0.0;
if(retencion)
{
irpf = importe*0.15;
total = importe - irpf;
%>
<tr><td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(56).getMensaje() %>: </span></td><td align="right"><span class="txt"> <%=df.format(irpf) %></span></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(62).getMensaje() %></span></td><td align="right"><span class="txt"> <%=df.format(total) %></span></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<%
}
else
{
total = importe;%>
<tr><td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(62).getMensaje() %></span></td><td align="right"><span class="txt"> <%=df.format(importe) %></span></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<%
}
%>
<tr>
<td>&nbsp;</td><td><span class="txt"><%=pertamensaje.obtenerMensaje(63).getMensaje() %></span></td>
<td align="right"><span class="txt">&nbsp;</span></td><td>&nbsp;</td><td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left">
<%
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())
{
%>
<form></form>
<form name="frmLiqui" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="17"/>
<input type="hidden" name="nombrePDF" value="<%=/*ficheroPDF.getName()*/docEncriptado%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver PDF" class="enlace"/>
</form>
<%
}
else
{
%><p><span class="txt">No hay PDF</span></p><%
}
%>
</td>
<td align="right">
<%
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())
{
%>
<form name="frmLiquiDetalle" action="<%=request.getContextPath()%>/servlet/GestorPacientes" target="blank" method="post" style="margin-bottom: 0px">
<input type="hidden" name="tipo" value="17"/>
<input type="hidden" name="nombrePDF" value="<%=/*ficheroDetalle.getName()*/docDetalleEncriptado%>" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_VER_PDF%>">
<input type="submit" value="Ver detalle" class="enlace"/>
</form><%
}
else
{
%><p><span class="txt">No hay Detalle</span></p><%
}
%>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<%
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;
}
}
}
%>
</form>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(ExcepcionTarisan ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
sesion.setAttribute("ERROR", "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&aacute;gina del hist&oacute;rico de liquidaciones (med/historico_liquidacion.jsp)");
}
%>
+315
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Gesti&oacute;n Perfiles</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
</head>
<script language="javascript" type="text/javascript">
<!--
function imprimir(valor)
{
obj=document.getElementById(valor);
obj.submit();
}
function eliminar(valor)
{
obj=document.getElementById(valor);
/*if(confirm('Seguro que deseas borrar el volante??'))
{
obj.submit();
}*/
modal({
type : 'confirm',
title : '¡Atención!',
text : '¿Seguro que deseas borrar el volante?',
callback: function(result){
if (result){
obj.submit();
}
}
});
}
function comprobarImpresion(impresion)
{
if (impresion==1) {//se efectua la impresion
var ventanaAnalisis2 = window.open('<%=request.getContextPath()%>/peticiones/<%=strFile%>.pdf',"<%=strFile%>","dependent=1,height=490,width=720,left=150,top=100,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,toolbar=no,directories=no");
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onLoad="javascript:comprobarImpresion(<%=intImpresion%>)">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="<%=request.getContextPath()%>/img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="<%=request.getContextPath()%>/img/sp.gif" width="4" height="261" border="0"></td>-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="<%=request.getContextPath()%>/img/sp.gif" width="1" height="11" border="0"><br>
<table>
<%if(!borrados){ %>
<tr><td><a href="<%=request.getContextPath()%>/jsp/med/historico_volantes.jsp?x=<%=strParametroMenu %>&borrados=1" class="enlace">Ver borrados</a></td></tr>
<%
}
else
{
%><tr><td><a href="<%=request.getContextPath()%>/jsp/med/historico_volantes.jsp?x=<%=strParametroMenu %>" class="enlace">Ocultar borrados</a></td></tr><%
}
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
%>
<tr>
<td colspan="3" align="right"><span class="txt">Página de </span></td>
</tr>
<%
}
%>
<tr><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto M&eacute;dico</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Motivo Ingreso</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Juicio diagn&oacute;stico</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA"><%=pertamensaje.obtenerMensaje(17).getMensaje() %></td><td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td></tr>
<%
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);
%>
<tr valign="center" class="trResultados"><form name="frmtavolin<%=i %>" id="frmtavolin<%=i %>" action="<%=request.getContextPath() %>/servlet/GestorPacientes?x=<%=strParametroMenu %>&imp=1" method="post"><td class="<%=estilo %>"><%=tavol.get_nombre() %></td><td class="<%=estilo%>"><%=perta.obtenerNombreActo(tavol.get_acto(), especialidad) %></td><td class="<%=estilo%>"><%=perta.obtenerDescripcionMotivoIngreso(tavol.get_motivo()) %></td><td class="<%=estilo%>"><%=tavol.get_juicio() %></td><td class="<%=estilo%>"><%=fecha %></td><td class="<%=estilo%>"><input type="submit" <%=ver_borrados %> name="aceptar" value="OK/Imprimir" class="txt"></td>
<input type="hidden" name="nom_paciente" value="<%=tavol.get_nombre() %>"/>
<input type="hidden" name="fec_paciente" value="<%=tavol.get_fecnac() %>"/>
<input type="hidden" name="poliza" value="<%=tavol.get_poliza()%>"/>
<input type="hidden" name="dir_paciente" value="<%=tavol.get_domicilio() %>"/>
<input type="hidden" name="nif_paciente" value="<%=tavol.get_nif() %>"/>
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_IMPRIMIR_VOLANTE_INGRESO %>"/>
<input type="hidden" name="acto_medico" value="<%=tavol.get_acto() %>"/>
<input type="hidden" name="motivo_ingreso" value="<%=tavol.get_motivo() %>"/>
<input type="hidden" name="diagnostico" value="<%=tavol.get_juicio() %>"/>
<input type="hidden" name="tarjeta" value="<%=tavol.get_tarjeta() %>"/>
</form>
<td class="<%=estilo%>"><form name="eliminar_volante" id="eliminar_volante<%=i %>" action="<%=request.getContextPath() %>/servlet/GestorPacientes?x=<%=strParametroMenu %>&imp=1" method="post"><input type="hidden" name="pk" value="<%=tavol.get_pk() %>"/><input type="button" value="Eliminar" <%=ver_borrados %> class="txt" onclick="eliminar('eliminar_volante<%=i %>')"/><input type="hidden" name="OPCION" value="<%=Constantes.OPC_PAC_BORRAR_VOLANTE_INGRESO %>"/></form></td>
</tr>
<%
}
}
else
{
%>
<tr><td class="txt"><%=pertamensaje.obtenerMensaje(19).getMensaje() %></td></tr>
<%
}
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(ExcepcionTarisan ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
sesion.setAttribute("ERROR", "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)");
}
%>
+336
View File
@@ -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&aacute;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&oacute;n invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p&aacute;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&oacute;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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Igualados</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina,buscar)
{
document.frmIgualados.pagina.value=pagina;
document.frmIgualados.buscar.value=buscar;
pasarAMayusculas(document.frmIgualados.buscar);
document.frmIgualados.submit();
}
function buscar()
{
pasarAMayusculas(document.frmIgualados.buscar);
document.frmIgualados.submit();
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci&oacute;n superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p&aacute;gina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men&uacute; de navegaci&oacute;n del m&oacute;dulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la p&aacute;gina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="4">
<table border="0" align="center">
<tr><form name="frmIgualados" action="igualados.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
<td><span class="txtnegrita">Apellido del igualado</span></td>
<td><input type="text" size="50" name="buscar" class="txt"></td>
<td>&nbsp;</td>
<td><a href="javascript:buscar()" class="enlace" tabindex="1" name="btn_buscar"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a></td>
</form>
</tr>
</table>
</td>
</tr>
<%
PersistenciaTapolfac per = new PersistenciaTapolfac();
Vector vSeleccion = per.listado_igualados(strBuscarIguala, intMedico, intPagina);
if (vSeleccion.size()==0) //No se han encontrado datos
{
%>
<tr>
<td colspan="4">&nbsp;</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&aacute;gina <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nombre asegurado</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nº colectivo</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nº p&oacute;liza</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Nº Beneficiarios</td>
</tr>
<%
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());
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="left"><%=tapolfac.getTitular()%></td>
<td class="<%=estilo%>" align="center"><%=tapolfac.getColec()%></td>
<td class="<%=estilo%>" align="center"><%=dblPoliza.longValue()%></td>
<td class="<%=estilo%>" align="center"><%=tapolfac.getBeneficiarios()%></td>
</tr>
<%
}
%>
<% 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,'<%=strBuscarIguala %>')" class="enlace">primero</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>,'<%=strBuscarIguala %>')" 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">&uacute;ltimo</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>, '<%=strBuscarIguala %>')" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>, '<%=strBuscarIguala %>')" class="enlace">&uacute;ltimo</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="right"><span class="txtNegrita">Nº total de beneficiarios: </span><span class="txt"><%=per.obtenerNumTotalBeneficiarios(intMedico)%></span></td>
</tr>
<tr>
<td colspan="4" align="right"><span class="txtNegrita">Nº total de p&oacute;lizas: </span><span class="txt"><%=per.obtenerNumerPolizasMedicos(intMedico)%></span></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(ExcepcionTarisan ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - ExcepcionTarisan: " + ex.getMensaje());
sesion.setAttribute("ERROR", "Error en la presentaci&oacute;n de la p&aacute;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&oacute;n de la p&aacute;gina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p&aacute;gina de gesti&oacute;n de actos m&eacute;dicos (med/gestor.jsp)");
}
%>
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

+442
View File
@@ -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墔ina de determinaciones anal癃icas (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鏮 invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Inicio p墔ina 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鏮 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嶮ico 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鏮ico:";
}else{
strCorreo = tamedico.getEmailCab();
if (!Utilidades.validarEmail(strCorreo)){
noTieneEmail = 1;
mensajeError = "Debe utilizar una direcci鏮 de correo v嫮ida.";
}
}
File dir = new File(ParametrosConfiguracion.ruta_adjuntos+"/");
Vector<String> 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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Incidencias</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function enviar_incidencia()
{
if (frmIncidencia.ASUNTO.value == ""){
modal({type:'error',title:'tenci鏮!',text:'Debe introducir la descripci鏮 de la incidencia',callback: function(result){frmIncidencia.ASUNTO.focus();}});
}else if (frmIncidencia.MENSAJE.value == ""){
modal({type:'error',title:'tenci鏮!',text:'Debe introducir el detalle de la incidencia',callback: function(result){frmIncidencia.MENSAJE.focus();}});
}else{
frmIncidencia.submit();
}
}
function introducir_email()
{
frmIntroducirEmail.submit();
}
function pasarAMayusculas(campo)
{
campo.value=campo.value.toUpperCase();
}
function eliminarAdjunto(adjunto)
{
document.frmAdjunto.eliminar.value = 1;
document.frmAdjunto.adj.value = adjunto;
document.frmAdjunto.ASUNTO.value = frmIncidencia.ASUNTO.value;
document.frmAdjunto.MENSAJE.value = frmIncidencia.MENSAJE.value;
document.frmAdjunto.TARJETA.value = (frmIncidencia.TARJETA.value).replace(/%/g, "()").trim();
document.frmAdjunto.submit();
}
function adjuntar()
{
document.frmAdjunto.ASUNTO.value = frmIncidencia.ASUNTO.value;
document.frmAdjunto.MENSAJE.value = frmIncidencia.MENSAJE.value;
document.frmAdjunto.TARJETA.value = (frmIncidencia.TARJETA.value).replace(/%/g, "()").trim();
/*document.frmAdjunto.submit();*/
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci鏮 superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p墔ina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men de navegaci鏮 del m鏚ulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<div class="cajaCentral">
<div class="tituloCajaCentral">
<span>SISTEMA DE INCIDENCIAS DE TARISAN</span>
</div>
<br>
<form name="frmIncidencia" action="../../servlet/GestorMedicos" method="post" autocomplete="off">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ENVIAR_EMAIL%>">
<input type="hidden" name="correo" value="<%=strCorreo%>">
<input type="hidden" name="nombreAdjuntos" value="<%=strAdjuntos%>">
<table border="0" align="center" width="100%">
<!-- <tr>
<td>&nbsp;</td>
<td align="left"><h5>SISTEMA DE INCIDENCIAS DE TARISAN</h5></td>
</tr> -->
<tr>
<td>&nbsp;</td>
<td align="left"><p class="txt">*Para el correcto funcionamiento del sistema de incidencias debe comprobar en la secci鏮 "CABECERA" que tiene una cuenta de correo v嫮ida.</p></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left" class="txtnegrita">Descripci鏮 breve:</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left"><input type="text" size="40" name="ASUNTO" id="asun" class="txt" value="<%=strAsuntoCorreo %>" style="width:40%"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left" class="txtnegrita"><span>Detalle de la Incidencia:</span></td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left">
<textarea name="MENSAJE" rows="4" cols="70%" class="txt" style="width:70%"><%=strMensajeCorreo %></textarea>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left" class="txtnegrita">Pase la tarjeta para registrarla:</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="left"><input type="password" size="40" name="TARJETA" id="tar" class="txt" value="<%=strTarjetaCorreo %>" style="width:70%"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</form>
<table border="0" align="center" width="100%">
<tr>
<td>&nbsp;</td>
<td align="left" class="txtnegrita">Adjuntar archivos:</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<form name="frmAdjunto" enctype="multipart/form-data" action="../../../JavaBridgeTemplate621/adjuntar.php" method="POST">
<input name="uploadedfile" type="file" />
<input type="submit" value="Adjuntar" onclick="adjuntar()"/>
<input type="hidden" name="medico" value="<%=intMedico %>" />
<input type="hidden" name="eliminar" value="" />
<input type="hidden" name="adj" value="" />
<input type="hidden" name="ASUNTO" value="" />
<input type="hidden" name="MENSAJE" value="" />
<input type="hidden" name="TARJETA" value="" />
<%
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];
%>
<span type="text" name="txtAdjunto" class="txtnegrita" style="color: rgb(69, 69, 255);margin-left: 50px;"><%= filename%></span>
<a href="javascript:eliminarAdjunto('<%= filename%>')" class="enlace" title="Eliminar" style="color:rgb(219, 67, 67);font-size: medium;">X</a>
<%
}
}
}
%>
</form>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2" align="left"><a href="javascript:enviar_incidencia()" class="enlace">Enviar</a></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<%
if (strMensaje.compareTo("")!=0){
%>
<tr>
<td>&nbsp;</td>
<td align="center"><p class="txtNegrita" style="color:blue"><%= strMensaje %></p></td>
</tr>
<%
}
if (strError.compareTo("")!=0){
%>
<tr>
<td>&nbsp;</td>
<td align="center"><p class="txtNegrita" style="color:red"><%= strError %></p></td>
</tr>
<%
}
%>
</table>
</div>
<form name="frmIntroducirEmail" action="../../servlet/GestorMedicos" method="post" autocomplete="off">
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_ENVIAR_EMAIL%>">
<input type="hidden" name="introducir_email" value="1" />
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
var jsNoTieneEmail = <%=noTieneEmail %>;
if (jsNoTieneEmail==1){
//prompt("Para crear una incidencia debe tener registrado su correo electr鏮ico:");
modal({type:'error',title:'tenci鏮!',text:'<%= mensajeError%>',callback: function(result){introducir_email();}});
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + "Final p墔ina de determinaciones anal癃icas (med/incidencia.jsp)");
}
%>
+597
View File
@@ -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墔ina 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鏮 invalidada");
response.sendRedirect("../../html/login.html");
}
else
{
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Inicio p墔ina 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鏮 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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Introducir Paciente</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<link rel="STYLESHEET" type="text/css" href="../../css/jquery.modal.css">
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript" src="../../js/jquery.modal.min.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function pasarAMayusculas(campo)
{
campo.value = campo.value.toUpperCase();
}
function enviar()
{
if(document.frm_buscar.apellidos.value.length == 0)
{
//alert("Introduce los apellidos del paciente");
modal({type:'error',title:'tenci鏮!',text:'Introduce los apellidos del paciente.',});
document.frm_buscar.apellidos.focus();
}
else if(document.frm_buscar.apellidos.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.apellidos.focus();
}
else if(document.frm_buscar.nombre.value.length == 0)
{
//alert("Introduce el nombre del paciente");
modal({type:'error',title:'tenci鏮!',text:'Introduce el nombre del paciente.',});
document.frm_buscar.nombre.focus();
}
else if(document.frm_buscar.nombre.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.nombre.focus();
}
else if(document.frm_buscar.direccion.value.length == 0)
{
//alert("Introduce la direccion del paciente");
modal({type:'error',title:'tenci鏮!',text:'Introduce la direccion del paciente.',});
document.frm_buscar.direccion.focus();
}
else if(document.frm_buscar.direccion.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.direccion.focus();
}
else if(document.frm_buscar.fec_nac.value.length == 0)
{
//alert("Introduce la fecha de nacimiento");
modal({type:'error',title:'tenci鏮!',text:'Introduce la fecha de nacimiento.',});
document.frm_buscar.fec_nac.focus();
}
else if (document.frm_buscar.fec_nac.value!=""){
if (!valorFecha(document.frm_buscar.fec_nac)){
document.frm_buscar.fec_nac.focus();
}else if(document.frm_buscar.telefono.value.length == 0)
{
//alert("Introduce un numero de telefono");
modal({type:'error',title:'tenci鏮!',text:'Introduce un numero de telefono.',});
document.frm_buscar.telefono.focus();
}
else if(document.frm_buscar.telefono.value.length > 9)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.telefono.focus();
}
else if(isNaN(document.frm_buscar.telefono.value))
{
//alert("Solo puede introducir n𤦤eros en el campo telefono");
modal({type:'error',title:'tenci鏮!',text:'Solo puede introducir n𤦤eros en el campo telefono.',});
document.frm_buscar.telefono.value = "";
document.frm_buscar.telefono.focus();
}
else if(document.frm_buscar.dni.value.length == 0)
{
//alert("Introduce un numero de DNI");
modal({type:'error',title:'tenci鏮!',text:'Introduce un numero de DNI.',});
document.frm_buscar.dni.focus();
}
else if(document.frm_buscar.dni.value.length > 10)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.dni.focus();
}
else if(document.frm_buscar.compania.value.length == 0)
{
//alert("Introduce la compa鎴a del asegurado");
modal({type:'error',title:'tenci鏮!',text:'Introduce la compa鎴a del asegurado.',});
document.frm_buscar.compania.focus();
}
else if(document.frm_buscar.compania.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.compania.focus();
}
else if((document.frm_buscar.identificador.value.length != 0)&&(isNaN(document.frm_buscar.identificador.value)))
{
//alert("Solo puede introducir n𤦤eros en el campo identificador");
modal({type:'error',title:'tenci鏮!',text:'Solo puede introducir n𤦤eros en el campo identificador.',});
document.frm_buscar.identificador.value = "";
document.frm_buscar.identificador.focus();
}
else if((document.frm_buscar.identificador.value.length != 0)&&(document.frm_buscar.identificador.value.length >= 99))
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.identificador.value = "";
document.frm_buscar.identificador.focus();
}
else if(document.frm_buscar.medico.value.length == 0)
{
//alert("Introduce el nombre del medico");
modal({type:'error',title:'tenci鏮!',text:'Introduce el nombre del medico.',});
document.frm_buscar.medico.focus();
}
else if(document.frm_buscar.medico.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.medico.focus();
}
else if(document.frm_buscar.espe.value.length == 0)
{
//alert("Introduce la especialidad");
modal({type:'error',title:'tenci鏮!',text:'Introduce la especialidad.',});
document.frm_buscar.medico.focus();
}
else if(document.frm_buscar.espe.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.medico.focus();
}
else if((document.frm_buscar.autorizacion.value.length != 0)&&(isNaN(document.frm_buscar.autorizacion.value)))
{
//alert("Solo puede introducir n𤦤eros en el campo autorizacion");
modal({type:'error',title:'tenci鏮!',text:'Solo puede introducir n𤦤eros en el campo autorizacion.',});
document.frm_buscar.autorizacion.value = "";
document.frm_buscar.autorizacion.focus();
}
else{
if(document.frm_buscar.autorizacion.value.length == 0)
{
document.frm_buscar.autorizacion.value = -1;
}
document.frm_buscar.submit();
}
}
}
function buscar(){
if(document.frm_buscar.identificador.value.length == 0)
{
//alert("Introduce el identificador de la tarjeta para realizar la b𢃼queda");
modal({type:'error',title:'tenci鏮!',text:'Introduce el identificador de la tarjeta para realizar la b𢃼queda.',});
document.frm_buscar.identificador.focus();
}
else if(isNaN(document.frm_buscar.identificador.value))
{
//alert("Solo puede introducir n𤦤eros en el campo Tarjeta");
modal({type:'error',title:'tenci鏮!',text:'Solo puede introducir n𤦤eros en el campo Tarjeta.',});
document.frm_buscar.identificador.value = "";
document.frm_buscar.identificador.focus();
}
else if(document.frm_buscar.identificador.value.length >= 99)
{
//alert("Longitud m嫞ima del campo superada");
modal({type:'error',title:'tenci鏮!',text:'Longitud m嫞ima del campo superada.',});
document.frm_buscar.identificador.value = "";
document.frm_buscar.identificador.focus();
}
else
{
document.frm_buscarPaciente.troque.value = document.frm_buscar.identificador.value;
document.frm_buscarPaciente.submit();
}
}
function paginacion(pagina)
{
document.frm_buscar.pagina.value = pagina;
document.frm_buscar.submit();
}
function enfocar()
{
document.frm_buscar.apellidos.focus();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:document.frm_buscar.apellidos.focus();">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegaci鏮 superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la p墔ina //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Men de navegaci鏮 del m鏚ulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la p墔ina (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<%
//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鎴a()!=null){
ent = tapecap.getCompa鎴a();
}
}
}*/
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");
}
%>
<!-- Presentacion de los resultados -->
<form name="frm_buscar" action="<%=request.getContextPath()%>/servlet/GestorMedicos?x=<%=strParametroMenu%>" method="post" >
<input type="hidden" name="pagina" value="1" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_PETICION_CAPTURADA%>">
<h3>DATOS B糜ICOS DE LA ANAL炆ICA</h3>
<table border="0" align="center">
<tr>
<td colspan="2" align="center">
<span class="menuOn"><%=mensajeNoEncontrado %></span>
</td>
</tr>
<tr>
<td colspan="2" align="right">&nbsp;</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Apellidos:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="apellidos" name="apellidos" value="<%=ape%>"/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Nombre:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="nombre" name="nombre" value="<%=nom%>"/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita">Direccion:</label>
</td>
<td>
<input size="30" type="text" class="txt" id="direccion" name="direccion" value="<%=dir%>"/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita">Fecha Nacimiento (dd-mm-aaaa):</label>
</td>
<td>
<input size="30" type="text" class="txt" id="fec_nac" name="fec_nac" value="<%=fec%>"/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Telefono:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="telefono" name="telefono" value="<%=tel%>"/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">DNI:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="dni" name="dni" value="<%=nif%>"/>
</td>
</tr>
<tr>
<td align="right">
<label class="txtnegrita">Compa鎴a:</label>
</td>
<td>
<input size="30" type="text" class="txt" id="compania" name="compania" value="<%=ent%>"/>
</td>
</tr>
<tr>
<tr>
<td align="right">
<label class="txtnegrita">Tarjeta:</label>
</td>
<td>
<input size="30" type="text" class="txt" id="identificador" name="identificador" value="<%=tar%>"/>
<a href="javascript:buscar()" class="enlace">Buscar Paciente</a>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Peticionario:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="medico" name="medico" value=""/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Especialidad:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="espe" name="espe" value=""/>
</td>
</tr>
<tr>
<td align="right">
<span class="txtnegrita">Autorizacion:</span>
</td>
<td>
<input size="30" type="text" class="txt" id="autorizacion" name="autorizacion" value=""/>
</td>
</tr>
<tr>
<td colspan="2" align="right">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center">
<a href="javascript:enviar()" class="enlace">Introducir Paciente</a>
</td>
</tr>
<tr>
<td colspan="2" align="right">&nbsp;</td>
</tr>
</table>
</form>
<form name="frm_buscarPaciente" action="buscar_paciente.jsp?x=16&pagina=1" method="post" >
<input type="hidden" name="pagina" value="1" />
<input type="hidden" name="buscarPaciente" value="1" />
<input type="hidden" name="troque" value="" />
<input type="hidden" name="OPCION" value="<%=Constantes.OPC_MED_PETICION_CAPTURADA%>">
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "Error en la presentaci鏮 de la p墔ina al usuario.");
response.sendRedirect("../error.jsp");
}
LogTarisan.logger.log(NivelLog.INFO, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Final p墔ina de peticiones capturadas (med/peticiones_capturadas.jsp)");
}
%>
+317
View File
@@ -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("<br/>", " ");
}
}
%>
<html>
<head>
<title>Liquidaciones</title>
<link rel="shortcut icon" href="../../img/logo.ico" />
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
<script language="JavaScript" src="../../js/funciones.js"></script>
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
<script language="JavaScript" src="../../js/menu_med.js"></script>
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
<script language="JavaScript">pNG="<%= perfil.toString() %>"</script>
<script language="JavaScript" type="text/javascript">
<!--
function paginacion(pagina)
{
document.frmLiquidacion.pagina.value=pagina;
document.frmLiquidacion.submit();
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF">
<div class="marco">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
<td>
<table width="100%">
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
<tr>
<td>
<div id="contenedorNoticia">
<br>
<div class="tituloNoticia">
<p class="marquee"><%=strNoticia %></p>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Cabecera de Navegación superior //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr>
<td><script language="JavaScript">bloques();</script></td>
</tr>
</table>
<br>
<!-- Cuerpo de la página //-->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
<tr valign="top">
<!--<td width="180">//-->
<td width="5%">
<!-- Menú de navegación del módulo (zona izquierda) //-->
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
</tr>
<tr valign="top">
<td><script language="JavaScript">escribirMenuGst();</script></td>
</tr>
</table>
</td>
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
<td width="565">
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
<td width="1px" bgcolor="#CCCCCC" height="330px"></td>
<td class="txt" valign="top">
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
<table border="0" align="center" width="100%">
<!-- Presentacion de los resultados -->
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<form name="frmLiquidacion" action="liquidacion.jsp?x=<%=strParametroMenu%>" method="post">
<input type="hidden" name="pagina" value="1">
</form>
<%
//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
{
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" 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="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
</tr>
<%
}
%>
<tr>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Código</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Descripción</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Cantidad</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Precio</td>
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Importe</td>
</tr>
<%
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();
%>
<tr class="trResultados">
<td class="<%=estilo%>" align="center"><%=vTamovextttactmed.getActo()%></td>
<td class="<%=estilo%>" align="left"><%=vTamovextttactmed.getDescripcionActoMedico()%></td>
<td class="<%=estilo%>" align="center"><%=vTamovextttactmed.getCantidad()%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextttactmed.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
<td class="<%=estilo%>" align="right"><%=Utilidades.formatearDouble(vTamovextttactmed.getImporteActoMedico(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
%>
<% if (intPagina!=0){ //se tiene en cuenta la paginacion %>
<tr><td colspan="5"></td></tr>
<tr>
<td colspan="5">
<table border="0" align="center">
<tr>
<%if (per.getPaginacion().esPrimeraPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
<%}%>
<%if (per.getPaginacion().esUltimaPagina()){%>
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
<td></td>
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
<%}else{%>
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
<td></td>
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
<%}%>
</tr>
</table>
</td>
</tr>
<%
} //fin if(pagina!=0)
%>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5" align="right"><span class="txtNegrita">Importe total: </span><span class="txt"><%=Utilidades.formatearDouble(dblImporteTotal,PersistenciaParametros.decimales)%></span></td>
</tr>
<%
} //fin else (vSeleccion.size()!=0)
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<script>
var jsMostrarNoticia = <%=mostrarNoticia %>;
if (!jsMostrarNoticia){
document.getElementById('contenedorNoticia').style.display="none";
}else{
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
var not = "<%=strNoticia %>";
tamanioNoticia(not);
marquee($('.tituloNoticia'), $('.marquee'),not);
}
</script>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, ((Usuario)sesion.getAttribute("USUARIO")).getMedico() + " - Exception: " + ex);
sesion.setAttribute("ERROR", "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)");
}
%>

Some files were not shown because too many files have changed in this diff Show More