=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java 2013-09-06 09:06:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java 2013-09-17 09:47:21 +0000
@@ -41,8 +41,10 @@
import org.hisp.dhis.patient.PatientAudit;
import org.hisp.dhis.patient.PatientAuditService;
import org.hisp.dhis.patient.PatientIdentifier;
+import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.patient.PatientService;
import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
+import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
import org.hisp.dhis.period.PeriodType;
import org.hisp.dhis.program.Program;
import org.hisp.dhis.program.ProgramIndicatorService;
@@ -81,6 +83,8 @@
private ProgramIndicatorService programIndicatorService;
+ private PatientAttributeValueService patientAttributeValueService;
+
// -------------------------------------------------------------------------
// Input && Output
// -------------------------------------------------------------------------
@@ -114,6 +118,11 @@
return programIndicatorsMap;
}
+ public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService )
+ {
+ this.patientAttributeValueService = patientAttributeValueService;
+ }
+
public void setPatientAuditService( PatientAuditService patientAuditService )
{
this.patientAuditService = patientAuditService;
@@ -215,7 +224,45 @@
relationships = relationshipService.getRelationshipsForPatient( patient );
Collection programInstances = programInstanceService.getProgramInstances( patient );
-
+
+ // ---------------------------------------------------------------------
+ // Get patient-attribute-values
+ // ---------------------------------------------------------------------
+
+ Collection _attributeValues = patientAttributeValueService
+ .getPatientAttributeValues( patient );
+ attributeValues = new HashSet();
+
+ for ( Program program : programs )
+ {
+ Collection atttributes = program.getPatientAttributes();
+ for ( PatientAttributeValue attributeValue : _attributeValues )
+ {
+ if ( atttributes.contains( attributeValue.getPatientAttribute() ) )
+ {
+ attributeValues.add( attributeValue );
+ }
+ }
+ }
+
+ // ---------------------------------------------------------------------
+ // Get patient-identifiers
+ // ---------------------------------------------------------------------
+
+ Collection _identifiers = patient.getIdentifiers();
+ identifiers = new HashSet();
+
+ for ( Program program : programs )
+ {
+ Collection identifierTypes = program.getPatientIdentifierTypes();
+ for ( PatientIdentifier identifier : _identifiers )
+ {
+ if ( !identifierTypes.contains( identifier.getIdentifierType() ) )
+ {
+ identifiers.add( identifier );
+ }
+ }
+ }
// ---------------------------------------------------------------------
// Get program enrollment
// ---------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-09-17 06:08:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-09-17 09:47:21 +0000
@@ -1123,6 +1123,8 @@
+
$!programIndicatorsMap.get($key)
#end
+ #foreach( $identifier in $identifiers )
+
+ #if($!identifier.identifierType)
+ $!identifier.identifierType.displayName |
+ #else
+ $i18n.getString("system_identifier") |
+ #end
+ $identifier.identifier |
+
+ #end
#foreach( $attributeValue in $attributeValues )
$attributeValue.patientAttribute.displayName |
@@ -90,15 +100,6 @@
#end
- #foreach( $identifier in $identifiers )
-
- #if($!identifier.identifierType)
- #else
- $i18n.getString("system_identifier") |
- $identifier.identifier |
- #end
-
- #end
@@ -216,7 +217,7 @@
$i18n.getString("relationships")
#if( $auth.hasAccess( "dhis-web-caseentry", "showAddRelationshipPatient" ) )
- • $i18n.getString("add_new_patient")
+ • $i18n.getString("add_relative")
#end
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-09-17 06:08:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-09-17 09:47:21 +0000
@@ -221,14 +221,14 @@
- $i18n.getString("relationship_details") |
+ $i18n.getString("who_is_the_new_relative_to_the_existing_person") |
|
- $i18n.getString("program_related") |
+ $i18n.getString("program_for_new_relative_to_be_enrolled_in") |
|
- $i18n.getString("relationship_details") |
+ $i18n.getString("who_is_the_new_relative_to_the_existing_person") |
|
- $i18n.getString("program_related") |
+ $i18n.getString("program_for_new_relative_to_be_enrolled_in") |
|