@ -162,6 +162,9 @@ public class MedicinaProcessoLogic extends SIPRPLogic
@Action ( isSave = true )
public static final String REALIZAR_EXAME_MARCACAO = "REALIZAR_EXAME_MARCACAO" ;
@Action ( isSave = true )
public static final String REALIZAR_PARCIAL_EXAME_MARCACAO = "REALIZAR_PARCIAL_EXAME_MARCACAO" ;
@Action ( isSave = true )
public static final String FALTOU_EXAME_MARCACAO = "FALTOU_EXAME_MARCACAO" ;
@ -173,34 +176,34 @@ public class MedicinaProcessoLogic extends SIPRPLogic
private Trabalhadores currentTrabalhador = null ;
@LeafObject ( useWith Action = SAVE_PROCESSO )
@LeafObject ( useWith = SAVE_PROCESSO )
public TrabalhadoresProcesso currentProcesso = null ;
@LeafObject ( useWith Action = SAVE_CONSULTA )
@LeafObject ( useWith = SAVE_CONSULTA )
public TrabalhadoresConsultas currentConsulta = null ;
@LeafObject ( useWith Action = SAVE_CONSULTA_MARCACAO )
@LeafObject ( useWith = SAVE_CONSULTA_MARCACAO )
public TrabalhadoresConsultasDatas currentConsultaMarcacao = null ;
@LeafObject ( useWith Action = SAVE_CONSULTA_MARCACAO_EMAIL )
@LeafObject ( useWith = SAVE_CONSULTA_MARCACAO_EMAIL )
public TrabalhadoresConsultasDatasEmails currentConsultaMarcacaoEmail = null ;
@LeafObject ( useWith Action = SAVE_CONSULTA_MARCACAO_OBSERVACOES )
@LeafObject ( useWith = SAVE_CONSULTA_MARCACAO_OBSERVACOES )
public TrabalhadoresConsultasDatasObservacoes currentConsultaMarcacaoObservacao = null ;
@LeafObject ( useWith Action = SAVE_FICHA )
@LeafObject ( useWith = SAVE_FICHA )
public FichaAptidaoMutableTreeNode currentFicha = null ;
@LeafObject ( useWith Action = SAVE_EXAME_MARCACAO_OBSERVACOES )
@LeafObject ( useWith = SAVE_EXAME_MARCACAO_OBSERVACOES )
public TrabalhadoresEcdsDatasObservacoes currentExameMarcacaoObservacao = null ;
@LeafObject ( useWith Action = SAVE_EXAME_MARCACAO_EMAIL )
@LeafObject ( useWith = SAVE_EXAME_MARCACAO_EMAIL )
public TrabalhadoresEcdsDatasEmails currentExameMarcacaoEmail = null ;
@LeafObject ( useWith Action = SAVE_EXAME_MARCACAO )
@LeafObject ( useWith = { SAVE_EXAME_MARCACAO , REALIZAR_PARCIAL_EXAME_MARCACAO } )
public TrabalhadoresEcdsDatas currentExameMarcacao = null ;
@LeafObject ( useWith Action = SAVE_EXAME )
@LeafObject ( useWith = SAVE_EXAME )
public TrabalhadoresEcds currentExame = null ;
public MedicinaProcessoLogic ( )
@ -309,7 +312,7 @@ public class MedicinaProcessoLogic extends SIPRPLogic
{
if ( currentExameMarcacao ! = null )
{
currentExameMarcacao . setEstado( MedicinaConstants . ESTADO_DESMARCADO_EMPRESA ) ;
currentExameMarcacao . desmarcarSIPRP( ) ;
runActionLater ( SAVE_EXAME_MARCACAO ) ;
}
}
@ -319,7 +322,7 @@ public class MedicinaProcessoLogic extends SIPRPLogic
{
if ( currentExameMarcacao ! = null )
{
currentExameMarcacao . setEstado( MedicinaConstants . ESTADO_DESMARCADO_TRABALHADOR ) ;
currentExameMarcacao . desmarcarTrabalhador( ) ;
runActionLater ( SAVE_EXAME_MARCACAO ) ;
}
}
@ -329,7 +332,7 @@ public class MedicinaProcessoLogic extends SIPRPLogic
{
if ( currentExameMarcacao ! = null )
{
currentExameMarcacao . setEstado( MedicinaConstants . ESTADO_FALTOU ) ;
currentExameMarcacao . faltou( ) ;
runActionLater ( SAVE_EXAME_MARCACAO ) ;
}
}
@ -339,7 +342,7 @@ public class MedicinaProcessoLogic extends SIPRPLogic
{
if ( currentExameMarcacao ! = null )
{
currentExameMarcacao . setEstado( MedicinaConstants . ESTADO_ANULADO ) ;
currentExameMarcacao . anular( ) ;
runActionLater ( SAVE_EXAME_MARCACAO ) ;
}
}
@ -349,7 +352,16 @@ public class MedicinaProcessoLogic extends SIPRPLogic
{
if ( currentExameMarcacao ! = null )
{
currentExameMarcacao . setEstado ( MedicinaConstants . ESTADO_REALIZADO ) ;
currentExameMarcacao . realizar ( ) ;
runActionLater ( SAVE_EXAME_MARCACAO ) ;
}
}
@LeafLogicActionBinding ( actions = REALIZAR_PARCIAL_EXAME_MARCACAO )
public void realizarParcialExame ( )
{
if ( currentExameMarcacao ! = null )
{
runActionLater ( SAVE_EXAME_MARCACAO ) ;
}
}
@ -488,7 +500,7 @@ public class MedicinaProcessoLogic extends SIPRPLogic
currentExameMarcacao . setToTrabalhadoresEcds ( currentExame ) ;
currentExameMarcacao . setToPrestadores ( getPrestador ( false ) ) ;
currentExameMarcacao . setToAnalisador ( getAnalisador ( ) ) ;
currentExameMarcacao . setEstado( MedicinaConstants . ESTADO_POR_REALIZAR ) ;
currentExameMarcacao . porRealizar( ) ;
runActionLater ( SAVE_EXAME_MARCACAO ) ;
return currentExameMarcacao ;