Changeset 1766


Ignore:
Timestamp:
Dec 4, 2012, 8:28:03 AM (10 years ago)
Author:
olle
Message:

Fixes #443. Sample count report generator updated to allow the user to select sample type "no specimen" for the report.

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

Legend:

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

    r1765 r1766  
    286286    {
    287287      var samples = 'specimens';
    288       if ('blood' == sampleType)
     288      if ('nospecimen' == sampleType)
     289      {
     290        samples = '"no specimens"';
     291      }
     292      else if ('blood' == sampleType)
    289293      {
    290294        samples = 'blood samples';
     
    378382    {
    379383      headerText = '# Specimens by ';
    380       if ('blood' == sampleType)
     384      if ('nospecimen' == sampleType)
     385      {
     386        headerText = '# "No specimens" by ';
     387      }
     388      else if ('blood' == sampleType)
    381389      {
    382390        headerText = '# Blood samples by ';
     
    18621870                  <select name="sampletype">
    18631871                    <option value="specimen" selected="yes">Specimen</option>
     1872                    <option value="nospecimen">No specimen</option>
    18641873                    <option value="blood">Blood</option>
    18651874                  </select>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SampleReportServlet.java

    r1765 r1766  
    250250    ItemQuery<Sample> sampleQuery = Sample.getQuery();
    251251    sampleQuery.joinPermanent(Hql.innerJoin(null, "creationEvent", "ce", true));
    252     if (sampleType.equals("blood"))
     252    if (sampleType.equals("nospecimen"))
     253    {
     254      Subtype.NO_SPECIMEN.addFilter(dc, sampleQuery);
     255    }
     256    else if (sampleType.equals("blood"))
    253257    {
    254258      Subtype.BLOOD.addFilter(dc, sampleQuery);
Note: See TracChangeset for help on using the changeset viewer.