private void movePatient() { TriageForTrackingVo triageDetails = form.getLocalContext().getSelectedTrackingPatient().getTriageDetails(); if (shouldTriageEndDateTimeBeDisplayed()) { form.getGlobalContext().Emergency.setDisplayTriageEndTime(true); form.getGlobalContext().Emergency.setTriageCompletedDateTime( triageDetails.getTriageCompletionTime()); form.getGlobalContext().Emergency.setStartTriageDateTime(triageDetails.getTriageStartDateTime()); } else form.getGlobalContext().Emergency.setDisplayTriageEndTime(false); engine.open(form.getForms().Emergency.SendToAreaDialog, new Object[] {Boolean.TRUE}); }
@Override protected void onBtnMoveClick() throws PresentationLogicException { //WDEV-22171 if (Boolean.TRUE.equals(form.getLocalContext().getVALIDATE_TRIAGE_AND_DISPLAY_PAIN_SCALE_MANDATORY_MESSAGE()))//WDEV-19877 { Boolean wasPainScaleRecorded = domain.wasPainScaleRecordedForCurrentCareContext(form.getGlobalContext().Core.getCurrentCareContext()); TriageForTrackingVo triageDetails = form.getLocalContext().getSelectedTrackingPatient().getTriageDetails(); String infoMessage = ""; if (!Boolean.TRUE.equals(wasPainScaleRecorded) && triageDetails != null && triageDetails.getTriageStartDateTime() != null) { infoMessage += "No Pain Scale has been recorded against the Triage record. \n"; } if (triageDetails == null || (triageDetails != null && (triageDetails.getTriageStartDateTime() == null || triageDetails.getCurrentTriageAssessment() == null))) { infoMessage += "No Triage Protocol has been completed for the patient. \n"; } if(infoMessage.length() > 0) { infoMessage += "\n Do you wish to proceed in moving the patient to a new area ?"; form.getLocalContext().setMessageBoxIdOnMove(engine.showMessage(infoMessage,"Warning", MessageButtons.YESNO, MessageIcon.WARNING)); return; } } movePatient(); }
private boolean shouldTriageEndDateTimeBeDisplayed() { TriageForTrackingVo triageDetails = form.getLocalContext().getSelectedTrackingPatient().getTriageDetails(); TrackingAttendanceStatusForTrackingVo currentTrackingStatus = form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus(); if (triageDetails != null && triageDetails.getTriageStartDateTime() != null && currentTrackingStatus != null && TrackingStatus.WAITING_TO_BE_TRIAGED.equals(currentTrackingStatus.getStatus())) return true; return false; }
private boolean changeStatusOnMove() { if (form.getLocalContext().getSelectedTrackingPatient() == null) return false; TriageForTrackingVo triageDetails = form.getLocalContext().getSelectedTrackingPatient().getTriageDetails(); TrackingAttendanceStatusForTrackingVo currentTrackingStatus = form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus(); if (triageDetails != null && triageDetails.getCurrentTriagePriority() != null && currentTrackingStatus != null && TrackingStatus.WAITING_TO_BE_TRIAGED.equals(currentTrackingStatus.getStatus())) return true; return false; }