Java Code Examples for ims.emergency.vo.lookups.TrackingStatus

The following are top voted examples for showing how to use ims.emergency.vo.lookups.TrackingStatus. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateScreenWithLookups()
{
	form.grdTrackingStatus().getRows().clear();
	TrackingStatusCollection trackingStatusCollection = LookupHelper.getTrackingStatus(domain.getLookupService());

	if (trackingStatusCollection == null)
		return;

	for (int i = 0; i < trackingStatusCollection.size(); i++)
	{
		//WDEV-16987
		if (TrackingStatus.DISCHARGED.equals(trackingStatusCollection.get(i)))
			continue;
		
		grdTrackingStatusRow newAreaColumn = form.grdTrackingStatus().getRows().newRow();
		newAreaColumn.setcolStatus(trackingStatusCollection.get(i).getIItemText());
		newAreaColumn.setcolSelect(false);
		newAreaColumn.setValue(trackingStatusCollection.get(i));
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void searchWaitingForClinicianReview() 
{
	clearScreen();
	
	HcpRefVo hcp = null;
	if(form.getLocalContext().getLoggedHcpIsNotNull() && GroupClinicianReviewEnumeration.rdoMyAllocated.equals(form.GroupClinicianReview().getValue()))
	{
		hcp = form.getLocalContext().getLoggedHcp();
	}
	
	TrackingListForClinicianWorklistVoCollection patients = domain.listPatientsWaiting(engine.getCurrentLocation(), TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC, hcp);
	
	if(patients == null)
		return;
	
	populatePatientsWaitingForTriage(patients.sort(new TrackingComparator()));
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus waitingToBeSeenByAMedic) 
{
	TrackingAttendanceStatusVo status = new TrackingAttendanceStatusVo();
	
	status.setPatient(form.getGlobalContext().Core.getPatientShort());
	status.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	status.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	status.setTrackingArea(form.getLocalContext().getOldTrackingArea());
	status.setStatusDatetime(new DateTime());
	
	Object mos = domain.getMosUser();
	if(mos instanceof MemberOfStaffRefVo)
	{
		status.setCreatedBy((MemberOfStaffRefVo) mos);
	}
	
	status.setStatus(waitingToBeSeenByAMedic);
	
	status.setPrevStatus((form.getLocalContext().getSelectedWaitingPatient()!=null && form.getLocalContext().getSelectedWaitingPatient().getCurrentStatus()!=null  ) ? form.getLocalContext().getSelectedWaitingPatient().getCurrentStatus().getStatus() : null);//WDEV-16777

	return status;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void searchTriagePatients() 
{
	clearScreen();
	HcpRefVo hcp = null;
	if(form.getLocalContext().getLoggedHcpIsNotNull() && GroupClinicianReviewEnumeration.rdoMyAllocated.equals(form.GroupClinicianReview().getValue()))
	{
		hcp = form.getLocalContext().getLoggedHcp();
	}
	
	TrackingListForTriageVoCollection patients = domain.listPatientsWaiting(engine.getCurrentLocation(), TrackingStatus.WAITING_TO_BE_TRIAGED, hcp);
	
	if(patients == null)
		return;
	
	populatePatientsWaitingForTriage(patients.sort(new TriageLOSComparator(SortOrder.DESCENDING)));
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus waitingToBeSeenByAMedic) 
{
	TrackingAttendanceStatusVo status = new TrackingAttendanceStatusVo();
	
	status.setPatient(form.getGlobalContext().Core.getPatientShort());
	status.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	status.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	status.setTrackingArea(form.getLocalContext().getOldTrackingArea());
	status.setStatusDatetime(new DateTime());
	
	Object mos = domain.getMosUser();
	if(mos instanceof MemberOfStaffRefVo)
	{
		status.setCreatedBy((MemberOfStaffRefVo) mos);
	}
	
	status.setStatus(waitingToBeSeenByAMedic);
	//WDEV-16777
	status.setPrevStatus((form.getLocalContext().getSelectedTriagePatient()!=null && form.getLocalContext().getSelectedTriagePatient().getCurrentStatus()!=null  ) ? form.getLocalContext().getSelectedTriagePatient().getCurrentStatus().getStatus() : null);
	
	return status;
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private TrackingForQuickRegistrationVo populateDataFromScreen(EmergencyAttendanceForPendingArrivalsVo selectedRecord)
{
	TrackingForQuickRegistrationVo trackingToSave = new TrackingForQuickRegistrationVo();

	trackingToSave.setPatient(form.getGlobalContext().Core.getPatientShort());

	EmergencyAttendanceForPendingArrivalsVo emergencyAttendanceToSave = form.getLocalContext().getselectedRecord();
	trackingToSave.setAttendance(emergencyAttendanceToSave);
	trackingToSave.setEpisode(emergencyAttendanceToSave.getEpisode());

	LocationLiteVo currentLocation = (LocationLiteVo) domain.getCurrentLocation();
	trackingToSave.setEDLocation(currentLocation);

	trackingToSave.setCurrentArea(form.getGlobalContext().Emergency.getTrackingAreaForSendToAreaVo());

	TrackingAttendanceStatusVo trackingStatusToSave = populateTrackingAttendanceStatus(ims.emergency.vo.lookups.TrackingStatus.WAITING_TO_BE_TRIAGED);
	trackingToSave.setCurrentStatus(trackingStatusToSave);
	trackingToSave.setDischargeLetterStatus(DischargeLetterStatus.IN_PROGRESS);//wdev-17266
	
	return trackingToSave;
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	EmergencyAttendanceForPendingArrivalsVo tempRecord = form.getLocalContext().getselectedRecord();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(tempRecord.getEpisode().getEpisodeOfCare());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getGlobalContext().Emergency.getTrackingAreaForSendToAreaVo());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus(null); //WDEV-16777

	return trackingAttStatus;
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getRecord().getCurrentStatus().getPrevTrackingArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getRecord()!=null && form.getLocalContext().getRecord().getCurrentStatus()!=null  ) ? form.getLocalContext().getRecord().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus status) 
{
	TrackingAttendanceStatusVo dischargeStatus = new TrackingAttendanceStatusVo();
	
	dischargeStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	dischargeStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	dischargeStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	dischargeStatus.setTrackingArea(form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo ? (TrackingAreaForTrackingVo) form.grdTrackingCount().getValue() : null);
	dischargeStatus.setStatusDatetime(new DateTime());
	dischargeStatus.setCreatedBy(form.getLocalContext().getLoggedMosRef());
	dischargeStatus.setStatus(status);
	//WDEV-16777
	dischargeStatus.setPrevStatus((form.getLocalContext().getSelectedTrackingPatient()!=null && form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus()!=null  ) ? form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus().getStatus() : null);
	dischargeStatus.setPrevTrackingArea(form.getLocalContext().getSelectedTrackingPatient().getCurrentArea());//WDEV-17119
	
	return dischargeStatus;
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	//WDEV-16777
	trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);

	return trackingAttStatus;
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getTrackingForReferral().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getTrackingForReferral()!=null && form.getLocalContext().getTrackingForReferral().getCurrentStatus()!=null  ) ? form.getLocalContext().getTrackingForReferral().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void initialiseTrackingStatusCombo()
{
	form.lyrWorklist().tabClinicianWorklist().cmbTrackingStatus().clear();
	ims.emergency.vo.lookups.TrackingStatusCollection lookupCollection = ims.emergency.vo.lookups.LookupHelper.getTrackingStatus(domain.getLookupService());
	ims.emergency.vo.lookups.TrackingStatus tempLook = null;
	if( lookupCollection != null && lookupCollection.size() > 0)
	{
		
		for( int x = 0; x < lookupCollection.size(); x++)
		{
			if( lookupCollection.get(x).isActive() == true && lookupCollection.get(x).equals(TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC))
				tempLook = lookupCollection.get(x);
			if( TrackingStatus.DISCHARGED.equals(lookupCollection.get(x)))
				continue;
			form.lyrWorklist().tabClinicianWorklist().cmbTrackingStatus().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
		if( tempLook != null)
		    form.lyrWorklist().tabClinicianWorklist().cmbTrackingStatus().setValue(tempLook);
	}


}
 
Example 14
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateScreenWithLookups()
{
	form.grdTrackingStatus().getRows().clear();
	TrackingStatusCollection trackingStatusCollection = LookupHelper.getTrackingStatus(domain.getLookupService());

	if (trackingStatusCollection == null)
		return;

	for (int i = 0; i < trackingStatusCollection.size(); i++)
	{
		//WDEV-16987
		if (TrackingStatus.DISCHARGED.equals(trackingStatusCollection.get(i)))
			continue;
		
		grdTrackingStatusRow newAreaColumn = form.grdTrackingStatus().getRows().newRow();
		newAreaColumn.setcolStatus(trackingStatusCollection.get(i).getIItemText());
		newAreaColumn.setcolSelect(false);
		newAreaColumn.setValue(trackingStatusCollection.get(i));
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void searchWaitingForClinicianReview() 
{
	clearScreen();
	
	HcpRefVo hcp = null;
	if(form.getLocalContext().getLoggedHcpIsNotNull() && GroupClinicianReviewEnumeration.rdoMyAllocated.equals(form.GroupClinicianReview().getValue()))
	{
		hcp = form.getLocalContext().getLoggedHcp();
	}
	
	TrackingListForClinicianWorklistVoCollection patients = domain.listPatientsWaiting(engine.getCurrentLocation(), TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC, hcp);
	
	if(patients == null)
		return;
	
	populatePatientsWaitingForTriage(patients.sort(new TrackingComparator()));
}
 
Example 16
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentArea());
	trackingAttStatus.setPrevTrackingArea(form.getLocalContext().getCurrentTrackingForEdPartialAdmission() != null && form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentStatus() != null ? form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentStatus().getPrevTrackingArea() : null);
	
	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getCurrentTrackingForEdPartialAdmission()!=null && form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentStatus()!=null  ) ? form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 17
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 18
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void searchTriagePatients() 
{
	clearScreen();
	HcpRefVo hcp = null;
	if(form.getLocalContext().getLoggedHcpIsNotNull() && GroupClinicianReviewEnumeration.rdoMyAllocated.equals(form.GroupClinicianReview().getValue()))
	{
		hcp = form.getLocalContext().getLoggedHcp();
	}
	
	TrackingListForTriageVoCollection patients = domain.listPatientsWaiting(engine.getCurrentLocation(), TrackingStatus.WAITING_TO_BE_TRIAGED, hcp);
	
	if(patients == null)
		return;
	
	populatePatientsWaitingForTriage(patients.sort(new TriageLOSComparator(SortOrder.DESCENDING)));
}
 
Example 19
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus waitingToBeSeenByAMedic) 
{
	TrackingAttendanceStatusVo status = new TrackingAttendanceStatusVo();
	
	status.setPatient(form.getGlobalContext().Core.getPatientShort());
	status.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	status.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	status.setTrackingArea(form.getLocalContext().getOldTrackingArea());
	status.setStatusDatetime(new DateTime());
	
	Object mos = domain.getMosUser();
	if(mos instanceof MemberOfStaffRefVo)
	{
		status.setCreatedBy((MemberOfStaffRefVo) mos);
	}
	
	status.setStatus(waitingToBeSeenByAMedic);
	//WDEV-16777
	status.setPrevStatus((form.getLocalContext().getSelectedTriagePatient()!=null && form.getLocalContext().getSelectedTriagePatient().getCurrentStatus()!=null  ) ? form.getLocalContext().getSelectedTriagePatient().getCurrentStatus().getStatus() : null);
	
	return status;
}
 
Example 20
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingLiteVo dischargePatient(TrackingLiteVo trackingRecord, TrackingStatusWorkflowVo trackingWorkflowStatusConfiguration, Boolean continueDisplay)
{
	if(trackingRecord != null)
	{
		if(trackingRecord.getAttendance() != null)
		{
			trackingRecord.getAttendance().setDischargeDateTime(new DateTime());		
			trackingRecord.getAttendance().setOutcome(trackingWorkflowStatusConfiguration.getDischargeOutcome());
			
			if(trackingRecord.getAttendance().getCareContext() != null)
			{
				trackingRecord.getAttendance().getCareContext().setEndDateTime(new DateTime());
			}
		}

		trackingRecord.setIsDischarged(true);
		trackingRecord.setDisplayInED(continueDisplay);
		trackingRecord.setCurrentStatus(createTrackingStatus(TrackingStatus.DISCHARGED, trackingWorkflowStatusConfiguration.getTrackingStatus()));
		trackingRecord.setCurrentArea(null);
	}
	
	return trackingRecord;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus status, TrackingStatus prevTrackingStatus)
{
	TrackingAttendanceStatusVo dischargeStatus = new TrackingAttendanceStatusVo();
	
	dischargeStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	dischargeStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	dischargeStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());			
	dischargeStatus.setTrackingArea(TrackingStatus.DISCHARGED.equals(status) ? null : getTrackingAreaWithCubicle());	
	dischargeStatus.setStatusDatetime(new DateTime());
	
	Object mos = domain.getMosUser();		
	dischargeStatus.setCreatedBy(mos != null && mos instanceof MemberOfStaffRefVo ? (MemberOfStaffRefVo) mos : null);

	dischargeStatus.setStatus(status);
	dischargeStatus.setPrevStatus(prevTrackingStatus);
	dischargeStatus.setPrevTrackingArea(!TrackingStatus.DISCHARGED.equals(status) && form.getLocalContext().getTracking() != null ?  form.getLocalContext().getTracking().getCurrentArea() : getTrackingAreaWithCubicle());
	
	return dischargeStatus;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingForQuickRegistrationVo populateDataFromScreen(EmergencyAttendanceForPendingArrivalsVo selectedRecord)
{
	TrackingForQuickRegistrationVo trackingToSave = new TrackingForQuickRegistrationVo();

	trackingToSave.setPatient(form.getGlobalContext().Core.getPatientShort());

	EmergencyAttendanceForPendingArrivalsVo emergencyAttendanceToSave = form.getLocalContext().getselectedRecord();
	trackingToSave.setAttendance(emergencyAttendanceToSave);
	trackingToSave.setEpisode(emergencyAttendanceToSave.getEpisode());

	LocationLiteVo currentLocation = (LocationLiteVo) domain.getCurrentLocation();
	trackingToSave.setEDLocation(currentLocation);

	trackingToSave.setCurrentArea(form.getGlobalContext().Emergency.getTrackingAreaForSendToAreaVo());

	TrackingAttendanceStatusVo trackingStatusToSave = populateTrackingAttendanceStatus(ims.emergency.vo.lookups.TrackingStatus.WAITING_TO_BE_TRIAGED);
	trackingToSave.setCurrentStatus(trackingStatusToSave);
	trackingToSave.setDischargeLetterStatus(DischargeLetterStatus.IN_PROGRESS);//wdev-17266
	
	return trackingToSave;
}
 
Example 23
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	EmergencyAttendanceForPendingArrivalsVo tempRecord = form.getLocalContext().getselectedRecord();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(tempRecord.getEpisode().getEpisodeOfCare());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getGlobalContext().Emergency.getTrackingAreaForSendToAreaVo());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus(null); //WDEV-16777

	return trackingAttStatus;
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getRecord().getCurrentStatus().getPrevTrackingArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getRecord()!=null && form.getLocalContext().getRecord().getCurrentStatus()!=null  ) ? form.getLocalContext().getRecord().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 25
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus status) 
{
	TrackingAttendanceStatusVo dischargeStatus = new TrackingAttendanceStatusVo();
	
	dischargeStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	dischargeStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	dischargeStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	dischargeStatus.setTrackingArea(form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo ? (TrackingAreaForTrackingVo) form.grdTrackingCount().getValue() : null);
	dischargeStatus.setStatusDatetime(new DateTime());
	dischargeStatus.setCreatedBy(form.getLocalContext().getLoggedMosRef());
	dischargeStatus.setStatus(status);
	//WDEV-16777
	dischargeStatus.setPrevStatus((form.getLocalContext().getSelectedTrackingPatient()!=null && form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus()!=null  ) ? form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus().getStatus() : null);
	dischargeStatus.setPrevTrackingArea(form.getLocalContext().getSelectedTrackingPatient().getCurrentArea());//WDEV-17119
	
	return dischargeStatus;
}
 
