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

项目:AvoinApotti    文件:Logic.java   
private List<CarePlanAndEvaluationNotes> getGroupedList(CarePlanEvaluationNoteListVoCollection voCollNotes) 
{
    if(voCollNotes == null)
        return null;

    List<CarePlanAndEvaluationNotes> listCpEval = new ArrayList<CarePlanAndEvaluationNotes>();

    for (CarePlanEvaluationNoteListVo voCarePlanEvaluationNote : voCollNotes) 
    {
        if(listCpEval.size() == 0)
            addNewItem(voCarePlanEvaluationNote, listCpEval);
        else
        {
            //check list for existing item matching careplan and add notes to it
            boolean bFound = false;
            for (int i = 0; i < listCpEval.size(); i++) 
            {
                if(listCpEval.get(i).getCarePlan().equals(voCarePlanEvaluationNote.getCarePlan()))
                {
                    listCpEval.get(i).addEvaluationNote(voCarePlanEvaluationNote);
                    bFound = true;
                }
            }
            if(!bFound)
                addNewItem(voCarePlanEvaluationNote, listCpEval);
        }
    }
    return listCpEval;
}
项目:AvoinApotti    文件:Logic.java   
public void addEvaluationNote(CarePlanEvaluationNoteListVo value) 
{
    if(this.collEvaluationNotes == null)
        this.collEvaluationNotes = new CarePlanEvaluationNoteListVoCollection();

    this.collEvaluationNotes.add(value);
}
项目:AvoinApotti    文件:CarePlanEvalutaionViewImpl.java   
public CarePlanEvaluationNoteListVoCollection listEvaluationNotesForActiveCarePlansByDateRange(CareContextRefVo voCareContext, Date dateFrom, Date dateTo, Boolean activeOnly)
{
    if(voCareContext == null || voCareContext.getID_CareContext() == null || dateFrom == null || dateTo == null)
        throw new CodingRuntimeException("Mandatory parameters are null in method listEvaluationNotesForActiveCarePlans");

    String hql = "from CarePlanEvaluationNote note where note.carePlan.careContext.id = :idCareContext and note.carePlan.isRIE is null and note.carePlan.currentCarePlanStatus.status = :activeStatus and (note.recordedDateTime between :dateFrom and :dateTo) ";      
    if(activeOnly == true)
        hql += "and note.active = true";

    DomainFactory factory = getDomainFactory();
    return CarePlanEvaluationNoteListVoAssembler.createCarePlanEvaluationNoteListVoCollectionFromCarePlanEvaluationNote(factory.find(hql, new String[]{"idCareContext", "activeStatus", "dateFrom", "dateTo"}, new Object[]{voCareContext.getID_CareContext(), getDomLookup(CarePlanStatus.ACTIVE), dateFrom.getDate(), dateTo.copy().addDay(1).getDate()})).sort();
}
项目:openMAXIMS    文件:Logic.java   
private List<CarePlanAndEvaluationNotes> getGroupedList(CarePlanEvaluationNoteListVoCollection voCollNotes) 
{
    if(voCollNotes == null)
        return null;

    List<CarePlanAndEvaluationNotes> listCpEval = new ArrayList<CarePlanAndEvaluationNotes>();

    for (CarePlanEvaluationNoteListVo voCarePlanEvaluationNote : voCollNotes) 
    {
        if(listCpEval.size() == 0)
            addNewItem(voCarePlanEvaluationNote, listCpEval);
        else
        {
            //check list for existing item matching careplan and add notes to it
            boolean bFound = false;
            for (int i = 0; i < listCpEval.size(); i++) 
            {
                if(listCpEval.get(i).getCarePlan().equals(voCarePlanEvaluationNote.getCarePlan()))
                {
                    listCpEval.get(i).addEvaluationNote(voCarePlanEvaluationNote);
                    bFound = true;
                }
            }
            if(!bFound)
                addNewItem(voCarePlanEvaluationNote, listCpEval);
        }
    }
    return listCpEval;
}
项目:openMAXIMS    文件:Logic.java   
public void addEvaluationNote(CarePlanEvaluationNoteListVo value) 
{
    if(this.collEvaluationNotes == null)
        this.collEvaluationNotes = new CarePlanEvaluationNoteListVoCollection();

    this.collEvaluationNotes.add(value);
}
项目:openMAXIMS    文件:CarePlanEvalutaionViewImpl.java   
public CarePlanEvaluationNoteListVoCollection listEvaluationNotesForActiveCarePlansByDateRange(CareContextRefVo voCareContext, Date dateFrom, Date dateTo, Boolean activeOnly)
{
    if(voCareContext == null || voCareContext.getID_CareContext() == null || dateFrom == null || dateTo == null)
        throw new CodingRuntimeException("Mandatory parameters are null in method listEvaluationNotesForActiveCarePlans");

    String hql = "from CarePlanEvaluationNote note where note.carePlan.careContext.id = :idCareContext and note.carePlan.isRIE is null and note.carePlan.currentCarePlanStatus.status = :activeStatus and (note.recordedDateTime between :dateFrom and :dateTo) ";      
    if(activeOnly == true)
        hql += "and note.active = true";

    DomainFactory factory = getDomainFactory();
    return CarePlanEvaluationNoteListVoAssembler.createCarePlanEvaluationNoteListVoCollectionFromCarePlanEvaluationNote(factory.find(hql, new String[]{"idCareContext", "activeStatus", "dateFrom", "dateTo"}, new Object[]{voCareContext.getID_CareContext(), getDomLookup(CarePlanStatus.ACTIVE), dateFrom.getDate(), dateTo.copy().addDay(1).getDate()})).sort();
}
项目:openMAXIMS    文件:Logic.java   
private List<CarePlanAndEvaluationNotes> getGroupedList(CarePlanEvaluationNoteListVoCollection voCollNotes) 
{
    if(voCollNotes == null)
        return null;

    List<CarePlanAndEvaluationNotes> listCpEval = new ArrayList<CarePlanAndEvaluationNotes>();

    for (CarePlanEvaluationNoteListVo voCarePlanEvaluationNote : voCollNotes) 
    {
        if(listCpEval.size() == 0)
            addNewItem(voCarePlanEvaluationNote, listCpEval);
        else
        {
            //check list for existing item matching careplan and add notes to it
            boolean bFound = false;
            for (int i = 0; i < listCpEval.size(); i++) 
            {
                if(listCpEval.get(i).getCarePlan().equals(voCarePlanEvaluationNote.getCarePlan()))
                {
                    listCpEval.get(i).addEvaluationNote(voCarePlanEvaluationNote);
                    bFound = true;
                }
            }
            if(!bFound)
                addNewItem(voCarePlanEvaluationNote, listCpEval);
        }
    }
    return listCpEval;
}
项目:openMAXIMS    文件:Logic.java   
public void addEvaluationNote(CarePlanEvaluationNoteListVo value) 
{
    if(this.collEvaluationNotes == null)
        this.collEvaluationNotes = new CarePlanEvaluationNoteListVoCollection();

    this.collEvaluationNotes.add(value);
}
项目:openMAXIMS    文件:CarePlanEvalutaionViewImpl.java   
public CarePlanEvaluationNoteListVoCollection listEvaluationNotesForActiveCarePlansByDateRange(CareContextRefVo voCareContext, Date dateFrom, Date dateTo, Boolean activeOnly)
{
    if(voCareContext == null || voCareContext.getID_CareContext() == null || dateFrom == null || dateTo == null)
        throw new CodingRuntimeException("Mandatory parameters are null in method listEvaluationNotesForActiveCarePlans");

    String hql = "from CarePlanEvaluationNote note where note.carePlan.careContext.id = :idCareContext and note.carePlan.isRIE is null and note.carePlan.currentCarePlanStatus.status = :activeStatus and (note.recordedDateTime between :dateFrom and :dateTo) ";      
    if(activeOnly == true)
        hql += "and note.active = true";

    DomainFactory factory = getDomainFactory();
    return CarePlanEvaluationNoteListVoAssembler.createCarePlanEvaluationNoteListVoCollectionFromCarePlanEvaluationNote(factory.find(hql, new String[]{"idCareContext", "activeStatus", "dateFrom", "dateTo"}, new Object[]{voCareContext.getID_CareContext(), getDomLookup(CarePlanStatus.ACTIVE), dateFrom.getDate(), dateTo.copy().addDay(1).getDate()})).sort();
}
项目:openmaxims-linux    文件:Logic.java   
private List<CarePlanAndEvaluationNotes> getGroupedList(CarePlanEvaluationNoteListVoCollection voCollNotes) 
{
    if(voCollNotes == null)
        return null;

    List<CarePlanAndEvaluationNotes> listCpEval = new ArrayList<CarePlanAndEvaluationNotes>();

    for (CarePlanEvaluationNoteListVo voCarePlanEvaluationNote : voCollNotes) 
    {
        if(listCpEval.size() == 0)
            addNewItem(voCarePlanEvaluationNote, listCpEval);
        else
        {
            //check list for existing item matching careplan and add notes to it
            boolean bFound = false;
            for (int i = 0; i < listCpEval.size(); i++) 
            {
                if(listCpEval.get(i).getCarePlan().equals(voCarePlanEvaluationNote.getCarePlan()))
                {
                    listCpEval.get(i).addEvaluationNote(voCarePlanEvaluationNote);
                    bFound = true;
                }
            }
            if(!bFound)
                addNewItem(voCarePlanEvaluationNote, listCpEval);
        }
    }
    return listCpEval;
}
项目:openmaxims-linux    文件:Logic.java   
public void addEvaluationNote(CarePlanEvaluationNoteListVo value) 
{
    if(this.collEvaluationNotes == null)
        this.collEvaluationNotes = new CarePlanEvaluationNoteListVoCollection();

    this.collEvaluationNotes.add(value);
}
项目:openmaxims-linux    文件:CarePlanEvalutaionViewImpl.java   
public CarePlanEvaluationNoteListVoCollection listEvaluationNotesForActiveCarePlansByDateRange(CareContextRefVo voCareContext, Date dateFrom, Date dateTo, Boolean activeOnly)
{
    if(voCareContext == null || voCareContext.getID_CareContext() == null || dateFrom == null || dateTo == null)
        throw new CodingRuntimeException("Mandatory parameters are null in method listEvaluationNotesForActiveCarePlans");

    String hql = "from CarePlanEvaluationNote note where note.carePlan.careContext.id = :idCareContext and note.carePlan.isRIE is null and note.carePlan.currentCarePlanStatus.status = :activeStatus and (note.recordedDateTime between :dateFrom and :dateTo) ";      
    if(activeOnly == true)
        hql += "and note.active = true";

    DomainFactory factory = getDomainFactory();
    return CarePlanEvaluationNoteListVoAssembler.createCarePlanEvaluationNoteListVoCollectionFromCarePlanEvaluationNote(factory.find(hql, new String[]{"idCareContext", "activeStatus", "dateFrom", "dateTo"}, new Object[]{voCareContext.getID_CareContext(), getDomLookup(CarePlanStatus.ACTIVE), dateFrom.getDate(), dateTo.copy().addDay(1).getDate()})).sort();
}
项目:AvoinApotti    文件:Logic.java   
public CarePlanEvaluationNoteListVoCollection getCollEvaluationNotes() {
    return collEvaluationNotes;
}
项目:AvoinApotti    文件:Logic.java   
public void setCollEvaluationNotes(
        CarePlanEvaluationNoteListVoCollection collEvaluationNotes) {
    this.collEvaluationNotes = collEvaluationNotes;
}
项目:openMAXIMS    文件:Logic.java   
public CarePlanEvaluationNoteListVoCollection getCollEvaluationNotes() {
    return collEvaluationNotes;
}
项目:openMAXIMS    文件:Logic.java   
public void setCollEvaluationNotes(
        CarePlanEvaluationNoteListVoCollection collEvaluationNotes) {
    this.collEvaluationNotes = collEvaluationNotes;
}
项目:openMAXIMS    文件:Logic.java   
public CarePlanEvaluationNoteListVoCollection getCollEvaluationNotes() {
    return collEvaluationNotes;
}
项目:openMAXIMS    文件:Logic.java   
public void setCollEvaluationNotes(
        CarePlanEvaluationNoteListVoCollection collEvaluationNotes) {
    this.collEvaluationNotes = collEvaluationNotes;
}
项目:openmaxims-linux    文件:Logic.java   
public CarePlanEvaluationNoteListVoCollection getCollEvaluationNotes() {
    return collEvaluationNotes;
}
项目:openmaxims-linux    文件:Logic.java   
public void setCollEvaluationNotes(
        CarePlanEvaluationNoteListVoCollection collEvaluationNotes) {
    this.collEvaluationNotes = collEvaluationNotes;
}