Changeset 5284 for openmrs-modules/logicws/web/src/org/openmrs/module/logicws/web/FlatDataStyle.java
- Timestamp:
- 08/14/08 21:19:41 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/logicws/web/src/org/openmrs/module/logicws/web/FlatDataStyle.java
r5220 r5284 92 92 log.info("<column token=\"PATIENTID\" />"); 93 93 94 95 for (String t : tokenNamesFromQuery) 96 { 94 for (String t : tokenNamesFromQuery) { 97 95 int max = Integer.parseInt(dataQuery.getTokenAggregateValue(t)); 98 96 99 97 for (int i = 1; i < max + 1; i++) { 100 98 out.print("<column token=\"" + t + "_" + i + "\" />"); … … 152 150 Result res = resultsForTokens.get(token).get(patient); 153 151 154 155 int max = Integer.parseInt(dataQuery.getTokenAggregateValue(token 156 .getRootToken())); 157 158 152 int max = Integer.parseInt(dataQuery 153 .getTokenAggregateValue(token.getRootToken())); 154 159 155 for (int i = 0; i < max; i++) { 160 156 out.print(START_VALUE_TAG + res.get(i) … … 190 186 } else if (split 191 187 .equals(OBSERVATIONLOCATION)) { 192 Obs obs = (Obs) res.get(i) 193 .getResultObject(); 188 189 Obs obs = null; 190 try { 191 obs = (Obs) res.get(i) 192 .getResultObject(); 193 } catch (ClassCastException e) { 194 } 195 194 196 if (obs != null) { 195 197 out.print(START_VALUE_TAG … … 206 208 } 207 209 } else if (split.equals(ENCOUNTERDATE)) { 208 Obs obs = (Obs) res.get(i) 209 .getResultObject(); 210 Obs obs = null; 211 try { 212 obs = (Obs) res.get(i) 213 .getResultObject(); 214 } catch (ClassCastException e) { 215 } 210 216 if (obs != null) { 211 217 out … … 230 236 } 231 237 } else if (split.equals(ENCOUNTERTYPE)) { 232 Obs obs = (Obs) res.get(i) 233 .getResultObject(); 238 Obs obs = null; 239 try { 240 obs = (Obs) res.get(i) 241 .getResultObject(); 242 } catch (ClassCastException e) { 243 } 234 244 if (obs != null) { 235 245 out.print(START_VALUE_TAG