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 | <% |
---|
26 | final SessionControl sc = Base.getExistingSessionControl(request, true); |
---|
27 | final String ID = sc.getId(); |
---|
28 | final float scale = Base.getScale(sc); |
---|
29 | final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.reggie"); |
---|
30 | DbControl dc = null; |
---|
31 | try |
---|
32 | { |
---|
33 | dc = sc.newDbControl(); |
---|
34 | final User user = User.getById(dc, sc.getLoggedInUserId()); |
---|
35 | boolean isAdmin = false; |
---|
36 | boolean isPatientCurator = false; |
---|
37 | boolean hasCreateSamplePermission = sc.hasPermission(Permission.CREATE, Item.SAMPLE); |
---|
38 | boolean hasCreateExtractPermission = sc.hasPermission(Permission.CREATE, Item.EXTRACT); |
---|
39 | boolean hasCreateBioPlatePermission = sc.hasPermission(Permission.CREATE, Item.BIOPLATE); |
---|
40 | try |
---|
41 | { |
---|
42 | Role admin = Role.getById(dc, SystemItems.getId(Role.ADMINISTRATOR)); |
---|
43 | isAdmin = sc.isMemberOf(admin); |
---|
44 | } |
---|
45 | catch (RuntimeException ex) |
---|
46 | {} |
---|
47 | try |
---|
48 | { |
---|
49 | ItemQuery<Group> query = Group.getQuery(); |
---|
50 | query.restrict(Restrictions.eq(Hql.property("name"), Expressions.string("PatientCurator"))); |
---|
51 | List<Group> result = query.list(dc); |
---|
52 | if (result.size() == 1) |
---|
53 | { |
---|
54 | isPatientCurator = sc.isMemberOf(result.get(0)); |
---|
55 | } |
---|
56 | } |
---|
57 | catch (RuntimeException ex) |
---|
58 | {} |
---|
59 | %> |
---|
60 | <base:page type="default" > |
---|
61 | <base:head styles="path.css"> |
---|
62 | <link rel="stylesheet" type="text/css" href="css/reggie.css"> |
---|
63 | <% |
---|
64 | if (Application.getMajorVersion() == 3 && Application.getMinorVersion() == 0) |
---|
65 | { |
---|
66 | %> |
---|
67 | <link rel="stylesheet" type="text/css" href="css/base30.css"> |
---|
68 | <% |
---|
69 | } |
---|
70 | %> |
---|
71 | <style> |
---|
72 | dl |
---|
73 | { |
---|
74 | margin-top: 0px; |
---|
75 | padding: 3px; |
---|
76 | } |
---|
77 | dd |
---|
78 | { |
---|
79 | margin-left: 0px; |
---|
80 | margin-bottom: 10px; |
---|
81 | } |
---|
82 | img |
---|
83 | { |
---|
84 | vertical-align: text-bottom; |
---|
85 | } |
---|
86 | h3 |
---|
87 | { |
---|
88 | color: #333377; |
---|
89 | background: #E8E8E8; |
---|
90 | font-weight: bold; |
---|
91 | margin-bottom: 0em; |
---|
92 | padding: 1px 4px 1px 4px; |
---|
93 | border: 1px solid #A0A0A0; |
---|
94 | font-size: 1em; |
---|
95 | } |
---|
96 | </style> |
---|
97 | </base:head> |
---|
98 | <base:body> |
---|
99 | |
---|
100 | <p:path><p:pathelement title="Reggie" /></p:path> |
---|
101 | |
---|
102 | <div class="content"> |
---|
103 | <div class="absolutefull" style="width: 50%;"> |
---|
104 | <div class="absolutefull" style="left: 1em; right: 0.5em; "> |
---|
105 | <h3>Reggie wizards</h3> |
---|
106 | <dl class="leftborder rightborder bottomborder"> |
---|
107 | <% |
---|
108 | if (isAdmin) |
---|
109 | { |
---|
110 | %> |
---|
111 | <dt> |
---|
112 | <base:icon image="<%=home + "/images/install.png" %>" /> |
---|
113 | <a href="install.jsp?ID=<%=ID%>">Installation wizard</a> |
---|
114 | </dt> |
---|
115 | <dd> |
---|
116 | <ul> |
---|
117 | <li>Check that all annotation types and other items used by Reggie exists in BASE. |
---|
118 | <li>Create missing items. |
---|
119 | </ul> |
---|
120 | </dd> |
---|
121 | <% |
---|
122 | } |
---|
123 | if (isPatientCurator || isAdmin) |
---|
124 | { |
---|
125 | %> |
---|
126 | <dt class="topborder" style="padding-top: 0.5em;"> |
---|
127 | <base:icon image="<%=home + "/images/personal.png" %>"/> |
---|
128 | <a href="persinfo.jsp?ID=<%=ID%>">Personal information registration wizard</a> |
---|
129 | </dt> |
---|
130 | <dd> |
---|
131 | <ul> |
---|
132 | <li>Register new cases and patients. |
---|
133 | <li>Update existing cases and specimen tubes. |
---|
134 | </ul> |
---|
135 | </dd> |
---|
136 | <% |
---|
137 | } |
---|
138 | if (isPatientCurator || isAdmin) |
---|
139 | { |
---|
140 | %> |
---|
141 | <dt> |
---|
142 | <base:icon image="<%=home + "/images/blood.png" %>"/> |
---|
143 | <a href="bloodform.jsp?ID=<%=ID%>">Blood referral form registration wizard</a> |
---|
144 | </dt> |
---|
145 | <dd> |
---|
146 | <ul> |
---|
147 | <li>Register new blood referral forms and patients. |
---|
148 | <li>Update information for existing blood referral forms. |
---|
149 | </ul> |
---|
150 | </dd> |
---|
151 | <% |
---|
152 | } |
---|
153 | if (isPatientCurator || isAdmin) |
---|
154 | { |
---|
155 | %> |
---|
156 | <dt> |
---|
157 | <base:icon image="<%=home+"/images/consent.png" %>"/> |
---|
158 | <a href="consentform.jsp?ID=<%=ID%>">Consent form registration wizard</a> |
---|
159 | </dt> |
---|
160 | <dd> |
---|
161 | <ul> |
---|
162 | <li>Register consent forms. |
---|
163 | </ul> |
---|
164 | </dd> |
---|
165 | <% |
---|
166 | } |
---|
167 | if (isPatientCurator || isAdmin) |
---|
168 | { |
---|
169 | %> |
---|
170 | <dt> |
---|
171 | <base:icon image="<%=home+"/images/pdffile.png" %>" /> |
---|
172 | <a href="refform.jsp?ID=<%=ID%>">Referral form registration wizard</a> |
---|
173 | </dt> |
---|
174 | <dd> |
---|
175 | <ul> |
---|
176 | <li>Link scanned referral forms to cases. |
---|
177 | </ul> |
---|
178 | </dd> |
---|
179 | <% |
---|
180 | } |
---|
181 | if (hasCreateSamplePermission) |
---|
182 | { |
---|
183 | %> |
---|
184 | <dt class="topborder" style="padding-top: 0.5em;"> |
---|
185 | <base:icon image="<%=home+"/images/specimen.png" %>" /> |
---|
186 | <a href="specimentube.jsp?ID=<%=ID%>">Specimen tube registration wizard</a> |
---|
187 | </dt> |
---|
188 | <dd> |
---|
189 | <ul> |
---|
190 | <li>Register new specimen tubes. |
---|
191 | <li>Update existing specimen tubes. |
---|
192 | </ul> |
---|
193 | </dd> |
---|
194 | <% |
---|
195 | } |
---|
196 | if (hasCreateSamplePermission && hasCreateExtractPermission) |
---|
197 | { |
---|
198 | %> |
---|
199 | <dt> |
---|
200 | <base:icon image="<%=home+"/images/partition.png" %>" /> |
---|
201 | <a href="partitionform.jsp?ID=<%=ID%>">Partition registration wizard</a> |
---|
202 | </dt> |
---|
203 | <dd> |
---|
204 | <ul> |
---|
205 | <li>Register new partitions of existing specimens. |
---|
206 | </ul> |
---|
207 | </dd> |
---|
208 | <% |
---|
209 | } |
---|
210 | if (hasCreateSamplePermission && hasCreateBioPlatePermission) |
---|
211 | { |
---|
212 | %> |
---|
213 | <dt> |
---|
214 | <base:icon image="<%=home+"/images/microscope.png" %>" /> |
---|
215 | Histology wizards |
---|
216 | </dt> |
---|
217 | <dd> |
---|
218 | <ul> |
---|
219 | <li><a href="histology_move.jsp?ID=<%=ID%>">Move Histology items to paraffin blocks</a> |
---|
220 | <li><a href="histology_protocol.jsp?ID=<%=ID%>">Create/print lab tracking protocol for FFPE/HE</a> |
---|
221 | <li><a href="histology_glass.jsp?ID=<%=ID%>">Register histology HE glass information</a> |
---|
222 | </ul> |
---|
223 | </dd> |
---|
224 | <% |
---|
225 | } |
---|
226 | if (hasCreateExtractPermission) |
---|
227 | { |
---|
228 | %> |
---|
229 | <dt> |
---|
230 | <base:icon image="<%=home+"/images/rnaqc.png" %>" /> |
---|
231 | RNA quality control wizards |
---|
232 | </dt> |
---|
233 | <dd> |
---|
234 | <ul> |
---|
235 | <li><a href="rnaqc_aliquot.jsp?ID=<%=ID%>">Create aliquots on Bioanalyzer/Caliper plates</a> |
---|
236 | <li><a href="rnaqc_plate_export.jsp?ID=<%=ID%>">Export Caliper sample names and run parameters</a> |
---|
237 | <li><a href="rnaqc_plate_import.jsp?ID=<%=ID%>">Import RQS scores from Caliper well table file</a> |
---|
238 | </ul> |
---|
239 | </dd> |
---|
240 | <% |
---|
241 | } |
---|
242 | %> |
---|
243 | </dl> |
---|
244 | </div> |
---|
245 | </div> |
---|
246 | |
---|
247 | <div class="absolutefull" style="width: 50%; left: auto;"> |
---|
248 | <div class="absolutefull" style="left: 0.5em; right: 1em;"> |
---|
249 | <h3>Reggie reports</h3> |
---|
250 | <dl class="leftborder rightborder bottomborder"> |
---|
251 | <dt> |
---|
252 | <base:icon image="<%=home+"/images/report.png" %>" /> |
---|
253 | <a href="samplereportgenerator.jsp?ID=<%=ID%>">Report generator</a> |
---|
254 | </dt> |
---|
255 | <dd> |
---|
256 | <ul> |
---|
257 | <li>Sample count report</li> |
---|
258 | </ul> |
---|
259 | </dd> |
---|
260 | </dl> |
---|
261 | |
---|
262 | </div> |
---|
263 | </div> |
---|
264 | |
---|
265 | </div> |
---|
266 | |
---|
267 | </base:body> |
---|
268 | </base:page> |
---|
269 | <% |
---|
270 | } |
---|
271 | finally |
---|
272 | { |
---|
273 | if (dc != null) dc.close(); |
---|
274 | } |
---|
275 | %> |
---|