Java Code Examples for ims.emergency.helper.EmergencyDisplayHelper

The following are top voted examples for showing how to use ims.emergency.helper.EmergencyDisplayHelper. 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   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForClinicianWorklistVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(int i=0; i<patients.size(); i++)
	{
		Integer los = addPatientRow(patients.get(i), i);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();	
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return;
	
	form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null ? form.getLocalContext().getSelectedWaitingPatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageCompletionTime() : null);
	
	form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818
	
	form.dtimMedicStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getMedicInterventionStartDateTime() : null);
	form.dtimDischargeBreachTime().setValue(calculateDischargeBreachTime(form.dtimRegistrationTime().getValue()));
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForTriageVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(TrackingListForTriageVo patient : patients)
	{
		Integer los = addPatientRow(patient);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForClinicianWorklistVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(int i=0; i<patients.size(); i++)
	{
		Integer los = addPatientRow(patients.get(i), i);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();	
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return;
	
	form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null ? form.getLocalContext().getSelectedWaitingPatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageCompletionTime() : null);
	
	form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818
	
	form.dtimMedicStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getMedicInterventionStartDateTime() : null);
	form.dtimDischargeBreachTime().setValue(calculateDischargeBreachTime(form.dtimRegistrationTime().getValue()));
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForTriageVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(TrackingListForTriageVo patient : patients)
	{
		Integer los = addPatientRow(patient);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForClinicianWorklistVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(int i=0; i<patients.size(); i++)
	{
		Integer los = addPatientRow(patients.get(i), i);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();	
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return;
	
	form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null ? form.getLocalContext().getSelectedWaitingPatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageCompletionTime() : null);
	
	form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818
	
	form.dtimMedicStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getMedicInterventionStartDateTime() : null);
	form.dtimDischargeBreachTime().setValue(calculateDischargeBreachTime(form.dtimRegistrationTime().getValue()));
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForTriageVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(TrackingListForTriageVo patient : patients)
	{
		Integer los = addPatientRow(patient);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
}
 
Example 10
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForClinicianWorklistVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(int i=0; i<patients.size(); i++)
	{
		Integer los = addPatientRow(patients.get(i), i);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();	
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return;
	
	form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null ? form.getLocalContext().getSelectedWaitingPatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageCompletionTime() : null);
	
	form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818
	
	form.dtimMedicStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getMedicInterventionStartDateTime() : null);
	form.dtimDischargeBreachTime().setValue(calculateDischargeBreachTime(form.dtimRegistrationTime().getValue()));
}
 
Example 12
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForTriageVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(TrackingListForTriageVo patient : patients)
	{
		Integer los = addPatientRow(patient);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 *	Function used to display emergencies attendances
 */
private void displayResults(Tracking_TrackingAttendanceWorklistVoCollection results)
{
	// Clear results grid
	form.grdResults().getRows().clear();
		
	// Test results collection
	if (results == null)
		return;
	
	for (Tracking_TrackingAttendanceWorklistVo tracking : results)
	{
		// Create row for attendance
		grdResultsRow row = form.grdResults().getRows().newRow();
		
		// Set row columns
		row.setColHopitalNo(tracking.getHospitalNo());
		row.setColSurname(tracking.getPatient().getName().getSurname());
		row.setColForename(tracking.getPatient().getName().getForename());
		row.setColStatus(tracking.getCurrentStatus() != null && tracking.getCurrentStatus().getStatus() != null ? tracking.getCurrentStatus().getStatus().getText() : null);
		row.setColRegDate(tracking.getAttendance().getRegistrationDateTime() != null ? tracking.getAttendance().getRegistrationDateTime().toString() : null);
		row.setColLOS(EmergencyDisplayHelper.minutesToHoursAndMinutes(tracking.getLOS()));
		row.setColPriority(tracking.getTriageDetails() != null && tracking.getTriageDetails().getCurrentTriagePriority() != null ? tracking.getTriageDetails().getCurrentTriagePriority().getText() : null);
		row.setColArea(tracking.getCurrentArea() != null ? tracking.getCurrentArea().getAreaDisplayName() : null);
		row.setColProblem(tracking.getTriageDetails() != null && tracking.getTriageDetails().getMainPresentingProblem() != null ? tracking.getTriageDetails().getMainPresentingProblem().getPatientProblem() : null);
		row.setColAllocatedMedic(tracking.getSeenBy() != null && tracking.getSeenBy().getAllocatedMedic() != null ? tracking.getSeenBy().getAllocatedMedic().getIMosName() : null); //WDEV-16816
		
		// Set row value
		row.setValue(tracking);
	}
	//WDEV-18339
	setTotalsLabel();
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedTriagePatient() == null)
		return;
	
	form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedTriagePatient().getEpisode() != null ? form.getLocalContext().getSelectedTriagePatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance() != null ? form.getLocalContext().getSelectedTriagePatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance() != null ? form.getLocalContext().getSelectedTriagePatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null ? form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null ? form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getTriageCompletionTime() : null);
	
	form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818
	form.dtimTriageBreachTime().setValue(calculateBreachTime(form.dtimTriageStartTime().getValue()));
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 *	Function used to display emergencies attendances
 */
