Changeset 2083


Ignore:
Timestamp:
Oct 18, 2013, 7:45:22 AM (9 years ago)
Author:
olle
Message:

Refs #471. Library preparation information in 'Case Summary' updated in mRNA, cDNA, and Library sections by adding a "Plate result" row with result text and error icon below the plate name, if plate Annotationtype.PLATE_PROCESS_RESULT string annotation differs from "Successful":

  1. Class/file CaseSummaryServlet.java in reggie/src/net/sf/basedb/reggie/servlet/ updated to store the result values as annotation result for the different data access objects. Updates of private methods
    void loadMRnaInfo(DbControl dc, MRna mrna),
    void loadCDnaInfo(DbControl dc, CDna cdna), and
    void loadLibraryInfo(DbControl dc, Library lib).
  2. JSP script case_summary.jsp in reggie/resources/reports/ updated:
    a. New dynamic columns with id values "mrna.result", "cdna.result", and "lib.result" added to HTML section. They belong to class "dynamic-column", which ensures that when data are added with function addColumn(id, value), it will only be shown if value differs from null.
    b. Function init() updated in mRNA, cDNA, and Library sections to call function addColumn(id, value) with id set to corresponding "*.result" string (e.g. "mrna.result" for mRNA) and value to asFailInfo(r.result, 'error.png'), if r.result differs from null and "Successful".
    c. New function asFailInfo(message, icon) added. It returns an HTML span tag with the message text followed by the icon image.

Note: JSP script case_summary.jsp function asFailInfo(message, icon) is identical in functionality to function asFlagInfo(message, icon), but differs in the class of the returned HTML span tag, which allows the messages to be configured differently.

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/reports/case_summary.jsp

    r2081 r2083  
    105105}
    106106
     107// Style the message as a 'fail information' message
     108function asFailInfo(message, icon)
     109{
     110  message = '<span class="fail-info">' + message + '&nbsp;' + '<img src="../images/'+icon+'"></span>';
     111  return message;
     112}
     113
    107114function asConsent(consent, consentDate)
    108115{
     
    564571      addColumn('mrna.registrationDate', formatDate(r.registrationDate));
    565572      addColumn('mrna.storageBox', asBioPlateLocation(r.bioWell)+asFileLink(r.platePdf, 'pdffile.png'));
     573      addColumn('mrna.result', (r.result && r.result != 'Successful') ? asFailInfo(r.result, 'error.png') : null);
    566574      addColumn('mrna.extractionDate', formatDate(r.extractionDate));
    567575      addColumn('mrna.usedQuantity', formatQuantity(r.usedQuantity, null, ' µg'));
     
    592600      addColumn('cdna.registrationDate', formatDate(r.registrationDate));
    593601      addColumn('cdna.storageBox', asBioPlateLocation(r.bioWell));
     602      addColumn('cdna.result', (r.result && r.result != 'Successful') ? asFailInfo(r.result, 'error.png') : null);
    594603      addColumn('cdna.extractionDate', formatDate(r.extractionDate));
    595604    }
     
    619628      addColumn('lib.registrationDate', formatDate(r.registrationDate));
    620629      addColumn('lib.storageBox', asBioPlateLocation(r.bioWell));
     630      addColumn('lib.result', (r.result && r.result != 'Successful') ? asFailInfo(r.result, 'error.png') : null);
    621631      addColumn('lib.extractionDate', formatDate(r.extractionDate));
    622632      addColumn('lib.remainingQuantity', formatQuantity(r.remainingQuantity, 0.001, ' ng'));
     
    11321142              <th>Work plate</th>
    11331143            </tr>
     1144            <tr id="mrna.result" class="dynamic-column">
     1145              <th>Plate result</th>
     1146            </tr>
    11341147            <tr id="mrna.extractionDate">
    11351148              <th>Cleanup date</th>
     
    11581171              <th>Work plate</th>
    11591172            </tr>
     1173            <tr id="cdna.result" class="dynamic-column">
     1174              <th>Plate result</th>
     1175            </tr>
    11601176            <tr id="cdna.extractionDate">
    11611177              <th>Synthesis date</th>
     
    11811197              <th>Library plate</th>
    11821198            </tr>
     1199            <tr id="lib.result" class="dynamic-column">
     1200              <th>Plate result</th>
     1201            </tr>
    11831202            <tr id="lib.extractionDate">
    11841203              <th>Cleanup date</th>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/CaseSummaryServlet.java

    r2081 r2083  
    521521    Date cleanupDate = (Date) Annotationtype.CLEANUP_DATE.getAnnotationValue(dc, plate);
    522522    mrna.setAnnotation("extractionDate", Reggie.CONVERTER_DATE_TO_STRING.convert(cleanupDate));
     523    // Get BioPlate PlateProcessResult annotation
     524    String result = (String) Annotationtype.PLATE_PROCESS_RESULT.getAnnotationValue(dc, plate);
     525    mrna.setAnnotation("result", result);
    523526  }
    524527
     
    534537    Date synthesisDate = (Date) Annotationtype.SYNTHESIS_DATE.getAnnotationValue(dc, plate);
    535538    cdna.setAnnotation("extractionDate", Reggie.CONVERTER_DATE_TO_STRING.convert(synthesisDate));
     539    // Get BioPlate PlateProcessResult annotation
     540    String result = (String) Annotationtype.PLATE_PROCESS_RESULT.getAnnotationValue(dc, plate);
     541    cdna.setAnnotation("result", result);
    536542  }
    537543
     
    552558    lib.loadAnnotations(dc, "ca_molarity", Annotationtype.CA_MOLARITY, null);
    553559    lib.loadAnnotations(dc, "qubitconc", Annotationtype.QUBIT_CONC, null);
     560    // Get BioPlate PlateProcessResult annotation
     561    String result = (String) Annotationtype.PLATE_PROCESS_RESULT.getAnnotationValue(dc, plate);
     562    lib.setAnnotation("result", result);
    554563  }
    555564
Note: See TracChangeset for help on using the changeset viewer.