← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8252: Validation rules for patient data elements with type as text.

 

------------------------------------------------------------
revno: 8252
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-09-25 16:12:30 +0700
message:
  Validation rules for patient data elements with type as text.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addMultiProgramValidationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addSingleProgramValidationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/dateProgramValidationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/scheduleSendMessage.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateMultiProgramValidationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateSingleProgramValidationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties


--
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-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java	2012-07-30 10:10:18 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java	2012-09-25 09:12:30 +0000
@@ -66,6 +66,8 @@
     private final String regExp = "\\[" + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([a-zA-Z0-9\\- ]+["
         + SEPARATOR_ID + "[0-9]*]*)" + "\\]";
 
+    private final String regExpComparator = "(<|>|<=|>|>=|==|!=)+";
+
     private final String INVALID_CONDITION = "Invalid condition";
 
     private ProgramValidationStore validationStore;
@@ -189,41 +191,6 @@
         return result;
     }
 
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-
-    private boolean runExpression( String expression, ProgramStageInstance programStageInstance )
-    {
-        StringBuffer description = new StringBuffer();
-
-        Pattern pattern = Pattern.compile( regExp );
-
-        Matcher matcher = pattern.matcher( expression );
-
-        while ( matcher.find() )
-        {
-            String match = matcher.group();
-
-            PatientDataValue dataValue = getPatientDataValue( match, programStageInstance );
-
-            if ( dataValue == null )
-            {
-                return true;
-            }
-
-            matcher.appendReplacement( description, dataValue.getValue() );
-        }
-
-        matcher.appendTail( description );
-
-        final JEP parser = new JEP();
-
-        parser.parseExpression( description.toString() );
-
-        return (parser.getValue() == 1.0);
-    }
-
     public boolean runDateExpression( ProgramValidation programValidation, ProgramStageInstance programStageInstance,
         I18nFormat format )
     {
@@ -373,6 +340,85 @@
     // Supportive methods
     // -------------------------------------------------------------------------
 
+    private String SUM_OPERATOR_IN_EXPRESSION = "+";
+
+    private String NOT_NULL_VALUE_IN_EXPRESSION = "{NOT-NULL-VALUE}";
+
+    private boolean runExpression( String expression, ProgramStageInstance programStageInstance )
+    {
+        String comparetor = "";
+        Pattern pattern = Pattern.compile( regExpComparator );
+        Matcher matcher = pattern.matcher( expression );
+        if ( matcher.find() )
+        {
+            comparetor = matcher.group();
+        }
+
+        String[] sides = expression.split( regExpComparator );
+        String leftSideValue = getOneSideExpressionValue( sides[0].trim(), programStageInstance );
+        String rightSideValue = getOneSideExpressionValue( sides[1].trim(), programStageInstance );
+
+        if ( expression.indexOf( SUM_OPERATOR_IN_EXPRESSION ) != -1 )
+        {
+            if ( leftSideValue == null || rightSideValue == null )
+            {
+                return true;
+            }
+
+            String result = leftSideValue + comparetor + rightSideValue;
+            final JEP parser = new JEP();
+            parser.parseExpression( result );
+            return (parser.getValue() == 1.0);
+        }
+        else
+        {
+            if ( rightSideValue.equals( NOT_NULL_VALUE_IN_EXPRESSION ) )
+            {
+                return leftSideValue == null ? false : true;
+            }
+            else if ( comparetor.equals( "==" ) && leftSideValue.equals( rightSideValue ) )
+            {
+                return true;
+            }
+            else if ( !comparetor.equals( "==" ) && !leftSideValue.equals( rightSideValue ) )
+            {
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+
+    }
+
+    private String getOneSideExpressionValue( String expression, ProgramStageInstance programStageInstance )
+    {
+        StringBuffer description = new StringBuffer();
+
+        Pattern pattern = Pattern.compile( regExp );
+
+        Matcher matcher = pattern.matcher( expression );
+
+        while ( matcher.find() )
+        {
+            String match = matcher.group();
+
+            PatientDataValue dataValue = getPatientDataValue( match, programStageInstance );
+
+            if ( dataValue == null )
+            {
+                return null;
+            }
+
+            matcher.appendReplacement( description, dataValue.getValue() );
+        }
+
+        matcher.appendTail( description );
+
+        return description.toString();
+    }
+
     private PatientDataValue getPatientDataValue( String match, ProgramStageInstance programStageInstance )
     {
         match = match.replaceAll( "[\\[\\]]", "" );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java	2012-08-16 15:47:08 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java	2012-09-25 09:12:30 +0000
@@ -54,7 +54,6 @@
 import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.program.ProgramStageDataElement;
 import org.hisp.dhis.program.ProgramStageInstance;
-import org.hisp.dhis.program.ProgramStageInstanceService;
 import org.hisp.dhis.program.ProgramValidation;
 import org.hisp.dhis.program.ProgramValidationService;
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2012-09-25 05:18:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2012-09-25 09:12:30 +0000
@@ -298,4 +298,5 @@
 add_more = Add more ...
 inherit = Inherit
 auto_generate_event = Auto-generate event
-generated_by_enrollment_date = Generated by enrollment date
\ No newline at end of file
+generated_by_enrollment_date = Generated by enrollment date
+execute_success = Execute successfully
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml	2012-09-25 06:44:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml	2012-09-25 09:12:30 +0000
@@ -945,7 +945,7 @@
 	    
 	    <action name="executeSendMessage" class="org.hisp.dhis.patient.action.schedule.ExecuteSendMessageAction">
 	      <result name="success" type="velocity-json">
-				/dhis-web-maintenance-patient/ajax/jsonResponseScheduleTasks.vm</result>
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 	      <param name="requiredAuthorities">F_SCHEDULING_SEND_MESSAGE</param>
 	    </action>
 		

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addMultiProgramValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addMultiProgramValidationForm.vm	2012-07-30 10:10:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addMultiProgramValidationForm.vm	2012-09-25 09:12:30 +0000
@@ -69,27 +69,31 @@
 	</tr>
 	<tr>
 		<td>
-			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "leftStageDescription", "leftSide", "+" );' class="imgButton"/>
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "leftStageDescription", "leftSide", "+" );' class="imgButton" />
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "leftStageDescription", "leftSide", "<" );' class="imgButton" />
 			<img src="../images/less_or_equal.png" alt="$i18n.getString( 'less_or_equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "<=" );' class="imgButton" />
 			<img src="../images/greater.png" alt="$i18n.getString( 'greater' )" onclick='insertOperator( "leftStageDescription", "leftSide", ">" );' class="imgButton" />
 			<img src="../images/greater_or_equal.png" alt="$i18n.getString( 'greater_or_equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", ">=" );' class="imgButton" />
-			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "==" );' class="imgButton"/>
+			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "==" );' class="imgButton" />
 			<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "leftStageDescription", "leftSide", "!=" );' class="imgButton"/>
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-			<img src="../images/clear.png" align="right" alt="$i18n.getString( 'clear' )" onclick="clearValidation( 'leftSide', 'leftStageDescription' )" class="imgButton"/>
+			&nbsp;&nbsp;&nbsp;
+			<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "leftStageDescription", "leftSide", "=={NOT-NULL-VALUE}" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;
+			<img src="../images/clear.png" alt="$i18n.getString( 'clear' )" align='right'  onclick="clearValidation( 'leftSide', 'leftStageDescription' )" />
 		</td>
 		<td>
 			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "rightStageDescription", "rightSide", "+" );' class="imgButton" />
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "rightStageDescription", "rightSide", "<" );' class="imgButton" />
 			<img src="../images/less_or_equal.png" alt="$i18n.getString( 'less_or_equal' )" onclick='insertOperator( "rightStageDescription", "rightSide", "<=" );' class="imgButton" />
 			<img src="../images/greater.png" alt="$i18n.getString( 'greater' )" onclick='insertOperator( "rightStageDescription", "rightSide", ">" );' class="imgButton" >
 			<img src="../images/greater_or_equal.png" alt="$i18n.getString( 'greater_or_equal' )" onclick='insertOperator( "rightStageDescription", "rightSide", ">=" );' class="imgButton" >
 			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "rightStageDescription", "rightSide", "==" );' class="imgButton" />
 			<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "rightStageDescription", "rightSide", "!=" );' class="imgButton" />