private void displayResults(Tracking_TrackingAttendanceWorklistVoCollection results)
{
	// Clear results grid
	form.grdResults().getRows().clear();
		
	// Test results collection
	if (results == null)
		return;
	
	for (Tracking_TrackingAttendanceWorklistVo tracking : results)
	{
		// Create row for attendance
		grdResultsRow row = form.grdResults().getRows().newRow();
		
		// Set row columns
		row.setColHopitalNo(tracking.getHospitalNo());
		row.setColSurname(tracking.getPatient().getName() != null ? tracking.getPatient().getName().getSurname() : null);
		row.setColForename(tracking.getPatient().getName() != null ? tracking.getPatient().getName().getForename() : null);
		row.setColStatus(tracking.getCurrentStatus() != null && tracking.getCurrentStatus().getStatus() != null ? tracking.getCurrentStatus().getStatus().getText() : null);
		row.setColRegDate(tracking.getAttendance().getRegistrationDateTime() != null ? tracking.getAttendance().getRegistrationDateTime().toString() : null);
		row.setColLOS(EmergencyDisplayHelper.minutesToHoursAndMinutes(tracking.getLOS()));
		row.setColPriority(tracking.getTriageDetails() != null && tracking.getTriageDetails().getCurrentTriagePriority() != null ? tracking.getTriageDetails().getCurrentTriagePriority().getText() : null);
		row.setColArea(tracking.getCurrentArea() != null ? tracking.getCurrentArea().getAreaDisplayName() : null);
		row.setColRequiresDischargeDocumentationReview(Boolean.TRUE.equals(tracking.getRequiringDischargeDocumentationReview()) ? form.getImages().Core.Attachment16 : null);
		row.setTooltipForColRequiresDischargeDocumentationReview(Boolean.TRUE.equals(tracking.getRequiringDischargeDocumentationReview()) ? "Requires Discharge Documentation Review" : null);
		row.setColProblem(tracking.getTriageDetails() != null && tracking.getTriageDetails().getMainPresentingProblem() != null ? tracking.getTriageDetails().getMainPresentingProblem().getPatientProblem() : null);
		row.setColAllocatedMedic(tracking.getSeenBy() != null && tracking.getSeenBy().getAllocatedMedic() != null ? tracking.getSeenBy().getAllocatedMedic().getIMosName() : null); //WDEV-16816
		
		// Set row value
		row.setValue(tracking);
	}
	//WDEV-18339
	setTotalsLabel();
}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedTriagePatient() == null)
		return;
	
	form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedTriagePatient().getEpisode() != null ? form.getLocalContext().getSelectedTriagePatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance() != null ? form.getLocalContext().getSelectedTriagePatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance() != null ? form.getLocalContext().getSelectedTriagePatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null ? form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null ? form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getTriageCompletionTime() : null);
	
	form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818
	form.dtimTriageBreachTime().setValue(calculateBreachTime(form.dtimTriageStartTime().getValue()));
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 *	Function used to display emergencies attendances
 */
private void displayResults(Tracking_TrackingAttendanceWorklistVoCollection results)
{
	// Clear results grid
	form.grdResults().getRows().clear();
		
	// Test results collection
	if (results == null)
		return;
	
	for (Tracking_TrackingAttendanceWorklistVo tracking : results)
	{
		// Create row for attendance
		grdResultsRow row = form.grdResults().getRows().newRow();
		
		// Set row columns
		row.setColHopitalNo(tracking.getHospitalNo());
		row.setColSurname(tracking.getPatient().getName().getSurname());
		row.setColForename(tracking.getPatient().getName().getForename());
		row.setColStatus(tracking.getCurrentStatus() != null && tracking.getCurrentStatus().getStatus() != null ? tracking.getCurrentStatus().getStatus().getText() : null);
		row.setColRegDate(tracking.getAttendance().getRegistrationDateTime() != null ? tracking.getAttendance().getRegistrationDateTime().toString() : null);
		row.setColLOS(EmergencyDisplayHelper.minutesToHoursAndMinutes(tracking.getLOS()));
		row.setColPriority(tracking.getTriageDetails() != null && tracking.getTriageDetails().getCurrentTriagePriority() != null ? tracking.getTriageDetails().getCurrentTriagePriority().getText() : null);
		row.setColArea(tracking.getCurrentArea() != null ? tracking.getCurrentArea().getAreaDisplayName() : null);
		row.setColProblem(tracking.getTriageDetails() != null && tracking.getTriageDetails().getMainPresentingProblem() != null ? tracking.getTriageDetails().getMainPresentingProblem().getPatientProblem() : null);
		row.setColAllocatedMedic(tracking.getSeenBy() != null && tracking.getSeenBy().getAllocatedMedic() != null ? tracking.getSeenBy().getAllocatedMedic().getIMosName() : null); //WDEV-16816
		
		// Set row value
		row.setValue(tracking);
	}
	//WDEV-18339
	setTotalsLabel();
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedTriagePatient() == null)
		return;
	
	form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedTriagePatient().getEpisode() != null ? form.getLocalContext().getSelectedTriagePatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance() != null ? form.getLocalContext().getSelectedTriagePatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance() != null ? form.getLocalContext().getSelectedTriagePatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null ? form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null ? form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getTriageCompletionTime() : null);
	
	form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818
	form.dtimTriageBreachTime().setValue(calculateBreachTime(form.dtimTriageStartTime().getValue()));
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 *	Function used to display emergencies attendances
 */
