|  |  |  | @ -33,7 +33,7 @@ import com.evolute.utils.ui.window.*; | 
			
		
	
		
			
				
					|  |  |  |  |  * @author  fpalma | 
			
		
	
		
			
				
					|  |  |  |  |  */ | 
			
		
	
		
			
				
					|  |  |  |  | public class FichaWindow extends TabbedWindow | 
			
		
	
		
			
				
					|  |  |  |  | 	implements ListAction | 
			
		
	
		
			
				
					|  |  |  |  | 	implements ListAction, FichaAptidaoConstants | 
			
		
	
		
			
				
					|  |  |  |  | { | 
			
		
	
		
			
				
					|  |  |  |  | 	private JDOProvider JDO; | 
			
		
	
		
			
				
					|  |  |  |  | 	 | 
			
		
	
	
		
			
				
					|  |  |  | @ -49,6 +49,8 @@ public class FichaWindow extends TabbedWindow | 
			
		
	
		
			
				
					|  |  |  |  | 	private Integer estabelecimentoID; | 
			
		
	
		
			
				
					|  |  |  |  | 	private Integer trabalhadorID; | 
			
		
	
		
			
				
					|  |  |  |  | 	 | 
			
		
	
		
			
				
					|  |  |  |  | 	private final ExamePDF ePDF = new ExamePDF(); | 
			
		
	
		
			
				
					|  |  |  |  | 	 | 
			
		
	
		
			
				
					|  |  |  |  | 	private static int permissions[][] =  | 
			
		
	
		
			
				
					|  |  |  |  | 		new int[][]{ { NEW_INDEX, CANCEL_INDEX, SAVE_INDEX } }; | 
			
		
	
		
			
				
					|  |  |  |  | 	 | 
			
		
	
	
		
			
				
					|  |  |  | @ -481,16 +483,23 @@ public class FichaWindow extends TabbedWindow | 
			
		
	
		
			
				
					|  |  |  |  | 	{ | 
			
		
	
		
			
				
					|  |  |  |  | //		MetaObject exame = fdpProvider.load( fdpProvider.EXAMES, new DBKey( exameID ) );		
 | 
			
		
	
		
			
				
					|  |  |  |  | 		ExameData exame = (ExameData) JDO.load( ExameData.class, exameID ); | 
			
		
	
		
			
				
					|  |  |  |  | 		byte pdf[] = (byte []) exame.get( ExameData.PDF ); | 
			
		
	
		
			
				
					|  |  |  |  | 		if( exame == null ) | 
			
		
	
		
			
				
					|  |  |  |  | 		{ | 
			
		
	
		
			
				
					|  |  |  |  | 			throw new Exception( "N\u00e3o existe exame" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		byte fo[] = (byte []) exame.get( ExameData.FO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		byte pdf[] = (byte []) exame.get( ExameData.PDF ); | 
			
		
	
		
			
				
					|  |  |  |  | 		TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR ); | 
			
		
	
		
			
				
					|  |  |  |  | 		String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		nomeFicheiro.replaceAll( " ", "_" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ExamePDF ePDF = new ExamePDF(); | 
			
		
	
		
			
				
					|  |  |  |  | 		ePDF.print( pdf, nomeFicheiro ); | 
			
		
	
		
			
				
					|  |  |  |  | 		if( fo != null ) | 
			
		
	
		
			
				
					|  |  |  |  | 		{ | 
			
		
	
		
			
				
					|  |  |  |  | 			FichaAptidaoCreator.getCreator().print( pdf ); | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		else | 
			
		
	
		
			
				
					|  |  |  |  | 		{ | 
			
		
	
		
			
				
					|  |  |  |  | 			ePDF.print( pdf, nomeFicheiro );	 | 
			
		
	
		
			
				
					|  |  |  |  | 		}		 | 
			
		
	
		
			
				
					|  |  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  |  | 		 | 
			
		
	
		
			
				
					|  |  |  |  | 	public byte[] createPDF( ExameData exame ) | 
			
		
	
	
		
			
				
					|  |  |  | @ -501,112 +510,131 @@ public class FichaWindow extends TabbedWindow | 
			
		
	
		
			
				
					|  |  |  |  | 		EstabelecimentoData estabelecimento = (EstabelecimentoData) trabalhador.get( TrabalhadorData.ESTABELECIMENTO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		EmpresaData empresa = (EmpresaData) estabelecimento.get( EstabelecimentoData.EMPRESA ); | 
			
		
	
		
			
				
					|  |  |  |  | //		empresa.load( empresa.getPrimaryKeyValue() );
 | 
			
		
	
		
			
				
					|  |  |  |  | 		Hashtable ht = new Hashtable(); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "designacao_social", empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "estabelecimentos.nome", estabelecimento.get( EstabelecimentoData.NOME ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		HashMap<String,String> ht = new HashMap<String,String>(); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( DESIGNACAO_SOCIAL, ( String )empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( ESTABELECIMENTOS_NOME, ( String )estabelecimento.get( EstabelecimentoData.NOME ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		String aux = (String)estabelecimento.get( EstabelecimentoData.LOCALIDADE ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "estabelecimentos.localidade", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( ESTABELECIMENTOS_LOCALIDADE, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		Integer tipo = (Integer)empresa.get( EmpresaData.SERVICO_SAUDE_TIPO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_SAUDE_TIPO_INTERNO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_SAUDE_TIPO_INTEREMPRESAS, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_SAUDE_TIPO_EXTERNO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_SAUDE_TIPO_SNS, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		switch( tipo.intValue() ) | 
			
		
	
		
			
				
					|  |  |  |  | 		{ | 
			
		
	
		
			
				
					|  |  |  |  | 			case 1: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "servico_saude_tipo_interno", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SERVICO_SAUDE_TIPO_INTERNO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 2: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "servico_saude_tipo_interempresas", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SERVICO_SAUDE_TIPO_INTEREMPRESAS, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 3: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "servico_saude_tipo_externo", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SERVICO_SAUDE_TIPO_EXTERNO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 4: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "servico_saude_tipo_sns", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SERVICO_SAUDE_TIPO_SNS, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "servico_saude_designacao", empresa.get( EmpresaData.SERVICO_SAUDE_DESIGNACAO ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_SAUDE_DESIGNACAO, ( String )empresa.get( EmpresaData.SERVICO_SAUDE_DESIGNACAO ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		tipo = (Integer)empresa.get( EmpresaData.SERVICO_HIGIENE_TIPO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_HIGIENE_TIPO_INTERNO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_HIGIENE_TIPO_INTEREMPRESAS, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_HIGIENE_TIPO_EXTERNO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_HIGIENE_TIPO_OUTRO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		switch( tipo.intValue() ) | 
			
		
	
		
			
				
					|  |  |  |  | 		{ | 
			
		
	
		
			
				
					|  |  |  |  | 			case 1: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "servico_higiene_tipo_interno", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SERVICO_HIGIENE_TIPO_INTERNO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 2: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "servico_higiene_tipo_interempresas", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SERVICO_HIGIENE_TIPO_INTEREMPRESAS, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 3: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "servico_higiene_tipo_externo", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SERVICO_HIGIENE_TIPO_EXTERNO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 4: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "servico_higiene_outro", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SERVICO_HIGIENE_TIPO_OUTRO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "servico_higiene_designacao", empresa.get( EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "trabalhadores.nome", trabalhador.get( TrabalhadorData.NOME ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( SERVICO_HIGIENE_DESIGNACAO, ( String )empresa.get( EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( TRABALHADORES_NOME, ( String )trabalhador.get( TrabalhadorData.NOME ) ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)trabalhador.get( TrabalhadorData.SEXO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		switch( aux.charAt( 0 ) ) | 
			
		
	
		
			
				
					|  |  |  |  | 		{ | 
			
		
	
		
			
				
					|  |  |  |  | 			case 'm': | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "sexo", "Masculino" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SEXO, "Masculino" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 'f': | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "sexo", "Feminino" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( SEXO, "Feminino" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		DateFormat df = DateFormat.getDateInstance( DateFormat.SHORT ); | 
			
		
	
		
			
				
					|  |  |  |  | 		Date data = ( Date )trabalhador.get( TrabalhadorData.DATA_NASCIMENTO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "data_nascimento", data != null ? df.format( data ) : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( DATA_NASCIMENTO, data != null ? df.format( data ) : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)trabalhador.get( TrabalhadorData.NACIONALIDADE ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "nacionalidade", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( NACIONALIDADE, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)trabalhador.get( TrabalhadorData.NUMERO_MECANOGRAFICO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "numero_mecanografico", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( NUMERO_MECANOGRAFICO, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		data = ( Date )trabalhador.get( TrabalhadorData.DATA_ADMISSAO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "data_admissao", data != null ? df.format( data ) : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( DATA_ADMISSAO, data != null ? df.format( data ) : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)trabalhador.get( TrabalhadorData.CATEGORIA ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "categoria", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( CATEGORIA, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)trabalhador.get( TrabalhadorData.LOCAL_TRABALHO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "local_trabalho", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( LOCAL_TRABALHO, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)trabalhador.get( TrabalhadorData.FUNCAO_PROPOSTA ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "funcao_proposta", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( FUNCAO_PROPOSTA, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		data = ( Date )trabalhador.get( TrabalhadorData.DATA_ADMISSAO_FUNCAO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "data_admissao_funcao", data != null ? df.format( data ) : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( DATA_ADMISSAO_FUNCAO, data != null ? df.format( data ) : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)trabalhador.get( TrabalhadorData.OBSERVACOES ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "observacoes", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( OBSERVACOES, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		data = ( Date )exame.get( ExameData.DATA ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "exames.data", data != null ? df.format( data ) : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( EXAMES_DATA, data != null ? df.format( data ) : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		tipo = (Integer)exame.get( ExameData.TIPO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( TIPO_ADMISSAO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( TIPO_PERIODICO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( TIPO_OCASIONAL, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		switch( tipo.intValue() ) | 
			
		
	
		
			
				
					|  |  |  |  | 		{ | 
			
		
	
		
			
				
					|  |  |  |  | 			case 1: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "tipo_admissao", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_ADMISSAO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 2: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "tipo_periodico", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_PERIODICO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 3: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "tipo_ocasional", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_OCASIONAL, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				tipo = (Integer)exame.get( ExameData.OCASIONAL ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_APOS_DOENCA, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_APOS_ACIDENTE, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_PEDIDO_TRABALHADOR, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_PEDIDO_EMPRESA, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_MUDANCA_FUNCAO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_TRABALHO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( TIPO_OUTRO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				switch( tipo.intValue() ) | 
			
		
	
		
			
				
					|  |  |  |  | 				{ | 
			
		
	
		
			
				
					|  |  |  |  | 					case 1: | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( "tipo_apos_doenca", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( TIPO_APOS_DOENCA, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						break; | 
			
		
	
		
			
				
					|  |  |  |  | 					case 2: | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( "tipo_apos_acidente", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( TIPO_APOS_ACIDENTE, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						break; | 
			
		
	
		
			
				
					|  |  |  |  | 					case 3: | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( "tipo_pedido_trabalhador", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( TIPO_PEDIDO_TRABALHADOR, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						break; | 
			
		
	
		
			
				
					|  |  |  |  | 					case 4: | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( "tipo_pedido_empresa", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( TIPO_PEDIDO_EMPRESA, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						break; | 
			
		
	
		
			
				
					|  |  |  |  | 					case 5: | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( "tipo_mudanca_funcao", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( TIPO_MUDANCA_FUNCAO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						break; | 
			
		
	
		
			
				
					|  |  |  |  | 					case 6: | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( "tipo_trabalho", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( TIPO_TRABALHO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						break; | 
			
		
	
		
			
				
					|  |  |  |  | 					case 10: | 
			
		
	
		
			
				
					|  |  |  |  | 						aux = (String)exame.get( ExameData.OUTRO_TIPO ); | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( "tipo_outro", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( TIPO_OUTRO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						ht.put( TIPO_OUTRO_TEXTO, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 						break; | 
			
		
	
		
			
				
					|  |  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
	
		
			
				
					|  |  |  | @ -616,39 +644,46 @@ public class FichaWindow extends TabbedWindow | 
			
		
	
		
			
				
					|  |  |  |  | //				break;
 | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		tipo = (Integer)exame.get( ExameData.RESULTADO ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( RESULTADO_APTO, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( RESULTADO_APTO_CONDICIONALMENTE, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( RESULTADO_INAPTO_TEMP, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( RESULTADO_INAPTO_DEF, "☐" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		switch( tipo.intValue() ) | 
			
		
	
		
			
				
					|  |  |  |  | 		{ | 
			
		
	
		
			
				
					|  |  |  |  | 			case 1: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "resultado_apto", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( RESULTADO_APTO, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 2: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "resultado_apto_condicionalmente", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( RESULTADO_APTO_CONDICIONALMENTE, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 3: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "resultado_inapto_temp", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( RESULTADO_INAPTO_TEMP, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 			case 4: | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( "resultado_inapto_def", "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				ht.put( RESULTADO_INAPTO_DEF, "v" ); | 
			
		
	
		
			
				
					|  |  |  |  | 				break; | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)exame.get( ExameData.OUTRA_FUNCAO_1 ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "outra_funcao_1", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( OUTRA_FUNCAO_1, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)exame.get( ExameData.OUTRA_FUNCAO_2 ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "outra_funcao_2", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( OUTRA_FUNCAO_2, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)exame.get( ExameData.OUTRA_FUNCAO_3 ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "outra_funcao_3", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( OUTRA_FUNCAO_3, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)exame.get( ExameData.OUTRA_FUNCAO_4 ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "outra_funcao_4", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( OUTRA_FUNCAO_4, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)exame.get( ExameData.OUTRAS_RECOMENDACOES ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "outras_recomendacoes", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( OUTRAS_RECOMENDACOES, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		data = ( Date )exame.get( ExameData.PROXIMO_EXAME ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "proximo_exame", data != null ? df.format( data ) : "n/d" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( PROXIMO_EXAME, data != null ? df.format( data ) : "n/d" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)medico.get( MedicoData.NOME ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "medicos.nome", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( MEDICOS_NOME, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		aux = (String)medico.get( MedicoData.NUMERO_CEDULA ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( "numero_cedula", aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ExamePDF ePDF = new ExamePDF(); | 
			
		
	
		
			
				
					|  |  |  |  | 		return ePDF.createPDF( ht ); | 
			
		
	
		
			
				
					|  |  |  |  | 		ht.put( NUMERO_CEDULA, aux != null ? aux : "" ); | 
			
		
	
		
			
				
					|  |  |  |  | //		ExamePDF ePDF = new ExamePDF();
 | 
			
		
	
		
			
				
					|  |  |  |  | //		return ePDF.createPDF( ht );
 | 
			
		
	
		
			
				
					|  |  |  |  | 		 | 
			
		
	
		
			
				
					|  |  |  |  | 		return FichaAptidaoCreator.getCreator().createFO( ht ); | 
			
		
	
		
			
				
					|  |  |  |  | 		 | 
			
		
	
		
			
				
					|  |  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  |  | 	 | 
			
		
	
		
			
				
					|  |  |  |  | 	private void excel() | 
			
		
	
	
		
			
				
					|  |  |  | 
 |