← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11006: Fixed bug: don't add data elements form other program-stage in Design data entry form of program-...

 

------------------------------------------------------------
revno: 11006
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-05-27 11:33:25 +0700
message:
  Fixed bug: don't add data elements form other program-stage in Design data entry form of program-stage
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.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/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseSelDataElementList.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.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-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2013-04-17 04:17:23 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2013-05-27 04:33:25 +0000
@@ -207,7 +207,7 @@
                     }
 
                     patientDataValue = getValue( patientDataValues, dataElementUid );
-
+System.out.println( "\n\n === \n patientDataValue : " + patientDataValue );
                     dataElementValue = patientDataValue != null ? patientDataValue.getValue() : dataElementValue;
                 }
                 else

=== 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	2013-05-25 05:54:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2013-05-27 04:33:25 +0000
@@ -409,4 +409,5 @@
 days_since_incident_date = Days since incident date
 view_all = View all
 patient_attribute_visit_schedule = Patient attribute visit schedule
-intro_patient_attribute_visit_schedule = Allow to configure which person attributes that are added to the vsit schedule.This is very useful when the list is printed and used for tracking in the community.
\ No newline at end of file
+intro_patient_attribute_visit_schedule = Allow to configure which person attributes that are added to the visit schedule.This is very useful when the list is printed and used for tracking in the community.
+selected_program_stages = Selected program stages
\ 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/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js	2013-05-18 06:51:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js	2013-05-27 04:33:25 +0000
@@ -104,8 +104,8 @@
 			associationId: id
 		}, function( xml ){			
 			jQuery( xml ).find( 'dataElement' ).each( function(i, item ){
-				dataElements.append("<option value='" + jQuery( item ).find( "json" ).text() + "' dename='" + jQuery( item ).find( "name" ).text() + "' decode='" + jQuery( item ).find( "code" ).text() + "'>" + jQuery( item ).find( "name" ).text() + "</option>");
-				dataElementIdsStore.append("<option value='" + jQuery( item ).find( "json" ).text() + "' dename='" + jQuery( item ).find( "name" ).text() + "' decode='" + jQuery( item ).find( "code" ).text() + "'>" + jQuery( item ).find( "name" ).text() + "</option>");
+				dataElements.append("<option value='" + jQuery( item ).find( "json" ).text() + "' dename='" + jQuery( item ).find( "name" ).text() + "' decode='" + jQuery( item ).find( "code" ).text() + "' >" + jQuery( item ).find( "name" ).text() + "</option>");
+				dataElementIdsStore.append("<option value='" + jQuery( item ).find( "json" ).text() + "' dename='" + jQuery( item ).find( "name" ).text() + "' decode='" + jQuery( item ).find( "code" ).text() + "' >" + jQuery( item ).find( "name" ).text() + "</option>");
 			});
 		});
 	}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm	2013-05-25 06:24:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm	2013-05-27 04:33:25 +0000
@@ -19,7 +19,7 @@
 			<table class="listTable" id="listTable">
 				<col>
 				<col>     
-				<col width="210">	 
+				<col width="180">	 
 				<thead>
 					<tr>            
 						<th>$i18n.getString( "name" )</th>
@@ -41,10 +41,8 @@
 							  #if( $program.type=='1' )
 								<a href="javascript:removeItem( '$association.id', '$encoder.jsEncode( $association.name )', i18n_confirm_delete , 'removeProgramStage.action' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
 							  #end
-
 							  <a href="javascript:showProgramStageDetails( $association.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
 							  <a href="programStageSectionList.action?id=$association.id" title="$i18n.getString( 'section_management' )"><img src="images/sections.png" alt="$i18n.getString( 'section_management' )"></a>
-	                  		  <a href="../api/pdfForm/programStage/$association.uid" title="$i18n.getString( 'pdf_data_entry_form' )" target="_blank"><img src="../images/pdf.png" alt="$i18n.getString( 'pdf_data_entry_form' )" width="24" height="24"/></a>
 							  <a href="viewDataEntryForm.action?programStageId=$association.id" title="$i18n.getString( "design_data_entry_form" )"><img src="../images/edit_layout.png" alt="$i18n.getString( 'design_data_entry_form' )"></a>
 							</td>
 						</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseSelDataElementList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseSelDataElementList.vm	2013-05-16 06:34:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseSelDataElementList.vm	2013-05-27 04:33:25 +0000
@@ -4,11 +4,12 @@
     #foreach( $dataElement in $dataElementList )
 		<dataElement>
 			<id>$dataElement.id</id>
+			<uid>$encoder.xmlEncode( $dataElement.uid )</uid>
 			<name>$encoder.xmlEncode( $dataElement.name )</name>
 			<code>$!encoder.xmlEncode( $dataElement.code )</code>
 			<shortName>$encoder.xmlEncode( $dataElement.shortName )</shortName>
 			<type>$dataElement.type</type>
-			#set($deJSON = '{' + '"id"' + ":" + $dataElement.id + "," + '"name"' + ':"' + "$dataElement.name" + '",' + '"shortName"' + ':"' + "$dataElement.shortName" + '",' + '"type"' + ':"' + "$dataElement.getDetailedTextType()"  + '"}' );
+			#set($deJSON = '{' + '"id"' + ":" + $dataElement.id + "," + '"uid"' + ':"' + $dataElement.uid + '",' + '"name"' + ':"' + "$dataElement.name" + '",' + '"shortName"' + ':"' + "$dataElement.shortName" + '",' + '"type"' + ':"' + "$dataElement.getDetailedTextType()"  + '"}' )
 			<json>$deJSON</json>
 			<optionCombos> 
 			#foreach( $optionCombo in $dataElement.categoryCombo.optionCombos)

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm	2013-05-16 08:06:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm	2013-05-27 04:33:25 +0000
@@ -196,7 +196,7 @@
 							<select id="programStageIds" style="width:320px" onchange="getProgramStageDataElements( this.value )" >
 								<option value=''>[$i18n.getString( "please_select" )]</option>
 								#foreach( $p in $programStages)
-								<option value='$p.id'>$encoder.htmlEncode( $p.name )</option>
+								<option value='$p.id' uid='$p.uid'>$encoder.htmlEncode( $p.name )</option>
 								#end
 							</select>			
 						</td>