Java 类ims.core.vo.domain.PendingEmergencyAdmissionLiteVoAssembler 实例源码

项目:AvoinApotti    文件:AssignADTWardAndSpecialtyDialogImpl.java   
/**
* savePendingEmergency
*/
public void savePendingEmergency(ims.core.vo.PendingEmergencyAdmissionLiteVo emergency, Boolean hasWardChanged,TrackingForADTWardAndSpecialtyDialogVo tracking) throws ims.domain.exceptions.StaleObjectException
{
    if (hasWardChanged == null)
        throw new CodingRuntimeException("hasWardChanged cannot be null in method savePendingEmergency");
    if (emergency == null)
        throw new CodingRuntimeException("emergency is null in method savePendingEmergency");
    if (!emergency.isValidated())
        throw new CodingRuntimeException("emergency has not been validated in method savePendingEmergency");

    //WDEV-10421
    DomainFactory factory = getDomainFactory();
    PendingEmergencyAdmission doPendingEmergency = PendingEmergencyAdmissionLiteVoAssembler.extractPendingEmergencyAdmission(factory, emergency);
    if(hasWardChanged)
    {
        AllocatedWardHistory doAllocWardHist = new AllocatedWardHistory();
        doAllocWardHist.setAllocatedWard(doPendingEmergency.getAllocatedWard());
        doAllocWardHist.setAllocatedWardDateTime(new Date());       
        if(getLoggedInUser() != null)
            doAllocWardHist.setAllocatingUser((AppUser) getDomainFactory().getDomainObject((AppUserRefVo) getLoggedInUser()));

        doPendingEmergency.getAllocatedWardHistory().add(doAllocWardHist);
    }       

    factory.save(doPendingEmergency);

    //wdev-16866
    if( tracking != null )
    {
        Tracking doTracking =  TrackingForADTWardAndSpecialtyDialogVoAssembler.extractTracking(factory, tracking);
        factory.save(doTracking);       
    }
    //------------
}
项目:openMAXIMS    文件:AssignADTWardAndSpecialtyDialogImpl.java   
/**
* savePendingEmergency
*/
public void savePendingEmergency(ims.core.vo.PendingEmergencyAdmissionLiteVo emergency, Boolean hasWardChanged,TrackingForADTWardAndSpecialtyDialogVo tracking) throws ims.domain.exceptions.StaleObjectException
{
    if (hasWardChanged == null)
        throw new CodingRuntimeException("hasWardChanged cannot be null in method savePendingEmergency");
    if (emergency == null)
        throw new CodingRuntimeException("emergency is null in method savePendingEmergency");
    if (!emergency.isValidated())
        throw new CodingRuntimeException("emergency has not been validated in method savePendingEmergency");

    //WDEV-10421
    DomainFactory factory = getDomainFactory();
    PendingEmergencyAdmission doPendingEmergency = PendingEmergencyAdmissionLiteVoAssembler.extractPendingEmergencyAdmission(factory, emergency);
    if(hasWardChanged)
    {
        AllocatedWardHistory doAllocWardHist = new AllocatedWardHistory();
        doAllocWardHist.setAllocatedWard(doPendingEmergency.getAllocatedWard());
        doAllocWardHist.setAllocatedWardDateTime(new Date());       
        if(getLoggedInUser() != null)
            doAllocWardHist.setAllocatingUser((AppUser) getDomainFactory().getDomainObject((AppUserRefVo) getLoggedInUser()));

        doPendingEmergency.getAllocatedWardHistory().add(doAllocWardHist);
    }       

    factory.save(doPendingEmergency);

    //wdev-16866
    if( tracking != null )
    {
        Tracking doTracking =  TrackingForADTWardAndSpecialtyDialogVoAssembler.extractTracking(factory, tracking);
        factory.save(doTracking);       
    }
    //------------
}
项目:openMAXIMS    文件:AssignADTWardAndSpecialtyDialogImpl.java   
/**
* savePendingEmergency
*/
public void savePendingEmergency(ims.core.vo.PendingEmergencyAdmissionLiteVo emergency, Boolean hasWardChanged,TrackingForADTWardAndSpecialtyDialogVo tracking) throws ims.domain.exceptions.StaleObjectException
{
    if (hasWardChanged == null)
        throw new CodingRuntimeException("hasWardChanged cannot be null in method savePendingEmergency");
    if (emergency == null)
        throw new CodingRuntimeException("emergency is null in method savePendingEmergency");
    if (!emergency.isValidated())
        throw new CodingRuntimeException("emergency has not been validated in method savePendingEmergency");

    //WDEV-10421
    DomainFactory factory = getDomainFactory();
    PendingEmergencyAdmission doPendingEmergency = PendingEmergencyAdmissionLiteVoAssembler.extractPendingEmergencyAdmission(factory, emergency);
    if(hasWardChanged)
    {
        AllocatedWardHistory doAllocWardHist = new AllocatedWardHistory();
        doAllocWardHist.setAllocatedWard(doPendingEmergency.getAllocatedWard());
        doAllocWardHist.setAllocatedWardDateTime(new Date());       
        if(getLoggedInUser() != null)
            doAllocWardHist.setAllocatingUser((AppUser) getDomainFactory().getDomainObject((AppUserRefVo) getLoggedInUser()));

        doPendingEmergency.getAllocatedWardHistory().add(doAllocWardHist);
    }       

    factory.save(doPendingEmergency);

    //wdev-16866
    if( tracking != null )
    {
        Tracking doTracking =  TrackingForADTWardAndSpecialtyDialogVoAssembler.extractTracking(factory, tracking);
        factory.save(doTracking);       
    }
    //------------
}
项目:openmaxims-linux    文件:AssignADTWardAndSpecialtyDialogImpl.java   
/**
* savePendingEmergency
*/
public void savePendingEmergency(ims.core.vo.PendingEmergencyAdmissionLiteVo emergency, Boolean hasWardChanged,TrackingForADTWardAndSpecialtyDialogVo tracking) throws ims.domain.exceptions.StaleObjectException
{
    if (hasWardChanged == null)
        throw new CodingRuntimeException("hasWardChanged cannot be null in method savePendingEmergency");
    if (emergency == null)
        throw new CodingRuntimeException("emergency is null in method savePendingEmergency");
    if (!emergency.isValidated())
        throw new CodingRuntimeException("emergency has not been validated in method savePendingEmergency");

    //WDEV-10421
    DomainFactory factory = getDomainFactory();
    PendingEmergencyAdmission doPendingEmergency = PendingEmergencyAdmissionLiteVoAssembler.extractPendingEmergencyAdmission(factory, emergency);
    if(hasWardChanged)
    {
        AllocatedWardHistory doAllocWardHist = new AllocatedWardHistory();
        doAllocWardHist.setAllocatedWard(doPendingEmergency.getAllocatedWard());
        doAllocWardHist.setAllocatedWardDateTime(new Date());       
        if(getLoggedInUser() != null)
            doAllocWardHist.setAllocatingUser((AppUser) getDomainFactory().getDomainObject((AppUserRefVo) getLoggedInUser()));

        doPendingEmergency.getAllocatedWardHistory().add(doAllocWardHist);
    }       

    factory.save(doPendingEmergency);

    //wdev-16866
    if( tracking != null )
    {
        Tracking doTracking =  TrackingForADTWardAndSpecialtyDialogVoAssembler.extractTracking(factory, tracking);
        factory.save(doTracking);       
    }
    //------------
}