diff --git a/trunk/SIPRPSoft/src/siprp/Main.java b/trunk/SIPRPSoft/src/siprp/Main.java
index dfbded16..23e4e07e 100644
--- a/trunk/SIPRPSoft/src/siprp/Main.java
+++ b/trunk/SIPRPSoft/src/siprp/Main.java
@@ -49,7 +49,7 @@ import com.evolute.utils.ui.window.LoginWindow;
public class Main implements com.evolute.utils.ui.window.Connector
{
- public final static String SHST_VERSION = "7.8";
+ public final static String SHST_VERSION = "8.1";
private final static ClassLoader classLoader = new EVUtilsImageLib().getClass().getClassLoader();
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoConstants.java b/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoConstants.java
new file mode 100644
index 00000000..4534b31b
--- /dev/null
+++ b/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoConstants.java
@@ -0,0 +1,11 @@
+package siprp.medicina.locais_realizacao;
+
+import com.evolute.utils.data.IDObject;
+import com.evolute.utils.data.MappableObject;
+
+public class LocaisRealizacaoConstants
+{
+ protected static final Integer PRESTADOR_ID_SIPRP = new Integer( -1 );
+
+ protected static final IDObject PRESTADOR_SIPRP = new MappableObject( PRESTADOR_ID_SIPRP, "SIPRP" );
+}
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoDataProvider.java b/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoDataProvider.java
index e0d88c03..1eeaec5c 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoDataProvider.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoDataProvider.java
@@ -9,8 +9,14 @@
package siprp.medicina.locais_realizacao;
+import java.util.Date;
+
+import siprp.medicina.MedicinaConstants;
+
import com.evolute.utils.Singleton;
import com.evolute.utils.arrays.Virtual2DArray;
+import com.evolute.utils.data.IDObject;
+import com.evolute.utils.data.MappableObject;
import com.evolute.utils.db.DBManager;
import com.evolute.utils.db.Executer;
import com.evolute.utils.sql.Assignment;
@@ -18,9 +24,9 @@ import com.evolute.utils.sql.Expression;
import com.evolute.utils.sql.Field;
import com.evolute.utils.sql.Select;
import com.evolute.utils.sql.Select2;
+import com.evolute.utils.sql.Union;
import com.evolute.utils.sql.Update;
import com.evolute.utils.tables.ColumnizedMappable;
-import java.util.Date;
/**
*
@@ -57,20 +63,50 @@ public class LocaisRealizacaoDataProvider
public ColumnizedMappable[] getEmpresasComMarcacoes( Date data )
throws Exception
{
+
+
+ Select selectConsultas =
+ new Select2(
+ new String[]{ "trabalhadores_consultas_datas", "trabalhadores_consultas", "trabalhadores", "estabelecimentos" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "trabalhadores_consultas_datas.trabalhadores_consultas_id" ).isEqual( new Field( "trabalhadores_consultas.id" ) ),
+ new Field( "trabalhadores_consultas.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ),
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ) },
+ new String[]{ "estabelecimentos.empresa_id" },
+ new Field( "trabalhadores_consultas_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores_consultas_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
+ Select selectEcds =
+ new Select2(
+ new String[]{ "trabalhadores_ecds_datas", "trabalhadores_ecds", "trabalhadores", "estabelecimentos" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "trabalhadores_ecds_datas.trabalhadores_ecds_id" ).isEqual( new Field( "trabalhadores_ecds.id" ) ),
+ new Field( "trabalhadores_ecds.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ),
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ) },
+ new String[]{ "estabelecimentos.empresa_id" },
+ new Field( "trabalhadores_ecds_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores_ecds_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
+
Select select =
- new Select2(
- new String[]{ "marcacoes_trabalhador", "trabalhadores", "estabelecimentos", "empresas" },
- new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
- new Expression[]{
- new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ),
- new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ),
- new Field( "estabelecimentos.empresa_id" ).isEqual( new Field( "empresas.id" ) ) },
- new String[]{ "DISTINCT empresas.id", "empresas.designacao_social", "empresas.designacao_social_plain" },
- new Field( "marcacoes_trabalhador.data" ).isEqual( data ),
- new String[]{ "empresas.designacao_social_plain" },
- null,
- null,
- null );
+ new Select2(
+ new String[]{ "empresas" },
+ new Integer[]{},
+ new Expression[]{},
+ new String[]{ "DISTINCT empresas.id", "empresas.designacao_social", "empresas.designacao_social_plain" },
+ new Field( "empresas.id" ).in( new Union( new Select[]{ selectConsultas, selectEcds }, new int[]{} ) ),
+ new String[]{ "empresas.designacao_social_plain" },
+ null,
+ null,
+ null );
Virtual2DArray array = EXECUTER.executeQuery( select );
ColumnizedMappable empresas[] = new ColumnizedMappable[ array.columnLength() ];
for( int n = 0; n < empresas.length; n++ )
@@ -85,85 +121,155 @@ public class LocaisRealizacaoDataProvider
public ColumnizedMappable[] getEstabelecimentosComMarcacoesByEmpresa( Integer empresaID, Date data )
throws Exception
{
+ Select selectConsultas =
+ new Select2(
+ new String[]{ "trabalhadores_consultas_datas", "trabalhadores_consultas", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "trabalhadores_consultas_datas.trabalhadores_consultas_id" ).isEqual( new Field( "trabalhadores_consultas.id" ) ),
+ new Field( "trabalhadores_consultas.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "trabalhadores.estabelecimento_id" },
+ new Field( "trabalhadores_consultas_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores_consultas_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
+ Select selectEcds =
+ new Select2(
+ new String[]{ "trabalhadores_ecds_datas", "trabalhadores_ecds", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "trabalhadores_ecds_datas.trabalhadores_ecds_id" ).isEqual( new Field( "trabalhadores_ecds.id" ) ),
+ new Field( "trabalhadores_ecds.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "trabalhadores.estabelecimento_id" },
+ new Field( "trabalhadores_ecds_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores_ecds_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
+
Select select =
- new Select2(
- new String[]{ "marcacoes_trabalhador", "trabalhadores", "estabelecimentos" },
- new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER },
- new Expression[]{
- new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ),
- new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ) },
- new String[]{ "DISTINCT estabelecimentos.id", "estabelecimentos.nome", "estabelecimentos.nome_plain" },
- new Field( "marcacoes_trabalhador.data" ).isEqual( data ).and(
- new Field( "estabelecimentos.empresa_id" ).isEqual( empresaID ) ),
- new String[]{ "estabelecimentos.nome_plain" },
- null,
- null,
- null );
+ new Select2(
+ new String[]{ "estabelecimentos" },
+ new Integer[]{},
+ new Expression[]{},
+ new String[]{ "DISTINCT estabelecimentos.id", "estabelecimentos.nome", "estabelecimentos.nome_plain" },
+ new Field( "estabelecimentos.id" ).in( new Union( new Select[]{ selectConsultas, selectEcds }, new int[]{} ) ).and(
+ new Field( "estabelecimentos.inactivo" ).isEqual( "n" ) ).and(
+ new Field( "empresa_id" ).isEqual( empresaID ) ),
+ new String[]{ "estabelecimentos.nome_plain" },
+ null,
+ null,
+ null );
Virtual2DArray array = EXECUTER.executeQuery( select );
ColumnizedMappable estabelecimentos[] = new ColumnizedMappable[ array.columnLength() ];
for( int n = 0; n < estabelecimentos.length; n++ )
{
Integer id = ( Integer ) array.get( n, 0 );
String nome = ( String ) array.get( n, 1 );
+System.out.println( id + " - " + nome );
estabelecimentos[ n ] = new ColumnizedMappable( id, nome );
}
+
+System.out.println("Estabelecimentos: " + estabelecimentos.length );
+
return estabelecimentos;
}
- public int getNumeroMarcacoesByEstabelecimentoAndTipo( Integer estabelecimentoID, int tipo, Date data )
+ public int getNumeroConsultasByEstabelecimentoAndDate( Integer estabelecimentoId, Date data )
throws Exception
{
Select select =
- new Select2(
- new String[]{ "marcacoes_trabalhador", "trabalhadores" },
- new Integer[]{ Select2.JOIN_INNER },
- new Expression[]{
- new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
- new String[]{ "COUNT( * )" },
- new Field( "marcacoes_trabalhador.data" ).isEqual( data ).and(
- new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoID ) ).and(
- new Field( "marcacoes_trabalhador.tipo" ).isEqual( tipo ) ),
- null,
- null,
- null,
- null );
+ new Select2(
+ new String[]{ "trabalhadores_consultas_datas", "trabalhadores_consultas", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "trabalhadores_consultas_datas.trabalhadores_consultas_id" ).isEqual( new Field( "trabalhadores_consultas.id" ) ),
+ new Field( "trabalhadores_consultas.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "COUNT( DISTINCT trabalhadores.id )" },
+ new Field( "trabalhadores_consultas_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+ new Field( "trabalhadores_consultas_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
Virtual2DArray array = EXECUTER.executeQuery( select );
- if( array.columnLength() == 0 || array.get( 0, 0 ) == null )
- {
- return 0;
- }
- else
- {
- return ( ( Number ) array.get( 0, 0 ) ).intValue();
- }
+ return ( ( Number ) array.get( 0, 0 ) ).intValue();
}
- public Integer[] getPrestadoresIDByEstabelecimentoAndTipo( Integer estabelecimentoID, int tipo, Date data )
+ public Integer[] getPrestadoresConsultaIdByEstabelecimentoAndDate( Integer estabelecimentoId, Date data )
throws Exception
{
- Select select =
- new Select2(
- new String[]{ "marcacoes_trabalhador", "trabalhadores" },
- new Integer[]{ Select2.JOIN_INNER },
- new Expression[]{
- new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
- new String[]{ "DISTINCT prestador_id" },
- new Field( "marcacoes_trabalhador.data" ).isEqual( data ).and(
- new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoID ) ).and(
- new Field( "marcacoes_trabalhador.tipo" ).isEqual( tipo ) ),
- null,
- null,
- null,
- null );
- Virtual2DArray array = EXECUTER.executeQuery( select );
- Integer ids[] = new Integer[ array.columnLength() ];
- for( int n = 0; n < ids.length; n++ )
+ Select selectExterno =
+ new Select2(
+ new String[]{ "trabalhadores_consultas_datas", "trabalhadores_consultas", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "trabalhadores_consultas_datas.trabalhadores_consultas_id" ).isEqual( new Field( "trabalhadores_consultas.id" ) ),
+ new Field( "trabalhadores_consultas.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "DISTINCT trabalhadores_consultas_datas.prestador_id" },
+ new Field( "trabalhadores_consultas_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+ new Field( "trabalhadores_consultas_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
+ Virtual2DArray arrayExterno = EXECUTER.executeQuery( selectExterno );
+ Integer ids[] = new Integer[ arrayExterno.columnLength() ];
+ for( int n = 0; n < arrayExterno.columnLength(); n++ )
{
- ids[ n ] = ( Integer ) array.get( n, 0 );
+ ids[ n ] = ( Integer ) arrayExterno.get( n, 0 );
}
return ids;
}
+// public void setPrestadorConsultaIdForEstabelecimentoAndDate( Integer estabelecimentoId, Date data, prestadorId )
+// throws Exception
+// {
+// Select selectConsultas =
+// new Select2(
+// new String[]{ "trabalhadores_consultas_datas", "trabalhadores_consultas", "trabalhadores" },
+// new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER },
+// new Expression[]{
+// new Field( "trabalhadores_consultas_datas.trabalhadores_consultas_id" ).isEqual( new Field( "trabalhadores_consultas.id" ) ),
+// new Field( "trabalhadores_consultas.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+// new String[]{ "DISTINCT trabalhadores_consultas_datas.prestador_id" },
+// new Field( "trabalhadores_consultas_datas.data" ).isEqual( data ).and(
+// new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+// new Field( "trabalhadores_consultas_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+// null,
+// null,
+// null,
+// null );
+//
+// Select selectExterno =
+// new Select2(
+// new String[]{ "trabalhadores_consultas_datas", "trabalhadores_consultas", "trabalhadores" },
+// new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER },
+// new Expression[]{
+// new Field( "trabalhadores_consultas_datas.trabalhadores_consultas_id" ).isEqual( new Field( "trabalhadores_consultas.id" ) ),
+// new Field( "trabalhadores_consultas.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+// new String[]{ "DISTINCT trabalhadores_consultas_datas.prestador_id" },
+// new Field( "trabalhadores_consultas_datas.data" ).isEqual( data ).and(
+// new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+// new Field( "trabalhadores_consultas_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+// null,
+// null,
+// null,
+// null );
+// Virtual2DArray arrayExterno = EXECUTER.executeQuery( selectExterno );
+// Integer ids[] = new Integer[ arrayExterno.columnLength() ];
+// for( int n = 0; n < arrayExterno.columnLength(); n++ )
+// {
+// ids[ n ] = ( Integer ) arrayExterno.get( n, 0 );
+// }
+// return ids;
+// }
+
public void setPrestadorIDForEstabelecimentoAndTipo( Integer estabelecimentoID, int tipo, Date data, Integer prestadorID )
throws Exception
{
@@ -194,12 +300,181 @@ public class LocaisRealizacaoDataProvider
}
}
- protected Object[][] getGruposEcdsEPrestadoresPorEstabelecimento( Integer estabelecimentoId )
+ protected IDObject[] getGruposEcdsByEstabelecimentoAndDate( Integer estabelecimentoId, Date data )
+ throws Exception
+ {
+ Select select =
+ new Select2(
+ new String[]{ "prt_grupos_protocolo", "prt_tipos_elementos_protocolo", "trabalhadores_ecd",
+ "trabalhadores_ecds_datas", "trabalhadores_ecds", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "prt_grupos_protocolo.id" ).isEqual( new Field( "prt_tipos_elementos_protocolo.grupo_protocolo_id" ) ),
+ new Field( "prt_tipos_elementos_protocolo.id" ).isEqual( new Field( "trabalhadores_ecd.ecd_id" ) ),
+ new Field( "trabalhadores_ecd.trabalhadores_ecds_datas_id" ).isEqual( new Field( "trabalhadores_ecds_datas.id" ) ),
+ new Field( "trabalhadores_ecds_datas.trabalhadores_ecds_id" ).isEqual( new Field( "trabalhadores_ecds.id" ) ),
+ new Field( "trabalhadores_ecds.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "DISTINCT prt_grupos_protocolo.id", "prt_grupos_protocolo.descricao", "prt_grupos_protocolo.ordem",
+ "prt_grupos_protocolo.descricao_plain" },
+ new Field( "trabalhadores_ecds_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+ new Field( "trabalhadores_ecds_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ new String[]{ "prt_grupos_protocolo.ordem", "prt_grupos_protocolo.descricao_plain" },
+ null,
+ null,
+ null );
+ Virtual2DArray array = EXECUTER.executeQuery( select );
+ IDObject grupos[] = new IDObject[ array.columnLength() ];
+ for( int n = 0; n < grupos.length; n++ )
+ {
+ Integer id = ( Integer ) array.get( n, 0 );
+ String descricao = ( String ) array.get( n, 1 );
+ grupos[ n ] = new MappableObject( id, descricao );
+ }
+ return grupos;
+ }
+
+ public Integer[] getPrestadoresByGrupoEcdEstabelecimentoAndDate( Integer grupoId, Integer estabelecimentoId, Date data )
throws Exception
{
- return new Object[][]{ { new Integer( 1 ), "Sangue", new Integer( 1 ) },
- { new Integer( 2 ), "Sangue", new Integer( 1 ) },
- { new Integer( 3 ), "RX Torax", null },
- { new Integer( 4 ), "ECG", new Integer( 1 ) } };
+ Select select =
+ new Select2(
+ new String[]{ "prt_tipos_elementos_protocolo", "trabalhadores_ecd",
+ "trabalhadores_ecds_datas", "trabalhadores_ecds", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "prt_tipos_elementos_protocolo.id" ).isEqual( new Field( "trabalhadores_ecd.ecd_id" ) ),
+ new Field( "trabalhadores_ecd.trabalhadores_ecds_datas_id" ).isEqual( new Field( "trabalhadores_ecds_datas.id" ) ),
+ new Field( "trabalhadores_ecds_datas.trabalhadores_ecds_id" ).isEqual( new Field( "trabalhadores_ecds.id" ) ),
+ new Field( "trabalhadores_ecds.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "DISTINCT trabalhadores_ecds_datas.prestador_id" },
+ new Field( "trabalhadores_ecds_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+ new Field( "prt_tipos_elementos_protocolo.grupo_protocolo_id" ).isEqual( grupoId ) ).and(
+ new Field( "trabalhadores_ecds_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
+ Virtual2DArray array = EXECUTER.executeQuery( select );
+ Integer prestadores[] = new Integer[ array.columnLength() ];
+ for( int n = 0; n < prestadores.length; n++ )
+ {
+ prestadores[ n ] = ( Integer ) array.get( n, 0 );
+ }
+ return prestadores;
+ }
+
+ public int getNumeroMarcacoesByGrupoEcdEstabelecimentoAndDate( Integer grupoId, Integer estabelecimentoId, Date data )
+ throws Exception
+ {
+ Select select =
+ new Select2(
+ new String[]{ "prt_tipos_elementos_protocolo", "trabalhadores_ecd",
+ "trabalhadores_ecds_datas", "trabalhadores_ecds", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "prt_tipos_elementos_protocolo.id" ).isEqual( new Field( "trabalhadores_ecd.ecd_id" ) ),
+ new Field( "trabalhadores_ecd.trabalhadores_ecds_datas_id" ).isEqual( new Field( "trabalhadores_ecds_datas.id" ) ),
+ new Field( "trabalhadores_ecds_datas.trabalhadores_ecds_id" ).isEqual( new Field( "trabalhadores_ecds.id" ) ),
+ new Field( "trabalhadores_ecds.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "COUNT( DISTINCT trabalhadores.id)" },
+ new Field( "trabalhadores_ecds_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+ new Field( "prt_tipos_elementos_protocolo.grupo_protocolo_id" ).isEqual( grupoId ) ).and(
+ new Field( "trabalhadores_ecds_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
+ Virtual2DArray array = EXECUTER.executeQuery( select );
+ return ( ( Number ) array.get( 0, 0 ) ).intValue();
+ }
+
+
+ protected IDObject[] getExamesOficiaisByEstabelecimentoAndDate( Integer estabelecimentoId, Date data )
+ throws Exception
+ {
+ Select select =
+ new Select2(
+ new String[]{ "ecd_oficial", "trabalhadores_ecd",
+ "trabalhadores_ecds_datas", "trabalhadores_ecds", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "ecd_oficial.id" ).isEqual( new Field( "trabalhadores_ecd.ecd_oficial_id" ) ),
+ new Field( "trabalhadores_ecd.trabalhadores_ecds_datas_id" ).isEqual( new Field( "trabalhadores_ecds_datas.id" ) ),
+ new Field( "trabalhadores_ecds_datas.trabalhadores_ecds_id" ).isEqual( new Field( "trabalhadores_ecds.id" ) ),
+ new Field( "trabalhadores_ecds.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "DISTINCT ecd_oficial.id", "ecd_oficial.descricao", "ecd_oficial.ordem",
+ "ecd_oficial.descricao_plain" },
+ new Field( "trabalhadores_ecds_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+ new Field( "trabalhadores_ecds_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ new String[]{ "ecd_oficial.ordem", "ecd_oficial.descricao_plain" },
+ null,
+ null,
+ null );
+ Virtual2DArray array = EXECUTER.executeQuery( select );
+ IDObject ecds[] = new IDObject[ array.columnLength() ];
+ for( int n = 0; n < ecds.length; n++ )
+ {
+ Integer id = ( Integer ) array.get( n, 0 );
+ String descricao = ( String ) array.get( n, 1 );
+ ecds[ n ] = new MappableObject( id, descricao );
+ }
+ return ecds;
+ }
+
+ public Integer[] getPrestadoresByEcdOficialEstabelecimentoAndDate( Integer ecdOficialId, Integer estabelecimentoId, Date data )
+ throws Exception
+ {
+ Select select =
+ new Select2(
+ new String[]{ "trabalhadores_ecd", "trabalhadores_ecds_datas", "trabalhadores_ecds", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "trabalhadores_ecd.trabalhadores_ecds_datas_id" ).isEqual( new Field( "trabalhadores_ecds_datas.id" ) ),
+ new Field( "trabalhadores_ecds_datas.trabalhadores_ecds_id" ).isEqual( new Field( "trabalhadores_ecds.id" ) ),
+ new Field( "trabalhadores_ecds.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "DISTINCT trabalhadores_ecds_datas.prestador_id" },
+ new Field( "trabalhadores_ecds_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+ new Field( "trabalhadores_ecd.ecd_oficial_id" ).isEqual( ecdOficialId ) ).and(
+ new Field( "trabalhadores_ecds_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
+ Virtual2DArray array = EXECUTER.executeQuery( select );
+ Integer prestadores[] = new Integer[ array.columnLength() ];
+ for( int n = 0; n < prestadores.length; n++ )
+ {
+ prestadores[ n ] = ( Integer ) array.get( n, 0 );
+ }
+ return prestadores;
+ }
+
+ public int getNumeroMarcacaoesByEcdOficialEstabelecimentoAndDate( Integer ecdOficialId, Integer estabelecimentoId, Date data )
+ throws Exception
+ {
+ Select select =
+ new Select2(
+ new String[]{ "trabalhadores_ecd", "trabalhadores_ecds_datas", "trabalhadores_ecds", "trabalhadores" },
+ new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
+ new Expression[]{
+ new Field( "trabalhadores_ecd.trabalhadores_ecds_datas_id" ).isEqual( new Field( "trabalhadores_ecds_datas.id" ) ),
+ new Field( "trabalhadores_ecds_datas.trabalhadores_ecds_id" ).isEqual( new Field( "trabalhadores_ecds.id" ) ),
+ new Field( "trabalhadores_ecds.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) },
+ new String[]{ "COUNT( DISTINCT trabalhadores.id)" },
+ new Field( "trabalhadores_ecds_datas.data" ).isEqual( data ).and(
+ new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoId ) ).and(
+ new Field( "trabalhadores_ecd.ecd_oficial_id" ).isEqual( ecdOficialId ) ).and(
+ new Field( "trabalhadores_ecds_datas.estado" ).isEqual( new Integer( MedicinaConstants.ESTADO_POR_REALIZAR ) ) ),
+ null,
+ null,
+ null,
+ null );
+ Virtual2DArray array = EXECUTER.executeQuery( select );
+ return ( ( Number ) array.get( 0, 0 ) ).intValue();
}
}
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoWindow.java b/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoWindow.java
index a4c7ff8b..3c2a4cf7 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoWindow.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/locais_realizacao/LocaisRealizacaoWindow.java
@@ -60,10 +60,6 @@ public class LocaisRealizacaoWindow extends JFrame
*
*/
private static final long serialVersionUID = 1L;
-
- protected static final Integer PRESTADOR_ID_SIPRP = new Integer( -1 );
-
- protected static final IDObject PRESTADOR_SIPRP = new MappableObject( PRESTADOR_ID_SIPRP, "SIPRP" );
protected JCalendarPanel dataPanel;
protected JButton carregarButton;
@@ -79,6 +75,8 @@ public class LocaisRealizacaoWindow extends JFrame
// protected JLabel numeroECDsLabel;
protected Integer idsGruposEcds[];
protected JComboBox prestadoresECDsCombos[];
+ protected Integer idsEcdsOficiais[];
+ protected JComboBox prestadoresECDsOficiaisCombos[];
protected JButton enviarECDsButton;
protected JScrollPane listaEcdsScroll;
// protected JButton faxECDsButton;
@@ -380,8 +378,7 @@ public class LocaisRealizacaoWindow extends JFrame
try
{
int countConsultas =
- provider.getNumeroMarcacoesByEstabelecimentoAndTipo( estabelecimentoID,
- Marcacao.TIPO_MARCACAO_TRABALHADOR_CONSULTA, data );
+ provider.getNumeroConsultasByEstabelecimentoAndDate( estabelecimentoID, data );
// int countECDs =
// provider.getNumeroMarcacoesByEstabelecimentoAndTipo( estabelecimentoID,
// Marcacao.TIPO_MARCACAO_TRABALHADOR_EXAMES, data );
@@ -390,8 +387,7 @@ public class LocaisRealizacaoWindow extends JFrame
numeroConsultasLabel.setText( "" + countConsultas );
enviarConsultasButton.setEnabled( true );
Integer[] escolhidos =
- provider.getPrestadoresIDByEstabelecimentoAndTipo( estabelecimentoID,
- Marcacao.TIPO_MARCACAO_TRABALHADOR_CONSULTA, data );
+ provider.getPrestadoresConsultaIdByEstabelecimentoAndDate( estabelecimentoID, data );
if( escolhidos.length == 1 )
{
numeroConsultasLabel.setForeground( Color.green.darker() );
@@ -424,9 +420,14 @@ public class LocaisRealizacaoWindow extends JFrame
}
}
}
- Object ecds[][] = provider.getGruposEcdsEPrestadoresPorEstabelecimento( estabelecimentoID );
- JPanel ecdsPanel = new JPanel();
- double rows[] = new double[ ecds.length + 1 ];
+
+ IDObject prestadoresECDs[] = prestadoresProvider.getPrestadoresECDsActivos();
+
+ IDObject gruposEcds[] = provider.getGruposEcdsByEstabelecimentoAndDate( estabelecimentoID, data );
+ idsGruposEcds = new Integer[ gruposEcds.length ];
+ prestadoresECDsCombos = new JComboBox[ gruposEcds.length ];
+ JPanel gruposEcdsPanel = new JPanel();
+ double rows[] = new double[ gruposEcds.length + 1 ];
for( int n = 0; n < rows.length - 1; n++ )
{
rows[ n ] = TableLayoutConstraints.MINIMUM;
@@ -437,17 +438,145 @@ public class LocaisRealizacaoWindow extends JFrame
new double[]{ TableLayoutConstraints.FILL, TableLayoutConstraints.MINIMUM,
TableLayoutConstraints.FILL },
rows );
- ecdsPanel.setLayout( layout );
- for( int n = 0; n < ecds.length; n++ )
+ gruposEcdsPanel.setLayout( layout );
+ gruposEcdsPanel.setBorder(
+ BorderFactory.createTitledBorder(
+ BorderFactory.createEtchedBorder(),
+ "Protocolo" ) );
+ for( int n = 0; n < gruposEcds.length; n++ )
+ {
+ JLabel ecdLabel = new JLabel( "" + gruposEcds[ n ].toString() );
+ int numero =
+ provider.getNumeroMarcacoesByGrupoEcdEstabelecimentoAndDate(
+ gruposEcds[ n ].getID(), estabelecimentoID, data );
+ Integer escolhidos[] =
+ provider.getPrestadoresByGrupoEcdEstabelecimentoAndDate(
+ gruposEcds[ n ].getID(), estabelecimentoID, data );
+ JLabel numeroLabel = new JLabel( "" + numero, JLabel.RIGHT );
+ if( escolhidos.length > 1 )
+ {
+ numeroLabel.setForeground( Color.red.darker() );
+ }
+ else
+ {
+ numeroLabel.setForeground( Color.green.darker() );
+ }
+ prestadoresECDsCombos[ n ] = new JComboBox();
+ prestadoresECDsCombos[ n ].addItem( LocaisRealizacaoConstants.PRESTADOR_SIPRP );
+ for( int p = 0; p < prestadoresECDs.length; p++ )
+ {
+ prestadoresECDsCombos[ n ].addItem( prestadoresECDs[ p ] );
+ }
+ int e;
+ for( e = 0; e < escolhidos.length; e++ )
+ {
+ if( escolhidos[ e ] != null )
+ {
+ break;
+ }
+ }
+ if( e == escolhidos.length || escolhidos[ e ] == null )
+ {
+ prestadoresECDsCombos[ n ].setSelectedIndex( 0 );
+ }
+ else
+ {
+ for( int p = 0; p < prestadoresECDsCombos[ n ].getItemCount(); p++ )
+ {
+ IDObject prestador = ( IDObject ) prestadoresECDsCombos[ n ].getItemAt( p );
+ if( prestador.getID().equals( escolhidos[ e ] ) )
+ {
+ prestadoresECDsCombos[ n ].setSelectedIndex( p );
+ }
+ }
+ }
+
+ gruposEcdsPanel.add( ecdLabel, new TableLayoutConstraints( 0, n ) );
+ gruposEcdsPanel.add( numeroLabel, new TableLayoutConstraints( 1, n ) );
+ gruposEcdsPanel.add( prestadoresECDsCombos[ n ], new TableLayoutConstraints( 2, n ) );
+ }
+
+
+ IDObject ecdsOficiais[] = provider.getExamesOficiaisByEstabelecimentoAndDate( estabelecimentoID, data );
+ idsEcdsOficiais = new Integer[ ecdsOficiais.length ];
+ prestadoresECDsOficiaisCombos = new JComboBox[ ecdsOficiais.length ];
+ JPanel ecdsOficiaisPanel = new JPanel();
+ rows = new double[ ecdsOficiais.length + 1 ];
+ for( int n = 0; n < rows.length - 1; n++ )
+ {
+ rows[ n ] = TableLayoutConstraints.MINIMUM;
+ }
+ rows[ rows.length - 1 ] = TableLayoutConstraints.FILL;
+ layout = new TableLayout(
+ new double[]{ TableLayoutConstraints.FILL, TableLayoutConstraints.MINIMUM,
+ TableLayoutConstraints.FILL },
+ rows );
+ ecdsOficiaisPanel.setLayout( layout );
+ ecdsOficiaisPanel.setBorder(
+ BorderFactory.createTitledBorder(
+ BorderFactory.createEtchedBorder(),
+ "Extra protocolo" ) );
+ for( int n = 0; n < ecdsOficiais.length; n++ )
{
- JLabel ecdLabel = new JLabel( "" + ecds[ n ][ 1 ] );
- JLabel numeroLabel = new JLabel( "" + ( ( n * 23 ) % 7 ), JLabel.RIGHT );
- JComboBox prestadorCombo = new JComboBox();
- prestadorCombo.addItem( "SIPRP" );
- ecdsPanel.add( ecdLabel, new TableLayoutConstraints( 0, n ) );
- ecdsPanel.add( numeroLabel, new TableLayoutConstraints( 1, n ) );
- ecdsPanel.add( prestadorCombo, new TableLayoutConstraints( 2, n ) );
+ JLabel ecdLabel = new JLabel( "" + ecdsOficiais[ n ].toString() );
+ int numero =
+ provider.getNumeroMarcacaoesByEcdOficialEstabelecimentoAndDate(
+ ecdsOficiais[ n ].getID(), estabelecimentoID, data );
+ Integer escolhidos[] =
+ provider.getPrestadoresByEcdOficialEstabelecimentoAndDate(
+ ecdsOficiais[ n ].getID(), estabelecimentoID, data );
+ JLabel numeroLabel = new JLabel( "" + numero, JLabel.RIGHT );
+ if( escolhidos.length > 1 )
+ {
+ numeroLabel.setForeground( Color.red.darker() );
+ }
+ else
+ {
+ numeroLabel.setForeground( Color.green.darker() );
+ }
+ prestadoresECDsOficiaisCombos[ n ] = new JComboBox();
+ prestadoresECDsOficiaisCombos[ n ].addItem( LocaisRealizacaoConstants.PRESTADOR_SIPRP );
+ for( int p = 0; p < prestadoresECDs.length; p++ )
+ {
+ prestadoresECDsOficiaisCombos[ n ].addItem( prestadoresECDs[ p ] );
+ }
+ int e;
+ for( e = 0; e < escolhidos.length; e++ )
+ {
+ if( escolhidos[ e ] != null )
+ {
+ break;
+ }
+ }
+ if( e == escolhidos.length || escolhidos[ e ] == null )
+ {
+ prestadoresECDsOficiaisCombos[ n ].setSelectedIndex( 0 );
+ }
+ else
+ {
+ for( int p = 0; p < prestadoresECDsOficiaisCombos[ n ].getItemCount(); p++ )
+ {
+ IDObject prestador = ( IDObject ) prestadoresECDsOficiaisCombos[ n ].getItemAt( p );
+ if( prestador.getID().equals( escolhidos[ e ] ) )
+ {
+ prestadoresECDsOficiaisCombos[ n ].setSelectedIndex( p );
+ }
+ }
+ }
+
+ ecdsOficiaisPanel.add( ecdLabel, new TableLayoutConstraints( 0, n ) );
+ ecdsOficiaisPanel.add( numeroLabel, new TableLayoutConstraints( 1, n ) );
+ ecdsOficiaisPanel.add( prestadoresECDsOficiaisCombos[ n ], new TableLayoutConstraints( 2, n ) );
}
+
+ JPanel ecdsPanel = new JPanel();
+ TableLayout ecdsLayout =
+ new TableLayout( new double[]{ TableLayoutConstraints.FILL },
+ new double[]{ TableLayoutConstraints.MINIMUM, TableLayoutConstraints.MINIMUM,
+ TableLayoutConstraints.FILL } );
+ ecdsPanel.setLayout( ecdsLayout );
+ ecdsPanel.add( gruposEcdsPanel, new TableLayoutConstraints( 0, 0 ) );
+ ecdsPanel.add( ecdsOficiaisPanel, new TableLayoutConstraints( 0, 1 ) );
listaEcdsScroll.setViewportView( ecdsPanel );
// if( countECDs > 0 )
// {
@@ -502,7 +631,7 @@ public class LocaisRealizacaoWindow extends JFrame
IDObject prestadoresConsultas[] = prestadoresProvider.getPrestadoresConsultasActivos();
IDObject prestadoresECDs[] = prestadoresProvider.getPrestadoresECDsActivos();
prestadoresConsultasCombo.removeAllItems();
- prestadoresConsultasCombo.addItem( PRESTADOR_SIPRP );
+ prestadoresConsultasCombo.addItem( LocaisRealizacaoConstants.PRESTADOR_SIPRP );
for( int n = 0; n < prestadoresConsultas.length; n++ )
{
prestadoresConsultasCombo.addItem( prestadoresConsultas[ n ] );
@@ -582,7 +711,7 @@ public class LocaisRealizacaoWindow extends JFrame
try
{
Integer prestadorID = ( ( IDObject ) prestadoresConsultasCombo.getSelectedItem() ).getID();
- if( PRESTADOR_ID_SIPRP.equals( prestadorID ) )
+ if( LocaisRealizacaoConstants.PRESTADOR_ID_SIPRP.equals( prestadorID ) )
{
prestadorID = null;
}
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultas.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultas.java
index ac08da85..ddd58849 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultas.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultas.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultas.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasData.java
index 5b695370..868c2b67 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatas.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatas.java
index 7bdd5e3e..d79d7363 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatas.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatas.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasDatas.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
@@ -16,6 +16,7 @@ public final class TrabalhadoresConsultasDatas implements JDOInnerObject
private Date data;
private Integer trabalhadores_consultas_id;
private Integer estado;
+ private Integer prestador_id;
public TrabalhadoresConsultasDatas()
{
@@ -39,6 +40,10 @@ public final class TrabalhadoresConsultasDatas implements JDOInnerObject
{
return estado;
}
+ else if( fieldName == TrabalhadoresConsultasDatasData.PRESTADOR_ID )
+ {
+ return prestador_id;
+ }
else if( fieldName.equals( TrabalhadoresConsultasDatasData.ID ) )
{
return id;
@@ -55,6 +60,10 @@ public final class TrabalhadoresConsultasDatas implements JDOInnerObject
{
return estado;
}
+ else if( fieldName.equals( TrabalhadoresConsultasDatasData.PRESTADOR_ID ) )
+ {
+ return prestador_id;
+ }
return null;
}
@@ -76,6 +85,10 @@ public final class TrabalhadoresConsultasDatas implements JDOInnerObject
{
estado = ( Integer ) value;
}
+ else if( fieldName == TrabalhadoresConsultasDatasData.PRESTADOR_ID )
+ {
+ prestador_id = ( Integer ) value;
+ }
else if( fieldName.equals( TrabalhadoresConsultasDatasData.ID ) )
{
id = ( Integer ) value;
@@ -92,6 +105,10 @@ public final class TrabalhadoresConsultasDatas implements JDOInnerObject
{
estado = ( Integer ) value;
}
+ else if( fieldName.equals( TrabalhadoresConsultasDatasData.PRESTADOR_ID ) )
+ {
+ prestador_id = ( Integer ) value;
+ }
}
public Class getOuterClass()
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasData.java
index c70731d7..1dedccdd 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasDatasData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
@@ -16,13 +16,14 @@ public final class TrabalhadoresConsultasDatasData extends JDOObject
public static final String DATA = "data";
public static final String TRABALHADORES_CONSULTAS_ID = "trabalhadores_consultas_id";
public static final String ESTADO = "estado";
+ public static final String PRESTADOR_ID = "prestador_id";
public static final String FIELD_NAMES[] = new String[]{
- DATA, TRABALHADORES_CONSULTAS_ID, ESTADO, };
+ DATA, TRABALHADORES_CONSULTAS_ID, ESTADO, PRESTADOR_ID, };
protected static final String ALL_FIELD_NAMES[] = new String[]{
- ID, DATA, TRABALHADORES_CONSULTAS_ID, ESTADO, };
+ ID, DATA, TRABALHADORES_CONSULTAS_ID, ESTADO, PRESTADOR_ID, };
private HashMap dataHash;
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmails.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmails.java
index d510eb27..63eed42f 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmails.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmails.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasDatasEmails.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsData.java
index 5bd509c2..b7bd1fd8 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasDatasEmailsData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsID.java
index 97f99787..8a71703a 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasDatasEmailsID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasID.java
index 19881a66..55ec5950 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasDatasID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoes.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoes.java
index 25cc7125..b9554f35 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoes.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoes.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasDatasObservacoes.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesData.java
index 5326c26a..2a4e4a1d 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasDatasObservacoesData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesID.java
index 038405bd..cce105bf 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasDatasObservacoesID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasID.java
index 9aa31d50..58d7bfab 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresConsultasID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcd.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcd.java
index d20de925..bc7ed27f 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcd.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcd.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcd.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
@@ -14,9 +14,7 @@ public final class TrabalhadoresEcd implements JDOInnerObject
private Integer id;
private Integer ecd_id;
private Integer ecd_oficial_id;
- private Integer prestador_id;
private Integer estado;
- private Integer trabalhadores_ecds_id;
private Integer trabalhadores_ecds_datas_id;
public TrabalhadoresEcd()
@@ -37,18 +35,10 @@ public final class TrabalhadoresEcd implements JDOInnerObject
{
return ecd_oficial_id;
}
- else if( fieldName == TrabalhadoresEcdData.PRESTADOR_ID )
- {
- return prestador_id;
- }
else if( fieldName == TrabalhadoresEcdData.ESTADO )
{
return estado;
}
- else if( fieldName == TrabalhadoresEcdData.TRABALHADORES_ECDS_ID )
- {
- return trabalhadores_ecds_id;
- }
else if( fieldName == TrabalhadoresEcdData.TRABALHADORES_ECDS_DATAS_ID )
{
return trabalhadores_ecds_datas_id;
@@ -65,18 +55,10 @@ public final class TrabalhadoresEcd implements JDOInnerObject
{
return ecd_oficial_id;
}
- else if( fieldName.equals( TrabalhadoresEcdData.PRESTADOR_ID ) )
- {
- return prestador_id;
- }
else if( fieldName.equals( TrabalhadoresEcdData.ESTADO ) )
{
return estado;
}
- else if( fieldName.equals( TrabalhadoresEcdData.TRABALHADORES_ECDS_ID ) )
- {
- return trabalhadores_ecds_id;
- }
else if( fieldName.equals( TrabalhadoresEcdData.TRABALHADORES_ECDS_DATAS_ID ) )
{
return trabalhadores_ecds_datas_id;
@@ -98,18 +80,10 @@ public final class TrabalhadoresEcd implements JDOInnerObject
{
ecd_oficial_id = ( Integer ) value;
}
- else if( fieldName == TrabalhadoresEcdData.PRESTADOR_ID )
- {
- prestador_id = ( Integer ) value;
- }
else if( fieldName == TrabalhadoresEcdData.ESTADO )
{
estado = ( Integer ) value;
}
- else if( fieldName == TrabalhadoresEcdData.TRABALHADORES_ECDS_ID )
- {
- trabalhadores_ecds_id = ( Integer ) value;
- }
else if( fieldName == TrabalhadoresEcdData.TRABALHADORES_ECDS_DATAS_ID )
{
trabalhadores_ecds_datas_id = ( Integer ) value;
@@ -126,18 +100,10 @@ public final class TrabalhadoresEcd implements JDOInnerObject
{
ecd_oficial_id = ( Integer ) value;
}
- else if( fieldName.equals( TrabalhadoresEcdData.PRESTADOR_ID ) )
- {
- prestador_id = ( Integer ) value;
- }
else if( fieldName.equals( TrabalhadoresEcdData.ESTADO ) )
{
estado = ( Integer ) value;
}
- else if( fieldName.equals( TrabalhadoresEcdData.TRABALHADORES_ECDS_ID ) )
- {
- trabalhadores_ecds_id = ( Integer ) value;
- }
else if( fieldName.equals( TrabalhadoresEcdData.TRABALHADORES_ECDS_DATAS_ID ) )
{
trabalhadores_ecds_datas_id = ( Integer ) value;
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdData.java
index 5ad8c4e7..9f3c2a63 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
@@ -15,19 +15,15 @@ public final class TrabalhadoresEcdData extends JDOObject
public static final String ID = "id";
public static final String ECD_ID = "ecd_id";
public static final String ECD_OFICIAL_ID = "ecd_oficial_id";
- public static final String PRESTADOR_ID = "prestador_id";
public static final String ESTADO = "estado";
- public static final String TRABALHADORES_ECDS_ID = "trabalhadores_ecds_id";
public static final String TRABALHADORES_ECDS_DATAS_ID = "trabalhadores_ecds_datas_id";
public static final String FIELD_NAMES[] = new String[]{
- ECD_ID, ECD_OFICIAL_ID, PRESTADOR_ID, ESTADO, TRABALHADORES_ECDS_ID,
- TRABALHADORES_ECDS_DATAS_ID, };
+ ECD_ID, ECD_OFICIAL_ID, ESTADO, TRABALHADORES_ECDS_DATAS_ID, };
protected static final String ALL_FIELD_NAMES[] = new String[]{
- ID, ECD_ID, ECD_OFICIAL_ID, PRESTADOR_ID, ESTADO, TRABALHADORES_ECDS_ID,
- TRABALHADORES_ECDS_DATAS_ID, };
+ ID, ECD_ID, ECD_OFICIAL_ID, ESTADO, TRABALHADORES_ECDS_DATAS_ID, };
private HashMap dataHash;
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdID.java
index 8d47d9d1..0a830369 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcds.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcds.java
index f741cb74..f41800af 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcds.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcds.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcds.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsData.java
index 7460f772..b3ade615 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatas.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatas.java
index 6112c215..7b9997ec 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatas.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatas.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsDatas.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
@@ -16,6 +16,7 @@ public final class TrabalhadoresEcdsDatas implements JDOInnerObject
private Integer trabalhadores_ecds_id;
private Date data;
private Integer estado;
+ private Integer prestador_id;
public TrabalhadoresEcdsDatas()
{
@@ -39,6 +40,10 @@ public final class TrabalhadoresEcdsDatas implements JDOInnerObject
{
return estado;
}
+ else if( fieldName == TrabalhadoresEcdsDatasData.PRESTADOR_ID )
+ {
+ return prestador_id;
+ }
else if( fieldName.equals( TrabalhadoresEcdsDatasData.ID ) )
{
return id;
@@ -55,6 +60,10 @@ public final class TrabalhadoresEcdsDatas implements JDOInnerObject
{
return estado;
}
+ else if( fieldName.equals( TrabalhadoresEcdsDatasData.PRESTADOR_ID ) )
+ {
+ return prestador_id;
+ }
return null;
}
@@ -76,6 +85,10 @@ public final class TrabalhadoresEcdsDatas implements JDOInnerObject
{
estado = ( Integer ) value;
}
+ else if( fieldName == TrabalhadoresEcdsDatasData.PRESTADOR_ID )
+ {
+ prestador_id = ( Integer ) value;
+ }
else if( fieldName.equals( TrabalhadoresEcdsDatasData.ID ) )
{
id = ( Integer ) value;
@@ -92,6 +105,10 @@ public final class TrabalhadoresEcdsDatas implements JDOInnerObject
{
estado = ( Integer ) value;
}
+ else if( fieldName.equals( TrabalhadoresEcdsDatasData.PRESTADOR_ID ) )
+ {
+ prestador_id = ( Integer ) value;
+ }
}
public Class getOuterClass()
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasData.java
index 0b0ff21c..0c0a58f5 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsDatasData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
@@ -16,13 +16,14 @@ public final class TrabalhadoresEcdsDatasData extends JDOObject
public static final String TRABALHADORES_ECDS_ID = "trabalhadores_ecds_id";
public static final String DATA = "data";
public static final String ESTADO = "estado";
+ public static final String PRESTADOR_ID = "prestador_id";
public static final String FIELD_NAMES[] = new String[]{
- TRABALHADORES_ECDS_ID, DATA, ESTADO, };
+ TRABALHADORES_ECDS_ID, DATA, ESTADO, PRESTADOR_ID, };
protected static final String ALL_FIELD_NAMES[] = new String[]{
- ID, TRABALHADORES_ECDS_ID, DATA, ESTADO, };
+ ID, TRABALHADORES_ECDS_ID, DATA, ESTADO, PRESTADOR_ID, };
private HashMap dataHash;
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmails.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmails.java
index 2dae2f2a..ff17846d 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmails.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmails.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsDatasEmails.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsData.java
index 7a40d563..a595192c 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsDatasEmailsData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsID.java
index 65da8c7c..859790f8 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsDatasEmailsID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasID.java
index cee0df85..0ac8b28a 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsDatasID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoes.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoes.java
index 4c18ca74..0c261c48 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoes.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoes.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsDatasObservacoes.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesData.java
index ff22c3f3..0b33e9ff 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsDatasObservacoesData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesID.java
index 6c6e46c3..89806ea4 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsDatasObservacoesID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsID.java
index 6f885514..d7b0a9f4 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresEcdsID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidao.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidao.java
index c1cab253..312d5858 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidao.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidao.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresFichasAptidao.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoData.java
index 335c430d..552f5a7c 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresFichasAptidaoData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoID.java
index 0ae452ad..c45162c6 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresFichasAptidaoID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcesso.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcesso.java
index 2a598679..0584303d 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcesso.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcesso.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresProcesso.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoData.java
index 91b89335..8937bccc 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoData.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoData.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresProcessoData.java
*
-* Generated by com.evutils.codegen.JDOObjectGenerator on May 14, 2007
+* Generated by com.evutils.codegen.JDOObjectGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoID.java
index 7690a0d9..ea8106a9 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoID.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoID.java
@@ -1,7 +1,7 @@
/*
* TrabalhadoresProcessoID.java
*
-* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on May 14, 2007
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Dec 20, 2007
*
* Use but DON'T TOUCH
*/
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/package.jdo b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/package.jdo
index 25ee315f..f9591a95 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/package.jdo
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/package.jdo
@@ -131,6 +131,10 @@
+
+
+
+
@@ -176,18 +180,10 @@
-
-
-
-
-
-
-
-
@@ -268,6 +264,10 @@
+
+
+
+
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/detalhes/DataConsultaPanel.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/detalhes/DataConsultaPanel.java
index 9fc6e4c4..cfc6ce22 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/processo/detalhes/DataConsultaPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/detalhes/DataConsultaPanel.java
@@ -9,21 +9,22 @@
package siprp.medicina.processo.detalhes;
-import com.evolute.utils.Singleton;
-import com.evolute.utils.data.IDObject;
-import com.evolute.utils.jdo.JDOProvider;
-import com.evolute.utils.ui.DialogException;
-import com.evolute.utils.ui.calendar.JCalendarPanel;
import info.clearthought.layout.TableLayout;
import info.clearthought.layout.TableLayoutConstraints;
+
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Date;
import java.util.HashMap;
import java.util.Vector;
-import javax.swing.*;
+
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
+
import siprp.medicina.MedicinaConstants;
import siprp.medicina.processo.ProcessoConstants;
import siprp.medicina.processo.ProcessoDataProvider;
@@ -32,6 +33,12 @@ import siprp.medicina.processo.ProcessoListener;
import siprp.medicina.processo.data.TrabalhadoresConsultasData;
import siprp.medicina.processo.data.TrabalhadoresConsultasDatasData;
+import com.evolute.utils.Singleton;
+import com.evolute.utils.data.IDObject;
+import com.evolute.utils.jdo.JDOProvider;
+import com.evolute.utils.ui.DialogException;
+import com.evolute.utils.ui.calendar.JCalendarPanel;
+
/**
*
* @author fpalma
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase.png b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase.png
new file mode 100644
index 00000000..7fb1649e
Binary files /dev/null and b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase.png differ
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase_add.png b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase_add.png
new file mode 100644
index 00000000..d303b4eb
Binary files /dev/null and b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase_add.png differ
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase_edit.png b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase_edit.png
new file mode 100644
index 00000000..74b92eee
Binary files /dev/null and b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase_edit.png differ
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase_view.png b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase_view.png
new file mode 100644
index 00000000..d9d2a8ce
Binary files /dev/null and b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/briefcase_view.png differ
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/document_certificate.png b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/document_certificate.png
new file mode 100644
index 00000000..6155bc34
Binary files /dev/null and b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/document_certificate.png differ
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/injection.png b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/injection.png
new file mode 100644
index 00000000..089c9ea3
Binary files /dev/null and b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/injection.png differ
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/lock_new.png b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/lock_new.png
new file mode 100644
index 00000000..89fd5bda
Binary files /dev/null and b/trunk/SIPRPSoft/src/siprp/medicina/processo/estrutura/icons/lock_new.png differ
diff --git a/trunk/SIPRPSoft/src/siprp/update/UpdateList.java b/trunk/SIPRPSoft/src/siprp/update/UpdateList.java
index f388a07d..a43c1573 100644
--- a/trunk/SIPRPSoft/src/siprp/update/UpdateList.java
+++ b/trunk/SIPRPSoft/src/siprp/update/UpdateList.java
@@ -27,7 +27,8 @@ public class UpdateList
new Update[]{ new siprp.update.updates.V6_1_To_V7_0(), new siprp.update.updates.V7_0_To_V7_2(),
new siprp.update.updates.V7_2_To_V7_4(), new siprp.update.updates.V7_4_To_V7_5(),
new siprp.update.updates.V7_5_To_V7_6(), new siprp.update.updates.V7_6_To_V7_7(),
- new siprp.update.updates.V7_7_To_V7_8(), new siprp.update.updates.V7_8_To_V7_9() };
+ new siprp.update.updates.V7_7_To_V7_8(), new siprp.update.updates.V7_8_To_V7_9(),
+ new siprp.update.updates.V7_9_To_V8_0(), new siprp.update.updates.V8_0_To_V8_1() };
protected static Executer EXECUTER;
protected static double version = -1;
diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V7_9_To_V8_0.java b/trunk/SIPRPSoft/src/siprp/update/updates/V7_9_To_V8_0.java
new file mode 100644
index 00000000..45c4d103
--- /dev/null
+++ b/trunk/SIPRPSoft/src/siprp/update/updates/V7_9_To_V8_0.java
@@ -0,0 +1,75 @@
+/*
+ * V7_9_To_V8_0.java
+ *
+ * Created on December 19, 2007, 3:12 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package siprp.update.updates;
+
+import com.evolute.utils.Singleton;
+import com.evolute.utils.db.DBManager;
+import com.evolute.utils.db.Executer;
+import com.evolute.utils.sql.Assignment;
+import com.evolute.utils.sql.Field;
+
+/**
+ *
+ * @author fpalma
+ */
+public class V7_9_To_V8_0
+ implements siprp.update.Update
+{
+
+ /**
+ * Creates a new instance of V7_9_To_V8_0
+ */
+ public V7_9_To_V8_0()
+ {
+ }
+
+ public String []listChanges()
+ {
+ return new String[]{ "Alterar tabela dos ecds"};
+ }
+
+ public double getStartVersion()
+ {
+ return 7.9;
+ }
+
+ public double getEndVersion()
+ {
+ return 8.0;
+ }
+
+ public void doUpdate()
+ throws Exception
+ {
+ DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER );
+ Executer executer = dbm.getSharedExecuter();
+ com.evolute.utils.sql.Update update =
+ new com.evolute.utils.sql.Update(
+ "ALTER TABLE trabalhadores_ecd DROP CONSTRAINT trabalhadores_ecd_trabalhadores_ecds_id_fkey;" );
+ executer.executeQuery( update );
+ update =
+ new com.evolute.utils.sql.Update(
+ "ALTER TABLE trabalhadores_ecd DROP trabalhadores_ecds_id;" );
+ executer.executeQuery( update );
+ update =
+ new com.evolute.utils.sql.Update(
+ "ALTER TABLE trabalhadores_ecd DROP CONSTRAINT trabalhadores_ecg_prestador_id_fkey;" );
+ executer.executeQuery( update );
+ update =
+ new com.evolute.utils.sql.Update(
+ "ALTER TABLE trabalhadores_ecd DROP prestador_id;" );
+ executer.executeQuery( update );
+ }
+
+ public String toString()
+ {
+ return "v" + getStartVersion() + " para v" + getEndVersion();
+ }
+}
diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_0_To_V8_1.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_0_To_V8_1.java
new file mode 100644
index 00000000..99b2d931
--- /dev/null
+++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_0_To_V8_1.java
@@ -0,0 +1,67 @@
+/*
+ * V8_0_To_V8_1.java
+ *
+ * Created on December 19, 2007, 3:12 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package siprp.update.updates;
+
+import com.evolute.utils.Singleton;
+import com.evolute.utils.db.DBManager;
+import com.evolute.utils.db.Executer;
+import com.evolute.utils.sql.Assignment;
+import com.evolute.utils.sql.Field;
+
+/**
+ *
+ * @author fpalma
+ */
+public class V8_0_To_V8_1
+ implements siprp.update.Update
+{
+
+ /**
+ * Creates a new instance of V8_0_To_V8_1
+ */
+ public V8_0_To_V8_1()
+ {
+ }
+
+ public String []listChanges()
+ {
+ return new String[]{ "Alterar tabela dos ecds"};
+ }
+
+ public double getStartVersion()
+ {
+ return 8.0;
+ }
+
+ public double getEndVersion()
+ {
+ return 8.1;
+ }
+
+ public void doUpdate()
+ throws Exception
+ {
+ DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER );
+ Executer executer = dbm.getSharedExecuter();
+ com.evolute.utils.sql.Update update =
+ new com.evolute.utils.sql.Update(
+ "CREATE SEQUENCE trabalhadores_ecd_id_seq;" );
+ executer.executeQuery( update );
+ update =
+ new com.evolute.utils.sql.Update(
+ "ALTER TABLE trabalhadores_ecd ALTER COLUMN id SET DEFAULT NEXTVAL('trabalhadores_ecd_id_seq');" );
+ executer.executeQuery( update );
+ }
+
+ public String toString()
+ {
+ return "v" + getStartVersion() + " para v" + getEndVersion();
+ }
+}