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