source: extensions/net.sf.basedb.reggie/trunk/resources/allprep_protocol2.jsp @ 1662

Last change on this file since 1662 was 1662, checked in by Nicklas Nordborg, 8 years ago

References #388: Lysate/Qiacube/NanoDrop? lab tracking protocol

Include the ApWeight? (from the partion wizard) in the lab protocol

File size: 4.3 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.core.Extract"
9  import="net.sf.basedb.core.BioMaterial"
10  import="net.sf.basedb.core.BioMaterialEventSource"
11  import="net.sf.basedb.core.BioPlate"
12  import="net.sf.basedb.core.BioWell"
13  import="net.sf.basedb.core.PermissionDeniedException"
14  import="net.sf.basedb.util.Values"
15  import="net.sf.basedb.util.extensions.Extension"
16  import="net.sf.basedb.clients.web.Base" 
17  import="net.sf.basedb.clients.web.util.HTML"
18  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
19  import="java.util.List"
20  import="java.util.ArrayList"
21%>
22<%
23final SessionControl sc = Base.getExistingSessionControl(request, true);
24final String ID = sc.getId();
25final float scale = Base.getScale(sc);
26final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.reggie");
27final int BLOCKS_PER_PAGE = 3;
28DbControl dc = null;
29try
30{
31  dc = sc.newDbControl();
32  final Extension reggie = ExtensionsControl.get(dc).getExtension("net.sf.basedb.reggie");
33  final User user = User.getById(dc, sc.getLoggedInUserId());
34  List<Extract> lysates = new ArrayList<Extract>();
35  for (String id : request.getParameterValues("lysates"))
36  {
37    lysates.add(Extract.getById(dc, Values.getInt(id)));
38  }
39%>
40<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
41<html>
42<head>
43  <title>Lab Tracking Protocol for Allprep isolation</title>
44  <link rel="stylesheet" type="text/css" href="<%=home %>/css/printable.css">
45  <style>
46 
47  table.protocolheader
48  {
49    width: 100%;
50  }
51
52  table.protocolheader > tbody > tr
53  {
54    height: 2em;
55  }
56
57  table.protocolheader > tbody > tr > th
58  {
59    width: 50%;
60    text-align: left;
61    font-size: 1.25em;
62  }
63 
64  table.samplelist
65  {
66    width: 100%;
67    border-collapse: collapse;
68    border: 1px solid #000000;
69  }
70 
71  table.samplelist > tbody > tr
72  {
73    height: 1.7cm;
74  }
75 
76  table.samplelist > tbody > tr > th
77  {
78    border: 1px solid #000000;
79    font-size: 1.25em;
80  }
81 
82  table.samplelist > tbody > tr > td
83  {
84    border: 1px solid #000000;
85    vertical-align: middle;
86    font-size: 1.25em;
87    padding: 0.5em;
88  }
89 
90  .name
91  {
92    font-weight: bold;
93    width: 20%;
94  }
95  .box
96  {
97    width: 20%;
98  }
99  .qiacube
100  {
101    width: 15%;
102    text-align: center;
103  }
104  table.samplelist > tbody > tr > td.remark
105  {
106    width: 45%;
107    font-size: 0.85em;
108    vertical-align: top;
109  }
110 
111  </style>
112</head>
113<body>
114  <div class="noprint fullwidth" style="border-bottom: 1px dashed #A0A0A0; padding-left: 1em; padding-bottom: 1em;">
115    <a href="javascript:window.print()"><img src="images/print.png" style="padding-right: 4px;">Print</a>
116  </div>
117 
118  <h1>Lab Tracking Protocol for Allprep isolation v.1.2</h1>
119
120  <table style="width: 100%; border: 0px;" class="protocolheader">
121  <tr>
122    <td colspan="2">Reggie <%=reggie.getAbout().getVersion() %>; Page 1 of 1</td>
123  </tr>
124  <tr>
125    <th style="width: 50%;">Date for lysis:</th>
126    <th style="width: 50%;">Operator:</th>
127  </tr>
128  <tr>
129    <th style="width: 50%;">Date for isolation:</th>
130    <th style="width: 50%;">Operator:</th>
131  </tr>
132  </table>
133
134  <table style="width: 100%;" class="samplelist">
135  <tr>
136    <th class="name">Sample</th>
137    <th class="box">Storage box</th>
138    <th class="qiacube">Qiacube position</th>
139    <th class="remark">Remark</th>
140  </tr>
141  <%
142  int index = 1;
143  for (Extract lysate : lysates)
144  {
145    BioMaterial specimen = lysate.getParent();
146    Float usedQuantity = null;
147    if (specimen != null) 
148    {
149      BioMaterialEventSource source = lysate.getCreationEvent().getEventSource(specimen);
150      usedQuantity = source.getUsedQuantity();
151    }
152    BioWell well = lysate.getBioWell();
153    BioPlate plate = well.getPlate();
154    %>
155    <tr>
156      <td class="name"><%=lysate.getName() %></td>
157      <td class="box"><%=plate.getName() %> <%=well.getCoordinate() %></td>
158      <td class="qiacube"><%=index %></td>
159      <td class="remark">
160        <%
161        if (usedQuantity != null)
162        {
163          %>
164          ApWeight: <%=Values.formatNumber(usedQuantity / 1000, 0, "mg") %>
165          <%
166        }
167        %>
168      </td>
169    </tr>
170    <%
171    ++index;
172  }
173  %>
174  </table>
175 
176</body>
177</html>
178<%
179}
180finally
181{
182  if (dc != null) dc.close();
183}
184%>
Note: See TracBrowser for help on using the repository browser.