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

项目:AvoinApotti    文件:Logic.java   
private SkinAssessmentFindingsCollection copySkinAssessmentFindings(SkinAssessmentFindingsCollection skinAssessmentFindings)
{
    if (skinAssessmentFindings == null)
        return null;

    for (int i = 0; i < skinAssessmentFindings.size(); i++)
    {
        SkinAssessmentFindings skinAssessmentFinding = skinAssessmentFindings.get(i);
        if (skinAssessmentFinding == null)
            continue;
        skinAssessmentFinding.clearIDAndVersion();
        skinAssessmentFinding.setSkinAssessmentReview(copySkinAssessmentReview(skinAssessmentFinding.getSkinAssessmentReview()));
    }
    return skinAssessmentFindings;
}
项目:AvoinApotti    文件:Logic.java   
protected void onDrawingBodyChartRemoved(int index) throws PresentationLogicException 
{
    SkinAssessment skinAssVO = form.getGlobalContext().COE.SkinBodyChart.getSkinAssessmentVO();
    SkinAssessmentFindings findingVO;
    if(skinAssVO != null)
    {
        for(int i=0; i<skinAssVO.getSkinAssessmentFindings().size(); i++)
        {
            findingVO = skinAssVO.getSkinAssessmentFindings().get(i);
            if(findingVO.getID_SkinAssessmentFindingsIsNotNull() && findingVO.getID_SkinAssessmentFindings().intValue() == index)
            {
                if(recordSaved(findingVO.getID_SkinAssessmentFindings()))
                {
                    displayError("Previous saved Findings cannot be updated");
                    //Redraw the shape
                    DrawingControlShape shape = new DrawingControlShape(findingVO.getID_SkinAssessmentFindings().intValue(), savedTargetID, findingVO.getSiteImage(), findingVO.getWoundType().getId(), true);
                    form.drawingBodyChart().addShape(shape);
                    return;
                }
                else
                {
                    skinAssVO.getSkinAssessmentFindings().remove(i);
                    form.getGlobalContext().COE.SkinBodyChart.setSkinAssessmentVO(skinAssVO);
                    return;
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private SkinAssessmentReview getReviewRecord(SkinAssessmentFindings findingVo)
{
    if(findingVo.getSkinAssessmentReviewIsNotNull())
    {
        for(int i=0; i<findingVo.getSkinAssessmentReview().size(); i++)
        {
            if(findingVo.getSkinAssessmentReview().get(i).getID_SkinAssessmentReviewIsNotNull() && 
               findingVo.getSkinAssessmentReview().get(i).getID_SkinAssessmentReview().intValue() == findingVo.getID_SkinAssessmentFindings().intValue())
                return findingVo.getSkinAssessmentReview().get(i); 
        }
    }
    return new SkinAssessmentReview();
}
项目:AvoinApotti    文件:Logic.java   
private boolean reviewEdited(SkinAssessmentFindings findingVo)
{
    if(findingVo.getSkinAssessmentReviewIsNotNull())
    {
        //Only when having one review - (e.g. when the review was created from the finding)
        if(findingVo.getSkinAssessmentReview().size() == 1 && findingVo.getSkinAssessmentReview().get(0).getID_SkinAssessmentReviewIsNotNull() &&
           findingVo.getSkinAssessmentReview().get(0).getID_SkinAssessmentReview().intValue() == findingVo.getID_SkinAssessmentFindings().intValue())
                return true; 
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void addFindingToAssessment(SkinAssessment assessmentVO, SkinAssessmentFindings findingVO)
{
    for(int i=0; i<assessmentVO.getSkinAssessmentFindings().size(); i++)
    {
        if(assessmentVO.getSkinAssessmentFindings().get(i).equals(findingVO))
        {
            assessmentVO.getSkinAssessmentFindings().remove(i);
            assessmentVO.getSkinAssessmentFindings().add(findingVO);
            break;
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onComboBoxAssessmentValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    form.comboBoxSite().clear();
    form.bNew().setEnabled(false);
    form.btnPrint().setEnabled(false);
    if(form.comboBoxAssessment().getValue() != null)
    {
        form.getLocalContext().setSkinAssessment(form.comboBoxAssessment().getValue());
        SkinAssessmentFindings findingVO;
        if( form.comboBoxAssessment().getValue().getIsSkinIntact() != null && 
            form.comboBoxAssessment().getValue().getIsSkinIntact().booleanValue() && 
            form.comboBoxAssessment().getValue().getSkinAssessmentFindings().size() == 0)
        {
            form.comboBoxSite().newRow(null, "'Skin Intact' checked. No findings entered.");
        }

        for(int i=0; i<form.comboBoxAssessment().getValue().getSkinAssessmentFindings().size(); i++)
        {
            findingVO = form.comboBoxAssessment().getValue().getSkinAssessmentFindings().get(i);
            //Skip the discontinued one
            if(form.GroupActive().getValue().equals(GenForm.GroupActiveEnumeration.rdoActive) && 
               findingVO.getIsDiscontinuedAssess() != null && 
               findingVO.getIsDiscontinuedAssess().booleanValue())
               continue;
            form.comboBoxSite().newRow(findingVO, findingVO.getWoundType().getText() + " - " + findingVO.getSiteName() + 
                                                  (findingVO.getIsContinuedAssessment() != null && findingVO.getIsContinuedAssessment().booleanValue()?"  (" + PainStatus.CONTINUED.toString()   +")":"")+
                                                  (findingVO.getIsDiscontinuedAssess()  != null && findingVO.getIsDiscontinuedAssess().booleanValue()? "  (" + PainStatus.DISCONTINUED.toString()+")":""));
        }
        form.getGlobalContext().COE.SkinBodyChart.setSelectedSkinAssessment(form.comboBoxAssessment().getValue());

        onComboBoxSiteValueChanged();
    }
    else
        form.getLocalContext().setSkinAssessment(null);

    form.bNew().setEnabled(false);
    form.btnNext().setEnabled(false);
    form.btnPrevious().setEnabled(false);
}
项目:openMAXIMS    文件:Logic.java   
private SkinAssessmentFindingsCollection copySkinAssessmentFindings(SkinAssessmentFindingsCollection skinAssessmentFindings)
{
    if (skinAssessmentFindings == null)
        return null;

    for (int i = 0; i < skinAssessmentFindings.size(); i++)
    {
        SkinAssessmentFindings skinAssessmentFinding = skinAssessmentFindings.get(i);
        if (skinAssessmentFinding == null)
            continue;
        skinAssessmentFinding.clearIDAndVersion();
        skinAssessmentFinding.setSkinAssessmentReview(copySkinAssessmentReview(skinAssessmentFinding.getSkinAssessmentReview()));
    }
    return skinAssessmentFindings;
}
项目:openMAXIMS    文件:Logic.java   
protected void onDrawingBodyChartRemoved(int index) throws PresentationLogicException 
{
    SkinAssessment skinAssVO = form.getGlobalContext().COE.SkinBodyChart.getSkinAssessmentVO();
    SkinAssessmentFindings findingVO;
    if(skinAssVO != null)
    {
        for(int i=0; i<skinAssVO.getSkinAssessmentFindings().size(); i++)
        {
            findingVO = skinAssVO.getSkinAssessmentFindings().get(i);
            if(findingVO.getID_SkinAssessmentFindingsIsNotNull() && findingVO.getID_SkinAssessmentFindings().intValue() == index)
            {
                if(recordSaved(findingVO.getID_SkinAssessmentFindings()))
                {
                    displayError("Previous saved Findings cannot be updated");
                    //Redraw the shape
                    DrawingControlShape shape = new DrawingControlShape(findingVO.getID_SkinAssessmentFindings().intValue(), savedTargetID, findingVO.getSiteImage(), findingVO.getWoundType().getId(), true);
                    form.drawingBodyChart().addShape(shape);
                    return;
                }
                else
                {
                    skinAssVO.getSkinAssessmentFindings().remove(i);
                    form.getGlobalContext().COE.SkinBodyChart.setSkinAssessmentVO(skinAssVO);
                    return;
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private SkinAssessmentReview getReviewRecord(SkinAssessmentFindings findingVo)
{
    if(findingVo.getSkinAssessmentReviewIsNotNull())
    {
        for(int i=0; i<findingVo.getSkinAssessmentReview().size(); i++)
        {
            if(findingVo.getSkinAssessmentReview().get(i).getID_SkinAssessmentReviewIsNotNull() && 
               findingVo.getSkinAssessmentReview().get(i).getID_SkinAssessmentReview().intValue() == findingVo.getID_SkinAssessmentFindings().intValue())
                return findingVo.getSkinAssessmentReview().get(i); 
        }
    }
    return new SkinAssessmentReview();
}
项目:openMAXIMS    文件:Logic.java   
private boolean reviewEdited(SkinAssessmentFindings findingVo)
{
    if(findingVo.getSkinAssessmentReviewIsNotNull())
    {
        //Only when having one review - (e.g. when the review was created from the finding)
        if(findingVo.getSkinAssessmentReview().size() == 1 && findingVo.getSkinAssessmentReview().get(0).getID_SkinAssessmentReviewIsNotNull() &&
           findingVo.getSkinAssessmentReview().get(0).getID_SkinAssessmentReview().intValue() == findingVo.getID_SkinAssessmentFindings().intValue())
                return true; 
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void addFindingToAssessment(SkinAssessment assessmentVO, SkinAssessmentFindings findingVO)
{
    for(int i=0; i<assessmentVO.getSkinAssessmentFindings().size(); i++)
    {
        if(assessmentVO.getSkinAssessmentFindings().get(i).equals(findingVO))
        {
            assessmentVO.getSkinAssessmentFindings().remove(i);
            assessmentVO.getSkinAssessmentFindings().add(findingVO);
            break;
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private SkinAssessmentFindingsCollection copySkinAssessmentFindings(SkinAssessmentFindingsCollection skinAssessmentFindings)
{
    if (skinAssessmentFindings == null)
        return null;

    for (int i = 0; i < skinAssessmentFindings.size(); i++)
    {
        SkinAssessmentFindings skinAssessmentFinding = skinAssessmentFindings.get(i);
        if (skinAssessmentFinding == null)
            continue;
        skinAssessmentFinding.clearIDAndVersion();
        skinAssessmentFinding.setSkinAssessmentReview(copySkinAssessmentReview(skinAssessmentFinding.getSkinAssessmentReview()));
    }
    return skinAssessmentFindings;
}
项目:openMAXIMS    文件:Logic.java   
protected void onDrawingBodyChartRemoved(int index) throws PresentationLogicException 
{
    SkinAssessment skinAssVO = form.getGlobalContext().COE.SkinBodyChart.getSkinAssessmentVO();
    SkinAssessmentFindings findingVO;
    if(skinAssVO != null)
    {
        for(int i=0; i<skinAssVO.getSkinAssessmentFindings().size(); i++)
        {
            findingVO = skinAssVO.getSkinAssessmentFindings().get(i);
            if(findingVO.getID_SkinAssessmentFindingsIsNotNull() && findingVO.getID_SkinAssessmentFindings().intValue() == index)
            {
                if(recordSaved(findingVO.getID_SkinAssessmentFindings()))
                {
                    displayError("Previous saved Findings cannot be updated");
                    //Redraw the shape
                    DrawingControlShape shape = new DrawingControlShape(findingVO.getID_SkinAssessmentFindings().intValue(), savedTargetID, findingVO.getSiteImage(), findingVO.getWoundType().getId(), true);
                    form.drawingBodyChart().addShape(shape);
                    return;
                }
                else
                {
                    skinAssVO.getSkinAssessmentFindings().remove(i);
                    form.getGlobalContext().COE.SkinBodyChart.setSkinAssessmentVO(skinAssVO);
                    return;
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private SkinAssessmentReview getReviewRecord(SkinAssessmentFindings findingVo)
{
    if(findingVo.getSkinAssessmentReviewIsNotNull())
    {
        for(int i=0; i<findingVo.getSkinAssessmentReview().size(); i++)
        {
            if(findingVo.getSkinAssessmentReview().get(i).getID_SkinAssessmentReviewIsNotNull() && 
               findingVo.getSkinAssessmentReview().get(i).getID_SkinAssessmentReview().intValue() == findingVo.getID_SkinAssessmentFindings().intValue())
                return findingVo.getSkinAssessmentReview().get(i); 
        }
    }
    return new SkinAssessmentReview();
}
项目:openMAXIMS    文件:Logic.java   
private boolean reviewEdited(SkinAssessmentFindings findingVo)
{
    if(findingVo.getSkinAssessmentReviewIsNotNull())
    {
        //Only when having one review - (e.g. when the review was created from the finding)
        if(findingVo.getSkinAssessmentReview().size() == 1 && findingVo.getSkinAssessmentReview().get(0).getID_SkinAssessmentReviewIsNotNull() &&
           findingVo.getSkinAssessmentReview().get(0).getID_SkinAssessmentReview().intValue() == findingVo.getID_SkinAssessmentFindings().intValue())
                return true; 
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void addFindingToAssessment(SkinAssessment assessmentVO, SkinAssessmentFindings findingVO)
{
    for(int i=0; i<assessmentVO.getSkinAssessmentFindings().size(); i++)
    {
        if(assessmentVO.getSkinAssessmentFindings().get(i).equals(findingVO))
        {
            assessmentVO.getSkinAssessmentFindings().remove(i);
            assessmentVO.getSkinAssessmentFindings().add(findingVO);
            break;
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onComboBoxAssessmentValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    form.comboBoxSite().clear();
    form.bNew().setEnabled(false);
    form.btnPrint().setEnabled(false);
    if(form.comboBoxAssessment().getValue() != null)
    {
        form.getLocalContext().setSkinAssessment(form.comboBoxAssessment().getValue());
        SkinAssessmentFindings findingVO;
        if( form.comboBoxAssessment().getValue().getIsSkinIntact() != null && 
            form.comboBoxAssessment().getValue().getIsSkinIntact().booleanValue() && 
            form.comboBoxAssessment().getValue().getSkinAssessmentFindings().size() == 0)
        {
            form.comboBoxSite().newRow(null, "'Skin Intact' checked. No findings entered.");
        }

        for(int i=0; i<form.comboBoxAssessment().getValue().getSkinAssessmentFindings().size(); i++)
        {
            findingVO = form.comboBoxAssessment().getValue().getSkinAssessmentFindings().get(i);
            //Skip the discontinued one
            if(form.GroupActive().getValue().equals(GenForm.GroupActiveEnumeration.rdoActive) && 
               findingVO.getIsDiscontinuedAssess() != null && 
               findingVO.getIsDiscontinuedAssess().booleanValue())
               continue;
            form.comboBoxSite().newRow(findingVO, findingVO.getWoundType().getText() + " - " + findingVO.getSiteName() + 
                                                  (findingVO.getIsContinuedAssessment() != null && findingVO.getIsContinuedAssessment().booleanValue()?"  (" + PainStatus.CONTINUED.toString()   +")":"")+
                                                  (findingVO.getIsDiscontinuedAssess()  != null && findingVO.getIsDiscontinuedAssess().booleanValue()? "  (" + PainStatus.DISCONTINUED.toString()+")":""));
        }
        form.getGlobalContext().COE.SkinBodyChart.setSelectedSkinAssessment(form.comboBoxAssessment().getValue());

        onComboBoxSiteValueChanged();
    }
    else
        form.getLocalContext().setSkinAssessment(null);

    form.bNew().setEnabled(false);
    form.btnNext().setEnabled(false);
    form.btnPrevious().setEnabled(false);
}
项目:openmaxims-linux    文件:Logic.java   
private SkinAssessmentFindingsCollection copySkinAssessmentFindings(SkinAssessmentFindingsCollection skinAssessmentFindings)
{
    if (skinAssessmentFindings == null)
        return null;

    for (int i = 0; i < skinAssessmentFindings.size(); i++)
    {
        SkinAssessmentFindings skinAssessmentFinding = skinAssessmentFindings.get(i);
        if (skinAssessmentFinding == null)
            continue;
        skinAssessmentFinding.clearIDAndVersion();
        skinAssessmentFinding.setSkinAssessmentReview(copySkinAssessmentReview(skinAssessmentFinding.getSkinAssessmentReview()));
    }
    return skinAssessmentFindings;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onDrawingBodyChartRemoved(int index) throws PresentationLogicException 
{
    SkinAssessment skinAssVO = form.getGlobalContext().COE.SkinBodyChart.getSkinAssessmentVO();
    SkinAssessmentFindings findingVO;
    if(skinAssVO != null)
    {
        for(int i=0; i<skinAssVO.getSkinAssessmentFindings().size(); i++)
        {
            findingVO = skinAssVO.getSkinAssessmentFindings().get(i);
            if(findingVO.getID_SkinAssessmentFindingsIsNotNull() && findingVO.getID_SkinAssessmentFindings().intValue() == index)
            {
                if(recordSaved(findingVO.getID_SkinAssessmentFindings()))
                {
                    displayError("Previous saved Findings cannot be updated");
                    //Redraw the shape
                    DrawingControlShape shape = new DrawingControlShape(findingVO.getID_SkinAssessmentFindings().intValue(), savedTargetID, findingVO.getSiteImage(), findingVO.getWoundType().getId(), true);
                    form.drawingBodyChart().addShape(shape);
                    return;
                }
                else
                {
                    skinAssVO.getSkinAssessmentFindings().remove(i);
                    form.getGlobalContext().COE.SkinBodyChart.setSkinAssessmentVO(skinAssVO);
                    return;
                }
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private SkinAssessmentReview getReviewRecord(SkinAssessmentFindings findingVo)
{
    if(findingVo.getSkinAssessmentReviewIsNotNull())
    {
        for(int i=0; i<findingVo.getSkinAssessmentReview().size(); i++)
        {
            if(findingVo.getSkinAssessmentReview().get(i).getID_SkinAssessmentReviewIsNotNull() && 
               findingVo.getSkinAssessmentReview().get(i).getID_SkinAssessmentReview().intValue() == findingVo.getID_SkinAssessmentFindings().intValue())
                return findingVo.getSkinAssessmentReview().get(i); 
        }
    }
    return new SkinAssessmentReview();
}
项目:openmaxims-linux    文件:Logic.java   
private boolean reviewEdited(SkinAssessmentFindings findingVo)
{
    if(findingVo.getSkinAssessmentReviewIsNotNull())
    {
        //Only when having one review - (e.g. when the review was created from the finding)
        if(findingVo.getSkinAssessmentReview().size() == 1 && findingVo.getSkinAssessmentReview().get(0).getID_SkinAssessmentReviewIsNotNull() &&
           findingVo.getSkinAssessmentReview().get(0).getID_SkinAssessmentReview().intValue() == findingVo.getID_SkinAssessmentFindings().intValue())
                return true; 
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void addFindingToAssessment(SkinAssessment assessmentVO, SkinAssessmentFindings findingVO)
{
    for(int i=0; i<assessmentVO.getSkinAssessmentFindings().size(); i++)
    {
        if(assessmentVO.getSkinAssessmentFindings().get(i).equals(findingVO))
        {
            assessmentVO.getSkinAssessmentFindings().remove(i);
            assessmentVO.getSkinAssessmentFindings().add(findingVO);
            break;
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onComboBoxAssessmentValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    form.comboBoxSite().clear();
    form.bNew().setEnabled(false);
    form.btnPrint().setEnabled(false);
    if(form.comboBoxAssessment().getValue() != null)
    {
        form.getLocalContext().setSkinAssessment(form.comboBoxAssessment().getValue());
        SkinAssessmentFindings findingVO;
        if( form.comboBoxAssessment().getValue().getIsSkinIntact() != null && 
            form.comboBoxAssessment().getValue().getIsSkinIntact().booleanValue() && 
            form.comboBoxAssessment().getValue().getSkinAssessmentFindings().size() == 0)
        {
            form.comboBoxSite().newRow(null, "'Skin Intact' checked. No findings entered.");
        }

        for(int i=0; i<form.comboBoxAssessment().getValue().getSkinAssessmentFindings().size(); i++)
        {
            findingVO = form.comboBoxAssessment().getValue().getSkinAssessmentFindings().get(i);
            //Skip the discontinued one
            if(form.GroupActive().getValue().equals(GenForm.GroupActiveEnumeration.rdoActive) && 
               findingVO.getIsDiscontinuedAssess() != null && 
               findingVO.getIsDiscontinuedAssess().booleanValue())
               continue;
            form.comboBoxSite().newRow(findingVO, findingVO.getWoundType().getText() + " - " + findingVO.getSiteName() + 
                                                  (findingVO.getIsContinuedAssessment() != null && findingVO.getIsContinuedAssessment().booleanValue()?"  (" + PainStatus.CONTINUED.toString()   +")":"")+
                                                  (findingVO.getIsDiscontinuedAssess()  != null && findingVO.getIsDiscontinuedAssess().booleanValue()? "  (" + PainStatus.DISCONTINUED.toString()+")":""));
        }
        form.getGlobalContext().COE.SkinBodyChart.setSelectedSkinAssessment(form.comboBoxAssessment().getValue());

        onComboBoxSiteValueChanged();
    }
    else
        form.getLocalContext().setSkinAssessment(null);

    form.bNew().setEnabled(false);
    form.btnNext().setEnabled(false);
    form.btnPrevious().setEnabled(false);
}
项目:AvoinApotti    文件:Logic.java   
public boolean populateFindingVO()
{
    //Do extra checking if necessary
    SkinAssessmentFindings findingVO = form.getGlobalContext().COE.SkinBodyChart.getFindingsVO();
//Site Details
    findingVO.setSiteDetails(form.textBoxSiteDetails().getValue());
//How Long
findingVO.setHowLongIsItPresent(form.textBoxHowLong().getValue());
//Pressure Sore Grade
findingVO.setPressureSoreGrade(form.cmbPressureGrade().getValue());
//Length
findingVO.setLength(form.decBoxLength().getValue());
//Width
findingVO.setWidth(form.decBoxWidth().getValue());
//Depth
findingVO.setDepth(form.decBoxDepth().getValue());
//Wound Bed
findingVO.setWoundBed(form.cmbWoundBed().getValue());
//Surrounding Skin
findingVO.setSurroundingSkin(form.cmbSurroundingSkin().getValue());
//Exudate Amount
findingVO.setExudateAmount(form.cmbExudateAmount().getValue());
//Exudate Type
findingVO.setExudateType(form.cmbExudateType().getValue());
//Odour
findingVO.setOdour(form.cmbOdour().getValue());
//Pain
findingVO.setPain(form.cmbPain().getValue());
//Infection Suspected
if(form.grpInfection().getValue() != null)
{
    if(form.grpInfection().getValue().equals(GenForm.grpInfectionEnumeration.radioButtonInfectionYes))
        findingVO.setInfectionSuspected(new Boolean(true));
    else if(form.grpInfection().getValue().equals(GenForm.grpInfectionEnumeration.radioButtonInfectionNo))
        findingVO.setInfectionSuspected(new Boolean(false));
}
//Swab taken
if(form.grpSwab().getValue() != null)
{
    if(form.grpSwab().getValue().equals(GenForm.grpSwabEnumeration.radioButtonSwabYes))
        findingVO.setSwabTaken(new Boolean(true));
    else if (form.grpSwab().getValue().equals(GenForm.grpSwabEnumeration.radioButtonSwabNo))
        findingVO.setSwabTaken(new Boolean(false));
}
//Wound Traced
if(form.grpTraced() != null)
{
    if(form.grpTraced().getValue().equals(GenForm.grpTracedEnumeration.radioButtonTracedYes))
        findingVO.setWoundTraced(new Boolean(true));
    if(form.grpTraced().getValue().equals(GenForm.grpTracedEnumeration.radioButtonTracedNo))
        findingVO.setWoundTraced(new Boolean(false));
}
//Cleansed With
findingVO.setCleansedWith(form.cmbCleansedWith().getValue());
//Primary Dressing
findingVO.setPrimaryDressing(form.cmbPrimary().getValue());
//Secondary Dressing
findingVO.setSecondaryDressing(form.cmbSecondary().getValue());
//Frequency of Change
findingVO.setFrequencyOfChange(form.cmbFrequency().getValue());
//Comment
findingVO.setComment(form.textBoxComment().getValue());
//Discontinue
if(form.checkBoxDiscontinueAssessment().getValue())
    findingVO.setIsDiscontinuedAssess(new Boolean (true));
else
    findingVO.setIsDiscontinuedAssess(new Boolean (false));

//Set the VO back to the context
    form.getGlobalContext().COE.SkinBodyChart.setFindingsVO(findingVO);
    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void copyLastAssessment()
{
    SkinAssessment voSkinAssessment = form.getGlobalContext().COE.SkinBodyChart.getSkinAssessmentVO();
    SkinAssessment newSkinAssessment = new SkinAssessment();

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

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

    if (voSkinAssessment.getSkinAssessmentFindingsIsNotNull())
    {
        SkinAssessmentFindingsCollection voCollFindings = new SkinAssessmentFindingsCollection();

        for (int i = 0; i < voSkinAssessment.getSkinAssessmentFindings().size(); i++)
        {
            if (voSkinAssessment.getSkinAssessmentFindings().get(i).getIsDiscontinuedAssessIsNotNull() && !voSkinAssessment.getSkinAssessmentFindings().get(i).getIsDiscontinuedAssess().booleanValue())
            {                   
                SkinAssessmentFindings voFinding = voSkinAssessment.getSkinAssessmentFindings().get(i);

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

                if (voFinding.getSkinAssessmentReviewIsNotNull())
                {
                    //force copy of reviews
                    for(int j = 0; j < voFinding.getSkinAssessmentReview().size(); j++)
                        voFinding.getSkinAssessmentReview().get(j).setID_SkinAssessmentReview(null);                            
                }           

                voCollFindings.add(voFinding);
            }
        }

        newSkinAssessment.setSkinAssessmentFindings(voCollFindings);
    }
    else
        newSkinAssessment.setSkinAssessmentFindings(null);


    form.getGlobalContext().COE.SkinBodyChart.setSkinAssessmentVO(newSkinAssessment);
}
项目:AvoinApotti    文件:Logic.java   
private ims.nursing.vo.SkinAssessmentReview getReviewVOfromFindingVO(SkinAssessmentFindings findingVO)
{
    SkinAssessmentReview skinReviewVO = getReviewRecord(findingVO);
    if(skinReviewVO.getID_SkinAssessmentReview() == null)
        skinReviewVO.setID_SkinAssessmentReview(findingVO.getID_SkinAssessmentFindings());
    //SkinAssessment assessment           = form.comboBoxAssessment().getValue();

    //DateTime - from skinAssessment
    //skinReviewVO.setDateTimeReview(assessment.getDateTimeInitiated());

    //DateTime from a dummy SkinAssessmentReview
    if(findingVO.getSkinAssessmentReviewIsNotNull())
    {
        if(findingVO.getSkinAssessmentReview().size() > 0)
        {
            skinReviewVO.setDateTimeReview(findingVO.getSkinAssessmentReview().get(0).getDateTimeReview());
        }
    }
    //HCP - from skinAssessment
    //skinReviewVO.setHCPReview(assessment.getHcpInitiated());
    skinReviewVO.setComment(findingVO.getComment());
    skinReviewVO.setDepth(findingVO.getDepth());
    skinReviewVO.setExudateAmount(findingVO.getExudateAmount());
    skinReviewVO.setExudateType(findingVO.getExudateType());
    skinReviewVO.setFrequencyOfChange(findingVO.getFrequencyOfChange());
    skinReviewVO.setHowLongIsItPresent(findingVO.getHowLongIsItPresent());
    skinReviewVO.setCleansedWith(findingVO.getCleansedWith());
    skinReviewVO.setInfectionSuspected(findingVO.getInfectionSuspected());
    skinReviewVO.setLength(findingVO.getLength());
    skinReviewVO.setOdour(findingVO.getOdour());
    skinReviewVO.setPain(findingVO.getPain());
    skinReviewVO.setPressureSoreGrade(findingVO.getPressureSoreGrade());
    skinReviewVO.setPrimaryDressing(findingVO.getPrimaryDressing());
    skinReviewVO.setSecondaryDressing(findingVO.getSecondaryDressing());
    skinReviewVO.setSiteDetails(findingVO.getSiteDetails());
    skinReviewVO.setSurroundingSkin(findingVO.getSurroundingSkin());
    skinReviewVO.setSwabTaken(findingVO.getSwabTaken());
    skinReviewVO.setWidth(findingVO.getWidth());
    skinReviewVO.setWoundBed(findingVO.getWoundBed());
    skinReviewVO.setWoundTraced(findingVO.getWoundTraced());

    return skinReviewVO;
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormDialogClosed(ims.framework.FormName formName, ims.framework.enumerations.DialogResult result) throws ims.framework.exceptions.PresentationLogicException
{
    if(formName.equals(form.getForms().Nursing.SkinReviewDialog) && result.equals(DialogResult.OK))
    {
        //Get the value
        SkinAssessmentFindings findingVO = form.getGlobalContext().COE.SkinBodyChart.getFindingsVO();
        if(findingVO.getSkinAssessmentReview() == null)
            findingVO.setSkinAssessmentReview(new SkinAssessmentReviewCollection());
        findingVO.getSkinAssessmentReview().add(form.getGlobalContext().COE.SkinBodyChart.getReviewVO());
        SkinAssessment assessmentVO = form.comboBoxAssessment().getValue();
        addFindingToAssessment(assessmentVO, findingVO);

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

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

        //Save
        try{
            String [] error = assessmentVO.validate();
            if(error != null)
            {
                engine.showErrors(error);
                return;
            }

//          domain.saveSkinAssessment(assessmentVO, form.getGlobalContext().Core.getClinicalEpisode());
            domain.saveSkinAssessment(assessmentVO);
        }
         catch (StaleObjectException e) 
        {
            displayMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        }

         //If the Assessment was discontinued - activate the All radio button  
         if(findingVO.getIsDiscontinuedAssess() != null && 
            findingVO.getIsDiscontinuedAssess().booleanValue())
            form.GroupActive().setValue(GenForm.GroupActiveEnumeration.rdoAll);

        //Restore the old Assessment and Display
         open();
         if(form.comboBoxSite().getValues() != null)
         {
            form.comboBoxSite().setValue(form.getGlobalContext().COE.SkinBodyChart.getFindingsVO());
            refreshFindings();
         }
    }
    else if(result.equals(DialogResult.OK) && formName.equals(form.getForms().Core.Reports))
    {
        printReport();
    }

}
项目:AvoinApotti    文件:Logic.java   
private void printReport()
{
    SkinAssessmentFindings finding = form.comboBoxSite().getValue();

    if(finding == null)
        return;

    SkinAssessment assessment = form.comboBoxAssessment().getValue();

    if(assessment == null)
        return;

    String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
    String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();

    String[] obj = null;
    try
    {
        obj = domain.getReportAndTemplate(form.getGlobalContext().Core.getReportID(), form.getGlobalContext().Core.getTemplateID());
    }
    catch (DomainInterfaceException e)
    {
        engine.showMessage("Error retrieving report template !\r\n" + e.getMessage());
        return;
    }

    if(obj == null || obj.length == 0)
    {
        engine.showMessage("I could not get the report and template !");
        return;
    }

    PatientShort ps = form.getGlobalContext().Core.getPatientShort();
    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());

    client.addSeed(new SeedValue("FINDING_ID", finding.getID_SkinAssessmentFindings(), Integer.class));
    client.addSeed(new SeedValue("ASSESSMENT_ID", assessment.getID_Assessment(), Integer.class));

    if(ps != null)
    {
        //client.addSeed(new SeedValue("PID", ps.getHospnum().getValue(), String.class));
        ims.core.vo.PatientId id = ps.getDisplayId();
        if (id != null) 
        {
            client.addSeed(new SeedValue("PID", id.getValue(), String.class));
        }

        client.addSeed(new SeedValue("AGE", ps.getAge(), Integer.class));
    }

    String resultUrl = "";

    try
    {
        resultUrl = client.buildReportAsUrl(obj[0], obj[1], urlReportServer, QueryBuilderClient.PDF, "", 1);
    } 
    catch (QueryBuilderClientException e1)
    {
        engine.showMessage("Error creating report: " + e1.getMessage());
        return;
    }

    engine.openUrl(resultUrl);
}
项目:openMAXIMS    文件:Logic.java   
public boolean populateFindingVO()
{
    //Do extra checking if necessary
    SkinAssessmentFindings findingVO = form.getGlobalContext().COE.SkinBodyChart.getFindingsVO();
//Site Details
    findingVO.setSiteDetails(form.textBoxSiteDetails().getValue());
//How Long
findingVO.setHowLongIsItPresent(form.textBoxHowLong().getValue());
//Pressure Sore Grade
findingVO.setPressureSoreGrade(form.cmbPressureGrade().getValue());
//Length
findingVO.setLength(form.decBoxLength().getValue());
//Width
findingVO.setWidth(form.decBoxWidth().getValue());
//Depth
findingVO.setDepth(form.decBoxDepth().getValue());
//Wound Bed
findingVO.setWoundBed(form.cmbWoundBed().getValue());
//Surrounding Skin
findingVO.setSurroundingSkin(form.cmbSurroundingSkin().getValue());
//Exudate Amount
findingVO.setExudateAmount(form.cmbExudateAmount().getValue());
//Exudate Type
findingVO.setExudateType(form.cmbExudateType().getValue());
//Odour
findingVO.setOdour(form.cmbOdour().getValue());
//Pain
findingVO.setPain(form.cmbPain().getValue());
//Infection Suspected
if(form.grpInfection().getValue() != null)
{
    if(form.grpInfection().getValue().equals(GenForm.grpInfectionEnumeration.radioButtonInfectionYes))
        findingVO.setInfectionSuspected(new Boolean(true));
    else if(form.grpInfection().getValue().equals(GenForm.grpInfectionEnumeration.radioButtonInfectionNo))
        findingVO.setInfectionSuspected(new Boolean(false));
}
//Swab taken
if(form.grpSwab().getValue() != null)
{
    if(form.grpSwab().getValue().equals(GenForm.grpSwabEnumeration.radioButtonSwabYes))
        findingVO.setSwabTaken(new Boolean(true));
    else if (form.grpSwab().getValue().equals(GenForm.grpSwabEnumeration.radioButtonSwabNo))
        findingVO.setSwabTaken(new Boolean(false));
}
//Wound Traced
if(form.grpTraced() != null)
{
    if(form.grpTraced().getValue().equals(GenForm.grpTracedEnumeration.radioButtonTracedYes))
        findingVO.setWoundTraced(new Boolean(true));
    if(form.grpTraced().getValue().equals(GenForm.grpTracedEnumeration.radioButtonTracedNo))
        findingVO.setWoundTraced(new Boolean(false));
}
//Cleansed With
findingVO.setCleansedWith(form.cmbCleansedWith().getValue());
//Primary Dressing
findingVO.setPrimaryDressing(form.cmbPrimary().getValue());
//Secondary Dressing
findingVO.setSecondaryDressing(form.cmbSecondary().getValue());
//Frequency of Change
findingVO.setFrequencyOfChange(form.cmbFrequency().getValue());
//Comment
findingVO.setComment(form.textBoxComment().getValue());
//Discontinue
if(form.checkBoxDiscontinueAssessment().getValue())
    findingVO.setIsDiscontinuedAssess(new Boolean (true));
else
    findingVO.setIsDiscontinuedAssess(new Boolean (false));

//Set the VO back to the context
    form.getGlobalContext().COE.SkinBodyChart.setFindingsVO(findingVO);
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void copyLastAssessment()
{
    SkinAssessment voSkinAssessment = form.getGlobalContext().COE.SkinBodyChart.getSkinAssessmentVO();
    SkinAssessment newSkinAssessment = new SkinAssessment();

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

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

    if (voSkinAssessment.getSkinAssessmentFindingsIsNotNull())
    {
        SkinAssessmentFindingsCollection voCollFindings = new SkinAssessmentFindingsCollection();

        for (int i = 0; i < voSkinAssessment.getSkinAssessmentFindings().size(); i++)
        {
            if (voSkinAssessment.getSkinAssessmentFindings().get(i).getIsDiscontinuedAssessIsNotNull() && !voSkinAssessment.getSkinAssessmentFindings().get(i).getIsDiscontinuedAssess().booleanValue())
            {                   
                SkinAssessmentFindings voFinding = voSkinAssessment.getSkinAssessmentFindings().get(i);

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

                if (voFinding.getSkinAssessmentReviewIsNotNull())
                {
                    //force copy of reviews
                    for(int j = 0; j < voFinding.getSkinAssessmentReview().size(); j++)
                        voFinding.getSkinAssessmentReview().get(j).setID_SkinAssessmentReview(null);                            
                }           

                voCollFindings.add(voFinding);
            }
        }

        newSkinAssessment.setSkinAssessmentFindings(voCollFindings);
    }
    else
        newSkinAssessment.setSkinAssessmentFindings(null);


    form.getGlobalContext().COE.SkinBodyChart.setSkinAssessmentVO(newSkinAssessment);
}
项目:openMAXIMS    文件:Logic.java   
private ims.nursing.vo.SkinAssessmentReview getReviewVOfromFindingVO(SkinAssessmentFindings findingVO)
{
    SkinAssessmentReview skinReviewVO = getReviewRecord(findingVO);
    if(skinReviewVO.getID_SkinAssessmentReview() == null)
        skinReviewVO.setID_SkinAssessmentReview(findingVO.getID_SkinAssessmentFindings());
    //SkinAssessment assessment           = form.comboBoxAssessment().getValue();

    //DateTime - from skinAssessment
    //skinReviewVO.setDateTimeReview(assessment.getDateTimeInitiated());

    //DateTime from a dummy SkinAssessmentReview
    if(findingVO.getSkinAssessmentReviewIsNotNull())
    {
        if(findingVO.getSkinAssessmentReview().size() > 0)
        {
            skinReviewVO.setDateTimeReview(findingVO.getSkinAssessmentReview().get(0).getDateTimeReview());
        }
    }
    //HCP - from skinAssessment
    //skinReviewVO.setHCPReview(assessment.getHcpInitiated());
    skinReviewVO.setComment(findingVO.getComment());
    skinReviewVO.setDepth(findingVO.getDepth());
    skinReviewVO.setExudateAmount(findingVO.getExudateAmount());
    skinReviewVO.setExudateType(findingVO.getExudateType());
    skinReviewVO.setFrequencyOfChange(findingVO.getFrequencyOfChange());
    skinReviewVO.setHowLongIsItPresent(findingVO.getHowLongIsItPresent());
    skinReviewVO.setCleansedWith(findingVO.getCleansedWith());
    skinReviewVO.setInfectionSuspected(findingVO.getInfectionSuspected());
    skinReviewVO.setLength(findingVO.getLength());
    skinReviewVO.setOdour(findingVO.getOdour());
    skinReviewVO.setPain(findingVO.getPain());
    skinReviewVO.setPressureSoreGrade(findingVO.getPressureSoreGrade());
    skinReviewVO.setPrimaryDressing(findingVO.getPrimaryDressing());
    skinReviewVO.setSecondaryDressing(findingVO.getSecondaryDressing());
    skinReviewVO.setSiteDetails(findingVO.getSiteDetails());
    skinReviewVO.setSurroundingSkin(findingVO.getSurroundingSkin());
    skinReviewVO.setSwabTaken(findingVO.getSwabTaken());
    skinReviewVO.setWidth(findingVO.getWidth());
    skinReviewVO.setWoundBed(findingVO.getWoundBed());
    skinReviewVO.setWoundTraced(findingVO.getWoundTraced());

    return skinReviewVO;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormDialogClosed(ims.framework.FormName formName, ims.framework.enumerations.DialogResult result) throws ims.framework.exceptions.PresentationLogicException
{
    if(formName.equals(form.getForms().Nursing.SkinReviewDialog) && result.equals(DialogResult.OK))
    {
        //Get the value
        SkinAssessmentFindings findingVO = form.getGlobalContext().COE.SkinBodyChart.getFindingsVO();
        if(findingVO.getSkinAssessmentReview() == null)
            findingVO.setSkinAssessmentReview(new SkinAssessmentReviewCollection());
        findingVO.getSkinAssessmentReview().add(form.getGlobalContext().COE.SkinBodyChart.getReviewVO());
        SkinAssessment assessmentVO = form.comboBoxAssessment().getValue();
        addFindingToAssessment(assessmentVO, findingVO);

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

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

        //Save
        try{
            String [] error = assessmentVO.validate();
            if(error != null)
            {
                engine.showErrors(error);
                return;
            }

//          domain.saveSkinAssessment(assessmentVO, form.getGlobalContext().Core.getClinicalEpisode());
            domain.saveSkinAssessment(assessmentVO);
        }
         catch (StaleObjectException e) 
        {
            displayMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        }

         //If the Assessment was discontinued - activate the All radio button  
         if(findingVO.getIsDiscontinuedAssess() != null && 
            findingVO.getIsDiscontinuedAssess().booleanValue())
            form.GroupActive().setValue(GenForm.GroupActiveEnumeration.rdoAll);

        //Restore the old Assessment and Display
         open();
         if(form.comboBoxSite().getValues() != null)
         {
            form.comboBoxSite().setValue(form.getGlobalContext().COE.SkinBodyChart.getFindingsVO());
            refreshFindings();
         }
    }
    else if(result.equals(DialogResult.OK) && formName.equals(form.getForms().Core.Reports))
    {
        printReport();
    }

}
项目:openMAXIMS    文件:Logic.java   
protected void onComboBoxAssessmentValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    form.comboBoxSite().clear();
    form.bNew().setEnabled(false);
    form.btnPrint().setEnabled(false);
    if(form.comboBoxAssessment().getValue() != null)
    {
        form.getLocalContext().setSkinAssessment(form.comboBoxAssessment().getValue());
        SkinAssessmentFindings findingVO;
        if( form.comboBoxAssessment().getValue().getIsSkinIntact() != null && 
            form.comboBoxAssessment().getValue().getIsSkinIntact().booleanValue() && 
            form.comboBoxAssessment().getValue().getSkinAssessmentFindings().size() == 0)
        {
            form.comboBoxSite().newRow(null, "'Skin Intact' checked. No findings entered.");
        }

        for(int i=0; i<form.comboBoxAssessment().getValue().getSkinAssessmentFindings().size(); i++)
        {
            findingVO = form.comboBoxAssessment().getValue().getSkinAssessmentFindings().get(i);
            //Skip the discontinued one
            if(form.GroupActive().getValue().equals(GenForm.GroupActiveEnumeration.rdoActive) && 
               findingVO.getIsDiscontinuedAssess() != null && 
               findingVO.getIsDiscontinuedAssess().booleanValue())
               continue;
            form.comboBoxSite().newRow(findingVO, findingVO.getWoundType().getText() + " - " + findingVO.getSiteName() + 
                                                  (findingVO.getIsContinuedAssessment() != null && findingVO.getIsContinuedAssessment().booleanValue()?"  (" + PainStatus.CONTINUED.toString()   +")":"")+
                                                  (findingVO.getIsDiscontinuedAssess()  != null && findingVO.getIsDiscontinuedAssess().booleanValue()? "  (" + PainStatus.DISCONTINUED.toString()+")":""));
        }
        form.getGlobalContext().COE.SkinBodyChart.setSelectedSkinAssessment(form.comboBoxAssessment().getValue());
        form.getGlobalContext().Nursing.setSkinReviewSearchCriteria(getSearchCriteria());//WDEV-19389 
        onComboBoxSiteValueChanged();
    }
    else
    {
        form.getLocalContext().setSkinAssessment(null);
        form.getGlobalContext().Nursing.setSkinReviewSearchCriteria(null);//WDEV-19389 
    }

    form.bNew().setEnabled(false);
    form.btnNext().setEnabled(false);
    form.btnPrevious().setEnabled(false);
}
项目:openMAXIMS    文件:Logic.java   
private void printReport()
{
    SkinAssessmentFindings finding = form.comboBoxSite().getValue();

    if(finding == null)
        return;

    SkinAssessment assessment = form.comboBoxAssessment().getValue();

    if(assessment == null)
        return;

    String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
    String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();

    String[] obj = null;
    try
    {
        obj = domain.getReportAndTemplate(form.getGlobalContext().Core.getReportID(), form.getGlobalContext().Core.getTemplateID());
    }
    catch (DomainInterfaceException e)
    {
        engine.showMessage("Error retrieving report template !\r\n" + e.getMessage());
        return;
    }

    if(obj == null || obj.length == 0)
    {
        engine.showMessage("I could not get the report and template !");
        return;
    }

    PatientShort ps = form.getGlobalContext().Core.getPatientShort();
    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());

    client.addSeed(new SeedValue("FINDING_ID", finding.getID_SkinAssessmentFindings(), Integer.class));
    client.addSeed(new SeedValue("ASSESSMENT_ID", assessment.getID_Assessment(), Integer.class));

    if(ps != null)
    {
        //client.addSeed(new SeedValue("PID", ps.getHospnum().getValue(), String.class));
        ims.core.vo.PatientId id = ps.getDisplayId();
        if (id != null) 
        {
            client.addSeed(new SeedValue("PID", id.getValue(), String.class));
        }

        client.addSeed(new SeedValue("AGE", ps.getAge(), Integer.class));
    }

    String resultUrl = "";

    try
    {
        resultUrl = client.buildReportAsUrl(obj[0], obj[1], urlReportServer, QueryBuilderClient.PDF, "", 1);
    } 
    catch (QueryBuilderClientException e1)
    {
        engine.showMessage("Error creating report: " + e1.getMessage());
        return;
    }

    engine.openUrl(resultUrl);
}
项目:openMAXIMS    文件:Logic.java   
public boolean populateFindingVO()
{
    //Do extra checking if necessary
    SkinAssessmentFindings findingVO = form.getGlobalContext().COE.SkinBodyChart.getFindingsVO();
//Site Details
    findingVO.setSiteDetails(form.textBoxSiteDetails().getValue());
//How Long
findingVO.setHowLongIsItPresent(form.textBoxHowLong().getValue());
//Pressure Sore Grade
findingVO.setPressureSoreGrade(form.cmbPressureGrade().getValue());
//Length
findingVO.setLength(form.decBoxLength().getValue());
//Width
findingVO.setWidth(form.decBoxWidth().getValue());
//Depth
findingVO.setDepth(form.decBoxDepth().getValue());
//Wound Bed
findingVO.setWoundBed(form.cmbWoundBed().getValue());
//Surrounding Skin
findingVO.setSurroundingSkin(form.cmbSurroundingSkin().getValue());
//Exudate Amount
findingVO.setExudateAmount(form.cmbExudateAmount().getValue());
//Exudate Type
findingVO.setExudateType(form.cmbExudateType().getValue());
//Odour
findingVO.setOdour(form.cmbOdour().getValue());
//Pain
findingVO.setPain(form.cmbPain().getValue());
//Infection Suspected
if(form.grpInfection().getValue() != null)
{
    if(form.grpInfection().getValue().equals(GenForm.grpInfectionEnumeration.radioButtonInfectionYes))
        findingVO.setInfectionSuspected(new Boolean(true));
    else if(form.grpInfection().getValue().equals(GenForm.grpInfectionEnumeration.radioButtonInfectionNo))
        findingVO.setInfectionSuspected(new Boolean(false));
}
//Swab taken
if(form.grpSwab().getValue() != null)
{
    if(form.grpSwab().getValue().equals(GenForm.grpSwabEnumeration.radioButtonSwabYes))
        findingVO.setSwabTaken(new Boolean(true));
    else if (form.grpSwab().getValue().equals(GenForm.grpSwabEnumeration.radioButtonSwabNo))
        findingVO.setSwabTaken(new Boolean(false));
}
//Wound Traced
if(form.grpTraced() != null)
{
    if(form.grpTraced().getValue().equals(GenForm.grpTracedEnumeration.radioButtonTracedYes))
        findingVO.setWoundTraced(new Boolean(true));
    if(form.grpTraced().getValue().equals(GenForm.grpTracedEnumeration.radioButtonTracedNo))
        findingVO.setWoundTraced(new Boolean(false));
}
//Cleansed With
findingVO.setCleansedWith(form.cmbCleansedWith().getValue());
//Primary Dressing
findingVO.setPrimaryDressing(form.cmbPrimary().getValue());
//Secondary Dressing
findingVO.setSecondaryDressing(form.cmbSecondary().getValue());
//Frequency of Change
findingVO.setFrequencyOfChange(form.cmbFrequency().getValue());
//Comment
findingVO.setComment(form.textBoxComment().getValue());
//Discontinue
if(form.checkBoxDiscontinueAssessment().getValue())
    findingVO.setIsDiscontinuedAssess(new Boolean (true));
else
    findingVO.setIsDiscontinuedAssess(new Boolean (false));

//Set the VO back to the context
    form.getGlobalContext().COE.SkinBodyChart.setFindingsVO(findingVO);
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void copyLastAssessment()
{
    SkinAssessment voSkinAssessment = form.getGlobalContext().COE.SkinBodyChart.getSkinAssessmentVO();
    SkinAssessment newSkinAssessment = new SkinAssessment();

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

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

    if (voSkinAssessment.getSkinAssessmentFindingsIsNotNull())
    {
        SkinAssessmentFindingsCollection voCollFindings = new SkinAssessmentFindingsCollection();

        for (int i = 0; i < voSkinAssessment.getSkinAssessmentFindings().size(); i++)
        {
            if (voSkinAssessment.getSkinAssessmentFindings().get(i).getIsDiscontinuedAssessIsNotNull() && !voSkinAssessment.getSkinAssessmentFindings().get(i).getIsDiscontinuedAssess().booleanValue())
            {                   
                SkinAssessmentFindings voFinding = voSkinAssessment.getSkinAssessmentFindings().get(i);

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

                if (voFinding.getSkinAssessmentReviewIsNotNull())
                {
                    //force copy of reviews
                    for(int j = 0; j < voFinding.getSkinAssessmentReview().size(); j++)
                        voFinding.getSkinAssessmentReview().get(j).setID_SkinAssessmentReview(null);                            
                }           

                voCollFindings.add(voFinding);
            }
        }

        newSkinAssessment.setSkinAssessmentFindings(voCollFindings);
    }
    else
        newSkinAssessment.setSkinAssessmentFindings(null);


    form.getGlobalContext().COE.SkinBodyChart.setSkinAssessmentVO(newSkinAssessment);
}
项目:openMAXIMS    文件:Logic.java   
private ims.nursing.vo.SkinAssessmentReview getReviewVOfromFindingVO(SkinAssessmentFindings findingVO)
{
    SkinAssessmentReview skinReviewVO = getReviewRecord(findingVO);
    if(skinReviewVO.getID_SkinAssessmentReview() == null)
        skinReviewVO.setID_SkinAssessmentReview(findingVO.getID_SkinAssessmentFindings());
    //SkinAssessment assessment           = form.comboBoxAssessment().getValue();

    //DateTime - from skinAssessment
    //skinReviewVO.setDateTimeReview(assessment.getDateTimeInitiated());

    //DateTime from a dummy SkinAssessmentReview
    if(findingVO.getSkinAssessmentReviewIsNotNull())
    {
        if(findingVO.getSkinAssessmentReview().size() > 0)
        {
            skinReviewVO.setDateTimeReview(findingVO.getSkinAssessmentReview().get(0).getDateTimeReview());
        }
    }
    //HCP - from skinAssessment
    //skinReviewVO.setHCPReview(assessment.getHcpInitiated());
    skinReviewVO.setComment(findingVO.getComment());
    skinReviewVO.setDepth(findingVO.getDepth());
    skinReviewVO.setExudateAmount(findingVO.getExudateAmount());
    skinReviewVO.setExudateType(findingVO.getExudateType());
    skinReviewVO.setFrequencyOfChange(findingVO.getFrequencyOfChange());
    skinReviewVO.setHowLongIsItPresent(findingVO.getHowLongIsItPresent());
    skinReviewVO.setCleansedWith(findingVO.getCleansedWith());
    skinReviewVO.setInfectionSuspected(findingVO.getInfectionSuspected());
    skinReviewVO.setLength(findingVO.getLength());
    skinReviewVO.setOdour(findingVO.getOdour());
    skinReviewVO.setPain(findingVO.getPain());
    skinReviewVO.setPressureSoreGrade(findingVO.getPressureSoreGrade());
    skinReviewVO.setPrimaryDressing(findingVO.getPrimaryDressing());
    skinReviewVO.setSecondaryDressing(findingVO.getSecondaryDressing());
    skinReviewVO.setSiteDetails(findingVO.getSiteDetails());
    skinReviewVO.setSurroundingSkin(findingVO.getSurroundingSkin());
    skinReviewVO.setSwabTaken(findingVO.getSwabTaken());
    skinReviewVO.setWidth(findingVO.getWidth());
    skinReviewVO.setWoundBed(findingVO.getWoundBed());
    skinReviewVO.setWoundTraced(findingVO.getWoundTraced());

    return skinReviewVO;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormDialogClosed(ims.framework.FormName formName, ims.framework.enumerations.DialogResult result) throws ims.framework.exceptions.PresentationLogicException
{
    if(formName.equals(form.getForms().Nursing.SkinReviewDialog) && result.equals(DialogResult.OK))
    {
        //Get the value
        SkinAssessmentFindings findingVO = form.getGlobalContext().COE.SkinBodyChart.getFindingsVO();
        if(findingVO.getSkinAssessmentReview() == null)
            findingVO.setSkinAssessmentReview(new SkinAssessmentReviewCollection());
        findingVO.getSkinAssessmentReview().add(form.getGlobalContext().COE.SkinBodyChart.getReviewVO());
        SkinAssessment assessmentVO = form.comboBoxAssessment().getValue();
        addFindingToAssessment(assessmentVO, findingVO);

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

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

        //Save
        try{
            String [] error = assessmentVO.validate();
            if(error != null)
            {
                engine.showErrors(error);
                return;
            }

//          domain.saveSkinAssessment(assessmentVO, form.getGlobalContext().Core.getClinicalEpisode());
            domain.saveSkinAssessment(assessmentVO);
        }
         catch (StaleObjectException e) 
        {
            displayMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        }

         //If the Assessment was discontinued - activate the All radio button  
         if(findingVO.getIsDiscontinuedAssess() != null && 
            findingVO.getIsDiscontinuedAssess().booleanValue())
            form.GroupActive().setValue(GenForm.GroupActiveEnumeration.rdoAll);

        //Restore the old Assessment and Display
         open();
         if(form.comboBoxSite().getValues() != null)
         {
            form.comboBoxSite().setValue(form.getGlobalContext().COE.SkinBodyChart.getFindingsVO());
            refreshFindings();
         }
    }
    else if(result.equals(DialogResult.OK) && formName.equals(form.getForms().Core.Reports))
    {
        printReport();
    }

}
项目:openMAXIMS    文件:Logic.java   
private void printReport()
{
    SkinAssessmentFindings finding = form.comboBoxSite().getValue();

    if(finding == null)
        return;

    SkinAssessment assessment = form.comboBoxAssessment().getValue();

    if(assessment == null)
        return;

    String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
    String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();

    String[] obj = null;
    try
    {
        obj = domain.getReportAndTemplate(form.getGlobalContext().Core.getReportID(), form.getGlobalContext().Core.getTemplateID());
    }
    catch (DomainInterfaceException e)
    {
        engine.showMessage("Error retrieving report template !\r\n" + e.getMessage());
        return;
    }

    if(obj == null || obj.length == 0)
    {
        engine.showMessage("I could not get the report and template !");
        return;
    }

    PatientShort ps = form.getGlobalContext().Core.getPatientShort();
    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());

    client.addSeed(new SeedValue("FINDING_ID", finding.getID_SkinAssessmentFindings(), Integer.class));
    client.addSeed(new SeedValue("ASSESSMENT_ID", assessment.getID_Assessment(), Integer.class));

    if(ps != null)
    {
        //client.addSeed(new SeedValue("PID", ps.getHospnum().getValue(), String.class));
        ims.core.vo.PatientId id = ps.getDisplayId();
        if (id != null) 
        {
            client.addSeed(new SeedValue("PID", id.getValue(), String.class));
        }

        client.addSeed(new SeedValue("AGE", ps.getAge(), Integer.class));
    }

    String resultUrl = "";

    try
    {
        resultUrl = client.buildReportAsUrl(obj[0], obj[1], urlReportServer, QueryBuilderClient.PDF, "", 1);
    } 
    catch (QueryBuilderClientException e1)
    {
        engine.showMessage("Error creating report: " + e1.getMessage());
        return;
    }

    engine.openUrl(resultUrl);
}
项目:openmaxims-linux    文件:Logic.java   
public boolean populateFindingVO()
{
    //Do extra checking if necessary
    SkinAssessmentFindings findingVO = form.getGlobalContext().COE.SkinBodyChart.getFindingsVO();
//Site Details
    findingVO.setSiteDetails(form.textBoxSiteDetails().getValue());
//How Long
findingVO.setHowLongIsItPresent(form.textBoxHowLong().getValue());
//Pressure Sore Grade
findingVO.setPressureSoreGrade(form.cmbPressureGrade().getValue());
//Length
findingVO.setLength(form.decBoxLength().getValue());
//Width
findingVO.setWidth(form.decBoxWidth().getValue());
//Depth
findingVO.setDepth(form.decBoxDepth().getValue());
//Wound Bed
findingVO.setWoundBed(form.cmbWoundBed().getValue());
//Surrounding Skin
findingVO.setSurroundingSkin(form.cmbSurroundingSkin().getValue());
//Exudate Amount
findingVO.setExudateAmount(form.cmbExudateAmount().getValue());
//Exudate Type
findingVO.setExudateType(form.cmbExudateType().getValue());
//Odour
findingVO.setOdour(form.cmbOdour().getValue());
//Pain
findingVO.setPain(form.cmbPain().getValue());
//Infection Suspected
if(form.grpInfection().getValue() != null)
{
    if(form.grpInfection().getValue().equals(GenForm.grpInfectionEnumeration.radioButtonInfectionYes))
        findingVO.setInfectionSuspected(new Boolean(true));
    else if(form.grpInfection().getValue().equals(GenForm.grpInfectionEnumeration.radioButtonInfectionNo))
        findingVO.setInfectionSuspected(new Boolean(false));
}
//Swab taken
if(form.grpSwab().getValue() != null)
{
    if(form.grpSwab().getValue().equals(GenForm.grpSwabEnumeration.radioButtonSwabYes))
        findingVO.setSwabTaken(new Boolean(true));
    else if (form.grpSwab().getValue().equals(GenForm.grpSwabEnumeration.radioButtonSwabNo))
        findingVO.setSwabTaken(new Boolean(false));
}
//Wound Traced
if(form.grpTraced() != null)
{
    if(form.grpTraced().getValue().equals(GenForm.grpTracedEnumeration.radioButtonTracedYes))
        findingVO.setWoundTraced(new Boolean(true));
    if(form.grpTraced().getValue().equals(GenForm.grpTracedEnumeration.radioButtonTracedNo))
        findingVO.setWoundTraced(new Boolean(false));
}
//Cleansed With
findingVO.setCleansedWith(form.cmbCleansedWith().getValue());
//Primary Dressing
findingVO.setPrimaryDressing(form.cmbPrimary().getValue());
//Secondary Dressing
findingVO.setSecondaryDressing(form.cmbSecondary().getValue());
//Frequency of Change
findingVO.setFrequencyOfChange(form.cmbFrequency().getValue());
//Comment
findingVO.setComment(form.textBoxComment().getValue());
//Discontinue
if(form.checkBoxDiscontinueAssessment().getValue())
    findingVO.setIsDiscontinuedAssess(new Boolean (true));
else
    findingVO.setIsDiscontinuedAssess(new Boolean (false));

//Set the VO back to the context
    form.getGlobalContext().COE.SkinBodyChart.setFindingsVO(findingVO);
    return true;
}