dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21674
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10325: [mobile] display relationship in better way
------------------------------------------------------------
revno: 10325
committer: Long <Long@Long-Laptop>
branch nick: dhis2
timestamp: Wed 2013-03-20 00:49:33 +0700
message:
[mobile] display relationship in better way
modified:
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java 2013-03-19 07:07:28 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java 2013-03-19 17:49:33 +0000
@@ -399,7 +399,7 @@
{
ProgramStageInstance programStageInstance = programStageInstanceService
.getProgramStageInstance( this.programStageInstanceId );
- ProgramInstance programInstance = programStageInstance.getProgramInstance();
+ ProgramInstance programInstance = programStageInstance.getProgramInstance();
for ( ProgramStageDataElement programStageDataElement : programStageDataElements )
{
@@ -445,7 +445,7 @@
}
programStageInstance.setCompleted( true );
programStageInstanceService.updateProgramStageInstance( programStageInstance );
-
+
programInstance.setCompleted( true );
programInstanceService.updateProgramInstance( programInstance );
}
@@ -478,15 +478,21 @@
String id = "DE" + dataElement.getId();
- patientDataValue.setValue( parameterMap.get( id ) );
-
- patientDataValue.setProgramStageInstance( programStageInstance );
-
- patientDataValue.setProvidedElsewhere( false );
-
- patientDataValue.setTimestamp( new Date() );
-
- patientDataValueService.savePatientDataValue( patientDataValue );
+ String value = parameterMap.get( id );
+
+ if ( value != null && !value.trim().equals( "" ) )
+ {
+
+ patientDataValue.setValue( parameterMap.get( id ) );
+
+ patientDataValue.setProgramStageInstance( programStageInstance );
+
+ patientDataValue.setProvidedElsewhere( false );
+
+ patientDataValue.setTimestamp( new Date() );
+
+ patientDataValueService.savePatientDataValue( patientDataValue );
+ }
}
}
SessionUtils.removeSessionVar( "prevDataValues" );
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm 2013-01-28 09:42:58 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm 2013-03-19 17:49:33 +0000
@@ -103,7 +103,7 @@
#if( $relatedPeople.size() > 0)
#foreach( $key in $relatedPeople.keySet() )
#set ( $person = $relatedPeople.get($key))
- <li><a href="showPatientProgramList.action?patientId=$person.id">$!encoder.htmlEncode( $person.fullName ) ($key.getRelationshipType().getName())</a> -
+ <li><a href="showPatientProgramList.action?patientId=$person.id">$!encoder.htmlEncode( $person.fullName ) ($key.getRelationshipType().getbIsToA())</a> -
<a href="deleteRelationship.action?currentPatientId=$patient.id&relationshipTypeId=$key.id">Remove</a></li>
#end
#else