141 lines
4.5 KiB
Plaintext
141 lines
4.5 KiB
Plaintext
<%@ page import="com.tarisan.control.*" %>
|
|
<%@ page import="com.tarisan.data.*" %>
|
|
<%@ page import="com.tarisan.excepcion.*" %>
|
|
<%@ page import="java.util.Vector" %>
|
|
<%@ page import="com.tarisan.log.*" %>
|
|
<%@ page import="com.tarisan.util.Utilidades" %>
|
|
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
|
|
<%@ page import="java.text.SimpleDateFormat" %>
|
|
|
|
<%
|
|
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de impresion de pacientes (imp/impDetallePacientes.jsp)");
|
|
|
|
response.setHeader("Expires", "0");
|
|
response.setHeader("Pragma", "no-cache");
|
|
response.setHeader("Cache-Control", "no-cache");
|
|
HttpSession sesion = request.getSession(true);
|
|
|
|
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
|
{
|
|
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
|
%>
|
|
<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ó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ón ACTOS Mé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"> </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"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="txtImpresion" colspan="3"> </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ágina impresion de pacientes (imp/impDetallePacientes.jsp)");
|
|
%>
|