=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2013-04-18 06:45:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2013-05-06 07:12:06 +0000
@@ -25,6 +25,7 @@
+ #if( $auth.hasAccess( "dhis-web-caseentry", "accessPatientAttributes" ) )
#foreach( $attribute in $patientAttributes )
#if($attribute)#end
#end
@@ -35,34 +36,42 @@
#if( $identifierTypes.size()==0 )
#end
-
-
-
-
+
+
+
+
+ #end
+
#if($mapPatientOrgunit.size()!=0)
-
+
#end
-
+
+
# |
- #foreach( $attribute in $patientAttributes )
- #if($attribute)
- $encoder.htmlEncode($attribute.displayName) |
- #end
- #end
-
- #foreach( $identifierType in $identifierTypes)
- $encoder.htmlEncode($identifierType.displayName) |
- #end
- #if( $identifierTypes.size()==0 )
- $i18n.getString( "full_name" ) |
- #end
- $i18n.getString( "gender" ) |
- $i18n.getString( "date_of_birth" ) |
- $i18n.getString( "age" ) |
- $i18n.getString( "phone_number" ) |
+ #if( $auth.hasAccess( "dhis-web-caseentry", "accessPatientAttributes" ) )
+
+ #foreach( $attribute in $patientAttributes )
+ #if($attribute)
+ $encoder.htmlEncode($attribute.displayName) |
+ #end
+ #end
+
+ #foreach( $identifierType in $identifierTypes)
+ $encoder.htmlEncode($identifierType.displayName) |
+ #end
+ #if( $identifierTypes.size()==0 )
+ $i18n.getString( "full_name" ) |
+ #end
+ $i18n.getString( "gender" ) |
+ $i18n.getString( "date_of_birth" ) |
+ $i18n.getString( "age" ) |
+ $i18n.getString( "phone_number" ) |
+ #else
+ $i18n.getString("system_identifier") |
+ #end
#if($mapPatientOrgunit.size()!=0)
$i18n.getString( "hierachy_orgunit" ) |
#end
@@ -79,53 +88,67 @@
$nr
- #foreach( $attribute in $patientAttributes )
- #if( $attribute )
- #set ( $key = $patient.id + '-' + $attribute.id )
-
- #if( $attribute.valueType == 'bool')
- $i18n.getString( $mapPatientPatientAttr.get($key) )
- #else
- $mapPatientPatientAttr.get($key)
- #end
- |
- #end
- #end
-
- #set($value="")
- #foreach( $identifierType in $identifierTypes)
- #foreach( $identifier in $patient.identifiers)
- #if($identifier.identifierType.id==$identifierType.id)
- #set($value=$identifier.identifier)
- #end
- #if($!identifier.identifierType)
- #else
- #set($systemId=$identifier.identifier)
- #end
- #end
- #end
- #if($value=="")
- #set($value=$!patient.getFullName())
- #end
- #if($value=="")
- #foreach( $identifier in $patient.identifiers)
- #if($!identifier.identifierType)
- #else
- #set($value=$identifier.identifier)
- #end
- #end
- #end
-
- $encoder.htmlEncode($value)
- |
-
- #if($!patient.gender) $i18n.getString($!patient.gender) #end |
-
- #if($!patient.birthDate) $format.formatDate( $!patient.birthDate) #end |
-
- #if($!patient.birthDate) $!patient.getAge() #end |
-
- $!patient.phoneNumber |
+ #if( $auth.hasAccess( "dhis-web-caseentry", "accessPatientAttributes" ) )
+
+ #foreach( $attribute in $patientAttributes )
+ #if( $attribute )
+ #set ( $key = $patient.id + '-' + $attribute.id )
+
+ #if( $attribute.valueType == 'bool')
+ $i18n.getString( $mapPatientPatientAttr.get($key) )
+ #else
+ $mapPatientPatientAttr.get($key)
+ #end
+ |
+ #end
+ #end
+
+ #set($value="")
+ #foreach( $identifierType in $identifierTypes)
+ #foreach( $identifier in $patient.identifiers)
+ #if($identifier.identifierType.id==$identifierType.id)
+ #set($value=$identifier.identifier)
+ #end
+ #if($!identifier.identifierType)
+ #else
+ #set($systemId=$identifier.identifier)
+ #end
+ #end
+ #end
+ #if($value=="")
+ #set($value=$!patient.getFullName())
+ #end
+ #if($value=="")
+ #foreach( $identifier in $patient.identifiers)
+ #if($!identifier.identifierType)
+ #else
+ #set($value=$identifier.identifier)
+ #end
+ #end
+ #end
+
+ $encoder.htmlEncode($value)
+ |
+
+ #if($!patient.gender) $i18n.getString($!patient.gender) #end |
+
+ #if($!patient.birthDate) $format.formatDate( $!patient.birthDate) #end |
+
+ #if($!patient.birthDate) $!patient.getAge() #end |
+
+ $!patient.phoneNumber |
+ #else
+ #set($value="")
+ #foreach( $identifier in $patient.identifiers)
+ #if($!identifier.identifierType)
+ #else
+ #set($value=$identifier.identifier)
+ #end
+ #end
+
+ $value
+ |
+ #end
#if($mapPatientOrgunit.size()!=0)
$!mapPatientOrgunit.get($patient.id) |
|