private void displayResults(Tracking_TrackingAttendanceWorklistVoCollection results)
{
	// Clear results grid
	form.grdResults().getRows().clear();
		
	// Test results collection
	if (results == null)
		return;
	
	for (Tracking_TrackingAttendanceWorklistVo tracking : results)
	{
		// Create row for attendance
		grdResultsRow row = form.grdResults().getRows().newRow();
		
		// Set row columns
		row.setColHopitalNo(tracking.getHospitalNo());
		row.setColSurname(tracking.getPatient().getName().getSurname());
		row.setColForename(tracking.getPatient().getName().getForename());
		row.setColStatus(tracking.getCurrentStatus() != null && tracking.getCurrentStatus().getStatus() != null ? tracking.getCurrentStatus().getStatus().getText() : null);
		row.setColRegDate(tracking.getAttendance().getRegistrationDateTime() != null ? tracking.getAttendance().getRegistrationDateTime().toString() : null);
		row.setColLOS(EmergencyDisplayHelper.minutesToHoursAndMinutes(tracking.getLOS()));
		row.setColPriority(tracking.getTriageDetails() != null && tracking.getTriageDetails().getCurrentTriagePriority() != null ? tracking.getTriageDetails().getCurrentTriagePriority().getText() : null);
		row.setColArea(tracking.getCurrentArea() != null ? tracking.getCurrentArea().getAreaDisplayName() : null);
		row.setColProblem(tracking.getTriageDetails() != null && tracking.getTriageDetails().getMainPresentingProblem() != null ? tracking.getTriageDetails().getMainPresentingProblem().getPatientProblem() : null);
		row.setColAllocatedMedic(tracking.getSeenBy() != null && tracking.getSeenBy().getAllocatedMedic() != null ? tracking.getSeenBy().getAllocatedMedic().getIMosName() : null); //WDEV-16816
		
		// Set row value
		row.setValue(tracking);
	}
	//WDEV-18339
	setTotalsLabel();
}
 
