Java Code Examples for ims.emergency.helper.EmergencyDisplayHelper.minutesToHoursAndMinutes()

The following are Jave code examples for showing how to use minutesToHoursAndMinutes() of the ims.emergency.helper.EmergencyDisplayHelper class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
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 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
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 3
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
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 4
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
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 5
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
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 6
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
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 7
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
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 8
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 4 votes
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 9
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 4 votes
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())));
	}
}