source: extensions/net.sf.basedb.reggie/branches/2.15-stable/resources/index.jsp @ 2322

Last change on this file since 2322 was 2322, checked in by Nicklas Nordborg, 9 years ago

Fixes #590: Counting number of items on the index page block interactions

File size: 30.6 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  if (!isAdmin)
39  {
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  }
48  try
49  {
50    ItemQuery<Group> query = Group.getQuery();
51    query.restrict(Restrictions.eq(Hql.property("name"), Expressions.string("PatientCurator")));
52    List<Group> result = query.list(dc);
53    if (result.size() == 1)
54    {
55      isPatientCurator = sc.isMemberOf(result.get(0));
56    }
57  }
58  catch (RuntimeException ex)
59  {}
60%>
61<base:page type="default" >
62<base:head styles="path.css" scripts="ajax.js">
63  <script language="JavaScript" src="reggie.js" type="text/javascript" charset="UTF-8"></script>
64  <link rel="stylesheet" type="text/css" href="css/reggie.css">
65  <script language="JavaScript">
66 
67  var debug = false;
68  var myPermissions = {};
69 
70  function init()
71  {
72    // Get permission information
73    var url = 'Install.servlet?ID=<%=ID%>&cmd=GetPermissions';
74    var request = Ajax.getXmlHttpRequest();
75    request.open("GET", url, false);
76    Ajax.setReadyStateHandler(request, onPermissions, onPermissions);
77    request.send(null);
78  }
79 
80  // Callback when permission information is ready
81  function onPermissions(request)
82  {
83    if (debug) Main.debug(Main.encodeTags(request.responseText));
84    var response;
85    var error = false;
86    try
87    {
88      response = JSON.parse(request.responseText);
89      if (response.status != 'ok')
90      {
91        error = response.message || response.stacktrace || 'Unexpected error';
92      }
93    }
94    catch (ex)
95    {
96      error = ex;
97    }
98   
99    if (error)
100    {
101      alert(error);
102      return;
103    }
104   
105    myPermissions = response.permissions;
106    var isAdmin = myPermissions['Administrator'] == 1;
107   
108    // Enable links based on the permission
109    var wizards = document.getElementsByClassName('require-permission');
110    // NOTE! Loop backwards since changing the classname
111    // of an element so that 'require-permission' no longer is included
112    // removes the element from the 'wizards' list
113    for (var wizardNo = wizards.length-1; wizardNo >= 0; wizardNo--)
114    {
115      var wizard = wizards[wizardNo];
116      if (wizard.className.indexOf('not-implemented') == -1)
117      {
118        var role = wizard.getAttribute('data-role');
119        if (myPermissions[role] == 1 || isAdmin)
120        {
121          wizard.className = 'link';
122          wizard.addEventListener('click', goWizard);
123        }
124        else
125        {
126          wizard.title = 'You do not have permission to user this wizard';
127        }
128      }
129    }
130   
131    // Start couting queued items
132    startCounting('specimen');
133  }
134 
135  function caseSummary()
136  {
137    var frm = document.forms['reggie'];
138   
139    var caseName = frm.caseName.value;
140    if (!caseName)
141    {
142      alert('Please enter a 7-digit case id');
143      return;
144    }
145    location.href = 'reports/case_summary.jsp?ID=<%=ID%>&caseName='+encodeURIComponent(caseName);
146  }
147 
148  var currentCount;
149  function startCounting(what)
150  {
151    var url;
152    currentCount = what;
153    if (what == 'specimen')
154    {
155      url = 'PartitionRegistration.servlet?ID=<%=ID%>&cmd=CountSpecimenTubes';
156    }
157    else if (what == 'histology-lists')
158    {
159      url = 'Histology.servlet?ID=<%=ID%>&cmd=CountHistologyWorkLists';
160    }
161    else if (what == 'paraffin-blocks')
162    {
163      url = 'Histology.servlet?ID=<%=ID%>&cmd=CountParaffinBlocks';
164    }
165    else if (what == 'paraffin-blocks-without-heglass')
166    {
167      url = 'Histology.servlet?ID=<%=ID%>&cmd=CountParaffinBlocksWithoutHeGlass';
168    }
169    else if (what == 'unscored-heglass')
170    {
171      url = 'Histology.servlet?ID=<%=ID%>&cmd=CountUnscoredHeGlass';
172    }
173    else if (what == 'lysate')
174    {
175      url = 'Extraction.servlet?ID=<%=ID%>&cmd=CountUnprocessedLysates';
176    }
177    else if (what == 'rnaqc')
178    {
179      url = 'RnaQc.servlet?ID=<%=ID%>&cmd=CountRnaExtractsWithoutQc';
180    }
181    else if (what == 'caliper-plates')
182    {
183      url = 'RnaQc.servlet?ID=<%=ID%>&cmd=CountActiveRnaQcBioPlates';
184    }
185    else if (what == 'rna-without-mrna')
186    {
187      url = 'MRna.servlet?ID=<%=ID%>&cmd=CountRnaWithoutMRna';
188    }
189    else if (what == 'mrna-plates')
190    {
191      url = 'MRna.servlet?ID=<%=ID%>&cmd=CountUnprocessedPlates&plateType=MRNA';
192    }
193    else if (what == 'cdna-plates')
194    {
195      url = 'MRna.servlet?ID=<%=ID%>&cmd=CountUnprocessedPlates&plateType=CDNA';
196    }
197    else if (what == 'cdna-plates-for-barcoding')
198    {
199      url = 'LibPrep.servlet?ID=<%=ID%>&cmd=CountCDNAPlatesForBarcoding';
200    }
201    else if (what == 'lib-plates')
202    {
203      url = 'LibPrep.servlet?ID=<%=ID%>&cmd=CountLibPlatesForLibPrep';
204    }
205    else if (what == 'lib-plates-for-pooling')
206    {
207      url = 'Pool.servlet?ID=<%=ID%>&cmd=CountLibraryPlatesForPooling';
208    }
209    else if (what == 'unregistered-pools')
210    {
211      url = 'Pool.servlet?ID=<%=ID%>&cmd=CountUnprocessedPools';
212    }
213    else if (what == 'unused-pools')
214    {
215      url = 'FlowCell.servlet?ID=<%=ID%>&cmd=CountUnusedPools';
216    }
217    else if (what == 'unregistered-flow-cells')
218    {
219      url = 'FlowCell.servlet?ID=<%=ID%>&cmd=CountUnprocessedFlowCells';
220    }
221    else if (what == 'clustered-flow-cells')
222    {
223      url = 'FlowCell.servlet?ID=<%=ID%>&cmd=CountClusteredFlowCells';
224    }
225    else if (what == 'active-sequencing-runs')
226    {
227      url = 'SequencingRun.servlet?ID=<%=ID%>&cmd=CountActiveSequencingRuns';
228    }
229    else if (what == 'unconfirmed-sequencing-runs')
230    {
231      url = 'SequencingRun.servlet?ID=<%=ID%>&cmd=CountUncomfirmedSequencingRuns';
232    }
233   
234    if (url)
235    {
236      var request = Ajax.getXmlHttpRequest();
237      request.open("GET", url, true);
238      Ajax.setReadyStateHandler(request, onCounted, onCounted);
239      request.send(null);
240    }
241  }
242 
243  function onCounted(request)
244  {
245    if (debug) Main.debug(currentCount +': ' + Main.encodeTags(request.responseText));
246    var response;
247    var error = false;
248    try
249    {
250      response = JSON.parse(request.responseText);
251      if (response.status != 'ok')
252      {
253        error = response.message || response.stacktrace || 'Unexpected error';
254      }
255    }
256    catch (ex)
257    {
258      error = ex;
259    }
260   
261    if (currentCount == 'specimen')
262    {
263      var msg = error || 'Number of unpartitioned specimen';
264      var count = error ? -1 : response.count;
265      setCount('count.specimen', count, 'specimens', msg);
266      startCounting('histology-lists');
267    }
268    else if (currentCount == 'histology-lists')
269    {
270      var msg = error || 'Number of active histology work lists';
271      var count = error ? -1 : response.count;
272      setCount('count.histology-lists', count, 'work lists', msg);
273      startCounting('paraffin-blocks');
274    }
275    else if (currentCount == 'paraffin-blocks')
276    {
277      var msg = error || 'Number of paraffin blocks waiting for registration';
278      var count = error ? -1 : response.count;
279      setCount('count.paraffin-blocks', count, 'paraffin blocks', msg);
280      startCounting('paraffin-blocks-without-heglass');
281    }
282    else if (currentCount == 'paraffin-blocks-without-heglass')
283    {
284      var msg = error || 'Number of paraffin blocks without HE glass';
285      var count = error ? -1 : response.count;
286      setCount('count.paraffin-blocks-without-heglass', count, 'paraffin blocks', msg);
287      startCounting('unscored-heglass');
288    }
289    else if (currentCount == 'unscored-heglass')
290    {
291      var msg = error || 'Number of unscored HE glass';
292      var count = error ? -1 : response.count;
293      setCount('count.unscored-heglass', count, 'HE glass', msg);
294      startCounting('lysate');
295    }
296    else if (currentCount == 'lysate')
297    {
298      var msg = error || 'Number of unprocessed lysates';
299      var count = error ? -1 : response.count;
300      setCount('count.lysate.1', count, 'lysates', msg);
301      setCount('count.lysate.2', count, 'lysates', msg);
302      startCounting('rnaqc');
303    }
304    else if (currentCount == 'rnaqc')
305    {
306      var msg = error || 'Number of RNA waiting for QC';
307      var count = error ? -1 : response.count;
308      setCount('count.rnaqc', count, 'RNA', msg);
309      startCounting('caliper-plates');
310    }
311    else if (currentCount == 'caliper-plates')
312    {
313      var msg = error || 'Number of active Caliper plates';
314      var count = error ? -1 : response.count;
315      setCount('count.caliper-plates.1', count, 'Caliper plates', msg);
316      setCount('count.caliper-plates.2', count, 'Caliper plates', msg);
317      startCounting('rna-without-mrna');
318    }
319    else if (currentCount == 'rna-without-mrna')
320    {
321      var msg = error || 'Number of RNA with no mRNA';
322      var count = error ? -1 : response.count;
323      setCount('count.rna-without-mrna', count, 'RNA', msg);
324      startCounting('mrna-plates');
325    }
326    else if (currentCount == 'mrna-plates')
327    {
328      var msg = error || 'Number of mRNA plates waiting for registration';
329      var count = error ? -1 : response.count;
330      setCount('count.mrna-plates.1', count, 'mRNA plates', msg);
331      setCount('count.mrna-plates.2', count, 'mRNA plates', msg);
332      startCounting('cdna-plates');
333    }
334    else if (currentCount == 'cdna-plates')
335    {
336      var msg = error || 'Number of cDNA plates waiting for registration';
337      var count = error ? -1 : response.count;
338      setCount('count.cdna-plates.1', count, 'cDNA plates', msg);
339      startCounting('cdna-plates-for-barcoding');
340    }
341    else if (currentCount == 'cdna-plates-for-barcoding')
342    {
343      var msg = error || 'Number of cDNA plates waiting for barcode layout';
344      var count = error ? -1 : response.count;
345      setCount('count.cdna-plates-for-barcoding', count, 'cDNA plates', msg);
346      startCounting('lib-plates')
347    }
348    else if (currentCount == 'lib-plates')
349    {
350      var msg = error || 'Number of Lib plates waiting for registration';
351      var count = error ? -1 : response.count;
352      setCount('count.lib-plates.1', count, 'Lib plates', msg);
353      setCount('count.lib-plates.2', count, 'Lib plates', msg);
354      setCount('count.lib-plates.3', count, 'Lib plates', msg);
355      startCounting('lib-plates-for-pooling');
356    }
357    else if (currentCount == 'lib-plates-for-pooling')
358    {
359      var msg = error || 'Number of Lib plates waiting for pooling';
360      var count = error ? -1 : response.count;
361      setCount('count.lib-plates-for-pooling', count, 'Lib plates', msg);
362      startCounting('unregistered-pools');
363    }
364    else if (currentCount == 'unregistered-pools')
365    {
366      var msg = error || 'Number of pools waiting for registration';
367      var count = error ? -1 : response.count;
368      setCount('count.pools.1', count, 'pools', msg);
369      setCount('count.pools.2', count, 'pools', msg);
370      startCounting('unused-pools');
371    }
372    else if (currentCount == 'unused-pools')
373    {
374      var msg = error || 'Number of pools waiting for sequencing';
375      var count = error ? -1 : response.count;
376      setCount('count.pools.3', count, 'pools', msg);
377      startCounting('unregistered-flow-cells');
378    }
379    else if (currentCount == 'unregistered-flow-cells')
380    {
381      var msg = error || 'Number of flow cells waiting for clustering';
382      var count = error ? -1 : response.count;
383      setCount('count.flow-cells.1', count, 'flow cells', msg);
384      setCount('count.flow-cells.2', count, 'flow cells', msg);
385      startCounting('clustered-flow-cells');
386    }
387    else if (currentCount == 'clustered-flow-cells')
388    {
389      var msg = error || 'Number of flow cells waiting for sequencing';
390      var count = error ? -1 : response.count;
391      setCount('count.flow-cells.3', count, 'flow cells', msg);
392      startCounting('active-sequencing-runs');
393    }
394    else if (currentCount == 'active-sequencing-runs')
395    {
396      var msg = error || 'Number of active sequencing runs';
397      var count = error ? -1 : response.count;
398      setCount('count.sequencing-run', count, 'sequencing runs', msg);
399      startCounting('unconfirmed-sequencing-runs');
400    }
401    else if (currentCount == 'unconfirmed-sequencing-runs')
402    {
403      var msg = error || 'Number of ended but not confirmed sequencing runs';
404      var count = error ? -1 : response.count;
405      setCount('count.unconfirmed-sequencing-run', count, 'sequencing runs', msg);
406    }
407   
408  }
409 
410  function setCount(id, count, unit, msg)
411  {
412    var div = document.getElementById(id);
413    div.title = msg;
414    if (count == -1)
415    {
416      div.innerHTML = '(-)';
417    }
418    else
419    {
420      div.innerHTML = '(' + count + ')';
421    }
422  }
423 
424  function goWizard(event)
425  {
426    var role = event.currentTarget.getAttribute('data-role');
427    var isAdmin = myPermissions['Administrator'] == 1;
428    if (isAdmin || myPermissions[role] == 1)
429    {
430      var link = event.currentTarget.getAttribute('data-link');
431      location.href = link;
432    }
433    else
434    {
435      alert('You do not have permission to use this wizard!');
436    }
437  }
438 
439  </script>
440<style>
441dl
442{
443  margin-top: 0px;
444  padding: 3px;
445}
446dt
447{
448  margin-top: 0.5em;
449  margin-left: 0.5em;
450}
451dd
452{
453  margin-left: 0.5em;
454  margin-bottom: 0.5em;
455  padding-left: 3em;
456}
457ul
458{
459  margin-top: 0px;
460  margin-bottom: 0px;
461  margin-left: 0em;
462  padding-left: 0em;
463}
464li
465{
466  margin-left: 0em;
467}
468img
469{
470  vertical-align: text-bottom;
471}
472h3
473{
474  color: #333377;
475  background: #E8E8E8;
476  font-weight: bold;
477  margin-bottom: 0em;
478  padding: 1px 4px 1px 4px;
479  border: 1px solid #A0A0A0;
480  font-size: 1em;
481}
482.not-implemented
483{
484  filter: url(css/filters.svg#grayscale); /* Firfox, etc */
485  filter: gray; /* IE */
486  opacity: 0.75;
487  pointer-events: none;
488}
489
490.not-implemented:after
491{
492  content: ' -- coming soon';
493}
494.counter
495{
496  color: #999999;
497  font-style: italic;
498}
499
500.require-permission
501{
502  color: #999999;
503  font-style: italic;
504}
505
506</style>
507</base:head>
508<base:body onload="init()">
509
510  <p:path><p:pathelement title="Reggie" /></p:path>
511
512  <div class="content">
513    <form name="reggie" onsubmit="return false;">
514    <div class="absolutefull" style="width: 33%;">
515      <div class="absolutefull" style="left: 1em; right: 0.5em; ">
516     
517        <h3>Sample processing wizards</h3>
518        <dl class="leftborder rightborder bottomborder has-lib-prep">
519
520        <dt>
521          <base:icon image="<%=home+"/images/specimen.png" %>" />
522          <span class="require-permission" data-role="SamplePrep" data-link="sampleproc/specimentube.jsp?ID=<%=ID%>"
523            >Specimen tube registration</span>
524        </dt>
525        <dd>
526          <ul>
527          <li>Register new specimen tubes.
528          <li>Update existing specimen tubes.
529          </ul>
530        </dd>
531
532        <dt>
533          <base:icon image="<%=home+"/images/partition.png" %>" />
534          <span class="require-permission" data-role="SamplePrep" data-link="sampleproc/partitionform.jsp?ID=<%=ID%>"
535            >Partition wizard</span>
536        </dt>
537        <dd>
538          <ul>
539          <li>Register new partitions of existing specimens <span class="counter" id="count.specimen" title="Counting..."><img src="images/loading-small.gif"></span>
540          </ul>
541        </dd>
542         
543        <dt>
544          <base:icon image="<%=home+"/images/extraction.png" %>" />
545          DNA/RNA extraction wizards
546        </dt>
547        <dd>
548          <ul>
549          <li><span class="require-permission" data-role="SamplePrep" data-link="sampleproc/allprep_protocol.jsp?ID=<%=ID%>"
550            >Lab tracking protocol for Allprep isolation</span> <span class="counter" id="count.lysate.1" title="Counting..."><img src="images/loading-small.gif"></span>
551
552          <li><span class="require-permission" data-role="SamplePrep" data-link="sampleproc/extraction_registration.jsp?ID=<%=ID%>"
553            >DNA/RNA/FlowThrough registration</span> <span class="counter" id="count.lysate.2" title="Counting..."><img src="images/loading-small.gif"></span>
554          </ul>
555        </dd>
556        <dt>
557          <base:icon image="<%=home+"/images/rnaqc.png" %>" />
558          RNA quality control wizards
559        </dt>
560        <dd>
561          <ul>
562          <li><span class="require-permission" data-role="SamplePrep" data-link="sampleproc/rnaqc_aliquot.jsp?ID=<%=ID%>"
563            >Create aliquots on Bioanalyzer/Caliper plates</span> <span class="counter" id="count.rnaqc" title="Counting..."><img src="images/loading-small.gif"></span>
564         
565          <li><span class="require-permission" data-role="SamplePrep" data-link="sampleproc/rnaqc_plate_export.jsp?ID=<%=ID%>"
566            >Export Caliper sample names and run parameters</span> <span class="counter" id="count.caliper-plates.1" title="Counting..."><img src="images/loading-small.gif"></span>
567         
568          <li><span class="require-permission" data-role="SamplePrep" data-link="sampleproc/rnaqc_plate_import.jsp?ID=<%=ID%>"
569            >Import RQS scores from Caliper well table file</span> <span class="counter" id="count.caliper-plates.2" title="Counting..."><img src="images/loading-small.gif"></span>
570          </ul>
571        </dd>     
572        </dl>
573     
574        <h3>Histology wizards</h3>
575        <dl class="leftborder rightborder bottomborder">     
576        <dt>
577          <base:icon image="<%=home+"/images/histology.png" %>" />
578          Embedding and staining wizards
579        </dt>
580        <dd>
581          <ul>
582          <li><span class="require-permission" data-role="Histology" data-link="sampleproc/histology_protocol.jsp?ID=<%=ID%>"
583            >Lab tracking protocol for FFPE/HE</span> <span class="counter" id="count.histology-lists" title="Counting..."><img src="images/loading-small.gif"></span>
584         
585          <li><span class="require-permission" data-role="Histology" data-link="sampleproc/histology_block.jsp?ID=<%=ID%>"
586            >Register paraffin blocks</span> <span class="counter" id="count.paraffin-blocks" title="Counting..."><img src="images/loading-small.gif"></span>
587
588          <li><span class="require-permission" data-role="Histology" data-link="sampleproc/histology_labels.jsp?ID=<%=ID%>"
589            >Download HE glass labels</span>
590         
591          <li><span class="require-permission" data-role="Histology" data-link="sampleproc/histology_glass.jsp?ID=<%=ID%>"
592            >Register HE glass</span> <span class="counter" id="count.paraffin-blocks-without-heglass" title="Counting..."><img src="images/loading-small.gif"></span>
593        </dd>
594       
595        <dt>
596          <base:icon image="<%=home+"/images/microscope.png" %>" />
597          Scoring wizard
598        </dt>
599        <dd>
600          <li><span class="require-permission" data-role="Histology" data-link="sampleproc/histology_score.jsp?ID=<%=ID%>"
601            >Score HE glass</span> <span class="counter" id="count.unscored-heglass" title="Counting..."><img src="images/loading-small.gif"></span>
602          </ul>
603        </dd>
604        </dl>
605     
606     
607        <h3>Library preparation wizards</h3>
608        <dl class="leftborder rightborder bottomborder">
609     
610        <dt>
611          <base:icon image="<%=home+"/images/pipette.png" %>" />
612          RNA to cDNA wizards
613        </dt>
614        <dd>
615          <ul>
616          <li><span class="require-permission" data-role="LibraryPlateDesigner" data-link="libprep/select_rna.jsp?ID=<%=ID%>"
617            >Create new mRNA plate</span> <span class="counter" id="count.rna-without-mrna" title="Counting..."><img src="images/loading-small.gif"></span>
618         
619          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/mrna_protocol.jsp?ID=<%=ID%>"
620            >Lab protocols for mRNA and cDNA preparation</span> <span class="counter" id="count.mrna-plates.1" title="Counting..."><img src="images/loading-small.gif"></span>
621         
622          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/mrna_registration.jsp?ID=<%=ID%>"
623            >mRNA registration and quality control results</span> <span class="counter" id="count.mrna-plates.2" title="Counting..."><img src="images/loading-small.gif"></span>
624         
625          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/cdna_registration.jsp?ID=<%=ID%>"
626            >cDNA registration</span> <span class="counter" id="count.cdna-plates.1" title="Counting..."><img src="images/loading-small.gif"></span>
627          </ul>
628        </dd>
629       
630        <dt>
631          <base:icon image="<%=home+"/images/libprep.png" %>" />
632          Library preparation wizards
633        </dt>
634        <dd>
635          <ul>
636          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/assign_barcode.jsp?ID=<%=ID%>"
637            >Assign barcodes to cDNA plate</span> <span class="counter" id="count.cdna-plates-for-barcoding" title="Counting..."><img src="images/loading-small.gif"></span>
638         
639          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/libprep_protocol.jsp?ID=<%=ID%>"
640            >Lab protocols and files for library preparation</span> <span class="counter" id="count.lib-plates.1" title="Counting..."><img src="images/loading-small.gif"></span>
641         
642          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/libqc_registration.jsp?ID=<%=ID%>"
643            >Register quality control results</span> <span class="counter" id="count.lib-plates.2" title="Counting..."><img src="images/loading-small.gif"></span>
644         
645          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/lib_registration.jsp?ID=<%=ID%>"
646            >Library registration</span> <span class="counter" id="count.lib-plates.3" title="Counting..."><img src="images/loading-small.gif"></span>
647          </ul>
648        </dd>
649        <dt>
650          <base:icon image="<%=home+"/images/pool.png" %>" />
651          Pooling wizards
652        </dt>
653        <dd>
654          <ul>
655          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/create_pools.jsp?ID=<%=ID%>"
656            >Create pooled libraries</span> <span class="counter" id="count.lib-plates-for-pooling" title="Counting..."><img src="images/loading-small.gif"></span>
657         
658          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/pool_protocol.jsp?ID=<%=ID%>"
659            >Lab protocols for pooling</span> <span class="counter" id="count.pools.1" title="Counting..."><img src="images/loading-small.gif"></span>
660         
661          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/pool_registration.jsp?ID=<%=ID%>"
662            >Register pooled libraries</span> <span class="counter" id="count.pools.2" title="Counting..."><img src="images/loading-small.gif"></span>
663          </ul>
664        </dd>
665       
666        <dt>
667          <base:icon image="<%=home+"/images/flowcell.png" %>" />
668          Clustering and sequencing wizards
669        </dt>
670        <dd>
671          <ul>
672          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/create_flowcells.jsp?ID=<%=ID%>"
673            >Create flow cells</span> <span class="counter" id="count.pools.3" title="Counting..."><img src="images/loading-small.gif"></span>
674         
675          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/flowcell_protocol.jsp?ID=<%=ID%>"
676            >Lab protocol for clustering and sequencing</span> <span class="counter" id="count.flow-cells.1" title="Counting..."><img src="images/loading-small.gif"></span>
677         
678          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/flowcell_registration.jsp?ID=<%=ID%>"
679            >Register clustering</span> <span class="counter" id="count.flow-cells.2" title="Counting..."><img src="images/loading-small.gif"></span>
680
681          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/sequencing_started.jsp?ID=<%=ID%>"
682            >Register sequencing started</span> <span class="counter" id="count.flow-cells.3" title="Counting..."><img src="images/loading-small.gif"></span>
683
684          <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/sequencing_ended.jsp?ID=<%=ID%>"
685            >Register sequencing ended</span> <span class="counter" id="count.sequencing-run" title="Counting..."><img src="images/loading-small.gif"></span>
686          </ul>
687        </dd>
688       
689        </dl>
690      </div>
691    </div>
692   
693    <div class="absolutefull" style="width: 34%; left: 33%; right: auto;">
694      <div class="absolutefull" style="left: 0.5em; right: 0.5em;">
695        <h3>Secondary analysis wizards</h3>
696        <dl class="leftborder rightborder bottomborder">
697          <dt>
698            <base:icon image="<%=home+"/images/server.png" %>" />
699            Demux and merge wizards
700          </dt>
701          <dd>
702            <ul>
703            <li><span class="require-permission" data-role="SecondaryAnalysis" data-link="analysis/sequencing_confirm.jsp?ID=<%=ID%>"
704              >Confirm sequencing completed</span> <span class="counter" id="count.unconfirmed-sequencing-run" title="Counting..."><img src="images/loading-small.gif"></span>
705           
706            <li><span class="require-permission not-implemented" data-role="SecondaryAnalysis" data-link="analysis/demux_start.jsp?ID=<%=ID%>"
707              >Start demux and merge</span> 
708            <li><span class="require-permission not-implemented" data-role="SecondaryAnalysis" data-link="analysis/demux_end.jsp?ID=<%=ID%>"
709              >Register demux and merge completed</span> 
710            </ul>
711          </dd>
712         
713          <dt>
714            <base:icon image="<%=home+"/images/align.png" %>" />
715            Filter and alignment wizards
716          </dt>
717          <dd>
718            <ul>
719            <li><span class="require-permission not-implemented" data-role="SecondaryAnalysis" data-link="analysis/filter_start.jsp?ID=<%=ID%>"
720              >Start filter and alignment</span> 
721            <li><span class="require-permission not-implemented" data-role="SecondaryAnalysis" data-link="analysis/align_end.jsp?ID=<%=ID%>"
722              >Register filter and alignment completed</span> 
723            </ul>
724          </dd>
725          <dt>
726         
727            <base:icon image="<%=home+"/images/wizard.png" %>" />
728            Feature extraction wizards
729          </dt>
730          <dd>
731            <ul>
732            <li><span class="require-permission not-implemented" data-role="SecondaryAnalysis" data-link="analysis/feature_start.jsp?ID=<%=ID%>"
733              >Start feature extraction</span> 
734            <li><span class="require-permission not-implemented" data-role="SecondaryAnalysis" data-link="analysis/feature_end.jsp?ID=<%=ID%>"
735              >Register feature extraction completed</span> 
736            </ul>
737          </dd>
738        </dl>
739      </div>
740    </div>
741   
742    <div class="absolutefull" style="width: 33%; left: auto;">
743      <div class="absolutefull" style="left: 0.5em; right: 1em;">
744        <%
745        if (isAdmin)
746        {
747          %>
748          <h3>Server administrator wizards</h3>
749          <dl class="leftborder rightborder bottomborder">
750          <dt>
751            <base:icon image="<%=home + "/images/install.png" %>" />
752            <span class="require-permission" data-role="Administrator" data-link="admin/install.jsp?ID=<%=ID%>">Installation wizard</span>
753          </dt>
754          <dd>
755            <ul>
756            <li>Check that annotation types and other items used by Reggie exists in BASE.
757            <li>Create missing items.
758            </ul>
759          </dd>
760          </dl>
761          <%
762        }
763        if (isPatientCurator || isAdmin)
764        {
765          %>
766          <h3>Personal information wizards</h3>
767          <dl class="leftborder rightborder bottomborder">
768          <dt>
769            <base:icon image="<%=home + "/images/personal.png" %>"/>
770            <span class="require-permission" data-role="PatientCurator" data-link="personal/persinfo.jsp?ID=<%=ID%>"
771              >Pathology referral form registration</span>
772          </dt>
773          <dd>
774            <ul>
775            <li>Register new cases and patients.
776            <li>Update existing cases and specimen tubes.
777            </ul>
778          </dd>
779         
780          <dt>
781            <base:icon image="<%=home + "/images/blood.png" %>"/>
782            Blood referral form registration
783          </dt>
784          <dd>
785            <ul>
786            <li><span class="require-permission" data-role="PatientCurator" data-link="personal/bloodform.jsp?ID=<%=ID%>"
787              >Register new/updated blood referral forms and patients</span>
788             
789            <li><span class="require-permission" data-role="PatientCurator" data-link="personal/bloodfollowupform.jsp?ID=<%=ID%>"
790              >Register new/updated follow-up blood referral forms</span>
791            </ul>
792          </dd>
793         
794          <dt>
795            <base:icon image="<%=home+"/images/consent.png" %>"/>
796            <span class="require-permission" data-role="PatientCurator" data-link="personal/consentform.jsp?ID=<%=ID%>"
797              >Consent form registration</span>
798          </dt>
799          <dd>
800            <ul>
801            <li>Register consent forms.
802            </ul>
803          </dd>
804         
805          <dt>
806            <base:icon image="<%=home+"/images/export_import.png" %>" />
807            Export/import information to/from external registers.
808          </dt>
809          <dd>
810            <ul>
811            <li><span class="require-permission" data-role="PatientCurator" data-link="personal/export_monthly_oplist.jsp?ID=<%=ID%>"
812              >Export monthly operation list</span>
813             
814            <li><span class="require-permission" data-role="PatientCurator" data-link="personal/export_inca.jsp?ID=<%=ID%>"
815              >INCA export</span>
816
817            <li><span class="require-permission" data-role="PatientCurator" data-link="personal/export_missing_data_sample_list.jsp?ID=<%=ID%>"
818              >Export missing data sample list</span>
819
820            <li><span class="require-permission" data-role="PatientCurator" data-link="personal/export_missing_consent_data_sample_list.jsp?ID=<%=ID%>"
821              >Export missing consent data sample list</span>
822            </ul>
823          </dd>
824          </dl>
825          <%
826        }
827        %>
828       
829        <h3>Statistics and reporting wizards</h3>
830        <dl class="leftborder rightborder bottomborder">
831          <dt>
832            <base:icon image="<%=home+"/images/case_summary.png" %>" />
833            Case summary
834          </dt>
835          <dd>
836            <table>
837            <tr>
838              <td><input type="text" class="text" 
839                name="caseName" title="Please enter a 7-digit case id" 
840                style="width: 25em;"
841                onkeypress="if (event.keyCode==13 && this.value) caseSummary()"></td>
842              <td><base:button title="Go" image="<%=home+"/images/gonext.png"%>" onclick="caseSummary()"/></td>
843            </tr>
844            </table>
845          </dd>
846       
847          <dt>
848            <base:icon image="<%=home+"/images/report.png" %>" />
849            <a href="reports/samplereportgenerator.jsp?ID=<%=ID%>">Sample source report</a>
850          </dt>       
851          <dd>       
852            <ul>
853            <li>Sample count report</li> 
854            <li>Consent count report</li> 
855            <li>Patient count report</li> 
856            <li>Overview report</li> 
857            <li>Missing sample data report</li> 
858            </ul>
859          </dd>
860          <dt>
861            <base:icon image="<%=home+"/images/chart_bar.png" %>" />
862            <a href="reports/scanbquartermonthreportgenerator.jsp?ID=<%=ID%>">Sample processing statistics</a>
863          </dt>       
864          <dd>       
865            <ul>
866            <li>SCAN-B quarter/month report</li> 
867            </ul>
868          </dd>
869        </dl>
870      </div>
871    </div>
872    </form>
873  </div>
874 
875</base:body>
876</base:page>
877<%
878}
879finally
880{
881  if (dc != null) dc.close();
882}
883%>
Note: See TracBrowser for help on using the repository browser.