private void updateRowRecordVip(PatientInvasiveDeviceVipVo record) { if(record == null) return; Object obj = form.dyngrdDisplay().getSelectedRow().getValue(); if(obj instanceof PatientInvasiveDeviceVipVo) { PatientInvasiveDeviceVipVo existingRecord = (PatientInvasiveDeviceVipVo) (form.dyngrdDisplay().getSelectedRow().getValue()); if(existingRecord != null && existingRecord.equals(record)) { updateRowRecordVip(form.dyngrdDisplay().getSelectedRow(), record); } } }
protected void onDyngrdDisplayRowSelectionChanged(DynamicGridRow row) { Object obj = form.dyngrdDisplay().getSelectedRow().getIdentifier(); if(obj instanceof PatientInvasiveDeviceShortVo) { getAndDisplayRecordDevice(); } else if(obj instanceof PatientInvasiveDeviceVipVo) { getAndDisplayRecordVip(); form.getLocalContext().setEditedDeviceRecord(null); form.ctnDetail().setCollapsed(form.dyngrdDisplay().getSelectedRow() == null); } updateControlsState(); }
private PatientInvasiveDeviceVipVo getAndDisplayRecordVip(PatientInvasiveDeviceVipVo refRecord) { if(refRecord == null) return null; clearTabVipInstanceControls(); clearTabDeviceInstanceControls(); form.ctnDetail().lyrDetails().showtabVIP(); form.ctnDetail().lyrDetails().tabDevice().setHeaderVisible(false); form.ctnDetail().lyrDetails().tabVIP().setHeaderVisible(true); PatientInvasiveDeviceVipVo record = domain.getPatientInvasiveDeviceVip(refRecord); form.getLocalContext().setEditedVipRecord(record); populateScreenFromDataVip(record); return record; }
protected void populateScreenFromDataVip(ims.nursing.vo.PatientInvasiveDeviceVipVo record) { if(record == null) return; form.ctnDetail().lyrDetails().tabVIP().cmbVipSore().setValue(record.getVIPScaleIsNotNull() ? record.getVIPScale() : null); form.ctnDetail().lyrDetails().tabVIP().cmbAction().setValue(record.getActionIsNotNull() ? record.getAction() : null); if(record.getAuthoringInformationIsNotNull()) { if(record.getAuthoringInformation().getAuthoringDateTimeIsNotNull() && record.getAuthoringInformation().getAuthoringHcpIsNotNull()) { form.ctnDetail().lyrDetails().tabVIP().customVipAuthoringHCP().setValue(record.getAuthoringInformation()); } } }
private PatientInvasiveDeviceVipVo getNewVipVo(PatientInvasiveDeviceVipVoCollection vipCollection) { for (int i = 0; vipCollection != null && i < vipCollection.size(); i++) { if(vipCollection.get(i).getID_VIPScore() == null) { return vipCollection.get(i); } } return new PatientInvasiveDeviceVipVo(); }
private void updateRowRecordVip(DynamicGridRow childRow, PatientInvasiveDeviceVipVo record) { if(childRow == null || record == null) return; InvasiveDeviceVIPScale recordVip = record.getVIPScale(); DynamicGridCell vipCell = childRow.getCells().newCell(getColumn(COLDEVICE), DynamicCellType.STRING); vipCell.setValue("VIP="+recordVip); childRow.setValue(record); }
protected void onFormModeChanged() { if(form.getMode().equals(FormMode.VIEW)) { form.dyngrdDisplay().setReadOnly(true); } if(form.getMode().equals(FormMode.EDIT)) { form.ctnDetail().lyrDetails().tabDevice().customInsertedHCP().setEnabledAuthoringHCP(Boolean.TRUE); form.ctnDetail().lyrDetails().tabDevice().customInsertedHCP().setEnabledDateTime(Boolean.TRUE); } if (form.dyngrdDisplay().getSelectedRow() != null) { Object obj = form.dyngrdDisplay().getSelectedRow().getIdentifier(); if(obj instanceof PatientInvasiveDeviceShortVo) { if (form.getLocalContext().getEditedDeviceRecordIsNotNull()) { getAndDisplayRecordDevice(form.getLocalContext().getEditedDeviceRecord()); } else { getAndDisplayRecordDevice((PatientInvasiveDeviceShortVo)form.dyngrdDisplay().getSelectedRow().getIdentifier()); } } if(obj instanceof PatientInvasiveDeviceVipVo) { getAndDisplayRecordVip(form.getLocalContext().getEditedVipRecord()); } } updateControlsState(); }
public PatientInvasiveDeviceVipVo getPatientInvasiveDeviceVip(VIPScoreRefVo id) { if(id == null || id.getID_VIPScore() == null) throw new DomainRuntimeException("Invalid record"); DomainFactory factory = getDomainFactory(); VIPScore domainRecord = (VIPScore)factory.getDomainObject(VIPScore.class, id.getID_VIPScore().intValue()); return PatientInvasiveDeviceVipVoAssembler.create(domainRecord); }
public void updateControlsState() { if(form.getMode().equals(FormMode.VIEW)) { form.btnNew().setVisible(true); form.btnUpdate().setVisible(true); if (form.cmbFilter().getValue().equals(FILTER_CURRENT)) { if (form.dyngrdDisplay().getSelectedRow() != null) { form.btnUpdate().setEnabled(true); Object obj = form.dyngrdDisplay().getSelectedRow().getIdentifier(); if(obj instanceof PatientInvasiveDeviceShortVo) { form.btnNew().setEnabled(true); form.ctnDetail().lyrDetails().showtabDevice(); form.ctnDetail().lyrDetails().tabDevice().setHeaderVisible(true); form.ctnDetail().lyrDetails().tabVIP().setHeaderVisible(false); } else if(obj instanceof PatientInvasiveDeviceVipVo) { form.btnNew().setEnabled(false); form.ctnDetail().lyrDetails().showtabVIP(); form.ctnDetail().lyrDetails().tabDevice().setHeaderVisible(false); form.ctnDetail().lyrDetails().tabVIP().setHeaderVisible(true); } } else { form.btnNew().setEnabled(true); form.btnUpdate().setEnabled(false); } } if (form.cmbFilter().getValue().equals(FILTER_HISTORIC)) { form.btnNew().setEnabled(false); form.btnUpdate().setEnabled(false); } } updateContextMenuState(); }
private PatientInvasiveDeviceVipVo getAndDisplayRecordVip() { PatientInvasiveDeviceVipVo record = (PatientInvasiveDeviceVipVo)form.dyngrdDisplay().getSelectedRow().getIdentifier(); return getAndDisplayRecordVip(record); }