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

项目:AvoinApotti    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriage(TrackingRefVo trackingId) 
{
    if(trackingId == null || trackingId.getID_Tracking() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id.");

    return TrackingForTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking()));
}
项目:AvoinApotti    文件:TriageImpl.java   
public TrackingForTriageVo saveTracking(TrackingForTriageVo tracking, SeenByHCPVo seenByHCP) throws StaleObjectException     //wdev-15930  //WDEV-16816
{
    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
    //WDEV-16816
    SeenByHCP doSeenBy = null;
    if( seenByHCP != null ) 
    {
        doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHCP);
        if( doSeenBy != null )
        {
            factory.save(doSeenBy);

        }
    }

    //-------------wdev-15930------------

    Tracking doTracking = TrackingForTriageVoAssembler.extractTracking(factory, tracking);
    if( doSeenBy != null ) //wdev-15930 //WDEV-16816
    {
        doTracking.setSeenBy(doSeenBy); //WDEV-16816
    }

    factory.save(doTracking);

    return TrackingForTriageVoAssembler.create(doTracking);
}
项目:AvoinApotti    文件:TriageImpl.java   
public TrackingForTriageVo geTrackingForTriageByAttendanceId(EmergencyAttendanceRefVo attendanceId) 
{
    if(attendanceId == null || attendanceId.getID_EmergencyAttendance() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Attendance Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att where att.id = :AttendanceId";

    List<?> list = factory.find(query, new String[] {"AttendanceId"}, new Object[] {attendanceId.getID_EmergencyAttendance()});

    if(list == null || list.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) list.get(0));
}
项目:AvoinApotti    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriageByCareContext(CareContextRefVo careContext) 
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Care Context Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att left join att.careContext as cc where cc.id = :CareContextId";

    List<?> trackingList = factory.find(query, new String[] {"CareContextId"}, new Object[] {careContext.getID_CareContext()});

    if(trackingList == null || trackingList.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) trackingList.get(0));
}
项目:AvoinApotti    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriageByActiveCareContext(PatientRefVo patientRef)
{
    if(patientRef == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Patient Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att left join att.careContext as cc left join cc.episodeOfCare as EOC left join EOC.careSpell as CS  left join CS.patient as PAT where cc.endDateTime is null and PAT.id = :PatientId";

    List<?> trackingList = factory.find(query, new String[] {"PatientId"}, new Object[] {patientRef.getID_Patient()});

    if(trackingList == null || trackingList.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriage(TrackingRefVo trackingId) 
{
    if(trackingId == null || trackingId.getID_Tracking() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id.");

    return TrackingForTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking()));
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo saveTracking(TrackingForTriageVo tracking, SeenByHCPVo seenByHCP) throws StaleObjectException     //wdev-15930  //WDEV-16816
{
    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
    //WDEV-16816
    SeenByHCP doSeenBy = null;
    if( seenByHCP != null ) 
    {
        doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHCP);
        if( doSeenBy != null )
        {
            factory.save(doSeenBy);

        }
    }

    //-------------wdev-15930------------

    Tracking doTracking = TrackingForTriageVoAssembler.extractTracking(factory, tracking);
    if( doSeenBy != null ) //wdev-15930 //WDEV-16816
    {
        doTracking.setSeenBy(doSeenBy); //WDEV-16816
    }

    factory.save(doTracking);

    return TrackingForTriageVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo geTrackingForTriageByAttendanceId(EmergencyAttendanceRefVo attendanceId) 
{
    if(attendanceId == null || attendanceId.getID_EmergencyAttendance() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Attendance Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att where att.id = :AttendanceId";

    List<?> list = factory.find(query, new String[] {"AttendanceId"}, new Object[] {attendanceId.getID_EmergencyAttendance()});

    if(list == null || list.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) list.get(0));
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriageByCareContext(CareContextRefVo careContext) 
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Care Context Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att left join att.careContext as cc where cc.id = :CareContextId";

    List<?> trackingList = factory.find(query, new String[] {"CareContextId"}, new Object[] {careContext.getID_CareContext()});

    if(trackingList == null || trackingList.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriageByActiveCareContext(PatientRefVo patientRef)
{
    if(patientRef == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Patient Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att left join att.careContext as cc left join cc.episodeOfCare as EOC left join EOC.careSpell as CS  left join CS.patient as PAT where cc.endDateTime is null and PAT.id = :PatientId";

    List<?> trackingList = factory.find(query, new String[] {"PatientId"}, new Object[] {patientRef.getID_Patient()});

    if(trackingList == null || trackingList.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriage(TrackingRefVo trackingId) 
{
    if(trackingId == null || trackingId.getID_Tracking() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id.");

    return TrackingForTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking()));
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo saveTracking(TrackingForTriageVo tracking, SeenByHCPVo seenByHCP) throws StaleObjectException     //wdev-15930  //WDEV-16816
{
    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
    //WDEV-16816
    SeenByHCP doSeenBy = null;
    if( seenByHCP != null ) 
    {
        doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHCP);
        if( doSeenBy != null )
        {
            factory.save(doSeenBy);

        }
    }

    //-------------wdev-15930------------

    Tracking doTracking = TrackingForTriageVoAssembler.extractTracking(factory, tracking);
    if( doSeenBy != null ) //wdev-15930 //WDEV-16816
    {
        doTracking.setSeenBy(doSeenBy); //WDEV-16816
    }

    factory.save(doTracking);

    return TrackingForTriageVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo geTrackingForTriageByAttendanceId(EmergencyAttendanceRefVo attendanceId) 
{
    if(attendanceId == null || attendanceId.getID_EmergencyAttendance() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Attendance Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att where att.id = :AttendanceId";

    List<?> list = factory.find(query, new String[] {"AttendanceId"}, new Object[] {attendanceId.getID_EmergencyAttendance()});

    if(list == null || list.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) list.get(0));
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriageByCareContext(CareContextRefVo careContext) 
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Care Context Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att left join att.careContext as cc where cc.id = :CareContextId";

    List<?> trackingList = factory.find(query, new String[] {"CareContextId"}, new Object[] {careContext.getID_CareContext()});

    if(trackingList == null || trackingList.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openMAXIMS    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriageByActiveCareContext(PatientRefVo patientRef)
{
    if(patientRef == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Patient Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att left join att.careContext as cc left join cc.episodeOfCare as EOC left join EOC.careSpell as CS  left join CS.patient as PAT where cc.endDateTime is null and PAT.id = :PatientId";

    List<?> trackingList = factory.find(query, new String[] {"PatientId"}, new Object[] {patientRef.getID_Patient()});

    if(trackingList == null || trackingList.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openmaxims-linux    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriage(TrackingRefVo trackingId) 
{
    if(trackingId == null || trackingId.getID_Tracking() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id.");

    return TrackingForTriageVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking()));
}
项目:openmaxims-linux    文件:TriageImpl.java   
public TrackingForTriageVo saveTracking(TrackingForTriageVo tracking, SeenByHCPVo seenByHCP) throws StaleObjectException     //wdev-15930  //WDEV-16816
{
    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
    //WDEV-16816
    SeenByHCP doSeenBy = null;
    if( seenByHCP != null ) 
    {
        doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHCP);
        if( doSeenBy != null )
        {
            factory.save(doSeenBy);

        }
    }

    //-------------wdev-15930------------

    Tracking doTracking = TrackingForTriageVoAssembler.extractTracking(factory, tracking);
    if( doSeenBy != null ) //wdev-15930 //WDEV-16816
    {
        doTracking.setSeenBy(doSeenBy); //WDEV-16816
    }

    factory.save(doTracking);

    return TrackingForTriageVoAssembler.create(doTracking);
}
项目:openmaxims-linux    文件:TriageImpl.java   
public TrackingForTriageVo geTrackingForTriageByAttendanceId(EmergencyAttendanceRefVo attendanceId) 
{
    if(attendanceId == null || attendanceId.getID_EmergencyAttendance() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Attendance Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att where att.id = :AttendanceId";

    List<?> list = factory.find(query, new String[] {"AttendanceId"}, new Object[] {attendanceId.getID_EmergencyAttendance()});

    if(list == null || list.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) list.get(0));
}
项目:openmaxims-linux    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriageByCareContext(CareContextRefVo careContext) 
{
    if(careContext == null || careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Care Context Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att left join att.careContext as cc where cc.id = :CareContextId";

    List<?> trackingList = factory.find(query, new String[] {"CareContextId"}, new Object[] {careContext.getID_CareContext()});

    if(trackingList == null || trackingList.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openmaxims-linux    文件:TriageImpl.java   
public TrackingForTriageVo getTrackingForTriageByActiveCareContext(PatientRefVo patientRef)
{
    if(patientRef == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Patient Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select tr from Tracking as tr left join tr.attendance as att left join att.careContext as cc left join cc.episodeOfCare as EOC left join EOC.careSpell as CS  left join CS.patient as PAT where cc.endDateTime is null and PAT.id = :PatientId";

    List<?> trackingList = factory.find(query, new String[] {"PatientId"}, new Object[] {patientRef.getID_Patient()});

    if(trackingList == null || trackingList.size() == 0)
        return null;

    return TrackingForTriageVoAssembler.create((Tracking) trackingList.get(0));
}