-			
+			&nbsp;&nbsp;&nbsp;
+			<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "leftStageDescription", "rightSide", "=={NOT-NULL-VALUE}" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/clear.png" align='right' alt="$i18n.getString( 'clear' )" onclick="clearValidation( 'rightSide', 'rightStageDescription' )" class="imgButton" />
 		</td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addSingleProgramValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addSingleProgramValidationForm.vm	2012-07-31 04:16:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addSingleProgramValidationForm.vm	2012-09-25 09:12:30 +0000
@@ -47,14 +47,16 @@
 	<tr>
 		<td>
 			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "leftStageDescription", "leftSide", "+" );' class="imgButton" />
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "leftStageDescription", "leftSide", "<" );' class="imgButton" />
 			<img src="../images/less_or_equal.png" alt="$i18n.getString( 'less_or_equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "<=" );' class="imgButton" />
 			<img src="../images/greater.png" alt="$i18n.getString( 'greater' )" onclick='insertOperator( "leftStageDescription", "leftSide", ">" );' class="imgButton" />
 			<img src="../images/greater_or_equal.png" alt="$i18n.getString( 'greater_or_equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", ">=" );' class="imgButton" />
 			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "==" );' class="imgButton" />
 			<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "leftStageDescription", "leftSide", "!=" );' class="imgButton"/>
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			&nbsp;&nbsp;&nbsp;
+			<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "leftStageDescription", "leftSide", "=={NOT-NULL-VALUE}" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/clear.png" alt="$i18n.getString( 'clear' )" align='right'  onclick="clearValidation( 'leftSide', 'leftStageDescription' )" />
 		</td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/dateProgramValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/dateProgramValidationForm.vm	2012-02-11 13:58:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/dateProgramValidationForm.vm	2012-09-25 09:12:30 +0000
