=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java 2013-12-16 15:45:17 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java 2013-12-30 21:55:24 +0000
@@ -41,6 +41,8 @@
import org.hisp.dhis.patient.PatientIdentifier;
import org.hisp.dhis.patient.PatientIdentifierService;
import org.hisp.dhis.patient.PatientService;
+import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
+import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
import org.hisp.dhis.program.Program;
import org.hisp.dhis.program.ProgramInstance;
import org.hisp.dhis.program.ProgramInstanceService;
@@ -74,6 +76,13 @@
{
this.patientIdentifierService = patientIdentifierService;
}
+
+ private PatientAttributeValueService patientAttributeValueService;
+
+ public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService )
+ {
+ this.patientAttributeValueService = patientAttributeValueService;
+ }
private ProgramService programService;
@@ -212,14 +221,31 @@
private Collection patientIdentifiers;
+ public void setPatientIdentifiers( Collection patientIdentifiers )
+ {
+ this.patientIdentifiers = patientIdentifiers;
+ }
+
+ public PatientAttributeValueService getPatientAttributeValueService()
+ {
+ return patientAttributeValueService;
+ }
+
public Collection getPatientIdentifiers()
{
return patientIdentifiers;
}
-
- public void setPatientIdentifiers( Collection patientIdentifiers )
- {
- this.patientIdentifiers = patientIdentifiers;
+
+ private Collection patientAttributeValues;
+
+ public void setPatientAttributeValues( Collection patientAttributeValues )
+ {
+ this.patientAttributeValues = patientAttributeValues;
+ }
+
+ public Collection getPatientAttributeValues()
+ {
+ return patientAttributeValues;
}
private List listOfCompletedProgram;
@@ -279,6 +305,8 @@
relationshipTypes = relationshipTypeService.getAllRelationshipTypes();
patientIdentifiers = patientIdentifierService.getPatientIdentifiers( patient );
+
+ patientAttributeValues = patientAttributeValueService.getPatientAttributeValues( patient );
Collection listOfProgramInstance = patient.getProgramInstances();
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2013-12-16 18:01:29 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2013-12-30 21:55:24 +0000
@@ -258,6 +258,7 @@
+
- $i18n.getString("gender"): #if ($patient.gender == "F") Female #else Male #end
- #set($day = $patient.birthDate.date)
- #set($month = $patient.birthDate.month+1)
- #set($year = $patient.birthDate.year + 1900)
- - $i18n.getString("date_of_birth"): $year - $month - $day
- #if($patient.getPhoneNumber())
- - $i18n.getString("phone_number"): $patient.getPhoneNumber()
- #end
- $i18n.getString("orgunit"): $patient.getOrganisationUnit().getName() [$i18n.getString("change")]
#if($patient.getIsDead() == true) - $i18n.getString("status"): $i18n.getString("dead")
#end
#foreach($patientIdentifier in $patientIdentifiers)
@@ -111,6 +104,12 @@
- $patientIdentifier.getIdentifierType().getName(): $patientIdentifier.getIdentifier()
#end
#end
+
+ #foreach($pav in $patientAttributeValues)
+ #if($pav.getValue())
+ - $pav.getPatientAttribute().getName(): $pav.getValue()
+ #end
+ #end
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm 2013-11-13 07:16:38 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm 2013-12-30 21:55:24 +0000
@@ -28,72 +28,6 @@
#end
-
-
-
-
-
-
-
- #if( $validationMap.get( "dob" ) )
- $i18n.getString($validationMap.get( "dob" ))
- #end
-
-
-
-
- #if( $validationMap.get( "phoneNumber" ) )
-
$i18n.getString($validationMap.get( "phoneNumber" ))
- #end
-
-
- #if ($previousValues.get("phoneNumber"))
- #set($phoneValue = $previousValues.get("phoneNumber"))
- #else
- #set($phoneValue = $phoneNumberAreaCode)
- #end
-
-
-
#foreach($patientIdentifierType in $patientIdentifierTypes)
#if(! $patientIdentifierType.program)
@@ -109,24 +43,30 @@
#foreach($patientAttribute in $patientAttributes)
#if(! $patientAttribute.program)
#set($key = "AT${patientAttribute.id}")
-
+
#if( $validationMap.get( $key ) )
$i18n.getString($validationMap.get( $key ))
#end
- #if($patientAttribute.getValueType() == "COMBO")
+ #if($patientAttribute.getValueType() == "combo")
- #elseif( $patientAttribute.getValueType() == "YES/NO" )
-