=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2012-12-21 09:23:20 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2013-01-28 05:28:45 +0000 @@ -29,19 +29,13 @@ import java.util.HashSet; import java.util.Set; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; - import org.hisp.dhis.common.BaseIdentifiableObject; -import org.hisp.dhis.common.Dxf2Namespace; /** * @author Abyot Asalefew * @version $Id$ */ -@XmlRootElement( name = "patientAttribute", namespace = Dxf2Namespace.NAMESPACE ) -@XmlAccessorType( value = XmlAccessType.NONE ) + public class PatientAttribute extends BaseIdentifiableObject { === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAttributeService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAttributeService.java 2012-09-11 13:35:26 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAttributeService.java 2013-01-28 05:28:45 +0000 @@ -26,8 +26,11 @@ */ package org.hisp.dhis.patient; +import static org.hisp.dhis.i18n.I18nUtils.i18n; + import java.util.Collection; +import org.hisp.dhis.i18n.I18nService; import org.springframework.transaction.annotation.Transactional; /** @@ -49,6 +52,13 @@ this.patientAttributeStore = patientAttributeStore; } + private I18nService i18nService; + + public void setI18nService( I18nService service ) + { + i18nService = service; + } + // ------------------------------------------------------------------------- // Implementation methods // ------------------------------------------------------------------------- @@ -60,12 +70,12 @@ public Collection getAllPatientAttributes() { - return patientAttributeStore.getAll(); + return i18n( i18nService, patientAttributeStore.getAll() ); } public PatientAttribute getPatientAttribute( int id ) { - return patientAttributeStore.get( id ); + return i18n( i18nService, patientAttributeStore.get( id ) ); } public int savePatientAttribute( PatientAttribute patientAttribute ) @@ -80,32 +90,32 @@ public Collection getPatientAttributesByValueType( String valueType ) { - return patientAttributeStore.getByValueType( valueType ); + return i18n( i18nService, patientAttributeStore.getByValueType( valueType ) ); } public PatientAttribute getPatientAttributeByName( String name ) { - return patientAttributeStore.getByName( name ); + return i18n( i18nService, patientAttributeStore.getByName( name ) ); } - + public PatientAttribute getPatientAttributeByGroupBy( boolean groupBy ) { - return patientAttributeStore.getByGroupBy( groupBy ); + return i18n( i18nService, patientAttributeStore.getByGroupBy( groupBy ) ); } public Collection getOptionalPatientAttributesWithoutGroup() { - return patientAttributeStore.getOptionalPatientAttributesWithoutGroup(); + return i18n( i18nService, patientAttributeStore.getOptionalPatientAttributesWithoutGroup() ); } public Collection getPatientAttributesByMandatory( boolean mandatory ) { - return patientAttributeStore.getByMandatory( mandatory ); + return i18n( i18nService, patientAttributeStore.getByMandatory( mandatory ) ); } - + public Collection getPatientAttributesWithoutGroup() { - return patientAttributeStore.getWithoutGroup(); + return i18n( i18nService, patientAttributeStore.getWithoutGroup() ); } } === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramService.java 2013-01-23 10:27:28 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramService.java 2013-01-28 05:28:45 +0000 @@ -110,7 +110,7 @@ } } - return programs; + return i18n( i18nService, programs); } public Collection getPrograms( ValidationCriteria validationCriteria ) @@ -125,7 +125,7 @@ } } - return programs; + return i18n( i18nService, programs); } public Collection getPrograms( int type ) === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2013-01-24 03:09:30 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2013-01-28 05:28:45 +0000 @@ -269,6 +269,7 @@ + #foreach( $attribute in $patientAttributes ) - + #end * === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/detailsPartner.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/detailsPartner.vm 2013-01-23 10:27:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/detailsPartner.vm 2013-01-28 05:28:45 +0000 @@ -48,7 +48,7 @@ #foreach( $attribute in $partner.attributes ) #if( $patientAttributeValueMap.get( $attribute.id ) != " " ) - $attribute.name + $attribute.displayName : $encoder.htmlEncode($patientAttributeValueMap.get( $attribute.id )) #end === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/identifierAndAttributeForm.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/identifierAndAttributeForm.vm 2012-12-10 12:54:54 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/identifierAndAttributeForm.vm 2013-01-28 05:28:45 +0000 @@ -10,7 +10,7 @@ #foreach($attribute in $program.patientAttributes ) - + #if( $attribute.valueType == "YES/NO" ) @@ -187,7 +187,7 @@ #set( $attributeValue = $!patientAttributeValueMap.get( $attribute.id ) ) #if( $attribute.valueType != 'CALCULATED') - + #if( $attribute.valueType == "YES/NO" ) === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseDuplicate.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseDuplicate.vm 2013-01-23 10:27:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseDuplicate.vm 2013-01-28 05:28:45 +0000 @@ -24,7 +24,7 @@ #set( $key = $patient.id + "_" + $attribute.id ) #set( $attributeValue = $patientAttributeValueMap.get( $key ) ) - $encoder.xmlEncode( $attribute.name ) + $encoder.xmlEncode( $attribute.displayName ) $encoder.xmlEncode( $attributeValue ) #end === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseIdentifierTypes.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseIdentifierTypes.vm 2013-01-23 10:27:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseIdentifierTypes.vm 2013-01-28 05:28:45 +0000 @@ -13,7 +13,7 @@ #foreach( $attribute in $attributes ) { "id": ${attribute.id} , - "name": "$!encoder.jsonEncode( ${attribute.name} )" + "name": "$!encoder.jsonEncode( ${attribute.displayName} )" }#if( $velocityCount < $size ),#end #end], === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm 2013-01-23 10:27:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm 2013-01-28 05:28:45 +0000 @@ -16,7 +16,7 @@ #set( $attributeValue = false ) #set( $attributeValue = $patientAttributeValueMap.get( $attribute.id ) ) - $!encoder.xmlEncode( $attribute.name ) + $!encoder.xmlEncode( $attribute.displayName ) $!encoder.xmlEncode( $attributeValue ) #end === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatientDetails.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatientDetails.vm 2013-01-23 10:27:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatientDetails.vm 2013-01-28 05:28:45 +0000 @@ -15,7 +15,7 @@ #set( $attributeValue = false ) #set( $attributeValue = $patientAttributeValueMap.get( $attribute.id ) ) - $!encoder.xmlEncode( $attribute.name ) + $!encoder.xmlEncode( $attribute.displayName ) $!encoder.xmlEncode( $attributeValue ) #end === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatients.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatients.vm 2013-01-23 10:27:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatients.vm 2013-01-28 05:28:45 +0000 @@ -25,7 +25,7 @@ #set( $key = $patient.id + "_" + $attribute.id ) #set( $attributeValue = $patientAttributeValueMap.get( $key ) ) - $!encoder.xmlEncode( $attribute.name ) + $!encoder.xmlEncode( $attribute.displayName ) $!encoder.xmlEncode( $attributeValue ) #end === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-01-23 10:27:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-01-28 05:28:45 +0000 @@ -1,5 +1,4 @@ - @@ -71,7 +70,7 @@ #foreach( $attribute in $patientAttributes ) - + #end * @@ -101,7 +100,7 @@ #foreach( $attribute in $patientAttributes ) - + #end * === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/underAgeForm.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/underAgeForm.vm 2012-12-10 12:54:54 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/underAgeForm.vm 2013-01-28 05:28:45 +0000 @@ -99,7 +99,7 @@ === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm 2012-12-21 09:23:20 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm 2013-01-28 05:28:45 +0000 @@ -15,9 +15,7 @@ - - - + @@ -28,17 +26,12 @@ #foreach( $patientAttribute in $patientAttributes ) - + - - - -
$i18n.getString( "name" )
$encoder.htmlEncode( $patientAttribute.name )$encoder.htmlEncode( $patientAttribute.displayName ) $i18n.getString( 'edit' ) - - $i18n.getString( 'remove' ) - + $i18n.getString( 'translation_translate' ) + $i18n.getString( 'remove' ) $i18n.getString( 'show_details' )