@Override protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException { switch (menuItemID) { case GenForm.ContextMenus.CoreNamespace.WardView.TRANSFER: form.getGlobalContext().Core.setSelectedBedSpaceState(null); form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.TRANSFERWAITINGAREAPATIENT); if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo) { form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier()); engine.open(form.getForms().Core.BedInfoDialog); } break; case GenForm.ContextMenus.CoreNamespace.WardView.DISCHARGE: form.getGlobalContext().Core.setSelectedBedSpaceState(null); form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEWAITINGAREAPATIENT); if(form.dyngrdDisplay().getSelectedRow() != null && form.dyngrdDisplay().getSelectedRow().getIdentifier() instanceof InpatientEpisodeLiteVo) { form.getGlobalContext().Core.setSelectedWaitingAreaPatient((InpatientEpisodeLiteVo) form.dyngrdDisplay().getSelectedRow().getIdentifier()); engine.open(form.getForms().Core.BedInfoDialog); } break; case GenForm.ContextMenus.CoreNamespace.WardView.CANCEL_TRANSFER: cancelTransfer(); break; case GenForm.ContextMenus.CoreNamespace.WardView.ASSIGNWARD: if( ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue() == true ) //wdev-18936 { form.getGlobalContext().Core.setPatientElectiveListForWardViewVo((PatientElectiveListForWardViewVo) form.dyngrdDisplay().getSelectedRow().getIdentifier()); } else form.getGlobalContext().Core.setPendingElectiveAdmission((PendingElectiveAdmissionAdmitVo) form.dyngrdDisplay().getSelectedRow().getIdentifier()); engine.open(form.getForms().Core.AssignWard); break; default : break; } }
public void savePatientElectiveListForWardView(PatientElectiveListForWardViewVo record) throws DomainInterfaceException, StaleObjectException { if (record == null) throw new CodingRuntimeException("patientElectiveList is null in method savePatientElectiveListForWardView"); if (!record.isValidated()) throw new CodingRuntimeException("patientElectiveList has not been validated in method savePatientElectiveListForWardView"); DomainFactory factory = getDomainFactory(); PatientElectiveList doPatientElectiveList = PatientElectiveListForWardViewVoAssembler.extractPatientElectiveList(factory, record); factory.save(doPatientElectiveList); }