Changeset 2131
- Timestamp:
- Nov 11, 2013, 1:43:24 PM (10 years ago)
- Location:
- extensions/net.sf.basedb.reggie/branches/ticket-489
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/branches/ticket-489/resources/reports/case_summary.jsp
r2106 r2131 281 281 } 282 282 283 function asPercent(value) 284 { 285 var result = ''; 286 if (value != null) 287 { 288 result = value + '%'; 289 } 290 return result; 291 } 292 283 293 function init() 284 294 { … … 463 473 464 474 var stained = h.stainDate ? true : false; 475 var bestStain = stained ? h.bestStain : null; 476 var scored = bestStain && bestStain.ScoreComplete != null ? true : false; 477 465 478 addColumn('histology.stained', stained ? formatDate(h.stainDate) : 'No'); 466 479 addColumn('histology.nofSlides', stained ? h.numStains : null); 467 addColumn('histology.heGlass', stained ? asBioPlateLocation( h.bestStain) : null);480 addColumn('histology.heGlass', stained ? asBioPlateLocation(bestStain.bioWell) : null); 468 481 addColumn('histology.stainProtocol', stained ? makeLink('PROTOCOL', h.stainProtocol, truncateAt) : null); 482 483 addColumn('histology.scored', scored ? (bestStain.ScoreComplete ? 'Complete' : 'In progress') : 'No'); 484 addColumn('histology.scoreInvasiveCancer', scored ? asPercent(bestStain.ScoreInvasiveCancer) : null); 485 addColumn('histology.scoreInsituCancer', scored ? asPercent(bestStain.ScoreInsituCancer) : null); 486 addColumn('histology.scoreLymphocytes', scored ? asPercent(bestStain.ScoreLymphocytes) : null); 487 addColumn('histology.scoreNormal', scored ? asPercent(bestStain.ScoreNormal) : null); 488 addColumn('histology.scoreStroma', scored ? asPercent(bestStain.ScoreStroma) : null); 489 addColumn('histology.scoreFat', scored ? asPercent(bestStain.ScoreFat) : null); 490 addColumn('histology.scoreComments', scored ? truncate(bestStain.comments, truncateAt) : null); 469 491 } 470 492 } … … 1123 1145 <th>Protocol</th> 1124 1146 </tr> 1147 <tr id="histology.scored" class="subtitle"> 1148 <th>Scored</th> 1149 </tr> 1150 <tr id="histology.scoreInvasiveCancer" class="dynamic-column"> 1151 <th>Invasive cancer</th> 1152 </tr> 1153 <tr id="histology.scoreInsituCancer" class="dynamic-column"> 1154 <th>Insitu cancer</th> 1155 </tr> 1156 <tr id="histology.scoreLymphocytes" class="dynamic-column"> 1157 <th>Lymphocytes</th> 1158 </tr> 1159 <tr id="histology.scoreNormal" class="dynamic-column"> 1160 <th>Normal</th> 1161 </tr> 1162 <tr id="histology.scoreStroma" class="dynamic-column"> 1163 <th>Stroma</th> 1164 </tr> 1165 <tr id="histology.scoreFat" class="dynamic-column"> 1166 <th>Fat</th> 1167 </tr> 1168 <tr id="histology.scoreComments" class="comment dynamic-column"> 1169 <th>Comments</th> 1170 </tr> 1125 1171 </tbody> 1126 1172 </table> -
extensions/net.sf.basedb.reggie/branches/ticket-489/src/net/sf/basedb/reggie/servlet/CaseSummaryServlet.java
r2117 r2131 430 430 } 431 431 432 @SuppressWarnings("unchecked") 432 433 private void loadHistologyInfo(DbControl dc, Histology his) 433 434 { … … 472 473 if (goodIsGood) 473 474 { 474 his.setAnnotation("bestStain", JsonUtil.getBioWellAsJSON(good.getBioWell(), true)); 475 JSONObject jsonGood = new JSONObject(); 476 jsonGood.put("id", good.getId()); 477 jsonGood.put("name", good.getName()); 478 jsonGood.put("bioWell", JsonUtil.getBioWellAsJSON(good.getBioWell(), true)); 479 jsonGood.put("comments", good.getDescription()); 480 481 jsonGood.put("ScoreComplete", Annotationtype.SCORE_COMPLETE.getAnnotationValue(dc, good)); 482 jsonGood.put("ScoreInvasiveCancer", Annotationtype.SCORE_INVASIVE_CANCER.getAnnotationValue(dc, good)); 483 jsonGood.put("ScoreInsituCancer", Annotationtype.SCORE_INSITU_CANCER.getAnnotationValue(dc, good)); 484 jsonGood.put("ScoreLymphocytes", Annotationtype.SCORE_LYMPHOCYTES.getAnnotationValue(dc, good)); 485 jsonGood.put("ScoreNormal", Annotationtype.SCORE_NORMAL.getAnnotationValue(dc, good)); 486 jsonGood.put("ScoreStroma", Annotationtype.SCORE_STROMA.getAnnotationValue(dc, good)); 487 jsonGood.put("ScoreFat", Annotationtype.SCORE_FAT.getAnnotationValue(dc, good)); 488 489 his.setAnnotation("bestStain", jsonGood); 475 490 } 476 491 }
Note: See TracChangeset
for help on using the changeset viewer.