Compare commits

...
16 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
jjripaper 8e63852e7e Falla desde vscode supongo que por tamaño 2025-06-09 11:52:51 +00:00
m4gn3to 39a778529e Añado gifs 2025-06-09 13:51:03 +02:00
m4gn3to 2a3cc53c9e Añado gifs 2025-06-09 13:49:52 +02:00
m4gn3to 6bf04aa9c4 Añado jpg 2025-06-09 13:49:30 +02:00
m4gn3to ed9ad030b4 Añado gifs 2025-06-09 13:49:06 +02:00
m4gn3to 7d50146fb1 Añado imgs 2025-06-09 13:48:47 +02:00
m4gn3to b5c20a51c9 Añado ico 2025-06-09 13:48:30 +02:00
m4gn3to 427bf74524 Añado imgs 2025-06-09 13:48:07 +02:00
m4gn3to 390345d0c2 Añado gifs 2025-06-09 13:47:50 +02:00
m4gn3to f6e0e13302 Añado gifs 2025-06-09 13:47:33 +02:00
m4gn3to aba07f4843 Añado imgs 2025-06-09 13:47:11 +02:00
176 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.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

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

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 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)");
}
%>

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