Example 20
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedTriagePatient() == null)
		return;
	
	form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedTriagePatient().getEpisode() != null ? form.getLocalContext().getSelectedTriagePatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance() != null ? form.getLocalContext().getSelectedTriagePatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance() != null ? form.getLocalContext().getSelectedTriagePatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null ? form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null ? form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getTriageCompletionTime() : null);
	
	form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818
	form.dtimTriageBreachTime().setValue(calculateBreachTime(form.dtimTriageStartTime().getValue()));
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setTooltips()
{
	if (form.dtimIncidentTime().getValue() != null)
	{
		String incidentTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimIncidentTime().getValue()));	//wdev-17349
		if( incidentTime == null )
			incidentTime = "0 m";
		form.dtimIncidentTime().setTooltip("Time since Incident: " + incidentTime);
	}
	
	if (form.dtimArrivalTime().getValue() != null)
	{
		String arrivalTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())); //wdev-17349
		if( arrivalTime == null )
			arrivalTime = "0 m";
		form.dtimArrivalTime().setTooltip("Time since Arrival: " + arrivalTime);
	}
	
	if (form.dtimRegistrationTime().getValue() != null)
	{
		String registrationTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())); //wdev-17349
		if( registrationTime == null )
			registrationTime = "0 m"; 
		form.dtimRegistrationTime().setTooltip("Time since Registration: " + registrationTime);
	}
	
	if (form.dtimTriageStartTime().getValue() != null)
	{
		String triageStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageStartTime().getValue())); //wdev-17349
		if( triageStartTime == null )
			triageStartTime = "0 m";
		form.dtimTriageStartTime().setTooltip("Time since Triage Start: " + triageStartTime);
		
	}
	
	if (form.dtimTriageEndTime().getValue() != null)
	{
		String triageEndTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageEndTime().getValue()));	//wdev-17349
		if( triageEndTime == null )
			triageEndTime = "0 m";
		form.dtimTriageEndTime().setTooltip("Time since Triage End: " + triageEndTime);
	}
	
	if (form.dtimMedicStartTime().getValue() != null)
	{
		String medicStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimMedicStartTime().getValue())); 	//wdev-17349
		if( medicStartTime == null )
			medicStartTime = "0 m";
		form.dtimMedicStartTime().setTooltip("Time since Medic Start: " + medicStartTime);
	}
	
	if (form.dtimDischargeBreachTime().getValue() != null)
	{
		String dischargeBreachTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimDischargeBreachTime().getValue()));	//wdev-17349
		if( dischargeBreachTime == null )
			dischargeBreachTime = "0 m";
		
		form.dtimDischargeBreachTime().setTooltip("Time since Discharge Breached: " + dischargeBreachTime);
	}
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return;
	
	//form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null ? form.getLocalContext().getSelectedWaitingPatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageCompletionTime() : null);
	
	if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
		form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818,wdev-18299, wdev-18327
	else
		form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())));//WDEV-15818,wdev-18299
	
	//if(	form.getLocalContext().getShowTriageOrClinicianAssessmentWoklistIsNotNull() && form.getLocalContext().getShowTriageOrClinicianAssessmentWoklist().equals(DISPLAY_CLINICIANASSESSMNRWORKLIST))
	//form.dtimMedicStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getMedicInterventionStartDateTime() : null);
	//wdev-17645
	SeenByHCPVo seenVo =  domain.getFirstSeenByHCP(form.getGlobalContext().Core.getCurrentCareContext());
	form.dtimMedicStartTime().setValue(seenVo != null && seenVo.getSeenDateTimeIsNotNull() ? seenVo.getSeenDateTime():null); 
	//---------
	if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
		form.dtimDischargeBreachTime().setValue(calculateBreachTime(form.dtimRegistrationTime().getValue()));  //wdev-16751 //WDEV-18323
	else
		form.dtimDischargeBreachTime().setValue(calculateBreachTime(form.dtimArrivalTime().getValue()));  //wdev-16751 //WDEV-18323
	//wdev-17876
	if( form.getLocalContext().getSelectedWaitingPatient().getIsDischargedIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getSelectedWaitingPatient().getIsDischarged()) && form.getLocalContext().getSelectedWaitingPatient().getAttendanceIsNotNull()) //wdev-18318 -added a double check that was not necesary
	{
		form.dtimDischBreachTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTime());
		form.lbl1().setValue("Date Time:");	//wdev-17945
	}
	else
	{
		if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
			form.dtimDischBreachTime().setValue(calculateDischargeBreachTime(form.dtimRegistrationTime().getValue()));//WDEV-18323
		else
			form.dtimDischBreachTime().setValue(calculateDischargeBreachTime(form.dtimArrivalTime().getValue()));//WDEV-18323
		
		form.lbl1().setValue("Breach Time:");	//wdev-17945
	}
}
 