@@ -38,7 +38,7 @@
 				
 				<script>
 					var dataElementId = '$dataElement.id';
-					var rightSide = '$!validationMap.get($dataElement.id).rightSide';
+					var rightSide = "$!validationMap.get($dataElement.id).rightSide";
 					parseRightSide( dataElementId, rightSide );
 				</script>
 				

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js	2012-07-30 10:10:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js	2012-09-25 09:12:30 +0000
@@ -1,4 +1,3 @@
-
 var COLOR_GREEN = '#b9ffb9';
 var COLOR_WHITE = '#ffffff'
 
@@ -66,7 +65,6 @@
 	getValidationDescription( decriptionDiv, target );
 }
 
-
 function getValidationDescription( decriptionDiv, sideDiv )
 {
 	$.postUTF8("getProgramValidationDescription.action",
@@ -94,34 +92,17 @@
 	clearListById( 'leftSideDE' );
 	
 	var programStage = document.getElementById( 'leftStage' );
-	var psId = programStage.options[ programStage.selectedIndex ].value;
-	if( psId == '') return;
-  
-	$.ajax({
-		url: 'getAggPSDataElements.action?psId=' + psId,
-		dataType: "xml",
-		success: getLeftPrgramStageDataElementsCompleted
-	});  
-}
-
-function getLeftPrgramStageDataElementsCompleted( dataelementElement )
-{
-	var programstageDE = byId( 'leftSideDE' );
-	var programstageDEList = $(dataelementElement).find( 'dataelement' );
- 
-	$( programstageDEList ).each( function( i, item )
-        {
-            var id = $( item ).find("id").text();
-			var name = $( item ).find("name").text();
-			var type = $( item ).find("type").text(); 
-
-			var option = document.createElement("option");
-			option.value = id;
-			option.text = name;
-			option.title = name;
-			jQuery(option).attr({data:"{type:'"+type+"'}"});
-			programstageDE.add(option, null);  			
-        } );
+	var programStageId = programStage.options[ programStage.selectedIndex ].value;
+	if( programStageId == '') return;
+	
+	jQuery.getJSON( "getPatientDataElements.action", {
+		programStageId:programStageId
+	}, function(json){
+		for ( i in json.dataElements ) {
+			var id = '[DE:' + programStageId + '.' + json.dataElements[i].id + ']';
+			jQuery( '#leftSideDE').append( '<option value="' + id + '">' + json.dataElements[i].name + '</option>' );
+		}
+	});   
 }
 
 //------------------------------------------------------------------------------
@@ -133,34 +114,18 @@
 	clearListById( 'rightSideDE' );
   	
 	var programStage = document.getElementById( 'rightStage' );
-	var psId = programStage.options[ programStage.selectedIndex ].value;
-	if( psId == '') return;
+	var programStageId = programStage.options[ programStage.selectedIndex ].value;
+	if( programStageId == '') return;
   
-	$.ajax({
-		url: 'getAggPSDataElements.action?psId=' + psId,
-		dataType: "xml",
-		success: getRightPrgramStageDataElementsCompleted
-	});  
-}
-
-function getRightPrgramStageDataElementsCompleted( dataelementElement )
-{
-	var programstageDE = document.getElementById( 'rightSideDE' );
-	var programstageDEList = $(dataelementElement).find( 'dataelement' );
- 
-	$( programstageDEList ).each( function( i, item )
-    {
-		var id = $( item ).find("id").text();
-		var name = $( item ).find("name").text();
-		var type = $( item ).find("type").text(); 
-		
-		var option = document.createElement("option");
-		option.value = id;
-		option.text = name;
-		option.title = name;
-		jQuery(option).attr({data:"{type:'"+type+"'}"});
-		programstageDE.add(option, null); 
-	});
+	jQuery.getJSON( "getPatientDataElements.action", {
+		programStageId:programStageId
+	}, function(json){
+		for ( i in json.dataElements ) {
+			var id = '[DE:' + programStageId + '.' + json.dataElements[i].id + ']';
+			jQuery( '#rightSideDE').append( '<option value="' + id + '">' + json.dataElements[i].name + '</option>' );
+		}
+	}); 
+	
 }
 
 function getDateDataElements()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js	2012-09-17 03:32:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js	2012-09-25 09:12:30 +0000