Example 26
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus prevStatus) 
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getlcCurrentTrackingRecord().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos != null && mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(prevStatus);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getlcCurrentTrackingRecord()!=null && form.getLocalContext().getlcCurrentTrackingRecord().getCurrentStatus()!=null  ) ? form.getLocalContext().getlcCurrentTrackingRecord().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 28
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	//WDEV-16777
	trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);

	return trackingAttStatus;
}
 
Example 29
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getTrackingForReferral().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getTrackingForReferral()!=null && form.getLocalContext().getTrackingForReferral().getCurrentStatus()!=null  ) ? form.getLocalContext().getTrackingForReferral().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 30
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void initialiseTrackingStatusCombo()
{
	form.lyrWorklist().tabClinicianWorklist().cmbTrackingStatus().clear();
	ims.emergency.vo.lookups.TrackingStatusCollection lookupCollection = ims.emergency.vo.lookups.LookupHelper.getTrackingStatus(domain.getLookupService());
	ims.emergency.vo.lookups.TrackingStatus tempLook = null;
	if( lookupCollection != null && lookupCollection.size() > 0)
	{
		
		for( int x = 0; x < lookupCollection.size(); x++)
		{
			if( lookupCollection.get(x).isActive() == true && lookupCollection.get(x).equals(TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC))
				tempLook = lookupCollection.get(x);
			if( TrackingStatus.DISCHARGED.equals(lookupCollection.get(x)))
				continue;
			form.lyrWorklist().tabClinicianWorklist().cmbTrackingStatus().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
		}
		if( tempLook != null)
		    form.lyrWorklist().tabClinicianWorklist().cmbTrackingStatus().setValue(tempLook);
	}


}
 
