← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16328: local/in Maintenance RBF work in progress

 

------------------------------------------------------------
revno: 16328
committer: Mithilesh Kumar Thakur <mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-08-06 07:19:35 +0100
message:
  local/in Maintenance RBF work in progress
modified:
  local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/SaveValueAction.java
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/dataEntrySelection.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/pbfDataEntry.js
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/menu.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/pbfReportForm.vm
  local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/qualityScoreEntrySelection.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 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/SaveValueAction.java'
--- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/SaveValueAction.java	2014-07-28 09:27:00 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/SaveValueAction.java	2014-08-06 06:19:35 +0000
@@ -354,16 +354,39 @@
         {
             if( valueType.equals("1") )
             {
-        	pbfDataValue.setQuantityReported( Integer.parseInt( value ) );
+                Integer intVal = null;
+                if( value != null && !value.trim().equals( "" ) )
+                {
+                    intVal = Integer.parseInt( value );
+                }
+        	pbfDataValue.setQuantityReported( intVal );
+        	
+        	System.out.println(" PBF Value 1 " + intVal );
             }
             else if( valueType.equals("2") )
             {
-        	pbfDataValue.setQuantityValidated( Integer.parseInt( value ) );
+                Integer intVal = null;
+                if( value != null && !value.trim().equals( "" ) )
+                {
+                    intVal = Integer.parseInt( value );
+                }
+                
+                System.out.println(" PBF Value 2 " + intVal );
+                
+        	pbfDataValue.setQuantityValidated( intVal );
+        	
             }
             
             else if( valueType.equals("3") )
             {
-                pbfDataValue.setQuantityExternalVerification( Integer.parseInt( value ) );
+                Integer intVal = null;
+                if( value != null && !value.trim().equals( "" ) )
+                {
+                    intVal = Integer.parseInt( value );
+                }
+                System.out.println(" PBF Value 3 " + intVal );
+                
+                pbfDataValue.setQuantityExternalVerification( intVal );
             }
             
             pbfDataValue.setStoredBy(storedBy);

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/dataEntrySelection.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/dataEntrySelection.vm	2014-08-04 06:49:50 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/dataEntrySelection.vm	2014-08-06 06:19:35 +0000
@@ -88,11 +88,13 @@
 	
 </div>
 
-<div class="inputCriteria" style="width:625px;height:90px;">
+<div class="inputCriteria" style="width:800px;height:90px;">
 <table>
 	<tr>
 		<td><label for="orgUnitName">$i18n.getString( "organisation_unit" )</label></td>
-		<td><input type="text" id="orgUnitName" name = "orgUnitName" readonly="readonly" value="$!organisationUnit.name" style="width:352px"></td>
+		<td><input type="text" id="orgUnitName" name = "orgUnitName" readonly="readonly"value="$!organisationUnit.name" style="width:352px"></td>
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
 	</tr>
 	
 	<tr>
@@ -105,6 +107,8 @@
 				#end
 			</select>
 		</td>
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
 		
     </tr>	
 
@@ -120,7 +124,7 @@
 			<input type="button" id="nextButton" disabled="disabled" style="width:75px" value="$i18n.getString( 'next_year' )" title="$i18n.getString('later_periods')" onclick="getAvailablePeriodsTemp( 'selectedPeriodId', 'selectedPeriodId', '1' )" >
 		</td>
 		
-		<td><label for="utilization_rate ">$i18n.getString( "Utilization Rate " )</label></td>
+		<td align="right"><label for="utilization_rate ">$i18n.getString( "Utilization Rate " )</label></td>
 		<td><input type="text" id="utilizationRate" name = "utilizationRate" style="text-align:center;width:75px;" onblur="saveUtilizationRateDataValue();" onkeyup="getUtilizationRateTariffValue();" ></td>			
 		
 	</tr>		

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/pbfDataEntry.js'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/pbfDataEntry.js	2014-08-04 06:49:50 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/pbfDataEntry.js	2014-08-06 06:19:35 +0000
@@ -159,15 +159,41 @@
 	var period = document.getElementById("selectedPeriodId").value;
 	var dataSetId = $( '#dataSetId' ).val();
 	var valueId = "";
+	
+	var qtyReportedFieldId = "pbfdv_qty_reported_"+dataElementId;
+	
+	var qtyValidatedFieldId = "pbfdv_qty_validated_"+dataElementId;
+	
+	var qtyRreported = document.getElementById( qtyReportedFieldId ).value;
+	
+	var qtyValidated = document.getElementById( qtyValidatedFieldId ).value;
+	
 	if( valueType == 1 )
 	{
 		valueId = "pbfdv_qty_reported_"+dataElementId;
 	}
+	
 	else if( valueType == 2 )
 	{
-		valueId = "pbfdv_qty_validated_"+dataElementId;
-		
-		saveDataInDataValue( dataElementId );
+		//alert( qtyRreported + ":" + qtyValidated )
+		
+		if(  parseInt(qtyValidated)  > parseInt(qtyRreported)   )
+		{
+			alert( "Quantity Validated should less or equal to Quantity Reported" );
+			document.getElementById( qtyValidatedFieldId ).value = "";
+			return;
+		}
+		
+		else
+		{
+			valueId = "pbfdv_qty_validated_"+dataElementId;
+		
+			saveDataInDataValue( dataElementId );
+		}
+		
+		//valueId = "pbfdv_qty_validated_"+dataElementId;
+		
+		//saveDataInDataValue( dataElementId );
 		
 	}
 	

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm	2014-08-04 06:49:50 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm	2014-08-06 06:19:35 +0000
@@ -52,6 +52,7 @@
 #if ( $dataElements.size() > 0)
 
 <table class="formSection" id="dataEntryTable" style="width:100%">
+    
 	<tr bgcolor="#CBDDEB">
 		<th style="width:35%;">$i18n.getString( "dataelement" )</th>
 		<th style="text-align: center;width:15%;">$i18n.getString( "qty_reported" )</th>

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/menu.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/menu.vm	2014-08-04 06:49:50 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/menu.vm	2014-08-06 06:19:35 +0000
@@ -67,7 +67,7 @@
     </ul>
 #end
 
-#if( $auth.hasAccess( "dhis-web-maintenance-rbf", "pbfReportForm") )
+#if( $auth.hasAccess( "dhis-web-maintenance-rbf", "getAllLookups") )
     <h2>$i18n.getString( "Lookup" )</h2>
     <ul>
     	<li><a href="getAllLookups.action">$i18n.getString( "Lookup" )</a></li>

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/pbfReportForm.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/pbfReportForm.vm	2014-08-04 06:49:50 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/pbfReportForm.vm	2014-08-06 06:19:35 +0000
@@ -67,127 +67,125 @@
 		
 		var orgUnitGroupName = tempOrgUnitGroupNameMap[orgUnitId];
 		
-		alert( orgUnitGroupName );
+		//alert( orgUnitGroupName );
 		
 		
 		if( rprDesign == "MH_PATIENT_ALLOWANCE_CLAIM")
 		{
-			if( orgUnitGroupName == "Health Center")
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/Mathealth_report3_HC.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			
-			else if( orgUnitGroupName == "Province Hospitals")
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/Mathealth_report3_PH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			
-			else if( orgUnitGroupName == "District hospital type A" || orgUnitGroupName == "District hospital type B" )
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/Mathealth_report3_DH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			
-			else 
-			{ 
-				showWarningMessage( "Selected Facility Not Related to any group" );
-				//return false; 
-			}		
+			if( orgUnitGroupName == "Reporting Health Center")
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/Mathealth_report3_HC.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			
+			else if( orgUnitGroupName == "Reporting Province Hospitals")
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/Mathealth_report3_PH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			
+			else if( orgUnitGroupName == "Reporting District hospital" )
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/Mathealth_report3_DH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+
+
+			else
+			{
+				   showWarningMessage( "Selected Facility Not Related to any group" );
+				   //return false;
+			}
 			
 		}
 		
 		else if( rprDesign == "HEALTH_PROVIDER_PAYMENT_CLAIM")
 		{
-			if( orgUnitGroupName == "Health Center")
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/Healthprovider_HC_report4.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			
-			else if( orgUnitGroupName == "Province Hospitals")
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/healthprovider_report4_PH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			
-			else if( orgUnitGroupName == "District hospital type A" || orgUnitGroupName == "District hospital type B" )
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/healthprovider_DH_report4.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			else 
-			{ 
-				showWarningMessage( "Selected Facility Not Related to any group" );
-				//return false; 
-			}					
+			if( orgUnitGroupName == "Reporting Health Center")
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/Healthprovider_HC_report4.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			
+			else if( orgUnitGroupName == "Reporting Province Hospitals")
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/healthprovider_report4_PH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			
+			else if( orgUnitGroupName == "Reporting District hospital" )
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/healthprovider_DH_report4.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			else
+			{
+				   showWarningMessage( "Selected Facility Not Related to any group" );
+				   //return false;
+			}
+			
 		}		
 		
 		else if( rprDesign == "MATERNAL_HEALTH")
 		{
-			if( orgUnitGroupName == "Health Center")
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/MATERNAL_HEALTH_HC.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			
-			else if( orgUnitGroupName == "Province Hospitals")
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/Mathealth_PH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			
-			else if( orgUnitGroupName == "District hospital type A" || orgUnitGroupName == "District hospital type B" )
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/Mathealth_DH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			else 
-			{ 
-				showWarningMessage( "Selected Facility Not Related to any group" );
-				//return false; 
-			}					
+			if( orgUnitGroupName == "Reporting Health Center")
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/MATERNAL_HEALTH_HC.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			
+			else if( orgUnitGroupName == "Reporting Province Hospitals")
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/Mathealth_PH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			
+			else if( orgUnitGroupName == "Reporting District hospital" )
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/Mathealth_DH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			else
+			{
+				   showWarningMessage( "Selected Facility Not Related to any group" );
+				   //return false;
+			}
+			
 		}
 		
 		else if( rprDesign == "MONTHLY_PPS")
 		{
-			if( orgUnitGroupName == "Health Center")
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/monthly_pps.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-				
-				/*
-				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/Mathealth_report3_PH.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-				*/
-				
-			}
-			
-			else if( orgUnitGroupName == "Province Hospitals")
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/monthly_pps.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			
-			else if( orgUnitGroupName == "District hospital type A" || orgUnitGroupName == "District hospital type B" )
-			{
-				var birtReportURL = "http://178.79.144.205:8989/birt/run?__report=/home/dqa/tomcat_pbf_laos/webapps/birt/report/monthly_pps.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
-				window.location.href =  birtReportURL;
-			}
-			else 
-			{ 
-				showWarningMessage( "Selected Facility Not Related to any group" );
-				//return false; 
-			}					
+			if( orgUnitGroupName == "Reporting Health Center")
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/monthly_pps.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			
+			else if( orgUnitGroupName == "Reporting Province Hospitals")
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/monthly_pps.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			
+			else if( orgUnitGroupName == "Reporting District hospital" )
+			{
+				var birtReportURL = "/birt/run?__report=/home/dhis2sever2/tomcat-8/webapps/birt/report/monthly_pps.rptdesign&__format="+reportFormat+"&startDate="+startPeriod+"&endDate="+endPeriod+"&orgUnit="+orgUnitId;
+				window.location.href =  birtReportURL;
+			}
+			else
+			{
+				   showWarningMessage( "Selected Facility Not Related to any group" );
+				   //return false;
+			}
+			
+		}
+
+		else
+		{
+			   showWarningMessage( "Design file is not set" );
+			   //return false;
 		}		
 		
