Changeset 3864
- Timestamp:
- 04/07/08 22:29:33 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/clinicalsummary/src/org/openmrs/module/clinicalsummary/SummaryExportFunctions.java
r3854 r3864 255 255 public String getCD4CountReminder() throws Exception { 256 256 boolean duplicateCD4Obs = false; 257 DateFormat dateFormat = new SimpleDateFormat("MMMMM, yyyy"); 257 DateFormat reminderFormat = new SimpleDateFormat("MMMMM, yyyy"); 258 DateFormat obsFormat = new SimpleDateFormat("dd-MMM-yyyy"); 258 259 GregorianCalendar tomorrow = new GregorianCalendar(); 259 260 tomorrow.add(Calendar.DAY_OF_MONTH, 1); … … 266 267 // No CD4 count. 267 268 if (obs.isEmpty()) { 268 return " No CD4 count has been taken. Please check CD4 count now.";269 return "Please order CD4 count now (no prior CD4 count on record)."; 269 270 } 270 271 // More than one CD4 count … … 297 298 conceptDatetime.setTime(o.getObsDatetime()); 298 299 if (conceptDatetime.before(sixMosAgo)) { 299 return " CD4 count needs rechecked. Please check CD4 count now.";300 return "Please order CD4 count now (last CD4 count over 6 months ago)."; 300 301 } else if (conceptDatetime.after(sixMosAgo) 301 302 && conceptDatetime.before(tomorrow)) { 302 303 Calendar nextCD4 = (Calendar) conceptDatetime.clone(); 303 304 nextCD4.add(Calendar.MONTH, 6); 304 return new String("Please check CD4 count in " 305 + dateFormat.format(nextCD4.getTime()) + "."); 305 return new String("Next CD4 count due in " 306 + reminderFormat.format(nextCD4.getTime()) 307 + " (last CD4 count was " + o.getValueNumeric() 308 + " on " 309 + obsFormat.format(conceptDatetime.getTime()) 310 + ")."); 306 311 } else { 307 312 return " "; … … 311 316 return " "; 312 317 } 313 318 314 319 /** 315 320 * Returns a patient property as a list