Java 类ims.emergency.vo.domain.TriageForClinicianWorklistVoAssembler 实例源码

项目:openMAXIMS    文件:VitalSignsAllCcImpl.java   
/**
* Saves a vital sign
*/
public ims.core.vo.VitalSignsVo saveVitalSign(ims.core.vo.VitalSignsVo vitalSign, TriageForClinicianWorklistVo triageToSave) throws ims.domain.exceptions.StaleObjectException //WDEV-20426
{
    if (triageToSave!=null)
    {
        if (!triageToSave.isValidated())
        {
            throw new DomainRuntimeException("This Triage has not been validated");
        }

        DomainFactory factory = getDomainFactory();
        Triage doTriage = TriageForClinicianWorklistVoAssembler.extractTriage(factory, triageToSave);
        factory.save(doTriage);
    }

    VitalSignsAll vs = (VitalSignsAll)getDomainImpl(VitalSignsImpl.class);
    return vs.saveVitalSign(vitalSign);
}
项目:openMAXIMS    文件:VitalSignsAllCcImpl.java   
public TriageForClinicianWorklistVo getTriage(TriageRefVo triageRef)
{
    if (triageRef == null || triageRef.getID_Triage()==null)
        throw new CodingRuntimeException("Can not retrieve TriageForClinicianWorklistVo for null triage.");

    Triage doTriage = (Triage)getDomainFactory().getDomainObject(Triage.class,triageRef.getID_Triage()); 
    return TriageForClinicianWorklistVoAssembler.create(doTriage);
}
项目:AvoinApotti    文件:EDAssessmentComponentImpl.java   
public TrackingForClinicianWorklistAndTriageVo saveTracking(TrackingForClinicianWorklistAndTriageVo tracking, SeenByHCPVo seenByHcp, PatientMedsVo patmed) throws StaleObjectException
{
    if(tracking == null)
        throw new CodingRuntimeException("Cannot save a null Tracking record.");

    if(!tracking.isValidated())
        throw new CodingRuntimeException("Tracking record is not validated.");

    DomainFactory factory = getDomainFactory();
    //wdev-15930
    SeenByHCP doSeenBy = null;
    if( seenByHcp != null )
    {
        doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHcp);
        if( doSeenBy != null )
        {
            factory.save(doSeenBy);

        }
    }

    //-------------wdev-15930------------
    TriageForClinicianWorklistVo triagedetails = tracking.getTriageDetails();

    ims.emergency.domain.objects.Triage doTriage = TriageForClinicianWorklistVoAssembler.extractTriage(factory, triagedetails);
    if( doTriage != null )
    {
        factory.save(doTriage);
    }
    Tracking doTracking = TrackingForClinicianWorklistAndTriageVoAssembler.extractTracking(factory, tracking);
    if( doSeenBy != null ) 
    {
        doTracking.setSeenBy(doSeenBy);
    }
    else if (seenByHcp == null && patmed==null  && tracking.getCurrentStatusIsNotNull() && TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC.equals(tracking.getCurrentStatus().getStatus()))//WDEV-18278
    {
        //on Move,when setting the status to WAITING_TO_BE_SEEN_BY_A_MEDIC, mark currentSeenByAsCompleted and set SeenBy from Tracking to null
        SeenByHCP doSeenByHcp = doTracking.getSeenBy();
        if (doSeenByHcp!=null)
        {
            doSeenByHcp.setCompletedDateTime(new Date());
            factory.save(doSeenByHcp);
            doTracking.setSeenBy(null);
        }
    }

    if( doTriage != null) 
    {
        doTracking.setTriageDetails(doTriage);
    }

    factory.save(doTracking);

    //wdev-17825
    if( patmed != null)
    {
        PatientMedicationOnAttendance doPatientMedicationOnAttendance = PatientMedsVoAssembler.extractPatientMedicationOnAttendance(factory, patmed);
        if( doPatientMedicationOnAttendance != null )
            factory.save(doPatientMedicationOnAttendance);
    }

    return TrackingForClinicianWorklistAndTriageVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:EDAssessmentComponentImpl.java   
