@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { if (args!=null && args.length>1 && (args[0]!=null && args[0] instanceof ims.emergency.vo.enums.EDWhiteBoardEvent ) && (args[1]!=null && (args[1] instanceof ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues || args[1] instanceof Boolean) )) { form.getLocalContext().setSelecteEvent((EDWhiteBoardEvent) args[0]); if ((args[1] instanceof ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues )) form.getLocalContext().setSelectedComboCellValue((EDWhiteBoardDynGrdComboValues) args[1]); else if (args[1] instanceof Boolean) form.getLocalContext().setSelectedCheckBoxValue( (Boolean) args[1]); } form.getLocalContext().setSelectedTracking(domain.getTracking(form.getGlobalContext().Emergency.getTracking())); initialize(); open(); //doSearch(); }
private void populateCellCombo(DynamicGridCell cellMeds) { cellMeds.getItems().newItem(ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.REQUIRED,ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.REQUIRED.getText(),ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.REQUIRED.getImage()); cellMeds.getItems().newItem(ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.COMPLETE,ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.COMPLETE.getText(),ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.COMPLETE.getImage()); cellMeds.getItems().newItem(ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.NOT_REQUIRED,ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.NOT_REQUIRED.getText(),ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.NOT_REQUIRED.getImage()); /* cellMeds.getItems().newItem("Required","Required", form.getImages().Core.CriticalError); cellMeds.getItems().newItem("Completed","Completed", form.getImages().Correspondence.PatientDocumentCreated16); cellMeds.getItems().newItem("Not Required","Not Required", form.getImages().Correspondence.NoLetterRequired); */ cellMeds.setAutoPostBack(true); cellMeds.setReadOnly(false); }
private void populateCellCombo(DynamicGridCell cellMeds) { cellMeds.getItems().newItem(ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.REQUIRED,ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.REQUIRED.getText(),ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.REQUIRED.getImage()); cellMeds.getItems().newItem(ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.COMPLETE,ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.COMPLETE.getText(),ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.COMPLETE.getImage()); cellMeds.getItems().newItem(ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.NOT_REQUIRED,ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.NOT_REQUIRED.getText(),ims.emergency.vo.enums.EDWhiteBoardDynGrdComboValues.NOT_REQUIRED.getImage()); cellMeds.setValue(EDWhiteBoardDynGrdComboValues.REQUIRED); cellMeds.setAutoPostBack(true); cellMeds.setReadOnly(false); }
private void populateGCFromRow(DynamicGridRow row) { WhiteBoardEditVo data = new WhiteBoardEditVo(); Object columnObsReq = row.getCells().get(getColumn(COLUMN_OBS_REQUIRED)).getValue(); Object columnMedsGiven = row.getCells().get(getColumn(COLUMN_MEDS_GIVEN)).getValue(); if (columnObsReq != null) { if (columnObsReq.equals(EDWhiteBoardDynGrdComboValues.REQUIRED)) { data.setObsRequired(REQUIRED); } else if (columnObsReq.equals(EDWhiteBoardDynGrdComboValues.COMPLETE)) { data.setObsRequired(COMPLETE); } else if (columnObsReq.equals(EDWhiteBoardDynGrdComboValues.NOT_REQUIRED)) { data.setObsRequired(NOT_REQUIRED); } } if (columnMedsGiven != null) { if (columnMedsGiven.equals(EDWhiteBoardDynGrdComboValues.REQUIRED)) { data.setMedsGiven(REQUIRED); } else if (columnMedsGiven.equals(EDWhiteBoardDynGrdComboValues.COMPLETE)) { data.setMedsGiven(COMPLETE); } else if (columnMedsGiven.equals(EDWhiteBoardDynGrdComboValues.NOT_REQUIRED)) { data.setMedsGiven(NOT_REQUIRED); } } data.setECG((Boolean) row.getCells().get(getColumn(COLUMN_ECG)).getValue()); data.setNPO((Boolean) row.getCells().get(getColumn(COLUMN_NPO)).getValue()); data.setIsolation((Boolean) row.getCells().get(getColumn(COLUMN_ISOLATION)).getValue()); data.setPainAssessments((Integer) row.getCells().get(getColumn(COLUMN_PAIN_ASSESSMENT)).getValue()); data.setWaterlowAssessments((Integer) row.getCells().get(getColumn(COLUMN_WATERLOW)).getValue()); data.setFallsAssessment((Integer) row.getCells().get(getColumn(COLUMN_FALLS)).getValue()); data.setIsarAssessments((Integer) row.getCells().get(getColumn(COLUMN_ISAR)).getValue()); form.getGlobalContext().Emergency.setWhiteBoardEdit(data); }
@Override protected void onDyngrdWhiteBoardCellValueChanged(DynamicGridCell cell) { form.dyngrdWhiteBoard().setValue(cell.getRow().getValue()); populateGCFromRow(form.dyngrdWhiteBoard().getSelectedRow()); setGlobalContexts((TrackingForClinicianWorklistAndTriageVo)form.dyngrdWhiteBoard().getValue()); if (getColumn(COLUMN_OBS_REQUIRED).equals(cell.getColumn())) { if (cell.getValue().equals(EDWhiteBoardDynGrdComboValues.REQUIRED)) { form.getGlobalContext().Emergency.getWhiteBoardEdit().setObsRequired(REQUIRED); } else if (cell.getValue().equals(EDWhiteBoardDynGrdComboValues.COMPLETE)) { form.getGlobalContext().Emergency.getWhiteBoardEdit().setObsRequired(COMPLETE); } else if (cell.getValue().equals(EDWhiteBoardDynGrdComboValues.NOT_REQUIRED)) { form.getGlobalContext().Emergency.getWhiteBoardEdit().setObsRequired(NOT_REQUIRED); } engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog); } else if (getColumn(COLUMN_MEDS_GIVEN).equals(cell.getColumn())) { if (cell.getValue().equals(EDWhiteBoardDynGrdComboValues.REQUIRED)) { form.getGlobalContext().Emergency.getWhiteBoardEdit().setMedsGiven(REQUIRED); } else if (cell.getValue().equals(EDWhiteBoardDynGrdComboValues.COMPLETE)) { form.getGlobalContext().Emergency.getWhiteBoardEdit().setMedsGiven(COMPLETE); } else if (cell.getValue().equals(EDWhiteBoardDynGrdComboValues.NOT_REQUIRED)) { form.getGlobalContext().Emergency.getWhiteBoardEdit().setMedsGiven(NOT_REQUIRED); } engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog); } else if (getColumn(COLUMN_ECG).equals(cell.getColumn())) { form.getGlobalContext().Emergency.getWhiteBoardEdit().setECG((Boolean)cell.getValue()); engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog); } else if (getColumn(COLUMN_NPO).equals(cell.getColumn())) { form.getGlobalContext().Emergency.getWhiteBoardEdit().setNPO((Boolean)cell.getValue()); engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog); } else if (getColumn(COLUMN_ISOLATION).equals(cell.getColumn())) { form.getGlobalContext().Emergency.getWhiteBoardEdit().setIsolation((Boolean)cell.getValue()); engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog); } else if (getColumn(COLUMN_COMMENT).equals(cell.getColumn())) { engine.open(form.getForms().Emergency.EDWhiteBoardDialog, new Object[] {AttendanceClinicalNoteType.NURSE, null,null}); } }
@Override protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException { if (formName.equals(form.getForms().Emergency.EDWhiteBoardEditDialog) && DialogResult.OK.equals(result)) { if (form.getGlobalContext().Emergency.getWhiteBoardEdit() != null) { if (form.getGlobalContext().Emergency.getWhiteBoardEdit().getObsRequired() != null) { if (form.getGlobalContext().Emergency.getWhiteBoardEdit().getObsRequired() == REQUIRED) { form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_OBS_REQUIRED)).setValue(EDWhiteBoardDynGrdComboValues.REQUIRED); } else if (form.getGlobalContext().Emergency.getWhiteBoardEdit().getObsRequired() == COMPLETE) { form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_OBS_REQUIRED)).setValue(EDWhiteBoardDynGrdComboValues.COMPLETE); } else if (form.getGlobalContext().Emergency.getWhiteBoardEdit().getObsRequired() == NOT_REQUIRED) { form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_OBS_REQUIRED)).setValue(EDWhiteBoardDynGrdComboValues.NOT_REQUIRED); } } else form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_OBS_REQUIRED)).setValue(null); if (form.getGlobalContext().Emergency.getWhiteBoardEdit().getMedsGiven() != null) { if (form.getGlobalContext().Emergency.getWhiteBoardEdit().getMedsGiven() == REQUIRED) { form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_MEDS_GIVEN)).setValue(EDWhiteBoardDynGrdComboValues.REQUIRED); } else if (form.getGlobalContext().Emergency.getWhiteBoardEdit().getMedsGiven() == COMPLETE) { form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_MEDS_GIVEN)).setValue(EDWhiteBoardDynGrdComboValues.COMPLETE); } else if (form.getGlobalContext().Emergency.getWhiteBoardEdit().getMedsGiven() == NOT_REQUIRED) { form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_MEDS_GIVEN)).setValue(EDWhiteBoardDynGrdComboValues.NOT_REQUIRED); } } else form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_MEDS_GIVEN)).setValue(null); form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_ECG)).setValue(form.getGlobalContext().Emergency.getWhiteBoardEdit().getECG()); form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_NPO)).setValue(form.getGlobalContext().Emergency.getWhiteBoardEdit().getNPO()); form.dyngrdWhiteBoard().getSelectedRow().getCells().get(getColumn(COLUMN_ISOLATION)).setValue(form.getGlobalContext().Emergency.getWhiteBoardEdit().getIsolation()); } } }