Show
Ignore:
Timestamp:
12/11/09 12:44:47 (2 years ago)
Author:
wouter
Message:

Added attempt to extract name initials for employees

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • his/tags/1.9.7/data/src/main/java/org/joiningtracks/his/data/attributemapper/EmployeeAttributesMapper.java

    r1726 r2463  
    2525          if (attrs.get("initials") != null) { 
    2626              newEmp.setInitials((String) attrs.get("initials").get()); 
     27          } else if (attrs.get("givenName") != null) { 
     28                String givenName = (String)attrs.get("givenName").get(); 
     29                if (givenName.length() > 0) { 
     30                    newEmp.setInitials(givenName.substring(0,1) + "."); 
     31                } 
    2732          } 
    2833          // TODO: get gender from source, perhaps employeeType?