4478 |
05 May 17 |
nicklas |
1 |
<%@ page |
4478 |
05 May 17 |
nicklas |
2 |
pageEncoding="UTF-8" |
4478 |
05 May 17 |
nicklas |
3 |
session="false" |
4478 |
05 May 17 |
nicklas |
4 |
import="net.sf.basedb.core.Application" |
4478 |
05 May 17 |
nicklas |
5 |
import="net.sf.basedb.core.User" |
4478 |
05 May 17 |
nicklas |
6 |
import="net.sf.basedb.core.DbControl" |
4478 |
05 May 17 |
nicklas |
7 |
import="net.sf.basedb.core.SessionControl" |
4478 |
05 May 17 |
nicklas |
8 |
import="net.sf.basedb.clients.web.Base" |
4478 |
05 May 17 |
nicklas |
9 |
import="net.sf.basedb.clients.web.util.HTML" |
4478 |
05 May 17 |
nicklas |
10 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4478 |
05 May 17 |
nicklas |
11 |
import="net.sf.basedb.util.Values" |
4478 |
05 May 17 |
nicklas |
12 |
%> |
4478 |
05 May 17 |
nicklas |
13 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
4478 |
05 May 17 |
nicklas |
14 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4478 |
05 May 17 |
nicklas |
15 |
<% |
4478 |
05 May 17 |
nicklas |
16 |
final SessionControl sc = Base.getExistingSessionControl(request, "net.sf.basedb.reggie", true); |
4478 |
05 May 17 |
nicklas |
17 |
final String ID = sc.getId(); |
4478 |
05 May 17 |
nicklas |
18 |
final float scale = Base.getScale(sc); |
4478 |
05 May 17 |
nicklas |
19 |
final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.reggie"); |
4478 |
05 May 17 |
nicklas |
20 |
|
4478 |
05 May 17 |
nicklas |
21 |
DbControl dc = null; |
4478 |
05 May 17 |
nicklas |
22 |
try |
4478 |
05 May 17 |
nicklas |
23 |
{ |
4478 |
05 May 17 |
nicklas |
24 |
dc = sc.newDbControl(); |
4478 |
05 May 17 |
nicklas |
25 |
final User user = User.getById(dc, sc.getLoggedInUserId()); |
4478 |
05 May 17 |
nicklas |
26 |
%> |
4478 |
05 May 17 |
nicklas |
27 |
<base:page type="default" > |
4478 |
05 May 17 |
nicklas |
28 |
<base:head |
4478 |
05 May 17 |
nicklas |
29 |
scripts="~../reggie-2.js,~reference-date.js" |
4478 |
05 May 17 |
nicklas |
30 |
styles="path.css,~../css/reggie-2.css" |
4478 |
05 May 17 |
nicklas |
31 |
> |
4478 |
05 May 17 |
nicklas |
32 |
<style> |
4478 |
05 May 17 |
nicklas |
33 |
|
4478 |
05 May 17 |
nicklas |
34 |
#update-results |
4478 |
05 May 17 |
nicklas |
35 |
{ |
4478 |
05 May 17 |
nicklas |
36 |
width: 40em; |
4478 |
05 May 17 |
nicklas |
37 |
border-width: 1px; |
4478 |
05 May 17 |
nicklas |
38 |
margin-left: 2em; |
4478 |
05 May 17 |
nicklas |
39 |
} |
4478 |
05 May 17 |
nicklas |
40 |
|
4478 |
05 May 17 |
nicklas |
41 |
#update-results th, #update-results td |
4478 |
05 May 17 |
nicklas |
42 |
{ |
4478 |
05 May 17 |
nicklas |
43 |
text-align: left; |
4478 |
05 May 17 |
nicklas |
44 |
padding: 2px; |
4478 |
05 May 17 |
nicklas |
45 |
} |
4478 |
05 May 17 |
nicklas |
46 |
|
4478 |
05 May 17 |
nicklas |
47 |
</style> |
4478 |
05 May 17 |
nicklas |
48 |
</base:head> |
4478 |
05 May 17 |
nicklas |
49 |
<base:body> |
4478 |
05 May 17 |
nicklas |
50 |
|
4478 |
05 May 17 |
nicklas |
51 |
<p:path><p:pathelement |
4478 |
05 May 17 |
nicklas |
52 |
title="Reggie" href="<%="../index.jsp?ID="+ID%>" |
6098 |
11 Jan 21 |
nicklas |
53 |
/><p:pathelement title="Reference date and linked cases batch update" |
4478 |
05 May 17 |
nicklas |
54 |
/></p:path> |
4478 |
05 May 17 |
nicklas |
55 |
|
4478 |
05 May 17 |
nicklas |
56 |
<div class="content"> |
4478 |
05 May 17 |
nicklas |
57 |
<form name="reggie" id="wizard" class="wizard"> |
4478 |
05 May 17 |
nicklas |
58 |
|
4478 |
05 May 17 |
nicklas |
59 |
<div class="step" id="step-1"> |
4478 |
05 May 17 |
nicklas |
60 |
<div class="step-no">1</div> |
4478 |
05 May 17 |
nicklas |
61 |
<div class="step-title">Reference date</div> |
4478 |
05 May 17 |
nicklas |
62 |
<div class="step-content"> |
4478 |
05 May 17 |
nicklas |
63 |
|
4478 |
05 May 17 |
nicklas |
64 |
<div style="padding: 1em;"> |
6098 |
11 Jan 21 |
nicklas |
65 |
This wizard will update the <b>ReferenceDateSource</b> and <b>ReferenceDate</b> |
4478 |
05 May 17 |
nicklas |
66 |
annotations on <b>Case</b> items as follows:<br> |
4478 |
05 May 17 |
nicklas |
67 |
<ol> |
4701 |
16 Mar 18 |
nicklas |
68 |
<li><b>IncaDiagnosisDate</b>: If a case has a value for the <b>INCA2_a_diag_dat</b> annotation, |
4478 |
05 May 17 |
nicklas |
69 |
that date is copied to the <b>ReferenceDate</b> annotation. |
6153 |
26 Feb 21 |
nicklas |
70 |
<li><b>SamplingDate</b>: If a case has at least one child <b>Specimen</b>, <b>NoSpecimen</b> |
6153 |
26 Feb 21 |
nicklas |
71 |
or <b>FutureSpecimen</b> that has a <b>Created</b> date, the earliest date is copied to the |
6153 |
26 Feb 21 |
nicklas |
72 |
<b>ReferenceDate</b> annotation. |
4478 |
05 May 17 |
nicklas |
73 |
<li><b>ConsentDate</b>: If a case has a value for the <b>ConsentDate</b> annotation, that date is copied |
4478 |
05 May 17 |
nicklas |
74 |
to the <b>ReferenceDate</b> annotation. |
4478 |
05 May 17 |
nicklas |
75 |
<li><b>RegistrationDate</b>: All remaining cases have the <b>Registered</b> date copied to |
4478 |
05 May 17 |
nicklas |
76 |
the <b>ReferenceDate</b> annotation. |
4478 |
05 May 17 |
nicklas |
77 |
</ol> |
6098 |
11 Jan 21 |
nicklas |
78 |
<p style="margin-top: 1em;"> |
6098 |
11 Jan 21 |
nicklas |
79 |
The wizard will also update the <b>LinkedCase</b> annotation on bilateral cases. |
6098 |
11 Jan 21 |
nicklas |
80 |
The value is set to the number of days between the reference dates on the two cases: |
6098 |
11 Jan 21 |
nicklas |
81 |
<ul> |
6098 |
11 Jan 21 |
nicklas |
82 |
<li>If the value is 0, both cases have the same reference date. |
6098 |
11 Jan 21 |
nicklas |
83 |
<li>If the value is >0, the other case is later than the current case. |
6098 |
11 Jan 21 |
nicklas |
84 |
<li>If the value is <0, the other case is before the current case. |
6098 |
11 Jan 21 |
nicklas |
85 |
</ul> |
4478 |
05 May 17 |
nicklas |
86 |
</div> |
4478 |
05 May 17 |
nicklas |
87 |
</div> |
4478 |
05 May 17 |
nicklas |
88 |
</div> |
4478 |
05 May 17 |
nicklas |
89 |
|
4478 |
05 May 17 |
nicklas |
90 |
<div id="wizard-status"></div> |
4478 |
05 May 17 |
nicklas |
91 |
<div id="wizard-progress"></div> |
4478 |
05 May 17 |
nicklas |
92 |
|
4478 |
05 May 17 |
nicklas |
93 |
<table id="update-results" style="display: none; margin-top: 1em;"> |
4478 |
05 May 17 |
nicklas |
94 |
<tr class="bg-filled-100 bottomborder"> |
4478 |
05 May 17 |
nicklas |
95 |
<th style="width: 20em;">ReferenceDateSource</th> |
4478 |
05 May 17 |
nicklas |
96 |
<th style="width: 10em;">Before</th> |
4478 |
05 May 17 |
nicklas |
97 |
<th style="width: 10em;">After</th> |
4478 |
05 May 17 |
nicklas |
98 |
</tr> |
4478 |
05 May 17 |
nicklas |
99 |
<tr class="bottomborder" style="border-bottom-style: dotted;"> |
4478 |
05 May 17 |
nicklas |
100 |
<th class="bg-filled-100 rightborder">No value</th> |
4478 |
05 May 17 |
nicklas |
101 |
<td id="novalue-before">?</td> |
4478 |
05 May 17 |
nicklas |
102 |
<td id="novalue-after">?</td> |
4478 |
05 May 17 |
nicklas |
103 |
</tr> |
4478 |
05 May 17 |
nicklas |
104 |
<tr> |
4478 |
05 May 17 |
nicklas |
105 |
<th class="bg-filled-100 rightborder">IncaDiagnosisDate</th> |
4478 |
05 May 17 |
nicklas |
106 |
<td id="IncaDiagnosisDate-before">?</td> |
4478 |
05 May 17 |
nicklas |
107 |
<td id="IncaDiagnosisDate-after">?</td> |
4478 |
05 May 17 |
nicklas |
108 |
</tr> |
4478 |
05 May 17 |
nicklas |
109 |
<tr> |
4478 |
05 May 17 |
nicklas |
110 |
<th class="bg-filled-100 rightborder">SamplingDate</th> |
4478 |
05 May 17 |
nicklas |
111 |
<td id="SamplingDate-before">?</td> |
4478 |
05 May 17 |
nicklas |
112 |
<td id="SamplingDate-after">?</td> |
4478 |
05 May 17 |
nicklas |
113 |
</tr> |
4478 |
05 May 17 |
nicklas |
114 |
<tr> |
4478 |
05 May 17 |
nicklas |
115 |
<th class="bg-filled-100 rightborder">ConsentDate</th> |
4478 |
05 May 17 |
nicklas |
116 |
<td id="ConsentDate-before">?</td> |
4478 |
05 May 17 |
nicklas |
117 |
<td id="ConsentDate-after">?</td> |
4478 |
05 May 17 |
nicklas |
118 |
</tr> |
4478 |
05 May 17 |
nicklas |
119 |
<tr> |
4478 |
05 May 17 |
nicklas |
120 |
<th class="bg-filled-100 rightborder">RegistrationDate</th> |
4478 |
05 May 17 |
nicklas |
121 |
<td id="RegistrationDate-before">?</td> |
4478 |
05 May 17 |
nicklas |
122 |
<td id="RegistrationDate-after">?</td> |
4478 |
05 May 17 |
nicklas |
123 |
</tr> |
4478 |
05 May 17 |
nicklas |
124 |
</table> |
4478 |
05 May 17 |
nicklas |
125 |
|
4478 |
05 May 17 |
nicklas |
126 |
|
4478 |
05 May 17 |
nicklas |
127 |
<table class="navigation" id="navigation"> |
4478 |
05 May 17 |
nicklas |
128 |
<tr> |
4478 |
05 May 17 |
nicklas |
129 |
<td><base:button id="gocancel" title="Cancel" /></td> |
4478 |
05 May 17 |
nicklas |
130 |
<td><base:button id="gonext" title="Next" image="<%=home+"/images/gonext.png"%>" /></td> |
4478 |
05 May 17 |
nicklas |
131 |
<td><base:button id="goregister" title="Register" image="<%=home+"/images/gonext.png"%>" /></td> |
4478 |
05 May 17 |
nicklas |
132 |
<td><base:button id="goupdate" title="Update" image="<%=home+"/images/gonext.png"%>" /></td> |
4478 |
05 May 17 |
nicklas |
133 |
<td><base:button id="gorestart" title="Restart" image="<%=home+"/images/goback.png"%>" /></td> |
4478 |
05 May 17 |
nicklas |
134 |
<td id="gonext-message" class="message"></td> |
4478 |
05 May 17 |
nicklas |
135 |
</tr> |
4478 |
05 May 17 |
nicklas |
136 |
</table> |
4478 |
05 May 17 |
nicklas |
137 |
</form> |
4478 |
05 May 17 |
nicklas |
138 |
</div> |
4478 |
05 May 17 |
nicklas |
139 |
|
4478 |
05 May 17 |
nicklas |
140 |
</base:body> |
4478 |
05 May 17 |
nicklas |
141 |
</base:page> |
4478 |
05 May 17 |
nicklas |
142 |
<% |
4478 |
05 May 17 |
nicklas |
143 |
} |
4478 |
05 May 17 |
nicklas |
144 |
finally |
4478 |
05 May 17 |
nicklas |
145 |
{ |
4478 |
05 May 17 |
nicklas |
146 |
if (dc != null) dc.close(); |
4478 |
05 May 17 |
nicklas |
147 |
} |
4478 |
05 May 17 |
nicklas |
148 |
%> |