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

项目:AvoinApotti    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public ims.nursing.vo.CarePlanCollection listCarePlans(ims.nursing.vo.CarePlanTitleCollection collCps)
{
    String carePlanIDs = "";

    for (int i = 0 ; collCps != null && i < collCps.size() ; i++)
    {
        if (carePlanIDs != "") 
            carePlanIDs += " , ";

        carePlanIDs += collCps.get(i).getID_CarePlan();
    }
    List domainObjectList = null;
    DomainFactory factory = getDomainFactory();

    domainObjectList = factory.find("select cp from CarePlan as cp where cp.id in ( " + carePlanIDs + " )");

    return CarePlanAssembler.createCarePlanCollectionFromCarePlan(domainObjectList);
}
项目:AvoinApotti    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public Boolean saveCarePlans(CarePlanCollection collCps) throws StaleObjectException 
{
    if (collCps == null)
        throw new DomainRuntimeException("Cannot save null value for CarePlanCollection");

    if (!collCps.isValidated())
        throw new DomainRuntimeException("CarePlanCollection has not been validated");

    DomainFactory factory = getDomainFactory();
    for ( int i = 0 ; i < collCps.size() ; i++)
    {
        CarePlan doCP = CarePlanAssembler.extractCarePlan(factory, collCps.get(i));
        factory.save(doCP);
    }
    return true;
}
项目:openMAXIMS    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public ims.nursing.vo.CarePlanCollection listCarePlans(ims.nursing.vo.CarePlanTitleCollection collCps)
{
    String carePlanIDs = "";

    for (int i = 0 ; collCps != null && i < collCps.size() ; i++)
    {
        if (carePlanIDs != "") 
            carePlanIDs += " , ";

        carePlanIDs += collCps.get(i).getID_CarePlan();
    }
    List domainObjectList = null;
    DomainFactory factory = getDomainFactory();

    domainObjectList = factory.find("select cp from CarePlan as cp where cp.id in ( " + carePlanIDs + " )");

    return CarePlanAssembler.createCarePlanCollectionFromCarePlan(domainObjectList);
}
项目:openMAXIMS    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public Boolean saveCarePlans(CarePlanCollection collCps) throws StaleObjectException 
{
    if (collCps == null)
        throw new DomainRuntimeException("Cannot save null value for CarePlanCollection");

    if (!collCps.isValidated())
        throw new DomainRuntimeException("CarePlanCollection has not been validated");

    DomainFactory factory = getDomainFactory();
    for ( int i = 0 ; i < collCps.size() ; i++)
    {
        CarePlan doCP = CarePlanAssembler.extractCarePlan(factory, collCps.get(i));
        factory.save(doCP);
    }
    return true;
}
项目:openMAXIMS    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public ims.nursing.vo.CarePlanCollection listCarePlans(ims.nursing.vo.CarePlanTitleCollection collCps)
{
    String carePlanIDs = "";

    for (int i = 0 ; collCps != null && i < collCps.size() ; i++)
    {
        if (carePlanIDs != "") 
            carePlanIDs += " , ";

        carePlanIDs += collCps.get(i).getID_CarePlan();
    }
    List domainObjectList = null;
    DomainFactory factory = getDomainFactory();

    domainObjectList = factory.find("select cp from CarePlan as cp where cp.id in ( " + carePlanIDs + " )");

    return CarePlanAssembler.createCarePlanCollectionFromCarePlan(domainObjectList);
}
项目:openMAXIMS    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public Boolean saveCarePlans(CarePlanCollection collCps) throws StaleObjectException 
{
    if (collCps == null)
        throw new DomainRuntimeException("Cannot save null value for CarePlanCollection");

    if (!collCps.isValidated())
        throw new DomainRuntimeException("CarePlanCollection has not been validated");

    DomainFactory factory = getDomainFactory();
    for ( int i = 0 ; i < collCps.size() ; i++)
    {
        CarePlan doCP = CarePlanAssembler.extractCarePlan(factory, collCps.get(i));
        factory.save(doCP);
    }
    return true;
}
项目:openmaxims-linux    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public ims.nursing.vo.CarePlanCollection listCarePlans(ims.nursing.vo.CarePlanTitleCollection collCps)
{
    String carePlanIDs = "";

    for (int i = 0 ; collCps != null && i < collCps.size() ; i++)
    {
        if (carePlanIDs != "") 
            carePlanIDs += " , ";

        carePlanIDs += collCps.get(i).getID_CarePlan();
    }
    List domainObjectList = null;
    DomainFactory factory = getDomainFactory();

    domainObjectList = factory.find("select cp from CarePlan as cp where cp.id in ( " + carePlanIDs + " )");

    return CarePlanAssembler.createCarePlanCollectionFromCarePlan(domainObjectList);
}
项目:openmaxims-linux    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public Boolean saveCarePlans(CarePlanCollection collCps) throws StaleObjectException 
{
    if (collCps == null)
        throw new DomainRuntimeException("Cannot save null value for CarePlanCollection");

    if (!collCps.isValidated())
        throw new DomainRuntimeException("CarePlanCollection has not been validated");

    DomainFactory factory = getDomainFactory();
    for ( int i = 0 ; i < collCps.size() ; i++)
    {
        CarePlan doCP = CarePlanAssembler.extractCarePlan(factory, collCps.get(i));
        factory.save(doCP);
    }
    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    form.ccAdmittingNurse().initialize(MosType.HCP,HcpDisType.NURSING);
    form.ccConfirmedBy().initialize(MosType.ALL);
    form.ccDischarged().initialize(MosType.ALL);

    //form.getLocalContext().setisOpenCarePlan(false);
    CarePlanCollection carePlColl = domain.getCareplans(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setisOpenCarePlan(iterateCarePlanCollection(carePlColl));

    //WDEV-13846 
    form.getLocalContext().setclinicalAdmission(null);
    form.getLocalContext().setlocalContextForRie(null);
}
项目:AvoinApotti    文件:Logic.java   
private Boolean iterateCarePlanCollection(CarePlanCollection carePlColl)
{
    if(carePlColl == null)
        return false;
    for(int i = 0; i < carePlColl.size();i++)
    {
        if(carePlColl.get(i).getCurrentCarePlanStatusIsNotNull() && carePlColl.get(i).getCurrentCarePlanStatus().getStatusIsNotNull()
                && carePlColl.get(i).getCurrentCarePlanStatus().getStatus().equals(CarePlanStatus.ACTIVE))
            return true;

    }
    return false;

}
项目:AvoinApotti    文件:ClinicalAdmissionImpl.java   
public CarePlanCollection getCareplans(CareContextRefVo careContextrefVo) 
{
    if(careContextrefVo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextrefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" select c1_1 from CarePlan as c1_1 left join c1_1.careContext as c2_1 where  "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " c2_1.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextrefVo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            CarePlanCollection voColl = CarePlanAssembler.createCarePlanCollectionFromCarePlan(list);
            if(voColl != null && voColl.size() > 0)
                return voColl;
        }
    }
    return null;
}
项目:AvoinApotti    文件:CarePlanDetailsImpl.java   
public CarePlanCollection listCarePlans(ims.nursing.vo.CarePlan voCarePlan) throws DomainInterfaceException 
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    CarePlanCollection temVoColl = new CarePlanCollection();
    temVoColl.add(voCp);
    return temVoColl;

}
项目:openMAXIMS    文件:Logic.java   
private void initialize()
{
    form.ccAdmittingNurse().initialize(MosType.HCP,HcpDisType.NURSING);
    form.ccConfirmedBy().initialize(MosType.ALL);
    form.ccDischarged().initialize(MosType.ALL);

    //form.getLocalContext().setisOpenCarePlan(false);
    CarePlanCollection carePlColl = domain.getCareplans(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setisOpenCarePlan(iterateCarePlanCollection(carePlColl));

    //WDEV-13846 
    form.getLocalContext().setclinicalAdmission(null);
    form.getLocalContext().setlocalContextForRie(null);
}
项目:openMAXIMS    文件:Logic.java   
private Boolean iterateCarePlanCollection(CarePlanCollection carePlColl)
{
    if(carePlColl == null)
        return false;
    for(int i = 0; i < carePlColl.size();i++)
    {
        if(carePlColl.get(i).getCurrentCarePlanStatusIsNotNull() && carePlColl.get(i).getCurrentCarePlanStatus().getStatusIsNotNull()
                && carePlColl.get(i).getCurrentCarePlanStatus().getStatus().equals(CarePlanStatus.ACTIVE))
            return true;

    }
    return false;

}
项目:openMAXIMS    文件:ClinicalAdmissionImpl.java   
public CarePlanCollection getCareplans(CareContextRefVo careContextrefVo) 
{
    if(careContextrefVo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextrefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" select c1_1 from CarePlan as c1_1 left join c1_1.careContext as c2_1 where  "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " c2_1.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextrefVo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            CarePlanCollection voColl = CarePlanAssembler.createCarePlanCollectionFromCarePlan(list);
            if(voColl != null && voColl.size() > 0)
                return voColl;
        }
    }
    return null;
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
public CarePlanCollection listCarePlans(ims.nursing.vo.CarePlan voCarePlan) throws DomainInterfaceException 
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    CarePlanCollection temVoColl = new CarePlanCollection();
    temVoColl.add(voCp);
    return temVoColl;

}
项目:openMAXIMS    文件:Logic.java   
private void initialize()
{
    form.ccAdmittingNurse().initialize(MosType.HCP,HcpDisType.NURSING);
    form.ccConfirmedBy().initialize(MosType.ALL);
    form.ccDischarged().initialize(MosType.ALL);

    //form.getLocalContext().setisOpenCarePlan(false);
    CarePlanCollection carePlColl = domain.getCareplans(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setisOpenCarePlan(iterateCarePlanCollection(carePlColl));

    //WDEV-13846 
    form.getLocalContext().setclinicalAdmission(null);
    form.getLocalContext().setlocalContextForRie(null);
}
项目:openMAXIMS    文件:Logic.java   
private Boolean iterateCarePlanCollection(CarePlanCollection carePlColl)
{
    if(carePlColl == null)
        return false;
    for(int i = 0; i < carePlColl.size();i++)
    {
        if(carePlColl.get(i).getCurrentCarePlanStatusIsNotNull() && carePlColl.get(i).getCurrentCarePlanStatus().getStatusIsNotNull()
                && carePlColl.get(i).getCurrentCarePlanStatus().getStatus().equals(CarePlanStatus.ACTIVE))
            return true;

    }
    return false;

}
项目:openMAXIMS    文件:ClinicalAdmissionImpl.java   
public CarePlanCollection getCareplans(CareContextRefVo careContextrefVo) 
{
    if(careContextrefVo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextrefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" select c1_1 from CarePlan as c1_1 left join c1_1.careContext as c2_1 where  "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " c2_1.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextrefVo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            CarePlanCollection voColl = CarePlanAssembler.createCarePlanCollectionFromCarePlan(list);
            if(voColl != null && voColl.size() > 0)
                return voColl;
        }
    }
    return null;
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
public CarePlanCollection listCarePlans(ims.nursing.vo.CarePlan voCarePlan) throws DomainInterfaceException 
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    CarePlanCollection temVoColl = new CarePlanCollection();
    temVoColl.add(voCp);
    return temVoColl;

}
项目:openmaxims-linux    文件:Logic.java   
private void initialize()
{
    form.ccAdmittingNurse().initialize(MosType.HCP,HcpDisType.NURSING);
    form.ccConfirmedBy().initialize(MosType.ALL);
    form.ccDischarged().initialize(MosType.ALL);

    //form.getLocalContext().setisOpenCarePlan(false);
    CarePlanCollection carePlColl = domain.getCareplans(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setisOpenCarePlan(iterateCarePlanCollection(carePlColl));

    //WDEV-13846 
    form.getLocalContext().setclinicalAdmission(null);
    form.getLocalContext().setlocalContextForRie(null);
}
项目:openmaxims-linux    文件:Logic.java   
private Boolean iterateCarePlanCollection(CarePlanCollection carePlColl)
{
    if(carePlColl == null)
        return false;
    for(int i = 0; i < carePlColl.size();i++)
    {
        if(carePlColl.get(i).getCurrentCarePlanStatusIsNotNull() && carePlColl.get(i).getCurrentCarePlanStatus().getStatusIsNotNull()
                && carePlColl.get(i).getCurrentCarePlanStatus().getStatus().equals(CarePlanStatus.ACTIVE))
            return true;

    }
    return false;

}
项目:openmaxims-linux    文件:ClinicalAdmissionImpl.java   
public CarePlanCollection getCareplans(CareContextRefVo careContextrefVo) 
{
    if(careContextrefVo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextrefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" select c1_1 from CarePlan as c1_1 left join c1_1.careContext as c2_1 where  "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " c2_1.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextrefVo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            CarePlanCollection voColl = CarePlanAssembler.createCarePlanCollectionFromCarePlan(list);
            if(voColl != null && voColl.size() > 0)
                return voColl;
        }
    }
    return null;
}
项目:openmaxims-linux    文件:CarePlanDetailsImpl.java   
public CarePlanCollection listCarePlans(ims.nursing.vo.CarePlan voCarePlan) throws DomainInterfaceException 
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    CarePlanCollection temVoColl = new CarePlanCollection();
    temVoColl.add(voCp);
    return temVoColl;

}
项目:AvoinApotti    文件:Logic.java   
private void populateGrid(CarePlanTitleCollection voCPs)
{
    form.dyngrdInterventions().getRows().clear();

    CarePlanCollection voCarePlans = null;

    if (voCPs != null && voCPs.size() > 0)
        voCarePlans = domain.listCarePlans(voCPs);

    for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++)
    {
        voCarePlans.get(i).getInterventions().sort();

        for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++)
        {
            CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j);

            DynamicGridRow row = form.dyngrdInterventions().getRows().newRow();
            //WDEV-16795 
            String removalInfo = "";
            if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved()))
            {
                row.setReadOnly(true);
                row.setBackColor(Color.Gray);
                removalInfo = "<b>Care Plan Action Removed since: </b>" + voInt.getRemovedDate().toString(DateFormat.STANDARD);
            }

            DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING);
            cellOrdNum.setValue(voInt.getOrder().toString());
            //WDEV-16795
            cellOrdNum.setTooltip(voInt.getOrder().toString()+ (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
            cellOrdNum.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING);
            cellDesc.setValue(voInt.getDescription().toString());
            //WDEV-16795
            cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""): "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
            cellDesc.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING);
            cellInfo.setValue(voInt.getAdditionalInfo());
            //WDEV-16795 
            cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() : "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
            cellInfo.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
            cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE);
            cellComp.setReadOnly(voInt.getStopDateIsNotNull() && !voInt.getIsRemoved());//WDEV-16795
            cellComp.setAutoPostBack(Boolean.TRUE);

            DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING);
            cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
                    (voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() : "" ) : "");
            //WDEV-16795 
            cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
                    (voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") : "" + (removalInfo.length() > 0 ? "\n" + removalInfo : ""));
            cellCompInfo.setReadOnly(Boolean.TRUE);

            row.setValue(voCarePlans.get(i));
            row.setIdentifier(voInt);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrid(CarePlanTitleCollection voCPs)
{
    form.dyngrdInterventions().getRows().clear();

    CarePlanCollection voCarePlans = null;

    if (voCPs != null && voCPs.size() > 0)
        voCarePlans = domain.listCarePlans(voCPs);

    for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++)
    {
        voCarePlans.get(i).getInterventions().sort();

        for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++)
        {
            CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j);

            DynamicGridRow row = form.dyngrdInterventions().getRows().newRow();
            //WDEV-16795 
            String removalInfo = "";
            String lineDelimiter = "<br/>"; 
            boolean isCcoSpecific = ConfigFlag.GEN.CARE_PLAN_FUNCTIONALITY_TYPE.getValue().equals("CCO");
            boolean isRemovedOrReinstatedAction = voInt != null && isCcoSpecific && (Boolean.TRUE.equals(voInt.getIsRemoved()) || Boolean.FALSE.equals(voInt.getIsRemoved())); //WDEV-16795
            if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved()))
            {
                row.setReadOnly(true);
                row.setBackColor(Color.LightGray);                                      
            }
            if (isRemovedOrReinstatedAction)
            {
                removalInfo = buildRemovedReinstatedActionTooltip(voInt);
            }
            //---- end WDEV-16795
            DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING);
            cellOrdNum.setValue(voInt.getOrder().toString());
            //WDEV-16795
            cellOrdNum.setTooltip(voInt.getOrderIsNotNull() ? voInt.getOrder().toString() + lineDelimiter + removalInfo : removalInfo);
            cellOrdNum.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING);
            cellDesc.setValue(voInt.getDescription().toString());
            //WDEV-16795
            cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + lineDelimiter + removalInfo: removalInfo);
            cellDesc.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING);
            cellInfo.setValue(voInt.getAdditionalInfo());
            //WDEV-16795 
            cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() + lineDelimiter + removalInfo: removalInfo);
            cellInfo.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
            cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE);
            cellComp.setReadOnly(voInt.getStopDateIsNotNull());
            cellComp.setTooltip(Boolean.TRUE.equals(row.isReadOnly()) || voInt.getStopDateIsNotNull() ?  removalInfo : ""); //WDEV-16795
            cellComp.setAutoPostBack(Boolean.TRUE);

            DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING);
            cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
                    (voInt.getStopDateIsNotNull() ? voInt.getStopDate() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getIMosName() : "" ) : "");
            //WDEV-16795 
            cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
                    (voInt.getStopDateIsNotNull() ? voInt.getStopDate() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getIMosName() : "" ) + lineDelimiter + removalInfo: removalInfo);
            cellCompInfo.setReadOnly(Boolean.TRUE);
            if (isRemovedOrReinstatedAction)
                cellCompInfo.setIdentifier(isRemovedOrReinstatedAction); //WDEV-16795 

            row.setValue(voCarePlans.get(i));
            row.setIdentifier(voInt);

        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrid(CarePlanTitleCollection voCPs)
{
    form.dyngrdInterventions().getRows().clear();

    CarePlanCollection voCarePlans = null;

    if (voCPs != null && voCPs.size() > 0)
        voCarePlans = domain.listCarePlans(voCPs);

    for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++)
    {
        voCarePlans.get(i).getInterventions().sort();

        for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++)
        {
            CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j);

            DynamicGridRow row = form.dyngrdInterventions().getRows().newRow();
            //WDEV-16795 
            String removalInfo = "";
            if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved()))
            {
                row.setReadOnly(true);
                row.setBackColor(Color.Gray);
                removalInfo = "<b>Care Plan Action Removed since: </b>" + voInt.getRemovedDate().toString(DateFormat.STANDARD);
            }

            DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING);
            cellOrdNum.setValue(voInt.getOrder().toString());
            //WDEV-16795
            cellOrdNum.setTooltip(voInt.getOrder().toString()+ (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
            cellOrdNum.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING);
            cellDesc.setValue(voInt.getDescription().toString());
            //WDEV-16795
            cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""): "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
            cellDesc.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING);
            cellInfo.setValue(voInt.getAdditionalInfo());
            //WDEV-16795 
            cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() : "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
            cellInfo.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
            cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE);
            cellComp.setReadOnly(voInt.getStopDateIsNotNull() && !voInt.getIsRemoved());//WDEV-16795
            cellComp.setAutoPostBack(Boolean.TRUE);

            DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING);
            cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
                    (voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() : "" ) : "");
            //WDEV-16795 
            cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
                    (voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") : "" + (removalInfo.length() > 0 ? "\n" + removalInfo : ""));
            cellCompInfo.setReadOnly(Boolean.TRUE);

            row.setValue(voCarePlans.get(i));
            row.setIdentifier(voInt);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateGrid(CarePlanTitleCollection voCPs)
{
    form.dyngrdInterventions().getRows().clear();

    CarePlanCollection voCarePlans = null;

    if (voCPs != null && voCPs.size() > 0)
        voCarePlans = domain.listCarePlans(voCPs);

    for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++)
    {
        voCarePlans.get(i).getInterventions().sort();

        for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++)
        {
            CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j);

            DynamicGridRow row = form.dyngrdInterventions().getRows().newRow();
            //WDEV-16795 
            String removalInfo = "";
            if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved()))
            {
                row.setReadOnly(true);
                row.setBackColor(Color.Gray);
                removalInfo = "<b>Care Plan Action Removed since: </b>" + voInt.getRemovedDate().toString(DateFormat.STANDARD);
            }

            DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING);
            cellOrdNum.setValue(voInt.getOrder().toString());
            //WDEV-16795
            cellOrdNum.setTooltip(voInt.getOrder().toString()+ (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
            cellOrdNum.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING);
            cellDesc.setValue(voInt.getDescription().toString());
            //WDEV-16795
            cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""): "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
            cellDesc.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING);
            cellInfo.setValue(voInt.getAdditionalInfo());
            //WDEV-16795 
            cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() : "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
            cellInfo.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
            cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE);
            cellComp.setReadOnly(voInt.getStopDateIsNotNull() && !voInt.getIsRemoved());//WDEV-16795
            cellComp.setAutoPostBack(Boolean.TRUE);

            DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING);
            cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
                    (voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() : "" ) : "");
            //WDEV-16795 
            cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
                    (voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") : "" + (removalInfo.length() > 0 ? "\n" + removalInfo : ""));
            cellCompInfo.setReadOnly(Boolean.TRUE);

            row.setValue(voCarePlans.get(i));
            row.setIdentifier(voInt);
        }
    }
}