@@ -24,6 +24,6 @@
 		gateWayId: getFieldValue("gatewayId"),
 		timeSendingMessage: getFieldValue("timeSendingMessage")
 	}, function( json ){
-		setMessage(i18n_scheduling_is + " " + json.scheduleTasks.status);
+		setMessage(i18n_execute_success);
 	});
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/scheduleSendMessage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/scheduleSendMessage.vm	2012-09-25 06:44:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/scheduleSendMessage.vm	2012-09-25 09:12:30 +0000
@@ -31,4 +31,5 @@
 	var i18n_start = '$encoder.jsEscape( $i18n.getString( "start" ) , "'" )';
 	var i18n_stop = '$encoder.jsEscape( $i18n.getString( "stop" ) , "'" )';
 	var i18n_scheduling_is = '$encoder.jsEscape( $i18n.getString( "scheduling_is" ) , "'" )';
+	var i18n_execute_success = '$encoder.jsEscape( $i18n.getString( "execute_success" ) , "'" )';
 </script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateMultiProgramValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateMultiProgramValidationForm.vm	2012-07-30 10:10:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateMultiProgramValidationForm.vm	2012-09-25 09:12:30 +0000
@@ -67,29 +67,32 @@
 		</td>
 	</tr>
 	<tr>
-		
 		<td>
-			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "leftStageDescription", "leftSide", "+" );' class="imgButton"/>
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "leftStageDescription", "leftSide", "+" );' class="imgButton" />
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "leftStageDescription", "leftSide", "<" );' class="imgButton" />
 			<img src="../images/less_or_equal.png" alt="$i18n.getString( 'less_or_equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "<=" );' class="imgButton" />
 			<img src="../images/greater.png" alt="$i18n.getString( 'greater' )" onclick='insertOperator( "leftStageDescription", "leftSide", ">" );' class="imgButton" />
 			<img src="../images/greater_or_equal.png" alt="$i18n.getString( 'greater_or_equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", ">=" );' class="imgButton" />
