5686 |
25 Oct 19 |
olle |
1 |
<%@ page |
5686 |
25 Oct 19 |
olle |
2 |
pageEncoding="UTF-8" |
5686 |
25 Oct 19 |
olle |
3 |
session="false" |
5686 |
25 Oct 19 |
olle |
4 |
import="net.sf.basedb.core.Application" |
5686 |
25 Oct 19 |
olle |
5 |
import="net.sf.basedb.core.User" |
5686 |
25 Oct 19 |
olle |
6 |
import="net.sf.basedb.core.DbControl" |
5686 |
25 Oct 19 |
olle |
7 |
import="net.sf.basedb.core.SessionControl" |
5686 |
25 Oct 19 |
olle |
8 |
import="net.sf.basedb.clients.web.Base" |
5686 |
25 Oct 19 |
olle |
9 |
import="net.sf.basedb.clients.web.util.HTML" |
5686 |
25 Oct 19 |
olle |
10 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5686 |
25 Oct 19 |
olle |
11 |
import="net.sf.basedb.util.Values" |
5686 |
25 Oct 19 |
olle |
12 |
import="net.sf.basedb.util.formatter.DateFormatter" |
5686 |
25 Oct 19 |
olle |
13 |
%> |
5686 |
25 Oct 19 |
olle |
14 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
5686 |
25 Oct 19 |
olle |
15 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
5686 |
25 Oct 19 |
olle |
16 |
<% |
5686 |
25 Oct 19 |
olle |
17 |
//final SessionControl sc = Base.getExistingSessionControl(request, "net.sf.basedb.meludi", true); |
5686 |
25 Oct 19 |
olle |
18 |
final SessionControl sc = Base.getExistingSessionControl(request, true); |
5686 |
25 Oct 19 |
olle |
19 |
final String ID = sc.getId(); |
5686 |
25 Oct 19 |
olle |
20 |
final float scale = Base.getScale(sc); |
5686 |
25 Oct 19 |
olle |
21 |
final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.meludi"); |
5686 |
25 Oct 19 |
olle |
22 |
|
5686 |
25 Oct 19 |
olle |
23 |
DbControl dc = null; |
5686 |
25 Oct 19 |
olle |
24 |
try |
5686 |
25 Oct 19 |
olle |
25 |
{ |
5686 |
25 Oct 19 |
olle |
26 |
dc = sc.newDbControl(); |
5686 |
25 Oct 19 |
olle |
27 |
final User user = User.getById(dc, sc.getLoggedInUserId()); |
5686 |
25 Oct 19 |
olle |
28 |
DateFormatter dateFormat = new DateFormatter("yyyy-MM-dd"); |
5686 |
25 Oct 19 |
olle |
29 |
%> |
5686 |
25 Oct 19 |
olle |
30 |
<base:page type="default" > |
5686 |
25 Oct 19 |
olle |
31 |
<base:head |
5686 |
25 Oct 19 |
olle |
32 |
scripts="~../meludi-2.js,~generate-referral-forms_alt_ntr.js" |
5686 |
25 Oct 19 |
olle |
33 |
styles="path.css,~../css/meludi-2.css" |
5686 |
25 Oct 19 |
olle |
34 |
> |
5686 |
25 Oct 19 |
olle |
35 |
<style> |
5686 |
25 Oct 19 |
olle |
36 |
#not-found |
5686 |
25 Oct 19 |
olle |
37 |
{ |
5686 |
25 Oct 19 |
olle |
38 |
margin: 0 1em 0 4em; |
5686 |
25 Oct 19 |
olle |
39 |
padding: 0.5em 1em; |
5686 |
25 Oct 19 |
olle |
40 |
font-family: monospace,Courier New; |
5686 |
25 Oct 19 |
olle |
41 |
max-height: 25em; |
5686 |
25 Oct 19 |
olle |
42 |
overflow: auto; |
5686 |
25 Oct 19 |
olle |
43 |
} |
5686 |
25 Oct 19 |
olle |
44 |
</style> |
5686 |
25 Oct 19 |
olle |
45 |
</base:head> |
5686 |
25 Oct 19 |
olle |
46 |
<base:body> |
5686 |
25 Oct 19 |
olle |
47 |
|
5686 |
25 Oct 19 |
olle |
48 |
<p:path><p:pathelement |
5686 |
25 Oct 19 |
olle |
49 |
title="Meludi" href="<%="../index.jsp?ID="+ID%>" |
5695 |
04 Nov 19 |
olle |
50 |
/><p:pathelement title="Generate referral forms - NordicTrip" |
5686 |
25 Oct 19 |
olle |
51 |
/></p:path> |
5686 |
25 Oct 19 |
olle |
52 |
|
5686 |
25 Oct 19 |
olle |
53 |
<div class="content"> |
5686 |
25 Oct 19 |
olle |
54 |
<form name="meludi" id="wizard" class="wizard"> |
5686 |
25 Oct 19 |
olle |
55 |
|
5686 |
25 Oct 19 |
olle |
56 |
<div class="step" id="step-1"> |
5686 |
25 Oct 19 |
olle |
57 |
<div class="step-no">1</div> |
5695 |
04 Nov 19 |
olle |
58 |
<!-- |
5686 |
25 Oct 19 |
olle |
<div class="step-title">Enter info on the referral form batch to create</div> |
5695 |
04 Nov 19 |
olle |
60 |
--> |
5695 |
04 Nov 19 |
olle |
61 |
<div class="step-title">Referral form generation</div> |
5686 |
25 Oct 19 |
olle |
62 |
<div class="step-content"> |
5686 |
25 Oct 19 |
olle |
63 |
|
5686 |
25 Oct 19 |
olle |
64 |
<div class="bg-filled-50" style="padding: 2px;"> |
5686 |
25 Oct 19 |
olle |
65 |
<!-- |
5686 |
25 Oct 19 |
olle |
* A form set consists of forms with the same base SCAN-B ID, i.e. ignoring optional suffix.<br> |
5686 |
25 Oct 19 |
olle |
* A form batch consists of a number of form sets with consecutive SCAN-B ID's.<br> |
5686 |
25 Oct 19 |
olle |
68 |
--> |
5686 |
25 Oct 19 |
olle |
69 |
* A form set consists of forms for the same site.<br> |
5686 |
25 Oct 19 |
olle |
70 |
* A form batch consists of a number of form sets with consecutive ID's.<br> |
5686 |
25 Oct 19 |
olle |
71 |
* A form batch is distributed as two files, with forms intended for printing on<br> |
5686 |
25 Oct 19 |
olle |
72 |
referral form sheets or regular paper, respectively:<br> |
5686 |
25 Oct 19 |
olle |
73 |
<br> |
5686 |
25 Oct 19 |
olle |
74 |
<!-- |
5686 |
25 Oct 19 |
olle |
Batch file 1: Form sets with 2 or 4 (Kit 2) forms to be printed on referral form sheets.<br> |
5686 |
25 Oct 19 |
olle |
Batch file 2: Form sets with 2 forms to be printed on regular paper.<br> |
5686 |
25 Oct 19 |
olle |
77 |
--> |
5686 |
25 Oct 19 |
olle |
78 |
Batch file 1: Form sets with forms to be printed on referral form sheets.<br> |
5686 |
25 Oct 19 |
olle |
79 |
Batch file 2: Form sets with forms to be printed on regular paper.<br> |
5686 |
25 Oct 19 |
olle |
80 |
<br> |
5686 |
25 Oct 19 |
olle |
81 |
Printing options:<br> |
5686 |
25 Oct 19 |
olle |
82 |
<br> |
5686 |
25 Oct 19 |
olle |
83 |
<!-- |
5686 |
25 Oct 19 |
olle |
Batch file 1: One-sided printing, one page per sheet, print size "Actual size".<br> |
5686 |
25 Oct 19 |
olle |
Batch file 2: Double-sided printing, two pages per sheet, print size "Actual size".<br> |
5686 |
25 Oct 19 |
olle |
86 |
--> |
5686 |
25 Oct 19 |
olle |
87 |
Batch file 1 & 2: One-sided printing, one page per sheet, print size "Actual size".<br> |
5686 |
25 Oct 19 |
olle |
88 |
<br> |
5686 |
25 Oct 19 |
olle |
89 |
</div> |
5686 |
25 Oct 19 |
olle |
90 |
|
5695 |
04 Nov 19 |
olle |
91 |
<!-- |
5686 |
25 Oct 19 |
olle |
<table class="step-form"> |
5686 |
25 Oct 19 |
olle |
<tr> |
5686 |
25 Oct 19 |
olle |
<td class="prompt">Site</td> |
5686 |
25 Oct 19 |
olle |
<td class="input"> |
5695 |
04 Nov 19 |
olle |
96 |
--> |
5686 |
25 Oct 19 |
olle |
97 |
<!-- |
5686 |
25 Oct 19 |
olle |
<select id="sites" name="sites" style="width: 15em;"></select> |
5686 |
25 Oct 19 |
olle |
99 |
--> |
5695 |
04 Nov 19 |
olle |
100 |
<!-- |
5686 |
25 Oct 19 |
olle |
<select id="sites" name="sites" |
5686 |
25 Oct 19 |
olle |
class="auto-init" data-auto-init="focus-on-enter" data-next-focus="tubeContentType"> |
5686 |
25 Oct 19 |
olle |
</select> |
5686 |
25 Oct 19 |
olle |
</td> |
5686 |
25 Oct 19 |
olle |
<td class="status" id="sites.status"></td> |
5686 |
25 Oct 19 |
olle |
<td class="help"> |
5686 |
25 Oct 19 |
olle |
<span id="sites.message" class="message"></span> |
5686 |
25 Oct 19 |
olle |
Select what site to generate referral forms for. |
5686 |
25 Oct 19 |
olle |
</td> |
5686 |
25 Oct 19 |
olle |
</tr> |
5695 |
04 Nov 19 |
olle |
111 |
--> |
5686 |
25 Oct 19 |
olle |
112 |
<!-- |
5686 |
25 Oct 19 |
olle |
<tr> |
5686 |
25 Oct 19 |
olle |
<td class="prompt">Form set variant</td> |
5686 |
25 Oct 19 |
olle |
<td class="input"> |
5686 |
25 Oct 19 |
olle |
<select name="referralvariant" id="referralvariant"> |
5686 |
25 Oct 19 |
olle |
<option value="kit1_standard" selected="yes">Kit 1 - Standard</option> |
5686 |
25 Oct 19 |
olle |
<option value="kit2_neoadjuvant">Kit 2 - Neoadjuvant therapy</option> |
5686 |
25 Oct 19 |
olle |
</select> |
5686 |
25 Oct 19 |
olle |
</td> |
5686 |
25 Oct 19 |
olle |
<td valign="top" class="status" id="referralvariant.status"></td> |
5686 |
25 Oct 19 |
olle |
<td class="help"> |
5686 |
25 Oct 19 |
olle |
<span id="referralvariant.message" class="message"></span> |
5686 |
25 Oct 19 |
olle |
Select form set variant. |
5686 |
25 Oct 19 |
olle |
</td> |
5686 |
25 Oct 19 |
olle |
</tr> |
5686 |
25 Oct 19 |
olle |
127 |
--> |
5695 |
04 Nov 19 |
olle |
128 |
<!-- |
5686 |
25 Oct 19 |
olle |
</table> |
5686 |
25 Oct 19 |
olle |
<div id="step1message"></div> |
5686 |
25 Oct 19 |
olle |
131 |
|
5686 |
25 Oct 19 |
olle |
</div> |
5686 |
25 Oct 19 |
olle |
</div> |
5686 |
25 Oct 19 |
olle |
134 |
|
5686 |
25 Oct 19 |
olle |
<div class="step" id="step-2"> |
5686 |
25 Oct 19 |
olle |
<div class="step-no">2</div> |
5686 |
25 Oct 19 |
olle |
<div class="step-title">Referral form generation</div> |
5686 |
25 Oct 19 |
olle |
<div class="step-content"> |
5686 |
25 Oct 19 |
olle |
139 |
|
5695 |
04 Nov 19 |
olle |
140 |
--> |
5686 |
25 Oct 19 |
olle |
141 |
<table class="step-form"> |
5686 |
25 Oct 19 |
olle |
142 |
<tr> |
5686 |
25 Oct 19 |
olle |
143 |
<td class="prompt">Start referral ID</td> |
5686 |
25 Oct 19 |
olle |
144 |
<td class="input"><input type="text" name="itemName" id="itemName" |
5686 |
25 Oct 19 |
olle |
145 |
class="required auto-init" data-auto-init="focus" |
5686 |
25 Oct 19 |
olle |
146 |
style="width: 12em;" maxlength="12"></td> |
5686 |
25 Oct 19 |
olle |
147 |
<td class="status" id="itemName.status"></td> |
5686 |
25 Oct 19 |
olle |
148 |
<td class="help"> |
5686 |
25 Oct 19 |
olle |
149 |
<span id="itemName.message" class="message"></span> |
5686 |
25 Oct 19 |
olle |
150 |
<!-- |
5686 |
25 Oct 19 |
olle |
The 7-digit SCAN-B ID (barcode) for the first referral form set. Last updated: <b><span id="scanbIdLastUpdated"></span></b>. |
5686 |
25 Oct 19 |
olle |
152 |
--> |
5734 |
19 Nov 19 |
olle |
153 |
The 4-digit ID (barcode) for the first referral form set. Last updated: <b><span id="referralIdLastUpdated"></span></b>. |
5686 |
25 Oct 19 |
olle |
154 |
</td> |
5686 |
25 Oct 19 |
olle |
155 |
</tr> |
5686 |
25 Oct 19 |
olle |
156 |
<tr> |
5686 |
25 Oct 19 |
olle |
157 |
<td class="prompt"># Form sets</td> |
5686 |
25 Oct 19 |
olle |
158 |
<td class="input"><input type="text" name="nofFormSets" id="nofFormSets" |
5686 |
25 Oct 19 |
olle |
159 |
class="required auto-init" data-auto-init="focus" |
5686 |
25 Oct 19 |
olle |
160 |
style="width: 12em;" maxlength="12"></td> |
5686 |
25 Oct 19 |
olle |
161 |
<td class="status" id="nofFormSets.status"></td> |
5686 |
25 Oct 19 |
olle |
162 |
<td class="help"> |
5686 |
25 Oct 19 |
olle |
163 |
<span id="nofFormSets.message" class="message"></span> |
5686 |
25 Oct 19 |
olle |
164 |
Number of form sets to generate. |
5686 |
25 Oct 19 |
olle |
165 |
</td> |
5686 |
25 Oct 19 |
olle |
166 |
</tr> |
5686 |
25 Oct 19 |
olle |
167 |
</table> |
5695 |
04 Nov 19 |
olle |
168 |
<!-- |
5686 |
25 Oct 19 |
olle |
<div id="step2message"></div> |
5695 |
04 Nov 19 |
olle |
170 |
--> |
5695 |
04 Nov 19 |
olle |
171 |
<div id="step1message"></div> |
5686 |
25 Oct 19 |
olle |
172 |
</div> |
5686 |
25 Oct 19 |
olle |
173 |
</div> |
5686 |
25 Oct 19 |
olle |
174 |
|
5695 |
04 Nov 19 |
olle |
175 |
<!-- |
5686 |
25 Oct 19 |
olle |
<div class="step" id="step-3"> |
5686 |
25 Oct 19 |
olle |
<div class="step-no">3</div> |
5695 |
04 Nov 19 |
olle |
178 |
--> |
5695 |
04 Nov 19 |
olle |
179 |
<div class="step" id="step-2"> |
5695 |
04 Nov 19 |
olle |
180 |
<div class="step-no">2</div> |
5686 |
25 Oct 19 |
olle |
181 |
<div class="step-title">Referral form download</div> |
5686 |
25 Oct 19 |
olle |
182 |
<div class="step-content"> |
5686 |
25 Oct 19 |
olle |
183 |
|
5686 |
25 Oct 19 |
olle |
184 |
<table class="step-form"> |
5686 |
25 Oct 19 |
olle |
185 |
</table> |
5695 |
04 Nov 19 |
olle |
186 |
<!-- |
5686 |
25 Oct 19 |
olle |
<div id="step3message"></div> |
5695 |
04 Nov 19 |
olle |
188 |
--> |
5695 |
04 Nov 19 |
olle |
189 |
<div id="step2message"></div> |
5686 |
25 Oct 19 |
olle |
190 |
</div> |
5686 |
25 Oct 19 |
olle |
191 |
</div> |
5686 |
25 Oct 19 |
olle |
192 |
|
5686 |
25 Oct 19 |
olle |
193 |
<div id="wizard-status"></div> |
5686 |
25 Oct 19 |
olle |
194 |
<div id="wizard-progress"></div> |
5686 |
25 Oct 19 |
olle |
195 |
|
5686 |
25 Oct 19 |
olle |
196 |
<div id="not-found" style="display: none;" class="bg-filled-100 fullborder"></div> |
5686 |
25 Oct 19 |
olle |
197 |
|
5686 |
25 Oct 19 |
olle |
198 |
<table class="navigation" id="navigation"> |
5686 |
25 Oct 19 |
olle |
199 |
<tr> |
5686 |
25 Oct 19 |
olle |
200 |
<td><base:button id="gocancel" title="Cancel" /></td> |
5686 |
25 Oct 19 |
olle |
201 |
<td><base:button id="gonext" title="Next" image="<%=home+"/images/gonext.png"%>" /></td> |
5686 |
25 Oct 19 |
olle |
202 |
<td><base:button id="gorestart" title="Restart" image="<%=home+"/images/goback.png"%>" /></td> |
5686 |
25 Oct 19 |
olle |
203 |
<td><base:button id="downloadformbatch1" title="Download form batch file 1" image="<%=home+"/images/download.png"%>" /></td> |
5686 |
25 Oct 19 |
olle |
204 |
<td><base:button id="downloadformbatch2" title="Download form batch file 2" image="<%=home+"/images/download.png"%>" /></td> |
5686 |
25 Oct 19 |
olle |
205 |
<td><base:button id="downloadlabelfile" title="Download serum label file" image="<%=home+"/images/download.png"%>" /></td> |
5686 |
25 Oct 19 |
olle |
206 |
<td><base:button id="updateuseditemidlist" title="Update used item ID list" image="<%=home+"/images/gonext.png"%>" /></td> |
5686 |
25 Oct 19 |
olle |
207 |
<td id="gonext-message" class="message"></td> |
5686 |
25 Oct 19 |
olle |
208 |
</tr> |
5686 |
25 Oct 19 |
olle |
209 |
</table> |
5686 |
25 Oct 19 |
olle |
210 |
|
5686 |
25 Oct 19 |
olle |
211 |
</form> |
5686 |
25 Oct 19 |
olle |
212 |
</div> |
5686 |
25 Oct 19 |
olle |
213 |
|
5686 |
25 Oct 19 |
olle |
214 |
</base:body> |
5686 |
25 Oct 19 |
olle |
215 |
</base:page> |
5686 |
25 Oct 19 |
olle |
216 |
<% |
5686 |
25 Oct 19 |
olle |
217 |
} |
5686 |
25 Oct 19 |
olle |
218 |
finally |
5686 |
25 Oct 19 |
olle |
219 |
{ |
5686 |
25 Oct 19 |
olle |
220 |
if (dc != null) dc.close(); |
5686 |
25 Oct 19 |
olle |
221 |
} |
5686 |
25 Oct 19 |
olle |
222 |
%> |