Java 类ims.clinical.vo.lookups.CorrespondenceStatus 实例源码

项目:AvoinApotti    文件:Logic.java   
private String[] getUiErrors() 
{
    ArrayList<String> errors = new ArrayList<String>();


    if(form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {
            if (form.lyrDetails().tabRecipents().qmbVerifyingHCP().getValue() == null)
                errors.add("Verifying HCP is mandatory");
            if (form.lyrDetails().tabRecipents().dtimVerifying().getValue() == null)
                errors.add("Verifying Date/Time is mandatory");
        }   
    }
    //wdev-12317
    if(form.lyrDetails().tabSummaryIP().intIPReviewIn().getValue() != null && form.lyrDetails().tabSummaryIP().intIPReviewIn().getValue() != 0)
        if(form.lyrDetails().tabSummaryIP().cmbIPReviewIn().getValue() == null)
            errors.add("Review in period is mandatory.");
    //--------------
    if (errors.size() > 0) 
    {
        String[] searchErrors = new String[errors.size()];
        errors.toArray(searchErrors);
        engine.showErrors("Invalid Discharge Document record", searchErrors);
        return searchErrors;
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private String[] getUiErrors() 
{
    ArrayList<String> errors = new ArrayList<String>();


    if(form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {
            if (form.lyrDetails().tabRecipents().qmbVerifyingHCP().getValue() == null)
                errors.add("Verifying HCP is mandatory");
            if (form.lyrDetails().tabRecipents().dtimVerifying().getValue() == null)
                errors.add("Verifying Date/Time is mandatory");
        }   
    }
    //wdev-12317
    if(form.lyrDetails().tabSummaryIP().intIPReviewIn().getValue() != null && form.lyrDetails().tabSummaryIP().intIPReviewIn().getValue() != 0)
        if(form.lyrDetails().tabSummaryIP().cmbIPReviewIn().getValue() == null)
            errors.add("Review in period is mandatory.");
    //--------------
    if (errors.size() > 0) 
    {
        String[] searchErrors = new String[errors.size()];
        errors.toArray(searchErrors);
        engine.showErrors("Invalid Discharge Document record", searchErrors);
        return searchErrors;
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private String[] getUiErrors() 
{
    ArrayList<String> errors = new ArrayList<String>();


    if(form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {
            if (form.lyrDetails().tabRecipents().qmbVerifyingHCP().getValue() == null)
                errors.add("Verifying HCP is mandatory");
            if (form.lyrDetails().tabRecipents().dtimVerifying().getValue() == null)
                errors.add("Verifying Date/Time is mandatory");
        }   
    }
    //wdev-12317
    if(form.lyrDetails().tabSummaryIP().intIPReviewIn().getValue() != null && form.lyrDetails().tabSummaryIP().intIPReviewIn().getValue() != 0)
        if(form.lyrDetails().tabSummaryIP().cmbIPReviewIn().getValue() == null)
            errors.add("Review in period is mandatory.");
    //--------------
    if (errors.size() > 0) 
    {
        String[] searchErrors = new String[errors.size()];
        errors.toArray(searchErrors);
        engine.showErrors("Invalid Discharge Document record", searchErrors);
        return searchErrors;
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private String[] getUiErrors() 
{
    ArrayList<String> errors = new ArrayList<String>();


    if(form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {
            if (form.lyrDetails().tabRecipents().qmbVerifyingHCP().getValue() == null)
                errors.add("Verifying HCP is mandatory");
            if (form.lyrDetails().tabRecipents().dtimVerifying().getValue() == null)
                errors.add("Verifying Date/Time is mandatory");
        }   
    }
    //wdev-12317
    if(form.lyrDetails().tabSummaryIP().intIPReviewIn().getValue() != null && form.lyrDetails().tabSummaryIP().intIPReviewIn().getValue() != 0)
        if(form.lyrDetails().tabSummaryIP().cmbIPReviewIn().getValue() == null)
            errors.add("Review in period is mandatory.");
    //--------------
    if (errors.size() > 0) 
    {
        String[] searchErrors = new String[errors.size()];
        errors.toArray(searchErrors);
        engine.showErrors("Invalid Discharge Document record", searchErrors);
        return searchErrors;
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private boolean verifyStatusHistory()
{
    if (form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {

            ClinicalCorrespondenceVo voClinicalCorrespondence = null;

            CareContextShortVo careContext = form.getGlobalContext().Core.getCurrentCareContext();

            if(ContextType.OUTPATIENT.equals(careContext.getContext()))
            {
                voClinicalCorrespondence = domain.getLastClinicalCorrespondence
                    (form.getGlobalContext().Core.getCurrentCareContext(), 
                        ClinicalCorrespondenceType.MEDICALOUTPATIENTLETTER, 
                            form.getGlobalContext().Core.getCurrentClinicalContact());
            }
            else
            {
                voClinicalCorrespondence = domain.getLastClinicalCorrespondence
                    (form.getGlobalContext().Core.getCurrentCareContext(), 
                        ClinicalCorrespondenceType.MEDICALINPATIENTDISCHARGE, 
                            form.getGlobalContext().Core.getCurrentClinicalContact());
            }

            if (voClinicalCorrespondence != null &&
                    voClinicalCorrespondence.getStatusHistoryIsNotNull())
            {
                for (int i = 0; i < voClinicalCorrespondence.getStatusHistory().size(); i++)
                {
                    if (voClinicalCorrespondence.getStatusHistory().get(i).getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                    {
                        if (voClinicalCorrespondence.getVerifyingHCPIsNotNull() &&
                                voClinicalCorrespondence.getVerifyingDateTimeIsNotNull())
                        {
                            form.lyrDetails().tabRecipents().qmbVerifyingHCP().newRow(voClinicalCorrespondence.getVerifyingHCP(), voClinicalCorrespondence.getVerifyingHCP().toString());
                            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(voClinicalCorrespondence.getVerifyingHCP());
                            form.lyrDetails().tabRecipents().dtimVerifying().setValue(voClinicalCorrespondence.getVerifyingDateTime());
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormModeChanged()
{
    boolean viewMode = form.getMode().equals(FormMode.VIEW);
    form.btnClose().setVisible(viewMode && engine.isDialog());  

    if(!viewMode)
    {
        boolean dataSaved = isNewData();
        ClinicalCorrespondenceVo voClinicalCorrespondence = form.getLocalContext().getSelectedItem();

        if(dataSaved)
        {
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledAuthoringHCP(Boolean.TRUE);
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledDateTime(Boolean.TRUE);
        }
        else
        {
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledAuthoringHCP(Boolean.FALSE);
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledDateTime(Boolean.FALSE);
        }

        if(voClinicalCorrespondence != null)
        {
            //wdev-1800
            boolean bFound = true;
            if (voClinicalCorrespondence.getCurrentStatusIsNotNull() && voClinicalCorrespondence.getCurrentStatus().getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                bFound = false;

            if (voClinicalCorrespondence.getStatusHistoryIsNotNull() && voClinicalCorrespondence.getStatusHistory().size() > 0)
            {
                for (int i = 0 ; i < voClinicalCorrespondence.getStatusHistory().size() ; i ++)
                {
                    if (voClinicalCorrespondence.getStatusHistory().get(i).getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                    {
                        bFound = false;

                        break;
                    }
                }
            }
            enableVerified(bFound);
        }
        else
            enableVerified(true);
    }

    //WDEV-1039 - 4) Disable the preview until the ClinicalCorrespondenceBo has been saved and in Edit Mode   
    form.lyrDetails().tabPreview().setHeaderEnabled(viewMode && !isNewData());
}
项目:AvoinApotti    文件:Logic.java   
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
    if (form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {
            if (verifyStatusHistory())
            {
                disableEnableAllControls(true);
                form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
                form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
                return;
            }

            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(true);
            form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(true);
            //WDEV-2407
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(true);
            form.lyrDetails().tabRecipents().dtimVerifying().setRequired(true);
            //WDEV-2536 
            initializeVerifying();
        }
        else
        {
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(null);
            form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
            form.lyrDetails().tabRecipents().dtimVerifying().setValue(null);
            //WDEV-2407
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(false);
            form.lyrDetails().tabRecipents().dtimVerifying().setRequired(false);
        }
    }
    else
    {
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(null);
        form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
        form.lyrDetails().tabRecipents().dtimVerifying().setValue(null);
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(false);
        form.lyrDetails().tabRecipents().dtimVerifying().setRequired(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean verifyStatusHistory()
{
    if (form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {

            ClinicalCorrespondenceVo voClinicalCorrespondence = null;

            CareContextShortVo careContext = form.getGlobalContext().Core.getCurrentCareContext();

            if(ContextType.OUTPATIENT.equals(careContext.getContext()))
            {
                voClinicalCorrespondence = domain.getLastClinicalCorrespondence
                    (form.getGlobalContext().Core.getCurrentCareContext(), 
                        ClinicalCorrespondenceType.MEDICALOUTPATIENTLETTER, 
                            form.getGlobalContext().Core.getCurrentClinicalContact());
            }
            else
            {
                voClinicalCorrespondence = domain.getLastClinicalCorrespondence
                    (form.getGlobalContext().Core.getCurrentCareContext(), 
                        ClinicalCorrespondenceType.MEDICALINPATIENTDISCHARGE, 
                            form.getGlobalContext().Core.getCurrentClinicalContact());
            }

            if (voClinicalCorrespondence != null &&
                    voClinicalCorrespondence.getStatusHistoryIsNotNull())
            {
                for (int i = 0; i < voClinicalCorrespondence.getStatusHistory().size(); i++)
                {
                    if (voClinicalCorrespondence.getStatusHistory().get(i).getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                    {
                        if (voClinicalCorrespondence.getVerifyingHCPIsNotNull() &&
                                voClinicalCorrespondence.getVerifyingDateTimeIsNotNull())
                        {
                            form.lyrDetails().tabRecipents().qmbVerifyingHCP().newRow(voClinicalCorrespondence.getVerifyingHCP(), voClinicalCorrespondence.getVerifyingHCP().toString());
                            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(voClinicalCorrespondence.getVerifyingHCP());
                            form.lyrDetails().tabRecipents().dtimVerifying().setValue(voClinicalCorrespondence.getVerifyingDateTime());
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormModeChanged()
{
    boolean viewMode = form.getMode().equals(FormMode.VIEW);
    form.btnClose().setVisible(viewMode && engine.isDialog());  

    if(!viewMode)
    {
        boolean dataSaved = isNewData();
        ClinicalCorrespondenceVo voClinicalCorrespondence = form.getLocalContext().getSelectedItem();

        if(dataSaved)
        {
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledAuthoringHCP(Boolean.TRUE);
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledDateTime(Boolean.TRUE);
        }
        else
        {
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledAuthoringHCP(Boolean.FALSE);
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledDateTime(Boolean.FALSE);
        }

        if(voClinicalCorrespondence != null)
        {
            //wdev-1800
            boolean bFound = true;
            if (voClinicalCorrespondence.getCurrentStatusIsNotNull() && voClinicalCorrespondence.getCurrentStatus().getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                bFound = false;

            if (voClinicalCorrespondence.getStatusHistoryIsNotNull() && voClinicalCorrespondence.getStatusHistory().size() > 0)
            {
                for (int i = 0 ; i < voClinicalCorrespondence.getStatusHistory().size() ; i ++)
                {
                    if (voClinicalCorrespondence.getStatusHistory().get(i).getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                    {
                        bFound = false;

                        break;
                    }
                }
            }
            enableVerified(bFound);
        }
        else
            enableVerified(true);
    }

    //WDEV-1039 - 4) Disable the preview until the ClinicalCorrespondenceBo has been saved and in Edit Mode   
    form.lyrDetails().tabPreview().setHeaderEnabled(viewMode && !isNewData());
}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
    if (form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {
            if (verifyStatusHistory())
            {
                disableEnableAllControls(true);
                form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
                form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
                return;
            }

            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(true);
            form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(true);
            //WDEV-2407
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(true);
            form.lyrDetails().tabRecipents().dtimVerifying().setRequired(true);
            //WDEV-2536 
            initializeVerifying();
        }
        else
        {
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(null);
            form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
            form.lyrDetails().tabRecipents().dtimVerifying().setValue(null);
            //WDEV-2407
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(false);
            form.lyrDetails().tabRecipents().dtimVerifying().setRequired(false);
        }
    }
    else
    {
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(null);
        form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
        form.lyrDetails().tabRecipents().dtimVerifying().setValue(null);
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(false);
        form.lyrDetails().tabRecipents().dtimVerifying().setRequired(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean verifyStatusHistory()
{
    if (form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {

            ClinicalCorrespondenceVo voClinicalCorrespondence = null;

            CareContextShortVo careContext = form.getGlobalContext().Core.getCurrentCareContext();

            if(ContextType.OUTPATIENT.equals(careContext.getContext()))
            {
                voClinicalCorrespondence = domain.getLastClinicalCorrespondence
                    (form.getGlobalContext().Core.getCurrentCareContext(), 
                        ClinicalCorrespondenceType.MEDICALOUTPATIENTLETTER, 
                            form.getGlobalContext().Core.getCurrentClinicalContact());
            }
            else
            {
                voClinicalCorrespondence = domain.getLastClinicalCorrespondence
                    (form.getGlobalContext().Core.getCurrentCareContext(), 
                        ClinicalCorrespondenceType.MEDICALINPATIENTDISCHARGE, 
                            form.getGlobalContext().Core.getCurrentClinicalContact());
            }

            if (voClinicalCorrespondence != null &&
                    voClinicalCorrespondence.getStatusHistoryIsNotNull())
            {
                for (int i = 0; i < voClinicalCorrespondence.getStatusHistory().size(); i++)
                {
                    if (voClinicalCorrespondence.getStatusHistory().get(i).getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                    {
                        if (voClinicalCorrespondence.getVerifyingHCPIsNotNull() &&
                                voClinicalCorrespondence.getVerifyingDateTimeIsNotNull())
                        {
                            form.lyrDetails().tabRecipents().qmbVerifyingHCP().newRow(voClinicalCorrespondence.getVerifyingHCP(), voClinicalCorrespondence.getVerifyingHCP().toString());
                            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(voClinicalCorrespondence.getVerifyingHCP());
                            form.lyrDetails().tabRecipents().dtimVerifying().setValue(voClinicalCorrespondence.getVerifyingDateTime());
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormModeChanged()
{
    boolean viewMode = form.getMode().equals(FormMode.VIEW);
    form.btnClose().setVisible(viewMode && engine.isDialog());  

    if(!viewMode)
    {
        boolean dataSaved = isNewData();
        ClinicalCorrespondenceVo voClinicalCorrespondence = form.getLocalContext().getSelectedItem();

        if(dataSaved)
        {
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledAuthoringHCP(Boolean.TRUE);
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledDateTime(Boolean.TRUE);
        }
        else
        {
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledAuthoringHCP(Boolean.FALSE);
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledDateTime(Boolean.FALSE);
        }

        if(voClinicalCorrespondence != null)
        {
            //wdev-1800
            boolean bFound = true;
            if (voClinicalCorrespondence.getCurrentStatusIsNotNull() && voClinicalCorrespondence.getCurrentStatus().getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                bFound = false;

            if (voClinicalCorrespondence.getStatusHistoryIsNotNull() && voClinicalCorrespondence.getStatusHistory().size() > 0)
            {
                for (int i = 0 ; i < voClinicalCorrespondence.getStatusHistory().size() ; i ++)
                {
                    if (voClinicalCorrespondence.getStatusHistory().get(i).getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                    {
                        bFound = false;

                        break;
                    }
                }
            }
            enableVerified(bFound);
        }
        else
            enableVerified(true);
    }

    //WDEV-1039 - 4) Disable the preview until the ClinicalCorrespondenceBo has been saved and in Edit Mode   
    form.lyrDetails().tabPreview().setHeaderEnabled(viewMode && !isNewData());
}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
    if (form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {
            if (verifyStatusHistory())
            {
                disableEnableAllControls(true);
                form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
                form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
                return;
            }

            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(true);
            form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(true);
            //WDEV-2407
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(true);
            form.lyrDetails().tabRecipents().dtimVerifying().setRequired(true);
            //WDEV-2536 
            initializeVerifying();
        }
        else
        {
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(null);
            form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
            form.lyrDetails().tabRecipents().dtimVerifying().setValue(null);
            //WDEV-2407
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(false);
            form.lyrDetails().tabRecipents().dtimVerifying().setRequired(false);
        }
    }
    else
    {
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(null);
        form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
        form.lyrDetails().tabRecipents().dtimVerifying().setValue(null);
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(false);
        form.lyrDetails().tabRecipents().dtimVerifying().setRequired(false);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean verifyStatusHistory()
{
    if (form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {

            ClinicalCorrespondenceVo voClinicalCorrespondence = null;

            CareContextShortVo careContext = form.getGlobalContext().Core.getCurrentCareContext();

            if(ContextType.OUTPATIENT.equals(careContext.getContext()))
            {
                voClinicalCorrespondence = domain.getLastClinicalCorrespondence
                    (form.getGlobalContext().Core.getCurrentCareContext(), 
                        ClinicalCorrespondenceType.MEDICALOUTPATIENTLETTER, 
                            form.getGlobalContext().Core.getCurrentClinicalContact());
            }
            else
            {
                voClinicalCorrespondence = domain.getLastClinicalCorrespondence
                    (form.getGlobalContext().Core.getCurrentCareContext(), 
                        ClinicalCorrespondenceType.MEDICALINPATIENTDISCHARGE, 
                            form.getGlobalContext().Core.getCurrentClinicalContact());
            }

            if (voClinicalCorrespondence != null &&
                    voClinicalCorrespondence.getStatusHistoryIsNotNull())
            {
                for (int i = 0; i < voClinicalCorrespondence.getStatusHistory().size(); i++)
                {
                    if (voClinicalCorrespondence.getStatusHistory().get(i).getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                    {
                        if (voClinicalCorrespondence.getVerifyingHCPIsNotNull() &&
                                voClinicalCorrespondence.getVerifyingDateTimeIsNotNull())
                        {
                            form.lyrDetails().tabRecipents().qmbVerifyingHCP().newRow(voClinicalCorrespondence.getVerifyingHCP(), voClinicalCorrespondence.getVerifyingHCP().toString());
                            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(voClinicalCorrespondence.getVerifyingHCP());
                            form.lyrDetails().tabRecipents().dtimVerifying().setValue(voClinicalCorrespondence.getVerifyingDateTime());
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormModeChanged()
{
    boolean viewMode = form.getMode().equals(FormMode.VIEW);
    form.btnClose().setVisible(viewMode && engine.isDialog());  

    if(!viewMode)
    {
        boolean dataSaved = isNewData();
        ClinicalCorrespondenceVo voClinicalCorrespondence = form.getLocalContext().getSelectedItem();

        if(dataSaved)
        {
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledAuthoringHCP(Boolean.TRUE);
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledDateTime(Boolean.TRUE);
        }
        else
        {
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledAuthoringHCP(Boolean.FALSE);
            form.lyrDetails().tabRecipents().customControlAuthoringInfo().setEnabledDateTime(Boolean.FALSE);
        }

        if(voClinicalCorrespondence != null)
        {
            //wdev-1800
            boolean bFound = true;
            if (voClinicalCorrespondence.getCurrentStatusIsNotNull() && voClinicalCorrespondence.getCurrentStatus().getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                bFound = false;

            if (voClinicalCorrespondence.getStatusHistoryIsNotNull() && voClinicalCorrespondence.getStatusHistory().size() > 0)
            {
                for (int i = 0 ; i < voClinicalCorrespondence.getStatusHistory().size() ; i ++)
                {
                    if (voClinicalCorrespondence.getStatusHistory().get(i).getCorrespondenceStatus().equals(CorrespondenceStatus.VERIFIED))
                    {
                        bFound = false;

                        break;
                    }
                }
            }
            enableVerified(bFound);
        }
        else
            enableVerified(true);
    }

    //WDEV-1039 - 4) Disable the preview until the ClinicalCorrespondenceBo has been saved and in Edit Mode   
    form.lyrDetails().tabPreview().setHeaderEnabled(viewMode && !isNewData());
}
项目:openmaxims-linux    文件:Logic.java   
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
    if (form.lyrDetails().tabRecipents().cmbStatus().getValue() != null)
    {
        if (form.lyrDetails().tabRecipents().cmbStatus().getValue().equals(CorrespondenceStatus.VERIFIED))
        {
            if (verifyStatusHistory())
            {
                disableEnableAllControls(true);
                form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
                form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
                return;
            }

            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(true);
            form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(true);
            //WDEV-2407
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(true);
            form.lyrDetails().tabRecipents().dtimVerifying().setRequired(true);
            //WDEV-2536 
            initializeVerifying();
        }
        else
        {
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(null);
            form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
            form.lyrDetails().tabRecipents().dtimVerifying().setValue(null);
            //WDEV-2407
            form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(false);
            form.lyrDetails().tabRecipents().dtimVerifying().setRequired(false);
        }
    }
    else
    {
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setEnabled(false);
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setValue(null);
        form.lyrDetails().tabRecipents().dtimVerifying().setEnabled(false);
        form.lyrDetails().tabRecipents().dtimVerifying().setValue(null);
        form.lyrDetails().tabRecipents().qmbVerifyingHCP().setRequired(false);
        form.lyrDetails().tabRecipents().dtimVerifying().setRequired(false);
    }
}