=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java' --- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2014-05-09 10:07:18 +0000 +++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2014-05-12 06:45:39 +0000 @@ -772,6 +772,10 @@ { patientModel.setTrackedEntityName( patient.getTrackedEntity().getName() ); } + else + { + patientModel.setTrackedEntityName( "" ); + } this.setSetting( getSettings() ); @@ -1597,6 +1601,28 @@ } } } + + //get tracked entity with no tracked entity name + resultSet += "Others$"; + for ( TrackedEntityInstance patient : patients ) + { + if ( patient.getTrackedEntity() == null) + { + resultSet += patient.getId() + "/"; + String attText = ""; + for ( TrackedEntityAttribute displayAttribute : displayAttributes ) + { + TrackedEntityAttributeValue value = attValueService.getTrackedEntityAttributeValue( patient, + displayAttribute ); + if ( value != null ) + { + attText += value.getValue() + " "; + } + } + attText = attText.trim(); + resultSet += attText + "$"; + } + } return resultSet; }