private String getSkinPreparation(SkinPreparationusedCollection skinPreparationUsed, String otherSkin) { if(skinPreparationUsed == null || skinPreparationUsed.size() == 0) return null; String skinPreparationDisplay = ""; for(int i=0; i<skinPreparationUsed.size(); i++) { SkinPreparationused skin = skinPreparationUsed.get(i); if(skin == null) continue; if(SkinPreparationused.OTHER.equals(skin) && otherSkin != null) { skinPreparationDisplay += (skinPreparationDisplay.length() > 0 ? ", " : "") + skin.getIItemText() + ": " + otherSkin; continue; } skinPreparationDisplay += (skinPreparationDisplay.length() > 0 ? ", " : "") + skin.getIItemText(); } return skinPreparationDisplay.length() > 0 ? skinPreparationDisplay : null; }
private SkinPreparationusedCollection getFromSkinPreparationGrid(IntraOperativeDetailsVo intraOperativeDetails) { SkinPreparationusedCollection skinPreparationusedCollection = new SkinPreparationusedCollection(); for (int i = 0; i < form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().size(); i++) { if (form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().get(i).getcolSelect()) { skinPreparationusedCollection.add(form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().get(i).getValue()); } if (SkinPreparationused.OTHER.equals(form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().get(i).getValue())) { intraOperativeDetails.setOtherSkinPreparationUsed(form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().get(i).getcolOther()); } } return skinPreparationusedCollection.size() == 0 ? null : skinPreparationusedCollection; }
private boolean populateSkinPreparationGrid() { SkinPreparationusedCollection skinPrepColl = (ims.clinical.vo.lookups.LookupHelper.getSkinPreparationused(domain.getLookupService())); if (skinPrepColl == null || skinPrepColl.size() == 0) { return false; } form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().clear(); for (int i = 0; i < skinPrepColl.size(); i++) { grdSkinPreparationRow newRow = form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().newRow(); newRow.setcolSkinPrepation(skinPrepColl.get(i).getIItemText()); newRow.setcolOtherReadOnly(true); newRow.setValue(skinPrepColl.get(i)); } return true; }
private void setSkinPreparationGrid(SkinPreparationusedCollection skinPreparationUsed, String otherSkinPreparation) { if (skinPreparationUsed == null || skinPreparationUsed.size() == 0) return; for (int i = 0; i < skinPreparationUsed.size(); i++) { if (skinPreparationUsed.get(i) == null) continue; for (int j = 0; j < form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().size(); j++) { if (skinPreparationUsed.get(i).equals(form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().get(j).getValue())) { form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().get(j).setcolSelect(true); if (SkinPreparationused.OTHER.equals(skinPreparationUsed.get(i))) { form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().get(j).setcolOther(otherSkinPreparation); form.lyr1().tabDetails().ctn1().grdSkinPreparation().getRows().get(j).setcolOtherReadOnly(false); } break; } } } }