Java 类ims.nursing.vo.domain.CarePlanEvaluationNoteListVoAssembler 实例源码

项目: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    文件: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    文件: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    文件: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();
}