Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 3864

Show
Ignore:
Timestamp:
04/07/08 22:29:33 (8 months ago)
Author:
bmckown
Message:

Clinical Summary Module: Changed CD4 count reminder messages.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/clinicalsummary/src/org/openmrs/module/clinicalsummary/SummaryExportFunctions.java

    r3854 r3864  
    255255    public String getCD4CountReminder() throws Exception { 
    256256        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"); 
    258259        GregorianCalendar tomorrow = new GregorianCalendar(); 
    259260        tomorrow.add(Calendar.DAY_OF_MONTH, 1); 
     
    266267        // No CD4 count. 
    267268        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)."; 
    269270        } 
    270271        // More than one CD4 count 
     
    297298                conceptDatetime.setTime(o.getObsDatetime()); 
    298299                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)."; 
    300301                } else if (conceptDatetime.after(sixMosAgo) 
    301302                        && conceptDatetime.before(tomorrow)) { 
    302303                    Calendar nextCD4 = (Calendar) conceptDatetime.clone(); 
    303304                    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                            + ")."); 
    306311                } else { 
    307312                    return " "; 
     
    311316        return " "; 
    312317    } 
    313  
     318     
    314319    /** 
    315320     * Returns a patient property as a list