-		else 
-		{ 
-			showWarningMessage( "Design file is not set" );
-			//return false; 
-		}			
-		
 		//alert( orgunit + "--" + orgUnitId )
 		
 		//alert( rprDesign )
@@ -237,7 +235,7 @@
 					<option value="-1">[$i18n.getString( "select" )]</option>
 					<option value="MATERNAL_HEALTH" >Maternal Health</option>
 					<option value="MONTHLY_PPS" >Monthly PPS</option>
-					<option value="MH_PATIENT_ALLOWANCE_CLAIM" >MH Patient Allowance Claim</option>
+					<option value="MH_PATIENT_ALLOWANCE_CLAIM" >MH Patient Allownce Claim</option>
 					<option value="HEALTH_PROVIDER_PAYMENT_CLAIM" >Health Provider Payment Claim</option>
 					
 					<!--

=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/qualityScoreEntrySelection.vm'
--- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/qualityScoreEntrySelection.vm	2014-07-23 11:47:17 +0000
+++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/qualityScoreEntrySelection.vm	2014-08-06 06:19:35 +0000
@@ -27,7 +27,7 @@
 	
 </div>
 
-<div class="inputCriteria" style="width:480px;height:90px;">
+<div class="inputCriteria" style="width:600px;height:90px;">
 <table>
 	<tr>
 		<td><label for="orgUnitName">$i18n.getString( "organisation_unit" )</label></td>