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

项目:AvoinApotti    文件:Logic.java   
private void populateControls()
{
    PainAssessment painAssessmentVo = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
    if(painAssessmentVo == null)
        return;

    if(painAssessmentVo.getDateTimeInitiated() != null)
    {
        if(painAssessmentVo.getDateTimeInitiated().getDate() != null)
            form.dteRecording().setValue(painAssessmentVo.getDateTimeInitiated().getDate());

        if(painAssessmentVo.getDateTimeInitiated().getTime() != null)
            form.timRecording().setValue(painAssessmentVo.getDateTimeInitiated().getTime());
    }
    if(painAssessmentVo.getAssessmentDateTime() != null)
    {
        if(painAssessmentVo.getAssessmentDateTime().getDate() != null)
            form.dteAssessment().setValue(painAssessmentVo.getAssessmentDateTime().getDate());

        if(painAssessmentVo.getAssessmentDateTime().getTime() != null)
            form.timAssessment().setValue(painAssessmentVo.getAssessmentDateTime().getTime());
    }

    if(painAssessmentVo.getHcpInitiated() != null)
        form.txtBoxHCP().setValue(painAssessmentVo.getHcpInitiated().toString());
}
项目:openMAXIMS    文件:Logic.java   
private void populateControls()
{
    PainAssessment painAssessmentVo = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
    if(painAssessmentVo == null)
        return;

    if(painAssessmentVo.getDateTimeInitiated() != null)
    {
        if(painAssessmentVo.getDateTimeInitiated().getDate() != null)
            form.dteRecording().setValue(painAssessmentVo.getDateTimeInitiated().getDate());

        if(painAssessmentVo.getDateTimeInitiated().getTime() != null)
            form.timRecording().setValue(painAssessmentVo.getDateTimeInitiated().getTime());
    }
    if(painAssessmentVo.getAssessmentDateTime() != null)
    {
        if(painAssessmentVo.getAssessmentDateTime().getDate() != null)
            form.dteAssessment().setValue(painAssessmentVo.getAssessmentDateTime().getDate());

        if(painAssessmentVo.getAssessmentDateTime().getTime() != null)
            form.timAssessment().setValue(painAssessmentVo.getAssessmentDateTime().getTime());
    }

    if(painAssessmentVo.getHcpInitiated() != null)
        form.txtBoxHCP().setValue(painAssessmentVo.getHcpInitiated().toString());
}
项目:openMAXIMS    文件:Logic.java   
private void populateControls()
{
    PainAssessment painAssessmentVo = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
    if(painAssessmentVo == null)
        return;

    if(painAssessmentVo.getDateTimeInitiated() != null)
    {
        if(painAssessmentVo.getDateTimeInitiated().getDate() != null)
            form.dteRecording().setValue(painAssessmentVo.getDateTimeInitiated().getDate());

        if(painAssessmentVo.getDateTimeInitiated().getTime() != null)
            form.timRecording().setValue(painAssessmentVo.getDateTimeInitiated().getTime());
    }
    if(painAssessmentVo.getAssessmentDateTime() != null)
    {
        if(painAssessmentVo.getAssessmentDateTime().getDate() != null)
            form.dteAssessment().setValue(painAssessmentVo.getAssessmentDateTime().getDate());

        if(painAssessmentVo.getAssessmentDateTime().getTime() != null)
            form.timAssessment().setValue(painAssessmentVo.getAssessmentDateTime().getTime());
    }

    if(painAssessmentVo.getHcpInitiated() != null)
        form.txtBoxHCP().setValue(painAssessmentVo.getHcpInitiated().toString());
}
项目:openmaxims-linux    文件:Logic.java   
private void populateControls()
{
    PainAssessment painAssessmentVo = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
    if(painAssessmentVo == null)
        return;

    if(painAssessmentVo.getDateTimeInitiated() != null)
    {
        if(painAssessmentVo.getDateTimeInitiated().getDate() != null)
            form.dteRecording().setValue(painAssessmentVo.getDateTimeInitiated().getDate());

        if(painAssessmentVo.getDateTimeInitiated().getTime() != null)
            form.timRecording().setValue(painAssessmentVo.getDateTimeInitiated().getTime());
    }
    if(painAssessmentVo.getAssessmentDateTime() != null)
    {
        if(painAssessmentVo.getAssessmentDateTime().getDate() != null)
            form.dteAssessment().setValue(painAssessmentVo.getAssessmentDateTime().getDate());

        if(painAssessmentVo.getAssessmentDateTime().getTime() != null)
            form.timAssessment().setValue(painAssessmentVo.getAssessmentDateTime().getTime());
    }

    if(painAssessmentVo.getHcpInitiated() != null)
        form.txtBoxHCP().setValue(painAssessmentVo.getHcpInitiated().toString());
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    DateTime now = new DateTime(new Date(), new Time());

    if ((form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVOIsNotNull()) && form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO().getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext()))
    {

        PainAssessment lastPainAssessment = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();

        if(lastPainAssessment.getDateTimeInitiatedIsNotNull() 
        && lastPainAssessment.getDateTimeInitiated().getDate().equals(now.getDate()) 
        && lastPainAssessment.getDateTimeInitiated().getTime().equals(now.getTime())) 
        {
            engine.showMessage("An assessment already exists for " + now);
            return;
        }
        else
            populateScreen();
    }
    else if (form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVOIsNotNull())
    {
        form.getGlobalContext().Core.setYesNoDialogMessage("Do you wish to copy this assessment?");
        engine.open(form.getForms().Core.YesNoDialog,false);
    }
    else
    {
        populateScreen();
    }

    form.setMode(FormMode.EDIT);
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreen()
{
    DateTime now = new DateTime(new Date(), new Time());

    //Prepopulate Controls----------------------------------------------------
    if(domain.getMosUser() != null)
        form.txtBoxHCP().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString());

    form.dteAssessment().setValue(new Date());
    form.timAssessment().setValue(new Time());
    form.dteRecording().setValue(new Date());
    form.timRecording().setValue(new Time());
    //-------------------------------------------------------------------------

    //Save previous PainAssessment
    form.getLocalContext().setPreviousPainAssessment(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());

    PainAssessment painAssessmentVO = new PainAssessment();
    painAssessmentVO.setAssessmentDateTime(now);
    painAssessmentVO.setDateTimeInitiated(now);

    Object hcpLite = domain.getHcpLiteUser();
    painAssessmentVO.setHcpInitiated(hcpLite != null ? ((HcpLiteVo)hcpLite) : null);

    painAssessmentVO.setSiteDetails(new PainAssessmentFindingsCollection());

    DrawingImageVersionVo versionNoVo = new DrawingImageVersionVo();
    versionNoVo.setImageName(getCurrentImageName());
    if(getCurrentVersionNumber() != null)
        versionNoVo.setVersionNumber(getCurrentVersionNumber());
    painAssessmentVO.setImageVersion(versionNoVo);
    //Copy the previous Active(Not Discontinued) Findings
    copyPreviousFindings(painAssessmentVO);

    //Add a new VO
    form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssessmentVO);

}
项目:AvoinApotti    文件:Logic.java   
private boolean activeFindings(PainAssessment painAssVO)
{
    if(painAssVO != null && painAssVO.getSiteDetails() != null)
    {
        for(int i=0; i<painAssVO.getSiteDetails().size(); i++)
            if(painAssVO.getSiteDetails().get(i).getIsDiscontinuedAssess() != null && 
               painAssVO.getSiteDetails().get(i).getIsDiscontinuedAssess().booleanValue())
                continue;
            else
                return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    DateTime now = new DateTime(new Date(), new Time());

    if ((form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVOIsNotNull()) && form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO().getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext()))
    {

        PainAssessment lastPainAssessment = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();

        if(lastPainAssessment.getDateTimeInitiatedIsNotNull() 
        && lastPainAssessment.getDateTimeInitiated().getDate().equals(now.getDate()) 
        && lastPainAssessment.getDateTimeInitiated().getTime().equals(now.getTime())) 
        {
            engine.showMessage("An assessment already exists for " + now);
            return;
        }
        else
            populateScreen();
    }
    else if (form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVOIsNotNull())
    {
        form.getGlobalContext().Core.setYesNoDialogMessage("Do you wish to copy this assessment?");
        engine.open(form.getForms().Core.YesNoDialog,false);
    }
    else
    {
        populateScreen();
    }

    form.setMode(FormMode.EDIT);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreen()
{
    DateTime now = new DateTime(new Date(), new Time());

    //Prepopulate Controls----------------------------------------------------
    if(domain.getMosUser() != null)
        form.txtBoxHCP().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString());

    form.dteAssessment().setValue(new Date());
    form.timAssessment().setValue(new Time());
    form.dteRecording().setValue(new Date());
    form.timRecording().setValue(new Time());
    //-------------------------------------------------------------------------

    //Save previous PainAssessment
    form.getLocalContext().setPreviousPainAssessment(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());

    PainAssessment painAssessmentVO = new PainAssessment();
    painAssessmentVO.setAssessmentDateTime(now);
    painAssessmentVO.setDateTimeInitiated(now);

    Object hcpLite = domain.getHcpLiteUser();
    painAssessmentVO.setHcpInitiated(hcpLite != null ? ((HcpLiteVo)hcpLite) : null);

    painAssessmentVO.setSiteDetails(new PainAssessmentFindingsCollection());

    DrawingImageVersionVo versionNoVo = new DrawingImageVersionVo();
    versionNoVo.setImageName(getCurrentImageName());
    if(getCurrentVersionNumber() != null)
        versionNoVo.setVersionNumber(getCurrentVersionNumber());
    painAssessmentVO.setImageVersion(versionNoVo);
    //Copy the previous Active(Not Discontinued) Findings
    copyPreviousFindings(painAssessmentVO);

    //Add a new VO
    form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssessmentVO);

}
项目:openMAXIMS    文件:Logic.java   
private boolean activeFindings(PainAssessment painAssVO)
{
    if(painAssVO != null && painAssVO.getSiteDetails() != null)
    {
        for(int i=0; i<painAssVO.getSiteDetails().size(); i++)
            if(painAssVO.getSiteDetails().get(i).getIsDiscontinuedAssess() != null && 
               painAssVO.getSiteDetails().get(i).getIsDiscontinuedAssess().booleanValue())
                continue;
            else
                return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    DateTime now = new DateTime(new Date(), new Time());

    if ((form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVOIsNotNull()) && form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO().getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext()))
    {

        PainAssessment lastPainAssessment = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();

        if(lastPainAssessment.getDateTimeInitiatedIsNotNull() 
        && lastPainAssessment.getDateTimeInitiated().getDate().equals(now.getDate()) 
        && lastPainAssessment.getDateTimeInitiated().getTime().equals(now.getTime())) 
        {
            engine.showMessage("An assessment already exists for " + now);
            return;
        }
        else
            populateScreen();
    }
    else if (form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVOIsNotNull())
    {
        form.getGlobalContext().Core.setYesNoDialogMessage("Do you wish to copy this assessment?");
        engine.open(form.getForms().Core.YesNoDialog,false);
    }
    else
    {
        populateScreen();
    }

    form.setMode(FormMode.EDIT);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreen()
{
    DateTime now = new DateTime(new Date(), new Time());

    //Prepopulate Controls----------------------------------------------------
    if(domain.getMosUser() != null)
        form.txtBoxHCP().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString());

    form.dteAssessment().setValue(new Date());
    form.timAssessment().setValue(new Time());
    form.dteRecording().setValue(new Date());
    form.timRecording().setValue(new Time());
    //-------------------------------------------------------------------------

    //Save previous PainAssessment
    form.getLocalContext().setPreviousPainAssessment(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());

    PainAssessment painAssessmentVO = new PainAssessment();
    painAssessmentVO.setAssessmentDateTime(now);
    painAssessmentVO.setDateTimeInitiated(now);

    Object hcpLite = domain.getHcpLiteUser();
    painAssessmentVO.setHcpInitiated(hcpLite != null ? ((HcpLiteVo)hcpLite) : null);

    painAssessmentVO.setSiteDetails(new PainAssessmentFindingsCollection());

    DrawingImageVersionVo versionNoVo = new DrawingImageVersionVo();
    versionNoVo.setImageName(getCurrentImageName());
    if(getCurrentVersionNumber() != null)
        versionNoVo.setVersionNumber(getCurrentVersionNumber());
    painAssessmentVO.setImageVersion(versionNoVo);
    //Copy the previous Active(Not Discontinued) Findings
    copyPreviousFindings(painAssessmentVO);

    //Add a new VO
    form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssessmentVO);

}
项目:openMAXIMS    文件:Logic.java   
private boolean activeFindings(PainAssessment painAssVO)
{
    if(painAssVO != null && painAssVO.getSiteDetails() != null)
    {
        for(int i=0; i<painAssVO.getSiteDetails().size(); i++)
            if(painAssVO.getSiteDetails().get(i).getIsDiscontinuedAssess() != null && 
               painAssVO.getSiteDetails().get(i).getIsDiscontinuedAssess().booleanValue())
                continue;
            else
                return true;
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    DateTime now = new DateTime(new Date(), new Time());

    if ((form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVOIsNotNull()) && form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO().getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext()))
    {

        PainAssessment lastPainAssessment = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();

        if(lastPainAssessment.getDateTimeInitiatedIsNotNull() 
        && lastPainAssessment.getDateTimeInitiated().getDate().equals(now.getDate()) 
        && lastPainAssessment.getDateTimeInitiated().getTime().equals(now.getTime())) 
        {
            engine.showMessage("An assessment already exists for " + now);
            return;
        }
        else
            populateScreen();
    }
    else if (form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVOIsNotNull())
    {
        form.getGlobalContext().Core.setYesNoDialogMessage("Do you wish to copy this assessment?");
        engine.open(form.getForms().Core.YesNoDialog,false);
    }
    else
    {
        populateScreen();
    }

    form.setMode(FormMode.EDIT);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreen()
{
    DateTime now = new DateTime(new Date(), new Time());

    //Prepopulate Controls----------------------------------------------------
    if(domain.getMosUser() != null)
        form.txtBoxHCP().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString());

    form.dteAssessment().setValue(new Date());
    form.timAssessment().setValue(new Time());
    form.dteRecording().setValue(new Date());
    form.timRecording().setValue(new Time());
    //-------------------------------------------------------------------------

    //Save previous PainAssessment
    form.getLocalContext().setPreviousPainAssessment(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());

    PainAssessment painAssessmentVO = new PainAssessment();
    painAssessmentVO.setAssessmentDateTime(now);
    painAssessmentVO.setDateTimeInitiated(now);

    Object hcpLite = domain.getHcpLiteUser();
    painAssessmentVO.setHcpInitiated(hcpLite != null ? ((HcpLiteVo)hcpLite) : null);

    painAssessmentVO.setSiteDetails(new PainAssessmentFindingsCollection());

    DrawingImageVersionVo versionNoVo = new DrawingImageVersionVo();
    versionNoVo.setImageName(getCurrentImageName());
    if(getCurrentVersionNumber() != null)
        versionNoVo.setVersionNumber(getCurrentVersionNumber());
    painAssessmentVO.setImageVersion(versionNoVo);
    //Copy the previous Active(Not Discontinued) Findings
    copyPreviousFindings(painAssessmentVO);

    //Add a new VO
    form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssessmentVO);

}
项目:openmaxims-linux    文件:Logic.java   
private boolean activeFindings(PainAssessment painAssVO)
{
    if(painAssVO != null && painAssVO.getSiteDetails() != null)
    {
        for(int i=0; i<painAssVO.getSiteDetails().size(); i++)
            if(painAssVO.getSiteDetails().get(i).getIsDiscontinuedAssess() != null && 
               painAssVO.getSiteDetails().get(i).getIsDiscontinuedAssess().booleanValue())
                continue;
            else
                return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean getPainDetails(PainAssessmentFindings painDetailsVO, PainAssessmentReview painReviewDetailsVO)
{
    if(painDetailsVO == null)
        return false;
    if(painReviewDetailsVO == null)
    {
        if(!checkAssessmentDate())
            return false;

        PainAssessment painAssVO = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
        if(painAssVO != null)
            painAssVO.setAssessmentDateTime(new DateTime(form.dteAssessmentDate().getValue(), form.timAssessmentTime().getValue()));
        form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssVO);

        painDetailsVO.setSiteDetails(form.txtBoxSiteDetails().getValue());
        painDetailsVO.setType(form.cmbType().getValue());
        painDetailsVO.setSeverity(form.getLocalContext().getSeverity());
        painDetailsVO.setOnset(form.cmbOnset().getValue());
        painDetailsVO.setProgression(form.cmbProgression().getValue());
        painDetailsVO.setDepth(form.cmbDepth().getValue());
        painDetailsVO.setIsDiscontinuedAssess(new Boolean(form.chkDiscontinueAssessment().getValue()));

        //Set the Findings value back to the context
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(painDetailsVO);
    }
    else
    {
        if(!checkAssessmentDate())
            return false;
        painReviewDetailsVO.setRecordingDateTime(new DateTime(form.dteRecordingDate().getValue(), form.timRecordingTime().getValue()));
        painReviewDetailsVO.setAssessmentDateTime(new DateTime(form.dteAssessmentDate().getValue(), form.timAssessmentTime().getValue()));

        painReviewDetailsVO.setSiteDetails(form.txtBoxSiteDetails().getValue());
        painReviewDetailsVO.setType(form.cmbType().getValue());
        painReviewDetailsVO.setSeverity(form.getLocalContext().getSeverity());
        painReviewDetailsVO.setOnset(form.cmbOnset().getValue());
        painReviewDetailsVO.setProgression(form.cmbProgression().getValue());
        painReviewDetailsVO.setDepth(form.cmbDepth().getValue());

        MemberOfStaffShortVo memStaffShortVo = (MemberOfStaffShortVo)domain.getMosUser();
        if(memStaffShortVo != null && memStaffShortVo.getHcp() != null)
            painReviewDetailsVO.setRecordingHCP(memStaffShortVo.getHcp());

        painDetailsVO.setIsDiscontinuedAssess(new Boolean(form.chkDiscontinueAssessment().getValue()));

        //Set the Findings value back to the context
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(painDetailsVO);
        //Set the Review value back to the context
        form.getGlobalContext().COE.PainBodyChart.setPainAssReviewVO(painReviewDetailsVO);
    }
    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void copyLastAssessment()
{
    PainAssessment voPainAssessment = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
    PainAssessment newPainAssessment = new PainAssessment();


    if (newPainAssessment.getClinicalContact() == null)
        newPainAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    if (newPainAssessment.getCareContext() == null)
        newPainAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (voPainAssessment.getSiteDetailsIsNotNull())
    {
        PainAssessmentFindingsCollection voCollFindings = new PainAssessmentFindingsCollection();

        for (int i = 0; i < voPainAssessment.getSiteDetails().size(); i++)
        {
            if (voPainAssessment.getSiteDetails().get(i).getIsDiscontinuedAssessIsNotNull() && !voPainAssessment.getSiteDetails().get(i).getIsDiscontinuedAssess().booleanValue())
            {                   
                PainAssessmentFindings voFinding = voPainAssessment.getSiteDetails().get(i);

                //force copy of finding
                voFinding.setID_PainAssessmentFindings(null);

                if (voFinding.getPainAssessmentReviewIsNotNull())
                {
                    //force copy of reviews
                    for(int j = 0; j < voFinding.getPainAssessmentReview().size(); j++)
                        voFinding.getPainAssessmentReview().get(j).setID_PainAssessmentReview(null);
                }           

                voCollFindings.add(voFinding);
            }
        }

        newPainAssessment.setSiteDetails(voCollFindings);
    }
    else
        newPainAssessment.setSiteDetails(null);

    form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(newPainAssessment);
}
项目:AvoinApotti    文件:Logic.java   
private boolean populateInstance(CareContextShortVo voContext,boolean bListRecords)
{
    clearScreen();

    if (voContext != null)
    {   

        PainAssessmentCollection assmtCollection;
        PainAssessment painAss;


        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);

        //List the assessment if they were not listed before.
        if(bListRecords || form.getLocalContext().getPainAssessments() == null)
        { 
            assmtCollection = domain.listPain(voContext);
            assmtCollection.sort(SortOrder.DESCENDING);
            form.getLocalContext().setPainAssessments(assmtCollection);
        }
        else
        {
            //Get the assessment from the context
            assmtCollection = form.getLocalContext().getPainAssessments();
        }

        if(assmtCollection != null)
        {
            for(int i=0; i<assmtCollection.size(); i++)
            {
                painAss = assmtCollection.get(i); 
                //Assessment Date/Time
                if(painAss.getDateTimeInitiated() != null && painAss.getDateTimeInitiated().getDate() != null && painAss.getDateTimeInitiated().getTime() != null)
                    form.cmbAssessment().newRow(painAss, painAss.getDateTimeInitiated().getDate().toString(DateFormat.STANDARD) + " / " + painAss.getDateTimeInitiated().getTime().toString(TimeFormat.DEFAULT));
            }
        }
        //Set the current value in the combo
        if(form.cmbAssessment().getValues() != null && form.cmbAssessment().getValues().size() > 0)
        {
            //Set the context value or the first
            if(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO() != null)
                form.cmbAssessment().setValue(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());
            else
                form.cmbAssessment().setValue((PainAssessment)form.cmbAssessment().getValues().get(0));

            if(form.cmbAssessment().getValue() != null)
                refreshSite();
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean getPainDetails(PainAssessmentFindings painDetailsVO, PainAssessmentReview painReviewDetailsVO)
{
    if(painDetailsVO == null)
        return false;
    if(painReviewDetailsVO == null)
    {
        if(!checkAssessmentDate())
            return false;

        PainAssessment painAssVO = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
        if(painAssVO != null)
            painAssVO.setAssessmentDateTime(new DateTime(form.dteAssessmentDate().getValue(), form.timAssessmentTime().getValue()));
        form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssVO);

        painDetailsVO.setSiteDetails(form.txtBoxSiteDetails().getValue());
        painDetailsVO.setType(form.cmbType().getValue());
        painDetailsVO.setSeverity(form.getLocalContext().getSeverity());
        painDetailsVO.setOnset(form.cmbOnset().getValue());
        painDetailsVO.setProgression(form.cmbProgression().getValue());
        painDetailsVO.setDepth(form.cmbDepth().getValue());
        painDetailsVO.setIsDiscontinuedAssess(new Boolean(form.chkDiscontinueAssessment().getValue()));

        //Set the Findings value back to the context
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(painDetailsVO);
    }
    else
    {
        if(!checkAssessmentDate())
            return false;
        painReviewDetailsVO.setRecordingDateTime(new DateTime(form.dteRecordingDate().getValue(), form.timRecordingTime().getValue()));
        painReviewDetailsVO.setAssessmentDateTime(new DateTime(form.dteAssessmentDate().getValue(), form.timAssessmentTime().getValue()));

        painReviewDetailsVO.setSiteDetails(form.txtBoxSiteDetails().getValue());
        painReviewDetailsVO.setType(form.cmbType().getValue());
        painReviewDetailsVO.setSeverity(form.getLocalContext().getSeverity());
        painReviewDetailsVO.setOnset(form.cmbOnset().getValue());
        painReviewDetailsVO.setProgression(form.cmbProgression().getValue());
        painReviewDetailsVO.setDepth(form.cmbDepth().getValue());

        MemberOfStaffShortVo memStaffShortVo = (MemberOfStaffShortVo)domain.getMosUser();
        if(memStaffShortVo != null && memStaffShortVo.getHcp() != null)
            painReviewDetailsVO.setRecordingHCP(memStaffShortVo.getHcp());

        painDetailsVO.setIsDiscontinuedAssess(new Boolean(form.chkDiscontinueAssessment().getValue()));

        //Set the Findings value back to the context
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(painDetailsVO);
        //Set the Review value back to the context
        form.getGlobalContext().COE.PainBodyChart.setPainAssReviewVO(painReviewDetailsVO);
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void copyLastAssessment()
{
    PainAssessment voPainAssessment = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
    PainAssessment newPainAssessment = new PainAssessment();


    if (newPainAssessment.getClinicalContact() == null)
        newPainAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    if (newPainAssessment.getCareContext() == null)
        newPainAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (voPainAssessment.getSiteDetailsIsNotNull())
    {
        PainAssessmentFindingsCollection voCollFindings = new PainAssessmentFindingsCollection();

        for (int i = 0; i < voPainAssessment.getSiteDetails().size(); i++)
        {
            if (voPainAssessment.getSiteDetails().get(i).getIsDiscontinuedAssessIsNotNull() && !voPainAssessment.getSiteDetails().get(i).getIsDiscontinuedAssess().booleanValue())
            {                   
                PainAssessmentFindings voFinding = voPainAssessment.getSiteDetails().get(i);

                //force copy of finding
                voFinding.setID_PainAssessmentFindings(null);

                if (voFinding.getPainAssessmentReviewIsNotNull())
                {
                    //force copy of reviews
                    for(int j = 0; j < voFinding.getPainAssessmentReview().size(); j++)
                        voFinding.getPainAssessmentReview().get(j).setID_PainAssessmentReview(null);
                }           

                voCollFindings.add(voFinding);
            }
        }

        newPainAssessment.setSiteDetails(voCollFindings);
    }
    else
        newPainAssessment.setSiteDetails(null);

    form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(newPainAssessment);
}
项目:openMAXIMS    文件:Logic.java   
private boolean populateInstance(CareContextShortVo voContext,boolean bListRecords)
{
    clearScreen();

    if (voContext != null)
    {   

        PainAssessmentCollection assmtCollection;
        PainAssessment painAss;


        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);

        //List the assessment if they were not listed before.
        if(bListRecords || form.getLocalContext().getPainAssessments() == null)
        { 
            assmtCollection = domain.listPain(voContext);
            assmtCollection.sort(SortOrder.DESCENDING);
            form.getLocalContext().setPainAssessments(assmtCollection);
        }
        else
        {
            //Get the assessment from the context
            assmtCollection = form.getLocalContext().getPainAssessments();
        }

        if(assmtCollection != null)
        {
            for(int i=0; i<assmtCollection.size(); i++)
            {
                painAss = assmtCollection.get(i); 
                //Assessment Date/Time
                if(painAss.getDateTimeInitiated() != null && painAss.getDateTimeInitiated().getDate() != null && painAss.getDateTimeInitiated().getTime() != null)
                    form.cmbAssessment().newRow(painAss, painAss.getDateTimeInitiated().getDate().toString(DateFormat.STANDARD) + " / " + painAss.getDateTimeInitiated().getTime().toString(TimeFormat.DEFAULT));
            }
        }
        //Set the current value in the combo
        if(form.cmbAssessment().getValues() != null && form.cmbAssessment().getValues().size() > 0)
        {
            //Set the context value or the first
            if(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO() != null)
                form.cmbAssessment().setValue(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());
            else
                form.cmbAssessment().setValue((PainAssessment)form.cmbAssessment().getValues().get(0));

            if(form.cmbAssessment().getValue() != null)
                refreshSite();
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean getPainDetails(PainAssessmentFindings painDetailsVO, PainAssessmentReview painReviewDetailsVO)
{
    if(painDetailsVO == null)
        return false;
    if(painReviewDetailsVO == null)
    {
        if(!checkAssessmentDate())
            return false;

        PainAssessment painAssVO = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
        if(painAssVO != null)
            painAssVO.setAssessmentDateTime(new DateTime(form.dteAssessmentDate().getValue(), form.timAssessmentTime().getValue()));
        form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssVO);

        painDetailsVO.setSiteDetails(form.txtBoxSiteDetails().getValue());
        painDetailsVO.setType(form.cmbType().getValue());
        painDetailsVO.setSeverity(form.getLocalContext().getSeverity());
        painDetailsVO.setOnset(form.cmbOnset().getValue());
        painDetailsVO.setProgression(form.cmbProgression().getValue());
        painDetailsVO.setDepth(form.cmbDepth().getValue());
        painDetailsVO.setIsDiscontinuedAssess(new Boolean(form.chkDiscontinueAssessment().getValue()));

        //Set the Findings value back to the context
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(painDetailsVO);
    }
    else
    {
        if(!checkAssessmentDate())
            return false;
        painReviewDetailsVO.setRecordingDateTime(new DateTime(form.dteRecordingDate().getValue(), form.timRecordingTime().getValue()));
        painReviewDetailsVO.setAssessmentDateTime(new DateTime(form.dteAssessmentDate().getValue(), form.timAssessmentTime().getValue()));

        painReviewDetailsVO.setSiteDetails(form.txtBoxSiteDetails().getValue());
        painReviewDetailsVO.setType(form.cmbType().getValue());
        painReviewDetailsVO.setSeverity(form.getLocalContext().getSeverity());
        painReviewDetailsVO.setOnset(form.cmbOnset().getValue());
        painReviewDetailsVO.setProgression(form.cmbProgression().getValue());
        painReviewDetailsVO.setDepth(form.cmbDepth().getValue());

        MemberOfStaffShortVo memStaffShortVo = (MemberOfStaffShortVo)domain.getMosUser();
        if(memStaffShortVo != null && memStaffShortVo.getHcp() != null)
            painReviewDetailsVO.setRecordingHCP(memStaffShortVo.getHcp());

        painDetailsVO.setIsDiscontinuedAssess(new Boolean(form.chkDiscontinueAssessment().getValue()));

        //Set the Findings value back to the context
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(painDetailsVO);
        //Set the Review value back to the context
        form.getGlobalContext().COE.PainBodyChart.setPainAssReviewVO(painReviewDetailsVO);
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void copyLastAssessment()
{
    PainAssessment voPainAssessment = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
    PainAssessment newPainAssessment = new PainAssessment();


    if (newPainAssessment.getClinicalContact() == null)
        newPainAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    if (newPainAssessment.getCareContext() == null)
        newPainAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (voPainAssessment.getSiteDetailsIsNotNull())
    {
        PainAssessmentFindingsCollection voCollFindings = new PainAssessmentFindingsCollection();

        for (int i = 0; i < voPainAssessment.getSiteDetails().size(); i++)
        {
            if (voPainAssessment.getSiteDetails().get(i).getIsDiscontinuedAssessIsNotNull() && !voPainAssessment.getSiteDetails().get(i).getIsDiscontinuedAssess().booleanValue())
            {                   
                PainAssessmentFindings voFinding = voPainAssessment.getSiteDetails().get(i);

                //force copy of finding
                voFinding.setID_PainAssessmentFindings(null);

                if (voFinding.getPainAssessmentReviewIsNotNull())
                {
                    //force copy of reviews
                    for(int j = 0; j < voFinding.getPainAssessmentReview().size(); j++)
                        voFinding.getPainAssessmentReview().get(j).setID_PainAssessmentReview(null);
                }           

                voCollFindings.add(voFinding);
            }
        }

        newPainAssessment.setSiteDetails(voCollFindings);
    }
    else
        newPainAssessment.setSiteDetails(null);

    form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(newPainAssessment);
}
项目:openMAXIMS    文件:Logic.java   
private boolean populateInstance(CareContextShortVo voContext,boolean bListRecords)
{
    clearScreen();

    if (voContext != null)
    {   

        PainAssessmentCollection assmtCollection;
        PainAssessment painAss;


        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);

        //List the assessment if they were not listed before.
        if(bListRecords || form.getLocalContext().getPainAssessments() == null)
        { 
            assmtCollection = domain.listPain(voContext);
            assmtCollection.sort(SortOrder.DESCENDING);
            form.getLocalContext().setPainAssessments(assmtCollection);
        }
        else
        {
            //Get the assessment from the context
            assmtCollection = form.getLocalContext().getPainAssessments();
        }

        if(assmtCollection != null)
        {
            for(int i=0; i<assmtCollection.size(); i++)
            {
                painAss = assmtCollection.get(i); 
                //Assessment Date/Time
                if(painAss.getDateTimeInitiated() != null && painAss.getDateTimeInitiated().getDate() != null && painAss.getDateTimeInitiated().getTime() != null)
                    form.cmbAssessment().newRow(painAss, painAss.getDateTimeInitiated().getDate().toString(DateFormat.STANDARD) + " / " + painAss.getDateTimeInitiated().getTime().toString(TimeFormat.DEFAULT));
            }
        }
        //Set the current value in the combo
        if(form.cmbAssessment().getValues() != null && form.cmbAssessment().getValues().size() > 0)
        {
            //Set the context value or the first
            if(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO() != null)
                form.cmbAssessment().setValue(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());
            else
                form.cmbAssessment().setValue((PainAssessment)form.cmbAssessment().getValues().get(0));

            if(form.cmbAssessment().getValue() != null)
                refreshSite();
        }
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean getPainDetails(PainAssessmentFindings painDetailsVO, PainAssessmentReview painReviewDetailsVO)
{
    if(painDetailsVO == null)
        return false;
    if(painReviewDetailsVO == null)
    {
        if(!checkAssessmentDate())
            return false;

        PainAssessment painAssVO = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
        if(painAssVO != null)
            painAssVO.setAssessmentDateTime(new DateTime(form.dteAssessmentDate().getValue(), form.timAssessmentTime().getValue()));
        form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssVO);

        painDetailsVO.setSiteDetails(form.txtBoxSiteDetails().getValue());
        painDetailsVO.setType(form.cmbType().getValue());
        painDetailsVO.setSeverity(form.getLocalContext().getSeverity());
        painDetailsVO.setOnset(form.cmbOnset().getValue());
        painDetailsVO.setProgression(form.cmbProgression().getValue());
        painDetailsVO.setDepth(form.cmbDepth().getValue());
        painDetailsVO.setIsDiscontinuedAssess(new Boolean(form.chkDiscontinueAssessment().getValue()));

        //Set the Findings value back to the context
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(painDetailsVO);
    }
    else
    {
        if(!checkAssessmentDate())
            return false;
        painReviewDetailsVO.setRecordingDateTime(new DateTime(form.dteRecordingDate().getValue(), form.timRecordingTime().getValue()));
        painReviewDetailsVO.setAssessmentDateTime(new DateTime(form.dteAssessmentDate().getValue(), form.timAssessmentTime().getValue()));

        painReviewDetailsVO.setSiteDetails(form.txtBoxSiteDetails().getValue());
        painReviewDetailsVO.setType(form.cmbType().getValue());
        painReviewDetailsVO.setSeverity(form.getLocalContext().getSeverity());
        painReviewDetailsVO.setOnset(form.cmbOnset().getValue());
        painReviewDetailsVO.setProgression(form.cmbProgression().getValue());
        painReviewDetailsVO.setDepth(form.cmbDepth().getValue());

        MemberOfStaffShortVo memStaffShortVo = (MemberOfStaffShortVo)domain.getMosUser();
        if(memStaffShortVo != null && memStaffShortVo.getHcp() != null)
            painReviewDetailsVO.setRecordingHCP(memStaffShortVo.getHcp());

        painDetailsVO.setIsDiscontinuedAssess(new Boolean(form.chkDiscontinueAssessment().getValue()));

        //Set the Findings value back to the context
        form.getGlobalContext().COE.PainBodyChart.setAssessmentFinding(painDetailsVO);
        //Set the Review value back to the context
        form.getGlobalContext().COE.PainBodyChart.setPainAssReviewVO(painReviewDetailsVO);
    }
    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private void copyLastAssessment()
{
    PainAssessment voPainAssessment = form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO();
    PainAssessment newPainAssessment = new PainAssessment();


    if (newPainAssessment.getClinicalContact() == null)
        newPainAssessment.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    if (newPainAssessment.getCareContext() == null)
        newPainAssessment.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (voPainAssessment.getSiteDetailsIsNotNull())
    {
        PainAssessmentFindingsCollection voCollFindings = new PainAssessmentFindingsCollection();

        for (int i = 0; i < voPainAssessment.getSiteDetails().size(); i++)
        {
            if (voPainAssessment.getSiteDetails().get(i).getIsDiscontinuedAssessIsNotNull() && !voPainAssessment.getSiteDetails().get(i).getIsDiscontinuedAssess().booleanValue())
            {                   
                PainAssessmentFindings voFinding = voPainAssessment.getSiteDetails().get(i);

                //force copy of finding
                voFinding.setID_PainAssessmentFindings(null);

                if (voFinding.getPainAssessmentReviewIsNotNull())
                {
                    //force copy of reviews
                    for(int j = 0; j < voFinding.getPainAssessmentReview().size(); j++)
                        voFinding.getPainAssessmentReview().get(j).setID_PainAssessmentReview(null);
                }           

                voCollFindings.add(voFinding);
            }
        }

        newPainAssessment.setSiteDetails(voCollFindings);
    }
    else
        newPainAssessment.setSiteDetails(null);

    form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(newPainAssessment);
}
项目:openmaxims-linux    文件:Logic.java   
private boolean populateInstance(CareContextShortVo voContext,boolean bListRecords)
{
    clearScreen();

    if (voContext != null)
    {   

        PainAssessmentCollection assmtCollection;
        PainAssessment painAss;


        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);

        //List the assessment if they were not listed before.
        if(bListRecords || form.getLocalContext().getPainAssessments() == null)
        { 
            assmtCollection = domain.listPain(voContext);
            assmtCollection.sort(SortOrder.DESCENDING);
            form.getLocalContext().setPainAssessments(assmtCollection);
        }
        else
        {
            //Get the assessment from the context
            assmtCollection = form.getLocalContext().getPainAssessments();
        }

        if(assmtCollection != null)
        {
            for(int i=0; i<assmtCollection.size(); i++)
            {
                painAss = assmtCollection.get(i); 
                //Assessment Date/Time
                if(painAss.getDateTimeInitiated() != null && painAss.getDateTimeInitiated().getDate() != null && painAss.getDateTimeInitiated().getTime() != null)
                    form.cmbAssessment().newRow(painAss, painAss.getDateTimeInitiated().getDate().toString(DateFormat.STANDARD) + " / " + painAss.getDateTimeInitiated().getTime().toString(TimeFormat.DEFAULT));
            }
        }
        //Set the current value in the combo
        if(form.cmbAssessment().getValues() != null && form.cmbAssessment().getValues().size() > 0)
        {
            //Set the context value or the first
            if(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO() != null)
                form.cmbAssessment().setValue(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());
            else
                form.cmbAssessment().setValue((PainAssessment)form.cmbAssessment().getValues().get(0));

            if(form.cmbAssessment().getValue() != null)
                refreshSite();
        }
    }

    return true;
}