← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7751: Remove Inheritable property of Person attribute object.

 

------------------------------------------------------------
revno: 7751
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-07-30 11:48:17 +0700
message:
  Remove Inheritable property of Person attribute object.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/AddPatientAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/UpdatePatientAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/showAddCaseAggregationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.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-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java	2012-05-24 03:10:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java	2012-07-30 04:48:17 +0000
@@ -67,8 +67,6 @@
 
     private boolean mandatory;
 
-    private boolean inheritable;
-
     private Boolean groupBy;
 
     private PatientAttributeGroup patientAttributeGroup;
@@ -210,14 +208,4 @@
         this.patientAttributeGroup = patientAttributeGroup;
     }
 
-    public boolean isInheritable()
-    {
-        return inheritable;
-    }
-
-    public void setInheritable( boolean inheritable )
-    {
-        this.inheritable = inheritable;
-    }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml	2012-07-28 13:37:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml	2012-07-30 04:48:17 +0000
@@ -5651,10 +5651,7 @@
           <listitem>
             <para><emphasis role="italic">Mandatory</emphasis>: Entering value for this attribute is required or not.</para>
           </listitem>
-          <listitem>
-            <para><emphasis role="italic">Inheritable</emphasis></para>
-          </listitem>
-          <listitem>
+         <listitem>
             <para><emphasis role="italic">Value Type</emphasis>: Data type of value inputed.</para>
           </listitem>
           <listitem>

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2012-07-26 11:26:41 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2012-07-30 04:48:17 +0000
@@ -118,6 +118,8 @@
         updateMultiOrgunitTabularReportTable();
         updateProgramStageTabularReportTable();
         moveStoredByFormStageInstanceToDataValue();
+        
+        executeSql( "ALTER TABLE patientattribute DROP COLUMN inheritable" );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml	2012-05-24 03:10:00 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml	2012-07-30 04:48:17 +0000
@@ -19,9 +19,7 @@
     <property name="valueType" column="valuetype" not-null="true" />
 
     <property name="mandatory" column="mandatory" not-null="true" />
-
-    <property name="inheritable" column="inheritable" />
-
+    
     <property name="groupBy" column="groupby" />
 
     <many-to-one name="patientAttributeGroup" column="patientattributegroupid" class="org.hisp.dhis.patient.PatientAttributeGroup"

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm	2012-03-27 01:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm	2012-07-30 04:48:17 +0000
@@ -4,7 +4,6 @@
 	"name": "$!encoder.jsonEncode( ${patientAttribute.name} )",
 	"description": "$!encoder.jsonEncode( ${patientAttribute.description} )",
 	"mandatory":  "$!{patientAttribute.mandatory}",
-	"inheritable": "$!{patientAttribute.inheritable}",
 	"valueType": "$!encoder.jsonEncode( ${patientAttribute.valueType} )",
 	"program": "$!encoder.jsonEncode( ${patientAttribute.program.name} )"
   }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/AddPatientAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/AddPatientAttributeAction.java	2012-05-24 03:10:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/AddPatientAttributeAction.java	2012-07-30 04:48:17 +0000
@@ -102,13 +102,6 @@
         this.mandatory = mandatory;
     }
 
-    private Boolean inheritable;
-
-    public void setInheritable( Boolean inheritable )
-    {
-        this.inheritable = inheritable;
-    }
-
     private List<String> attrOptions;
 
     public void setAttrOptions( List<String> attrOptions )
@@ -139,9 +132,6 @@
         mandatory = (mandatory == null) ? false : true;
         patientAttribute.setMandatory( mandatory );
         
-        inheritable = (inheritable == null) ? false : true;
-        patientAttribute.setInheritable( inheritable );
-        
         Program program = (programId != null) ? programService.getProgram( programId ) : null;
         patientAttribute.setProgram( program );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/UpdatePatientAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/UpdatePatientAttributeAction.java	2012-05-24 03:10:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/UpdatePatientAttributeAction.java	2012-07-30 04:48:17 +0000
