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

项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControls(RepositioningPlanVo voRepositioningPlan, boolean bAnsFrequencyValueChanged) 
{
    if(voRepositioningPlan == null) return;

    form.ctnRepo().cmbFrequency().setValue(voRepositioningPlan.getPositioningFreq());
    form.ctnRepo().ansTest().setValue(voRepositioningPlan.getSkinToleranceTest());
    form.ctnRepo().cmbBlanching().setValue(voRepositioningPlan.getBlanching());

    if (!bAnsFrequencyValueChanged)
        form.ctnRepo().ansFrequency().setValue(voRepositioningPlan.getPositioningSuitable());

    form.ctnRepo().txtComments().setValue(voRepositioningPlan.getComment());
    form.ctnRepo().chkSides().setValues(voRepositioningPlan.getPosition());

    if(voRepositioningPlan.getAuthoringInformationIsNotNull())
    {
        form.ctnRepo().customAuthoring().setValue(voRepositioningPlan.getAuthoringInformation());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(RepositioningPlanVo voRepositioningPlan, boolean bAnsFrequencyValueChanged) 
{
    if(voRepositioningPlan == null) return;

    form.ctnRepo().cmbFrequency().setValue(voRepositioningPlan.getPositioningFreq());
    form.ctnRepo().ansTest().setValue(voRepositioningPlan.getSkinToleranceTest());
    form.ctnRepo().cmbBlanching().setValue(voRepositioningPlan.getBlanching());

    if (!bAnsFrequencyValueChanged)
        form.ctnRepo().ansFrequency().setValue(voRepositioningPlan.getPositioningSuitable());

    form.ctnRepo().txtComments().setValue(voRepositioningPlan.getComment());
    form.ctnRepo().chkSides().setValues(voRepositioningPlan.getPosition());

    if(voRepositioningPlan.getAuthoringInformationIsNotNull())
    {
        form.ctnRepo().customAuthoring().setValue(voRepositioningPlan.getAuthoringInformation());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(RepositioningPlanVo voRepositioningPlan, boolean bAnsFrequencyValueChanged) 
{
    if(voRepositioningPlan == null) return;

    form.ctnRepo().cmbFrequency().setValue(voRepositioningPlan.getPositioningFreq());
    form.ctnRepo().ansTest().setValue(voRepositioningPlan.getSkinToleranceTest());
    form.ctnRepo().cmbBlanching().setValue(voRepositioningPlan.getBlanching());

    if (!bAnsFrequencyValueChanged)
        form.ctnRepo().ansFrequency().setValue(voRepositioningPlan.getPositioningSuitable());

    form.ctnRepo().txtComments().setValue(voRepositioningPlan.getComment());
    form.ctnRepo().chkSides().setValues(voRepositioningPlan.getPosition());

    if(voRepositioningPlan.getAuthoringInformationIsNotNull())
    {
        form.ctnRepo().customAuthoring().setValue(voRepositioningPlan.getAuthoringInformation());
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateInstanceControls(RepositioningPlanVo voRepositioningPlan, boolean bAnsFrequencyValueChanged) 
{
    if(voRepositioningPlan == null) return;

    form.ctnRepo().cmbFrequency().setValue(voRepositioningPlan.getPositioningFreq());
    form.ctnRepo().ansTest().setValue(voRepositioningPlan.getSkinToleranceTest());
    form.ctnRepo().cmbBlanching().setValue(voRepositioningPlan.getBlanching());

    if (!bAnsFrequencyValueChanged)
        form.ctnRepo().ansFrequency().setValue(voRepositioningPlan.getPositioningSuitable());

    form.ctnRepo().txtComments().setValue(voRepositioningPlan.getComment());
    form.ctnRepo().chkSides().setValues(voRepositioningPlan.getPosition());

    if(voRepositioningPlan.getAuthoringInformationIsNotNull())
    {
        form.ctnRepo().customAuthoring().setValue(voRepositioningPlan.getAuthoringInformation());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addResositioningPlanningRecord()
{
    RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext());
    if(voRepositioningPlan != null)
    {
        addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateListControl(RepositioningPlanVoCollection voRepositioningPlanColl) 
{
    if(voRepositioningPlanColl == null) return;

    for(int i=0; i<voRepositioningPlanColl.size(); i++)
    {
        RepositioningPlanVo voRepositioningPlan = voRepositioningPlanColl.get(i);
        GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow();
        if(voRepositioningPlan.getAuthoringInformation() != null)
        {
            AuthoringInformationVo voInfo = voRepositioningPlan.getAuthoringInformation();
            String authoringInfo = "";
            if(voInfo.getAuthoringDateTimeIsNotNull())
                authoringInfo += voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime().toString();
            if(voInfo.getAuthoringHcpIsNotNull())
                authoringInfo += " - " + voRepositioningPlan.getAuthoringInformation().getAuthoringHcp().toString();
            row.setColDateTime(authoringInfo);
        }
        if(voRepositioningPlan.getPositioningFreqIsNotNull())
            row.setColFrequency(voRepositioningPlan.getPositioningFreq().toString());
        if(voRepositioningPlan.getBlanchingIsNotNull())
            row.setColBlanching(voRepositioningPlan.getBlanching().toString());
        row.setColSides(getPosition(voRepositioningPlan.getPosition()));
        row.setColSkinTest(voRepositioningPlan.getSkinToleranceTest());

        row.setValue(voRepositioningPlan);
    }

    if(voRepositioningPlanColl != null && voRepositioningPlanColl.size() != 0)
        form.getLocalContext().setpreviousRepositioningPlan(voRepositioningPlanColl.get(0));
}
项目:AvoinApotti    文件:Logic.java   
private boolean save() 
{
    RepositioningPlanVo voRepositioningPlan = populateInstanceData();

    voRepositioningPlan.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voRepositioningPlan.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    /*  WDEV-13175ArrayList screenErrors = new ArrayList();

    if(form.ctnRepo().customAuthoring().getValue() == null)
    {
        if (form.ctnRepo().customAuthoring().getValue().getAuthoringHcp() == null)
        {
            screenErrors.add("Authoring HCP is mandatory.");
        }
        if (form.ctnRepo().customAuthoring().getValue().getAuthoringDateTime() == null)
        {
            screenErrors.add("Authoring Date/Time is mandatory.");              
        }
    }*/

    String[] errors =  voRepositioningPlan.validate();  //  WDEV-13175
    //String[] arrScreenAndVoErrors = addScreenErrorsToVOErrors(screenErrors, arrErrors);   WDEV-13175
    if(errors!= null && errors.length != 0)//   WDEV-13175
    {
        engine.showErrors(errors);
        return false;
    }
    try 
    {
        form.getLocalContext().setRepositioningPlan(domain.saveRepositioningPlan(voRepositioningPlan));
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void populateResositioningPlanningRecord()
{
    RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext());
    if(voRepositioningPlan != null)
    {
        addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void viewAssessmentRecord()
{
    Object value = form.grdSummary().getValue();
    if (value instanceof BradenScale)
    {
        engine.open(form.getForms().Nursing.BradenScaleVIEW);
    }
    if (value instanceof MUSTVo)
    {
        engine.open(form.getForms().Nursing.MUST);
    }

    if (value instanceof PatientAssessmentListVo)
    {
        PatientAssessmentListVo voPatAsssess = (PatientAssessmentListVo) value;
        UserDefinedAssessmentType userDefinedAssessmentType = null;
        if (voPatAsssess.getAssessmentDataIsNotNull() && voPatAsssess.getAssessmentData().getGraphicIsNotNull())
            userDefinedAssessmentType = voPatAsssess.getAssessmentData().getGraphic().getAssessmentType();
        if (userDefinedAssessmentType != null)
        {
            if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.PAINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStagesPain);
            else if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.SKINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStages);
        }
    }

    if(value instanceof RepositioningPlanVo)
    {
        engine.open(form.getForms().Nursing.RepositioningPlan);
    }
}
项目:AvoinApotti    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from RepositioningPlan rp ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(" where ");
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc ");

    List plan = factory.find(hql.toString(), markers, values);  
    if(plan != null && plan.size() > 1)
    {
        Object firstItem = plan.get(0);
        plan.removeAll(plan);
        plan.add(firstItem);
    }

    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null && collRepositioningPlanVo.size() > 0)
        return collRepositioningPlanVo.get(0);

    return null;
}
项目:AvoinApotti    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo saveRepositioningPlan(RepositioningPlanVo voRepositioningPlan) throws StaleObjectException 
{
    if(!voRepositioningPlan.isValidated())
        throw new DomainRuntimeException("This Repositioning Plan has not been validated");

    DomainFactory factory = getDomainFactory();
    RepositioningPlan doRepositioning = RepositioningPlanVoAssembler.extractRepositioningPlan(factory, voRepositioningPlan);
    factory.save(doRepositioning);
    return RepositioningPlanVoAssembler.create(doRepositioning);
}
项目:openMAXIMS    文件:Logic.java   
private void addResositioningPlanningRecord()
{
    RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext());
    if(voRepositioningPlan != null)
    {
        addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateListControl(RepositioningPlanVoCollection voRepositioningPlanColl) 
{
    if(voRepositioningPlanColl == null) return;

    for(int i=0; i<voRepositioningPlanColl.size(); i++)
    {
        RepositioningPlanVo voRepositioningPlan = voRepositioningPlanColl.get(i);
        GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow();
        if(voRepositioningPlan.getAuthoringInformation() != null)
        {
            AuthoringInformationVo voInfo = voRepositioningPlan.getAuthoringInformation();
            String authoringInfo = "";
            if(voInfo.getAuthoringDateTimeIsNotNull())
                authoringInfo += voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime().toString();
            if(voInfo.getAuthoringHcpIsNotNull())
                authoringInfo += " - " + voRepositioningPlan.getAuthoringInformation().getAuthoringHcp().toString();
            row.setColDateTime(authoringInfo);
        }
        if(voRepositioningPlan.getPositioningFreqIsNotNull())
            row.setColFrequency(voRepositioningPlan.getPositioningFreq().toString());
        if(voRepositioningPlan.getBlanchingIsNotNull())
            row.setColBlanching(voRepositioningPlan.getBlanching().toString());
        row.setColSides(getPosition(voRepositioningPlan.getPosition()));
        row.setColSkinTest(voRepositioningPlan.getSkinToleranceTest());

        row.setValue(voRepositioningPlan);
    }

    if(voRepositioningPlanColl != null && voRepositioningPlanColl.size() != 0)
        form.getLocalContext().setpreviousRepositioningPlan(voRepositioningPlanColl.get(0));
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    RepositioningPlanVo voRepositioningPlan = populateInstanceData();

    voRepositioningPlan.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voRepositioningPlan.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    /*  WDEV-13175ArrayList screenErrors = new ArrayList();

    if(form.ctnRepo().customAuthoring().getValue() == null)
    {
        if (form.ctnRepo().customAuthoring().getValue().getAuthoringHcp() == null)
        {
            screenErrors.add("Authoring HCP is mandatory.");
        }
        if (form.ctnRepo().customAuthoring().getValue().getAuthoringDateTime() == null)
        {
            screenErrors.add("Authoring Date/Time is mandatory.");              
        }
    }*/

    String[] errors =  voRepositioningPlan.validate();  //  WDEV-13175
    //String[] arrScreenAndVoErrors = addScreenErrorsToVOErrors(screenErrors, arrErrors);   WDEV-13175
    if(errors!= null && errors.length != 0)//   WDEV-13175
    {
        engine.showErrors(errors);
        return false;
    }
    try 
    {
        form.getLocalContext().setRepositioningPlan(domain.saveRepositioningPlan(voRepositioningPlan));
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void populateResositioningPlanningRecord()
{
    RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext());
    if(voRepositioningPlan != null)
    {
        addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void viewAssessmentRecord()
{
    Object value = form.grdSummary().getValue();
    if (value instanceof BradenScale)
    {
        engine.open(form.getForms().Nursing.BradenScaleVIEW);
    }
    if (value instanceof MUSTVo)
    {
        engine.open(form.getForms().Nursing.MUST);
    }

    if (value instanceof PatientAssessmentListVo)
    {
        PatientAssessmentListVo voPatAsssess = (PatientAssessmentListVo) value;
        UserDefinedAssessmentType userDefinedAssessmentType = null;
        if (voPatAsssess.getAssessmentDataIsNotNull() && voPatAsssess.getAssessmentData().getGraphicIsNotNull())
            userDefinedAssessmentType = voPatAsssess.getAssessmentData().getGraphic().getAssessmentType();
        if (userDefinedAssessmentType != null)
        {
            if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.PAINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStagesPain);
            else if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.SKINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStages);
        }
    }

    if(value instanceof RepositioningPlanVo)
    {
        engine.open(form.getForms().Nursing.RepositioningPlan);
    }
}
项目:openMAXIMS    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from RepositioningPlan rp ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(" where ");
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc ");

    List plan = factory.find(hql.toString(), markers, values);  
    if(plan != null && plan.size() > 1)
    {
        Object firstItem = plan.get(0);
        plan.removeAll(plan);
        plan.add(firstItem);
    }

    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null && collRepositioningPlanVo.size() > 0)
        return collRepositioningPlanVo.get(0);

    return null;
}
项目:openMAXIMS    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo saveRepositioningPlan(RepositioningPlanVo voRepositioningPlan) throws StaleObjectException 
{
    if(!voRepositioningPlan.isValidated())
        throw new DomainRuntimeException("This Repositioning Plan has not been validated");

    DomainFactory factory = getDomainFactory();
    RepositioningPlan doRepositioning = RepositioningPlanVoAssembler.extractRepositioningPlan(factory, voRepositioningPlan);
    factory.save(doRepositioning);
    return RepositioningPlanVoAssembler.create(doRepositioning);
}
项目:openMAXIMS    文件:Logic.java   
private void addResositioningPlanningRecord()
{
    RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext());
    if(voRepositioningPlan != null)
    {
        addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateListControl(RepositioningPlanVoCollection voRepositioningPlanColl) 
{
    if(voRepositioningPlanColl == null) return;

    for(int i=0; i<voRepositioningPlanColl.size(); i++)
    {
        RepositioningPlanVo voRepositioningPlan = voRepositioningPlanColl.get(i);
        GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow();
        if(voRepositioningPlan.getAuthoringInformation() != null)
        {
            AuthoringInformationVo voInfo = voRepositioningPlan.getAuthoringInformation();
            String authoringInfo = "";
            if(voInfo.getAuthoringDateTimeIsNotNull())
                authoringInfo += voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime().toString();
            if(voInfo.getAuthoringHcpIsNotNull())
                authoringInfo += " - " + voRepositioningPlan.getAuthoringInformation().getAuthoringHcp().toString();
            row.setColDateTime(authoringInfo);
        }
        if(voRepositioningPlan.getPositioningFreqIsNotNull())
            row.setColFrequency(voRepositioningPlan.getPositioningFreq().toString());
        if(voRepositioningPlan.getBlanchingIsNotNull())
            row.setColBlanching(voRepositioningPlan.getBlanching().toString());
        row.setColSides(getPosition(voRepositioningPlan.getPosition()));
        row.setColSkinTest(voRepositioningPlan.getSkinToleranceTest());

        row.setValue(voRepositioningPlan);
    }

    if(voRepositioningPlanColl != null && voRepositioningPlanColl.size() != 0)
        form.getLocalContext().setpreviousRepositioningPlan(voRepositioningPlanColl.get(0));
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    RepositioningPlanVo voRepositioningPlan = populateInstanceData();

    voRepositioningPlan.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voRepositioningPlan.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    /*  WDEV-13175ArrayList screenErrors = new ArrayList();

    if(form.ctnRepo().customAuthoring().getValue() == null)
    {
        if (form.ctnRepo().customAuthoring().getValue().getAuthoringHcp() == null)
        {
            screenErrors.add("Authoring HCP is mandatory.");
        }
        if (form.ctnRepo().customAuthoring().getValue().getAuthoringDateTime() == null)
        {
            screenErrors.add("Authoring Date/Time is mandatory.");              
        }
    }*/

    String[] errors =  voRepositioningPlan.validate();  //  WDEV-13175
    //String[] arrScreenAndVoErrors = addScreenErrorsToVOErrors(screenErrors, arrErrors);   WDEV-13175
    if(errors!= null && errors.length != 0)//   WDEV-13175
    {
        engine.showErrors(errors);
        return false;
    }
    try 
    {
        form.getLocalContext().setRepositioningPlan(domain.saveRepositioningPlan(voRepositioningPlan));
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void populateResositioningPlanningRecord()
{
    RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext());
    if(voRepositioningPlan != null)
    {
        addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void viewAssessmentRecord()
{
    Object value = form.grdSummary().getValue();
    if (value instanceof BradenScale)
    {
        engine.open(form.getForms().Nursing.BradenScaleVIEW);
    }
    if (value instanceof MUSTVo)
    {
        engine.open(form.getForms().Nursing.MUST);
    }

    if (value instanceof PatientAssessmentListVo)
    {
        PatientAssessmentListVo voPatAsssess = (PatientAssessmentListVo) value;
        UserDefinedAssessmentType userDefinedAssessmentType = null;
        if (voPatAsssess.getAssessmentDataIsNotNull() && voPatAsssess.getAssessmentData().getGraphicIsNotNull())
            userDefinedAssessmentType = voPatAsssess.getAssessmentData().getGraphic().getAssessmentType();
        if (userDefinedAssessmentType != null)
        {
            if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.PAINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStagesPain);
            else if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.SKINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStages);
        }
    }

    if(value instanceof RepositioningPlanVo)
    {
        engine.open(form.getForms().Nursing.RepositioningPlan);
    }
}
项目:openMAXIMS    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from RepositioningPlan rp ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(" where ");
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc ");

    List plan = factory.find(hql.toString(), markers, values);  
    if(plan != null && plan.size() > 1)
    {
        Object firstItem = plan.get(0);
        plan.removeAll(plan);
        plan.add(firstItem);
    }

    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null && collRepositioningPlanVo.size() > 0)
        return collRepositioningPlanVo.get(0);

    return null;
}
项目:openMAXIMS    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo saveRepositioningPlan(RepositioningPlanVo voRepositioningPlan) throws StaleObjectException 
{
    if(!voRepositioningPlan.isValidated())
        throw new DomainRuntimeException("This Repositioning Plan has not been validated");

    DomainFactory factory = getDomainFactory();
    RepositioningPlan doRepositioning = RepositioningPlanVoAssembler.extractRepositioningPlan(factory, voRepositioningPlan);
    factory.save(doRepositioning);
    return RepositioningPlanVoAssembler.create(doRepositioning);
}
项目:openmaxims-linux    文件:Logic.java   
private void addResositioningPlanningRecord()
{
    RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext());
    if(voRepositioningPlan != null)
    {
        addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateListControl(RepositioningPlanVoCollection voRepositioningPlanColl) 
{
    if(voRepositioningPlanColl == null) return;

    for(int i=0; i<voRepositioningPlanColl.size(); i++)
    {
        RepositioningPlanVo voRepositioningPlan = voRepositioningPlanColl.get(i);
        GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow();
        if(voRepositioningPlan.getAuthoringInformation() != null)
        {
            AuthoringInformationVo voInfo = voRepositioningPlan.getAuthoringInformation();
            String authoringInfo = "";
            if(voInfo.getAuthoringDateTimeIsNotNull())
                authoringInfo += voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime().toString();
            if(voInfo.getAuthoringHcpIsNotNull())
                authoringInfo += " - " + voRepositioningPlan.getAuthoringInformation().getAuthoringHcp().toString();
            row.setColDateTime(authoringInfo);
        }
        if(voRepositioningPlan.getPositioningFreqIsNotNull())
            row.setColFrequency(voRepositioningPlan.getPositioningFreq().toString());
        if(voRepositioningPlan.getBlanchingIsNotNull())
            row.setColBlanching(voRepositioningPlan.getBlanching().toString());
        row.setColSides(getPosition(voRepositioningPlan.getPosition()));
        row.setColSkinTest(voRepositioningPlan.getSkinToleranceTest());

        row.setValue(voRepositioningPlan);
    }

    if(voRepositioningPlanColl != null && voRepositioningPlanColl.size() != 0)
        form.getLocalContext().setpreviousRepositioningPlan(voRepositioningPlanColl.get(0));
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save() 
{
    RepositioningPlanVo voRepositioningPlan = populateInstanceData();

    voRepositioningPlan.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voRepositioningPlan.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    /*  WDEV-13175ArrayList screenErrors = new ArrayList();

    if(form.ctnRepo().customAuthoring().getValue() == null)
    {
        if (form.ctnRepo().customAuthoring().getValue().getAuthoringHcp() == null)
        {
            screenErrors.add("Authoring HCP is mandatory.");
        }
        if (form.ctnRepo().customAuthoring().getValue().getAuthoringDateTime() == null)
        {
            screenErrors.add("Authoring Date/Time is mandatory.");              
        }
    }*/

    String[] errors =  voRepositioningPlan.validate();  //  WDEV-13175
    //String[] arrScreenAndVoErrors = addScreenErrorsToVOErrors(screenErrors, arrErrors);   WDEV-13175
    if(errors!= null && errors.length != 0)//   WDEV-13175
    {
        engine.showErrors(errors);
        return false;
    }
    try 
    {
        form.getLocalContext().setRepositioningPlan(domain.saveRepositioningPlan(voRepositioningPlan));
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateResositioningPlanningRecord()
{
    RepositioningPlanVo voRepositioningPlan = domain.getLastCompletedRepositioningPlan(form.getGlobalContext().Core.getCurrentCareContext());
    if(voRepositioningPlan != null)
    {
        addNewAssessmentRow(voRepositioningPlan, "Repositioning Plan", voRepositioningPlan.getAuthoringInformationIsNotNull()?voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime():null);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void viewAssessmentRecord()
{
    Object value = form.grdSummary().getValue();
    if (value instanceof BradenScale)
    {
        engine.open(form.getForms().Nursing.BradenScaleVIEW);
    }
    if (value instanceof MUSTVo)
    {
        engine.open(form.getForms().Nursing.MUST);
    }

    if (value instanceof PatientAssessmentListVo)
    {
        PatientAssessmentListVo voPatAsssess = (PatientAssessmentListVo) value;
        UserDefinedAssessmentType userDefinedAssessmentType = null;
        if (voPatAsssess.getAssessmentDataIsNotNull() && voPatAsssess.getAssessmentData().getGraphicIsNotNull())
            userDefinedAssessmentType = voPatAsssess.getAssessmentData().getGraphic().getAssessmentType();
        if (userDefinedAssessmentType != null)
        {
            if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.PAINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStagesPain);
            else if (userDefinedAssessmentType.equals(UserDefinedAssessmentType.SKINASSESSMENT))
                engine.open(form.getForms().Assessment.PatientGraphicStages);
        }
    }

    if(value instanceof RepositioningPlanVo)
    {
        engine.open(form.getForms().Nursing.RepositioningPlan);
    }
}
项目:openmaxims-linux    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from RepositioningPlan rp ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(" where ");
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc ");

    List plan = factory.find(hql.toString(), markers, values);  
    if(plan != null && plan.size() > 1)
    {
        Object firstItem = plan.get(0);
        plan.removeAll(plan);
        plan.add(firstItem);
    }

    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null && collRepositioningPlanVo.size() > 0)
        return collRepositioningPlanVo.get(0);

    return null;
}
项目:openmaxims-linux    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo saveRepositioningPlan(RepositioningPlanVo voRepositioningPlan) throws StaleObjectException 
{
    if(!voRepositioningPlan.isValidated())
        throw new DomainRuntimeException("This Repositioning Plan has not been validated");

    DomainFactory factory = getDomainFactory();
    RepositioningPlan doRepositioning = RepositioningPlanVoAssembler.extractRepositioningPlan(factory, voRepositioningPlan);
    factory.save(doRepositioning);
    return RepositioningPlanVoAssembler.create(doRepositioning);
}
项目:AvoinApotti    文件:NursingSummaryImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef)
{
    DailyPatientProgress impl = (DailyPatientProgress) getDomainImpl(DailyPatientProgressImpl.class);
    return impl.getLastCompletedRepositioningPlan(voCareContextRef);
}
项目:AvoinApotti    文件:DailyPatientProgressImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef)
{
    RepositioningPlan repositioningPlanImpl = (RepositioningPlan) getDomainImpl(RepositioningPlanImpl.class);
    return repositioningPlanImpl.getLastCompletedRepositioningPlan(voCareContextRef);
}
项目:openMAXIMS    文件:NursingSummaryImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef)
{
    DailyPatientProgress impl = (DailyPatientProgress) getDomainImpl(DailyPatientProgressImpl.class);
    return impl.getLastCompletedRepositioningPlan(voCareContextRef);
}
项目:openMAXIMS    文件:DailyPatientProgressImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef)
{
    RepositioningPlan repositioningPlanImpl = (RepositioningPlan) getDomainImpl(RepositioningPlanImpl.class);
    return repositioningPlanImpl.getLastCompletedRepositioningPlan(voCareContextRef);
}
项目:openMAXIMS    文件:NursingSummaryImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef)
{
    DailyPatientProgress impl = (DailyPatientProgress) getDomainImpl(DailyPatientProgressImpl.class);
    return impl.getLastCompletedRepositioningPlan(voCareContextRef);
}
项目:openMAXIMS    文件:DailyPatientProgressImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef)
{
    RepositioningPlan repositioningPlanImpl = (RepositioningPlan) getDomainImpl(RepositioningPlanImpl.class);
    return repositioningPlanImpl.getLastCompletedRepositioningPlan(voCareContextRef);
}
项目:openmaxims-linux    文件:NursingSummaryImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef)
{
    DailyPatientProgress impl = (DailyPatientProgress) getDomainImpl(DailyPatientProgressImpl.class);
    return impl.getLastCompletedRepositioningPlan(voCareContextRef);
}
项目:openmaxims-linux    文件:DailyPatientProgressImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef)
{
    RepositioningPlan repositioningPlanImpl = (RepositioningPlan) getDomainImpl(RepositioningPlanImpl.class);
    return repositioningPlanImpl.getLastCompletedRepositioningPlan(voCareContextRef);
}