Example 23
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setTooltips()
{
	if (form.dtimIncidentTime().getValue() != null)
	{
		String incidentTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimIncidentTime().getValue()));  //wdev-17349
		if( incidentTime == null )
			incidentTime = "0 m";
		form.dtimIncidentTime().setTooltip("Time since Incident: " + incidentTime);		//wdev-17349
	}
	
	if (form.dtimArrivalTime().getValue() != null)
	{
		String arrivalTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())); 	//wdev-17349
		
		if( arrivalTime == null )	//wdev-17349
			arrivalTime = "0 m";
		form.dtimArrivalTime().setTooltip("Time since Arrival: " + arrivalTime);
	}
	
	if (form.dtimRegistrationTime().getValue() != null)
	{
		String registration = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue()));	//wdev-17349
		if( registration == null )
			registration = "0 m";
		form.dtimRegistrationTime().setTooltip("Time since Registration: " + registration);
	}
	
	if (form.dtimTriageStartTime().getValue() != null)
	{
		String triageStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageStartTime().getValue())); //wdev-17349
		if( triageStartTime == null )
			triageStartTime = "0 m";
		form.dtimTriageStartTime().setTooltip("Time since Triage Start: " + triageStartTime); 
	}
	
	if (form.dtimTriageEndTime().getValue() != null)
	{
		form.dtimTriageEndTime().setTooltip("Time since Triage End: " + EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageEndTime().getValue())));
	}
	
	if (form.dtimTriageBreachTime().getValue() != null)
	{
		form.dtimTriageBreachTime().setTooltip("Time since Triage Breached: " + EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageBreachTime().getValue())));
	}
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setTooltips()
{
	if (form.dtimIncidentTime().getValue() != null)
	{
		String incidentTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimIncidentTime().getValue()));	//wdev-17349
		if( incidentTime == null )
			incidentTime = "0 m";
		form.dtimIncidentTime().setTooltip("Time since Incident: " + incidentTime);
	}
	
	if (form.dtimArrivalTime().getValue() != null)
	{
		String arrivalTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())); //wdev-17349
		if( arrivalTime == null )
			arrivalTime = "0 m";
		form.dtimArrivalTime().setTooltip("Time since Arrival: " + arrivalTime);
	}
	
	if (form.dtimRegistrationTime().getValue() != null)
	{
		String registrationTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())); //wdev-17349
		if( registrationTime == null )
			registrationTime = "0 m"; 
		form.dtimRegistrationTime().setTooltip("Time since Registration: " + registrationTime);
	}
	
	if (form.dtimTriageStartTime().getValue() != null)
	{
		String triageStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageStartTime().getValue())); //wdev-17349
		if( triageStartTime == null )
			triageStartTime = "0 m";
		form.dtimTriageStartTime().setTooltip("Time since Triage Start: " + triageStartTime);
		
	}
	
	if (form.dtimTriageEndTime().getValue() != null)
	{
		String triageEndTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageEndTime().getValue()));	//wdev-17349
		if( triageEndTime == null )
			triageEndTime = "0 m";
		form.dtimTriageEndTime().setTooltip("Time since Triage End: " + triageEndTime);
	}
	
	if (form.dtimMedicStartTime().getValue() != null)
	{
		String medicStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimMedicStartTime().getValue())); 	//wdev-17349
		if( medicStartTime == null )
			medicStartTime = "0 m";
		form.dtimMedicStartTime().setTooltip("Time since Medic Start: " + medicStartTime);
	}
	
	if (form.dtimDischargeBreachTime().getValue() != null)
	{
		String dischargeBreachTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimDischargeBreachTime().getValue()));	//wdev-17349
		if( dischargeBreachTime == null )
			dischargeBreachTime = "0 m";
		
		form.dtimDischargeBreachTime().setTooltip("Time since Discharge Breached: " + dischargeBreachTime);
	}
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return;
	
	//form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null ? form.getLocalContext().getSelectedWaitingPatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getEndOfRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageCompletionTime() : null);
	
	//WDEV-19984
	boolean isDischarged = form.getLocalContext().getSelectedWaitingPatient().getAttendanceIsNotNull() && form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTimeIsNotNull();
	DateTime registrDateTimeForLOS = form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? (form.getLocalContext().getSelectedWaitingPatient().getAttendance().getEndOfRegistrationDateTimeIsNotNull() ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getEndOfRegistrationDateTime() : form.getLocalContext().getSelectedWaitingPatient().getAttendance().getRegistrationDateTime()) : null;
	DateTime endTimeForLOS = isDischarged ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTime() :  new DateTime();
	
	//WDEV-20421
	Integer intLOS=null;
	String minHourLOS=null;
	
	if (ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
	{	
		intLOS=calculateDateDiffInMinutes(endTimeForLOS, registrDateTimeForLOS);
		minHourLOS=(EmergencyDisplayHelper.minutesToHoursAndMinutes(intLOS));
	}	
	else
	{	
		intLOS=calculateDateDiffInMinutes(endTimeForLOS, form.dtimArrivalTime().getValue());
		minHourLOS=(EmergencyDisplayHelper.minutesToHoursAndMinutes(intLOS));
	}
	
	if (intLOS!=null && minHourLOS!=null)
	{
		setLOSColor(intLOS, minHourLOS);
	}
	
	//WDEV-19984 --------- ends here
	//if(	form.getLocalContext().getShowTriageOrClinicianAssessmentWoklistIsNotNull() && form.getLocalContext().getShowTriageOrClinicianAssessmentWoklist().equals(DISPLAY_CLINICIANASSESSMNRWORKLIST))
	//form.dtimMedicStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getMedicInterventionStartDateTime() : null);
	//wdev-17645
	SeenByHCPLiteVo seenVo = domain.getFirstSeenByHCP(form.getGlobalContext().Core.getCurrentCareContext());
	form.dtimMedicStartTime().setValue(seenVo != null && seenVo.getSeenDateTimeIsNotNull() ? seenVo.getSeenDateTime():null); 
	//---------
	if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
		form.dtimDischargeBreachTime().setValue(calculateBreachTime(form.dtimRegistrationTime().getValue()));  //wdev-16751 //WDEV-18323
	else
		form.dtimDischargeBreachTime().setValue(calculateBreachTime(form.dtimArrivalTime().getValue()));  //wdev-16751 //WDEV-18323
	
	//wdev-17876
	if( form.getLocalContext().getSelectedWaitingPatient().getIsDischargedIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getSelectedWaitingPatient().getIsDischarged()) && form.getLocalContext().getSelectedWaitingPatient().getAttendanceIsNotNull()) //wdev-18318 -added a double check that was not necesary
	{
		form.dtimDischBreachTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTime());
		form.lbl1().setValue("Date Time:");	//wdev-17945
	}
	else
	{
		if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
			form.dtimDischBreachTime().setValue(calculateDischargeBreachTime(form.dtimRegistrationTime().getValue()));//WDEV-18323
		else
			form.dtimDischBreachTime().setValue(calculateDischargeBreachTime(form.dtimArrivalTime().getValue()));//WDEV-18323
		
		form.lbl1().setValue("Breach Time:");	//wdev-17945
	}
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setTooltips()
{
	if (form.dtimIncidentTime().getValue() != null)
	{
		String incidentTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimIncidentTime().getValue()));  //wdev-17349
		if( incidentTime == null )
			incidentTime = "0 m";
		form.dtimIncidentTime().setTooltip("Time since Incident: " + incidentTime);		//wdev-17349
	}
	
	if (form.dtimArrivalTime().getValue() != null)
	{
		String arrivalTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())); 	//wdev-17349
		
		if( arrivalTime == null )	//wdev-17349
			arrivalTime = "0 m";
		form.dtimArrivalTime().setTooltip("Time since Arrival: " + arrivalTime);
	}
	
	if (form.dtimRegistrationTime().getValue() != null)
	{
		String registration = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue()));	//wdev-17349
		if( registration == null )
			registration = "0 m";
		form.dtimRegistrationTime().setTooltip("Time since Registration: " + registration);
	}
	
	if (form.dtimTriageStartTime().getValue() != null)
	{
		String triageStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageStartTime().getValue())); //wdev-17349
		if( triageStartTime == null )
			triageStartTime = "0 m";
		form.dtimTriageStartTime().setTooltip("Time since Triage Start: " + triageStartTime); 
	}
	
	if (form.dtimTriageEndTime().getValue() != null)
	{
		form.dtimTriageEndTime().setTooltip("Time since Triage End: " + EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageEndTime().getValue())));
	}
	
	if (form.dtimTriageBreachTime().getValue() != null)
	{
		form.dtimTriageBreachTime().setTooltip("Time since Triage Breached: " + EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageBreachTime().getValue())));
	}
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setTooltips()
{
	if (form.dtimIncidentTime().getValue() != null)
	{
		String incidentTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimIncidentTime().getValue()));	//wdev-17349
		if( incidentTime == null )
			incidentTime = "0 m";
		form.dtimIncidentTime().setTooltip("Time since Incident: " + incidentTime);
	}
	
	if (form.dtimArrivalTime().getValue() != null)
	{
		String arrivalTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())); //wdev-17349
		if( arrivalTime == null )
			arrivalTime = "0 m";
		form.dtimArrivalTime().setTooltip("Time since Arrival: " + arrivalTime);
	}
	
	if (form.dtimRegistrationTime().getValue() != null)
	{
		String registrationTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())); //wdev-17349
		if( registrationTime == null )
			registrationTime = "0 m"; 
		form.dtimRegistrationTime().setTooltip("Time since Registration: " + registrationTime);
	}
	
	if (form.dtimTriageStartTime().getValue() != null)
	{
		String triageStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageStartTime().getValue())); //wdev-17349
		if( triageStartTime == null )
			triageStartTime = "0 m";
		form.dtimTriageStartTime().setTooltip("Time since Triage Start: " + triageStartTime);
		
	}
	
	if (form.dtimTriageEndTime().getValue() != null)
	{
		String triageEndTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageEndTime().getValue()));	//wdev-17349
		if( triageEndTime == null )
			triageEndTime = "0 m";
		form.dtimTriageEndTime().setTooltip("Time since Triage End: " + triageEndTime);
	}
	
	if (form.dtimMedicStartTime().getValue() != null)
	{
		String medicStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimMedicStartTime().getValue())); 	//wdev-17349
		if( medicStartTime == null )
			medicStartTime = "0 m";
		form.dtimMedicStartTime().setTooltip("Time since Medic Start: " + medicStartTime);
	}
	
	if (form.dtimDischargeBreachTime().getValue() != null)
	{
		String dischargeBreachTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimDischargeBreachTime().getValue()));	//wdev-17349
		if( dischargeBreachTime == null )
			dischargeBreachTime = "0 m";
		
		form.dtimDischargeBreachTime().setTooltip("Time since Discharge Breached: " + dischargeBreachTime);
	}
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return;
	
	//form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null ? form.getLocalContext().getSelectedWaitingPatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageCompletionTime() : null);
	
	if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
		form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818,wdev-18299, wdev-18327
	else
		form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())));//WDEV-15818,wdev-18299
	
	//if(	form.getLocalContext().getShowTriageOrClinicianAssessmentWoklistIsNotNull() && form.getLocalContext().getShowTriageOrClinicianAssessmentWoklist().equals(DISPLAY_CLINICIANASSESSMNRWORKLIST))
	//form.dtimMedicStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getMedicInterventionStartDateTime() : null);
	//wdev-17645
	SeenByHCPVo seenVo =  domain.getFirstSeenByHCP(form.getGlobalContext().Core.getCurrentCareContext());
	form.dtimMedicStartTime().setValue(seenVo != null && seenVo.getSeenDateTimeIsNotNull() ? seenVo.getSeenDateTime():null); 
	//---------
	if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
		form.dtimDischargeBreachTime().setValue(calculateBreachTime(form.dtimRegistrationTime().getValue()));  //wdev-16751 //WDEV-18323
	else
		form.dtimDischargeBreachTime().setValue(calculateBreachTime(form.dtimArrivalTime().getValue()));  //wdev-16751 //WDEV-18323
	//wdev-17876
	if( form.getLocalContext().getSelectedWaitingPatient().getIsDischargedIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getSelectedWaitingPatient().getIsDischarged()) && form.getLocalContext().getSelectedWaitingPatient().getAttendanceIsNotNull()) //wdev-18318 -added a double check that was not necesary
	{
		form.dtimDischBreachTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTime());
		form.lbl1().setValue("Date Time:");	//wdev-17945
	}
	else
	{
		if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
			form.dtimDischBreachTime().setValue(calculateDischargeBreachTime(form.dtimRegistrationTime().getValue()));//WDEV-18323
		else
			form.dtimDischBreachTime().setValue(calculateDischargeBreachTime(form.dtimArrivalTime().getValue()));//WDEV-18323
		
		form.lbl1().setValue("Breach Time:");	//wdev-17945
	}
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setTooltips()
{
	if (form.dtimIncidentTime().getValue() != null)
	{
		String incidentTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimIncidentTime().getValue()));  //wdev-17349
		if( incidentTime == null )
			incidentTime = "0 m";
		form.dtimIncidentTime().setTooltip("Time since Incident: " + incidentTime);		//wdev-17349
	}
	
	if (form.dtimArrivalTime().getValue() != null)
	{
		String arrivalTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())); 	//wdev-17349
		
		if( arrivalTime == null )	//wdev-17349
			arrivalTime = "0 m";
		form.dtimArrivalTime().setTooltip("Time since Arrival: " + arrivalTime);
	}
	
	if (form.dtimRegistrationTime().getValue() != null)
	{
		String registration = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue()));	//wdev-17349
		if( registration == null )
			registration = "0 m";
		form.dtimRegistrationTime().setTooltip("Time since Registration: " + registration);
	}
	
	if (form.dtimTriageStartTime().getValue() != null)
	{
		String triageStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageStartTime().getValue())); //wdev-17349
		if( triageStartTime == null )
			triageStartTime = "0 m";
		form.dtimTriageStartTime().setTooltip("Time since Triage Start: " + triageStartTime); 
	}
	
	if (form.dtimTriageEndTime().getValue() != null)
	{
		form.dtimTriageEndTime().setTooltip("Time since Triage End: " + EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageEndTime().getValue())));
	}
	
	if (form.dtimTriageBreachTime().getValue() != null)
	{
		form.dtimTriageBreachTime().setTooltip("Time since Triage Breached: " + EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageBreachTime().getValue())));
	}
}
 
