public void evaluate( LoggedInInfo loggedInInfo, Denominator deno, Numerator numer, List<KeyValue> additionalFields) { denominator = deno; numerator = numer; List demoList = deno.getDenominatorList(); denominatorCount = demoList.size(); setReportResultList(new ArrayList<Hashtable<String, Object>>()); for (int i = 0; i < demoList.size(); i++) { String demo = (String) demoList.get(i); boolean bool = numer.evaluate(loggedInInfo, demo); // Object obj = numer.getOutputValues(); // PROBLEM IS THAT THIS WILL ALWAYS HAVE A VALUE Hashtable<String, Object> h = new Hashtable<String, Object>(); h.put("_demographic_no", demo); h.put("_report_result", new Boolean(bool)); if (additionalFields != null) { for (KeyValue field : additionalFields) { String key = (String) field.getKey(); String val = (String) field.getValue(); EctMeasurementsDataBeanHandler ect = new EctMeasurementsDataBeanHandler(Integer.valueOf(demo), val); Collection<EctMeasurementsDataBean> v = ect.getMeasurementsDataVector(); // Execute for the value and attach it to the key in the hashtable // Object obj = if (v.iterator().hasNext()) { h.put(key, v.iterator().next()); } } } getReportResultList().add(h); // if (obj != null){ // getReportResultList().add(obj); // } if (bool) { numeratorCount++; } } }
public String getName() { StringBuilder name = new StringBuilder(); name.append(numerator.getNumeratorName()); name.append("/"); name.append(denominator.getDenominatorName()); if (denominator.hasReplaceableValues()) { name.append(" ("); String[] repKeys = denominator.getReplaceableKeys(); Hashtable repVals = denominator.getReplaceableValues(); for (int i = 0; i < repKeys.length; i++) { // provider_no:999998 if key is provider_no look up provider name MiscUtils.getLogger().debug("repKeys " + repKeys[i]); if (repKeys[i] != null && repKeys[i].equals("provider_no")) { name.append("Provider: " + getProviderStringName("" + repVals.get(repKeys[i]))); } else { name.append(repKeys[i] + ":" + repVals.get(repKeys[i])); } } name.append(")"); } return name.toString(); }