source: extensions/net.sf.basedb.reggie/trunk/resources/personal/map-external-data.jsp @ 5740

Last change on this file since 5740 was 5740, checked in by Nicklas Nordborg, 3 years ago

Merged Reggie 4.23.3 to the trunk.

File size: 5.8 KB
Line 
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%>
13<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
14<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
15<%
16final SessionControl sc = Base.getExistingSessionControl(request, "net.sf.basedb.reggie", true);
17final String ID = sc.getId();
18final float scale = Base.getScale(sc);
19final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.reggie");
20
21DbControl dc = null;
22try
23{
24  dc = sc.newDbControl();
25  final User user = User.getById(dc, sc.getLoggedInUserId());
26%>
27<base:page type="default" >
28<base:head 
29  scripts="~../reggie-2.js,~map-external-data.js" 
30  styles="path.css,~../css/reggie-2.css"
31>
32<style>
33#preview
34{
35  white-space: pre;
36  font-size: 90%;
37  color: #444444;
38  background-color: #f0f0f0;
39  overflow: hidden;
40  min-height: 5em;
41  /* Sizing settings that aims to make it align more or less to the file field */
42  width: 33rem;
43  border-width: 1px;
44  border-radius: 4px;
45  padding: 3px 0.5em;
46  margin: 0 0 0.5em 1px;
47  box-sizing: content-box;
48}
49
50#more-lines
51{
52  border-top-width: 1px;
53  border-top-style: dotted;
54  color: #000000;
55  margin-top: 0.25em;
56}
57</style>
58</base:head>
59<base:body>
60
61  <p:path><p:pathelement 
62    title="Reggie" href="<%="../index.jsp?ID="+ID%>" 
63    /><p:pathelement title="Map external data to releases" 
64    /></p:path>
65
66  <div class="content">
67  <form name="reggie" id="wizard" class="wizard">
68 
69  <div class="step" id="step-1">
70    <div class="step-no">1</div>
71    <div class="step-title">Select a source data file</div>
72    <div class="step-content">
73     
74      <table class="step-form">
75      <tr class="align-top">
76        <td class="prompt">File</td>
77        <td class="input">
78          <input type="file" name="file" id="file" class="required" style="width: 95%;" accept=".csv,.tsv">
79        </td>
80        <td class="status" id="file.status"></td>
81        <td class="help" rowspan="2"><span id="file.message" class="message"></span>
82          <ul>
83          <li>Select a tab-separated text file in UTF-8 encoding.
84          <li>The first line should contain column headers.
85          <li>The first column should contain the personal number, or a release id value as specified by the <b>Map from</b> option.
86          <li>The wizard will replace the first column with the value or values specified by the <b>Map to</b> option.
87          <li>If no matching patient can be found the line is skipped.
88          </ul>
89        </td>
90      </tr>
91      <tr class="align-top">
92        <td class="subprompt">preview</td>
93        <td>
94          <div id="preview"><i>No file loaded...</i></div>
95        </td>
96        <td></td>
97      </tr>
98      <tr>
99        <td class="prompt">Map from</td>
100        <td class="input">
101          <select name="mapFrom" id="mapFrom">
102            <option value="PersonalNo">Personal number
103            <option value="PAD">PAD
104            <option value="PatientId">Patient release ID
105            <option value="CaseId">Case release ID
106            <option value="SpecimenId">Specimen release ID
107          </select>
108        </td>
109        <td class="status" id="mapFrom.status"></td>
110        <td class="help"><span id="mapFrom.message" class="message"></span>
111          Select the kind of values that are found in the first column.
112        </td>
113      </tr>
114      <tr>
115        <td class="prompt">Map to</td>
116        <td class="input" style="padding-top: 4px; padding-bottom: 4px;">
117          <div id="exportPersonalNo" style="display: none;"><input type="checkbox" checked disabled>Personal number</div>
118          <div id="alsoExportPad" style="display: none;"><label><input type="checkbox" name="exportPad" id="exportPad">PAD</label></div>
119          <div id="exportPatientId" style="display: none;"><input type="checkbox" checked disabled>Patient release ID</div>
120          <div id="alsoExportCaseId" style="display: none;"><label><input type="checkbox" name="exportCaseId" id="exportCaseId">Case release ID</label></div>
121          <div id="alsoExportSpecimenId" style="display: none;"><label><input type="checkbox" name="exportSpecimenId" id="exportSpecimenId">Specimen release ID</label></div>
122        </td>
123        <td class="status" id="mapTo.status"></td>
124        <td class="help"><span id="mapTo.message" class="message"></span>
125          Select the kind of values that should be outputted in the first column and, optionally, in extra columns.
126        </td>
127      </tr>
128      <tr>
129        <td class="prompt">Output order</td>
130        <td class="input" style="padding-top: 4px; padding-bottom: 4px;">
131          <label><input type="radio" name="outputOrder" id="sortOutputOrder" checked>Sort by first column</label><br>
132          <label><input type="radio" name="outputOrder" id="keepOutputOrder">Same as input file</label>
133        </td>
134        <td class="status" id="outputOrder.status"></td>
135        <td class="help"><span id="outputOrder.message" class="message"></span>
136          Select if the output file should be sorted by the value in the first column
137          or keep the same order as the input file.
138        </td>
139      </tr>
140      </table>
141    </div>
142  </div>
143
144  <div id="wizard-status"></div>
145  <div id="wizard-progress"></div>
146
147  <table class="navigation" id="navigation">
148  <tr>
149    <td><base:button id="gocancel" title="Cancel" /></td>
150    <td><base:button id="goexport" title="Export" image="<%=home+"/images/gonext.png"%>" /></td>
151    <td><base:button id="gorestart" title="Restart" image="<%=home+"/images/goback.png"%>" /></td>
152    <td><base:button id="godownload" title="Download" image="<%=home+"/images/download.png"%>" /></td>
153    <td id="gonext-message" class="message"></td>
154  </tr>
155  </table>
156 
157  </form>
158  </div>
159 
160</base:body>
161</base:page>
162<%
163}
164finally
165{
166  if (dc != null) dc.close();
167}
168%>
Note: See TracBrowser for help on using the repository browser.