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

项目:AvoinApotti    文件:Logic.java   
protected void onBAddClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.textAddAction().getValue() == null)
    {
        engine.showMessage("Cannot add an empty action");
        return;
    }
    Integer x = new Integer(form.textAddAction().getValue().length());
    Integer config = new Integer(ConfigFlag.UI.CAREPLAN_ACTION_TEXT_LENGTH.getValue());
    if (x.intValue() > config.intValue())
    {
        engine.showMessage("Care Plan Action can be no more than " + ConfigFlag.UI.CAREPLAN_ACTION_TEXT_LENGTH.getValue() + " characters");
        return;
    }

    GenForm.gridCarePlanRow row = form.gridCarePlan().getRows().newRow();
    row.setValue(new CarePlanTemplateIntervention());
    row.setcolActions(form.textAddAction().getValue());
    row.setColSelected(true);
    form.textAddAction().setValue(null);
    form.textAddAction().setFocus();

}
项目:AvoinApotti    文件:Logic.java   
private CarePlanInterventions getInteventionFromTemplate(CarePlanTemplateIntervention template)
{
    CarePlanInterventions result = new CarePlanInterventions();
    Object Object = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteVo = Object!=null?(HcpLiteVo)Object:null;
    result.setDescription(template.getIntervention());
    result.setActive(new Boolean(true));


    result.setStartBy(hcpLiteVo);

    result.setInterventionType(template.getInterventionType());
    result.setOrder(form.getLocalContext().getCarePlan().getInterventions() == null ? 0:form.getLocalContext().getCarePlan().getInterventions().size());
    result.setStartDate(new Date());
    return result;
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{
    CarePlanTemplateInterventionCollection coll = form.getGlobalContext().COE.getCarePlanTemplateInterventions();
    if (coll != null)
    {
        GenForm.gridActionsRow row;
        form.gridActions().getRows().clear();
        for (int i=0; i<coll.size(); i++)
        {
            CarePlanTemplateIntervention interv = coll.get(i);
            //27/10/2004 - Sinead request - don't display the inactive
            if(interv.getActiveIsNotNull() && interv.getActive().booleanValue())
            {
                interv.setIntervention(interv.getIntervention());
                row = form.gridActions().getRows().newRow();
                row.setColActions(interv.getIntervention());
                row.setValue(interv);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onBAddClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.textAddAction().getValue() == null)
    {
        engine.showMessage("Cannot add an empty action");
        return;
    }
    Integer x = new Integer(form.textAddAction().getValue().length());
    Integer config = new Integer(ConfigFlag.UI.CAREPLAN_ACTION_TEXT_LENGTH.getValue());
    if (x.intValue() > config.intValue())
    {
        engine.showMessage("Care Plan Action can be no more than " + ConfigFlag.UI.CAREPLAN_ACTION_TEXT_LENGTH.getValue() + " characters");
        return;
    }

    GenForm.gridCarePlanRow row = form.gridCarePlan().getRows().newRow();
    row.setValue(new CarePlanTemplateIntervention());
    row.setcolActions(form.textAddAction().getValue());
    row.setColSelected(true);
    form.textAddAction().setValue(null);
    form.textAddAction().setFocus();

}
项目:openMAXIMS    文件:Logic.java   
private CarePlanInterventions getInteventionFromTemplate(CarePlanTemplateIntervention template)
{
    CarePlanInterventions result = new CarePlanInterventions();
    Object Object = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteVo = Object!=null?(HcpLiteVo)Object:null;
    result.setDescription(template.getIntervention());
    result.setActive(new Boolean(true));


    result.setStartBy(hcpLiteVo);

    result.setInterventionType(template.getInterventionType());
    result.setOrder(form.getLocalContext().getCarePlan().getInterventions() == null ? 0:form.getLocalContext().getCarePlan().getInterventions().size());
    result.setStartDate(new Date());
    return result;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{
    CarePlanTemplateInterventionCollection coll = form.getGlobalContext().COE.getCarePlanTemplateInterventions();
    if (coll != null)
    {
        GenForm.gridActionsRow row;
        form.gridActions().getRows().clear();
        for (int i=0; i<coll.size(); i++)
        {
            CarePlanTemplateIntervention interv = coll.get(i);
            //27/10/2004 - Sinead request - don't display the inactive
            if(interv.getActiveIsNotNull() && interv.getActive().booleanValue())
            {
                interv.setIntervention(interv.getIntervention());
                row = form.gridActions().getRows().newRow();
                row.setColActions(interv.getIntervention());
                row.setValue(interv);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onBAddClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.textAddAction().getValue() == null)
    {
        engine.showMessage("Cannot add an empty action");
        return;
    }
    Integer x = new Integer(form.textAddAction().getValue().length());
    Integer config = new Integer(ConfigFlag.UI.CAREPLAN_ACTION_TEXT_LENGTH.getValue());
    if (x.intValue() > config.intValue())
    {
        engine.showMessage("Care Plan Action can be no more than " + ConfigFlag.UI.CAREPLAN_ACTION_TEXT_LENGTH.getValue() + " characters");
        return;
    }

    GenForm.gridCarePlanRow row = form.gridCarePlan().getRows().newRow();
    row.setValue(new CarePlanTemplateIntervention());
    row.setcolActions(form.textAddAction().getValue());
    row.setColSelected(true);
    form.textAddAction().setValue(null);
    form.textAddAction().setFocus();

}
项目:openMAXIMS    文件:Logic.java   
private CarePlanInterventions getInteventionFromTemplate(CarePlanTemplateIntervention template)
{
    CarePlanInterventions result = new CarePlanInterventions();
    Object Object = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteVo = Object!=null?(HcpLiteVo)Object:null;
    result.setDescription(template.getIntervention());
    result.setActive(new Boolean(true));


    result.setStartBy(hcpLiteVo);

    result.setInterventionType(template.getInterventionType());
    result.setOrder(form.getLocalContext().getCarePlan().getInterventions() == null ? 0:form.getLocalContext().getCarePlan().getInterventions().size());
    result.setStartDate(new Date());
    return result;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{
    CarePlanTemplateInterventionCollection coll = form.getGlobalContext().COE.getCarePlanTemplateInterventions();
    if (coll != null)
    {
        GenForm.gridActionsRow row;
        form.gridActions().getRows().clear();
        for (int i=0; i<coll.size(); i++)
        {
            CarePlanTemplateIntervention interv = coll.get(i);
            //27/10/2004 - Sinead request - don't display the inactive
            if(interv.getActiveIsNotNull() && interv.getActive().booleanValue())
            {
                interv.setIntervention(interv.getIntervention());
                row = form.gridActions().getRows().newRow();
                row.setColActions(interv.getIntervention());
                row.setValue(interv);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBAddClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.textAddAction().getValue() == null)
    {
        engine.showMessage("Cannot add an empty action");
        return;
    }
    Integer x = new Integer(form.textAddAction().getValue().length());
    Integer config = new Integer(ConfigFlag.UI.CAREPLAN_ACTION_TEXT_LENGTH.getValue());
    if (x.intValue() > config.intValue())
    {
        engine.showMessage("Care Plan Action can be no more than " + ConfigFlag.UI.CAREPLAN_ACTION_TEXT_LENGTH.getValue() + " characters");
        return;
    }

    GenForm.gridCarePlanRow row = form.gridCarePlan().getRows().newRow();
    row.setValue(new CarePlanTemplateIntervention());
    row.setcolActions(form.textAddAction().getValue());
    row.setColSelected(true);
    form.textAddAction().setValue(null);
    form.textAddAction().setFocus();

}
项目:openmaxims-linux    文件:Logic.java   
private CarePlanInterventions getInteventionFromTemplate(CarePlanTemplateIntervention template)
{
    CarePlanInterventions result = new CarePlanInterventions();
    Object Object = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteVo = Object!=null?(HcpLiteVo)Object:null;
    result.setDescription(template.getIntervention());
    result.setActive(new Boolean(true));


    result.setStartBy(hcpLiteVo);

    result.setInterventionType(template.getInterventionType());
    result.setOrder(form.getLocalContext().getCarePlan().getInterventions() == null ? 0:form.getLocalContext().getCarePlan().getInterventions().size());
    result.setStartDate(new Date());
    return result;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{
    CarePlanTemplateInterventionCollection coll = form.getGlobalContext().COE.getCarePlanTemplateInterventions();
    if (coll != null)
    {
        GenForm.gridActionsRow row;
        form.gridActions().getRows().clear();
        for (int i=0; i<coll.size(); i++)
        {
            CarePlanTemplateIntervention interv = coll.get(i);
            //27/10/2004 - Sinead request - don't display the inactive
            if(interv.getActiveIsNotNull() && interv.getActive().booleanValue())
            {
                interv.setIntervention(interv.getIntervention());
                row = form.gridActions().getRows().newRow();
                row.setColActions(interv.getIntervention());
                row.setValue(interv);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void selectAllFromCarePlanActionGrid() 
{
    for(int i=0; i<form.gridCarePlan().getRows().size(); i++)
    {
        gridCarePlanRow row = form.gridCarePlan().getRows().get(i);

        if(row.getValue() instanceof CarePlanTemplateIntervention && ((row.getValue().getInterventionType() != null && row.getValue().getInterventionType().equals(CarePlanInterventionManOpt.OPTIONAL)) || row.getValue().getInterventionType() == null))
            row.setColSelected(form.chkSelectAll().getValue());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void newInterventionRow()
{
    // add an intervention row
    GenForm.gridInterventionsRow row;
    row = form.gridInterventions().getRows().newRow();
    row.setValue(new CarePlanTemplateIntervention());
    row.setColActive(true);
}
项目:openMAXIMS    文件:Logic.java   
private void selectAllFromCarePlanActionGrid() 
{
    for(int i=0; i<form.gridCarePlan().getRows().size(); i++)
    {
        gridCarePlanRow row = form.gridCarePlan().getRows().get(i);

        if(row.getValue() instanceof CarePlanTemplateIntervention && ((row.getValue().getInterventionType() != null && row.getValue().getInterventionType().equals(CarePlanInterventionManOpt.OPTIONAL)) || row.getValue().getInterventionType() == null))
            row.setColSelected(form.chkSelectAll().getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void newInterventionRow()
{
    // add an intervention row
    GenForm.gridInterventionsRow row;
    row = form.gridInterventions().getRows().newRow();
    row.setValue(new CarePlanTemplateIntervention());
    row.setColActive(true);
}
项目:openMAXIMS    文件:Logic.java   
private void selectAllFromCarePlanActionGrid() 
{
    for(int i=0; i<form.gridCarePlan().getRows().size(); i++)
    {
        gridCarePlanRow row = form.gridCarePlan().getRows().get(i);

        if(row.getValue() instanceof CarePlanTemplateIntervention && ((row.getValue().getInterventionType() != null && row.getValue().getInterventionType().equals(CarePlanInterventionManOpt.OPTIONAL)) || row.getValue().getInterventionType() == null))
            row.setColSelected(form.chkSelectAll().getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void newInterventionRow()
{
    // add an intervention row
    GenForm.gridInterventionsRow row;
    row = form.gridInterventions().getRows().newRow();
    row.setValue(new CarePlanTemplateIntervention());
    row.setColActive(true);
}
项目:openmaxims-linux    文件:Logic.java   
private void selectAllFromCarePlanActionGrid() 
{
    for(int i=0; i<form.gridCarePlan().getRows().size(); i++)
    {
        gridCarePlanRow row = form.gridCarePlan().getRows().get(i);

        if(row.getValue() instanceof CarePlanTemplateIntervention && ((row.getValue().getInterventionType() != null && row.getValue().getInterventionType().equals(CarePlanInterventionManOpt.OPTIONAL)) || row.getValue().getInterventionType() == null))
            row.setColSelected(form.chkSelectAll().getValue());
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void newInterventionRow()
{
    // add an intervention row
    GenForm.gridInterventionsRow row;
    row = form.gridInterventions().getRows().newRow();
    row.setValue(new CarePlanTemplateIntervention());
    row.setColActive(true);
}
项目:openmaxims-linux    文件:Logic.java   
private void displayInterventions()
{
    form.gridInterventions().setValue(null);
    if (form.getLocalContext().getcarePlanTemplate() != null)
    {
        CarePlanTemplateInterventionCollection voCptInterColl;
        if ((voCptInterColl = form.getLocalContext().getcarePlanTemplate().getInterventions()) != null)
        {
            voCptInterColl.sort();
            // clear and add to grid
            form.gridInterventions().getRows().clear();
            GenForm.gridInterventionsRow row;
            for (int i = 0; i < voCptInterColl.size(); i++)
            {
                CarePlanTemplateIntervention voCpInt = voCptInterColl.get(i);

                if (form.chkActiveOnly().getValue() == true)
                {
                    // show active interventions only
                    if (voCpInt.getActiveIsNotNull() && voCpInt.getActive().booleanValue())
                    {
                        row = form.gridInterventions().getRows().newRow();
                        // Intervention
                        row.setValue(voCpInt);
                        row.setColManOpt(voCpInt.getInterventionType());
                        row.setColIntervention(voCpInt.getIntervention());
                        row.setColActive(voCpInt.getActive().booleanValue());

                    }
                }
                else
                {
                    // show all interventions
                    row = form.gridInterventions().getRows().newRow();
                    // Intervention
                    row.setValue(voCpInt);
                    row.setColManOpt(voCpInt.getInterventionType());
                    row.setColIntervention(voCpInt.getIntervention());
                    row.setColActive(voCpInt.getActive().booleanValue());
                    row.setDateInactive(voCpInt.getDateInactive());

                    if (voCpInt.getActive().booleanValue() == false)
                        row.setReadOnly(true);
                }
            }
            if (form.getLocalContext().getSelectedIntervention() != null)
                form.gridInterventions().setValue(form.getLocalContext().getSelectedIntervention());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlsState()
{
    form.getContextMenus().Nursing.getCarePlanActionEDITItem().setVisible(form.gridCarePlan().getValue() instanceof CarePlanTemplateIntervention);
}
项目:AvoinApotti    文件:Logic.java   
private void newCarePlanAction()
{
    // Pass in the Collection of unused careplan template actions
    CarePlanTemplateInterventionCollection coll = null;
    CarePlanTemplate voCPT = new CarePlanTemplate();
    if (form.getLocalContext().getCarePlan().getTemplate() != null)
    {
        voCPT.setID_CarePlanTemplate(form.getLocalContext().getCarePlan().getTemplate().getID_CarePlanTemplate());
        coll = domain.getCarePlanTemplateActions(voCPT);

        // Loop through the collection, removing those already specified on
        // the grid
        // Can only check on description??
        if (coll != null )
        {
            CarePlanTemplateInterventionCollection newColl = new CarePlanTemplateInterventionCollection();
            int p = 0;

            for (int i = 0; i < coll.size(); i++)
            {
                boolean rowFound = false;
                CarePlanTemplateIntervention interv = coll.get(i);
                for (int j = 0; form.getLocalContext().getCarePlan().getInterventionsIsNotNull() && j < form.getLocalContext().getCarePlan().getInterventions().size(); j++)
                {
                    if (form.getLocalContext().getCarePlan().getInterventions().get(j).getDescription().equals(interv.getIntervention()))
                    {
                        rowFound = true;
                        break;
                    }
                }
                if (!rowFound)
                {
                    newColl.add(interv);
                    p++;
                }
            }
            form.getGlobalContext().COE.setCarePlanTemplateInterventions(newColl);
        }
    }
    engine.open(form.getForms().Nursing.CarePlanAddAction);
}
项目:AvoinApotti    文件:Logic.java   
private void displayInterventions()
{
    form.gridInterventions().setValue(null);
    if (form.getLocalContext().getcarePlanTemplate() != null)
    {
        CarePlanTemplateInterventionCollection voCptInterColl;
        if ((voCptInterColl = form.getLocalContext().getcarePlanTemplate().getInterventions()) != null)
        {
            voCptInterColl.sort();
            // clear and add to grid
            form.gridInterventions().getRows().clear();
            GenForm.gridInterventionsRow row;
            for (int i = 0; i < voCptInterColl.size(); i++)
            {
                CarePlanTemplateIntervention voCpInt = voCptInterColl.get(i);

                if (form.chkActiveOnly().getValue() == true)
                {
                    // show active interventions only
                    if (voCpInt.getActiveIsNotNull() && voCpInt.getActive().booleanValue())
                    {
                        row = form.gridInterventions().getRows().newRow();
                        // Intervention
                        row.setValue(voCpInt);
                        row.setColManOpt(voCpInt.getInterventionType());
                        row.setColIntervention(voCpInt.getIntervention());
                        row.setColActive(voCpInt.getActive().booleanValue());

                    }
                }
                else
                {
                    // show all interventions
                    row = form.gridInterventions().getRows().newRow();
                    // Intervention
                    row.setValue(voCpInt);
                    row.setColManOpt(voCpInt.getInterventionType());
                    row.setColIntervention(voCpInt.getIntervention());
                    row.setColActive(voCpInt.getActive().booleanValue());
                    row.setDateInactive(voCpInt.getDateInactive());

                    if (voCpInt.getActive().booleanValue() == false)
                        row.setReadOnly(true);
                }
            }
            if (form.getLocalContext().getSelectedIntervention() != null)
                form.gridInterventions().setValue(form.getLocalContext().getSelectedIntervention());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    form.getContextMenus().Nursing.getCarePlanActionEDITItem().setVisible(form.gridCarePlan().getValue() instanceof CarePlanTemplateIntervention);
}
项目:openMAXIMS    文件:Logic.java   
private void newCarePlanAction()
{
    // Pass in the Collection of unused careplan template actions
    CarePlanTemplateInterventionCollection coll = null;
    CarePlanTemplate voCPT = new CarePlanTemplate();
    if (form.getLocalContext().getCarePlan().getTemplate() != null)
    {
        voCPT.setID_CarePlanTemplate(form.getLocalContext().getCarePlan().getTemplate().getID_CarePlanTemplate());
        coll = domain.getCarePlanTemplateActions(voCPT);

        // Loop through the collection, removing those already specified on
        // the grid
        // Can only check on description??
        if (coll != null )
        {
            CarePlanTemplateInterventionCollection newColl = new CarePlanTemplateInterventionCollection();
            int p = 0;

            for (int i = 0; i < coll.size(); i++)
            {
                boolean rowFound = false;
                CarePlanTemplateIntervention interv = coll.get(i);
                for (int j = 0; form.getLocalContext().getCarePlan().getInterventionsIsNotNull() && j < form.getLocalContext().getCarePlan().getInterventions().size(); j++)
                {
                    if (form.getLocalContext().getCarePlan().getInterventions().get(j).getDescription().equals(interv.getIntervention()))
                    {
                        rowFound = true;
                        break;
                    }
                }
                if (!rowFound)
                {
                    newColl.add(interv);
                    p++;
                }
            }
            form.getGlobalContext().COE.setCarePlanTemplateInterventions(newColl);
        }
    }
    engine.open(form.getForms().Nursing.CarePlanAddAction);
}
项目:openMAXIMS    文件:Logic.java   
private void displayInterventions()
{
    form.gridInterventions().setValue(null);
    if (form.getLocalContext().getcarePlanTemplate() != null)
    {
        CarePlanTemplateInterventionCollection voCptInterColl;
        if ((voCptInterColl = form.getLocalContext().getcarePlanTemplate().getInterventions()) != null)
        {
            voCptInterColl.sort();
            // clear and add to grid
            form.gridInterventions().getRows().clear();
            GenForm.gridInterventionsRow row;
            for (int i = 0; i < voCptInterColl.size(); i++)
            {
                CarePlanTemplateIntervention voCpInt = voCptInterColl.get(i);

                if (form.chkActiveOnly().getValue() == true)
                {
                    // show active interventions only
                    if (voCpInt.getActiveIsNotNull() && voCpInt.getActive().booleanValue())
                    {
                        row = form.gridInterventions().getRows().newRow();
                        // Intervention
                        row.setValue(voCpInt);
                        row.setColManOpt(voCpInt.getInterventionType());
                        row.setColIntervention(voCpInt.getIntervention());
                        row.setColActive(voCpInt.getActive().booleanValue());

                    }
                }
                else
                {
                    // show all interventions
                    row = form.gridInterventions().getRows().newRow();
                    // Intervention
                    row.setValue(voCpInt);
                    row.setColManOpt(voCpInt.getInterventionType());
                    row.setColIntervention(voCpInt.getIntervention());
                    row.setColActive(voCpInt.getActive().booleanValue());
                    row.setDateInactive(voCpInt.getDateInactive());

                    if (voCpInt.getActive().booleanValue() == false)
                        row.setReadOnly(true);
                }
            }
            if (form.getLocalContext().getSelectedIntervention() != null)
                form.gridInterventions().setValue(form.getLocalContext().getSelectedIntervention());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    form.getContextMenus().Nursing.getCarePlanActionEDITItem().setVisible(form.gridCarePlan().getValue() instanceof CarePlanTemplateIntervention);
}
项目:openMAXIMS    文件:Logic.java   
private void newCarePlanAction()
{
    // Pass in the Collection of unused careplan template actions
    CarePlanTemplateInterventionCollection coll = null;
    CarePlanTemplate voCPT = new CarePlanTemplate();
    if (form.getLocalContext().getCarePlan().getTemplate() != null)
    {
        voCPT.setID_CarePlanTemplate(form.getLocalContext().getCarePlan().getTemplate().getID_CarePlanTemplate());
        coll = domain.getCarePlanTemplateActions(voCPT);

        // Loop through the collection, removing those already specified on
        // the grid
        // Can only check on description??
        if (coll != null )
        {
            CarePlanTemplateInterventionCollection newColl = new CarePlanTemplateInterventionCollection();
            int p = 0;

            for (int i = 0; i < coll.size(); i++)
            {
                boolean rowFound = false;
                CarePlanTemplateIntervention interv = coll.get(i);
                for (int j = 0; form.getLocalContext().getCarePlan().getInterventionsIsNotNull() && j < form.getLocalContext().getCarePlan().getInterventions().size(); j++)
                {
                    if (form.getLocalContext().getCarePlan().getInterventions().get(j).getDescription().equals(interv.getIntervention()))
                    {
                        rowFound = true;
                        break;
                    }
                }
                if (!rowFound)
                {
                    newColl.add(interv);
                    p++;
                }
            }
            form.getGlobalContext().COE.setCarePlanTemplateInterventions(newColl);
        }
    }
    engine.open(form.getForms().Nursing.CarePlanAddAction);
}
项目:openMAXIMS    文件:Logic.java   
private void displayInterventions()
{
    form.gridInterventions().setValue(null);
    if (form.getLocalContext().getcarePlanTemplate() != null)
    {
        CarePlanTemplateInterventionCollection voCptInterColl;
        if ((voCptInterColl = form.getLocalContext().getcarePlanTemplate().getInterventions()) != null)
        {
            voCptInterColl.sort();
            // clear and add to grid
            form.gridInterventions().getRows().clear();
            GenForm.gridInterventionsRow row;
            for (int i = 0; i < voCptInterColl.size(); i++)
            {
                CarePlanTemplateIntervention voCpInt = voCptInterColl.get(i);

                if (form.chkActiveOnly().getValue() == true)
                {
                    // show active interventions only
                    if (voCpInt.getActiveIsNotNull() && voCpInt.getActive().booleanValue())
                    {
                        row = form.gridInterventions().getRows().newRow();
                        // Intervention
                        row.setValue(voCpInt);
                        row.setColManOpt(voCpInt.getInterventionType());
                        row.setColIntervention(voCpInt.getIntervention());
                        row.setColActive(voCpInt.getActive().booleanValue());

                    }
                }
                else
                {
                    // show all interventions
                    row = form.gridInterventions().getRows().newRow();
                    // Intervention
                    row.setValue(voCpInt);
                    row.setColManOpt(voCpInt.getInterventionType());
                    row.setColIntervention(voCpInt.getIntervention());
                    row.setColActive(voCpInt.getActive().booleanValue());
                    row.setDateInactive(voCpInt.getDateInactive());

                    if (voCpInt.getActive().booleanValue() == false)
                        row.setReadOnly(true);
                }
            }
            if (form.getLocalContext().getSelectedIntervention() != null)
                form.gridInterventions().setValue(form.getLocalContext().getSelectedIntervention());
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void updateControlsState()
{
    form.getContextMenus().Nursing.getCarePlanActionEDITItem().setVisible(form.gridCarePlan().getValue() instanceof CarePlanTemplateIntervention);
}
项目:openmaxims-linux    文件:Logic.java   
private void newCarePlanAction()
{
    // Pass in the Collection of unused careplan template actions
    CarePlanTemplateInterventionCollection coll = null;
    CarePlanTemplate voCPT = new CarePlanTemplate();
    if (form.getLocalContext().getCarePlan().getTemplate() != null)
    {
        voCPT.setID_CarePlanTemplate(form.getLocalContext().getCarePlan().getTemplate().getID_CarePlanTemplate());
        coll = domain.getCarePlanTemplateActions(voCPT);

        // Loop through the collection, removing those already specified on
        // the grid
        // Can only check on description??
        if (coll != null )
        {
            CarePlanTemplateInterventionCollection newColl = new CarePlanTemplateInterventionCollection();
            int p = 0;

            for (int i = 0; i < coll.size(); i++)
            {
                boolean rowFound = false;
                CarePlanTemplateIntervention interv = coll.get(i);
                for (int j = 0; form.getLocalContext().getCarePlan().getInterventionsIsNotNull() && j < form.getLocalContext().getCarePlan().getInterventions().size(); j++)
                {
                    if (form.getLocalContext().getCarePlan().getInterventions().get(j).getDescription().equals(interv.getIntervention()))
                    {
                        rowFound = true;
                        break;
                    }
                }
                if (!rowFound)
                {
                    newColl.add(interv);
                    p++;
                }
            }
            form.getGlobalContext().COE.setCarePlanTemplateInterventions(newColl);
        }
    }
    engine.open(form.getForms().Nursing.CarePlanAddAction);
}