Changeset 1740
- Timestamp:
- Nov 22, 2012, 7:57:07 AM (10 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/export_monthly_oplist.jsp
r1721 r1740 41 41 url += '&time=' + frm.time.value; 42 42 url += '&exportSubtype='+(frm.exportSubtype.checked ? 1 : 0); 43 url += '&exportPatientId='+(frm.exportPatientId.checked ? 1 : 0); 43 44 if (preview) 44 45 { … … 128 129 { 129 130 position: absolute; 130 top: 9em;131 top: 11em; 131 132 bottom: 1em; 132 133 left: 20px; … … 229 230 </tr> 230 231 231 <tr >232 <tr style="vertical-align: top;"> 232 233 <td class="prompt">Optional columns</td> 233 234 <td class="input"> 234 235 <input type="checkbox" name="exportSubtype" value="1" id="exportSubtype"> 235 <label for="exportSubtype">Specimen/NoSpecimen</label> 236 <label for="exportSubtype">Specimen/NoSpecimen</label><br> 237 <input type="checkbox" name="exportPatientId" value="1" id="exportPatientId"> 238 <label for="exportPatientId">Patient ID</label> 236 239 </td> 237 240 <td class="help"><span id="subtype.message" class="message" style="display: none;"></span></td> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/ExportServlet.java
r1721 r1740 60 60 { 61 61 boolean exportSubtype = Values.getBoolean(req.getParameter("exportSubtype")); 62 boolean exportPatientId = Values.getBoolean(req.getParameter("exportPatientId")); 62 63 63 64 // This can be any time point in the desired month/year … … 142 143 String opDate = dateFormat.format(s.getCreationEvent().getEventDate()); 143 144 String subtype = exportSubtype ? s.getItemSubtype().getName() : null; 145 String patientId = exportPatientId ? patient.getName() : null; 144 146 String caseName = caseNamePattern.matcher(s.getName()).replaceFirst(""); 145 opDates.add(new PersonalOpDate(pnr, opDate, site, laterality, subtype, caseName, consent ));147 opDates.add(new PersonalOpDate(pnr, opDate, site, laterality, subtype, caseName, consent, patientId)); 146 148 } 147 149 } … … 155 157 resp.setCharacterEncoding("UTF-8"); 156 158 PrintWriter os = resp.getWriter(); 157 158 159 for (PersonalOpDate pop : opDates) 159 160 { … … 188 189 private final String caseName; 189 190 private final String consent; 190 191 PersonalOpDate(String pnr, String opDate, Site site, String laterality, String subtype, String caseName, String consent) 191 private final String patientId; 192 193 PersonalOpDate(String pnr, String opDate, Site site, String laterality, String subtype, String caseName, String consent, String patientId) 192 194 { 193 195 this.pnr = pnr; … … 198 200 this.caseName = caseName; 199 201 this.consent = consent; 202 this.patientId = patientId; 200 203 } 201 204 … … 203 206 public String toString() 204 207 { 205 return pnr + "\t" + caseName + "\t" + opDate + "\t" + 206 (laterality == null ? "" : laterality) + "\t" + 207 site.getName() + 208 (subtype==null ? "" : "\t" + subtype) + "\t" + 209 (consent == null ? "MISSING" : consent.toUpperCase()); 208 return pnr + "\t" + caseName + "\t" + opDate + 209 "\t" + (laterality == null ? "" : laterality) + 210 "\t" + site.getName() + 211 (subtype==null ? "" : "\t" + subtype) + 212 (patientId==null ? "" : "\t"+patientId)+ 213 "\t" + (consent == null ? "MISSING" : consent.toUpperCase()); 210 214 } 211 215
Note: See TracChangeset
for help on using the changeset viewer.