@@ -124,13 +124,6 @@
         this.mandatory = mandatory;
     }
 
-    private Boolean inheritable;
-
-    public void setInheritable( Boolean inheritable )
-    {
-        this.inheritable = inheritable;
-    }
-
     private List<String> attrOptions;
 
     public void setAttrOptions( List<String> attrOptions )
@@ -161,9 +154,6 @@
         mandatory = (mandatory == null) ? false : true;
         patientAttribute.setMandatory( mandatory );
         
-        inheritable = (inheritable == null) ? false : true;
-        patientAttribute.setInheritable( inheritable );
-        
         Program program = (programId != null) ? programService.getProgram( programId ) : null;
         patientAttribute.setProgram( program );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm	2012-05-24 03:51:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm	2012-07-30 04:48:17 +0000
@@ -28,14 +28,6 @@
 		</td>		
 		<td></td>				
 	</tr>
-    
-    <tr>
-    	<td><label for="inheritable">$i18n.getString( "inheritable" )</label></td>
-		<td>
-			<input type='checkbox' id="inheritable" name="inheritable" value='true'>
-		</td>		
-		<td></td>				
-	</tr>
 		
     <tr>
         <td><label for="valueType">$i18n.getString( "value_type" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js	2012-03-27 01:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js	2012-07-30 04:48:17 +0000
@@ -12,9 +12,6 @@
 			var mandatory = ( json.patientAttribute.mandatory == 'true') ? i18n_yes : i18n_no;
 			setInnerHTML( 'mandatoryField', mandatory );
 			
-			var inheritable = ( json.patientAttribute.inheritable == 'true') ? i18n_yes : i18n_no;
-			setInnerHTML( 'inheritableField', inheritable );
-			
 			setInnerHTML( 'valueTypeField', json.patientAttribute.valueType );    
 	   
 			var programName = json.patientAttribute.program;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm	2012-05-30 03:52:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm	2012-07-30 04:48:17 +0000
@@ -58,7 +58,6 @@
                 <p><label class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
                 <p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
                 <p><label class="bold">$i18n.getString( "mandatory" ):</label><br><span id="mandatoryField"></span></p>
-                <p><label class="bold">$i18n.getString( "inheritable" ):</label><br><span id="inheritableField"></span></p>
                 <p><label class="bold">$i18n.getString( "value_type" ):</label><br><span id="valueTypeField"></span></p>
 				<p><label class="bold">$i18n.getString( "program" ):</label><br><span id="programField"></span></p>
 			</div>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/showAddCaseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/showAddCaseAggregationForm.vm	2011-09-29 04:17:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/showAddCaseAggregationForm.vm	2012-07-30 04:48:17 +0000
@@ -61,17 +61,6 @@
 	</tr>
     
     <tr>
-    	<td width="20em"><label for="inheritable">$i18n.getString( "inheritable" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td>
-			<select id="inheritable" name="inheritable" style="min-width:30.5em">
-				<option value="true" >$i18n.getString( "yes" )</option>
-				<option value="false" selected="selected">$i18n.getString( "no" )</option>
-			</select>
-		</td>		
-		<td></td>				
-	</tr>
-    
-    <tr>
         <td width="20em"><label for="valueType">$i18n.getString( "value_type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
         <td>
             <select id="valueType" name="valueType" style="min-width:30.5em" onchange="ATTRIBUTE_OPTION.selectValueType(this);">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm	2012-05-24 03:51:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm	2012-07-30 04:48:17 +0000
@@ -32,14 +32,6 @@
 		<td></td>				
 	</tr>
 	
-	<tr>
-		<td><label for="inheritable">$i18n.getString( "inheritable" )</label></td>
-		<td>
-			<input type='checkbox' id="inheritable" name="inheritable" value='true' #if( $patientAttribute.inheritable) checked #end>		
-		</td>		
-		<td></td>				
-	</tr>
-	
     <tr>
         <td>$i18n.getString( "value_type" ) <em title="$i18n.getString( "required" )" class="required">*</em></td>
         <td>