source: extensions/net.sf.basedb.reggie/branches/ticket-422/resources/index.jsp @ 1758

Last change on this file since 1758 was 1758, checked in by Nicklas Nordborg, 10 years ago

References #436: Import mRNA quality control results

Implemented a registration that incldues a PDF file, creation date, protocol, operator and comments (for the plate). Need to add a way to add comments per biomaterial if that is needed.

The registration also prepares for the cDNA step by creating the cDNA child plate and biomaterial (without creation date).

File size: 8.4 KB
Line 
1<%@ page
2  pageEncoding="UTF-8"
3  session="false"
4  import="net.sf.basedb.core.Application"
5  import="net.sf.basedb.core.User"
6  import="net.sf.basedb.core.Role"
7  import="net.sf.basedb.core.Group"
8  import="net.sf.basedb.core.DbControl"
9  import="net.sf.basedb.core.Item"
10  import="net.sf.basedb.core.Permission"
11  import="net.sf.basedb.core.SessionControl"
12  import="net.sf.basedb.core.SystemItems"
13  import="net.sf.basedb.core.ItemQuery"
14  import="net.sf.basedb.core.query.Expressions"
15  import="net.sf.basedb.core.query.Hql"
16  import="net.sf.basedb.core.query.Restrictions"
17  import="net.sf.basedb.clients.web.Base"
18  import="net.sf.basedb.clients.web.util.HTML"
19  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
20  import="net.sf.basedb.util.Values"
21  import="java.util.List"
22%>
23<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
24<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
25<%
26final SessionControl sc = Base.getExistingSessionControl(request, true);
27final String ID = sc.getId();
28final float scale = Base.getScale(sc);
29final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.reggie");
30DbControl dc = null;
31try
32{
33  dc = sc.newDbControl();
34  final User user = User.getById(dc, sc.getLoggedInUserId());
35 
36  boolean isAdmin = user.getId() == SystemItems.getId(User.ROOT);
37  boolean isPatientCurator = false;
38  boolean hasCreateSamplePermission = sc.hasPermission(Permission.CREATE, Item.SAMPLE);
39  boolean hasCreateExtractPermission = sc.hasPermission(Permission.CREATE, Item.EXTRACT);
40  boolean hasCreateBioPlatePermission = sc.hasPermission(Permission.CREATE, Item.BIOPLATE);
41  if (!isAdmin)
42  {
43    try
44    {
45      Role admin = Role.getById(dc, SystemItems.getId(Role.ADMINISTRATOR));
46      isAdmin = sc.isMemberOf(admin);
47    }
48    catch (RuntimeException ex)
49    {}
50  }
51  try
52  {
53    ItemQuery<Group> query = Group.getQuery();
54    query.restrict(Restrictions.eq(Hql.property("name"), Expressions.string("PatientCurator")));
55    List<Group> result = query.list(dc);
56    if (result.size() == 1)
57    {
58      isPatientCurator = sc.isMemberOf(result.get(0));
59    }
60  }
61  catch (RuntimeException ex)
62  {}
63%>
64<base:page type="default" >
65<base:head styles="path.css">
66  <link rel="stylesheet" type="text/css" href="css/reggie.css">
67<style>
68dl
69{
70  margin-top: 0px;
71  padding: 3px;
72}
73dt
74{
75  margin-top: 0.5em;
76  margin-left: 0.5em;
77}
78dd
79{
80  margin-left: 0.5em;
81  margin-bottom: 0.5em;
82}
83ul
84{
85  margin-top: 0px;
86  margin-bottom: 0px;
87}
88img
89{
90  vertical-align: text-bottom;
91}
92h3
93{
94  color: #333377;
95  background: #E8E8E8;
96  font-weight: bold;
97  margin-bottom: 0em;
98  padding: 1px 4px 1px 4px;
99  border: 1px solid #A0A0A0;
100  font-size: 1em;
101}
102</style>
103</base:head>
104<base:body>
105
106  <p:path><p:pathelement title="Reggie" /></p:path>
107
108  <div class="content">
109    <div class="absolutefull" style="width: 50%;">
110      <div class="absolutefull" style="left: 1em; right: 0.5em; ">
111       
112        <%
113        if (isAdmin)
114        {
115          %>
116          <h3>Server administrator wizards</h3>
117          <dl class="leftborder rightborder bottomborder">
118          <dt>
119            <base:icon image="<%=home + "/images/install.png" %>" />
120            <a href="install.jsp?ID=<%=ID%>">Installation wizard</a>
121          </dt>
122          <dd>
123            <ul>
124            <li>Check that annotation types and other items used by Reggie exists in BASE.
125            <li>Create missing items.
126            </ul>
127          </dd>
128          </dl>
129          <%
130        }
131        if (isPatientCurator || isAdmin)
132        {
133          %>
134          <h3>Personal information wizards</h3>
135          <dl class="leftborder rightborder bottomborder">
136          <dt>
137            <base:icon image="<%=home + "/images/personal.png" %>"/>
138            <a href="persinfo.jsp?ID=<%=ID%>">Pathology referral form registration</a>
139          </dt>
140          <dd>
141            <ul>
142            <li>Register new cases and patients.
143            <li>Update existing cases and specimen tubes.
144            </ul>
145          </dd>
146         
147          <dt>
148            <base:icon image="<%=home + "/images/blood.png" %>"/>
149            <a href="bloodform.jsp?ID=<%=ID%>">Blood referral form registration</a>
150          </dt>
151          <dd>
152            <ul>
153            <li>Register new blood referral forms and patients.
154            <li>Update information for existing blood referral forms.
155            </ul>
156          </dd>
157         
158          <dt>
159            <base:icon image="<%=home+"/images/consent.png" %>"/>
160            <a href="consentform.jsp?ID=<%=ID%>">Consent form registration</a>
161          </dt>
162          <dd>
163            <ul>
164            <li>Register consent forms.
165            </ul>
166          </dd>
167         
168          <dt>
169            <base:icon image="<%=home+"/images/export_import.png" %>" />
170            Export/import information to/from external registers.
171          </dt>
172          <dd>
173            <ul>
174            <li><a href="export_monthly_oplist.jsp?ID=<%=ID%>">Export monthly operation list</a>
175            </ul>
176          </dd>
177          </dl>
178          <%
179        }
180        %>
181       
182        <h3>Laboratory wizards</h3>
183        <dl class="leftborder rightborder bottomborder">
184        <%
185        if (hasCreateSamplePermission)
186        {
187          %>
188          <dt>
189            <base:icon image="<%=home+"/images/specimen.png" %>" />
190            <a href="specimentube.jsp?ID=<%=ID%>">Specimen tube registration</a>
191          </dt>
192          <dd>
193            <ul>
194            <li>Register new specimen tubes.
195            <li>Update existing specimen tubes.
196            </ul>
197          </dd>
198          <%
199        }
200        if (hasCreateSamplePermission && hasCreateExtractPermission)
201        {
202          %>
203          <dt>
204            <base:icon image="<%=home+"/images/partition.png" %>" />
205            <a href="partitionform.jsp?ID=<%=ID%>">Partition wizard</a>
206          </dt>
207          <dd>
208            <ul>
209            <li>Register new partitions of existing specimens.
210            </ul>
211          </dd>
212          <%
213        }
214        if (hasCreateSamplePermission && hasCreateBioPlatePermission)
215        {
216          %>
217          <dt>
218            <base:icon image="<%=home+"/images/microscope.png" %>" />
219            Histology wizards
220          </dt>
221          <dd>
222            <ul>
223            <li><a href="histology_protocol.jsp?ID=<%=ID%>">Lab tracking protocol for FFPE/HE</a>
224            <li><a href="histology_block.jsp?ID=<%=ID%>">Register paraffin blocks</a>
225            <li><a href="histology_glass.jsp?ID=<%=ID%>">Register histology HE glass information</a>
226            </ul>
227          </dd>
228          <%
229        }
230        if (hasCreateExtractPermission)
231        {
232          %>
233          <dt>
234            <base:icon image="<%=home+"/images/extraction.png" %>" />
235            DNA/RNA extraction wizards
236          </dt>
237          <dd>
238            <ul>
239            <li><a href="allprep_protocol.jsp?ID=<%=ID%>">Lab tracking protocol for Allprep isolation</a>
240            <li><a href="extraction_registration.jsp?ID=<%=ID%>">DNA/RNA/FlowThrough registration</a>
241            </ul>
242          </dd>
243          <dt>
244            <base:icon image="<%=home+"/images/rnaqc.png" %>" />
245            RNA quality control wizards
246          </dt>
247          <dd>
248            <ul>
249            <li><a href="rnaqc_aliquot.jsp?ID=<%=ID%>">Create aliquots on Bioanalyzer/Caliper plates</a>
250            <li><a href="rnaqc_plate_export.jsp?ID=<%=ID%>">Export Caliper sample names and run parameters</a>
251            <li><a href="rnaqc_plate_import.jsp?ID=<%=ID%>">Import RQS scores from Caliper well table file</a>
252            </ul>
253          </dd>
254          <%
255        }
256        %>       
257        </dl>
258      </div>
259    </div>
260   
261    <div class="absolutefull" style="width: 50%; left: auto;">
262      <div class="absolutefull" style="left: 0.5em; right: 1em;">
263        <h3>Reggie reports</h3>
264        <dl class="leftborder rightborder bottomborder">
265          <dt>
266            <base:icon image="<%=home+"/images/report.png" %>" />
267            <a href="samplereportgenerator.jsp?ID=<%=ID%>">Report generator</a>
268          </dt>       
269          <dd>       
270            <ul>
271            <li>Sample count report</li> 
272            <li>Consent count report</li> 
273            <li>Patient count report</li> 
274            </ul>
275          </dd>
276        </dl>
277     
278     
279        <h3>Library preparation wizards</h3>
280        <dl class="leftborder rightborder bottomborder">
281        <%
282        if (hasCreateExtractPermission && hasCreateBioPlatePermission)
283        {
284          %>
285          <dt>
286            <base:icon image="<%=home+"/images/pipette.png" %>" />
287            RNA to cDNA wizards
288          </dt>
289          <dd>
290            <ul>
291            <li><a href="libprep/select_rna.jsp?ID=<%=ID%>">Create new mRNA plate</a>
292            <li><a href="libprep/mrna_protocol.jsp?ID=<%=ID%>">Lab tracking protocol for mRNA and cDNA preparation</a>
293            <li><a href="?ID=<%=ID%>">Export files for mRNA quality control</a>
294            <li><a href="libprep/mrna_registration.jsp?ID=<%=ID%>">Import mRNA quality control results</a>
295            <li><a href="?ID=<%=ID%>">cDNA registration</a>
296            </ul>
297          </dd>
298          <%
299        }
300        %>
301        </dl>
302     
303      </div>
304    </div>
305
306  </div>
307 
308</base:body>
309</base:page>
310<%
311}
312finally
313{
314  if (dc != null) dc.close();
315}
316%>
Note: See TracBrowser for help on using the repository browser.