Example 31
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateScreenWithLookups()
{
	form.grdTrackingStatus().getRows().clear();
	TrackingStatusCollection trackingStatusCollection = LookupHelper.getTrackingStatus(domain.getLookupService());

	if (trackingStatusCollection == null)
		return;

	for (int i = 0; i < trackingStatusCollection.size(); i++)
	{
		//WDEV-16987
		if (TrackingStatus.DISCHARGED.equals(trackingStatusCollection.get(i)))
			continue;
		
		grdTrackingStatusRow newAreaColumn = form.grdTrackingStatus().getRows().newRow();
		newAreaColumn.setcolStatus(trackingStatusCollection.get(i).getIItemText());
		newAreaColumn.setcolSelect(false);
		newAreaColumn.setValue(trackingStatusCollection.get(i));
	}
}
 
Example 32
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void searchWaitingForClinicianReview() 
{
	clearScreen();
	
	HcpRefVo hcp = null;
	if(form.getLocalContext().getLoggedHcpIsNotNull() && GroupClinicianReviewEnumeration.rdoMyAllocated.equals(form.GroupClinicianReview().getValue()))
	{
		hcp = form.getLocalContext().getLoggedHcp();
	}
	
	TrackingListForClinicianWorklistVoCollection patients = domain.listPatientsWaiting(engine.getCurrentLocation(), TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC, hcp);
	
	if(patients == null)
		return;
	
	populatePatientsWaitingForTriage(patients.sort(new TrackingComparator()));
}
 
