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

项目:AvoinApotti    文件:NutritionalRiskAssessmentDialogImpl.java   
public NutritionalRiskAssessmentVo getRecord(Integer recordId) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    NutritionalRiskAssessment domAssess = (NutritionalRiskAssessment)factory.getDomainObject(NutritionalRiskAssessment.class, recordId);
    return(NutritionalRiskAssessmentVoAssembler.create(domAssess));
}
项目:AvoinApotti    文件:NutritionalRiskAssessmentDialogImpl.java   
public AssessmentHeaderInfo saveRecord(NutritionalRiskAssessmentVo nutritionalRiskRecord, AssessmentHeaderInfo assessment, AssessmentComponent component, VitalSignsVo vitalSign) throws StaleObjectException
{
    // Ensure the Value Object was validated
    if (!nutritionalRiskRecord.isValidated())
        throw new DomainRuntimeException("This Nutritional Risk Assessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    NutritionalRiskAssessment domAssessment = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);

    factory.save(domAssessment);

    if(vitalSign != null)
        saveVitalSign(vitalSign);

    if (assessment != null)
    {
        if(component != null && component instanceof NurAssessmentEatingVo)
        {
            NutritionalRiskAssessmentVo nutritionalRisk = NutritionalRiskAssessmentVoAssembler.create(domAssessment);
            nutritionalRisk.validate();

            ((NurAssessmentEatingVo)component).setNutritionalRiskAssessment(nutritionalRisk);
            component.validate();
        }

        assessment.validate();

        return saveEatingComponent(assessment, component, null);
    }
    return null;  // It otherwise expects assessment header
}
项目:AvoinApotti    文件:NutritionalRiskAssessmentDialogImpl.java   
public Boolean isPartOfEatingAssessment(NutritionalRiskAssessmentVo nutritionalRiskRecord) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    NutritionalRiskAssessment domNutritionalRisk = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
    java.util.List water = factory.find("from NurEatingComponent n where n.nutritionalRiskAssessment = :nr", "nr", domNutritionalRisk);

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

    return Boolean.TRUE;
}
项目:openMAXIMS    文件:NutritionalRiskAssessmentDialogImpl.java   
public NutritionalRiskAssessmentVo getRecord(Integer recordId) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    NutritionalRiskAssessment domAssess = (NutritionalRiskAssessment)factory.getDomainObject(NutritionalRiskAssessment.class, recordId);
    return(NutritionalRiskAssessmentVoAssembler.create(domAssess));
}
项目:openMAXIMS    文件:NutritionalRiskAssessmentDialogImpl.java   
public AssessmentHeaderInfo saveRecord(NutritionalRiskAssessmentVo nutritionalRiskRecord, AssessmentHeaderInfo assessment, AssessmentComponent component, VitalSignsVo vitalSign) throws StaleObjectException
{
    // Ensure the Value Object was validated
    if (!nutritionalRiskRecord.isValidated())
        throw new DomainRuntimeException("This Nutritional Risk Assessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    NutritionalRiskAssessment domAssessment = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);

    factory.save(domAssessment);

    if(vitalSign != null)
        saveVitalSign(vitalSign);

    if (assessment != null)
    {
        if(component != null && component instanceof NurAssessmentEatingVo)
        {
            NutritionalRiskAssessmentVo nutritionalRisk = NutritionalRiskAssessmentVoAssembler.create(domAssessment);
            nutritionalRisk.validate();

            ((NurAssessmentEatingVo)component).setNutritionalRiskAssessment(nutritionalRisk);
            component.validate();
        }

        assessment.validate();

        return saveEatingComponent(assessment, component, null);
    }
    return null;  // It otherwise expects assessment header
}
项目:openMAXIMS    文件:NutritionalRiskAssessmentDialogImpl.java   
public Boolean isPartOfEatingAssessment(NutritionalRiskAssessmentVo nutritionalRiskRecord) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    NutritionalRiskAssessment domNutritionalRisk = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
    java.util.List water = factory.find("from NurEatingComponent n where n.nutritionalRiskAssessment = :nr", "nr", domNutritionalRisk);

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

    return Boolean.TRUE;
}
项目:openMAXIMS    文件:NutritionalRiskAssessmentDialogImpl.java   
public NutritionalRiskAssessmentVo getRecord(Integer recordId) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    NutritionalRiskAssessment domAssess = (NutritionalRiskAssessment)factory.getDomainObject(NutritionalRiskAssessment.class, recordId);
    return(NutritionalRiskAssessmentVoAssembler.create(domAssess));
}
项目:openMAXIMS    文件:NutritionalRiskAssessmentDialogImpl.java   
public AssessmentHeaderInfo saveRecord(NutritionalRiskAssessmentVo nutritionalRiskRecord, AssessmentHeaderInfo assessment, AssessmentComponent component, VitalSignsVo vitalSign) throws StaleObjectException
{
    // Ensure the Value Object was validated
    if (!nutritionalRiskRecord.isValidated())
        throw new DomainRuntimeException("This Nutritional Risk Assessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    NutritionalRiskAssessment domAssessment = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);

    factory.save(domAssessment);

    if(vitalSign != null)
        saveVitalSign(vitalSign);

    if (assessment != null)
    {
        if(component != null && component instanceof NurAssessmentEatingVo)
        {
            NutritionalRiskAssessmentVo nutritionalRisk = NutritionalRiskAssessmentVoAssembler.create(domAssessment);
            nutritionalRisk.validate();

            ((NurAssessmentEatingVo)component).setNutritionalRiskAssessment(nutritionalRisk);
            component.validate();
        }

        assessment.validate();

        return saveEatingComponent(assessment, component, null);
    }
    return null;  // It otherwise expects assessment header
}
项目:openMAXIMS    文件:NutritionalRiskAssessmentDialogImpl.java   
public Boolean isPartOfEatingAssessment(NutritionalRiskAssessmentVo nutritionalRiskRecord) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    NutritionalRiskAssessment domNutritionalRisk = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
    java.util.List water = factory.find("from NurEatingComponent n where n.nutritionalRiskAssessment = :nr", "nr", domNutritionalRisk);

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

    return Boolean.TRUE;
}
项目:openmaxims-linux    文件:NutritionalRiskAssessmentDialogImpl.java   
public NutritionalRiskAssessmentVo getRecord(Integer recordId) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    NutritionalRiskAssessment domAssess = (NutritionalRiskAssessment)factory.getDomainObject(NutritionalRiskAssessment.class, recordId);
    return(NutritionalRiskAssessmentVoAssembler.create(domAssess));
}
项目:openmaxims-linux    文件:NutritionalRiskAssessmentDialogImpl.java   
public AssessmentHeaderInfo saveRecord(NutritionalRiskAssessmentVo nutritionalRiskRecord, AssessmentHeaderInfo assessment, AssessmentComponent component, VitalSignsVo vitalSign) throws StaleObjectException
{
    // Ensure the Value Object was validated
    if (!nutritionalRiskRecord.isValidated())
        throw new DomainRuntimeException("This Nutritional Risk Assessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    NutritionalRiskAssessment domAssessment = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);

    factory.save(domAssessment);

    if(vitalSign != null)
        saveVitalSign(vitalSign);

    if (assessment != null)
    {
        if(component != null && component instanceof NurAssessmentEatingVo)
        {
            NutritionalRiskAssessmentVo nutritionalRisk = NutritionalRiskAssessmentVoAssembler.create(domAssessment);
            nutritionalRisk.validate();

            ((NurAssessmentEatingVo)component).setNutritionalRiskAssessment(nutritionalRisk);
            component.validate();
        }

        assessment.validate();

        return saveEatingComponent(assessment, component, null);
    }
    return null;  // It otherwise expects assessment header
}
项目:openmaxims-linux    文件:NutritionalRiskAssessmentDialogImpl.java   
public Boolean isPartOfEatingAssessment(NutritionalRiskAssessmentVo nutritionalRiskRecord) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    NutritionalRiskAssessment domNutritionalRisk = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
    java.util.List water = factory.find("from NurEatingComponent n where n.nutritionalRiskAssessment = :nr", "nr", domNutritionalRisk);

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

    return Boolean.TRUE;
}