Java 类ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private boolean isAdiceLeafletsPrinted(AdviceLeafletConfigDisplayVo advice, DischargeServicesAndAdviceForDischargePlanningVo record,ims.emergency.forms.dischargeplanning_advicemobilityequipment.GenForm.lyrAdviceMobilityLayer.tabAdviceContainer.grdAdviceLefletRow row)
{
    if( advice == null  )
        return false;
    if( record == null || !record.getAdviceLeafletsPrintedIsNotNull() || record.getAdviceLeafletsPrinted().size() == 0)
        return false;

    for( int i = 0 ; i < record.getAdviceLeafletsPrinted().size();i++)
    {
        if( advice.getTemplateIsNotNull() && record.getAdviceLeafletsPrinted().get(i).getTemplateIsNotNull())
        {
            if( advice.getTemplate().getID_TemplateBo().equals(record.getAdviceLeafletsPrinted().get(i).getTemplate().getID_TemplateBo()))
            {
                row.setCellColumnGivenTooltip("Given Date: " + record.getAdviceLeafletsPrinted().get(i).getDateGiven().toString()+ ", Authoring HCP: "+ record.getAdviceLeafletsPrinted().get(i).getAuthoringHCP().getName().toString());
                return true;
            }
        }
    }

    return false;

}
项目:openMAXIMS    文件:Logic.java   
private boolean isAdiceLeafletsPrinted(AdviceLeafletConfigDisplayVo advice, DischargeServicesAndAdviceForDischargePlanningVo record,ims.emergency.forms.dischargeplanning_advicemobilityequipment.GenForm.lyrAdviceMobilityLayer.tabAdviceContainer.grdAdviceLefletRow row)
{
    if( advice == null  )
        return false;
    if( record == null || !record.getAdviceLeafletsPrintedIsNotNull() || record.getAdviceLeafletsPrinted().size() == 0)
        return false;

    for( int i = 0 ; i < record.getAdviceLeafletsPrinted().size();i++)
    {
        if( advice.getTemplateIsNotNull() && record.getAdviceLeafletsPrinted().get(i).getTemplateIsNotNull())
        {
            if( advice.getTemplate().getID_TemplateBo().equals(record.getAdviceLeafletsPrinted().get(i).getTemplate().getID_TemplateBo()))
            {
                row.setCellColumnGivenTooltip("Given Date: " + record.getAdviceLeafletsPrinted().get(i).getDateGiven().toString()+ ", Authoring HCP: "+ record.getAdviceLeafletsPrinted().get(i).getAuthoringHCP().getName().toString());
                return true;
            }
        }
    }

    return false;

}
项目:openMAXIMS    文件:Logic.java   
private boolean isPrePrintedAdviceLeafletGiven(AdviceLeafletConfigDisplayVo advice, DischargeServicesAndAdviceForDischargePlanningVo record,ims.emergency.forms.dischargeplanning_advicemobilityequipment.GenForm.lyrAdviceMobilityLayer.tabAdviceContainer.grdAdviceLefletRow row)
{
    if( advice == null  )
        return false;
    if( record == null || record.getPrePrintedAdviceLeafletsGiven()==null || record.getPrePrintedAdviceLeafletsGiven().size() == 0)
        return false;

    for( int i = 0 ; i < record.getPrePrintedAdviceLeafletsGiven().size();i++)
    {
        if( advice.getAdviceLeafletNameIsNotNull()&& record.getPrePrintedAdviceLeafletsGiven().get(i).getAdviceLeafletNameIsNotNull())
        {
            if( advice.getAdviceLeafletName().equals(record.getPrePrintedAdviceLeafletsGiven().get(i).getAdviceLeafletName()))
            {
                if (row!=null)
                {
                    row.setCellColumnGivenTooltip("Given Date: " + record.getPrePrintedAdviceLeafletsGiven().get(i).getDateGiven().toString()+ ", Authoring HCP: "+ record.getPrePrintedAdviceLeafletsGiven().get(i).getAuthoringHCP().getName().toString());
                }
                return true;
            }
        }
    }

    return false;

}
项目:openMAXIMS    文件:Logic.java   
private boolean isAdiceLeafletsPrinted(AdviceLeafletConfigDisplayVo advice, DischargeServicesAndAdviceForDischargePlanningVo record,ims.emergency.forms.dischargeplanning_advicemobilityequipment.GenForm.lyrAdviceMobilityLayer.tabAdviceContainer.grdAdviceLefletRow row)
{
    if( advice == null  )
        return false;
    if( record == null || !record.getAdviceLeafletsPrintedIsNotNull() || record.getAdviceLeafletsPrinted().size() == 0)
        return false;

    for( int i = 0 ; i < record.getAdviceLeafletsPrinted().size();i++)
    {
        if( advice.getTemplateIsNotNull() && record.getAdviceLeafletsPrinted().get(i).getTemplateIsNotNull())
        {
            if( advice.getTemplate().getID_TemplateBo().equals(record.getAdviceLeafletsPrinted().get(i).getTemplate().getID_TemplateBo()))
            {
                row.setCellColumnGivenTooltip("Given Date: " + record.getAdviceLeafletsPrinted().get(i).getDateGiven().toString()+ ", Authoring HCP: "+ record.getAdviceLeafletsPrinted().get(i).getAuthoringHCP().getName().toString());
                return true;
            }
        }
    }

    return false;

}
项目:openmaxims-linux    文件:Logic.java   
private boolean isAdiceLeafletsPrinted(AdviceLeafletConfigDisplayVo advice, DischargeServicesAndAdviceForDischargePlanningVo record,ims.emergency.forms.dischargeplanning_advicemobilityequipment.GenForm.lyrAdviceMobilityLayer.tabAdviceContainer.grdAdviceLefletRow row)
{
    if( advice == null  )
        return false;
    if( record == null || !record.getAdviceLeafletsPrintedIsNotNull() || record.getAdviceLeafletsPrinted().size() == 0)
        return false;

    for( int i = 0 ; i < record.getAdviceLeafletsPrinted().size();i++)
    {
        if( advice.getTemplateIsNotNull() && record.getAdviceLeafletsPrinted().get(i).getTemplateIsNotNull())
        {
            if( advice.getTemplate().getID_TemplateBo().equals(record.getAdviceLeafletsPrinted().get(i).getTemplate().getID_TemplateBo()))
            {
                row.setCellColumnGivenTooltip("Given Date: " + record.getAdviceLeafletsPrinted().get(i).getDateGiven().toString()+ ", Authoring HCP: "+ record.getAdviceLeafletsPrinted().get(i).getAuthoringHCP().getName().toString());
                return true;
            }
        }
    }

    return false;

}
项目:AvoinApotti    文件:DischargePlanning_AdviceMobilityEquipmentImpl.java   
public ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo save(ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo dischargeServices, InterventionsTreatmentForAdviceLeafletVo intervention) throws ims.domain.exceptions.StaleObjectException
{
    // Check parameter
    if( dischargeServices == null)
        throw new CodingRuntimeException("Can not save null record");

    // Check for validation
    if( !dischargeServices.isValidated())
        throw new CodingRuntimeException("Can not save record not validated");

    DomainFactory factory = getDomainFactory();

    // Check for a previously saved record
    if( dischargeServices.getID_DischargeServicesAndAdvice() == null)
    {
        StringBuilder query = new StringBuilder();
        query.append("SELECT COUNT(discharge) FROM DischargeServicesAndAdvice AS discharge LEFT JOIN discharge.attendance AS context WHERE context.id = :CONTEXT");

        long count = getDomainFactory().countWithHQL(query.toString(), new String[] {"CONTEXT"}, new Object[] {dischargeServices.getAttendance().getID_CareContext()});

        if (count > 0)
            throw new StaleObjectException(null);
    }

    // Commit to database
    DischargeServicesAndAdvice domainRecord = DischargeServicesAndAdviceForDischargePlanningVoAssembler.extractDischargeServicesAndAdvice(factory, dischargeServices);
    factory.save(domainRecord);

    //wdev-17075
    if( intervention != null )
    {
        InterventionsTreatmentsForAttendence doInterventionsTreatmentsForAttendence = InterventionsTreatmentForAdviceLeafletVoAssembler.extractInterventionsTreatmentsForAttendence(factory, intervention);
        factory.save(doInterventionsTreatmentsForAttendence);
    }

    //-----------

    // Return saved object
    return DischargeServicesAndAdviceForDischargePlanningVoAssembler.create(domainRecord);
}
项目:openMAXIMS    文件:DischargePlanning_AdviceMobilityEquipmentImpl.java   
public ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo save(ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo dischargeServices, InterventionsTreatmentForAdviceLeafletVo intervention) throws ims.domain.exceptions.StaleObjectException
{
    // Check parameter
    if( dischargeServices == null)
        throw new CodingRuntimeException("Can not save null record");

    // Check for validation
    if( !dischargeServices.isValidated())
        throw new CodingRuntimeException("Can not save record not validated");

    DomainFactory factory = getDomainFactory();

    // Check for a previously saved record
    if( dischargeServices.getID_DischargeServicesAndAdvice() == null)
    {
        StringBuilder query = new StringBuilder();
        query.append("SELECT COUNT(discharge) FROM DischargeServicesAndAdvice AS discharge LEFT JOIN discharge.attendance AS context WHERE context.id = :CONTEXT");

        long count = getDomainFactory().countWithHQL(query.toString(), new String[] {"CONTEXT"}, new Object[] {dischargeServices.getAttendance().getID_CareContext()});

        if (count > 0)
            throw new StaleObjectException(null);
    }

    // Commit to database
    DischargeServicesAndAdvice domainRecord = DischargeServicesAndAdviceForDischargePlanningVoAssembler.extractDischargeServicesAndAdvice(factory, dischargeServices);
    factory.save(domainRecord);

    //wdev-17075
    if( intervention != null )
    {
        InterventionsTreatmentsForAttendence doInterventionsTreatmentsForAttendence = InterventionsTreatmentForAdviceLeafletVoAssembler.extractInterventionsTreatmentsForAttendence(factory, intervention);
        factory.save(doInterventionsTreatmentsForAttendence);
    }

    //-----------

    // Return saved object
    return DischargeServicesAndAdviceForDischargePlanningVoAssembler.create(domainRecord);
}
项目:openmaxims-linux    文件:DischargePlanning_AdviceMobilityEquipmentImpl.java   
public ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo save(ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo dischargeServices, InterventionsTreatmentForAdviceLeafletVo intervention) throws ims.domain.exceptions.StaleObjectException
{
    // Check parameter
    if( dischargeServices == null)
        throw new CodingRuntimeException("Can not save null record");

    // Check for validation
    if( !dischargeServices.isValidated())
        throw new CodingRuntimeException("Can not save record not validated");

    DomainFactory factory = getDomainFactory();

    // Check for a previously saved record
    if( dischargeServices.getID_DischargeServicesAndAdvice() == null)
    {
        StringBuilder query = new StringBuilder();
        query.append("SELECT COUNT(discharge) FROM DischargeServicesAndAdvice AS discharge LEFT JOIN discharge.attendance AS context WHERE context.id = :CONTEXT");

        long count = getDomainFactory().countWithHQL(query.toString(), new String[] {"CONTEXT"}, new Object[] {dischargeServices.getAttendance().getID_CareContext()});

        if (count > 0)
            throw new StaleObjectException(null);
    }

    // Commit to database
    DischargeServicesAndAdvice domainRecord = DischargeServicesAndAdviceForDischargePlanningVoAssembler.extractDischargeServicesAndAdvice(factory, dischargeServices);
    factory.save(domainRecord);

    //wdev-17075
    if( intervention != null )
    {
        InterventionsTreatmentsForAttendence doInterventionsTreatmentsForAttendence = InterventionsTreatmentForAdviceLeafletVoAssembler.extractInterventionsTreatmentsForAttendence(factory, intervention);
        factory.save(doInterventionsTreatmentsForAttendence);
    }

    //-----------

    // Return saved object
    return DischargeServicesAndAdviceForDischargePlanningVoAssembler.create(domainRecord);
}
项目:AvoinApotti    文件:DischargePlanning_AdviceMobilityEquipmentImpl.java   
public ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo getDischargeServiceAndAdvice(ims.core.admin.vo.CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return null;

    StringBuilder query = new StringBuilder();

    query.append("SELECT discharge FROM DischargeServicesAndAdvice AS discharge LEFT JOIN discharge.attendance AS context ");
    query.append("WHERE context.id = ").append(careContext.getID_CareContext());

    return DischargeServicesAndAdviceForDischargePlanningVoAssembler.create((DischargeServicesAndAdvice) getDomainFactory().findFirst(query.toString()));

}
项目:openMAXIMS    文件:DischargePlanning_AdviceMobilityEquipmentImpl.java   
public ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo getDischargeServiceAndAdvice(ims.core.admin.vo.CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return null;

    StringBuilder query = new StringBuilder();

    query.append("SELECT discharge FROM DischargeServicesAndAdvice AS discharge LEFT JOIN discharge.attendance AS context ");
    query.append("WHERE context.id = ").append(careContext.getID_CareContext());

    return DischargeServicesAndAdviceForDischargePlanningVoAssembler.create((DischargeServicesAndAdvice) getDomainFactory().findFirst(query.toString()));

}
项目:openmaxims-linux    文件:DischargePlanning_AdviceMobilityEquipmentImpl.java   
public ims.emergency.vo.DischargeServicesAndAdviceForDischargePlanningVo getDischargeServiceAndAdvice(ims.core.admin.vo.CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return null;

    StringBuilder query = new StringBuilder();

    query.append("SELECT discharge FROM DischargeServicesAndAdvice AS discharge LEFT JOIN discharge.attendance AS context ");
    query.append("WHERE context.id = ").append(careContext.getID_CareContext());

    return DischargeServicesAndAdviceForDischargePlanningVoAssembler.create((DischargeServicesAndAdvice) getDomainFactory().findFirst(query.toString()));

}