Example 33
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus waitingToBeSeenByAMedic) 
{
	TrackingAttendanceStatusVo status = new TrackingAttendanceStatusVo();
	
	status.setPatient(form.getGlobalContext().Core.getPatientShort());
	status.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	status.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	status.setTrackingArea(form.getLocalContext().getOldTrackingArea());
	status.setStatusDatetime(new DateTime());
	
	Object mos = domain.getMosUser();
	if(mos instanceof MemberOfStaffRefVo)
	{
		status.setCreatedBy((MemberOfStaffRefVo) mos);
	}
	
	status.setStatus(waitingToBeSeenByAMedic);
	
	status.setPrevStatus((form.getLocalContext().getSelectedWaitingPatient()!=null && form.getLocalContext().getSelectedWaitingPatient().getCurrentStatus()!=null  ) ? form.getLocalContext().getSelectedWaitingPatient().getCurrentStatus().getStatus() : null);//WDEV-16777

	return status;
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void searchTriagePatients() 
{
	clearScreen();
	HcpRefVo hcp = null;
	if(form.getLocalContext().getLoggedHcpIsNotNull() && GroupClinicianReviewEnumeration.rdoMyAllocated.equals(form.GroupClinicianReview().getValue()))
	{
		hcp = form.getLocalContext().getLoggedHcp();
	}
	
	TrackingListForTriageVoCollection patients = domain.listPatientsWaiting(engine.getCurrentLocation(), TrackingStatus.WAITING_TO_BE_TRIAGED, hcp);
	
	if(patients == null)
		return;
	
	populatePatientsWaitingForTriage(patients.sort(new TriageLOSComparator(SortOrder.DESCENDING)));
}
 
Example 35
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus waitingToBeSeenByAMedic) 
{
	TrackingAttendanceStatusVo status = new TrackingAttendanceStatusVo();
	
	status.setPatient(form.getGlobalContext().Core.getPatientShort());
	status.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	status.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	status.setTrackingArea(form.getLocalContext().getOldTrackingArea());
	status.setStatusDatetime(new DateTime());
	
	Object mos = domain.getMosUser();
	if(mos instanceof MemberOfStaffRefVo)
	{
		status.setCreatedBy((MemberOfStaffRefVo) mos);
	}
	
	status.setStatus(waitingToBeSeenByAMedic);
	//WDEV-16777
	status.setPrevStatus((form.getLocalContext().getSelectedTriagePatient()!=null && form.getLocalContext().getSelectedTriagePatient().getCurrentStatus()!=null  ) ? form.getLocalContext().getSelectedTriagePatient().getCurrentStatus().getStatus() : null);
	
	return status;
}
 