-			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "==" );' class="imgButton"/>
+			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "==" );' class="imgButton" />
 			<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "leftStageDescription", "leftSide", "!=" );' class="imgButton"/>
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-			<img src="../images/clear.png" align="right" alt="$i18n.getString( 'clear' )" onclick="clearValidation( 'leftSide', 'leftStageDescription' )" class="imgButton"/>
+			&nbsp;&nbsp;&nbsp;
+			<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "leftStageDescription", "leftSide", "=={NOT-NULL-VALUE}" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;
+			<img src="../images/clear.png" alt="$i18n.getString( 'clear' )" align='right'  onclick="clearValidation( 'leftSide', 'leftStageDescription' )" />
 		</td>
 		<td>
 			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "rightStageDescription", "rightSide", "+" );' class="imgButton" />
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "rightStageDescription", "rightSide", "<" );' class="imgButton" />
 			<img src="../images/less_or_equal.png" alt="$i18n.getString( 'less_or_equal' )" onclick='insertOperator( "rightStageDescription", "rightSide", "<=" );' class="imgButton" />
 			<img src="../images/greater.png" alt="$i18n.getString( 'greater' )" onclick='insertOperator( "rightStageDescription", "rightSide", ">" );' class="imgButton" >
 			<img src="../images/greater_or_equal.png" alt="$i18n.getString( 'greater_or_equal' )" onclick='insertOperator( "rightStageDescription", "rightSide", ">=" );' class="imgButton" >
 			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "rightStageDescription", "rightSide", "==" );' class="imgButton" />
 			<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "rightStageDescription", "rightSide", "!=" );' class="imgButton" />
-			
+			&nbsp;&nbsp;&nbsp;
+			<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "leftStageDescription", "rightSide", "=={NOT-NULL-VALUE}" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/clear.png" align='right' alt="$i18n.getString( 'clear' )" onclick="clearValidation( 'rightSide', 'rightStageDescription' )" class="imgButton" />
 		</td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateSingleProgramValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateSingleProgramValidationForm.vm	2012-07-30 10:10:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateSingleProgramValidationForm.vm	2012-09-25 09:12:30 +0000
@@ -46,14 +46,16 @@
 	<tr>
 		<td>
 			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "leftStageDescription", "leftSide", "+" );' class="imgButton" />
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "leftStageDescription", "leftSide", "<" );' class="imgButton" />
 			<img src="../images/less_or_equal.png" alt="$i18n.getString( 'less_or_equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "<=" );' class="imgButton" />
 			<img src="../images/greater.png" alt="$i18n.getString( 'greater' )" onclick='insertOperator( "leftStageDescription", "leftSide", ">" );' class="imgButton" />
 			<img src="../images/greater_or_equal.png" alt="$i18n.getString( 'greater_or_equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", ">=" );' class="imgButton" />
 			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "leftStageDescription", "leftSide", "==" );' class="imgButton" />
 			<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "leftStageDescription", "leftSide", "!=" );' class="imgButton"/>
-			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			&nbsp;&nbsp;&nbsp;
+			<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "leftStageDescription", "leftSide", "=={NOT-NULL-VALUE}" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;
 			<img src="../images/clear.png" alt="$i18n.getString( 'clear' )" align='right'  onclick="clearValidation( 'leftSide', 'leftStageDescription' )" />
 		</td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2012-09-24 08:35:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2012-09-25 09:12:30 +0000
@@ -151,6 +151,7 @@
 F_PATIENT_DATAVALUE_ADD = Add Person Data Value
 F_PATIENT_DATAVALUE_UPDATE = Update Person Data Value
 F_PATIENT_DATAVALUE_DELETE = Delete Person Data Value
+F_ACTIVITY_PLAN = Search Activity Plan
 F_GENERATE_ACTIVITY_PLANS = Generate Activity Plans
 F_GENERATE_PROGRAM_SUMMARY_REPORT = Generate Program Summary Report
 F_GENERATE_BENEFICIARY_TABULAR_REPORT = Generate Person Tabular report