@Override protected void onBtnDischargeClick() throws PresentationLogicException { form.getLocalContext().setSelectedEvent(EDReferralToSpecialtyEvent.DISCHARGE); form.dtimCompletion().setValue(new DateTime()); if (save()) { engine.close(DialogResult.OK); } }
@Override protected void onBtnNotAcceptedClick() throws PresentationLogicException { form.getLocalContext().setSelectedEvent(EDReferralToSpecialtyEvent.NOT_ACCEPTED); if (save()) { engine.close(DialogResult.OK); } }
@Override protected void onBtnAdmissionClick() throws PresentationLogicException { form.getLocalContext().setSelectedEvent(EDReferralToSpecialtyEvent.ADMISSION); form.dtimCompletion().setValue(new DateTime()); ReferralToSpecialtyTeamVo referralToSave = populateDataFromScreen(form.getLocalContext().getSelectedReferralToSpecialty()); String[] errors = referralToSave.validate(getUIErrors()); if (errors != null && errors.length > 0) { engine.showErrors(errors); return ; } // Check SOE if (referralToSave.getID_ReferralToSpecTeamIsNotNull() && domain.isStale(referralToSave)) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); if (form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull()) { form.getLocalContext().setSelectedReferralToSpecialty(domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty())); } if (form.getLocalContext().getTrackingForReferralIsNotNull()) { form.getLocalContext().setTrackingForReferral(domain.getTrackingForReferral(form.getLocalContext().getTrackingForReferral())); } open(); return ; } //WDEV-17661 if (ConfigFlag.GEN.ED_DTA_ADMISSION_FUNCTIONALITY.getValue().equals("PENDING")) { engine.open(form.getForms().Emergency.EDDecisionToAdmitDialog, new Object[] {form.getLocalContext().getTrackingForReferral(),referralToSave}); } else if (ConfigFlag.GEN.ED_DTA_ADMISSION_FUNCTIONALITY.getValue().equals("PARTIAL")) { engine.open(form.getForms().Emergency.EDPartialAdmissionDialog, new Object[] {form.getLocalContext().getTrackingForReferral()}); } }
protected void onBtnEditClick() throws PresentationLogicException { form.getLocalContext().setSelectedEvent(EDReferralToSpecialtyEvent.EDIT); form.setMode(FormMode.EDIT); }
@Override protected void onBtnTransferClick() throws PresentationLogicException { //WDEV-19006 - start form.getLocalContext().setSelectedEvent(EDReferralToSpecialtyEvent.TRANSFER); form.dtimCompletion().setValue(new DateTime()); ReferralToSpecialtyTeamVo referralToSave = populateDataFromScreen(form.getLocalContext().getSelectedReferralToSpecialty()); form.getGlobalContext().Emergency.setReferralToSpecialtyTeam(referralToSave); String[] errors = referralToSave.validate(getUIErrors()); if (errors != null && errors.length > 0) { engine.showErrors(errors); return ; } // Check SOE if (referralToSave.getID_ReferralToSpecTeamIsNotNull() && domain.isStale(referralToSave)) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); if (form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull()) { form.getLocalContext().setSelectedReferralToSpecialty(domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty())); } if (form.getLocalContext().getTrackingForReferralIsNotNull()) { form.getLocalContext().setTrackingForReferral(domain.getTrackingForReferral(form.getLocalContext().getTrackingForReferral())); } open(); return ; } TrackingWithPartialAdmissionVo trackingwithPartialAdmission = domain.getTrackingWithEDPartialAdmission(form.getGlobalContext().Emergency.getTracking()); Boolean newTransfer = isNewTransfer(trackingwithPartialAdmission.getCurrentTransferRecord()); if( trackingwithPartialAdmission != null && newTransfer && trackingwithPartialAdmission.getCurrentPartialAdmissionIsNotNull() && AllocationStatus.ACTIVE.equals(trackingwithPartialAdmission.getCurrentPartialAdmission().getAllocatedStatus())) { form.getLocalContext().setlcCurrentPartialAdmission(trackingwithPartialAdmission.getCurrentPartialAdmission()); form.getLocalContext().setlcDTAWithTransferMessageId(engine.showMessage("A decision to admit record exists for this patient. If you proceed to Transfer the patient, the record will be cancelled on the ED system and the PAS system. Are you sure you want to continue?","Confirm Transfer" ,MessageButtons.YESNO, MessageIcon.QUESTION)); } else engine.open(form.getForms().Emergency.TransferDialog); }
@Override protected void onBtnAdmissionClick() throws PresentationLogicException { form.getLocalContext().setSelectedEvent(EDReferralToSpecialtyEvent.ADMISSION); form.dtimCompletion().setValue(new DateTime()); ReferralToSpecialtyTeamVo referralToSave = populateDataFromScreen(form.getLocalContext().getSelectedReferralToSpecialty()); String[] errors = referralToSave.validate(getUIErrors()); if (errors != null && errors.length > 0) { engine.showErrors(errors); return ; } // Check SOE if (referralToSave.getID_ReferralToSpecTeamIsNotNull() && domain.isStale(referralToSave)) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); if (form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull()) { form.getLocalContext().setSelectedReferralToSpecialty(domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty())); } if (form.getLocalContext().getTrackingForReferralIsNotNull()) { form.getLocalContext().setTrackingForReferral(domain.getTrackingForReferral(form.getLocalContext().getTrackingForReferral())); } open(); return ; } //WDEV-17661 if (ConfigFlag.GEN.ED_DTA_ADMISSION_FUNCTIONALITY.getValue().equals("PENDING")) { engine.open(form.getForms().Emergency.EDDecisionToAdmitDialog, new Object[] {form.getLocalContext().getTrackingForReferral(),referralToSave}); } else if (ConfigFlag.GEN.ED_DTA_ADMISSION_FUNCTIONALITY.getValue().equals("PARTIAL")) { engine.open(form.getForms().Emergency.EDPartialAdmissionDialog, new Object[] {form.getLocalContext().getTrackingForReferral(),referralToSave}); //wdev-19307 } }