Example 30
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setTooltips()
{
	if (form.dtimIncidentTime().getValue() != null)
	{
		String incidentTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimIncidentTime().getValue()));	//wdev-17349
		if( incidentTime == null )
			incidentTime = "0 m";
		form.dtimIncidentTime().setTooltip("Time since Incident: " + incidentTime);
	}
	
	if (form.dtimArrivalTime().getValue() != null)
	{
		String arrivalTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())); //wdev-17349
		if( arrivalTime == null )
			arrivalTime = "0 m";
		form.dtimArrivalTime().setTooltip("Time since Arrival: " + arrivalTime);
	}
	
	if (form.dtimRegistrationTime().getValue() != null)
	{
		String registrationTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())); //wdev-17349
		if( registrationTime == null )
			registrationTime = "0 m"; 
		form.dtimRegistrationTime().setTooltip("Time since Registration: " + registrationTime);
	}
	
	if (form.dtimTriageStartTime().getValue() != null)
	{
		String triageStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageStartTime().getValue())); //wdev-17349
		if( triageStartTime == null )
			triageStartTime = "0 m";
		form.dtimTriageStartTime().setTooltip("Time since Triage Start: " + triageStartTime);
		
	}
	
	if (form.dtimTriageEndTime().getValue() != null)
	{
		String triageEndTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageEndTime().getValue()));	//wdev-17349
		if( triageEndTime == null )
			triageEndTime = "0 m";
		form.dtimTriageEndTime().setTooltip("Time since Triage End: " + triageEndTime);
	}
	
	if (form.dtimMedicStartTime().getValue() != null)
	{
		String medicStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimMedicStartTime().getValue())); 	//wdev-17349
		if( medicStartTime == null )
			medicStartTime = "0 m";
		form.dtimMedicStartTime().setTooltip("Time since Medic Start: " + medicStartTime);
	}
	
	if (form.dtimDischargeBreachTime().getValue() != null)
	{
		String dischargeBreachTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimDischargeBreachTime().getValue()));	//wdev-17349
		if( dischargeBreachTime == null )
			dischargeBreachTime = "0 m";
		
		form.dtimDischargeBreachTime().setTooltip("Time since Discharge Breached: " + dischargeBreachTime);
	}
}
 
