Changeset 5378
- Timestamp:
- 08/28/08 00:49:18 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/patientmatching/src/org/openmrs/module/patientmatching/PatientMatchingActivator.java
r5361 r5378 226 226 List<String> listExcludedProperties = new ArrayList<String>(); 227 227 228 Class[] classes = {Patient.class, PersonAddress.class, PersonName.class};229 228 List<String> propertyList = new ArrayList<String>(); 230 for (Class clazz : classes) { 231 propertyList.addAll(MatchingConfigUtilities.introspectBean(listExcludedProperties, clazz)); 232 } 229 propertyList.addAll(MatchingConfigUtilities.introspectBean(listExcludedProperties, Patient.class)); 233 230 234 231 for (String property : propertyList) { … … 243 240 } 244 241 } 242 243 propertyList = new ArrayList<String>(); 244 propertyList.addAll(MatchingConfigUtilities.introspectBean(listExcludedProperties, PersonName.class)); 245 246 PersonName personName = patient.getPersonName(); 247 248 for (String property : propertyList) { 249 String value = ""; 250 try { 251 String classProperty = property.substring(property.lastIndexOf(".") + 1); 252 value = BeanUtils.getProperty(personName, classProperty); 253 } catch (Exception e) { 254 logger.debug("Error getting the value for property: " + property, e); 255 } finally { 256 ret.addDemographic(property, value); 257 } 258 } 259 260 propertyList = new ArrayList<String>(); 261 propertyList.addAll(MatchingConfigUtilities.introspectBean(listExcludedProperties, PersonAddress.class)); 262 263 PersonAddress personAddress = patient.getPersonAddress(); 264 265 for (String property : propertyList) { 266 String value = ""; 267 try { 268 String classProperty = property.substring(property.lastIndexOf(".") + 1); 269 value = BeanUtils.getProperty(personAddress, classProperty); 270 } catch (Exception e) { 271 logger.debug("Error getting the value for property: " + property, e); 272 } finally { 273 ret.addDemographic(property, value); 274 } 275 } 245 276 246 277 PatientService patientService = Context.getPatientService(); openmrs-modules/patientmatching/web/src/org/openmrs/module/patientmatching/web/MatchingConfigUtilities.java
r5361 r5378 14 14 import java.util.List; 15 15 import java.util.Map; 16 import java.util.Set; 16 17 import java.util.TreeMap; 18 import java.util.TreeSet; 17 19 18 20 import org.apache.commons.beanutils.PropertyUtils; … … 368 370 } 369 371 370 List<String> globalIncludeColumns = new ArrayList<String>();372 Set<String> globalIncludeColumns = new TreeSet<String>(); 371 373 DedupMatchResultList list = new DedupMatchResultList(); 372 374 for (MatchingConfig matchingConfig : matchingConfigLists) { … … 406 408 407 409 List<Map<String, String>> buffer = new ArrayList<Map<String, String>>(); 408 409 Collections.sort(globalIncludeColumns);410 410 411 411 for (List<Record> recordList: records) {