forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1991 lines
42 KiB
1991 lines
42 KiB
/*
|
|
* FormMedico.java
|
|
*
|
|
* Created on October 22, 2007, 1:56 PM
|
|
* Copyright lluis
|
|
*/
|
|
package analiseacidentestrabalho;
|
|
|
|
import beans.AnaliseAcidente;
|
|
import com.evolute.utils.error.ErrorLogger;
|
|
import com.sun.data.provider.RowKey;
|
|
import com.sun.rave.web.ui.appbase.AbstractPageBean;
|
|
import com.sun.rave.web.ui.component.Body;
|
|
import com.sun.rave.web.ui.component.Button;
|
|
import com.sun.rave.web.ui.component.DropDown;
|
|
import com.sun.rave.web.ui.component.Form;
|
|
import com.sun.rave.web.ui.component.Head;
|
|
import com.sun.rave.web.ui.component.Html;
|
|
import com.sun.rave.web.ui.component.Hyperlink;
|
|
import com.sun.rave.web.ui.component.ImageComponent;
|
|
import com.sun.rave.web.ui.component.Link;
|
|
import com.sun.rave.web.ui.component.Page;
|
|
import com.sun.rave.web.ui.component.PanelGroup;
|
|
import com.sun.rave.web.ui.component.StaticText;
|
|
import com.sun.rave.web.ui.component.Table;
|
|
import com.sun.rave.web.ui.component.TableColumn;
|
|
import com.sun.rave.web.ui.component.TableRowGroup;
|
|
import com.sun.rave.web.ui.component.TextField;
|
|
import com.sun.rave.web.ui.model.Option;
|
|
import db.providers.AnalisesActualDataProvider;
|
|
import db.providers.AnalisesConcluidasDataProvider;
|
|
import db.providers.AnalisesDataProvider;
|
|
import db.providers.AnalisesSeguimentoDataProvider;
|
|
import java.text.DateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.Calendar;
|
|
import java.util.Date;
|
|
import java.util.GregorianCalendar;
|
|
import java.util.ListIterator;
|
|
import javax.faces.FacesException;
|
|
import javax.faces.component.html.HtmlPanelGrid;
|
|
import javax.faces.event.ValueChangeEvent;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import utils.Utils;
|
|
|
|
/**
|
|
* <p>Page bean that corresponds to a similarly named JSP page. This
|
|
* class contains component definitions (and initialization code) for
|
|
* all components that you have defined on this page, as well as
|
|
* lifecycle methods and event handlers where you may add behavior
|
|
* to respond to incoming events.</p>
|
|
*/
|
|
public class FormMedico extends AbstractPageBean
|
|
{
|
|
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
|
|
|
|
private int __placeholder;
|
|
|
|
/**
|
|
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
|
|
* This method is automatically generated, so any user-specified code inserted
|
|
* here is subject to being replaced.</p>
|
|
*/
|
|
private void _init() throws Exception
|
|
{
|
|
}
|
|
private Page page1 = new Page();
|
|
|
|
public Page getPage1()
|
|
{
|
|
return page1;
|
|
}
|
|
|
|
public void setPage1( Page p )
|
|
{
|
|
this.page1 = p;
|
|
}
|
|
private Html html1 = new Html();
|
|
|
|
public Html getHtml1()
|
|
{
|
|
return html1;
|
|
}
|
|
|
|
public void setHtml1( Html h )
|
|
{
|
|
this.html1 = h;
|
|
}
|
|
private Head head1 = new Head();
|
|
|
|
public Head getHead1()
|
|
{
|
|
return head1;
|
|
}
|
|
|
|
public void setHead1( Head h )
|
|
{
|
|
this.head1 = h;
|
|
}
|
|
private Link link1 = new Link();
|
|
|
|
public Link getLink1()
|
|
{
|
|
return link1;
|
|
}
|
|
|
|
public void setLink1( Link l )
|
|
{
|
|
this.link1 = l;
|
|
}
|
|
private Body body1 = new Body();
|
|
|
|
public Body getBody1()
|
|
{
|
|
return body1;
|
|
}
|
|
|
|
public void setBody1( Body b )
|
|
{
|
|
this.body1 = b;
|
|
}
|
|
private Form form1 = new Form();
|
|
|
|
public Form getForm1()
|
|
{
|
|
return form1;
|
|
}
|
|
|
|
public void setForm1( Form f )
|
|
{
|
|
this.form1 = f;
|
|
}
|
|
private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridBase1()
|
|
{
|
|
return gridBase1;
|
|
}
|
|
|
|
public void setGridBase1( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridBase1 = hpg;
|
|
}
|
|
private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridLayout1()
|
|
{
|
|
return gridLayout1;
|
|
}
|
|
|
|
public void setGridLayout1( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridLayout1 = hpg;
|
|
}
|
|
private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel1()
|
|
{
|
|
return gridPanel1;
|
|
}
|
|
|
|
public void setGridPanel1( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridPanel1 = hpg;
|
|
}
|
|
private PanelGroup groupPanel1 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel1()
|
|
{
|
|
return groupPanel1;
|
|
}
|
|
|
|
public void setGroupPanel1( PanelGroup pg )
|
|
{
|
|
this.groupPanel1 = pg;
|
|
}
|
|
private ImageComponent image1 = new ImageComponent();
|
|
|
|
public ImageComponent getImage1()
|
|
{
|
|
return image1;
|
|
}
|
|
|
|
public void setImage1( ImageComponent ic )
|
|
{
|
|
this.image1 = ic;
|
|
}
|
|
private ImageComponent image2 = new ImageComponent();
|
|
|
|
public ImageComponent getImage2()
|
|
{
|
|
return image2;
|
|
}
|
|
|
|
public void setImage2( ImageComponent ic )
|
|
{
|
|
this.image2 = ic;
|
|
}
|
|
private PanelGroup groupPanel2 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel2()
|
|
{
|
|
return groupPanel2;
|
|
}
|
|
|
|
public void setGroupPanel2( PanelGroup pg )
|
|
{
|
|
this.groupPanel2 = pg;
|
|
}
|
|
private StaticText lblUser = new StaticText();
|
|
|
|
public StaticText getLblUser()
|
|
{
|
|
return lblUser;
|
|
}
|
|
|
|
public void setLblUser( StaticText st )
|
|
{
|
|
this.lblUser = st;
|
|
}
|
|
private StaticText staticText1 = new StaticText();
|
|
|
|
public StaticText getStaticText1()
|
|
{
|
|
return staticText1;
|
|
}
|
|
|
|
public void setStaticText1( StaticText st )
|
|
{
|
|
this.staticText1 = st;
|
|
}
|
|
private Hyperlink lnkEditUser = new Hyperlink();
|
|
|
|
public Hyperlink getLnkEditUser()
|
|
{
|
|
return lnkEditUser;
|
|
}
|
|
|
|
public void setLnkEditUser( Hyperlink h )
|
|
{
|
|
this.lnkEditUser = h;
|
|
}
|
|
private StaticText staticText2 = new StaticText();
|
|
|
|
public StaticText getStaticText2()
|
|
{
|
|
return staticText2;
|
|
}
|
|
|
|
public void setStaticText2( StaticText st )
|
|
{
|
|
this.staticText2 = st;
|
|
}
|
|
private Hyperlink lnkLogout = new Hyperlink();
|
|
|
|
public Hyperlink getLnkLogout()
|
|
{
|
|
return lnkLogout;
|
|
}
|
|
|
|
public void setLnkLogout( Hyperlink h )
|
|
{
|
|
this.lnkLogout = h;
|
|
}
|
|
private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridLayoutTop1()
|
|
{
|
|
return gridLayoutTop1;
|
|
}
|
|
|
|
public void setGridLayoutTop1( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridLayoutTop1 = hpg;
|
|
}
|
|
private HtmlPanelGrid gridActual = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridActual()
|
|
{
|
|
return gridActual;
|
|
}
|
|
|
|
public void setGridActual( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridActual = hpg;
|
|
}
|
|
private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel2()
|
|
{
|
|
return gridPanel2;
|
|
}
|
|
|
|
public void setGridPanel2( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridPanel2 = hpg;
|
|
}
|
|
private StaticText staticText4 = new StaticText();
|
|
|
|
public StaticText getStaticText4()
|
|
{
|
|
return staticText4;
|
|
}
|
|
|
|
public void setStaticText4( StaticText st )
|
|
{
|
|
this.staticText4 = st;
|
|
}
|
|
private StaticText staticText5 = new StaticText();
|
|
|
|
public StaticText getStaticText5()
|
|
{
|
|
return staticText5;
|
|
}
|
|
|
|
public void setStaticText5( StaticText st )
|
|
{
|
|
this.staticText5 = st;
|
|
}
|
|
private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel3()
|
|
{
|
|
return gridPanel3;
|
|
}
|
|
|
|
public void setGridPanel3( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridPanel3 = hpg;
|
|
}
|
|
private Table table1 = new Table();
|
|
|
|
public Table getTable1()
|
|
{
|
|
return table1;
|
|
}
|
|
|
|
public void setTable1( Table t )
|
|
{
|
|
this.table1 = t;
|
|
}
|
|
private TableRowGroup tableRowGroup1 = new TableRowGroup();
|
|
|
|
public TableRowGroup getTableRowGroup1()
|
|
{
|
|
return tableRowGroup1;
|
|
}
|
|
|
|
public void setTableRowGroup1( TableRowGroup trg )
|
|
{
|
|
this.tableRowGroup1 = trg;
|
|
}
|
|
private TableColumn tableColumn1 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn1()
|
|
{
|
|
return tableColumn1;
|
|
}
|
|
|
|
public void setTableColumn1( TableColumn tc )
|
|
{
|
|
this.tableColumn1 = tc;
|
|
}
|
|
private Hyperlink lnkDataAcidente = new Hyperlink();
|
|
|
|
public Hyperlink getLnkDataAcidente()
|
|
{
|
|
return lnkDataAcidente;
|
|
}
|
|
|
|
public void setLnkDataAcidente( Hyperlink h )
|
|
{
|
|
this.lnkDataAcidente = h;
|
|
}
|
|
private TableColumn tableColumn2 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn2()
|
|
{
|
|
return tableColumn2;
|
|
}
|
|
|
|
public void setTableColumn2( TableColumn tc )
|
|
{
|
|
this.tableColumn2 = tc;
|
|
}
|
|
private Hyperlink lnkNr = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNr()
|
|
{
|
|
return lnkNr;
|
|
}
|
|
|
|
public void setLnkNr( Hyperlink h )
|
|
{
|
|
this.lnkNr = h;
|
|
}
|
|
private TableColumn tableColumn3 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn3()
|
|
{
|
|
return tableColumn3;
|
|
}
|
|
|
|
public void setTableColumn3( TableColumn tc )
|
|
{
|
|
this.tableColumn3 = tc;
|
|
}
|
|
private Hyperlink lnkNomeAcidentado = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNomeAcidentado()
|
|
{
|
|
return lnkNomeAcidentado;
|
|
}
|
|
|
|
public void setLnkNomeAcidentado( Hyperlink h )
|
|
{
|
|
this.lnkNomeAcidentado = h;
|
|
}
|
|
private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridSeguimento()
|
|
{
|
|
return gridSeguimento;
|
|
}
|
|
|
|
public void setGridSeguimento( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridSeguimento = hpg;
|
|
}
|
|
private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel4()
|
|
{
|
|
return gridPanel4;
|
|
}
|
|
|
|
public void setGridPanel4( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridPanel4 = hpg;
|
|
}
|
|
private StaticText staticText6 = new StaticText();
|
|
|
|
public StaticText getStaticText6()
|
|
{
|
|
return staticText6;
|
|
}
|
|
|
|
public void setStaticText6( StaticText st )
|
|
{
|
|
this.staticText6 = st;
|
|
}
|
|
private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel5()
|
|
{
|
|
return gridPanel5;
|
|
}
|
|
|
|
public void setGridPanel5( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridPanel5 = hpg;
|
|
}
|
|
private Table table2 = new Table();
|
|
|
|
public Table getTable2()
|
|
{
|
|
return table2;
|
|
}
|
|
|
|
public void setTable2( Table t )
|
|
{
|
|
this.table2 = t;
|
|
}
|
|
private TableRowGroup tableRowGroup2 = new TableRowGroup();
|
|
|
|
public TableRowGroup getTableRowGroup2()
|
|
{
|
|
return tableRowGroup2;
|
|
}
|
|
|
|
public void setTableRowGroup2( TableRowGroup trg )
|
|
{
|
|
this.tableRowGroup2 = trg;
|
|
}
|
|
private TableColumn tableColumn4 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn4()
|
|
{
|
|
return tableColumn4;
|
|
}
|
|
|
|
public void setTableColumn4( TableColumn tc )
|
|
{
|
|
this.tableColumn4 = tc;
|
|
}
|
|
private Hyperlink lnkDataAcidenteSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkDataAcidenteSeg()
|
|
{
|
|
return lnkDataAcidenteSeg;
|
|
}
|
|
|
|
public void setLnkDataAcidenteSeg( Hyperlink h )
|
|
{
|
|
this.lnkDataAcidenteSeg = h;
|
|
}
|
|
private TableColumn tableColumn5 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn5()
|
|
{
|
|
return tableColumn5;
|
|
}
|
|
|
|
public void setTableColumn5( TableColumn tc )
|
|
{
|
|
this.tableColumn5 = tc;
|
|
}
|
|
private Hyperlink lnkNrSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNrSeg()
|
|
{
|
|
return lnkNrSeg;
|
|
}
|
|
|
|
public void setLnkNrSeg( Hyperlink h )
|
|
{
|
|
this.lnkNrSeg = h;
|
|
}
|
|
private TableColumn tableColumn6 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn6()
|
|
{
|
|
return tableColumn6;
|
|
}
|
|
|
|
public void setTableColumn6( TableColumn tc )
|
|
{
|
|
this.tableColumn6 = tc;
|
|
}
|
|
private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNomeAcidentadoSeg()
|
|
{
|
|
return lnkNomeAcidentadoSeg;
|
|
}
|
|
|
|
public void setLnkNomeAcidentadoSeg( Hyperlink h )
|
|
{
|
|
this.lnkNomeAcidentadoSeg = h;
|
|
}
|
|
private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridConcluidos()
|
|
{
|
|
return gridConcluidos;
|
|
}
|
|
|
|
public void setGridConcluidos( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridConcluidos = hpg;
|
|
}
|
|
private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel6()
|
|
{
|
|
return gridPanel6;
|
|
}
|
|
|
|
public void setGridPanel6( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridPanel6 = hpg;
|
|
}
|
|
private StaticText staticText7 = new StaticText();
|
|
|
|
public StaticText getStaticText7()
|
|
{
|
|
return staticText7;
|
|
}
|
|
|
|
public void setStaticText7( StaticText st )
|
|
{
|
|
this.staticText7 = st;
|
|
}
|
|
private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel7()
|
|
{
|
|
return gridPanel7;
|
|
}
|
|
|
|
public void setGridPanel7( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridPanel7 = hpg;
|
|
}
|
|
private PanelGroup groupPanel3 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel3()
|
|
{
|
|
return groupPanel3;
|
|
}
|
|
|
|
public void setGroupPanel3( PanelGroup pg )
|
|
{
|
|
this.groupPanel3 = pg;
|
|
}
|
|
private StaticText staticText8 = new StaticText();
|
|
|
|
public StaticText getStaticText8()
|
|
{
|
|
return staticText8;
|
|
}
|
|
|
|
public void setStaticText8( StaticText st )
|
|
{
|
|
this.staticText8 = st;
|
|
}
|
|
private DropDown drpAno = new DropDown();
|
|
|
|
public DropDown getDrpAno()
|
|
{
|
|
return drpAno;
|
|
}
|
|
|
|
public void setDrpAno( DropDown dd )
|
|
{
|
|
this.drpAno = dd;
|
|
}
|
|
private PanelGroup groupPanel4 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel4()
|
|
{
|
|
return groupPanel4;
|
|
}
|
|
|
|
public void setGroupPanel4( PanelGroup pg )
|
|
{
|
|
this.groupPanel4 = pg;
|
|
}
|
|
private StaticText lblMes = new StaticText();
|
|
|
|
public StaticText getLblMes()
|
|
{
|
|
return lblMes;
|
|
}
|
|
|
|
public void setLblMes( StaticText st )
|
|
{
|
|
this.lblMes = st;
|
|
}
|
|
private DropDown drpMes = new DropDown();
|
|
|
|
public DropDown getDrpMes()
|
|
{
|
|
return drpMes;
|
|
}
|
|
|
|
public void setDrpMes( DropDown dd )
|
|
{
|
|
this.drpMes = dd;
|
|
}
|
|
private PanelGroup groupPanel5 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel5()
|
|
{
|
|
return groupPanel5;
|
|
}
|
|
|
|
public void setGroupPanel5( PanelGroup pg )
|
|
{
|
|
this.groupPanel5 = pg;
|
|
}
|
|
private StaticText lblDia = new StaticText();
|
|
|
|
public StaticText getLblDia()
|
|
{
|
|
return lblDia;
|
|
}
|
|
|
|
public void setLblDia( StaticText st )
|
|
{
|
|
this.lblDia = st;
|
|
}
|
|
private DropDown drpDia = new DropDown();
|
|
|
|
public DropDown getDrpDia()
|
|
{
|
|
return drpDia;
|
|
}
|
|
|
|
public void setDrpDia( DropDown dd )
|
|
{
|
|
this.drpDia = dd;
|
|
}
|
|
private PanelGroup groupPanel6 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel6()
|
|
{
|
|
return groupPanel6;
|
|
}
|
|
|
|
public void setGroupPanel6( PanelGroup pg )
|
|
{
|
|
this.groupPanel6 = pg;
|
|
}
|
|
private StaticText staticText9 = new StaticText();
|
|
|
|
public StaticText getStaticText9()
|
|
{
|
|
return staticText9;
|
|
}
|
|
|
|
public void setStaticText9( StaticText st )
|
|
{
|
|
this.staticText9 = st;
|
|
}
|
|
private TextField txtNome = new TextField();
|
|
|
|
public TextField getTxtNome()
|
|
{
|
|
return txtNome;
|
|
}
|
|
|
|
public void setTxtNome( TextField tf )
|
|
{
|
|
this.txtNome = tf;
|
|
}
|
|
private Button butPesquisar = new Button();
|
|
|
|
public Button getButPesquisar()
|
|
{
|
|
return butPesquisar;
|
|
}
|
|
|
|
public void setButPesquisar( Button b )
|
|
{
|
|
this.butPesquisar = b;
|
|
}
|
|
private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel8()
|
|
{
|
|
return gridPanel8;
|
|
}
|
|
|
|
public void setGridPanel8( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridPanel8 = hpg;
|
|
}
|
|
private Table table3 = new Table();
|
|
|
|
public Table getTable3()
|
|
{
|
|
return table3;
|
|
}
|
|
|
|
public void setTable3( Table t )
|
|
{
|
|
this.table3 = t;
|
|
}
|
|
private TableRowGroup tableRowGroup3 = new TableRowGroup();
|
|
|
|
public TableRowGroup getTableRowGroup3()
|
|
{
|
|
return tableRowGroup3;
|
|
}
|
|
|
|
public void setTableRowGroup3( TableRowGroup trg )
|
|
{
|
|
this.tableRowGroup3 = trg;
|
|
}
|
|
private TableColumn tableColumn7 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn7()
|
|
{
|
|
return tableColumn7;
|
|
}
|
|
|
|
public void setTableColumn7( TableColumn tc )
|
|
{
|
|
this.tableColumn7 = tc;
|
|
}
|
|
private Hyperlink lnkDataConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkDataConcluida()
|
|
{
|
|
return lnkDataConcluida;
|
|
}
|
|
|
|
public void setLnkDataConcluida( Hyperlink h )
|
|
{
|
|
this.lnkDataConcluida = h;
|
|
}
|
|
private TableColumn tableColumn8 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn8()
|
|
{
|
|
return tableColumn8;
|
|
}
|
|
|
|
public void setTableColumn8( TableColumn tc )
|
|
{
|
|
this.tableColumn8 = tc;
|
|
}
|
|
private Hyperlink lnkNrConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNrConcluida()
|
|
{
|
|
return lnkNrConcluida;
|
|
}
|
|
|
|
public void setLnkNrConcluida( Hyperlink h )
|
|
{
|
|
this.lnkNrConcluida = h;
|
|
}
|
|
private TableColumn tableColumn9 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn9()
|
|
{
|
|
return tableColumn9;
|
|
}
|
|
|
|
public void setTableColumn9( TableColumn tc )
|
|
{
|
|
this.tableColumn9 = tc;
|
|
}
|
|
private Hyperlink lnkNomeConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNomeConcluida()
|
|
{
|
|
return lnkNomeConcluida;
|
|
}
|
|
|
|
public void setLnkNomeConcluida( Hyperlink h )
|
|
{
|
|
this.lnkNomeConcluida = h;
|
|
}
|
|
private StaticText txtSearchMsg = new StaticText();
|
|
|
|
public StaticText getTxtSearchMsg()
|
|
{
|
|
return txtSearchMsg;
|
|
}
|
|
|
|
public void setTxtSearchMsg( StaticText st )
|
|
{
|
|
this.txtSearchMsg = st;
|
|
}
|
|
private TableColumn tableColumn10 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn10()
|
|
{
|
|
return tableColumn10;
|
|
}
|
|
|
|
public void setTableColumn10( TableColumn tc )
|
|
{
|
|
this.tableColumn10 = tc;
|
|
}
|
|
private Hyperlink lnkFase = new Hyperlink();
|
|
|
|
public Hyperlink getLnkFase()
|
|
{
|
|
return lnkFase;
|
|
}
|
|
|
|
public void setLnkFase( Hyperlink h )
|
|
{
|
|
this.lnkFase = h;
|
|
}
|
|
private Hyperlink lnkEstabelecimento = new Hyperlink();
|
|
|
|
public Hyperlink getLnkEstabelecimento()
|
|
{
|
|
return lnkEstabelecimento;
|
|
}
|
|
|
|
public void setLnkEstabelecimento( Hyperlink h )
|
|
{
|
|
this.lnkEstabelecimento = h;
|
|
}
|
|
private TableColumn tableColumn16 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn16()
|
|
{
|
|
return tableColumn16;
|
|
}
|
|
|
|
public void setTableColumn16( TableColumn tc )
|
|
{
|
|
this.tableColumn16 = tc;
|
|
}
|
|
private TableColumn tableColumn17 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn17()
|
|
{
|
|
return tableColumn17;
|
|
}
|
|
|
|
public void setTableColumn17( TableColumn tc )
|
|
{
|
|
this.tableColumn17 = tc;
|
|
}
|
|
private TableColumn tableColumn11 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn11()
|
|
{
|
|
return tableColumn11;
|
|
}
|
|
|
|
public void setTableColumn11( TableColumn tc )
|
|
{
|
|
this.tableColumn11 = tc;
|
|
}
|
|
private Hyperlink lnkFaseSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkFaseSeg()
|
|
{
|
|
return lnkFaseSeg;
|
|
}
|
|
|
|
public void setLnkFaseSeg( Hyperlink h )
|
|
{
|
|
this.lnkFaseSeg = h;
|
|
}
|
|
private Hyperlink lnkEstabelecimentoSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkEstabelecimentoSeg()
|
|
{
|
|
return lnkEstabelecimentoSeg;
|
|
}
|
|
|
|
public void setLnkEstabelecimentoSeg( Hyperlink h )
|
|
{
|
|
this.lnkEstabelecimentoSeg = h;
|
|
}
|
|
private TableColumn tableColumn12 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn12()
|
|
{
|
|
return tableColumn12;
|
|
}
|
|
|
|
public void setTableColumn12( TableColumn tc )
|
|
{
|
|
this.tableColumn12 = tc;
|
|
}
|
|
private TableColumn tableColumn13 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn13()
|
|
{
|
|
return tableColumn13;
|
|
}
|
|
|
|
public void setTableColumn13( TableColumn tc )
|
|
{
|
|
this.tableColumn13 = tc;
|
|
}
|
|
private TableColumn tableColumn14 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn14()
|
|
{
|
|
return tableColumn14;
|
|
}
|
|
|
|
public void setTableColumn14( TableColumn tc )
|
|
{
|
|
this.tableColumn14 = tc;
|
|
}
|
|
private TableColumn tableColumn15 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn15()
|
|
{
|
|
return tableColumn15;
|
|
}
|
|
|
|
public void setTableColumn15( TableColumn tc )
|
|
{
|
|
this.tableColumn15 = tc;
|
|
}
|
|
private Hyperlink lnkPor = new Hyperlink();
|
|
|
|
public Hyperlink getLnkPor()
|
|
{
|
|
return lnkPor;
|
|
}
|
|
|
|
public void setLnkPor( Hyperlink h )
|
|
{
|
|
this.lnkPor = h;
|
|
}
|
|
private Hyperlink lnkPorSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkPorSeg()
|
|
{
|
|
return lnkPorSeg;
|
|
}
|
|
|
|
public void setLnkPorSeg( Hyperlink h )
|
|
{
|
|
this.lnkPorSeg = h;
|
|
}
|
|
private Hyperlink lnkPorConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkPorConcluida()
|
|
{
|
|
return lnkPorConcluida;
|
|
}
|
|
|
|
public void setLnkPorConcluida( Hyperlink h )
|
|
{
|
|
this.lnkPorConcluida = h;
|
|
}
|
|
private Hyperlink lnkEstabConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkEstabConcluida()
|
|
{
|
|
return lnkEstabConcluida;
|
|
}
|
|
|
|
public void setLnkEstabConcluida( Hyperlink h )
|
|
{
|
|
this.lnkEstabConcluida = h;
|
|
}
|
|
private PanelGroup groupPanel7 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel7()
|
|
{
|
|
return groupPanel7;
|
|
}
|
|
|
|
public void setGroupPanel7( PanelGroup pg )
|
|
{
|
|
this.groupPanel7 = pg;
|
|
}
|
|
private StaticText staticText3 = new StaticText();
|
|
|
|
public StaticText getStaticText3()
|
|
{
|
|
return staticText3;
|
|
}
|
|
|
|
public void setStaticText3( StaticText st )
|
|
{
|
|
this.staticText3 = st;
|
|
}
|
|
private TextField txtPor = new TextField();
|
|
|
|
public TextField getTxtPor()
|
|
{
|
|
return txtPor;
|
|
}
|
|
|
|
public void setTxtPor( TextField tf )
|
|
{
|
|
this.txtPor = tf;
|
|
}
|
|
private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel9()
|
|
{
|
|
return gridPanel9;
|
|
}
|
|
|
|
public void setGridPanel9( HtmlPanelGrid hpg )
|
|
{
|
|
this.gridPanel9 = hpg;
|
|
}
|
|
private PanelGroup groupPanel8 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel8()
|
|
{
|
|
return groupPanel8;
|
|
}
|
|
|
|
public void setGroupPanel8( PanelGroup pg )
|
|
{
|
|
this.groupPanel8 = pg;
|
|
}
|
|
private StaticText staticText10 = new StaticText();
|
|
|
|
public StaticText getStaticText10()
|
|
{
|
|
return staticText10;
|
|
}
|
|
|
|
public void setStaticText10( StaticText st )
|
|
{
|
|
this.staticText10 = st;
|
|
}
|
|
private ImageComponent image3 = new ImageComponent();
|
|
|
|
public ImageComponent getImage3()
|
|
{
|
|
return image3;
|
|
}
|
|
|
|
public void setImage3( ImageComponent ic )
|
|
{
|
|
this.image3 = ic;
|
|
}
|
|
private StaticText staticText11 = new StaticText();
|
|
|
|
public StaticText getStaticText11()
|
|
{
|
|
return staticText11;
|
|
}
|
|
|
|
public void setStaticText11( StaticText st )
|
|
{
|
|
this.staticText11 = st;
|
|
}
|
|
private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanelFilterActual()
|
|
{
|
|
return this.gridPanelFilterActual;
|
|
}
|
|
|
|
public void setGridPanelFilterActual( HtmlPanelGrid pg )
|
|
{
|
|
this.gridPanelFilterActual = pg;
|
|
}
|
|
private PanelGroup groupPanelFilterActual = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanelFilterActual()
|
|
{
|
|
return this.groupPanelFilterActual;
|
|
}
|
|
|
|
public void setGroupPanelFilterActual( PanelGroup pg )
|
|
{
|
|
this.groupPanelFilterActual = pg;
|
|
}
|
|
private StaticText labelFilterNameActual = new StaticText();
|
|
|
|
public StaticText getLabelFilterNameActual()
|
|
{
|
|
return this.labelFilterNameActual;
|
|
}
|
|
|
|
public void setLabelFilterNameActual( StaticText st )
|
|
{
|
|
this.labelFilterNameActual = st;
|
|
}
|
|
private TextField textFilterNameActual = new TextField();
|
|
|
|
public TextField getTextFilterNameActual()
|
|
{
|
|
return this.textFilterNameActual;
|
|
}
|
|
|
|
public void setTextFilterNameActual( TextField tf )
|
|
{
|
|
this.textFilterNameActual = tf;
|
|
}
|
|
|
|
|
|
|
|
// private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar();
|
|
// public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual()
|
|
// {
|
|
// return this.calFilterDateActual;
|
|
// }
|
|
// public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c )
|
|
// {
|
|
// this.calFilterDateActual = c;
|
|
// }
|
|
|
|
private Date calFilterDateActual = null;
|
|
public Date getCalFilterDateActual()
|
|
{
|
|
return calFilterDateActual;
|
|
}
|
|
public void setCalFilterDateActual( Date calFilterDateActual )
|
|
{
|
|
this.calFilterDateActual = calFilterDateActual;
|
|
}
|
|
|
|
|
|
private TextField textFilterPORActual = new TextField();
|
|
|
|
public TextField getTextFilterPORActual()
|
|
{
|
|
return textFilterPORActual;
|
|
}
|
|
|
|
public void setTextFilterPORActual( TextField textFilterPORActual )
|
|
{
|
|
this.textFilterPORActual = textFilterPORActual;
|
|
}
|
|
private Button buttonFilterActual = new Button();
|
|
|
|
public Button getButtonFilterActual()
|
|
{
|
|
return this.buttonFilterActual;
|
|
}
|
|
|
|
public void setButtonFilterActual( Button b )
|
|
{
|
|
this.buttonFilterActual = b;
|
|
}
|
|
private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanelFilterSeg()
|
|
{
|
|
return this.gridPanelFilterSeg;
|
|
}
|
|
|
|
public void setGridPanelFilterSeg( HtmlPanelGrid pg )
|
|
{
|
|
this.gridPanelFilterSeg = pg;
|
|
}
|
|
private PanelGroup groupPanelFilterSeg = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanelFilterSeg()
|
|
{
|
|
return this.groupPanelFilterSeg;
|
|
}
|
|
|
|
public void setGroupPanelFilterSeg( PanelGroup pg )
|
|
{
|
|
this.groupPanelFilterSeg = pg;
|
|
}
|
|
private StaticText labelFilterNameSeg = new StaticText();
|
|
|
|
public StaticText getLabelFilterNameSeg()
|
|
{
|
|
return this.labelFilterNameSeg;
|
|
}
|
|
|
|
public void setLabelFilterNameSeg( StaticText st )
|
|
{
|
|
this.labelFilterNameSeg = st;
|
|
}
|
|
private TextField textFilterNameSeg = new TextField();
|
|
|
|
public TextField getTextFilterNameSeg()
|
|
{
|
|
return this.textFilterNameSeg;
|
|
}
|
|
|
|
public void setTextFilterNameSeg( TextField tf )
|
|
{
|
|
this.textFilterNameSeg = tf;
|
|
}
|
|
|
|
|
|
|
|
// private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar();
|
|
// public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg()
|
|
// {
|
|
// return this.calFilterDateSeg;
|
|
// }
|
|
// public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c )
|
|
// {
|
|
// this.calFilterDateSeg = c;
|
|
// }
|
|
|
|
private Date calFilterDateSeguimento = null;
|
|
public Date getCalFilterDateSeguimento()
|
|
{
|
|
return calFilterDateSeguimento;
|
|
}
|
|
public void setCalFilterDateSeguimento( Date calFilterDateSeguimento )
|
|
{
|
|
this.calFilterDateSeguimento = calFilterDateSeguimento;
|
|
}
|
|
|
|
|
|
|
|
|
|
private TextField textFilterPORSeg = new TextField();
|
|
|
|
public TextField getTextFilterPORSeg()
|
|
{
|
|
return textFilterPORSeg;
|
|
}
|
|
|
|
public void setTextFilterPORSeg( TextField textFilterPORSeg )
|
|
{
|
|
this.textFilterPORSeg = textFilterPORSeg;
|
|
}
|
|
private Button buttonFilterSeg = new Button();
|
|
|
|
public Button getButtonFilterSeg()
|
|
{
|
|
return this.buttonFilterSeg;
|
|
}
|
|
|
|
public void setButtonFilterSeg( Button b )
|
|
{
|
|
this.buttonFilterSeg = b;
|
|
}
|
|
private DropDown dropCurrentYear = new DropDown();
|
|
|
|
public DropDown getDropCurrentYear()
|
|
{
|
|
return dropCurrentYear;
|
|
}
|
|
|
|
public void setDropCurrentYear( DropDown dropCurrentYear )
|
|
{
|
|
this.dropCurrentYear = dropCurrentYear;
|
|
}
|
|
private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
|
|
// </editor-fold>
|
|
|
|
/**
|
|
* <p>Construct a new Page bean instance.</p>
|
|
*/
|
|
public FormMedico()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* <p>Callback method that is called whenever a page is navigated to,
|
|
* either directly via a URL, or indirectly via page navigation.
|
|
* Customize this method to acquire resources that will be needed
|
|
* for event handlers and lifecycle methods, whether or not this
|
|
* page is performing post back processing.</p>
|
|
*
|
|
* <p>Note that, if the current request is a postback, the property
|
|
* values of the components do <strong>not</strong> represent any
|
|
* values submitted with this request. Instead, they represent the
|
|
* property values that were saved for this view when it was rendered.</p>
|
|
*/
|
|
@Override
|
|
public void init()
|
|
{
|
|
// Perform initializations inherited from our superclass
|
|
super.init();
|
|
// Perform application initialization that must complete
|
|
// *before* managed components are initialized
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
|
|
// Initialize automatically managed components
|
|
// *Note* - this logic should NOT be modified
|
|
try
|
|
{
|
|
_init();
|
|
}
|
|
catch ( Exception e )
|
|
{
|
|
log( "FormMedico Initialization Failure", e );
|
|
throw e instanceof FacesException ? ( FacesException ) e : new FacesException( e );
|
|
}
|
|
|
|
// </editor-fold>
|
|
// Perform application initialization that must complete
|
|
// *after* managed components are initialized
|
|
|
|
if ( !getSessionBean1().isLoggedIn() )
|
|
{
|
|
try
|
|
{
|
|
getExternalContext().redirect( "Login.jsp" );
|
|
}
|
|
catch ( Exception e )
|
|
{
|
|
// . . . handle exception . . .
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* <p>Callback method that is called after the component tree has been
|
|
* restored, but before any event processing takes place. This method
|
|
* will <strong>only</strong> be called on a postback request that
|
|
* is processing a form submit. Customize this method to allocate
|
|
* resources that will be required in your event handlers.</p>
|
|
*/
|
|
@Override
|
|
public void preprocess()
|
|
{
|
|
}
|
|
|
|
private void fillInitialForm()
|
|
{
|
|
Integer fromYear = getSelectedYear();
|
|
|
|
try
|
|
{
|
|
table1.setRendered( true );
|
|
|
|
// ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(5));
|
|
// ArrayList actuaisList = adp.getAnalisesActuaisMedicoList( getSessionBean1().getCurrentUser().getEstabelecimento_id() );
|
|
// getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList);
|
|
}
|
|
catch ( Exception ex )
|
|
{
|
|
table1.setRendered( false );
|
|
ErrorLogger.logException( ex );
|
|
}
|
|
|
|
table2.setRendered( false );
|
|
|
|
try
|
|
{
|
|
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
|
|
|
|
table2.setRendered( true );
|
|
|
|
ArrayList seguimentoList = adp.getAnalisesSeguimentoMedList(
|
|
getSessionBean1().getCurrentUser().getEstabelecimento_id(), fromYear );
|
|
getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
|
|
}
|
|
catch ( Exception ex )
|
|
{
|
|
table2.setRendered( false );
|
|
ErrorLogger.logException( ex );
|
|
}
|
|
|
|
try
|
|
{
|
|
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
|
|
table3.setRendered( true );
|
|
|
|
ArrayList concluidasList = adp.getAnalisesConcluidasList(
|
|
getSessionBean1().getCurrentUser().getEstabelecimento_id(), fromYear );
|
|
getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList );
|
|
}
|
|
catch ( Exception ex )
|
|
{
|
|
table3.setRendered( false );
|
|
ErrorLogger.logException( ex );
|
|
}
|
|
}
|
|
|
|
/**
|
|
* <p>Callback method that is called just before rendering takes place.
|
|
* This method will <strong>only</strong> be called for the page that
|
|
* will actually be rendered (and not, for example, on a page that
|
|
* handled a postback and then navigated to a different page). Customize
|
|
* this method to allocate resources that will be required for rendering
|
|
* this page.</p>
|
|
*/
|
|
@Override
|
|
public void prerender()
|
|
{
|
|
lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
|
|
|
|
HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest();
|
|
String referer = request.getRequestURI();
|
|
String pageFrom = Utils.getPageFrom( referer );
|
|
if ( !pageFrom.matches( "FormMedico.jsp" ) )
|
|
{
|
|
fillCurrentYearDrop();
|
|
fillInitialForm();
|
|
|
|
fillAnoDropDown();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* <p>Callback method that is called after rendering is completed for
|
|
* this request, if <code>init()</code> was called (regardless of whether
|
|
* or not this was the page that was actually rendered). Customize this
|
|
* method to release resources acquired in the <code>init()</code>,
|
|
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
|
|
* acquired during execution of an event handler).</p>
|
|
*/
|
|
@Override
|
|
public void destroy()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* <p>Return a reference to the scoped data bean.</p>
|
|
*/
|
|
protected RequestBean1 getRequestBean1()
|
|
{
|
|
return ( RequestBean1 ) getBean( "RequestBean1" );
|
|
}
|
|
|
|
/**
|
|
* <p>Return a reference to the scoped data bean.</p>
|
|
*/
|
|
protected SessionBean1 getSessionBean1()
|
|
{
|
|
return ( SessionBean1 ) getBean( "SessionBean1" );
|
|
}
|
|
|
|
/**
|
|
* <p>Return a reference to the scoped data bean.</p>
|
|
*/
|
|
protected ApplicationBean1 getApplicationBean1()
|
|
{
|
|
return ( ApplicationBean1 ) getBean( "ApplicationBean1" );
|
|
}
|
|
|
|
public String lnkEditUser_action()
|
|
{
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
getSessionBean1().setModoEdicaoUtilizador( "edit" );
|
|
return "user";
|
|
}
|
|
|
|
public String lnkLogout_action()
|
|
{
|
|
Utils.doLogout( getExternalContext(), false );
|
|
return "login";
|
|
}
|
|
|
|
public String lnkDataAcidente_action()
|
|
{
|
|
AnaliseAcidente a = getTableActivosRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "analise_acidente";
|
|
}
|
|
|
|
public String lnkNr_action()
|
|
{
|
|
AnaliseAcidente a = getTableActivosRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "analise_acidente";
|
|
}
|
|
|
|
public String lnkNomeAcidentado_action()
|
|
{
|
|
AnaliseAcidente a = getTableActivosRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "analise_acidente";
|
|
}
|
|
|
|
private AnaliseAcidente getTableActivosRowData()
|
|
{
|
|
RowKey rk = tableRowGroup1.getRowKey();
|
|
int k = Integer.parseInt( rk.getRowId() );
|
|
AnalisesActualDataProvider provider = ( AnalisesActualDataProvider ) tableRowGroup1.getSourceData();
|
|
ArrayList list = ( ArrayList ) provider.getList();
|
|
AnaliseAcidente a = ( AnaliseAcidente ) list.get( k );
|
|
return a;
|
|
}
|
|
|
|
private AnaliseAcidente getTableConcluidasRowData()
|
|
{
|
|
RowKey rk = tableRowGroup3.getRowKey();
|
|
int k = Integer.parseInt( rk.getRowId() );
|
|
AnalisesConcluidasDataProvider provider = ( AnalisesConcluidasDataProvider ) tableRowGroup3.getSourceData();
|
|
ArrayList list = ( ArrayList ) provider.getList();
|
|
AnaliseAcidente a = ( AnaliseAcidente ) list.get( k );
|
|
return a;
|
|
}
|
|
|
|
public String lnkDataAcidenteSeg_action()
|
|
{
|
|
AnaliseAcidente a = getTableSeguimentoRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkNrSeg_action()
|
|
{
|
|
AnaliseAcidente a = getTableSeguimentoRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkNomeAcidentadoSeg_action()
|
|
{
|
|
AnaliseAcidente a = getTableSeguimentoRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
private AnaliseAcidente getTableSeguimentoRowData()
|
|
{
|
|
RowKey rk = tableRowGroup2.getRowKey();
|
|
int k = Integer.parseInt( rk.getRowId() );
|
|
AnalisesSeguimentoDataProvider provider = ( AnalisesSeguimentoDataProvider ) tableRowGroup2.getSourceData();
|
|
ArrayList list = ( ArrayList ) provider.getList();
|
|
AnaliseAcidente a = ( AnaliseAcidente ) list.get( k );
|
|
return a;
|
|
}
|
|
|
|
public void drpAno_processValueChange( ValueChangeEvent event )
|
|
{
|
|
Object ano = event.getNewValue();
|
|
if ( ano == null )
|
|
{
|
|
lblMes.setVisible( false );
|
|
drpMes.setVisible( false );
|
|
lblDia.setVisible( false );
|
|
drpDia.setVisible( false );
|
|
}
|
|
else
|
|
{
|
|
lblMes.setVisible( true );
|
|
drpMes.setVisible( true );
|
|
fillMesDropDown();
|
|
}
|
|
}
|
|
|
|
public void drpMes_processValueChange( ValueChangeEvent event )
|
|
{
|
|
Object mes = event.getNewValue();
|
|
if ( mes == null )
|
|
{
|
|
lblDia.setVisible( false );
|
|
drpDia.setVisible( false );
|
|
}
|
|
else
|
|
{
|
|
lblDia.setVisible( true );
|
|
drpDia.setVisible( true );
|
|
fillDiaDropDown();
|
|
}
|
|
}
|
|
|
|
public void drpDia_processValueChange( ValueChangeEvent event )
|
|
{
|
|
}
|
|
|
|
public String butPesquisar_action()
|
|
{
|
|
Object obAno = null;
|
|
Object obMes = null;
|
|
Object obDia = null;
|
|
try
|
|
{
|
|
obAno = drpAno.getSelected();
|
|
obMes = drpMes.getSelected();
|
|
obDia = drpDia.getSelected();
|
|
}
|
|
catch ( Exception ex )
|
|
{
|
|
ErrorLogger.logException( ex );
|
|
}
|
|
|
|
Integer ano = null;
|
|
Integer mes = null;
|
|
Integer dia = null;
|
|
|
|
if ( obAno != null )
|
|
{
|
|
ano = ( Integer ) obAno;
|
|
}
|
|
|
|
if ( obMes != null )
|
|
{
|
|
mes = ( Integer ) obMes;
|
|
}
|
|
|
|
if ( obDia != null )
|
|
{
|
|
dia = ( Integer ) obDia;
|
|
}
|
|
|
|
String por = null;
|
|
if ( txtPor.getText() != null )
|
|
{
|
|
por = ( String ) txtPor.getText();
|
|
if ( por.trim().length() == 0 )
|
|
{
|
|
por = null;
|
|
}
|
|
}
|
|
|
|
String nome = null;
|
|
if ( txtNome.getText() != null )
|
|
{
|
|
nome = ( String ) txtNome.getText();
|
|
if ( nome.trim().length() == 0 )
|
|
{
|
|
nome = null;
|
|
}
|
|
}
|
|
|
|
try
|
|
{
|
|
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
|
|
|
|
ArrayList concluidasList = adp.searchAnalisesConcluidasList(
|
|
getSessionBean1().getCurrentUser().getEstabelecimento_id(),
|
|
ano, mes, dia, por, nome, null, getSelectedYear() );
|
|
|
|
table3.setRendered( true );
|
|
txtSearchMsg.setRendered( false );
|
|
getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList );
|
|
}
|
|
catch ( Exception ex )
|
|
{
|
|
table3.setRendered( false );
|
|
txtSearchMsg.setRendered( true );
|
|
txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
|
|
ErrorLogger.logException( ex );
|
|
}
|
|
return null;
|
|
}
|
|
|
|
private void fillAnoDropDown()
|
|
{
|
|
// ArrayList anosList = new ArrayList();
|
|
// for(int ano=2007; ano<2051; ano++)
|
|
// {
|
|
// anosList.add(new Integer(ano));
|
|
// }
|
|
|
|
try
|
|
{
|
|
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
|
|
|
|
ArrayList anosList = adp.getAnosListFromAnalises();
|
|
com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[ anosList.size() + 1 ];
|
|
anoOptions[0] = new Option( "", "" );
|
|
ListIterator iter = anosList.listIterator();
|
|
int i = 1;
|
|
while ( iter.hasNext() )
|
|
{
|
|
Integer ano = ( Integer ) iter.next();
|
|
|
|
anoOptions[i] = new Option( ano, ano.toString() );
|
|
i++;
|
|
}
|
|
getSessionBean1().setAnoOptions( anoOptions );
|
|
Calendar cal = new GregorianCalendar();
|
|
int year = cal.get( Calendar.YEAR );
|
|
//drpAno.setSelected( new Integer(year) );
|
|
}
|
|
catch ( Exception ex )
|
|
{
|
|
ErrorLogger.logException( ex );
|
|
}
|
|
}
|
|
|
|
private void fillMesDropDown()
|
|
{
|
|
com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[ 13 ];
|
|
mesOptions[0] = new Option( "", "" );
|
|
mesOptions[1] = new Option( new Integer( 1 ), "Janeiro" );
|
|
mesOptions[2] = new Option( new Integer( 2 ), "Fevereiro" );
|
|
mesOptions[3] = new Option( new Integer( 3 ), "Março" );
|
|
mesOptions[4] = new Option( new Integer( 4 ), "Abril" );
|
|
mesOptions[5] = new Option( new Integer( 5 ), "Maio" );
|
|
mesOptions[6] = new Option( new Integer( 6 ), "Junho" );
|
|
mesOptions[7] = new Option( new Integer( 7 ), "Julho" );
|
|
mesOptions[8] = new Option( new Integer( 8 ), "Agosto" );
|
|
mesOptions[9] = new Option( new Integer( 9 ), "Setembro" );
|
|
mesOptions[10] = new Option( new Integer( 10 ), "Outubro" );
|
|
mesOptions[11] = new Option( new Integer( 11 ), "Novembro" );
|
|
mesOptions[12] = new Option( new Integer( 12 ), "Dezembro" );
|
|
getSessionBean1().setMesOptions( mesOptions );
|
|
Calendar cal = new GregorianCalendar();
|
|
int month = cal.get( Calendar.MONTH ); // 0=Jan, 1=Feb, ...
|
|
//drpMes.setSelected( new Integer(month+1) );
|
|
}
|
|
|
|
private void fillDiaDropDown()
|
|
{
|
|
}
|
|
|
|
public String lnkDataConcluida_action()
|
|
{
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkNrConcluida_action()
|
|
{
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkNomeConcluida_action()
|
|
{
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkFase_action()
|
|
{
|
|
AnaliseAcidente a = getTableActivosRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "analise_acidente";
|
|
}
|
|
|
|
public String lnkEstabelecimento_action()
|
|
{
|
|
AnaliseAcidente a = getTableActivosRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "analise_acidente";
|
|
}
|
|
|
|
public String lnkFaseSeg_action()
|
|
{
|
|
AnaliseAcidente a = getTableSeguimentoRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkEstabelecimentoSeg_action()
|
|
{
|
|
AnaliseAcidente a = getTableSeguimentoRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkPor_action()
|
|
{
|
|
AnaliseAcidente a = getTableActivosRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "analise_acidente";
|
|
}
|
|
|
|
public String lnkPorSeg_action()
|
|
{
|
|
AnaliseAcidente a = getTableSeguimentoRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkPorConcluida_action()
|
|
{
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkEstabConcluida_action()
|
|
{
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise( a );
|
|
getSessionBean1().setNavFrom( "FormMedico" );
|
|
return "view_analise";
|
|
}
|
|
|
|
public String buttonFilterActual_action()
|
|
{
|
|
// Date visitaDate = ( Date ) calFilterDateActual.getValue();
|
|
Date visitaDate = calFilterDateActual;
|
|
String visitaDateStr = null;
|
|
if ( visitaDate != null )
|
|
{
|
|
visitaDateStr = D_F.format( visitaDate );
|
|
}
|
|
|
|
String POR = null;
|
|
if ( textFilterPORActual.getText() != null )
|
|
{
|
|
POR = ( ( String ) textFilterPORActual.getText() ).trim();
|
|
if ( POR.length() == 0 )
|
|
{
|
|
POR = null;
|
|
}
|
|
}
|
|
|
|
String nome = null;
|
|
if ( textFilterNameActual.getText() != null )
|
|
{
|
|
nome = ( ( String ) textFilterNameActual.getText() ).trim();
|
|
if ( nome.length() == 0 )
|
|
{
|
|
nome = null;
|
|
}
|
|
}
|
|
|
|
try
|
|
{
|
|
// ArrayList actualList = adp.searchAnalisesActuaisMedico(
|
|
// getSessionBean1().getCurrentUser().getEstabelecimento_id(), nome, visitaDateStr );
|
|
|
|
table1.setRendered( true );
|
|
txtSearchMsg.setRendered( false );
|
|
// getSessionBean1().getAnalisesActualDataProvider().setList( actualList );
|
|
}
|
|
catch ( Exception e )
|
|
{
|
|
table1.setRendered( false );
|
|
txtSearchMsg.setRendered( true );
|
|
txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
|
|
ErrorLogger.logException( e );
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
public String buttonFilterSeg_action()
|
|
{
|
|
// Date visitaDate = ( Date ) calFilterDateSeg.getValue();
|
|
Date visitaDate = calFilterDateSeguimento;
|
|
String visitaDateStr = null;
|
|
if ( visitaDate != null )
|
|
{
|
|
visitaDateStr = D_F.format( visitaDate );
|
|
}
|
|
|
|
String POR = null;
|
|
if ( textFilterPORSeg.getText() != null )
|
|
{
|
|
POR = ( ( String ) textFilterPORSeg.getText() ).trim();
|
|
if ( POR.length() == 0 )
|
|
{
|
|
POR = null;
|
|
}
|
|
}
|
|
|
|
String nome = null;
|
|
if ( textFilterNameSeg.getText() != null )
|
|
{
|
|
nome = ( ( String ) textFilterNameSeg.getText() ).trim();
|
|
if ( nome.length() == 0 )
|
|
{
|
|
nome = null;
|
|
}
|
|
}
|
|
|
|
try
|
|
{
|
|
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
|
|
|
|
ArrayList seguimentoList = adp.searchAnalisesSeguimentoMedico(
|
|
getSessionBean1().getCurrentUser().getEstabelecimento_id(),
|
|
nome, visitaDateStr, POR, getSelectedYear() );
|
|
|
|
table2.setRendered( true );
|
|
txtSearchMsg.setRendered( false );
|
|
getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
|
|
}
|
|
catch ( Exception e )
|
|
{
|
|
table2.setRendered( false );
|
|
txtSearchMsg.setRendered( true );
|
|
txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
|
|
ErrorLogger.logException( e );
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
public void dropCurrentYear_valueChangeListener( ValueChangeEvent event )
|
|
{
|
|
Object oldValue = event.getOldValue();
|
|
Object newValue = event.getNewValue();
|
|
|
|
if ( newValue != null && newValue instanceof Integer )
|
|
{
|
|
Integer newYear = ( Integer ) newValue;
|
|
Integer oldYear = oldValue != null && oldValue instanceof Integer ? ( Integer ) oldValue : null;
|
|
if ( oldYear == null || !newYear.equals( oldYear ) )
|
|
{
|
|
fillInitialForm();
|
|
}
|
|
}
|
|
}
|
|
|
|
private Integer getSelectedYear()
|
|
{
|
|
Integer result = null;
|
|
if ( dropCurrentYear != null )
|
|
{
|
|
Object selected = dropCurrentYear.getSelected();
|
|
if ( selected != null && selected instanceof Integer )
|
|
{
|
|
result = ( Integer ) selected;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
private void fillCurrentYearDrop()
|
|
{
|
|
Integer selectedYear = getSelectedYear();
|
|
|
|
Option[] opts = Utils.getYearDropValues();
|
|
dropCurrentYear.setItems( opts );
|
|
|
|
dropCurrentYear.setSelected( selectedYear != null ? selectedYear : Utils.getDefaultSelectedYear() );
|
|
}
|
|
}
|
|
|