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

项目:AvoinApotti    文件:Logic.java   
private void setPOCData(PlanOfCareVoCollection pocVoColl, PatientAssessmentVo voPatAssessment)
{
    if(voPatAssessment == null)
        return;
    PatientAssessmentDataVo assessmentData = voPatAssessment.getAssessmentData();
    if(assessmentData == null)
        return;
    for (int i = 0; i < assessmentData.getAnswerGroups().size(); i++)
    {
        for (int j = 0; j < assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().size(); j++)
        {
            PatientAssessmentQuestionVo voPatAssQuestionVo = assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().get(j);
            Boolean isPocSaved = getPocValue(voPatAssQuestionVo.getAssessmentQuestion(), pocVoColl);
            voPatAssQuestionVo.setIsPoc(isPocSaved);
            voPatAssQuestionVo.setIsPocSaved(isPocSaved);
            assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().set(j, voPatAssQuestionVo);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void setPOCData(PlanOfCareVoCollection pocVoColl, PatientAssessmentVo voPatAssessment)
{
    if(voPatAssessment == null)
        return;
    PatientAssessmentDataVo assessmentData = voPatAssessment.getAssessmentData();
    if(assessmentData == null)
        return;
    for (int i = 0; i < assessmentData.getAnswerGroups().size(); i++)
    {
        for (int j = 0; j < assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().size(); j++)
        {
            PatientAssessmentQuestionVo voPatAssQuestionVo = assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().get(j);
            voPatAssQuestionVo.setIsPoc(getPocValue(voPatAssQuestionVo.getAssessmentQuestion(), pocVoColl));
            assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().set(j, voPatAssQuestionVo);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setPOCData(PlanOfCareVoCollection pocVoColl, PatientAssessmentVo voPatAssessment)
{
    if(voPatAssessment == null)
        return;
    PatientAssessmentDataVo assessmentData = voPatAssessment.getAssessmentData();
    if(assessmentData == null)
        return;
    for (int i = 0; i < assessmentData.getAnswerGroups().size(); i++)
    {
        for (int j = 0; j < assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().size(); j++)
        {
            PatientAssessmentQuestionVo voPatAssQuestionVo = assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().get(j);
            Boolean isPocSaved = getPocValue(voPatAssQuestionVo.getAssessmentQuestion(), pocVoColl);
            voPatAssQuestionVo.setIsPoc(isPocSaved);
            voPatAssQuestionVo.setIsPocSaved(isPocSaved);
            assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().set(j, voPatAssQuestionVo);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setPOCData(PlanOfCareVoCollection pocVoColl, PatientAssessmentVo voPatAssessment)
{
    if(voPatAssessment == null)
        return;
    PatientAssessmentDataVo assessmentData = voPatAssessment.getAssessmentData();
    if(assessmentData == null)
        return;
    for (int i = 0; i < assessmentData.getAnswerGroups().size(); i++)
    {
        for (int j = 0; j < assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().size(); j++)
        {
            PatientAssessmentQuestionVo voPatAssQuestionVo = assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().get(j);
            voPatAssQuestionVo.setIsPoc(getPocValue(voPatAssQuestionVo.getAssessmentQuestion(), pocVoColl));
            assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().set(j, voPatAssQuestionVo);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setPOCData(PlanOfCareVoCollection pocVoColl, PatientAssessmentVo voPatAssessment)
{
    if(voPatAssessment == null)
        return;
    PatientAssessmentDataVo assessmentData = voPatAssessment.getAssessmentData();
    if(assessmentData == null)
        return;
    for (int i = 0; i < assessmentData.getAnswerGroups().size(); i++)
    {
        for (int j = 0; j < assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().size(); j++)
        {
            PatientAssessmentQuestionVo voPatAssQuestionVo = assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().get(j);
            Boolean isPocSaved = getPocValue(voPatAssQuestionVo.getAssessmentQuestion(), pocVoColl);
            voPatAssQuestionVo.setIsPoc(isPocSaved);
            voPatAssQuestionVo.setIsPocSaved(isPocSaved);
            assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().set(j, voPatAssQuestionVo);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setPOCData(PlanOfCareVoCollection pocVoColl, PatientAssessmentVo voPatAssessment)
{
    if(voPatAssessment == null)
        return;
    PatientAssessmentDataVo assessmentData = voPatAssessment.getAssessmentData();
    if(assessmentData == null)
        return;
    for (int i = 0; i < assessmentData.getAnswerGroups().size(); i++)
    {
        for (int j = 0; j < assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().size(); j++)
        {
            PatientAssessmentQuestionVo voPatAssQuestionVo = assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().get(j);
            voPatAssQuestionVo.setIsPoc(getPocValue(voPatAssQuestionVo.getAssessmentQuestion(), pocVoColl));
            assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().set(j, voPatAssQuestionVo);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void setPOCData(PlanOfCareVoCollection pocVoColl, PatientAssessmentVo voPatAssessment)
{
    if(voPatAssessment == null)
        return;
    PatientAssessmentDataVo assessmentData = voPatAssessment.getAssessmentData();
    if(assessmentData == null)
        return;
    for (int i = 0; i < assessmentData.getAnswerGroups().size(); i++)
    {
        for (int j = 0; j < assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().size(); j++)
        {
            PatientAssessmentQuestionVo voPatAssQuestionVo = assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().get(j);
            Boolean isPocSaved = getPocValue(voPatAssQuestionVo.getAssessmentQuestion(), pocVoColl);
            voPatAssQuestionVo.setIsPoc(isPocSaved);
            voPatAssQuestionVo.setIsPocSaved(isPocSaved);
            assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().set(j, voPatAssQuestionVo);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void setPOCData(PlanOfCareVoCollection pocVoColl, PatientAssessmentVo voPatAssessment)
{
    if(voPatAssessment == null)
        return;
    PatientAssessmentDataVo assessmentData = voPatAssessment.getAssessmentData();
    if(assessmentData == null)
        return;
    for (int i = 0; i < assessmentData.getAnswerGroups().size(); i++)
    {
        for (int j = 0; j < assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().size(); j++)
        {
            PatientAssessmentQuestionVo voPatAssQuestionVo = assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().get(j);
            voPatAssQuestionVo.setIsPoc(getPocValue(voPatAssQuestionVo.getAssessmentQuestion(), pocVoColl));
            assessmentData.getAnswerGroups().get(i).getAssessmentAnswers().set(j, voPatAssQuestionVo);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private PlanOfCareVo getCurrentPlanOfCare(AssessmentQuestionVo voAssessmQuestion)
{
    PlanOfCareVoCollection voPlanOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
    for (int i = 0; voPlanOfCareColl != null && i < voPlanOfCareColl.size(); i++)
    {
        if (voPlanOfCareColl.get(i).getAssessmentQuestionIsNotNull() && voPlanOfCareColl.get(i).getAssessmentQuestion().equals(voAssessmQuestion))
            return voPlanOfCareColl.get(i);
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private Boolean getPocValue(AssessmentQuestionVo assessmentQuestion, PlanOfCareVoCollection pocVoColl)
{
    if(assessmentQuestion == null )
        return Boolean.FALSE;

    for (int i = 0; pocVoColl != null && i < pocVoColl.size(); i++)
    {
        if(pocVoColl.get(i).getAssessmentQuestionIsNotNull() && pocVoColl.get(i).getAssessmentQuestion().equals(assessmentQuestion))
            return Boolean.TRUE;
    }
    return Boolean.FALSE;
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    //set in the context the current Assessment
    UserAssessmentVo voUserAssessment = domain.getCurrentDPPUserAssessment(UserDefinedAssessmentType.DPP);
    if(voUserAssessment == null)
    {
        engine.showMessage("No 'Active' Daily Patient Progress record exists on the system.");
        return;
    }

    clearControlsAndContext();

    //get the POC records based on Assessment Questions from Configuration
    PlanOfCareVoCollection planOfCareColl = listPOCRecords(voUserAssessment);

    //Get a copy of the new assessment - get the configured Questions
    PatientAssessmentVo voNewPatientAssessment = getNewPatientAssessment(voUserAssessment);
    if(voNewPatientAssessment != null)
    {
        setPOCData(planOfCareColl, voNewPatientAssessment);
    }

    form.getGlobalContext().Nursing.setPatientAssessmentVo(voNewPatientAssessment);
    form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
    form.getGlobalContext().Nursing.setUserAssessmentDPP(voUserAssessment);
    form.getGlobalContext().Nursing.setIsDppCompleted(Boolean.FALSE);

    form.setMode(FormMode.EDIT);

    openDPPDialog();
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if(formName.equals(form.getForms().Nursing.DailyPatientProgressDlg) && result.equals(DialogResult.OK))
    {
        PatientAssessmentVo voPatientAssessment = form.getGlobalContext().Nursing.getPatientAssessmentVo();
        PlanOfCareVoCollection planOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
        setPOCData(planOfCareColl, voPatientAssessment);
        form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatientAssessment);
        populateDetailsGrid(voPatientAssessment);
        displayScoreTotalInTree(voPatientAssessment);
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onRecbrAssessmentValueChanged() throws PresentationLogicException
{
    PatientAssessmentRefVo voPatAssRefVo = form.recbrAssessment().getValue();
    //Context User for RIE only
    form.getLocalContext().setSelectedRecord(voPatAssRefVo);

    clearDPPQuestionGroupContext();
    if(voPatAssRefVo != null)
    {
        PatientAssessmentVo voPatAssessment = domain.getPatientAssessment(voPatAssRefVo);
        setIsDppAdmissionAssessment(voPatAssessment);
        PlanOfCareVoCollection planOfCareColl = listPOCRecords(voPatAssessment);
        setPOCData(planOfCareColl, voPatAssessment);
        form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatAssessment);
        form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
        form.getGlobalContext().Nursing.setIsDppCompleted(voPatAssessment != null && voPatAssessment.getStatusIsNotNull() && voPatAssessment.getStatus().equals(PatientAssessmentStatusReason.COMPLETED)?Boolean.TRUE:Boolean.FALSE);

        populateDetailsGrid(voPatAssessment);
        displayScoreTotalInTree(voPatAssessment);
    }
    //start WDEV-13887
    else
    {
        clearControlsAndContext();
    }

    updateControlState();  
    //end
}
项目:AvoinApotti    文件:Logic.java   
private Boolean getPocValue(AssessmentQuestionVo assessmentQuestion, PlanOfCareVoCollection pocVoColl)
{
    if(assessmentQuestion == null )
        return Boolean.FALSE;

    for (int i = 0; pocVoColl != null && i < pocVoColl.size(); i++)
    {
        if(pocVoColl.get(i).getAssessmentQuestionIsNotNull() && pocVoColl.get(i).getAssessmentQuestion().equals(assessmentQuestion))
            return Boolean.TRUE;
    }
    return Boolean.FALSE;
}
项目:AvoinApotti    文件:DailyPatientProgressImpl.java   
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
    if (patientAssessment == null)
        throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

    if (patientAssessment.isValidated() == false)
        throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

    if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
        throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

    DomainFactory factory = getDomainFactory();
    PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
    factory.save(doPatientAssessment);

    int countNewCarePlan = 0;
    for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
    {
        PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
        if (voPlanOfCare.getID_PlanOfCare() == null)
            countNewCarePlan++;
        PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
        factory.save(doPlanOfCare);
    }

    PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
    Integer newPlanOfCares = new Integer(countNewCarePlan);
    DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

    return item;
}
项目:openMAXIMS    文件:Logic.java   
private PlanOfCareVo getCurrentPlanOfCare(AssessmentQuestionVo voAssessmQuestion)
{
    PlanOfCareVoCollection voPlanOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
    for (int i = 0; voPlanOfCareColl != null && i < voPlanOfCareColl.size(); i++)
    {
        if (voPlanOfCareColl.get(i).getAssessmentQuestionIsNotNull() && voPlanOfCareColl.get(i).getAssessmentQuestion().equals(voAssessmQuestion))
            return voPlanOfCareColl.get(i);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private Boolean getPocValue(AssessmentQuestionVo assessmentQuestion, PlanOfCareVoCollection pocVoColl)
{
    if(assessmentQuestion == null )
        return Boolean.FALSE;

    for (int i = 0; pocVoColl != null && i < pocVoColl.size(); i++)
    {
        if(pocVoColl.get(i).getAssessmentQuestionIsNotNull() && pocVoColl.get(i).getAssessmentQuestion().equals(assessmentQuestion))
            return Boolean.TRUE;
    }
    return Boolean.FALSE;
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    //set in the context the current Assessment
    UserAssessmentVo voUserAssessment = domain.getCurrentDPPUserAssessment(UserDefinedAssessmentType.DPP);
    if(voUserAssessment == null)
    {
        engine.showMessage("No 'Active' Daily Patient Progress record exists on the system.");
        return;
    }

    clearControlsAndContext();

    //get the POC records based on Assessment Questions from Configuration
    PlanOfCareVoCollection planOfCareColl = listPOCRecords(voUserAssessment);

    //Get a copy of the new assessment - get the configured Questions
    PatientAssessmentVo voNewPatientAssessment = getNewPatientAssessment(voUserAssessment);
    if(voNewPatientAssessment != null)
    {
        setPOCData(planOfCareColl, voNewPatientAssessment);
    }

    form.getGlobalContext().Nursing.setPatientAssessmentVo(voNewPatientAssessment);
    form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
    form.getGlobalContext().Nursing.setUserAssessmentDPP(voUserAssessment);
    form.getGlobalContext().Nursing.setIsDppCompleted(Boolean.FALSE);

    form.setMode(FormMode.EDIT);

    openDPPDialog();
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if(formName.equals(form.getForms().Nursing.DailyPatientProgressDlg) && result.equals(DialogResult.OK))
    {
        PatientAssessmentVo voPatientAssessment = form.getGlobalContext().Nursing.getPatientAssessmentVo();
        PlanOfCareVoCollection planOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
        setPOCData(planOfCareColl, voPatientAssessment);
        form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatientAssessment);
        populateDetailsGrid(voPatientAssessment);
        displayScoreTotalInTree(voPatientAssessment);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onRecbrAssessmentValueChanged() throws PresentationLogicException
{
    PatientAssessmentRefVo voPatAssRefVo = form.recbrAssessment().getValue();
    //Context User for RIE only
    form.getLocalContext().setSelectedRecord(voPatAssRefVo);

    clearDPPQuestionGroupContext();
    if(voPatAssRefVo != null)
    {
        PatientAssessmentVo voPatAssessment = domain.getPatientAssessment(voPatAssRefVo);
        setIsDppAdmissionAssessment(voPatAssessment);
        PlanOfCareVoCollection planOfCareColl = listPOCRecords(voPatAssessment);
        setPOCData(planOfCareColl, voPatAssessment);
        form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatAssessment);
        form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
        form.getGlobalContext().Nursing.setIsDppCompleted(voPatAssessment != null && voPatAssessment.getStatusIsNotNull() && voPatAssessment.getStatus().equals(PatientAssessmentStatusReason.COMPLETED)?Boolean.TRUE:Boolean.FALSE);

        populateDetailsGrid(voPatAssessment);
        displayScoreTotalInTree(voPatAssessment);
    }
    //start WDEV-13887
    else
    {
        clearControlsAndContext();
    }

    updateControlState();  
    //end
}
项目:openMAXIMS    文件:Logic.java   
private Boolean getPocValue(AssessmentQuestionVo assessmentQuestion, PlanOfCareVoCollection pocVoColl)
{
    if(assessmentQuestion == null )
        return Boolean.FALSE;

    for (int i = 0; pocVoColl != null && i < pocVoColl.size(); i++)
    {
        if(pocVoColl.get(i).getAssessmentQuestionIsNotNull() && pocVoColl.get(i).getAssessmentQuestion().equals(assessmentQuestion))
            return Boolean.TRUE;
    }
    return Boolean.FALSE;
}
项目:openMAXIMS    文件:DailyPatientProgressImpl.java   
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
    if (patientAssessment == null)
        throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

    if (patientAssessment.isValidated() == false)
        throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

    if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
        throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

    DomainFactory factory = getDomainFactory();
    PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
    factory.save(doPatientAssessment);

    int countNewCarePlan = 0;
    for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
    {
        PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
        if (voPlanOfCare.getID_PlanOfCare() == null)
            countNewCarePlan++;
        PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
        factory.save(doPlanOfCare);
    }

    PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
    Integer newPlanOfCares = new Integer(countNewCarePlan);
    DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

    return item;
}
项目:openMAXIMS    文件:Logic.java   
private PlanOfCareVo getCurrentPlanOfCare(AssessmentQuestionVo voAssessmQuestion)
{
    PlanOfCareVoCollection voPlanOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
    for (int i = 0; voPlanOfCareColl != null && i < voPlanOfCareColl.size(); i++)
    {
        if (voPlanOfCareColl.get(i).getAssessmentQuestionIsNotNull() && voPlanOfCareColl.get(i).getAssessmentQuestion().equals(voAssessmQuestion))
            return voPlanOfCareColl.get(i);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private Boolean getPocValue(AssessmentQuestionVo assessmentQuestion, PlanOfCareVoCollection pocVoColl)
{
    if(assessmentQuestion == null )
        return Boolean.FALSE;

    for (int i = 0; pocVoColl != null && i < pocVoColl.size(); i++)
    {
        if(pocVoColl.get(i).getAssessmentQuestionIsNotNull() && pocVoColl.get(i).getAssessmentQuestion().equals(assessmentQuestion))
            return Boolean.TRUE;
    }
    return Boolean.FALSE;
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    //set in the context the current Assessment
    UserAssessmentVo voUserAssessment = domain.getCurrentDPPUserAssessment(UserDefinedAssessmentType.DPP);
    if(voUserAssessment == null)
    {
        engine.showMessage("No 'Active' Daily Patient Progress record exists on the system.");
        return;
    }

    clearControlsAndContext();

    //get the POC records based on Assessment Questions from Configuration
    PlanOfCareVoCollection planOfCareColl = listPOCRecords(voUserAssessment);

    //Get a copy of the new assessment - get the configured Questions
    PatientAssessmentVo voNewPatientAssessment = getNewPatientAssessment(voUserAssessment);
    if(voNewPatientAssessment != null)
    {
        setPOCData(planOfCareColl, voNewPatientAssessment);
    }

    form.getGlobalContext().Nursing.setPatientAssessmentVo(voNewPatientAssessment);
    form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
    form.getGlobalContext().Nursing.setUserAssessmentDPP(voUserAssessment);
    form.getGlobalContext().Nursing.setIsDppCompleted(Boolean.FALSE);

    form.setMode(FormMode.EDIT);

    openDPPDialog();
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if(formName.equals(form.getForms().Nursing.DailyPatientProgressDlg) && result.equals(DialogResult.OK))
    {
        PatientAssessmentVo voPatientAssessment = form.getGlobalContext().Nursing.getPatientAssessmentVo();
        PlanOfCareVoCollection planOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
        setPOCData(planOfCareColl, voPatientAssessment);
        form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatientAssessment);
        populateDetailsGrid(voPatientAssessment);
        displayScoreTotalInTree(voPatientAssessment);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onRecbrAssessmentValueChanged() throws PresentationLogicException
{
    PatientAssessmentRefVo voPatAssRefVo = form.recbrAssessment().getValue();
    //Context User for RIE only
    form.getLocalContext().setSelectedRecord(voPatAssRefVo);

    clearDPPQuestionGroupContext();
    if(voPatAssRefVo != null)
    {
        PatientAssessmentVo voPatAssessment = domain.getPatientAssessment(voPatAssRefVo);
        setIsDppAdmissionAssessment(voPatAssessment);
        PlanOfCareVoCollection planOfCareColl = listPOCRecords(voPatAssessment);
        setPOCData(planOfCareColl, voPatAssessment);
        form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatAssessment);
        form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
        form.getGlobalContext().Nursing.setIsDppCompleted(voPatAssessment != null && voPatAssessment.getStatusIsNotNull() && voPatAssessment.getStatus().equals(PatientAssessmentStatusReason.COMPLETED)?Boolean.TRUE:Boolean.FALSE);

        populateDetailsGrid(voPatAssessment);
        displayScoreTotalInTree(voPatAssessment);
    }
    //start WDEV-13887
    else
    {
        clearControlsAndContext();
    }

    updateControlState();  
    //end
}
项目:openMAXIMS    文件:Logic.java   
private Boolean getPocValue(AssessmentQuestionVo assessmentQuestion, PlanOfCareVoCollection pocVoColl)
{
    if(assessmentQuestion == null )
        return Boolean.FALSE;

    for (int i = 0; pocVoColl != null && i < pocVoColl.size(); i++)
    {
        if(pocVoColl.get(i).getAssessmentQuestionIsNotNull() && pocVoColl.get(i).getAssessmentQuestion().equals(assessmentQuestion))
            return Boolean.TRUE;
    }
    return Boolean.FALSE;
}
项目:openMAXIMS    文件:DailyPatientProgressImpl.java   
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
    if (patientAssessment == null)
        throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

    if (patientAssessment.isValidated() == false)
        throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

    if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
        throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

    DomainFactory factory = getDomainFactory();
    PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
    factory.save(doPatientAssessment);

    int countNewCarePlan = 0;
    for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
    {
        PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
        if (voPlanOfCare.getID_PlanOfCare() == null)
            countNewCarePlan++;
        PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
        factory.save(doPlanOfCare);
    }

    PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
    Integer newPlanOfCares = new Integer(countNewCarePlan);
    DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

    return item;
}
项目:openmaxims-linux    文件:Logic.java   
private PlanOfCareVo getCurrentPlanOfCare(AssessmentQuestionVo voAssessmQuestion)
{
    PlanOfCareVoCollection voPlanOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
    for (int i = 0; voPlanOfCareColl != null && i < voPlanOfCareColl.size(); i++)
    {
        if (voPlanOfCareColl.get(i).getAssessmentQuestionIsNotNull() && voPlanOfCareColl.get(i).getAssessmentQuestion().equals(voAssessmQuestion))
            return voPlanOfCareColl.get(i);
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private Boolean getPocValue(AssessmentQuestionVo assessmentQuestion, PlanOfCareVoCollection pocVoColl)
{
    if(assessmentQuestion == null )
        return Boolean.FALSE;

    for (int i = 0; pocVoColl != null && i < pocVoColl.size(); i++)
    {
        if(pocVoColl.get(i).getAssessmentQuestionIsNotNull() && pocVoColl.get(i).getAssessmentQuestion().equals(assessmentQuestion))
            return Boolean.TRUE;
    }
    return Boolean.FALSE;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
    //set in the context the current Assessment
    UserAssessmentVo voUserAssessment = domain.getCurrentDPPUserAssessment(UserDefinedAssessmentType.DPP);
    if(voUserAssessment == null)
    {
        engine.showMessage("No 'Active' Daily Patient Progress record exists on the system.");
        return;
    }

    clearControlsAndContext();

    //get the POC records based on Assessment Questions from Configuration
    PlanOfCareVoCollection planOfCareColl = listPOCRecords(voUserAssessment);

    //Get a copy of the new assessment - get the configured Questions
    PatientAssessmentVo voNewPatientAssessment = getNewPatientAssessment(voUserAssessment);
    if(voNewPatientAssessment != null)
    {
        setPOCData(planOfCareColl, voNewPatientAssessment);
    }

    form.getGlobalContext().Nursing.setPatientAssessmentVo(voNewPatientAssessment);
    form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
    form.getGlobalContext().Nursing.setUserAssessmentDPP(voUserAssessment);
    form.getGlobalContext().Nursing.setIsDppCompleted(Boolean.FALSE);

    form.setMode(FormMode.EDIT);

    openDPPDialog();
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if(formName.equals(form.getForms().Nursing.DailyPatientProgressDlg) && result.equals(DialogResult.OK))
    {
        PatientAssessmentVo voPatientAssessment = form.getGlobalContext().Nursing.getPatientAssessmentVo();
        PlanOfCareVoCollection planOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
        setPOCData(planOfCareColl, voPatientAssessment);
        form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatientAssessment);
        populateDetailsGrid(voPatientAssessment);
        displayScoreTotalInTree(voPatientAssessment);
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onRecbrAssessmentValueChanged() throws PresentationLogicException
{
    PatientAssessmentRefVo voPatAssRefVo = form.recbrAssessment().getValue();
    //Context User for RIE only
    form.getLocalContext().setSelectedRecord(voPatAssRefVo);

    clearDPPQuestionGroupContext();
    if(voPatAssRefVo != null)
    {
        PatientAssessmentVo voPatAssessment = domain.getPatientAssessment(voPatAssRefVo);
        setIsDppAdmissionAssessment(voPatAssessment);
        PlanOfCareVoCollection planOfCareColl = listPOCRecords(voPatAssessment);
        setPOCData(planOfCareColl, voPatAssessment);
        form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatAssessment);
        form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
        form.getGlobalContext().Nursing.setIsDppCompleted(voPatAssessment != null && voPatAssessment.getStatusIsNotNull() && voPatAssessment.getStatus().equals(PatientAssessmentStatusReason.COMPLETED)?Boolean.TRUE:Boolean.FALSE);

        populateDetailsGrid(voPatAssessment);
        displayScoreTotalInTree(voPatAssessment);
    }
    //start WDEV-13887
    else
    {
        clearControlsAndContext();
    }

    updateControlState();  
    //end
}
项目:openmaxims-linux    文件:Logic.java   
private Boolean getPocValue(AssessmentQuestionVo assessmentQuestion, PlanOfCareVoCollection pocVoColl)
{
    if(assessmentQuestion == null )
        return Boolean.FALSE;

    for (int i = 0; pocVoColl != null && i < pocVoColl.size(); i++)
    {
        if(pocVoColl.get(i).getAssessmentQuestionIsNotNull() && pocVoColl.get(i).getAssessmentQuestion().equals(assessmentQuestion))
            return Boolean.TRUE;
    }
    return Boolean.FALSE;
}
项目:openmaxims-linux    文件:DailyPatientProgressImpl.java   
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
    if (patientAssessment == null)
        throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

    if (patientAssessment.isValidated() == false)
        throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

    if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
        throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

    DomainFactory factory = getDomainFactory();
    PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
    factory.save(doPatientAssessment);

    int countNewCarePlan = 0;
    for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
    {
        PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
        if (voPlanOfCare.getID_PlanOfCare() == null)
            countNewCarePlan++;
        PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
        factory.save(doPlanOfCare);
    }

    PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
    Integer newPlanOfCares = new Integer(countNewCarePlan);
    DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

    return item;
}
项目:AvoinApotti    文件:Logic.java   
private boolean save() throws PresentationLogicException
{
    PlanOfCareVoCollection voPlanOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
    String[] pocErrors = null;
    if(voPlanOfCareColl != null)
    {
        pocErrors = voPlanOfCareColl.validate();
    }

    PatientAssessmentVo voPatAss = form.getGlobalContext().Nursing.getPatientAssessmentVo();

    //start WDEV-13871
    if (voPatAss == null || voPatAss.getPatient()== null ||voPatAss.getAuthoringInformation()==null )  //WDEV-15427
    {
        engine.showMessage("No Assessment has been selected");
        return  false;
    }
    //end

    //Set Status to In Progress
    boolean isNewAssessment = voPatAss.getID_PatientAssessment() == null;
    if(isNewAssessment && voPatAss.getStatusIsNotNull() && voPatAss.getStatus().equals(PatientAssessmentStatusReason.NOTCOMMENCED))
    {
        voPatAss.setStatus(PatientAssessmentStatusReason.INPROGRESS);
    }

    String[] errors = voPatAss.validate(pocErrors);
    if(errors != null)
    {
        engine.showErrors(errors);
        return false;
    }
    try
    {
        IDPPItem dppItem = domain.savePatientAssessment(voPatAss, voPlanOfCareColl);
        if(dppItem != null)
        {
            displayNewPlanOfCareMessage(dppItem);
            //Add and Refresh Assessment
            if(isNewAssessment)
            {
                //Refresh Record Browser Again
                prepopulateRecordBrowser();
                //addItemToRecordBrowser(dppItem.getPatientAssessment());
                form.recbrAssessment().setValue(dppItem.getPatientAssessment());
            }
            onRecbrAssessmentValueChanged();
        }
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        onRecbrAssessmentValueChanged(); 
        form.setMode(FormMode.VIEW);
        return false;
    }
    return true;
}
项目:AvoinApotti    文件:Logic.java   
private PlanOfCareVoCollection listPOCRecords(UserAssessmentVo voUserAssessment)
{
    AssessmentQuestionRefVoCollection assQRefVoColl = getAssessmentQuestions(voUserAssessment);
    return domain.listPlanOfCare(form.getGlobalContext().Core.getCurrentCareContext(), assQRefVoColl);
}
项目:AvoinApotti    文件:Logic.java   
private PlanOfCareVoCollection listPOCRecords(PatientAssessmentVo voPatAssessment)
{
    AssessmentQuestionRefVoCollection assQRefVoColl = getAssessmentQuestions(voPatAssessment);
    return domain.listPlanOfCare(form.getGlobalContext().Core.getCurrentCareContext(), assQRefVoColl);
}
项目:AvoinApotti    文件:DailyPatientProgressImpl.java   
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
    if (careContext == null)
        throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

    if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
        return null;

    StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
    ArrayList values = new ArrayList();
    ArrayList params = new ArrayList();

    query.append(" poc.status is not :status ");
    params.add("status");
    values.add(getDomLookup(PlanOfCareStatus.RESOLVED));

    if(careContext != null)
    {
        if(values.size() > 0)
            query.append(" and ");
        query.append("poc.careContext.id =:careContextID");
        params.add("careContextID");
        values.add(careContext.getID_CareContext());
    }

    if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
    {
        if (values.size() > 0)
            query.append(" and ");
        query.append(" poc.assessmentQuestion.id in ");
        query.append("(");
        for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
        {
            AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
            query.append(" :assQId" + Integer.toString(i));
            if (i < (assessmentQuestionRefVoColl.size() - 1))
                query.append(", ");
            params.add("assQId" + Integer.toString(i));
            values.add(voAssQ.getID_AssessmentQuestion());
        }
        query.append(")");
    }

    DomainFactory factory = getDomainFactory();
    List list = factory.find(query.toString(), params, values);

    return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}