Changeset 1741
- Timestamp:
- Nov 22, 2012, 9:13:19 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
r1740 r1741 73 73 { 74 74 var allLines = request.responseText.split('\n'); 75 var numLines = allLines.length - 1; 76 75 var numCases = allLines.length - 2; // First line is a header line 76 77 var html = '<tr><th>'+allLines[0].replace(/\t/g, '</th><th>')+'</th></tr>'; 77 78 // Check last column for the 'Consent' value. All should be 'YES' for the export to be ok. 78 79 var numNoConsent = 0; 79 80 var numMissingConsent = 0; 80 for (var i = 0 ; i < numLines; i++)81 for (var i = 1 ; i <= numCases; i++) 81 82 { 82 83 var line = allLines[i]; 83 var lastColIdx = line.lastIndexOf('\t');84 var lastCol = line.substr(lastColIdx+1);85 86 if ( lastCol!= 'YES')84 var cols = line.split(/\t/); 85 var consent = cols[cols.length-1]; 86 var rowClass = ''; 87 if (consent != 'YES') 87 88 { 88 if (lastCol == 'MISSING') 89 rowClass = 'consent-warning'; 90 if (consent == 'MISSING') 89 91 { 90 92 numMissingConsent++; … … 94 96 numNoConsent++; 95 97 } 96 allLines[i] = '<span class="consent-warning">'+line+'</span>';97 98 } 99 html += '<tr class="'+rowClass+'"><td>'+cols.join('</td><td>')+'</td></tr>'; 98 100 } 99 101 … … 106 108 } 107 109 108 previewTitle.innerHTML = 'Operation dates - ' + frm.time[frm.time.selectedIndex].text + ' (' + num Lines + ')';109 previewList.innerHTML = allLines.join('\n');110 previewTitle.innerHTML = 'Operation dates - ' + frm.time[frm.time.selectedIndex].text + ' (' + numCases + ')'; 111 previewList.innerHTML = '<table>'+html+'</table>'; 110 112 Main.show('previewWrapper'); 111 113 } … … 156 158 } 157 159 160 #previewList th 161 { 162 border-bottom: 1px dotted #A0A0A0; 163 } 164 165 #previewList td, #previewList th 166 { 167 text-align: left; 168 padding-right: 2em; 169 vertical-align: bottom; 170 } 171 158 172 .consent-warning 159 173 { 160 font-weight: bold;161 174 color: #A00000; 162 175 background-color: #F8F8E8; 163 176 } 164 177 165 .consent-warning:after 166 { 167 content: url('images/warning_small.png'); 168 vertical-align: middle; 178 .consent-warning td:last-child 179 { 180 background-image: url('images/warning_small.png'); 181 background-position: 95% 50%; 182 background-repeat: no-repeat; 169 183 } 170 184 -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/ExportServlet.java
r1740 r1741 157 157 resp.setCharacterEncoding("UTF-8"); 158 158 PrintWriter os = resp.getWriter(); 159 os.write("PersonalNr\tScanBId\tOpDate\tLaterality\tSite"); 160 if (exportSubtype) os.write("\tSpecimen"); 161 if (exportPatientId) os.write("\tPatientId"); 162 os.write("\tConsent\n"); 163 159 164 for (PersonalOpDate pop : opDates) 160 165 {
Note: See TracChangeset
for help on using the changeset viewer.