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

项目:AvoinApotti    文件:Logic.java   
private void startClinicianAssessment(TrackingForClinicianWorklistVo tracking)
{
    if (tracking == null)
        return;

    HcpLiteVo hcpUser = (HcpLiteVo) domain.getHcpLiteUser();

    if (hcpUser == null || !HcpDisType.MEDICAL.equals(hcpUser.getHcpType()))
    {
        engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog);//WDEV-16816
        return;
    }
    else
    {
        //WDEV-16816
        // Attempt to save created SeenByHcp to tracking
        if (saveSeenByHcp(tracking, new MedicRefVo(hcpUser.getID_Hcp(), hcpUser.getVersion_Hcp())))
        {
            // Refresh screen
            open();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void startClinicianAssessment(TrackingForClinicianWorklistVo tracking)
{
    if (tracking == null)
        return;

    HcpLiteVo hcpUser = (HcpLiteVo) domain.getHcpLiteUser();

    if (hcpUser == null || !HcpDisType.MEDICAL.equals(hcpUser.getHcpType()))
    {
        engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog);//WDEV-16816
        return;
    }
    else
    {
        //WDEV-16816
        // Attempt to save created SeenByHcp to tracking
        if (saveSeenByHcp(tracking, new MedicRefVo(hcpUser.getID_Hcp(), hcpUser.getVersion_Hcp())))
        {
            // Refresh screen
            open();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void startClinicianAssessment(TrackingForClinicianWorklistVo tracking)
{
    if (tracking == null)
        return;

    HcpLiteVo hcpUser = (HcpLiteVo) domain.getHcpLiteUser();

    if (hcpUser == null || !HcpDisType.MEDICAL.equals(hcpUser.getHcpType()))
    {
        engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog);//WDEV-16816
        return;
    }
    else
    {
        //WDEV-16816
        // Attempt to save created SeenByHcp to tracking
        if (saveSeenByHcp(tracking, new MedicRefVo(hcpUser.getID_Hcp(), hcpUser.getVersion_Hcp())))
        {
            // Refresh screen
            open();
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void startClinicianAssessment(TrackingForClinicianWorklistVo tracking)
{
    if (tracking == null)
        return;

    HcpLiteVo hcpUser = (HcpLiteVo) domain.getHcpLiteUser();

    if (hcpUser == null || !HcpDisType.MEDICAL.equals(hcpUser.getHcpType()))
    {
        engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog);//WDEV-16816
        return;
    }
    else
    {
        //WDEV-16816
        // Attempt to save created SeenByHcp to tracking
        if (saveSeenByHcp(tracking, new MedicRefVo(hcpUser.getID_Hcp(), hcpUser.getVersion_Hcp())))
        {
            // Refresh screen
            open();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveSeenByHcp(TrackingForClinicianWorklistVo tracking, MedicRefVo medic)
{
    try
    {
        // Create the SeenByHcp record to be associated with tracking
        SeenByHCPVo seenByHcp = new SeenByHCPVo();
        seenByHcp.setPatient(tracking.getPatient());
        seenByHcp.setEpisode(tracking.getEpisode().getEpisodeOfCare());
        seenByHcp.setAttendance(tracking.getAttendance().getCareContext());
        seenByHcp.setTrackingArea(tracking.getCurrentArea());

        seenByHcp.setAllocatedDateTime(new DateTime());         
        seenByHcp.setAllocatedMedic((MedicVo)domain.getHcpUser());      
        seenByHcp.setSeenDateTime(new DateTime());

        // Validate SeenByHcp record
        String[] errors = seenByHcp.validate();

        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }

        form.getLocalContext().setSelectedWaitingPatient(domain.saveTrackingSeenByHcp(tracking, seenByHcp));

        return true;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
}
项目:AvoinApotti    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForTriage(ims.emergency.vo.TrackingRefVo trackingId)
{
    if(trackingId == null || trackingId.getID_Tracking() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id.");

    return TrackingForClinicianWorklistVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking()));
}
项目:AvoinApotti    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo saveMedicStartTime(TrackingForClinicianWorklistVo tracking) 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();
    Tracking doTracking = TrackingForClinicianWorklistVoAssembler.extractTracking(factory, tracking);

    factory.save(doTracking);

    return TrackingForClinicianWorklistVoAssembler.create(doTracking);
}
项目:AvoinApotti    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForClinicianWorklistByCareContext(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 TrackingForClinicianWorklistVoAssembler.create((Tracking) trackingList.get(0));
}
项目:AvoinApotti    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo 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 TrackingForClinicianWorklistVoAssembler.create((Tracking) list.get(0));
}
项目:AvoinApotti    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForClinicianByActiveCareContext(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 TrackingForClinicianWorklistVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveSeenByHcp(TrackingForClinicianWorklistVo tracking, MedicRefVo medic)
{
    try
    {
        // Create the SeenByHcp record to be associated with tracking
        SeenByHCPVo seenByHcp = new SeenByHCPVo();
        seenByHcp.setPatient(tracking.getPatient());
        seenByHcp.setEpisode(tracking.getEpisode().getEpisodeOfCare());
        seenByHcp.setAttendance(tracking.getAttendance().getCareContext());
        seenByHcp.setTrackingArea(tracking.getCurrentArea());

        seenByHcp.setAllocatedDateTime(new DateTime());         
        seenByHcp.setAllocatedMedic((MedicVo)domain.getHcpUser());      
        seenByHcp.setSeenDateTime(new DateTime());

        // Validate SeenByHcp record
        String[] errors = seenByHcp.validate();

        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }

        form.getLocalContext().setSelectedWaitingPatient(domain.saveTrackingSeenByHcp(tracking, seenByHcp));

        return true;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForTriage(ims.emergency.vo.TrackingRefVo trackingId)
{
    if(trackingId == null || trackingId.getID_Tracking() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id.");

    return TrackingForClinicianWorklistVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking()));
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo saveMedicStartTime(TrackingForClinicianWorklistVo tracking) 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();
    Tracking doTracking = TrackingForClinicianWorklistVoAssembler.extractTracking(factory, tracking);

    factory.save(doTracking);

    return TrackingForClinicianWorklistVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForClinicianWorklistByCareContext(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 TrackingForClinicianWorklistVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo 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 TrackingForClinicianWorklistVoAssembler.create((Tracking) list.get(0));
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForClinicianByActiveCareContext(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 TrackingForClinicianWorklistVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveSeenByHcp(TrackingForClinicianWorklistVo tracking, MedicRefVo medic)
{
    try
    {
        // Create the SeenByHcp record to be associated with tracking
        SeenByHCPVo seenByHcp = new SeenByHCPVo();
        seenByHcp.setPatient(tracking.getPatient());
        seenByHcp.setEpisode(tracking.getEpisode().getEpisodeOfCare());
        seenByHcp.setAttendance(tracking.getAttendance().getCareContext());
        seenByHcp.setTrackingArea(tracking.getCurrentArea());

        seenByHcp.setAllocatedDateTime(new DateTime());         
        seenByHcp.setAllocatedMedic((MedicVo)domain.getHcpUser());      
        seenByHcp.setSeenDateTime(new DateTime());

        // Validate SeenByHcp record
        String[] errors = seenByHcp.validate();

        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }

        form.getLocalContext().setSelectedWaitingPatient(domain.saveTrackingSeenByHcp(tracking, seenByHcp));

        return true;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForTriage(ims.emergency.vo.TrackingRefVo trackingId)
{
    if(trackingId == null || trackingId.getID_Tracking() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id.");

    return TrackingForClinicianWorklistVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking()));
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo saveMedicStartTime(TrackingForClinicianWorklistVo tracking) 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();
    Tracking doTracking = TrackingForClinicianWorklistVoAssembler.extractTracking(factory, tracking);

    factory.save(doTracking);

    return TrackingForClinicianWorklistVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForClinicianWorklistByCareContext(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 TrackingForClinicianWorklistVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo 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 TrackingForClinicianWorklistVoAssembler.create((Tracking) list.get(0));
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForClinicianByActiveCareContext(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 TrackingForClinicianWorklistVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openmaxims-linux    文件:Logic.java   
private boolean saveSeenByHcp(TrackingForClinicianWorklistVo tracking, MedicRefVo medic)
{
    try
    {
        // Create the SeenByHcp record to be associated with tracking
        SeenByHCPVo seenByHcp = new SeenByHCPVo();
        seenByHcp.setPatient(tracking.getPatient());
        seenByHcp.setEpisode(tracking.getEpisode().getEpisodeOfCare());
        seenByHcp.setAttendance(tracking.getAttendance().getCareContext());
        seenByHcp.setTrackingArea(tracking.getCurrentArea());

        seenByHcp.setAllocatedDateTime(new DateTime());         
        seenByHcp.setAllocatedMedic((MedicVo)domain.getHcpUser());      
        seenByHcp.setSeenDateTime(new DateTime());

        // Validate SeenByHcp record
        String[] errors = seenByHcp.validate();

        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }

        form.getLocalContext().setSelectedWaitingPatient(domain.saveTrackingSeenByHcp(tracking, seenByHcp));

        return true;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
}
项目:openmaxims-linux    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForTriage(ims.emergency.vo.TrackingRefVo trackingId)
{
    if(trackingId == null || trackingId.getID_Tracking() == null)
        throw new CodingRuntimeException("Cannot get Tracking record for a null Tracking Id.");

    return TrackingForClinicianWorklistVoAssembler.create((Tracking) getDomainFactory().getDomainObject(Tracking.class, trackingId.getID_Tracking()));
}
项目:openmaxims-linux    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo saveMedicStartTime(TrackingForClinicianWorklistVo tracking) 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();
    Tracking doTracking = TrackingForClinicianWorklistVoAssembler.extractTracking(factory, tracking);

    factory.save(doTracking);

    return TrackingForClinicianWorklistVoAssembler.create(doTracking);
}
项目:openmaxims-linux    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForClinicianWorklistByCareContext(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 TrackingForClinicianWorklistVoAssembler.create((Tracking) trackingList.get(0));
}
项目:openmaxims-linux    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo 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 TrackingForClinicianWorklistVoAssembler.create((Tracking) list.get(0));
}
项目:openmaxims-linux    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo getTrackingForClinicianByActiveCareContext(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 TrackingForClinicianWorklistVoAssembler.create((Tracking) trackingList.get(0));
}
项目:AvoinApotti    文件:Logic.java   
private void selectedInstance() 
{
    form.getLocalContext().setHistoryMode(false);
    form.getLocalContext().setSelectedWaitingPatient(null);

    if(form.dyngrdPatients().getValue() instanceof TrackingRefVo)
    {
        form.getGlobalContext().Emergency.setTracking((TrackingRefVo) form.dyngrdPatients().getValue());
        form.getLocalContext().setSelectedWaitingPatient(domain.getTrackingForTriage((TrackingRefVo) form.dyngrdPatients().getValue()));
    }
    else if(form.getGlobalContext().Core.getCurrentCareContext() != null)
    {
         TrackingForClinicianWorklistVo TrackingForClinician = domain.getTrackingForClinicianWorklistByCareContext(form.getGlobalContext().Core.getCurrentCareContext());

        //WDEV-15951
        if (TrackingForClinician != null && TrackingForClinician.getAttendanceIsNotNull() && TrackingForClinician.getAttendance().getDischargeDateTimeIsNotNull())
        {
            form.getLocalContext().setHistoryMode(true); //wdev-16064
        }

        form.getLocalContext().setSelectedWaitingPatient(TrackingForClinician);
        form.getGlobalContext().Emergency.setTracking(form.getLocalContext().getSelectedWaitingPatient());
        form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());

    }

    if(form.getLocalContext().getSelectedWaitingPatient() != null)
    {
        form.getGlobalContext().Emergency.setTriage(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails());

        if(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null)
        {
            form.getLocalContext().setCurrentEpisode((EmergencyEpisodeForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getEpisode().clone());
        }
        if(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null && form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTime() == null)
        {
            form.getLocalContext().setCurrentAttendance((EmergencyAttendanceForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getAttendance().clone());
        }
    }

    populateScreenFromData();
}
项目:AvoinApotti    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo saveTrackingSeenByHcp(TrackingForClinicianWorklistVo tracking, SeenByHCPVo seenByHcp) throws StaleObjectException
{
    if (tracking == null || tracking.getID_Tracking() == null)
        throw new CodingRuntimeException("Major logical erros - tracking record can not be null");

    DomainFactory factory = getDomainFactory();

    // Get latest tracking domain object
    Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, tracking.getID_Tracking());

    if (doTracking == null || doTracking.getSeenBy() != null)
    {
        throw new StaleObjectException(doTracking);
    }

    // Create status for the Tracking bo
    TrackingAttendanceStatusVo updatedStatus = new TrackingAttendanceStatusVo();
    updatedStatus.setPatient(seenByHcp.getPatient());
    updatedStatus.setEpisode(seenByHcp.getEpisode());
    updatedStatus.setAttendance(seenByHcp.getAttendance());
    //updatedStatus.setCreatedBy(allocatedMedic.getAllocatedBy());
    if (seenByHcp.getAllocatedMedic()!=null )
    {
        updatedStatus.setCreatedBy(seenByHcp.getAllocatedMedic().getMos());
    }
    else if (seenByHcp.getAllocatedNurse()!=null)
    {
        updatedStatus.setCreatedBy(seenByHcp.getAllocatedNurse().getMos());
    }

    updatedStatus.setTrackingArea(seenByHcp.getTrackingArea());
    updatedStatus.setStatusDatetime(new DateTime());
    updatedStatus.setStatus(TrackingStatus.BEING_ATTENDED_TO);

    // Extract domain object for Tracking status
    TrackingAttendanceStatus doStatus = TrackingAttendanceStatusVoAssembler.extractTrackingAttendanceStatus(factory, updatedStatus);
    // Extract domain object for Current Allocated status
    SeenByHCP doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHcp);

    doTracking.setCurrentStatus(doStatus);
    doTracking.setSeenBy(doSeenBy);

    factory.save(doTracking);

    return TrackingForClinicianWorklistVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:Logic.java   
private void selectedInstance() 
{
    form.getLocalContext().setHistoryMode(false);
    form.getLocalContext().setSelectedWaitingPatient(null);

    if(form.dyngrdPatients().getValue() instanceof TrackingRefVo)
    {
        form.getGlobalContext().Emergency.setTracking((TrackingRefVo) form.dyngrdPatients().getValue());
        form.getLocalContext().setSelectedWaitingPatient(domain.getTrackingForTriage((TrackingRefVo) form.dyngrdPatients().getValue()));
    }
    else if(form.getGlobalContext().Core.getCurrentCareContext() != null)
    {
         TrackingForClinicianWorklistVo TrackingForClinician = domain.getTrackingForClinicianWorklistByCareContext(form.getGlobalContext().Core.getCurrentCareContext());

        //WDEV-15951
        if (TrackingForClinician != null && TrackingForClinician.getAttendanceIsNotNull() && TrackingForClinician.getAttendance().getDischargeDateTimeIsNotNull())
        {
            form.getLocalContext().setHistoryMode(true); //wdev-16064
        }

        form.getLocalContext().setSelectedWaitingPatient(TrackingForClinician);
        form.getGlobalContext().Emergency.setTracking(form.getLocalContext().getSelectedWaitingPatient());
        form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());

    }

    if(form.getLocalContext().getSelectedWaitingPatient() != null)
    {
        form.getGlobalContext().Emergency.setTriage(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails());

        if(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null)
        {
            form.getLocalContext().setCurrentEpisode((EmergencyEpisodeForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getEpisode().clone());
        }
        if(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null && form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTime() == null)
        {
            form.getLocalContext().setCurrentAttendance((EmergencyAttendanceForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getAttendance().clone());
        }
    }

    populateScreenFromData();
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo saveTrackingSeenByHcp(TrackingForClinicianWorklistVo tracking, SeenByHCPVo seenByHcp) throws StaleObjectException
{
    if (tracking == null || tracking.getID_Tracking() == null)
        throw new CodingRuntimeException("Major logical erros - tracking record can not be null");

    DomainFactory factory = getDomainFactory();

    // Get latest tracking domain object
    Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, tracking.getID_Tracking());

    if (doTracking == null || doTracking.getSeenBy() != null)
    {
        throw new StaleObjectException(doTracking);
    }

    // Create status for the Tracking bo
    TrackingAttendanceStatusVo updatedStatus = new TrackingAttendanceStatusVo();
    updatedStatus.setPatient(seenByHcp.getPatient());
    updatedStatus.setEpisode(seenByHcp.getEpisode());
    updatedStatus.setAttendance(seenByHcp.getAttendance());
    //updatedStatus.setCreatedBy(allocatedMedic.getAllocatedBy());
    if (seenByHcp.getAllocatedMedic()!=null )
    {
        updatedStatus.setCreatedBy(seenByHcp.getAllocatedMedic().getMos());
    }
    else if (seenByHcp.getAllocatedNurse()!=null)
    {
        updatedStatus.setCreatedBy(seenByHcp.getAllocatedNurse().getMos());
    }

    updatedStatus.setTrackingArea(seenByHcp.getTrackingArea());
    updatedStatus.setStatusDatetime(new DateTime());
    updatedStatus.setStatus(TrackingStatus.BEING_ATTENDED_TO);

    // Extract domain object for Tracking status
    TrackingAttendanceStatus doStatus = TrackingAttendanceStatusVoAssembler.extractTrackingAttendanceStatus(factory, updatedStatus);
    // Extract domain object for Current Allocated status
    SeenByHCP doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHcp);

    doTracking.setCurrentStatus(doStatus);
    doTracking.setSeenBy(doSeenBy);

    factory.save(doTracking);

    return TrackingForClinicianWorklistVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:Logic.java   
private void selectedInstance() 
{
    form.getLocalContext().setHistoryMode(false);
    form.getLocalContext().setSelectedWaitingPatient(null);

    if(form.dyngrdPatients().getValue() instanceof TrackingRefVo)
    {
        form.getGlobalContext().Emergency.setTracking((TrackingRefVo) form.dyngrdPatients().getValue());
        form.getLocalContext().setSelectedWaitingPatient(domain.getTrackingForTriage((TrackingRefVo) form.dyngrdPatients().getValue()));
    }
    else if(form.getGlobalContext().Core.getCurrentCareContext() != null)
    {
         TrackingForClinicianWorklistVo TrackingForClinician = domain.getTrackingForClinicianWorklistByCareContext(form.getGlobalContext().Core.getCurrentCareContext());

        //WDEV-15951
        if (TrackingForClinician != null && TrackingForClinician.getAttendanceIsNotNull() && TrackingForClinician.getAttendance().getDischargeDateTimeIsNotNull())
        {
            form.getLocalContext().setHistoryMode(true); //wdev-16064
        }

        form.getLocalContext().setSelectedWaitingPatient(TrackingForClinician);
        form.getGlobalContext().Emergency.setTracking(form.getLocalContext().getSelectedWaitingPatient());
        form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());

    }

    if(form.getLocalContext().getSelectedWaitingPatient() != null)
    {
        form.getGlobalContext().Emergency.setTriage(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails());

        if(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null)
        {
            form.getLocalContext().setCurrentEpisode((EmergencyEpisodeForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getEpisode().clone());
        }
        if(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null && form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTime() == null)
        {
            form.getLocalContext().setCurrentAttendance((EmergencyAttendanceForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getAttendance().clone());
        }
    }

    populateScreenFromData();
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo saveTrackingSeenByHcp(TrackingForClinicianWorklistVo tracking, SeenByHCPVo seenByHcp) throws StaleObjectException
{
    if (tracking == null || tracking.getID_Tracking() == null)
        throw new CodingRuntimeException("Major logical erros - tracking record can not be null");

    DomainFactory factory = getDomainFactory();

    // Get latest tracking domain object
    Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, tracking.getID_Tracking());

    if (doTracking == null || doTracking.getSeenBy() != null)
    {
        throw new StaleObjectException(doTracking);
    }

    // Create status for the Tracking bo
    TrackingAttendanceStatusVo updatedStatus = new TrackingAttendanceStatusVo();
    updatedStatus.setPatient(seenByHcp.getPatient());
    updatedStatus.setEpisode(seenByHcp.getEpisode());
    updatedStatus.setAttendance(seenByHcp.getAttendance());
    //updatedStatus.setCreatedBy(allocatedMedic.getAllocatedBy());
    if (seenByHcp.getAllocatedMedic()!=null )
    {
        updatedStatus.setCreatedBy(seenByHcp.getAllocatedMedic().getMos());
    }
    else if (seenByHcp.getAllocatedNurse()!=null)
    {
        updatedStatus.setCreatedBy(seenByHcp.getAllocatedNurse().getMos());
    }

    updatedStatus.setTrackingArea(seenByHcp.getTrackingArea());
    updatedStatus.setStatusDatetime(new DateTime());
    updatedStatus.setStatus(TrackingStatus.BEING_ATTENDED_TO);

    // Extract domain object for Tracking status
    TrackingAttendanceStatus doStatus = TrackingAttendanceStatusVoAssembler.extractTrackingAttendanceStatus(factory, updatedStatus);
    // Extract domain object for Current Allocated status
    SeenByHCP doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHcp);

    doTracking.setCurrentStatus(doStatus);
    doTracking.setSeenBy(doSeenBy);

    factory.save(doTracking);

    return TrackingForClinicianWorklistVoAssembler.create(doTracking);
}
项目:openmaxims-linux    文件:Logic.java   
private void selectedInstance() 
{
    form.getLocalContext().setHistoryMode(false);
    form.getLocalContext().setSelectedWaitingPatient(null);

    if(form.dyngrdPatients().getValue() instanceof TrackingRefVo)
    {
        form.getGlobalContext().Emergency.setTracking((TrackingRefVo) form.dyngrdPatients().getValue());
        form.getLocalContext().setSelectedWaitingPatient(domain.getTrackingForTriage((TrackingRefVo) form.dyngrdPatients().getValue()));
    }
    else if(form.getGlobalContext().Core.getCurrentCareContext() != null)
    {
         TrackingForClinicianWorklistVo TrackingForClinician = domain.getTrackingForClinicianWorklistByCareContext(form.getGlobalContext().Core.getCurrentCareContext());

        //WDEV-15951
        if (TrackingForClinician != null && TrackingForClinician.getAttendanceIsNotNull() && TrackingForClinician.getAttendance().getDischargeDateTimeIsNotNull())
        {
            form.getLocalContext().setHistoryMode(true); //wdev-16064
        }

        form.getLocalContext().setSelectedWaitingPatient(TrackingForClinician);
        form.getGlobalContext().Emergency.setTracking(form.getLocalContext().getSelectedWaitingPatient());
        form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());

    }

    if(form.getLocalContext().getSelectedWaitingPatient() != null)
    {
        form.getGlobalContext().Emergency.setTriage(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails());

        if(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null)
        {
            form.getLocalContext().setCurrentEpisode((EmergencyEpisodeForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getEpisode().clone());
        }
        if(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null && form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTime() == null)
        {
            form.getLocalContext().setCurrentAttendance((EmergencyAttendanceForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getAttendance().clone());
        }
    }

    populateScreenFromData();
}
项目:openmaxims-linux    文件:ClinicianAssessmentWorklistImpl.java   
public TrackingForClinicianWorklistVo saveTrackingSeenByHcp(TrackingForClinicianWorklistVo tracking, SeenByHCPVo seenByHcp) throws StaleObjectException
{
    if (tracking == null || tracking.getID_Tracking() == null)
        throw new CodingRuntimeException("Major logical erros - tracking record can not be null");

    DomainFactory factory = getDomainFactory();

    // Get latest tracking domain object
    Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, tracking.getID_Tracking());

    if (doTracking == null || doTracking.getSeenBy() != null)
    {
        throw new StaleObjectException(doTracking);
    }

    // Create status for the Tracking bo
    TrackingAttendanceStatusVo updatedStatus = new TrackingAttendanceStatusVo();
    updatedStatus.setPatient(seenByHcp.getPatient());
    updatedStatus.setEpisode(seenByHcp.getEpisode());
    updatedStatus.setAttendance(seenByHcp.getAttendance());
    //updatedStatus.setCreatedBy(allocatedMedic.getAllocatedBy());
    if (seenByHcp.getAllocatedMedic()!=null )
    {
        updatedStatus.setCreatedBy(seenByHcp.getAllocatedMedic().getMos());
    }
    else if (seenByHcp.getAllocatedNurse()!=null)
    {
        updatedStatus.setCreatedBy(seenByHcp.getAllocatedNurse().getMos());
    }

    updatedStatus.setTrackingArea(seenByHcp.getTrackingArea());
    updatedStatus.setStatusDatetime(new DateTime());
    updatedStatus.setStatus(TrackingStatus.BEING_ATTENDED_TO);

    // Extract domain object for Tracking status
    TrackingAttendanceStatus doStatus = TrackingAttendanceStatusVoAssembler.extractTrackingAttendanceStatus(factory, updatedStatus);
    // Extract domain object for Current Allocated status
    SeenByHCP doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHcp);

    doTracking.setCurrentStatus(doStatus);
    doTracking.setSeenBy(doSeenBy);

    factory.save(doTracking);

    return TrackingForClinicianWorklistVoAssembler.create(doTracking);
}