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