=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java 2013-02-13 16:20:07 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java 2013-03-05 04:09:58 +0000 @@ -195,55 +195,73 @@ Integer id = Integer.parseInt( identifierMatcher.group( 1 ) ); PatientIdentifierType identifierType = identifierTypeService.getPatientIdentifierType( id ); - // Get value - String value = ""; - if ( patient != null ) - { - PatientIdentifier patientIdentifier = identifierService.getPatientIdentifier( identifierType, - patient ); - if ( patientIdentifier != null ) - { - value = patientIdentifier.getIdentifier(); - } - } - - inputHtml = "/"; + } + else + { + // Get value + String value = ""; + if ( patient != null ) + { + PatientIdentifier patientIdentifier = identifierService.getPatientIdentifier( identifierType, + patient ); + if ( patientIdentifier != null ) + { + value = patientIdentifier.getIdentifier(); + } + } + + inputHtml = " 0 ) { Integer id = Integer.parseInt( dynamicAttrMatcher.group( 1 ) ); PatientAttribute attribute = attributeService.getPatientAttribute( id ); - // Get value - String value = ""; - if ( patient != null ) - { - PatientAttributeValue attributeValue = attributeValueService.getPatientAttributeValue( patient, - attribute ); - if ( attributeValue != null ) + if ( attribute == null ) + { + inputHtml = "/"; + } + else + { + + // Get value + String value = ""; + if ( patient != null ) { - value = attributeValue.getValue(); + PatientAttributeValue attributeValue = attributeValueService.getPatientAttributeValue( patient, + attribute ); + if ( attributeValue != null ) + { + value = attributeValue.getValue(); + } } + + inputHtml = getAttributeField( inputHtml, attribute, value, i18n, index ); } - inputHtml = getAttributeField( inputHtml, attribute, value, i18n, index ); } else if ( programMatcher.find() && programMatcher.groupCount() > 0 ) { === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-03-04 14:05:33 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-03-05 04:09:58 +0000 @@ -570,4 +570,6 @@ enter_a_number = Enter a number for = For date_scheduled = Date scheduled -visit_schedule_form = Visit schedule \ No newline at end of file +visit_schedule_form = Visit schedule +missing_patient_attribute = Missing person attribute +missing_patient_identifier_type = Missing patient identifier type \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm 2013-03-04 14:05:33 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm 2013-03-05 04:09:58 +0000 @@ -39,7 +39,21 @@ #end - $patient.getFullName() + + #set($value="") + #foreach( $identifierType in $identifierTypes) + #foreach( $identifier in $patient.identifiers) + #if($identifier.identifierType.id==$identifierType.id) + #set($value=$identifier.identifier) + #end + #end + #end + #if($value=="") + #set($value=$patient.getFullName()) + #end + + $value + $!patient.phoneNumber === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm 2013-03-04 14:05:33 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm 2013-03-05 04:09:58 +0000 @@ -124,6 +124,7 @@