source: extensions/net.sf.basedb.meludi/trunk/resources/reports/meludi_quarter_month_report_generator.jsp @ 3505

Last change on this file since 3505 was 3505, checked in by olle, 8 years ago

Refs #802. Section "Statistics and reporting wizards" extended with a "Sample processing statistics" wizard, which initially supports creation of a "MeLuDI quarter/month report"; consisting of box plots of DNA/RNA original quantity and DNA ΔCt values:

  1. XML servlet configuration file servlets.xml in META-INF/ updated with entry for new servlet class MeludiQuarterMonthReportServlet.
  2. JSP file index.jsp in resources/ updated by adding new "Sample processing statistics" wizard to the "Statistics and reporting wizards" section. It will be coupled to new JSP file meludi_quarter_month_report_generator.jsp in resources/reports/.
  3. New JSP and javascript files meludi_quarter_month_report_generator.jsp, meludi_quarter_month_report_generator.js, and boxplot.js added to resources/reports/. Javascript file meludi_quarter_month_report_generator.js calls new servlet MeludiQuarterMonthReportServlet with command "meludiquartermonthreport" to create JSON data for the statistics, which is used by boxplot.js to create the box plots in HTML5 canvas elements.
  4. New java servlet class/file MeludiQuarterMonthReportServlet.java in src/net/sf/basedb/meludi/servlet/ added. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) supports commands "getSites" and "meludiquartermonthreport". The latter command creates JSON data for the statistics.
