extensions/net.sf.basedb.meludi/trunk/resources/personal/generate-referral-forms_alt_lucas.jsp

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