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 addHistoricRowRecord(PatientInvasiveDeviceShortVoCollection list, DynamicGridRow dynVirtualRow, int index) { if(list == null) return; DynamicGridRow dynParentRow = dynVirtualRow.getRows().newRow(); dynParentRow.setIdentifier(list.get(index)); InvasiveDeviceConfigShortVo recordDeviceParent = list.get(index).getInvasiveDeviceIsNotNull() ? list.get(index).getInvasiveDevice() : null; DynamicGridCell deviceChildCellVirtual = dynParentRow.getCells().newCell(getColumn(COLDEVICE), DynamicCellType.STRING); deviceChildCellVirtual.setValue(recordDeviceParent.getInvasiveDevice()); InvasiveDeviceConfigShortVo recordDevice = list.get(index).getInvasiveDeviceIsNotNull() ? list.get(index).getInvasiveDevice() : null; DynamicGridCell deviceCell = dynParentRow.getCells().newCell(getColumn(COLDEVICE), DynamicCellType.STRING); deviceCell.setValue(recordDevice.getInvasiveDevice()); DynamicGridCell siteCell = dynParentRow.getCells().newCell(getColumn(COLSITE), DynamicCellType.STRING); siteCell.setValue( list.get(index).getSiteIsNotNull() ? list.get(index).getSite() : null); DynamicGridCell insDateCell = dynParentRow.getCells().newCell(getColumn(COLINSERTEDDATE), DynamicCellType.STRING); insDateCell.setValue( list.get(index).getInsertedDateTime().toString()); HcpLiteVo recordHCP = list.get(index).getInsertedHCPIsNotNull() ? list.get(index).getInsertedHCP() : null; DynamicGridCell insHcpCell = dynParentRow.getCells().newCell(getColumn(COLINSERTEDBY), DynamicCellType.STRING); insHcpCell.setValue(recordHCP.getMos().getName().toString()); DynamicGridCell remDateCell = dynParentRow.getCells().newCell(getColumn(COLREMOVALDATE), DynamicCellType.STRING); remDateCell.setValue( list.get(index).getRemovalDateTime().toString()); HcpLiteVo removeHCP = list.get(index).getRemovalHCPIsNotNull() ? list.get(index).getRemovalHCP() : null; DynamicGridCell removeHcpCell = dynParentRow.getCells().newCell(getColumn(COLREMOVALBY), DynamicCellType.STRING); removeHcpCell.setValue(removeHCP.getMos().getName().toString()); PatientInvasiveDeviceVipVoCollection recordVip = list.get(index).getVIPScoreIsNotNull() ? list.get(index).getVIPScore() : null; if (recordVip != null) { for(int x = 0; x < list.get(index).getVIPScore().size(); x++) { if(recordVip.get(x) != null) { DynamicGridRow childVipRow = dynParentRow.getRows().newRow(); childVipRow.setIdentifier(list.get(index).getVIPScore().get(x)); DynamicGridCell vipCell = childVipRow.getCells().newCell(getColumn(COLDEVICE), DynamicCellType.STRING); vipCell.setValue("VIP="+list.get(index).getVIPScore().get(x).getVIPScale().toString()); //childVipRow.setValue(list.get(index).getVIPScore().get(x)); } } } dynParentRow.setValue(list.get(index)); }
private void addCurrentRowRecord(PatientInvasiveDeviceShortVo record) { if(record == null) return; DynamicGridRow dynRow = form.dyngrdDisplay().getRows().newRow(record.equals(form.getLocalContext().getEditedDeviceRecord())); dynRow.setIdentifier(record); PatientInvasiveDeviceVipVoCollection recordVip = record.getVIPScoreIsNotNull() ? record.getVIPScore() : null; InvasiveDeviceConfigShortVo recordDevice = record.getInvasiveDeviceIsNotNull() ? record.getInvasiveDevice() : null; DynamicGridCell deviceCell = dynRow.getCells().newCell(getColumn(COLDEVICE), DynamicCellType.STRING); deviceCell.setValue(recordDevice.getInvasiveDevice()); DynamicGridCell siteCell = dynRow.getCells().newCell(getColumn(COLSITE), DynamicCellType.STRING); siteCell.setValue(record.getSiteIsNotNull() ? record.getSite() : null); DynamicGridCell insDateCell = dynRow.getCells().newCell(getColumn(COLINSERTEDDATE), DynamicCellType.STRING); insDateCell.setValue(record.getInsertedDateTime().toString()); HcpLiteVo recordHCP = record.getInsertedHCPIsNotNull() ? record.getInsertedHCP() : null; DynamicGridCell insHcpCell = dynRow.getCells().newCell(getColumn(COLINSERTEDBY), DynamicCellType.STRING); insHcpCell.setValue(recordHCP.getMos().getName().toString()); if (record.getTargetRemovalDateTime().getDate().isLessOrEqualThan(new DateTime().getDate())) { dynRow.setBackColor(ims.configuration.gen.ConfigFlag.UI.INVASIVE_DEVICE_REMOVAL_ROW_COLOR.getValue()); } if (recordVip != null) { for(int x = 0; x < record.getVIPScore().size(); x++) { if(recordVip.get(x) != null) { DynamicGridRow childRow = dynRow.getRows().newRow(); DynamicGridCell vipCell = childRow.getCells().newCell(getColumn(COLDEVICE), DynamicCellType.STRING); vipCell.setValue("VIP="+record.getVIPScore().get(x).getVIPScale().toString()); childRow.setIdentifier(record.getVIPScore().get(x)); childRow.setValue(record.getVIPScore().get(x)); } } } dynRow.setValue(record); }