File size: 7.9 KB
Line 
1<%@ page
2  pageEncoding="UTF-8"
3  session="false"
4  import="net.sf.basedb.core.User"
5  import="net.sf.basedb.core.DbControl"
6  import="net.sf.basedb.core.SessionControl"
7  import="net.sf.basedb.core.Application"
8  import="net.sf.basedb.clients.web.Base" 
9  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
10%>
11<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
12<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
13<%
14final SessionControl sc = Base.getExistingSessionControl(request, true);
15final String ID = sc.getId();
16final float scale = Base.getScale(sc);
17final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.meludi");
18DbControl dc = null;
19try
20{
21  dc = sc.newDbControl();
22  final User user = User.getById(dc, sc.getLoggedInUserId());
23  %>
24<base:page type="default" >
25<base:head 
26  scripts="~../meludi-2.js,~boxplot.js,~meludi_quarter_month_report_generator.js" 
27  styles="path.css,~../css/meludi-2.css,~../css/report.css">
28  <style>
29  canvas
30  {
31    width: 700px;
32    height: 550px;
33  }
34  .guide
35  {
36    position: absolute;
37    z-index: 99;
38    display: none;
39    background-color: #224488;
40  }
41  </style>
42  </base:head>
43  <base:body>
44    <p:path><p:pathelement 
45      title="MeLuDI" href="<%="../index.jsp?ID="+ID%>" 
46      /><p:pathelement title="Sample processing statistics" 
47      /></p:path>
48     
49    <div id="x-guide" class="guide" style="width: 1px;"></div>
50    <div id="y-guide" class="guide" style="height: 1px;"></div>
51
52    <div class="content">
53    <form name="meludi" id="wizard" class="wizard">
54
55      <div class="step" id="step-1">
56        <div class="step-no">1</div>
57        <div class="step-title">Report parameters</div>
58        <div class="step-content">
59
60          <div class="bg-filled-50" style="padding: 2px;">
61            This wizard is intended for creating box-plot statistics for fixed time intervals<br>
62            of original quantities for DNA and RNA extracts, as well as DNA ΔCt values.<br>
63            If few entries exist for some time intervals, the results must be taken with a<br>
64            grain of salt, as a box plot will only be generated if at least 5 data points<br>
65            exist for a time interval, since otherwise no relevant statistic can be calculated.<br>
66            This may be extra important, if filters are used to reduce the amount of data.<br>
67            <br>
68            The statistics is based on the following DNA and RNA items:<br>
69            <br>
70            1. MeLuDI items only, not extra material.<br>
71            2. Extracts with a case or specimen as parent, i.e. not extract child items.<br>
72            3. Extracts with QIAcube date set.<br>
73            4. Extracts passing optional project focus and/or site filters.<br>
74            <br>
75          </div>
76
77          <table class="step-form" id="report-type-meludiquartermonthreport">           
78          <tr>
79            <td class="prompt">Report period</td>
80            <td valign="top" class="input">
81              From <input type="text" name="fromdate" id="fromdate" 
82                style="width: 8em;" maxlength="8">&nbsp;
83              To <input type="text" name="todate" id="todate" 
84                style="width: 8em;" maxlength="8">
85            </td>
86            <td class="status" id="period.status"></td>
87            <td class="help">
88              <span id="period.message" class="message"></span>
89              [YY]YYMMDD. Define which period the report should cover.
90              Empty fields will include all items.
91            </td>
92          </tr> 
93          <tr>
94            <td class="prompt">View type</td>
95            <td class="input">
96              <select name="viewtype" id="viewtype" style="width: 15em;">
97                <option value="QUARTERMONTH" selected="yes">Quarter + Month</option>
98                <option value="AUTO">Auto</option>
99                <option value="WEEK">Week</option>
100                <option value="MONTH">Month</option>
101                <option value="QUARTER">Quarter</option>
102                <option value="YEAR">Year</option>
103              </select>
104            </td>
105            <td class="status" id="viewtype.status"></td>
106            <td class="help">
107              <span id="viewtype.message" class="message"></span>
108              Auto will adjust the report depending on the size of the period.
109              <ul>
110                <li>Period shorter than 13 months - samples per month</li>
111                <li>Period shorter than 3 years - samples per quarter</li>
112                <li>Period is 3 years or greater - samples per year</li>
113              </ul>
114            </td>
115          </tr>
116          <tr id="projectfocus-filter">
117            <td class="prompt">Project focus filter</td>
118            <td class="input">
119              <select name="projectfocusfilter" id="projectfocusfilter">
120                <option value="none" selected="yes">None</option>
121                <option value="melanoma">Melanoma</option>
122                <option value="lungcancer">Lung cancer</option>
123                <option value="coloncancer">Colon cancer</option>
124                <option value="GIST">GIST (Gastrointestinal stromal tumour)</option>
125                <option value="">unknown</option>
126              </select>
127            </td>
128            <td class="status" id="projectfocusfilter.status"></td>
129            <td class="help">
130              <span id="projectfocusfilter.message" class="message"></span>
131              Select project focus filter for report.
132            </td>
133          </tr>         
134          <tr>
135            <td class="prompt">Chart site</td>
136            <td class="input">
137              <select id="sites" name="sites" style="width: 15em;"></select>
138            </td>
139            <td class="status" id="sites.status"></td>
140            <td class="help">
141              <span id="sites.message" class="message"></span>
142              Select what site to take input data from.
143            </td>
144          </tr>         
145          <tr>
146            <td class="prompt">Chart data</td>
147            <td class="input">
148              <select name="chartvariant">
149                <option value="allcharts" selected="yes">All</option>
150<!--
151                <option value="originalquantitytissue">Original quantity tissue</option>
152                <option value="quantitytissueused">Quantity tissue used for MeLuDI specimens</option>
153                <option value="histologypiecequantity">Histology piece quantity</option>
154                <option value="remainingquantityformeludispecimen">Remaining quantity for MeLuDI specimens</option>
155-->
156                <option value="originalquantitydna">Original quantity DNA for MeLuDI extractions</option>
157                <option value="originalquantityrna">Original quantity RNA for MeLuDI extractions</option>
158                <option value="deltactdna">DNA ΔCt value for MeLuDI extractions</option>
159<!--
160                <option value="dnayield">DNA yield</option>
161                <option value="rnayield">RNA yield</option>
162                <option value="dnayieldcorrected">DNA yield (corrected for only processing half of the lysate volume)</option>
163                <option value="rnayieldcorrected">RNA yield (corrected for only processing half of the lysate volume)</option>
164                <option value="rnaqc">RNA QC</option>
165                <option value="minutestornalater">Min to RNAlater</option>
166-->
167              </select>
168            </td>
169            <td valign="top" class="status" id="chartvariant.status"></td>
170            <td class="help">
171              <span id="chartvariant.message" class="message"></span>
172              Select what data to report.
173            </td>
174          </tr>
175          </table>
176        </div>
177      </div>
178     
179      <div class="step" id="step-2">
180        <div class="step-no">2</div>
181        <div class="step-title">Generated report
182          <span id="printButton" class="link"><img src="../images/print.png">Print version&hellip;</span>
183        </div>
184        <div class="step-content" id="step-2-content">
185          <div id="reportdiv" style="text-align: center;"></div>
186        </div>
187      </div>
188     
189   
190    <div id="wizard-status"></div>
191
192    <table class="navigation" id="navigation">
193    <tr>
194      <td><base:button id="gocancel" title="Cancel" /></td>
195      <td><base:button id="gonext" title="Next" image="<%=home+"/images/gonext.png"%>" /></td>
196      <td><base:button id="gocreate" title="Generate" image="<%=home+"/images/gonext.png"%>" /></td>
197      <td><base:button id="gorestart" title="Restart" image="<%=home+"/images/goback.png"%>" /></td>
198      <td id="gonext-message" class="message"></td>
199    </tr>
200    </table>
201 
202   
203    </form>
204    </div>
205   
206  </base:body>
207  </base:page>
208  <%
209}
210finally
211{
212  if (dc != null) dc.close();
213}
214%>
Note: See TracBrowser for help on using the repository browser.