Example 31
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateAttendanceTimes() 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return;
	
	//form.dtimIncidentTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getEpisode() != null ? form.getLocalContext().getSelectedWaitingPatient().getEpisode().getInjuryDateTime() : null);
	form.dtimArrivalTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getArrivalDateTime() : null);
	form.dtimRegistrationTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance() != null ? form.getLocalContext().getSelectedWaitingPatient().getAttendance().getRegistrationDateTime() : null);
	form.dtimTriageStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageStartDateTime() : null);
	form.dtimTriageEndTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getTriageCompletionTime() : null);
	
	if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
		form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue())));//WDEV-15818,wdev-18299, wdev-18327
	else
		form.txtLOS().setValue(EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())));//WDEV-15818,wdev-18299
	
	//if(	form.getLocalContext().getShowTriageOrClinicianAssessmentWoklistIsNotNull() && form.getLocalContext().getShowTriageOrClinicianAssessmentWoklist().equals(DISPLAY_CLINICIANASSESSMNRWORKLIST))
	//form.dtimMedicStartTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() != null ? form.getLocalContext().getSelectedWaitingPatient().getTriageDetails().getMedicInterventionStartDateTime() : null);
	//wdev-17645
	SeenByHCPVo seenVo =  domain.getFirstSeenByHCP(form.getGlobalContext().Core.getCurrentCareContext());
	form.dtimMedicStartTime().setValue(seenVo != null && seenVo.getSeenDateTimeIsNotNull() ? seenVo.getSeenDateTime():null); 
	//---------
	if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
		form.dtimDischargeBreachTime().setValue(calculateBreachTime(form.dtimRegistrationTime().getValue()));  //wdev-16751 //WDEV-18323
	else
		form.dtimDischargeBreachTime().setValue(calculateBreachTime(form.dtimArrivalTime().getValue()));  //wdev-16751 //WDEV-18323
	//wdev-17876
	if( form.getLocalContext().getSelectedWaitingPatient().getIsDischargedIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getSelectedWaitingPatient().getIsDischarged()) && form.getLocalContext().getSelectedWaitingPatient().getAttendanceIsNotNull()) //wdev-18318 -added a double check that was not necesary
	{
		form.dtimDischBreachTime().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getDischargeDateTime());
		form.lbl1().setValue("Date Time:");	//wdev-17945
	}
	else
	{
		if( ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime"))	//wdev-18327
			form.dtimDischBreachTime().setValue(calculateDischargeBreachTime(form.dtimRegistrationTime().getValue()));//WDEV-18323
		else
			form.dtimDischBreachTime().setValue(calculateDischargeBreachTime(form.dtimArrivalTime().getValue()));//WDEV-18323
		
		form.lbl1().setValue("Breach Time:");	//wdev-17945
	}
}
 
