private int getAssessmentScore(WaterlowAssessmentDetailsVoCollection coll) { int nScore = 0; RiskAssessment risk = null; RiskDescription descr = null; int partScore; for (int i = 0; i < coll.size(); i++) { WaterlowAssessmentDetailsVo child = coll.get(i); risk = null; partScore = 0; for(int k = 0; k < form.getGlobalContext().Nursing.getWaterlowAssessments().size(); k++) { risk = form.getGlobalContext().Nursing.getWaterlowAssessments().get(k); for(int m = 0; m < risk.getRiskFactors().size(); m++) { descr = risk.getRiskFactors().get(m); if(child.getAssessment().toString().equals(descr.getId()) && Boolean.TRUE.equals(child.getSelect())) { partScore += Integer.valueOf(descr.getScore()).intValue(); } } } nScore += partScore; } return nScore; }