Java 类ims.clinical.vo.DementiaAssessAndInvestigateVo 实例源码

项目:AvoinApotti    文件:Logic.java   
@Override
protected void onlyrStepsTabChanged(LayerBridge tab)
{
    if (FormMode.VIEW.equals(form.getMode()))
    {
        if (tab.equals(form.lyrSteps().tabPageStep1()))
        {
            form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, engine.isDialog());
        }
        else if (tab.equals(form.lyrSteps().tabPageStep2()))
        {
            form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, null);
        }
        else if (tab.equals(form.lyrSteps().tabPageFollowUp()))
        {
            form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, (form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() != null ? form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() : new DementiaAssessAndInvestigateVo())); //wdev-16366
        }
        updateControlsState();
    }
}
项目:AvoinApotti    文件:Logic.java   
public void initialize(DementiaVo voDementia, FormMode formMode, DementiaAssessAndInvestigateVo voAMTS)
{
    form.getLocalContext().setSelectedRecord(voDementia);
    form.getLocalContext().setinFollowUpMode(false);
    form.getLocalContext().setSelectedAMTSRecord(null);
    if (voAMTS != null)
    {
        form.getLocalContext().setSelectedAMTSRecord(voAMTS);
        form.getLocalContext().setinFollowUpMode(true);
    }

    populateQuestions();
    hideShowBottomQuestionsBasedOnThreshold(false);
    initializeAuthoringControls(null);

    form.setMode(formMode);

    open();
}
项目:AvoinApotti    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull() && form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull())
    {
        DementiaAssessAndInvestigateVo dementiaToSave = populateDataFromScreen((DementiaAssessAndInvestigateVo) form.getLocalContext().getselectedDementia().getStepTwoAssess().clone());       

        String[] errors = dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            engine.close(DialogResult.CANCEL);
            return false;
        }
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull() && form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull())
    {
        DementiaAssessAndInvestigateVo dementiaToSave = populateDataFromScreen((DementiaAssessAndInvestigateVo) form.getLocalContext().getselectedDementia().getStepTwoAssess().clone());       

        String[] errors = dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            engine.close(DialogResult.CANCEL);
            return false;
        }
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onlyrStepsTabChanged(LayerBridge tab)
{
    if (FormMode.VIEW.equals(form.getMode()))
    {
        if (tab.equals(form.lyrSteps().tabPageStep1()))
        {
            form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, engine.isDialog());
        }
        else if (tab.equals(form.lyrSteps().tabPageStep2()))
        {
            form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, null);
        }
        else if (tab.equals(form.lyrSteps().tabPageFollowUp()))
        {
            form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, (form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() != null ? form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() : new DementiaAssessAndInvestigateVo())); //wdev-16366
        }
        updateControlsState();
    }
}
项目:openMAXIMS    文件:Logic.java   
public void initialize(DementiaVo voDementia, FormMode formMode, DementiaAssessAndInvestigateVo voAMTS)
{
    form.getLocalContext().setSelectedRecord(voDementia);
    form.getLocalContext().setinFollowUpMode(false);
    form.getLocalContext().setSelectedAMTSRecord(null);
    if (voAMTS != null)
    {
        form.getLocalContext().setSelectedAMTSRecord(voAMTS);
        form.getLocalContext().setinFollowUpMode(true);
    }

    populateQuestions();
    hideShowBottomQuestionsBasedOnThreshold(false);
    initializeAuthoringControls(null);

    form.setMode(formMode);

    open();
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull() && form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull())
    {
        DementiaAssessAndInvestigateVo dementiaToSave = populateDataFromScreen((DementiaAssessAndInvestigateVo) form.getLocalContext().getselectedDementia().getStepTwoAssess().clone());       

        String[] errors = dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            engine.close(DialogResult.CANCEL);
            return false;
        }
    }
    return true;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onlyrStepsTabChanged(LayerBridge tab)
{
    if (FormMode.VIEW.equals(form.getMode()))
    {
        if (tab.equals(form.lyrSteps().tabPageStep1()))
        {
            form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, engine.isDialog());
        }
        else if (tab.equals(form.lyrSteps().tabPageStep2()))
        {
            form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, null);
        }
        else if (tab.equals(form.lyrSteps().tabPageFollowUp()))
        {
            form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, (form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() != null ? form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() : new DementiaAssessAndInvestigateVo())); //wdev-16366
        }
        updateControlsState();
    }
}
项目:openmaxims-linux    文件:Logic.java   
public void initialize(DementiaVo voDementia, FormMode formMode, DementiaAssessAndInvestigateVo voAMTS)
{
    form.getLocalContext().setSelectedRecord(voDementia);
    form.getLocalContext().setinFollowUpMode(false);
    form.getLocalContext().setSelectedAMTSRecord(null);
    if (voAMTS != null)
    {
        form.getLocalContext().setSelectedAMTSRecord(voAMTS);
        form.getLocalContext().setinFollowUpMode(true);
    }

    populateQuestions();
    hideShowBottomQuestionsBasedOnThreshold(false);
    initializeAuthoringControls(null);

    form.setMode(formMode);

    open();
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull() && form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull())
    {
        DementiaAssessAndInvestigateVo dementiaToSave = populateDataFromScreen((DementiaAssessAndInvestigateVo) form.getLocalContext().getselectedDementia().getStepTwoAssess().clone());       

        String[] errors = dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            engine.close(DialogResult.CANCEL);
            return false;
        }
    }
    return true;
}
项目:AvoinApotti    文件:DementiaAssessmentFormImpl.java   
public DementiaAssessAndInvestigateVo getFollowUpAMTS(DementiaAssessAndInvestigateRefVo amtsRefVo)
{
    if (amtsRefVo == null || amtsRefVo.getID_DementiaAssessAndInvestigate()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaAssessAndInvestigateRefVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DementiaAssessAndInvestigate domainDementia = (DementiaAssessAndInvestigate) factory.getDomainObject(DementiaAssessAndInvestigate.class, amtsRefVo.getID_DementiaAssessAndInvestigate());

    return DementiaAssessAndInvestigateVoAssembler.create(domainDementia);
}
项目:AvoinApotti    文件:DementiaCorrectCompletionDateStep2DialogImpl.java   
public void saveDementia(DementiaAssessAndInvestigateVo stepTwoAssesstoSave)throws StaleObjectException 
{
    if (stepTwoAssesstoSave == null )
    {
        throw new CodingRuntimeException("Cannot get DementiaAssessAndInvestigateVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DementiaAssessAndInvestigate domainDementia = DementiaAssessAndInvestigateVoAssembler.extractDementiaAssessAndInvestigate(factory, stepTwoAssesstoSave);
    factory.save(domainDementia);   

}
项目:openMAXIMS    文件:Logic.java   
public void setValue(DementiaVo dementia, DementiaAssessAndInvestigateVo assessment)
{
    form.getLocalContext().setSelectedRecord(dementia);
    form.getLocalContext().setSelectedAMTSRecord(assessment);

    // Populate screen with Dementia record and Follow Up Assessment
    populateScreenFromData(dementia, assessment);
}
项目:openMAXIMS    文件:DementiaAssessmentFormImpl.java   
public DementiaAssessAndInvestigateVo getFollowUpAMTS(DementiaAssessAndInvestigateRefVo amtsRefVo)
{
    if (amtsRefVo == null || amtsRefVo.getID_DementiaAssessAndInvestigate()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaAssessAndInvestigateRefVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DementiaAssessAndInvestigate domainDementia = (DementiaAssessAndInvestigate) factory.getDomainObject(DementiaAssessAndInvestigate.class, amtsRefVo.getID_DementiaAssessAndInvestigate());

    return DementiaAssessAndInvestigateVoAssembler.create(domainDementia);
}
项目:openMAXIMS    文件:DementiaCorrectCompletionDateStep2DialogImpl.java   
public void saveDementia(DementiaAssessAndInvestigateVo stepTwoAssesstoSave)throws StaleObjectException 
{
    if (stepTwoAssesstoSave == null )
    {
        throw new CodingRuntimeException("Cannot get DementiaAssessAndInvestigateVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DementiaAssessAndInvestigate domainDementia = DementiaAssessAndInvestigateVoAssembler.extractDementiaAssessAndInvestigate(factory, stepTwoAssesstoSave);
    factory.save(domainDementia);   

}
项目:openMAXIMS    文件:DementiaAssessmentFormImpl.java   
public DementiaAssessAndInvestigateVo getFollowUpAMTS(DementiaAssessAndInvestigateRefVo amtsRefVo)
{
    if (amtsRefVo == null || amtsRefVo.getID_DementiaAssessAndInvestigate()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaAssessAndInvestigateRefVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DementiaAssessAndInvestigate domainDementia = (DementiaAssessAndInvestigate) factory.getDomainObject(DementiaAssessAndInvestigate.class, amtsRefVo.getID_DementiaAssessAndInvestigate());

    return DementiaAssessAndInvestigateVoAssembler.create(domainDementia);
}
项目:openMAXIMS    文件:DementiaCorrectCompletionDateStep2DialogImpl.java   
public void saveDementia(DementiaAssessAndInvestigateVo stepTwoAssesstoSave)throws StaleObjectException 
{
    if (stepTwoAssesstoSave == null )
    {
        throw new CodingRuntimeException("Cannot get DementiaAssessAndInvestigateVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DementiaAssessAndInvestigate domainDementia = DementiaAssessAndInvestigateVoAssembler.extractDementiaAssessAndInvestigate(factory, stepTwoAssesstoSave);
    factory.save(domainDementia);   

}
项目:openmaxims-linux    文件:DementiaAssessmentFormImpl.java   
public DementiaAssessAndInvestigateVo getFollowUpAMTS(DementiaAssessAndInvestigateRefVo amtsRefVo)
{
    if (amtsRefVo == null || amtsRefVo.getID_DementiaAssessAndInvestigate()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaAssessAndInvestigateRefVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DementiaAssessAndInvestigate domainDementia = (DementiaAssessAndInvestigate) factory.getDomainObject(DementiaAssessAndInvestigate.class, amtsRefVo.getID_DementiaAssessAndInvestigate());

    return DementiaAssessAndInvestigateVoAssembler.create(domainDementia);
}
项目:openmaxims-linux    文件:DementiaCorrectCompletionDateStep2DialogImpl.java   
public void saveDementia(DementiaAssessAndInvestigateVo stepTwoAssesstoSave)throws StaleObjectException 
{
    if (stepTwoAssesstoSave == null )
    {
        throw new CodingRuntimeException("Cannot get DementiaAssessAndInvestigateVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DementiaAssessAndInvestigate domainDementia = DementiaAssessAndInvestigateVoAssembler.extractDementiaAssessAndInvestigate(factory, stepTwoAssesstoSave);
    factory.save(domainDementia);   

}
项目: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);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void initialiseFollowUp(FormMode mode, Boolean bNewRecord)
{
    form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().initialize(form.getLocalContext().getselectedDementia(), mode, bNewRecord ? new DementiaAssessAndInvestigateVo() : (form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() != null ? form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() : new DementiaAssessAndInvestigateVo()));
}
项目:AvoinApotti    文件:Logic.java   
private DementiaAssessAndInvestigateVo populateDataFromScreen(DementiaAssessAndInvestigateVo dementiaAssessAndInvestigateVo)
{
    dementiaAssessAndInvestigateVo.getAuthoringInformation().setAuthoringDateTime(form.dtimCorrected().getValue());

    return dementiaAssessAndInvestigateVo;
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlsState()
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    DementialManualClassAssemblyVo selectedRowValue = (DementialManualClassAssemblyVo) form.dyngrdPatients().getValue();

    //WDEV-16247
    Object hcp = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteUser=null;
    if (hcp != null)
        hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

    DementiaVo voDementia = (selectedRowValue!=null ? domain.getDementia(new DementiaRefVo(((DementialManualClassAssemblyVo) selectedRowValue).getDementiaId(),0)) : null);

    DementiaFindVo voStep1Find = (voDementia!=null?voDementia.getStepOneFind():null);
    DementiaAssessAndInvestigateVo voStep2AMTS = (voDementia!=null?voDementia.getStepTwoAssess():null);

    Integer hours = (voDementia!=null && voDementia.getAdmissionDateTime()!=null?calculateDateDiffInMinutes(voDementia.getAdmissionDateTime(),new DateTime())/60:null);

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dteFrom().setEnabled(enableControls);
    form.dteTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkExclude().setEnabled(enableControls);
    form.chkDelirum().setEnabled(enableControls);
    form.chkDementiaConfirmed().setEnabled(enableControls);
    form.chkInpatientOnly().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.hideAllDementiaWorklistMenuMenuItems();
    form.getContextMenus().Clinical.getDementiaWorklistMenuVIEWItem().setVisible(selectedRowValue != null && voDementia.getStepOneFindIsNotNull());
    //EDIT Context Menu 
    form.getContextMenus().Clinical.getDementiaWorklistMenuEDITItem().setVisible(hcpLiteUser!=null && selectedRowValue != null && (voStep1Find!=null || voStep2AMTS!=null)
                                &&((voStep1Find!=null  && voStep1Find.getAuthoringInformationIsNotNull() &&voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() &&  voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || (voStep2AMTS!=null && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)));   
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP1Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus()));
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP2Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
            && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus())));
    form.getContextMenus().Clinical.getDementiaWorklistMenuRECORD_FOLLOWUP_AMTSItem().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null && voDementia.getStepTwoAssessIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuEXCLUDE_FROM_DEMENTIA_SCREENINGItem().setVisible(selectedRowValue != null 
            && selectedRowValue.getIsExcludedFromWorklist()==null 
            && (hours!=null && hours>form.getGlobalContext().Admin.getDementiaConfiguration().getRemoveTimePeriod())
            && ! DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())
            && ! DementiaWorklistStatus.FOR_REFERRAL.equals(voDementia.getCurrentWorklistStatus().getStatus()) );
    form.getContextMenus().Clinical.getDementiaWorklistMenuCONFIRM_PATIENTItem().setVisible(selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
                    && DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())) 
                    && (Boolean.TRUE.equals(selectedRowValue.getDementiaConfirmed())) 
                    && voDementia.getConfirmedPatientPutOnDementiaPathway()==null);
    form.getContextMenus().Clinical.getDementiaWorklistMenuRIE_REMOVE_FROM_WORKLISTItem().setVisible(selectedRowValue != null 
            && engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA) );   
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP1Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP2Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull() && voDementia.getStepTwoAssessIsNotNull());


}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DementiaVo dementia)
{
    // Clear the screen
    clearScreen();

    if (dementia == null)
        return;

    form.lyrSteps().tabPageStep1().ccStep1Find().setValue(dementia);
    form.lyrSteps().tabPageStep2().ccAMTS().setValue(dementia, dementia.getStepTwoAssess());

    // On the follow up tab select the latest record
    if (dementia.getFollowUpAssessments() != null && dementia.getFollowUpAssessments().size() > 0)
    {
        // Populate record browser
        form.lyrSteps().tabPageFollowUp().recbrAMTS().clear();
        dementia.getFollowUpAssessments().sort(SortOrder.DESCENDING);

        for (DementiaAssessAndInvestigateVo assessment : dementia.getFollowUpAssessments())
        {
            form.lyrSteps().tabPageFollowUp().recbrAMTS().newRow(assessment, assessment.getRecordBrowserText());
        }

        // Set the record browser value
        if (form.getGlobalContext().Clinical.getAMTSRecordToView() != null)
        {
            form.lyrSteps().tabPageFollowUp().recbrAMTS().setValue(form.getGlobalContext().Clinical.getAMTSRecordToView());
            form.getGlobalContext().Clinical.setAMTSRecordToView(form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue());
        }
        else if (form.lyrSteps().tabPageFollowUp().recbrAMTS().getValues() != null && form.lyrSteps().tabPageFollowUp().recbrAMTS().getValues().size() > 0)
        {
            form.lyrSteps().tabPageFollowUp().recbrAMTS().setValue((DementiaAssessAndInvestigateVo) form.lyrSteps().tabPageFollowUp().recbrAMTS().getValues().get(0));
            form.getGlobalContext().Clinical.setAMTSRecordToView(form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue());
        }

        // Set value for Follow up component
        form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().setValue(dementia, form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue());
    }
    else
    {
        form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().setValue(dementia, null);
    }
}
项目:openMAXIMS    文件:Logic.java   
private DementiaAssessAndInvestigateVo populateDataFromScreen(DementiaAssessAndInvestigateVo dementiaAssessAndInvestigateVo)
{
    dementiaAssessAndInvestigateVo.getAuthoringInformation().setAuthoringDateTime(form.dtimCorrected().getValue());

    return dementiaAssessAndInvestigateVo;
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    DementialManualClassAssemblyVo selectedRowValue = (DementialManualClassAssemblyVo) form.dyngrdPatients().getValue();

    //WDEV-16247
    Object hcp = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteUser=null;
    if (hcp != null)
        hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

    DementiaVo voDementia = (selectedRowValue!=null ? domain.getDementia(new DementiaRefVo(((DementialManualClassAssemblyVo) selectedRowValue).getDementiaId(),0)) : null);

    DementiaFindVo voStep1Find = (voDementia!=null?voDementia.getStepOneFind():null);
    DementiaAssessAndInvestigateVo voStep2AMTS = (voDementia!=null?voDementia.getStepTwoAssess():null);

    Integer hours = (voDementia!=null && voDementia.getAdmissionDateTime()!=null?calculateDateDiffInMinutes(voDementia.getAdmissionDateTime(),new DateTime())/60:null);

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dteFrom().setEnabled(enableControls);
    form.dteTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkExclude().setEnabled(enableControls);
    form.chkDelirum().setEnabled(enableControls);
    form.chkDementiaConfirmed().setEnabled(enableControls);
    form.chkInpatientOnly().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.hideAllDementiaWorklistMenuMenuItems();
    form.getContextMenus().Clinical.getDementiaWorklistMenuVIEWItem().setVisible(selectedRowValue != null && voDementia.getStepOneFindIsNotNull());
    //EDIT Context Menu 
    form.getContextMenus().Clinical.getDementiaWorklistMenuEDITItem().setVisible(hcpLiteUser!=null && selectedRowValue != null && (voStep1Find!=null || voStep2AMTS!=null)
                                &&((voStep1Find!=null  && voStep1Find.getAuthoringInformationIsNotNull() &&voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() &&  voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || (voStep2AMTS!=null && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)));   
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP1Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus()));
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP2Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
            && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus())));
    form.getContextMenus().Clinical.getDementiaWorklistMenuRECORD_FOLLOWUP_AMTSItem().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null && voDementia.getStepTwoAssessIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuEXCLUDE_FROM_DEMENTIA_SCREENINGItem().setVisible(selectedRowValue != null 
            && selectedRowValue.getIsExcludedFromWorklist()==null 
            && (hours!=null && hours>form.getGlobalContext().Admin.getDementiaConfiguration().getRemoveTimePeriod())
            && ! DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())
            && ! DementiaWorklistStatus.FOR_REFERRAL.equals(voDementia.getCurrentWorklistStatus().getStatus()) );
    form.getContextMenus().Clinical.getDementiaWorklistMenuCONFIRM_PATIENTItem().setVisible(selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
                    && DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())) 
                    && (Boolean.TRUE.equals(selectedRowValue.getDementiaConfirmed())) 
                    && voDementia.getConfirmedPatientPutOnDementiaPathway()==null);
    form.getContextMenus().Clinical.getDementiaWorklistMenuRIE_REMOVE_FROM_WORKLISTItem().setVisible(selectedRowValue != null 
            && engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA) );   
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP1Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP2Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull() && voDementia.getStepTwoAssessIsNotNull());


}
项目: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    文件:Logic.java   
private void initialiseFollowUp(FormMode mode, Boolean bNewRecord)
{
    form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().initialize(form.getLocalContext().getselectedDementia(), mode, bNewRecord ? new DementiaAssessAndInvestigateVo() : (form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() != null ? form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() : new DementiaAssessAndInvestigateVo()));
}
项目:openMAXIMS    文件:Logic.java   
private DementiaAssessAndInvestigateVo populateDataFromScreen(DementiaAssessAndInvestigateVo dementiaAssessAndInvestigateVo)
{
    dementiaAssessAndInvestigateVo.getAuthoringInformation().setAuthoringDateTime(form.dtimCorrected().getValue());

    return dementiaAssessAndInvestigateVo;
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    DementialManualClassAssemblyVo selectedRowValue = (DementialManualClassAssemblyVo) form.dyngrdPatients().getValue();

    //WDEV-16247
    Object hcp = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteUser=null;
    if (hcp != null)
        hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

    DementiaVo voDementia = (selectedRowValue!=null ? domain.getDementia(new DementiaRefVo(((DementialManualClassAssemblyVo) selectedRowValue).getDementiaId(),0)) : null);

    DementiaFindVo voStep1Find = (voDementia!=null?voDementia.getStepOneFind():null);
    DementiaAssessAndInvestigateVo voStep2AMTS = (voDementia!=null?voDementia.getStepTwoAssess():null);

    Integer hours = (voDementia!=null && voDementia.getAdmissionDateTime()!=null?calculateDateDiffInMinutes(voDementia.getAdmissionDateTime(),new DateTime())/60:null);

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dteFrom().setEnabled(enableControls);
    form.dteTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkExclude().setEnabled(enableControls);
    form.chkDelirum().setEnabled(enableControls);
    form.chkDementiaConfirmed().setEnabled(enableControls);
    form.chkInpatientOnly().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.hideAllDementiaWorklistMenuMenuItems();
    form.getContextMenus().Clinical.getDementiaWorklistMenuVIEWItem().setVisible(selectedRowValue != null && voDementia.getStepOneFindIsNotNull());
    //EDIT Context Menu 
    form.getContextMenus().Clinical.getDementiaWorklistMenuEDITItem().setVisible(hcpLiteUser!=null && selectedRowValue != null && (voStep1Find!=null || voStep2AMTS!=null)
                                &&((voStep1Find!=null  && voStep1Find.getAuthoringInformationIsNotNull() &&voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() &&  voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || (voStep2AMTS!=null && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)));   
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP1Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus()));
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP2Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
            && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus())));
    form.getContextMenus().Clinical.getDementiaWorklistMenuRECORD_FOLLOWUP_AMTSItem().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null && voDementia.getStepTwoAssessIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuEXCLUDE_FROM_DEMENTIA_SCREENINGItem().setVisible(selectedRowValue != null 
            && selectedRowValue.getIsExcludedFromWorklist()==null 
            && (hours!=null && hours>form.getGlobalContext().Admin.getDementiaConfiguration().getRemoveTimePeriod())
            && ! DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())
            && ! DementiaWorklistStatus.FOR_REFERRAL.equals(voDementia.getCurrentWorklistStatus().getStatus()) );
    form.getContextMenus().Clinical.getDementiaWorklistMenuCONFIRM_PATIENTItem().setVisible(selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
                    && DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())) 
                    && (Boolean.TRUE.equals(selectedRowValue.getDementiaConfirmed())) 
                    && voDementia.getConfirmedPatientPutOnDementiaPathway()==null);
    form.getContextMenus().Clinical.getDementiaWorklistMenuRIE_REMOVE_FROM_WORKLISTItem().setVisible(selectedRowValue != null 
            && engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA) );   
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP1Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP2Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull() && voDementia.getStepTwoAssessIsNotNull());


}
项目: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);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void initialiseFollowUp(FormMode mode, Boolean bNewRecord)
{
    form.lyrSteps().tabPageFollowUp().ccAMTSFollowUp().initialize(form.getLocalContext().getselectedDementia(), mode, bNewRecord ? new DementiaAssessAndInvestigateVo() : (form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() != null ? form.lyrSteps().tabPageFollowUp().recbrAMTS().getValue() : new DementiaAssessAndInvestigateVo()));
}
项目:openmaxims-linux    文件:Logic.java   
private DementiaAssessAndInvestigateVo populateDataFromScreen(DementiaAssessAndInvestigateVo dementiaAssessAndInvestigateVo)
{
    dementiaAssessAndInvestigateVo.getAuthoringInformation().setAuthoringDateTime(form.dtimCorrected().getValue());

    return dementiaAssessAndInvestigateVo;
}
项目:openmaxims-linux    文件:Logic.java   
private void updateControlsState()
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    DementialManualClassAssemblyVo selectedRowValue = (DementialManualClassAssemblyVo) form.dyngrdPatients().getValue();

    //WDEV-16247
    Object hcp = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteUser=null;
    if (hcp != null)
        hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

    DementiaVo voDementia = (selectedRowValue!=null ? domain.getDementia(new DementiaRefVo(((DementialManualClassAssemblyVo) selectedRowValue).getDementiaId(),0)) : null);

    DementiaFindVo voStep1Find = (voDementia!=null?voDementia.getStepOneFind():null);
    DementiaAssessAndInvestigateVo voStep2AMTS = (voDementia!=null?voDementia.getStepTwoAssess():null);

    Integer hours = (voDementia!=null && voDementia.getAdmissionDateTime()!=null?calculateDateDiffInMinutes(voDementia.getAdmissionDateTime(),new DateTime())/60:null);

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dteFrom().setEnabled(enableControls);
    form.dteTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkExclude().setEnabled(enableControls);
    form.chkDelirum().setEnabled(enableControls);
    form.chkDementiaConfirmed().setEnabled(enableControls);
    form.chkInpatientOnly().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.hideAllDementiaWorklistMenuMenuItems();
    form.getContextMenus().Clinical.getDementiaWorklistMenuVIEWItem().setVisible(selectedRowValue != null && voDementia.getStepOneFindIsNotNull());
    //EDIT Context Menu 
    form.getContextMenus().Clinical.getDementiaWorklistMenuEDITItem().setVisible(hcpLiteUser!=null && selectedRowValue != null && (voStep1Find!=null || voStep2AMTS!=null)
                                &&((voStep1Find!=null  && voStep1Find.getAuthoringInformationIsNotNull() &&voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() &&  voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || (voStep2AMTS!=null && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)));   
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP1Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus()));
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP2Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
            && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus())));
    form.getContextMenus().Clinical.getDementiaWorklistMenuRECORD_FOLLOWUP_AMTSItem().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null && voDementia.getStepTwoAssessIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuEXCLUDE_FROM_DEMENTIA_SCREENINGItem().setVisible(selectedRowValue != null 
            && selectedRowValue.getIsExcludedFromWorklist()==null 
            && (hours!=null && hours>form.getGlobalContext().Admin.getDementiaConfiguration().getRemoveTimePeriod())
            && ! DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())
            && ! DementiaWorklistStatus.FOR_REFERRAL.equals(voDementia.getCurrentWorklistStatus().getStatus()) );
    form.getContextMenus().Clinical.getDementiaWorklistMenuCONFIRM_PATIENTItem().setVisible(selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
                    && DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())) 
                    && (Boolean.TRUE.equals(selectedRowValue.getDementiaConfirmed())) 
                    && voDementia.getConfirmedPatientPutOnDementiaPathway()==null);
    form.getContextMenus().Clinical.getDementiaWorklistMenuRIE_REMOVE_FROM_WORKLISTItem().setVisible(selectedRowValue != null 
            && engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA) );   
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP1Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP2Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull() && voDementia.getStepTwoAssessIsNotNull());


}