public TrackingForClinicianWorklistAndTriageVo saveTracking(TrackingForClinicianWorklistAndTriageVo tracking, SeenByHCPVo seenByHcp, PatientMedsVo patmed) throws StaleObjectException
{
    if(tracking == null)
        throw new CodingRuntimeException("Cannot save a null Tracking record.");

    if(!tracking.isValidated())
        throw new CodingRuntimeException("Tracking record is not validated.");

    DomainFactory factory = getDomainFactory();
    //wdev-15930
    SeenByHCP doSeenBy = null;
    if( seenByHcp != null )
    {
        doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHcp);
        if( doSeenBy != null )
        {
            factory.save(doSeenBy);

        }
    }

    //-------------wdev-15930------------
    TriageForClinicianWorklistVo triagedetails = tracking.getTriageDetails();

    ims.emergency.domain.objects.Triage doTriage = TriageForClinicianWorklistVoAssembler.extractTriage(factory, triagedetails);
    if( doTriage != null )
    {
        factory.save(doTriage);
    }
    Tracking doTracking = TrackingForClinicianWorklistAndTriageVoAssembler.extractTracking(factory, tracking);
    if( doSeenBy != null ) 
    {
        doTracking.setSeenBy(doSeenBy);
    }
    else if (seenByHcp == null && patmed==null  && tracking.getCurrentStatusIsNotNull() && TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC.equals(tracking.getCurrentStatus().getStatus()))//WDEV-18278
    {
        //on Move,when setting the status to WAITING_TO_BE_SEEN_BY_A_MEDIC, mark currentSeenByAsCompleted and set SeenBy from Tracking to null
        SeenByHCP doSeenByHcp = doTracking.getSeenBy();
        if (doSeenByHcp!=null)
        {
            doSeenByHcp.setCompletedDateTime(new Date());
            factory.save(doSeenByHcp);
            doTracking.setSeenBy(null);
        }
    }

    if( doTriage != null) 
    {
        doTracking.setTriageDetails(doTriage);
    }

    factory.save(doTracking);

    //wdev-17825
    if( patmed != null)
    {
        PatientMedicationOnAttendance doPatientMedicationOnAttendance = PatientMedsVoAssembler.extractPatientMedicationOnAttendance(factory, patmed);
        if( doPatientMedicationOnAttendance != null )
            factory.save(doPatientMedicationOnAttendance);
    }

    return TrackingForClinicianWorklistAndTriageVoAssembler.create(doTracking);
}
项目:openmaxims-linux    文件:EDAssessmentComponentImpl.java   
public TrackingForClinicianWorklistAndTriageVo saveTracking(TrackingForClinicianWorklistAndTriageVo tracking, SeenByHCPVo seenByHcp, PatientMedsVo patmed) throws StaleObjectException
{
    if(tracking == null)
        throw new CodingRuntimeException("Cannot save a null Tracking record.");

    if(!tracking.isValidated())
        throw new CodingRuntimeException("Tracking record is not validated.");

    DomainFactory factory = getDomainFactory();
    //wdev-15930
    SeenByHCP doSeenBy = null;
    if( seenByHcp != null )
    {
        doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHcp);
        if( doSeenBy != null )
        {
            factory.save(doSeenBy);

        }
    }

    //-------------wdev-15930------------
    TriageForClinicianWorklistVo triagedetails = tracking.getTriageDetails();

    ims.emergency.domain.objects.Triage doTriage = TriageForClinicianWorklistVoAssembler.extractTriage(factory, triagedetails);
    if( doTriage != null )
    {
        factory.save(doTriage);
    }
    Tracking doTracking = TrackingForClinicianWorklistAndTriageVoAssembler.extractTracking(factory, tracking);
    if( doSeenBy != null ) 
    {
        doTracking.setSeenBy(doSeenBy);
    }
    else if (seenByHcp == null && patmed==null  && tracking.getCurrentStatusIsNotNull() && TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC.equals(tracking.getCurrentStatus().getStatus()))//WDEV-18278
    {
        //on Move,when setting the status to WAITING_TO_BE_SEEN_BY_A_MEDIC, mark currentSeenByAsCompleted and set SeenBy from Tracking to null
        SeenByHCP doSeenByHcp = doTracking.getSeenBy();
        if (doSeenByHcp!=null)
        {
            doSeenByHcp.setCompletedDateTime(new Date());
            factory.save(doSeenByHcp);
            doTracking.setSeenBy(null);
        }
    }

    if( doTriage != null) 
    {
        doTracking.setTriageDetails(doTriage);
    }

    factory.save(doTracking);

    //wdev-17825
    if( patmed != null)
    {
        PatientMedicationOnAttendance doPatientMedicationOnAttendance = PatientMedsVoAssembler.extractPatientMedicationOnAttendance(factory, patmed);
        if( doPatientMedicationOnAttendance != null )
            factory.save(doPatientMedicationOnAttendance);
    }

    return TrackingForClinicianWorklistAndTriageVoAssembler.create(doTracking);
}