Java 类ims.nursing.vo.PainAssessmentReviewCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
protected void onCmbSiteValueChanged() throws PresentationLogicException 
{
    clearGrids();
    form.getLocalContext().setCurrentVOIndex(new Integer(0));
    if(form.cmbSite().getValue() != null)
    {
        //Build the Review List
        PainAssessmentReviewCollection painAssColl = new PainAssessmentReviewCollection();
        //Copy the data from PainAssVO to a ReviewVO and copy at the ebginning of 
        //the list to be displayed e.g. reverse chronological order  
        //painAssColl.add(getHeaderVO());
        if(form.cmbSite().getValue().getPainAssessmentReview() != null)
        {
            //form.cmbSite().getValue().getPainAssessmentReview().sort(SortOrder.DESCENDING);
            for(int i=0; i<form.cmbSite().getValue().getPainAssessmentReview().size(); i++)
                painAssColl.add(form.cmbSite().getValue().getPainAssessmentReview().get(i));
        }
        painAssColl.sort(SortOrder.ASCENDING);
        form.getLocalContext().setReviewCollection(painAssColl);
        //Set the findingVO to be used in Review Dialog
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(form.cmbSite().getValue());

        //------------------------------------------------------
        //set the current index to be the one that's displaying the last records first
        int recIndex = 0;
        if(painAssColl.size()%maxcolumns == 0)
            recIndex = (painAssColl.size()/maxcolumns)*maxcolumns - maxcolumns;
        else
            recIndex = (painAssColl.size()/maxcolumns)*maxcolumns;

        recIndex = recIndex<0?0:recIndex;
        form.getLocalContext().setCurrentVOIndex(new Integer(recIndex));
        //--------------------------------------------------------

        populateReviewDetails();

        form.btnNext().setEnabled(false);
        if(painAssColl.size() > maxcolumns)
            form.btnPrevious().setEnabled(true);
        else
            form.btnPrevious().setEnabled(false);

        //Check if it's the first record
        if(form.getLocalContext().getPainAssessments().get(0).equals(form.cmbAssessment().getValue())) 
        {
            //Check if discontinued
            if(form.cmbSite().getValue().getIsDiscontinuedAssess() != null && 
               form.cmbSite().getValue().getIsDiscontinuedAssess().booleanValue())
                form.btnNew().setEnabled(false);
            else
                form.btnNew().setEnabled(true);

        }
        else
            form.btnNew().setEnabled(false);
    }
    else
    {
        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);
    }

}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbSiteValueChanged() throws PresentationLogicException 
{
    clearGrids();
    form.getLocalContext().setCurrentVOIndex(new Integer(0));
    if(form.cmbSite().getValue() != null)
    {
        //Build the Review List
        PainAssessmentReviewCollection painAssColl = new PainAssessmentReviewCollection();
        //Copy the data from PainAssVO to a ReviewVO and copy at the ebginning of 
        //the list to be displayed e.g. reverse chronological order  
        //painAssColl.add(getHeaderVO());
        if(form.cmbSite().getValue().getPainAssessmentReview() != null)
        {
            //form.cmbSite().getValue().getPainAssessmentReview().sort(SortOrder.DESCENDING);
            for(int i=0; i<form.cmbSite().getValue().getPainAssessmentReview().size(); i++)
                painAssColl.add(form.cmbSite().getValue().getPainAssessmentReview().get(i));
        }
        painAssColl.sort(SortOrder.ASCENDING);
        form.getLocalContext().setReviewCollection(painAssColl);
        //Set the findingVO to be used in Review Dialog
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(form.cmbSite().getValue());

        //------------------------------------------------------
        //set the current index to be the one that's displaying the last records first
        int recIndex = 0;
        if(painAssColl.size()%maxcolumns == 0)
            recIndex = (painAssColl.size()/maxcolumns)*maxcolumns - maxcolumns;
        else
            recIndex = (painAssColl.size()/maxcolumns)*maxcolumns;

        recIndex = recIndex<0?0:recIndex;
        form.getLocalContext().setCurrentVOIndex(new Integer(recIndex));
        //--------------------------------------------------------

        populateReviewDetails();

        form.btnNext().setEnabled(false);
        if(painAssColl.size() > maxcolumns)
            form.btnPrevious().setEnabled(true);
        else
            form.btnPrevious().setEnabled(false);

        //Check if it's the first record
        if(form.getLocalContext().getPainAssessments().get(0).equals(form.cmbAssessment().getValue())) 
        {
            //Check if discontinued
            if(form.cmbSite().getValue().getIsDiscontinuedAssess() != null && 
               form.cmbSite().getValue().getIsDiscontinuedAssess().booleanValue())
                form.btnNew().setEnabled(false);
            else
                form.btnNew().setEnabled(true);

        }
        else
            form.btnNew().setEnabled(false);
    }
    else
    {
        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false); 
    }
    form.getGlobalContext().Nursing.setPainReviewSearchCriteria(getSearchCriteria()); // WDEV-19389 
}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbSiteValueChanged() throws PresentationLogicException 
{
    clearGrids();
    form.getLocalContext().setCurrentVOIndex(new Integer(0));
    if(form.cmbSite().getValue() != null)
    {
        //Build the Review List
        PainAssessmentReviewCollection painAssColl = new PainAssessmentReviewCollection();
        //Copy the data from PainAssVO to a ReviewVO and copy at the ebginning of 
        //the list to be displayed e.g. reverse chronological order  
        //painAssColl.add(getHeaderVO());
        if(form.cmbSite().getValue().getPainAssessmentReview() != null)
        {
            //form.cmbSite().getValue().getPainAssessmentReview().sort(SortOrder.DESCENDING);
            for(int i=0; i<form.cmbSite().getValue().getPainAssessmentReview().size(); i++)
                painAssColl.add(form.cmbSite().getValue().getPainAssessmentReview().get(i));
        }
        painAssColl.sort(SortOrder.ASCENDING);
        form.getLocalContext().setReviewCollection(painAssColl);
        //Set the findingVO to be used in Review Dialog
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(form.cmbSite().getValue());

        //------------------------------------------------------
        //set the current index to be the one that's displaying the last records first
        int recIndex = 0;
        if(painAssColl.size()%maxcolumns == 0)
            recIndex = (painAssColl.size()/maxcolumns)*maxcolumns - maxcolumns;
        else
            recIndex = (painAssColl.size()/maxcolumns)*maxcolumns;

        recIndex = recIndex<0?0:recIndex;
        form.getLocalContext().setCurrentVOIndex(new Integer(recIndex));
        //--------------------------------------------------------

        populateReviewDetails();

        form.btnNext().setEnabled(false);
        if(painAssColl.size() > maxcolumns)
            form.btnPrevious().setEnabled(true);
        else
            form.btnPrevious().setEnabled(false);

        //Check if it's the first record
        if(form.getLocalContext().getPainAssessments().get(0).equals(form.cmbAssessment().getValue())) 
        {
            //Check if discontinued
            if(form.cmbSite().getValue().getIsDiscontinuedAssess() != null && 
               form.cmbSite().getValue().getIsDiscontinuedAssess().booleanValue())
                form.btnNew().setEnabled(false);
            else
                form.btnNew().setEnabled(true);

        }
        else
            form.btnNew().setEnabled(false);
    }
    else
    {
        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);
    }

}
项目:openmaxims-linux    文件:Logic.java   
protected void onCmbSiteValueChanged() throws PresentationLogicException 
{
    clearGrids();
    form.getLocalContext().setCurrentVOIndex(new Integer(0));
    if(form.cmbSite().getValue() != null)
    {
        //Build the Review List
        PainAssessmentReviewCollection painAssColl = new PainAssessmentReviewCollection();
        //Copy the data from PainAssVO to a ReviewVO and copy at the ebginning of 
        //the list to be displayed e.g. reverse chronological order  
        //painAssColl.add(getHeaderVO());
        if(form.cmbSite().getValue().getPainAssessmentReview() != null)
        {
            //form.cmbSite().getValue().getPainAssessmentReview().sort(SortOrder.DESCENDING);
            for(int i=0; i<form.cmbSite().getValue().getPainAssessmentReview().size(); i++)
                painAssColl.add(form.cmbSite().getValue().getPainAssessmentReview().get(i));
        }
        painAssColl.sort(SortOrder.ASCENDING);
        form.getLocalContext().setReviewCollection(painAssColl);
        //Set the findingVO to be used in Review Dialog
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(form.cmbSite().getValue());

        //------------------------------------------------------
        //set the current index to be the one that's displaying the last records first
        int recIndex = 0;
        if(painAssColl.size()%maxcolumns == 0)
            recIndex = (painAssColl.size()/maxcolumns)*maxcolumns - maxcolumns;
        else
            recIndex = (painAssColl.size()/maxcolumns)*maxcolumns;

        recIndex = recIndex<0?0:recIndex;
        form.getLocalContext().setCurrentVOIndex(new Integer(recIndex));
        //--------------------------------------------------------

        populateReviewDetails();

        form.btnNext().setEnabled(false);
        if(painAssColl.size() > maxcolumns)
            form.btnPrevious().setEnabled(true);
        else
            form.btnPrevious().setEnabled(false);

        //Check if it's the first record
        if(form.getLocalContext().getPainAssessments().get(0).equals(form.cmbAssessment().getValue())) 
        {
            //Check if discontinued
            if(form.cmbSite().getValue().getIsDiscontinuedAssess() != null && 
               form.cmbSite().getValue().getIsDiscontinuedAssess().booleanValue())
                form.btnNew().setEnabled(false);
            else
                form.btnNew().setEnabled(true);

        }
        else
            form.btnNew().setEnabled(false);
    }
    else
    {
        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);
    }

}