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

项目:AvoinApotti    文件:MNAInputImpl.java   
/**
* get MiniNutritionalAssessment Record
*/
public ims.nursing.vo.MiniNutritionalAssessment getRecord(Integer recordID)
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssess = (ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment)factory.getDomainObject(ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment.class, recordID);
    return(MiniNutritionalAssessmentAssembler.create(domAssess));
}
项目:AvoinApotti    文件:MNAInputImpl.java   
/**
* check if Part of Eating Assessment
*/
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord)
        throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domMna = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, mnaRecord);
    java.util.List mnas = factory.find("from EatingComponent E where E.miniNutritionalAssessment = :mna", "mna", domMna);

    if(mnas == null || mnas.size() == 0)
        return Boolean.FALSE;

    return Boolean.TRUE;
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* get MiniNutritionalAssessment Record
*/
public ims.nursing.vo.MiniNutritionalAssessment getRecord(Integer recordID)
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssess = (ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment)factory.getDomainObject(ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment.class, recordID);
    return(MiniNutritionalAssessmentAssembler.create(domAssess));
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* check if Part of Eating Assessment
*/
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord)
        throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domMna = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, mnaRecord);
    java.util.List mnas = factory.find("from EatingComponent E where E.miniNutritionalAssessment = :mna", "mna", domMna);

    if(mnas == null || mnas.size() == 0)
        return Boolean.FALSE;

    return Boolean.TRUE;
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* get MiniNutritionalAssessment Record
*/
public ims.nursing.vo.MiniNutritionalAssessment getRecord(Integer recordID)
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssess = (ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment)factory.getDomainObject(ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment.class, recordID);
    return(MiniNutritionalAssessmentAssembler.create(domAssess));
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* check if Part of Eating Assessment
*/
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord)
        throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domMna = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, mnaRecord);
    java.util.List mnas = factory.find("from EatingComponent E where E.miniNutritionalAssessment = :mna", "mna", domMna);

    if(mnas == null || mnas.size() == 0)
        return Boolean.FALSE;

    return Boolean.TRUE;
}
项目:openmaxims-linux    文件:MNAInputImpl.java   
/**
* get MiniNutritionalAssessment Record
*/
public ims.nursing.vo.MiniNutritionalAssessment getRecord(Integer recordID)
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssess = (ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment)factory.getDomainObject(ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment.class, recordID);
    return(MiniNutritionalAssessmentAssembler.create(domAssess));
}
项目:openmaxims-linux    文件:MNAInputImpl.java   
/**
* check if Part of Eating Assessment
*/
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord)
        throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domMna = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, mnaRecord);
    java.util.List mnas = factory.find("from EatingComponent E where E.miniNutritionalAssessment = :mna", "mna", domMna);

    if(mnas == null || mnas.size() == 0)
        return Boolean.FALSE;

    return Boolean.TRUE;
}
项目:AvoinApotti    文件:MNAInputImpl.java   
/**
* save MiniNutritionalAssessment Record
*/
public MiniNutritionalAssessment saveRecord(MiniNutritionalAssessment voMiniNutritionalAssessment) throws DomainInterfaceException, StaleObjectException 
{
    // Ensure the Value Object was validated
    if (!voMiniNutritionalAssessment.isValidated())
        throw new DomainRuntimeException("This FallAssessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssessment = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, voMiniNutritionalAssessment);

    factory.save(domAssessment);

    return MiniNutritionalAssessmentAssembler.create(domAssessment);    


}
项目:AvoinApotti    文件:MNAViewImpl.java   
public MiniNutritionalAssessmentCollection listAssessments(Date dateFrom,Date dateTo, CareContextLiteVo careContextref)
        throws DomainInterfaceException {
    DomainFactory factory = getDomainFactory();

    String filter = " from MiniNutritionalAssessment mna ";
    StringBuffer filterString = new StringBuffer();

    boolean conditionFound = false;

    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    if (dateFrom != null && dateTo != null)
    {
        filterString.append(" mna.dateTimeInitiated > :fromDate and mna.dateTimeInitiated < :toDate ");
        conditionFound = true;
        markerNames.add("fromDate");
        markerNames.add("toDate");
        markerValues.add(dateFrom.addDay(-1).getDate());
        markerValues.add(dateTo.addDay(1).getDate());
    }
    else if (dateFrom != null)
    {
        filterString.append(" mna.dateTimeInitiated > :fromDate ");
        conditionFound = true;
        markerNames.add("fromDate");

        markerValues.add(dateFrom.addDay(-1).getDate());
    }

    if (careContextref != null)
    {
        if (conditionFound)
            filterString.append(" and ");



        filterString.append(" mna.careContext.id = :careContext ");
        markerNames.add("careContext");
        markerValues.add(careContextref.getID_CareContext());
    }

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);
    filter += " where ";

    filter += filterString.toString();

    List procs = factory.find(filter, markerNames, markerValues);

    return MiniNutritionalAssessmentAssembler.createMiniNutritionalAssessmentCollectionFromMiniNutritionalAssessment(procs).sort();


}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* save MiniNutritionalAssessment Record
*/
public MiniNutritionalAssessment saveRecord(MiniNutritionalAssessment voMiniNutritionalAssessment) throws DomainInterfaceException, StaleObjectException 
{
    // Ensure the Value Object was validated
    if (!voMiniNutritionalAssessment.isValidated())
        throw new DomainRuntimeException("This FallAssessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssessment = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, voMiniNutritionalAssessment);

    factory.save(domAssessment);

    return MiniNutritionalAssessmentAssembler.create(domAssessment);    


}
项目:openMAXIMS    文件:MNAViewImpl.java   
public MiniNutritionalAssessmentCollection listAssessments(Date dateFrom,Date dateTo, CareContextLiteVo careContextref)
        throws DomainInterfaceException {
    DomainFactory factory = getDomainFactory();

    String filter = " from MiniNutritionalAssessment mna ";
    StringBuffer filterString = new StringBuffer();

    boolean conditionFound = false;

    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    if (dateFrom != null && dateTo != null)
    {
        filterString.append(" mna.dateTimeInitiated > :fromDate and mna.dateTimeInitiated < :toDate ");
        conditionFound = true;
        markerNames.add("fromDate");
        markerNames.add("toDate");
        markerValues.add(dateFrom.addDay(-1).getDate());
        markerValues.add(dateTo.addDay(1).getDate());
    }
    else if (dateFrom != null)
    {
        filterString.append(" mna.dateTimeInitiated > :fromDate ");
        conditionFound = true;
        markerNames.add("fromDate");

        markerValues.add(dateFrom.addDay(-1).getDate());
    }

    if (careContextref != null)
    {
        if (conditionFound)
            filterString.append(" and ");



        filterString.append(" mna.careContext.id = :careContext ");
        markerNames.add("careContext");
        markerValues.add(careContextref.getID_CareContext());
    }

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);
    filter += " where ";

    filter += filterString.toString();

    List procs = factory.find(filter, markerNames, markerValues);

    return MiniNutritionalAssessmentAssembler.createMiniNutritionalAssessmentCollectionFromMiniNutritionalAssessment(procs).sort();


}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* save MiniNutritionalAssessment Record
*/
public MiniNutritionalAssessment saveRecord(MiniNutritionalAssessment voMiniNutritionalAssessment) throws DomainInterfaceException, StaleObjectException 
{
    // Ensure the Value Object was validated
    if (!voMiniNutritionalAssessment.isValidated())
        throw new DomainRuntimeException("This FallAssessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssessment = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, voMiniNutritionalAssessment);

    factory.save(domAssessment);

    return MiniNutritionalAssessmentAssembler.create(domAssessment);    


}
项目:openMAXIMS    文件:MNAViewImpl.java   
public MiniNutritionalAssessmentCollection listAssessments(Date dateFrom,Date dateTo, CareContextLiteVo careContextref)
        throws DomainInterfaceException {
    DomainFactory factory = getDomainFactory();

    String filter = " from MiniNutritionalAssessment mna ";
    StringBuffer filterString = new StringBuffer();

    boolean conditionFound = false;

    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    if (dateFrom != null && dateTo != null)
    {
        filterString.append(" mna.dateTimeInitiated > :fromDate and mna.dateTimeInitiated < :toDate ");
        conditionFound = true;
        markerNames.add("fromDate");
        markerNames.add("toDate");
        markerValues.add(dateFrom.addDay(-1).getDate());
        markerValues.add(dateTo.addDay(1).getDate());
    }
    else if (dateFrom != null)
    {
        filterString.append(" mna.dateTimeInitiated > :fromDate ");
        conditionFound = true;
        markerNames.add("fromDate");

        markerValues.add(dateFrom.addDay(-1).getDate());
    }

    if (careContextref != null)
    {
        if (conditionFound)
            filterString.append(" and ");



        filterString.append(" mna.careContext.id = :careContext ");
        markerNames.add("careContext");
        markerValues.add(careContextref.getID_CareContext());
    }

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);
    filter += " where ";

    filter += filterString.toString();

    List procs = factory.find(filter, markerNames, markerValues);

    return MiniNutritionalAssessmentAssembler.createMiniNutritionalAssessmentCollectionFromMiniNutritionalAssessment(procs).sort();


}
项目:openmaxims-linux    文件:MNAInputImpl.java   
/**
* save MiniNutritionalAssessment Record
*/
public MiniNutritionalAssessment saveRecord(MiniNutritionalAssessment voMiniNutritionalAssessment) throws DomainInterfaceException, StaleObjectException 
{
    // Ensure the Value Object was validated
    if (!voMiniNutritionalAssessment.isValidated())
        throw new DomainRuntimeException("This FallAssessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssessment = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, voMiniNutritionalAssessment);

    factory.save(domAssessment);

    return MiniNutritionalAssessmentAssembler.create(domAssessment);    


}
项目:openmaxims-linux    文件:MNAViewImpl.java   
public MiniNutritionalAssessmentCollection listAssessments(Date dateFrom,Date dateTo, CareContextLiteVo careContextref)
        throws DomainInterfaceException {
    DomainFactory factory = getDomainFactory();

    String filter = " from MiniNutritionalAssessment mna ";
    StringBuffer filterString = new StringBuffer();

    boolean conditionFound = false;

    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    if (dateFrom != null && dateTo != null)
    {
        filterString.append(" mna.dateTimeInitiated > :fromDate and mna.dateTimeInitiated < :toDate ");
        conditionFound = true;
        markerNames.add("fromDate");
        markerNames.add("toDate");
        markerValues.add(dateFrom.addDay(-1).getDate());
        markerValues.add(dateTo.addDay(1).getDate());
    }
    else if (dateFrom != null)
    {
        filterString.append(" mna.dateTimeInitiated > :fromDate ");
        conditionFound = true;
        markerNames.add("fromDate");

        markerValues.add(dateFrom.addDay(-1).getDate());
    }

    if (careContextref != null)
    {
        if (conditionFound)
            filterString.append(" and ");



        filterString.append(" mna.careContext.id = :careContext ");
        markerNames.add("careContext");
        markerValues.add(careContextref.getID_CareContext());
    }

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);
    filter += " where ";

    filter += filterString.toString();

    List procs = factory.find(filter, markerNames, markerValues);

    return MiniNutritionalAssessmentAssembler.createMiniNutritionalAssessmentCollectionFromMiniNutritionalAssessment(procs).sort();


}