Example 36
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingForQuickRegistrationVo populateDataFromScreen(EmergencyAttendanceForPendingArrivalsVo selectedRecord)
{
	TrackingForQuickRegistrationVo trackingToSave = new TrackingForQuickRegistrationVo();

	trackingToSave.setPatient(form.getGlobalContext().Core.getPatientShort());

	EmergencyAttendanceForPendingArrivalsVo emergencyAttendanceToSave = form.getLocalContext().getselectedRecord();
	trackingToSave.setAttendance(emergencyAttendanceToSave);
	trackingToSave.setEpisode(emergencyAttendanceToSave.getEpisode());

	LocationLiteVo currentLocation = (LocationLiteVo) domain.getCurrentLocation();
	trackingToSave.setEDLocation(currentLocation);

	trackingToSave.setCurrentArea(form.getGlobalContext().Emergency.getTrackingAreaForSendToAreaVo());

	TrackingAttendanceStatusVo trackingStatusToSave = populateTrackingAttendanceStatus(ims.emergency.vo.lookups.TrackingStatus.WAITING_TO_BE_TRIAGED);
	trackingToSave.setCurrentStatus(trackingStatusToSave);
	trackingToSave.setDischargeLetterStatus(DischargeLetterStatus.IN_PROGRESS);//wdev-17266
	
	return trackingToSave;
}
 
