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

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

Refs #815. The "MeLuDI quarter/month report" in the "Sample processing statistics" wizard updated to allow an extract source filter, with the following choices:
a. None
b. MeLuDI specimen extract
c. Input extract (Pathology DNA/RNA)

  1. JSP file meludi_quarter_month_report_generator.jsp in resources/reports/ updated in step 2 with extract source filter menu with three choices, "None" (default), "MeLuDI specimen extract", and "Input extract (Pathology DNA/RNA)".
  2. Javascript file meludi_quarter_month_report_generator.js in resources/reports/ updated in function submit(event) to include selected extract source filter value in the data sent when calling command "meludiquartermonthreport" in servlet MeludiQuarterMonthReportServlet.
  3. Java servlet class/file MeludiQuarterMonthReportServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. New string constants for extract source choices defined.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "meludiquartermonthreport" to obtain extract source filter string from request parameter (default is no filter).
    c. Private method JSONObject createMeludiQuarterMonthReport(DbControl dc, JSONObject json, Date startDate, Date endDate, String viewType, String chartVariant, String projectFocusFilter, Site site) updated with new argument String extractSourceFilter before String projectFocusFilter. The value of the extract source filter is used when finding the case related to an extract, as only parent items of correct subtype will be processed further.
    d. Private method JSONObject createJsonPlot(String chartVariant, Date startDate, Date endDate, String viewType, String projectFocusFilter, Site site) updated with new argument String extractSourceFilter before String projectFocusFilter.
    e. Private method String fetchChartHeaderTitle(String chartVariant, String viewType, String projectFocusFilter, Site site) updated with new argument String extractSourceFilter before String projectFocusFilter. New private method String fetchExtractSourceFilterName(String extractSourceFilter) is called to obtain an extract source filter name to use in the title, where the former is inserted after the project focus name.
    f. New private method String fetchExtractSourceFilterName(String extractSourceFilter) added. It returns an extract source title name for an extract source filter.
File size: 8.5 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="extractsource-filter">
117            <td class="prompt">Extract source filter</td>
118            <td class="input">
119              <select name="extractsourcefilter" id="extractsourcefilter">
120                <option value="none" selected="yes">None</option>
121                <option value="meludi_specimen_extract">MeLuDI specimen extract</option>
122                <option value="input_extract">Input extract (Pathology DNA/RNA)</option>
123              </select>
124            </td>
125            <td class="status" id="extractsourcefilter.status"></td>
126            <td class="help">
127              <span id="extractsourcefilter.message" class="message"></span>
128              Select extract source filter for report.
129            </td>
130          </tr>         
131          <tr id="projectfocus-filter">
132            <td class="prompt">Project focus filter</td>
133            <td class="input">
134              <select name="projectfocusfilter" id="projectfocusfilter">
135                <option value="none" selected="yes">None</option>
136                <option value="melanoma">Melanoma</option>
137                <option value="lungcancer">Lung cancer</option>
138                <option value="coloncancer">Colon cancer</option>
139                <option value="GIST">GIST (Gastrointestinal stromal tumour)</option>
140                <option value="">unknown</option>
141              </select>
142            </td>
143            <td class="status" id="projectfocusfilter.status"></td>
144            <td class="help">
145              <span id="projectfocusfilter.message" class="message"></span>
146              Select project focus filter for report.
147            </td>
148          </tr>         
149          <tr>
150            <td class="prompt">Chart site</td>
151            <td class="input">
152              <select id="sites" name="sites" style="width: 15em;"></select>
153            </td>
154            <td class="status" id="sites.status"></td>
155            <td class="help">
156              <span id="sites.message" class="message"></span>
157              Select what site to take input data from.
158            </td>
159          </tr>         
160          <tr>
161            <td class="prompt">Chart data</td>
162            <td class="input">
163              <select name="chartvariant">
164                <option value="allcharts" selected="yes">All</option>
165<!--
166                <option value="originalquantitytissue">Original quantity tissue</option>
167                <option value="quantitytissueused">Quantity tissue used for MeLuDI specimens</option>
168                <option value="histologypiecequantity">Histology piece quantity</option>
169                <option value="remainingquantityformeludispecimen">Remaining quantity for MeLuDI specimens</option>
170-->
171                <option value="originalquantitydna">Original quantity DNA for MeLuDI extractions</option>
172                <option value="originalquantityrna">Original quantity RNA for MeLuDI extractions</option>
173                <option value="deltactdna">DNA ΔCt value for MeLuDI extractions</option>
174<!--
175                <option value="dnayield">DNA yield</option>
176                <option value="rnayield">RNA yield</option>
177                <option value="dnayieldcorrected">DNA yield (corrected for only processing half of the lysate volume)</option>
178                <option value="rnayieldcorrected">RNA yield (corrected for only processing half of the lysate volume)</option>
179                <option value="rnaqc">RNA QC</option>
180                <option value="minutestornalater">Min to RNAlater</option>
181-->
182              </select>
183            </td>
184            <td valign="top" class="status" id="chartvariant.status"></td>
185            <td class="help">
186              <span id="chartvariant.message" class="message"></span>
187              Select what data to report.
188            </td>
189          </tr>
190          </table>
191        </div>
192      </div>
193     
194      <div class="step" id="step-2">
195        <div class="step-no">2</div>
196        <div class="step-title">Generated report
197          <span id="printButton" class="link"><img src="../images/print.png">Print version&hellip;</span>
198        </div>
199        <div class="step-content" id="step-2-content">
200          <div id="reportdiv" style="text-align: center;"></div>
201        </div>
202      </div>
203     
204   
205    <div id="wizard-status"></div>
206
207    <table class="navigation" id="navigation">
208    <tr>
209      <td><base:button id="gocancel" title="Cancel" /></td>
210      <td><base:button id="gonext" title="Next" image="<%=home+"/images/gonext.png"%>" /></td>
211      <td><base:button id="gocreate" title="Generate" image="<%=home+"/images/gonext.png"%>" /></td>
212      <td><base:button id="gorestart" title="Restart" image="<%=home+"/images/goback.png"%>" /></td>
213      <td id="gonext-message" class="message"></td>
214    </tr>
215    </table>
216 
217   
218    </form>
219    </div>
220   
221  </base:body>
222  </base:page>
223  <%
224}
225finally
226{
227  if (dc != null) dc.close();
228}
229%>
Note: See TracBrowser for help on using the repository browser.