private void newParentInstance() { //form.getLocalContext().setUpdatingParent(new Boolean(true)); ClinicalTeamVo voNewParent = new ClinicalTeamVo(); voNewParent.setTeamMembers(new ClinicalTeamMemberVoCollection()); form.getLocalContext().setSelectedParentInstance(voNewParent); newParentNode(voNewParent); clearParentInstanceControls(); // Box the selected node offside if (form.grdHierarchy().getValue() instanceof ClinicalTeamVo ) form.getLocalContext().setUpdatedParent((ClinicalTeamVo) form.grdHierarchy().getValue()); else if (form.grdHierarchy().getValue() instanceof ClinicalTeamMemberVo ) form.getLocalContext().setUpdatedChild((ClinicalTeamMemberVo) form.grdHierarchy().getValue()); form.getLocalContext().setSelectedChildInstance(new ClinicalTeamMemberVo()); form.ctnDetails().setCollapsed(false); form.setMode(FormMode.EDIT); }
private void populateChildCollectionFromGrid(ClinicalTeamVo voClinicalTeam) { if (form.grdHierarchy().getValue() == null) return; if (voClinicalTeam.getTeamMembers() == null) voClinicalTeam.setTeamMembers(new ClinicalTeamMemberVoCollection()); GenForm.grdHierarchyRow parentRow = form.grdHierarchy().getValue() instanceof ClinicalTeamVo ? form.grdHierarchy().getSelectedRow() : form.grdHierarchy().getSelectedRow().getParentRow(); if (parentRow.getRows().size() >= 0 ) voClinicalTeam.getTeamMembers().clear(); for (int i=0; i < parentRow.getRows().size(); i++) voClinicalTeam.getTeamMembers().add((ClinicalTeamMemberVo) parentRow.getRows().get(i).getValue()); }
protected void onBtnOkClick() throws ims.framework.exceptions.PresentationLogicException { //go through list and add to vo GenForm.grdTeamMemberRow row; ClinicalTeamMemberVoCollection collTeamMemberVo = new ClinicalTeamMemberVoCollection(); for(int i=0;i<form.grdTeamMember().getRows().size();i++) { row = form.grdTeamMember().getRows().get(i); if (row.getcolAttending() == true) { ClinicalTeamMemberVo voTeamMember = new ClinicalTeamMemberVo(); voTeamMember = row.getValue(); collTeamMemberVo.add(voTeamMember); } } form.getGlobalContext().Clinical.setTeamMemberSelection(collTeamMemberVo); engine.close(DialogResult.OK); }
private void populateScreen(ClinicalTeamVoCollection collClinicalTeamVo) { form.cmbTeamLead().newRow(form.getLocalContext().getIHcp(), form.getLocalContext().getIHcp().toString()); form.cmbTeamLead().setValue(form.getLocalContext().getIHcp()); ClinicalTeamMemberVoCollection voTeamMemberColl = new ClinicalTeamMemberVoCollection(); if (collClinicalTeamVo != null) { form.grdTeamMember().getRows().clear(); GenForm.grdTeamMemberRow tempRow; for (int i=0; i < collClinicalTeamVo.size(); i++) { ClinicalTeamVo voClinicalTeam = collClinicalTeamVo.get(i); voTeamMemberColl = voClinicalTeam.getTeamMembers(); for (int x=0; x < voTeamMemberColl.size(); x++) { ClinicalTeamMemberVo voTeamMember = voTeamMemberColl.get(x); tempRow = form.grdTeamMember().getRows().newRow(); tempRow.setValue(voTeamMember); if(voTeamMember.getHCPIsNotNull()) tempRow.setcolTeamMember(voTeamMember.getHCP().toString()); } } } }
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException { if (formName.equals(form.getForms().Clinical.TeamMemberSelection) && (result.equals(DialogResult.OK) || result.equals(DialogResult.YES))) { ClinicalTeamMemberVoCollection voClinicalTeamMemberColl = form.getGlobalContext().Clinical.getTeamMemberSelection(); if (voClinicalTeamMemberColl == null || voClinicalTeamMemberColl.size() == 0) return; for (int x = 0; x < voClinicalTeamMemberColl.size(); x++) { if (voClinicalTeamMemberColl.get(x) != null) { DynamicGridRow row = form.ctnDetails().dyngrdInvitees().getRows().newRow(); row.setValue(voClinicalTeamMemberColl.get(x).getHCP()); if (voClinicalTeamMemberColl.get(x).getHCPIsNotNull()) { DynamicGridCell cellInvitee = row.getCells().newCell(getColByIdentifier(INVITEE_COLUMN), DynamicCellType.QUERYCOMBOBOX); cellInvitee.setWidth(100); cellInvitee.getItems().newItem(voClinicalTeamMemberColl.get(x).getHCP()); cellInvitee.setTypedText(voClinicalTeamMemberColl.get(x).getHCP().toString()); cellInvitee.setValue(voClinicalTeamMemberColl.get(x).getHCP()); cellInvitee.setReadOnly(true); cellInvitee.setIdentifier(HcpLiteVo.class); cellInvitee.setStringMaxLength(55); } // Show a Label cell DynamicGridCell cellStatus = row.getCells().newCell(getColByIdentifier(STATUS_COLUMN), DynamicCellType.ENUMERATION); cellStatus.setReadOnly(false); cellStatus.setWidth(100); cellStatus.setTooltip("Please select a status"); AttendanceStatusCollection collAttendStatus = ims.clinical.vo.lookups.LookupHelper.getAttendanceStatus(domain.getLookupService()); for (int k = 0; k < collAttendStatus.size(); k++) cellStatus.getItems().newItem(collAttendStatus.get(k)); DynamicGridCell cellNote = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(NOTE_COLUMN), DynamicCellType.STRING); cellNote.setWidth(-1); cellNote.setReadOnly(false); cellNote.setTooltip("Please add a note"); cellNote.setStringMaxLength(255); row.setValue(voClinicalTeamMemberColl.get(x).getHCP()); } } } }
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException { if (formName.equals(form.getForms().Clinical.TeamMemberSelection) && (result.equals(DialogResult.OK) ||result.equals(DialogResult.YES) )) { ClinicalTeamMemberVoCollection voClinicalTeamMemberColl = form.getGlobalContext().Clinical.getTeamMemberSelection(); if(voClinicalTeamMemberColl == null || voClinicalTeamMemberColl.size() == 0) return; for(int x = 0; x < voClinicalTeamMemberColl.size(); x++) { if(voClinicalTeamMemberColl.get(x) != null) { DynamicGridRow row = form.ctnDetails().dyngrdInvitees().getRows().newRow(); row.setValue(voClinicalTeamMemberColl.get(x).getHCP()); if(voClinicalTeamMemberColl.get(x).getHCPIsNotNull()) { DynamicGridCell cellInvitee = row.getCells().newCell(getColByIdentifier(INVITEE_COLUMN), DynamicCellType.QUERYCOMBOBOX); cellInvitee.setWidth(100); cellInvitee.getItems().newItem(voClinicalTeamMemberColl.get(x).getHCP()); cellInvitee.setTypedText(voClinicalTeamMemberColl.get(x).getHCP().toString()); cellInvitee.setValue(voClinicalTeamMemberColl.get(x).getHCP()); cellInvitee.setReadOnly(true); cellInvitee.setIdentifier(HcpLiteVo.class); } //Show a Label cell DynamicGridCell cellStatus = row.getCells().newCell(getColByIdentifier(STATUS_COLUMN), DynamicCellType.ENUMERATION); cellStatus.setReadOnly(false); cellStatus.setWidth(100); cellStatus.setTooltip("Please select a status"); AttendanceStatusCollection collAttendStatus = ims.clinical.vo.lookups.LookupHelper.getAttendanceStatus(domain.getLookupService()); for(int k = 0 ; k < collAttendStatus.size() ; k++) cellStatus.getItems().newItem(collAttendStatus.get(k)); DynamicGridCell cellNote = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(NOTE_COLUMN), DynamicCellType.STRING); cellNote.setWidth(-1); cellNote.setStringMaxLength(255); cellNote.setReadOnly(false); cellNote.setTooltip("Please add a note"); row.setValue(voClinicalTeamMemberColl.get(x).getHCP()); } } form.ctnDetails().dyngrdInvitees().setValue(null); form.getContextMenus().getGoalPlanningMeetingInviteesREMOVEItem().setVisible(false); } }