=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValuesAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValuesAction.java 2013-03-07 05:59:08 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValuesAction.java 2013-03-07 16:01:54 +0000 @@ -61,8 +61,6 @@ implements Action { private static final Log LOG = LogFactory.getLog( SaveValueAction.class ); - - private static final String PREFIX_DATA_ELEMENT = "DE"; // ------------------------------------------------------------------------- // Dependencies @@ -196,13 +194,14 @@ { String dataElementFieldId = programStage.getId() + "-" + psDataElement.getDataElement().getId() + "-val"; String value = request.getParameter( dataElementFieldId ); - if ( value != null && value.trim().length()>0) + if ( value != null && value.trim().length() > 0 ) { String providedElsewhereId = programStage.getId() + "_" + psDataElement.getDataElement().getId() + "_facility"; boolean providedElsewhere = (request.getParameter( providedElsewhereId ) == null) ? false : true; - PatientDataValue patientDataValue = new PatientDataValue( programStageInstance, psDataElement.getDataElement(), new Date(), value.trim() ); + PatientDataValue patientDataValue = new PatientDataValue( programStageInstance, + psDataElement.getDataElement(), new Date(), value.trim() ); patientDataValue.setStoredBy( storedBy ); patientDataValue.setProvidedElsewhere( providedElsewhere ); patientDataValueService.savePatientDataValue( patientDataValue ); === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveIdentifierAndAttributeAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveIdentifierAndAttributeAction.java 2012-09-20 13:04:02 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveIdentifierAndAttributeAction.java 2013-03-07 16:01:54 +0000 @@ -38,6 +38,7 @@ import org.hisp.dhis.patient.PatientAttribute; import org.hisp.dhis.patient.PatientAttributeOption; import org.hisp.dhis.patient.PatientAttributeOptionService; +import org.hisp.dhis.patient.PatientAttributeService; import org.hisp.dhis.patient.PatientIdentifier; import org.hisp.dhis.patient.PatientIdentifierService; import org.hisp.dhis.patient.PatientIdentifierType; @@ -67,6 +68,8 @@ private PatientAttributeValueService patientAttributeValueService; + private PatientAttributeService patientAttributeService; + private PatientAttributeOptionService patientAttributeOptionService; private ProgramService programService; @@ -90,6 +93,11 @@ this.patientService = patientService; } + public void setPatientAttributeService( PatientAttributeService patientAttributeService ) + { + this.patientAttributeService = patientAttributeService; + } + public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService ) { this.patientAttributeValueService = patientAttributeValueService; @@ -209,7 +217,7 @@ String value = null; - Collection attributes = program.getPatientAttributes(); + Collection attributes = patientAttributeService.getAllPatientAttributes(); PatientAttributeValue attributeValue = null; === 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-03-06 14:31:30 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-03-07 16:01:54 +0000 @@ -670,6 +670,7 @@ + - #if( $attribute.valueType == "YES/NO" ) + #if( $attribute.valueType == "bool" ) - #elseif( $attribute.valueType == "DATE" ) + #elseif( $attribute.valueType == "date" ) - #elseif( $attribute.valueType == "COMBO" ) + #elseif( $attribute.valueType == "combo" ) - - - - - #elseif( $attribute.valueType == "DATE" ) - - - #elseif( $attribute.valueType == "COMBO" ) - - #else - - #end - - + #if( $attribute.valueType!='calculated') + #set( $attributeValue = '') + #set( $attributeValue = $!patientAttributeValueMap.get( $attribute.id ) ) + + + + #if( $attribute.valueType == "bool" ) + + #elseif( $attribute.valueType == "date" ) + + + #elseif( $attribute.valueType == "combo" ) + + #else + + #end + + + #end #set( $mark = !$mark ) #end   === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/relationshipList.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/relationshipList.vm 2012-12-10 12:54:54 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/relationshipList.vm 2013-03-07 16:01:54 +0000 @@ -39,7 +39,7 @@ $encoder.htmlEncode( $patientAttributeValue.patientAttribute.name ): - #if( $patientAttributeValue.patientAttribute.valueType=="YES/NO") + #if( $patientAttributeValue.patientAttribute.valueType=="bool") $i18n.getString("$patientAttributeValue.value") #else $encoder.htmlEncode( $patientAttributeValue.value )