Changeset 1721
- Timestamp:
- Sep 24, 2012, 1:16:11 PM (11 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/export_monthly_oplist.jsp
r1676 r1721 71 71 else 72 72 { 73 var numLines = request.responseText.split('\n').length - 1; 73 var allLines = request.responseText.split('\n'); 74 var numLines = allLines.length - 1; 75 76 // Check last column for the 'Consent' value. All should be 'YES' for the export to be ok. 77 var numNoConsent = 0; 78 var numMissingConsent = 0; 79 for (var i = 0 ; i < numLines; i++) 80 { 81 var line = allLines[i]; 82 var lastColIdx = line.lastIndexOf('\t'); 83 var lastCol = line.substr(lastColIdx+1); 84 85 if (lastCol != 'YES') 86 { 87 if (lastCol == 'MISSING') 88 { 89 numMissingConsent++; 90 } 91 else 92 { 93 numNoConsent++; 94 } 95 allLines[i] = '<span class="consent-warning">'+line+'</span>'; 96 } 97 } 98 99 if (numMissingConsent > 0 || numNoConsent > 0) 100 { 101 var previewWarning = document.getElementById('previewWarning'); 102 var warning = '<img src="images/warning.png" alt="!">'; 103 warning += ' Found ' + (numNoConsent+numMissingConsent) + ' case(s) with denied or missing consent!'; 104 previewWarning.innerHTML = warning; 105 } 106 74 107 previewTitle.innerHTML = 'Operation dates - ' + frm.time[frm.time.selectedIndex].text + ' (' + numLines + ')'; 75 previewList.innerHTML = request.responseText;108 previewList.innerHTML = allLines.join('\n'); 76 109 Main.show('previewWrapper'); 77 110 } … … 98 131 bottom: 1em; 99 132 left: 20px; 100 width: 850px;133 width: 950px; 101 134 overflow: visible; 102 135 } … … 109 142 width: 950px; 110 143 overflow: auto; 111 112 144 white-space: pre; 113 145 font-family: monospace; … … 121 153 { 122 154 font-weight: bold; 155 } 156 157 .consent-warning 158 { 159 font-weight: bold; 160 color: #A00000; 161 background-color: #F8F8E8; 162 } 163 164 .consent-warning:after 165 { 166 content: url('images/warning_small.png'); 167 vertical-align: middle; 123 168 } 124 169 … … 212 257 213 258 <div id="previewWrapper" style="display: none;"> 214 <div id="previewTitle">Preview</div> 259 <div> 260 <span id="previewTitle">Preview</span> 261 <span id="previewWarning"></span> 262 </div> 215 263 <div id="previewList"></div> 216 264 </div> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/ExportServlet.java
r1680 r1721 133 133 // Get the personal number of the patient 134 134 String pnr = (String)Annotationtype.PERSONAL_NUMBER.getAnnotationValue(dc, manager, patient); 135 135 136 if (pnr != null) 136 137 { … … 138 139 Site site = Site.findByCaseName(s.getName()); 139 140 String laterality = (String)Annotationtype.LATERALITY.getAnnotationValue(dc, manager, theCase); 141 String consent = (String)Annotationtype.CONSENT.getAnnotationValue(dc, manager, theCase); 140 142 String opDate = dateFormat.format(s.getCreationEvent().getEventDate()); 141 143 String subtype = exportSubtype ? s.getItemSubtype().getName() : null; 142 144 String caseName = caseNamePattern.matcher(s.getName()).replaceFirst(""); 143 opDates.add(new PersonalOpDate(pnr, opDate, site, laterality, subtype, caseName ));145 opDates.add(new PersonalOpDate(pnr, opDate, site, laterality, subtype, caseName, consent)); 144 146 } 145 147 } … … 185 187 private final String subtype; 186 188 private final String caseName; 187 188 PersonalOpDate(String pnr, String opDate, Site site, String laterality, String subtype, String caseName) 189 private final String consent; 190 191 PersonalOpDate(String pnr, String opDate, Site site, String laterality, String subtype, String caseName, String consent) 189 192 { 190 193 this.pnr = pnr; … … 194 197 this.subtype = subtype; 195 198 this.caseName = caseName; 199 this.consent = consent; 196 200 } 197 201 … … 202 206 (laterality == null ? "" : laterality) + "\t" + 203 207 site.getName() + 204 (subtype==null ? "" : "\t" + subtype); 208 (subtype==null ? "" : "\t" + subtype) + "\t" + 209 (consent == null ? "MISSING" : consent.toUpperCase()); 205 210 } 206 211
Note: See TracChangeset
for help on using the changeset viewer.