Example 32
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setTooltips()
{
	if (form.dtimIncidentTime().getValue() != null)
	{
		String incidentTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimIncidentTime().getValue()));  //wdev-17349
		if( incidentTime == null )
			incidentTime = "0 m";
		form.dtimIncidentTime().setTooltip("Time since Incident: " + incidentTime);		//wdev-17349
	}
	
	if (form.dtimArrivalTime().getValue() != null)
	{
		String arrivalTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimArrivalTime().getValue())); 	//wdev-17349
		
		if( arrivalTime == null )	//wdev-17349
			arrivalTime = "0 m";
		form.dtimArrivalTime().setTooltip("Time since Arrival: " + arrivalTime);
	}
	
	if (form.dtimRegistrationTime().getValue() != null)
	{
		String registration = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimRegistrationTime().getValue()));	//wdev-17349
		if( registration == null )
			registration = "0 m";
		form.dtimRegistrationTime().setTooltip("Time since Registration: " + registration);
	}
	
	if (form.dtimTriageStartTime().getValue() != null)
	{
		String triageStartTime = EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageStartTime().getValue())); //wdev-17349
		if( triageStartTime == null )
			triageStartTime = "0 m";
		form.dtimTriageStartTime().setTooltip("Time since Triage Start: " + triageStartTime); 
	}
	
	if (form.dtimTriageEndTime().getValue() != null)
	{
		form.dtimTriageEndTime().setTooltip("Time since Triage End: " + EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageEndTime().getValue())));
	}
	
	if (form.dtimTriageBreachTime().getValue() != null)
	{
		form.dtimTriageBreachTime().setTooltip("Time since Triage Breached: " + EmergencyDisplayHelper.minutesToHoursAndMinutes(calculateDateDiffInMinutes(new DateTime(), form.dtimTriageBreachTime().getValue())));
	}
}