private float getScoreByAssessmentName(String colFall, MiniNutritionalAssessmentDetailsCollection assessmentDetails) { float nScore = 0; RiskAssessment risk; RiskDescription descr; for (int i = 0; i < form.getGlobalContext().COE.getMNAAssessments().size(); i++) { risk = form.getGlobalContext().COE.getMNAAssessments().get(i); if (risk.getDescription().equalsIgnoreCase(colFall)) { for (int j = 0; j < risk.getRiskFactors().size(); j++) { descr = risk.getRiskFactors().get(j); for (int k = 0; k < assessmentDetails.size(); k++) { if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE)) { nScore += Float.valueOf(descr.getScore()).floatValue(); } } } if (risk.getName().length() > 0 && risk.getName().charAt(0) == 'K') { if (nScore <= 1) nScore = 0; else if (nScore == 2) nScore = (float) 0.5; else if (nScore == 3) nScore = 1; } break; } } return nScore; }