Java 类ims.clinical.vo.enums.DementiaWorklistOpenFormModeEnum 实例源码

项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdInpatientsCellButtonClicked(DynamicGridCell cell) 
{
    if(cell.getValue() != null )
    {

        InpatientEpisodeVo inpTempVo = (InpatientEpisodeVo) cell.getRow().getValue();
        if( inpTempVo != null && inpTempVo.getPasEventIsNotNull() && inpTempVo.getPasEvent().getPatientIsNotNull())
        {
            DementiaForWorklistVo tempvo  = domain.getDementia(inpTempVo.getPasEvent().getPatient());
            if( tempvo != null )
            {
                engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { tempvo, DementiaWorklistOpenFormModeEnum.VIEW });
            }
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException
{
    // Case 1: - There is a Dementia record passed as a parameter (when form is open as a dialog)
    if (args != null && args.length > 0 && args[0] instanceof DementiaRefVo)
        form.getLocalContext().setselectedDementia(domain.getDementia((DementiaRefVo) args[0]));
    // Case 2: - There are no arguments, so retrieve the Dementia record based on selected Patient record 
    //              (when form was opened from alert icon or from navigation)
    else
        form.getLocalContext().setselectedDementia(domain.getDementiaForPatient(form.getGlobalContext().Core.getPatientShort()));

    // Initialize the form
    initialize();

    // Present the form to user
    open(args != null && args.length >= 2 ? (DementiaWorklistOpenFormModeEnum) args[1] : null);
}
项目:openMAXIMS    文件:Logic.java   
protected void onImbDementiaClick() throws PresentationLogicException 
{

    if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()
            && form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull()
            && form.getGlobalContext().Core.getCurrentCareContext().getPasEvent().getPatientIsNotNull())
    {

        DementiaForWorklistVo tempvo  = domain.getDementia(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent().getPatient());
        if( tempvo != null )
        {
            form.htmPreview().setHTML("");
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { tempvo, DementiaWorklistOpenFormModeEnum.VIEW });
        }
    }


}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.STEP1:// record Step1
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.STEP1EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.STEP2:// record Step2
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.VIEW:// VIEW
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.VIEW });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.EDIT:// EDIT //WDEV-16247
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.EDIT });
            break;  
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.RECORD_FOLLOWUP_AMTS:// record Step2
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CORRECT_CCOMPLETION_DATE_STEP1:
            engine.open(form.getForms().Clinical.DementiaCorrectCompletionDateStep1Dialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;

        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CORRECT_CCOMPLETION_DATE_STEP2:
            engine.open(form.getForms().Clinical.DementiaCorrectCompletionDateStep2Dialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;

        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.EXCLUDE_FROM_DEMENTIA_SCREENING:
            engine.open(form.getForms().Clinical.DementiaExcludefromDementiaScreeningDialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.RIE_REMOVE_FROM_WORKLIST:
            engine.open(form.getForms().Clinical.DementiaRIEConfirmationDialog);
            break;      
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CONFIRM_PATIENT:
            engine.open(form.getForms().Clinical.DementiaConfirmPatientWillBePutOnDementiaPathwayDialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;
    }

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onCcAMTSFollowUpValueChanged() throws PresentationLogicException
{
    if (DementiaEventEnumeration.RELOAD_AMTS_BROWSER.equals(form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().getSelectedEvent()))
    {
        // Reset event for component
        form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().resetSelectedEvent();
        // Refresh Dementia record value
        form.getLocalContext().setselectedDementia(domain.getDementia(form.getLocalContext().getselectedDementia()));

        open(DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_VIEW);
    }
    else if (DementiaEventEnumeration.NEW.equals(form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().getSelectedEvent()))
    {
        // Reset event for component
        form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().resetSelectedEvent();

        open(DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_NEW);
    }
    else if (DementiaEventEnumeration.EDIT.equals(form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().getSelectedEvent()))
    {
        // Reset event for component
        form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().resetSelectedEvent();

        open(DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_EDIT);
    }
    else if (DementiaEventEnumeration.SOE.equals(form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().getSelectedEvent()) )
    {
        // Reset event for component
        form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().resetSelectedEvent();

        open(DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_VIEW);
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.STEP1:// record Step1
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.STEP1EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.STEP2:// record Step2
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.VIEW:// VIEW
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.VIEW });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.EDIT:// EDIT //WDEV-16247
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.EDIT });
            break;  
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.RECORD_FOLLOWUP_AMTS:// record Step2
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_NEW });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CORRECT_CCOMPLETION_DATE_STEP1:
            engine.open(form.getForms().Clinical.DementiaCorrectCompletionDateStep1Dialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;

        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CORRECT_CCOMPLETION_DATE_STEP2:
            engine.open(form.getForms().Clinical.DementiaCorrectCompletionDateStep2Dialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;

        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.EXCLUDE_FROM_DEMENTIA_SCREENING:
            engine.open(form.getForms().Clinical.DementiaExcludefromDementiaScreeningDialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.RIE_REMOVE_FROM_WORKLIST:
            engine.open(form.getForms().Clinical.DementiaRIEConfirmationDialog);
            break;      
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CONFIRM_PATIENT:
            engine.open(form.getForms().Clinical.DementiaConfirmPatientWillBePutOnDementiaPathwayDialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;
    }

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.STEP1:// record Step1
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.STEP1EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.STEP2:// record Step2
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.VIEW:// VIEW
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.VIEW });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.EDIT:// EDIT //WDEV-16247
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.EDIT });
            break;  
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.RECORD_FOLLOWUP_AMTS:// record Step2
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CORRECT_CCOMPLETION_DATE_STEP1:
            engine.open(form.getForms().Clinical.DementiaCorrectCompletionDateStep1Dialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;

        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CORRECT_CCOMPLETION_DATE_STEP2:
            engine.open(form.getForms().Clinical.DementiaCorrectCompletionDateStep2Dialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;

        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.EXCLUDE_FROM_DEMENTIA_SCREENING:
            engine.open(form.getForms().Clinical.DementiaExcludefromDementiaScreeningDialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.RIE_REMOVE_FROM_WORKLIST:
            engine.open(form.getForms().Clinical.DementiaRIEConfirmationDialog);
            break;      
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CONFIRM_PATIENT:
            engine.open(form.getForms().Clinical.DementiaConfirmPatientWillBePutOnDementiaPathwayDialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;
    }

}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.STEP1:// record Step1
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.STEP1EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.STEP2:// record Step2
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.VIEW:// VIEW
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.VIEW });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.EDIT:// EDIT //WDEV-16247
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.EDIT });
            break;  
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.RECORD_FOLLOWUP_AMTS:// record Step2
            engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { form.getLocalContext().getSelectedInstance(), DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_EDIT });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CORRECT_CCOMPLETION_DATE_STEP1:
            engine.open(form.getForms().Clinical.DementiaCorrectCompletionDateStep1Dialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;

        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CORRECT_CCOMPLETION_DATE_STEP2:
            engine.open(form.getForms().Clinical.DementiaCorrectCompletionDateStep2Dialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;

        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.EXCLUDE_FROM_DEMENTIA_SCREENING:
            engine.open(form.getForms().Clinical.DementiaExcludefromDementiaScreeningDialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.RIE_REMOVE_FROM_WORKLIST:
            engine.open(form.getForms().Clinical.DementiaRIEConfirmationDialog);
            break;      
        case GenForm.ContextMenus.ClinicalNamespace.DementiaWorklistMenu.CONFIRM_PATIENT:
            engine.open(form.getForms().Clinical.DementiaConfirmPatientWillBePutOnDementiaPathwayDialog, new Object[] { form.getLocalContext().getSelectedInstance() });
            break;
    }

}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
    if (args != null)
    {
        if (args.length == 2 && args[0] != null && args[1] != null && args[0] instanceof DementiaForWorklistVo)
        {
            form.getLocalContext().setselectedDementia(domain.getDementia((DementiaForWorklistVo) args[0]));
            if (DementiaWorklistOpenFormModeEnum.STEP1EDIT.equals(args[1]))
            {
                form.lyrSteps().showtabPageStep1();
                form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog());
                form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull());
                form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
            }
            else if (DementiaWorklistOpenFormModeEnum.VIEW.equals(args[1]))
            {
                open();
                return;
            }
            else if (DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT.equals(args[1]))
            {
                form.lyrSteps().showtabPageStep2();
                form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, null);
                form.lyrSteps().tabPageStep2().setHeaderVisible(true);
                form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
            }
            else if (DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_EDIT.equals(args[1]))
            {
                form.lyrSteps().showtabPageFollowUp();

                form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW,engine.isDialog());
                form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, null);

                initialiseFollowUp(true);
                return;
            }
            else if (DementiaWorklistOpenFormModeEnum.EDIT.equals(args[1])) //WDEV-16247
            {
                Object hcp = domain.getHcpLiteUser();
                HcpLiteVo hcpLiteUser=null;
                if (hcp != null)
                    hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

                DementiaFindVo voStep1Find = (form.getLocalContext().getselectedDementiaIsNotNull()?form.getLocalContext().getselectedDementia().getStepOneFind():null);
                DementiaAssessAndInvestigateVo voStep2AMTS = (form.getLocalContext().getselectedDementiaIsNotNull()?form.getLocalContext().getselectedDementia().getStepTwoAssess():null);
                if (form.getLocalContext().getselectedDementiaIsNotNull() && voStep1Find!=null && voStep2AMTS==null 
                    && ((voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) 
                        || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)))
                {
                    form.lyrSteps().showtabPageStep1();
                    form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog());
                    form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull());
                    form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
                }
                else if (form.getLocalContext().getselectedDementiaIsNotNull() && voStep1Find!=null && voStep2AMTS!=null )
                {
                    if ((voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) 
                                || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA))
                    {
                        form.lyrSteps().showtabPageStep2();
                        form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, null);
                        form.lyrSteps().tabPageStep2().setHeaderVisible(true);
                        form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
                    }
                    else if ((voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && !voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                            && (voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) )
                    {
                        form.lyrSteps().showtabPageStep1();
                        form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog());
                        form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull());
                        form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
                    }


                }

            }
            initialiseFollowUp(false);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onCcStep1FindValueChanged() throws PresentationLogicException
{
    if (DementiaEventEnumeration.SAVE.equals(form.lyrSteps().tabPageStep1().ccStep1Find().getSelectedEvent()))
    {
        // Reset event for component
        form.lyrSteps().tabPageStep1().ccStep1Find().resetSelectedEvent();

        // Update Dementia record in context
        form.getLocalContext().setselectedDementia(form.lyrSteps().tabPageStep1().ccStep1Find().getValue());
        DementiaVo dementia = form.getLocalContext().getselectedDementia();

        // If Dementia record requires a STEP 2 ASSESSMENT and one is not recorded, present screen to user to record STEP 2 ASSESSMENT
        if ((dementia.getCurrentWorklistStatus() != null
                && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(dementia.getCurrentWorklistStatus().getStatus()))
                || dementia.getStepTwoAssess() != null)
        {
            open(DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT);
        }
        else
        {
            if (engine.isDialog())
                engine.close(DialogResult.CANCEL);
            else
                open(DementiaWorklistOpenFormModeEnum.VIEW);
        }
    }
    else if (DementiaEventEnumeration.CLOSE.equals(form.lyrSteps().tabPageStep1().ccStep1Find().getSelectedEvent()))
    {
        form.lyrSteps().tabPageStep1().ccStep1Find().resetSelectedEvent();

        if (engine.isDialog())
            engine.close(DialogResult.CANCEL);
        else
            open(DementiaWorklistOpenFormModeEnum.VIEW);
    }
    else if (DementiaEventEnumeration.NEW.equals(form.lyrSteps().tabPageStep1().ccStep1Find().getSelectedEvent()))
    {
        form.lyrSteps().tabPageStep1().ccStep1Find().resetSelectedEvent();

        open(DementiaWorklistOpenFormModeEnum.STEP1EDIT);
    }
    else if (DementiaEventEnumeration.MARK_RIE.equals(form.lyrSteps().tabPageStep1().ccStep1Find().getSelectedEvent()))
    {
        form.lyrSteps().tabPageStep1().ccStep1Find().resetSelectedEvent();
        doRIE();
    }
    //SOE
    else if (DementiaEventEnumeration.CANCEL.equals(form.lyrSteps().tabPageStep1().ccStep1Find().getSelectedEvent()) 
        || DementiaEventEnumeration.SOE.equals(form.lyrSteps().tabPageStep1().ccStep1Find().getSelectedEvent()))
    {
        form.lyrSteps().tabPageStep1().ccStep1Find().resetSelectedEvent();
        open(DementiaWorklistOpenFormModeEnum.VIEW);
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onCcAMTSValueChanged() throws PresentationLogicException
{
    if (DementiaEventEnumeration.SAVE.equals(form.lyrSteps().tabPageStep2().ccAMTS().getSelectedEvent()) 
        || DementiaEventEnumeration.CANCEL.equals(form.lyrSteps().tabPageStep2().ccAMTS().getSelectedEvent()))
    {
        // Reset event for component
        form.lyrSteps().tabPageStep2().ccAMTS().resetSelectedEvent();

        // Refresh dementia record
        form.getLocalContext().setselectedDementia(form.lyrSteps().tabPageStep2().ccAMTS().getValue());

        // Determine if STEP 2 was recorded for Dementia record
        boolean stepTwoVisible = form.getLocalContext().getselectedDementia().getStepTwoAssess() != null
                                    && form.getLocalContext().getselectedDementia().getCurrentWorklistStatus() != null
                                    && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(form.getLocalContext().getselectedDementia().getCurrentWorklistStatus().getStatus());

        // If there was a STEP 2 recorded for Dementia record
        open(stepTwoVisible ? DementiaWorklistOpenFormModeEnum.STEP2_AMTS_VIEW : DementiaWorklistOpenFormModeEnum.VIEW);
    }
    else if (DementiaEventEnumeration.EDIT.equals(form.lyrSteps().tabPageStep2().ccAMTS().getSelectedEvent()))
    {
        // Reset event for component
        form.lyrSteps().tabPageStep2().ccAMTS().resetSelectedEvent();

        // Set form to edit STEP 2
        open(DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT);
    }
    else if (DementiaEventEnumeration.CLOSE.equals(form.lyrSteps().tabPageStep2().ccAMTS().getSelectedEvent()))
    {
        // Reset event for component
        form.lyrSteps().tabPageStep2().ccAMTS().resetSelectedEvent();

        if (engine.isDialog())
            engine.close(DialogResult.CANCEL);
        else
            open(DementiaWorklistOpenFormModeEnum.VIEW);
    }
    else if (DementiaEventEnumeration.SOE.equals(form.lyrSteps().tabPageStep2().ccAMTS().getSelectedEvent()))
    {
        // Reset event for component
        form.lyrSteps().tabPageStep2().ccAMTS().resetSelectedEvent();
        // Refresh the form
        open(DementiaWorklistOpenFormModeEnum.VIEW);
    }
    else if (DementiaEventEnumeration.MARK_RIE.equals(form.lyrSteps().tabPageStep2().ccAMTS().getSelectedEvent()))
    {
        // Reset event for component
        form.lyrSteps().tabPageStep2().ccAMTS().resetSelectedEvent();
        doRIE();
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
    if (args != null)
    {
        if (args.length == 2 && args[0] != null && args[1] != null && args[0] instanceof DementiaForWorklistVo)
        {
            form.getLocalContext().setselectedDementia(domain.getDementia((DementiaForWorklistVo) args[0]));
            if (DementiaWorklistOpenFormModeEnum.STEP1EDIT.equals(args[1]))
            {
                form.lyrSteps().showtabPageStep1();
                form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog());
                form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull());
                form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
            }
            else if (DementiaWorklistOpenFormModeEnum.VIEW.equals(args[1]))
            {
                open();
                return;
            }
            else if (DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT.equals(args[1]))
            {
                form.lyrSteps().showtabPageStep2();
                form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, null);
                form.lyrSteps().tabPageStep2().setHeaderVisible(true);
                form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
            }
            else if (DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_EDIT.equals(args[1]))
            {
                form.lyrSteps().showtabPageFollowUp();

                form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW,engine.isDialog());
                form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, null);

                initialiseFollowUp(true);
                return;
            }
            else if (DementiaWorklistOpenFormModeEnum.EDIT.equals(args[1])) //WDEV-16247
            {
                Object hcp = domain.getHcpLiteUser();
                HcpLiteVo hcpLiteUser=null;
                if (hcp != null)
                    hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

                DementiaFindVo voStep1Find = (form.getLocalContext().getselectedDementiaIsNotNull()?form.getLocalContext().getselectedDementia().getStepOneFind():null);
                DementiaAssessAndInvestigateVo voStep2AMTS = (form.getLocalContext().getselectedDementiaIsNotNull()?form.getLocalContext().getselectedDementia().getStepTwoAssess():null);
                if (form.getLocalContext().getselectedDementiaIsNotNull() && voStep1Find!=null && voStep2AMTS==null 
                    && ((voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) 
                        || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)))
                {
                    form.lyrSteps().showtabPageStep1();
                    form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog());
                    form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull());
                    form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
                }
                else if (form.getLocalContext().getselectedDementiaIsNotNull() && voStep1Find!=null && voStep2AMTS!=null )
                {
                    if ((voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) 
                                || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA))
                    {
                        form.lyrSteps().showtabPageStep2();
                        form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, null);
                        form.lyrSteps().tabPageStep2().setHeaderVisible(true);
                        form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
                    }
                    else if ((voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && !voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                            && (voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) )
                    {
                        form.lyrSteps().showtabPageStep1();
                        form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog());
                        form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull());
                        form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
                    }


                }

            }
            initialiseFollowUp(false);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
    if (args != null)
    {
        if (args.length == 2 && args[0] != null && args[1] != null && args[0] instanceof DementiaForWorklistVo)
        {
            form.getLocalContext().setselectedDementia(domain.getDementia((DementiaForWorklistVo) args[0]));
            if (DementiaWorklistOpenFormModeEnum.STEP1EDIT.equals(args[1]))
            {
                form.lyrSteps().showtabPageStep1();
                form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog());
                form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull());
                form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
            }
            else if (DementiaWorklistOpenFormModeEnum.VIEW.equals(args[1]))
            {
                open();
                return;
            }
            else if (DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT.equals(args[1]))
            {
                form.lyrSteps().showtabPageStep2();
                form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, null);
                form.lyrSteps().tabPageStep2().setHeaderVisible(true);
                form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
            }
            else if (DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_EDIT.equals(args[1]))
            {
                form.lyrSteps().showtabPageFollowUp();

                form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW,engine.isDialog());
                form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, null);

                initialiseFollowUp(true);
                return;
            }
            else if (DementiaWorklistOpenFormModeEnum.EDIT.equals(args[1])) //WDEV-16247
            {
                Object hcp = domain.getHcpLiteUser();
                HcpLiteVo hcpLiteUser=null;
                if (hcp != null)
                    hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

                DementiaFindVo voStep1Find = (form.getLocalContext().getselectedDementiaIsNotNull()?form.getLocalContext().getselectedDementia().getStepOneFind():null);
                DementiaAssessAndInvestigateVo voStep2AMTS = (form.getLocalContext().getselectedDementiaIsNotNull()?form.getLocalContext().getselectedDementia().getStepTwoAssess():null);
                if (form.getLocalContext().getselectedDementiaIsNotNull() && voStep1Find!=null && voStep2AMTS==null 
                    && ((voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) 
                        || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)))
                {
                    form.lyrSteps().showtabPageStep1();
                    form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog());
                    form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull());
                    form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
                }
                else if (form.getLocalContext().getselectedDementiaIsNotNull() && voStep1Find!=null && voStep2AMTS!=null )
                {
                    if ((voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) 
                                || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA))
                    {
                        form.lyrSteps().showtabPageStep2();
                        form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, null);
                        form.lyrSteps().tabPageStep2().setHeaderVisible(true);
                        form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
                    }
                    else if ((voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && !voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                            && (voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) )
                    {
                        form.lyrSteps().showtabPageStep1();
                        form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog());
                        form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull());
                        form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0);
                    }


                }

            }
            initialiseFollowUp(false);
        }
    }
}