Example 37
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	EmergencyAttendanceForPendingArrivalsVo tempRecord = form.getLocalContext().getselectedRecord();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(tempRecord.getEpisode().getEpisodeOfCare());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getGlobalContext().Emergency.getTrackingAreaForSendToAreaVo());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus(null); //WDEV-16777

	return trackingAttStatus;
}
 
Example 38
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getRecord().getCurrentStatus().getPrevTrackingArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getRecord()!=null && form.getLocalContext().getRecord().getCurrentStatus()!=null  ) ? form.getLocalContext().getRecord().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 39
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus status) 
{
	TrackingAttendanceStatusVo dischargeStatus = new TrackingAttendanceStatusVo();
	
	dischargeStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	dischargeStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	dischargeStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	dischargeStatus.setTrackingArea(form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo ? (TrackingAreaForTrackingVo) form.grdTrackingCount().getValue() : null);
	dischargeStatus.setStatusDatetime(new DateTime());
	dischargeStatus.setCreatedBy(form.getLocalContext().getLoggedMosRef());
	dischargeStatus.setStatus(status);
	//WDEV-16777
	dischargeStatus.setPrevStatus((form.getLocalContext().getSelectedTrackingPatient()!=null && form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus()!=null  ) ? form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus().getStatus() : null);
	dischargeStatus.setPrevTrackingArea(form.getLocalContext().getSelectedTrackingPatient().getCurrentArea());//WDEV-17119
	
	return dischargeStatus;
}
 
Example 40
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}