← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3221: Clean up code into dhis-web-maintenance-patient.

 

------------------------------------------------------------
revno: 3221
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-03-31 08:42:05 +0700
message:
  Clean up code into dhis-web-maintenance-patient.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/NoAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/AddCaseAggregationConditionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggConditionDescriptionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAllCaseAggregationConditionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetCaseAggregationConditionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetPSDataElementsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetProgramStagesAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/RemoveCaseAggregationConditionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/UpdateCaseAggregationConditionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/configuration/GetPatientExcelItemplateFileAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/DelDataEntryFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetSelectedDataElementsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SaveDataEntryFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectDataElementAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectProgramStageDataElementAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ValidateDataEntryFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/mobilesetting/ShowMobileSettingFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/mobilesetting/UpdateMobileSettingAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddRepresentativeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/DefinePatientOrgnunitRegistrationAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientOrgnunitRegistrationAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientsByNameAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentSelectAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemovePatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddRepresentativeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/UpdatePatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientProgramEnrollmentAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidateSearchPatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetOptionalPatientAttributesWithoutGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributesWithdoutGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/RemovePatientAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/RemovePatientAttributeOptionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ValidatePatientAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/AddPatientAttributeGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/UpdatePatientAttributeGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/ValidatePatientAttributeGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/RemovePatientIdentifierTypeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/ValidatePatientIdentifierTypeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/ImportPatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/DefineProgramAssociationsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ShowAddProgramFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ShowValidationDEAssociationsFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/SaveProgramStageSortOrderAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowAddProgramStageFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowSortProgramStageFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ValidateProgramStageAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipPatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetPartnerAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipTypeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipTypeListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRepresentativeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRelationshipAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowRelationshipListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateAddRelationshipPatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateSearchAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddProgramStageDEValidationAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddValidationCriteriaAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramStageDEValidationListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/UpdateValidationCriteriaAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/ValidateValidationCriteriaAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/idgen/PatientIdentifierGenerator.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/DefaultSelectedStateManager.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/SelectedStateManager.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/addCaseAggregation.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.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-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/NoAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/NoAction.java	2009-09-22 11:11:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/NoAction.java	2011-03-31 01:42:05 +0000
@@ -28,19 +28,16 @@
 
 import com.opensymphony.xwork2.Action;
 
-
 /**
  * @author Abyot Asalefew Gizaw
  * @version $Id$
  */
 public class NoAction
-	implements Action
+    implements Action
 {
-	public String execute()
-		throws Exception
-	{
-	
-		return SUCCESS;
-		
-	}
+    public String execute()
+        throws Exception
+    {
+        return SUCCESS;
+    }
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/AddCaseAggregationConditionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/AddCaseAggregationConditionAction.java	2010-11-25 22:22:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/AddCaseAggregationConditionAction.java	2011-03-31 01:42:05 +0000
@@ -45,7 +45,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependency
+    // Dependencies
     // -------------------------------------------------------------------------
 
     private CaseAggregationConditionService aggregationConditionService;
@@ -89,7 +89,7 @@
     {
         this.aggregationDataElementId = aggregationDataElementId;
     }
-    
+
     public void setOperator( String operator )
     {
         this.operator = operator;
@@ -106,7 +106,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override
@@ -114,16 +114,17 @@
         throws Exception
     {
         String[] ids = aggregationDataElementId.split( "\\." );
-        
+
         DataElement aggregationDataElement = dataElementService.getDataElement( Integer.parseInt( ids[0] ) );
+
         DataElementCategoryOptionCombo optionCombo = dataElementCategoryService
             .getDataElementCategoryOptionCombo( Integer.parseInt( ids[1] ) );
-        
-        CaseAggregationCondition condition = new CaseAggregationCondition( description, operator, aggregationCondition, 
+
+        CaseAggregationCondition condition = new CaseAggregationCondition( description, operator, aggregationCondition,
             aggregationDataElement, optionCombo );
-        
+
         aggregationConditionService.addCaseAggregationCondition( condition );
-        
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggConditionDescriptionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggConditionDescriptionAction.java	2011-01-12 02:26:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggConditionDescriptionAction.java	2011-03-31 01:42:05 +0000
@@ -72,7 +72,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.java	2011-01-12 02:26:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.java	2011-03-31 01:42:05 +0000
@@ -43,7 +43,7 @@
 {
 
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private DataElementService dataElementService;
@@ -84,7 +84,7 @@
     {
         return dataElementList;
     }
-    
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -97,18 +97,19 @@
 
         dataElementList = new ArrayList<DataElement>( dataElementService.getDataElementGroup( dataElementGroupId )
             .getMembers() );
-        
+
         Iterator<DataElement> deIterator = dataElementList.iterator();
 
         while ( deIterator.hasNext() )
         {
             DataElement dataElement = deIterator.next();
+
             if ( dataElement.getDomainType().equalsIgnoreCase( DataElement.DOMAIN_TYPE_PATIENT )
                 || !dataElement.getType().equals( DataElement.VALUE_TYPE_INT ) )
             {
                 deIterator.remove();
             }
-            
+
         }
 
         if ( dataElementList != null && !dataElementList.isEmpty() )
@@ -132,11 +133,11 @@
 
                     optionComboIds.add( de.getId() + "." + decoc.getId() );
 
-                    optionComboNames.add( de.getName() + " (" + decoc.getName() + ")");
+                    optionComboNames.add( de.getName() + " " + decoc.getName() );
                 }
             }
         }
-        
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAllCaseAggregationConditionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAllCaseAggregationConditionAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAllCaseAggregationConditionAction.java	2011-03-31 01:42:05 +0000
@@ -69,7 +69,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetCaseAggregationConditionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetCaseAggregationConditionAction.java	2011-03-24 06:35:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetCaseAggregationConditionAction.java	2011-03-31 01:42:05 +0000
@@ -81,7 +81,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetPSDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetPSDataElementsAction.java	2010-11-25 22:22:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetPSDataElementsAction.java	2011-03-31 01:42:05 +0000
@@ -117,7 +117,7 @@
                     optionComboIds.add( "[" + CaseAggregationCondition.OBJECT_PROGRAM_STAGE_DATAELEMENT + ":" + psId
                         + "." + de.getId() + "." + decoc.getId() + "]" );
 
-                    optionComboNames.add( de.getName() + " (" + decoc.getName() + ")");
+                    optionComboNames.add( de.getName() + " " + decoc.getName() );
 
                     if ( de.isMultiDimensional() )
                         optionComboType.add( "1:" + de.getType() );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetProgramStagesAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetProgramStagesAction.java	2010-11-25 22:22:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetProgramStagesAction.java	2011-03-31 01:42:05 +0000
@@ -39,7 +39,7 @@
 {
 
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramService programService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/RemoveCaseAggregationConditionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/RemoveCaseAggregationConditionAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/RemoveCaseAggregationConditionAction.java	2011-03-31 01:42:05 +0000
@@ -67,7 +67,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/UpdateCaseAggregationConditionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/UpdateCaseAggregationConditionAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/UpdateCaseAggregationConditionAction.java	2011-03-31 01:42:05 +0000
@@ -45,7 +45,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependency
+    // Dependencies
     // -------------------------------------------------------------------------
 
     private CaseAggregationConditionService aggregationConditionService;
@@ -113,7 +113,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/configuration/GetPatientExcelItemplateFileAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/configuration/GetPatientExcelItemplateFileAction.java	2010-11-16 05:45:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/configuration/GetPatientExcelItemplateFileAction.java	2011-03-31 01:42:05 +0000
@@ -40,7 +40,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private SystemSettingManager systemSettingManager;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/DelDataEntryFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/DelDataEntryFormAction.java	2010-11-21 15:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/DelDataEntryFormAction.java	2011-03-31 01:42:05 +0000
@@ -91,7 +91,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetSelectedDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetSelectedDataElementsAction.java	2010-10-14 08:14:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetSelectedDataElementsAction.java	2011-03-31 01:42:05 +0000
@@ -98,7 +98,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Execute
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SaveDataEntryFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SaveDataEntryFormAction.java	2011-03-23 02:10:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SaveDataEntryFormAction.java	2011-03-31 01:42:05 +0000
@@ -27,9 +27,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.dataentryform.DataEntryForm;
@@ -107,7 +104,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Execute
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()
@@ -138,15 +135,14 @@
 
         if ( dataEntryForm == null )
         {
-            dataEntryForm = new DataEntryForm( name, prepareDataEntryFormCode( designTextarea ) );
+            dataEntryForm = new DataEntryForm( name, dataEntryFormService.prepareDataEntryFormCode( designTextarea ) );
             programStage.setDataEntryForm( dataEntryForm );
             programStageService.updateProgramStage( programStage );
         }
         else
         {
             dataEntryForm.setName( name );
-            dataEntryForm.setHtmlCode( prepareDataEntryFormCode( designTextarea ) );
-            //dataEntryFormService.updateDataEntryForm( dataEntryForm );
+            dataEntryForm.setHtmlCode( dataEntryFormService.prepareDataEntryFormCode( designTextarea ) );
             
             programStage.setDataEntryForm( dataEntryForm );
             programStageService.updateProgramStage( programStage );
@@ -155,91 +151,4 @@
         return SUCCESS;
     }
     
-    // -------------------------------------------------------------------------
-    // Support methods
-    // -------------------------------------------------------------------------
-    
-    private String prepareDataEntryFormCode( String dataEntryFormCode )
-    {
-        String preparedCode = dataEntryFormCode;
-
-        preparedCode = prepareDataEntryFormInputs( preparedCode );
-
-        return preparedCode;
-    }
-
-    private String prepareDataEntryFormInputs( String preparedCode )
-    {
-        // ---------------------------------------------------------------------
-        // Buffer to contain the final result.
-        // ---------------------------------------------------------------------
-
-        StringBuffer sb = new StringBuffer();
-
-        // ---------------------------------------------------------------------
-        // Pattern to match data elements in the HTML code.
-        // ---------------------------------------------------------------------
-        // logger.info("preparedCore = "+preparedCode);
-        Pattern patDataElement = Pattern.compile( "(<input.*?)[/]?>" );
-        Matcher matDataElement = patDataElement.matcher( preparedCode );
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching data element fields.
-        // ---------------------------------------------------------------------
-
-        boolean result = matDataElement.find();
-
-        while ( result )
-        {
-            // -----------------------------------------------------------------
-            // Get input HTML code (HTML input field code).
-            // -----------------------------------------------------------------
-
-            String dataElementCode = matDataElement.group( 1 );
-            // logger.info("dataElementCode = "+dataElementCode);
-            // -----------------------------------------------------------------
-            // Pattern to extract data element name from data element field
-            // -----------------------------------------------------------------
-
-            Pattern patDataElementName = Pattern.compile( "value=\"\\[ (.*) \\]\"" );
-            Matcher matDataElementName = patDataElementName.matcher( dataElementCode );
-
-            Pattern patTitle = Pattern.compile( "title=\"-- (.*) --\"" );
-            Matcher matTitle = patTitle.matcher( dataElementCode );
-
-            if ( matDataElementName.find() && matDataElementName.groupCount() > 0 )
-            {
-                String temp = "[ " + matDataElementName.group( 1 ) + " ]";
-                dataElementCode = dataElementCode.replace( temp, "" );
-
-                if ( matTitle.find() && matTitle.groupCount() > 0 )
-                {
-                    temp = "-- " + matTitle.group( 1 ) + " --";
-                    dataElementCode = dataElementCode.replace( temp, "" );
-                }
-
-                // -------------------------------------------------------------
-                // Appends dataElementCode
-                // -------------------------------------------------------------
-
-                String appendCode = dataElementCode;
-                appendCode += "/>";
-                matDataElement.appendReplacement( sb, appendCode );
-            }
-
-            // -----------------------------------------------------------------
-            // Go to next data entry field
-            // -----------------------------------------------------------------
-
-            result = matDataElement.find();
-        }
-
-        // ---------------------------------------------------------------------
-        // Add remaining code (after the last match), and return formatted code.
-        // ---------------------------------------------------------------------
-
-        matDataElement.appendTail( sb );
-
-        return sb.toString();
-    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectDataElementAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectDataElementAction.java	2011-03-31 01:42:05 +0000
@@ -121,7 +121,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Execute
+    // Action implementation
     // -------------------------------------------------------------------------
     
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectProgramStageDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectProgramStageDataElementAction.java	2010-08-31 14:34:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectProgramStageDataElementAction.java	2011-03-31 01:42:05 +0000
@@ -46,7 +46,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramStageService programStageService;
@@ -82,7 +82,7 @@
     }
     
     // -------------------------------------------------------------------------
-    // Execute
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ValidateDataEntryFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ValidateDataEntryFormAction.java	2010-10-14 08:14:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ValidateDataEntryFormAction.java	2011-03-31 01:42:05 +0000
@@ -41,7 +41,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private DataEntryFormService dataEntryFormService;
@@ -88,13 +88,12 @@
     }
 
     // -------------------------------------------------------------------------
-    // Execution
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()
         throws Exception
     {
-
         DataEntryForm match = dataEntryFormService.getDataEntryFormByName( name );
 
         if ( match != null && (dataEntryFormId == null || match.getId() != dataEntryFormId) )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/mobilesetting/ShowMobileSettingFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/mobilesetting/ShowMobileSettingFormAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/mobilesetting/ShowMobileSettingFormAction.java	2011-03-31 01:42:05 +0000
@@ -46,6 +46,7 @@
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
+
     private PatientAttributeService patientAttributeService;
 
     public PatientAttributeService getPatientAttributeService()
@@ -85,7 +86,7 @@
     {
         this.patientAtts = patientAtts;
     }
-    
+
     private Collection<PatientAttribute> attributes;
 
     public Collection<PatientAttribute> getAttributes()
@@ -97,7 +98,7 @@
     {
         this.attributes = attributes;
     }
-    
+
     private PatientMobileSetting setting;
 
     public PatientMobileSetting getSetting()
@@ -110,23 +111,27 @@
         this.setting = setting;
     }
 
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
     @Override
     public String execute()
         throws Exception
     {
         attributes = patientAttributeService.getAllPatientAttributes();
-        
-        Collection<PatientMobileSetting> paSettings = new HashSet<PatientMobileSetting>(
-            patientMobileSettingService.getCurrentSetting() );
-        
+
+        Collection<PatientMobileSetting> paSettings = new HashSet<PatientMobileSetting>( patientMobileSettingService
+            .getCurrentSetting() );
+
         if ( paSettings != null )
         {
             Iterator<PatientMobileSetting> settingsIt = paSettings.iterator();
-            
+
             if ( settingsIt.hasNext() )
             {
-                setting = settingsIt.next(); 
-                
+                setting = settingsIt.next();
+
                 patientAtts = setting.getPatientAttributes();
 
                 for ( PatientAttribute attribute : patientAtts )
@@ -142,7 +147,7 @@
                 patientAtts = new ArrayList<PatientAttribute>();
             }
         }
-        
+
         return SUCCESS;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/mobilesetting/UpdateMobileSettingAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/mobilesetting/UpdateMobileSettingAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/mobilesetting/UpdateMobileSettingAction.java	2011-03-31 01:42:05 +0000
@@ -108,6 +108,10 @@
         this.registrationdate = registrationdate;
     }
 
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
     @Override
     public String execute()
         throws Exception
@@ -176,6 +180,10 @@
         return SUCCESS;
     }
 
+    // -------------------------------------------------------------------------
+    // Supporting methods
+    // -------------------------------------------------------------------------
+
     private void fillValues( List<PatientAttribute> attributes )
     {
         for ( String id : selectedList )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java	2011-03-29 02:51:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java	2011-03-31 01:42:05 +0000
@@ -88,15 +88,11 @@
     private PatientAttributeOptionService patientAttributeOptionService;
 
     // -------------------------------------------------------------------------
-    // Input - name
+    // Input
     // -------------------------------------------------------------------------
 
     private String fullName;
 
-    // -------------------------------------------------------------------------
-    // Input - demographics
-    // -------------------------------------------------------------------------
-
     private String birthDate;
 
     private char ageType;
@@ -109,6 +105,12 @@
 
     private String bloodGroup;
 
+    private boolean underAge;
+
+    private Integer representativeId;
+
+    private Integer relationshipTypeId;
+
     // -------------------------------------------------------------------------
     // OutPut
     // -------------------------------------------------------------------------
@@ -120,21 +122,6 @@
         return id;
     }
 
-    // -------------------------------------------------------------------------
-    // Input - others
-    // -------------------------------------------------------------------------
-
-    private boolean underAge;
-
-    private Integer representativeId;
-
-    private Integer relationshipTypeId;
-
-    // -------------------------------------------------------------------------
-    // Output - making the patient available so that its attributes can be
-    // edited
-    // -------------------------------------------------------------------------
-
     private Patient patient;
 
     public Patient getPatient()
@@ -159,9 +146,9 @@
         // ---------------------------------------------------------------------
         // Set FirstName, MiddleName, LastName by FullName
         // ---------------------------------------------------------------------
-        
+
         fullName = fullName.trim();
-        
+
         int startIndex = fullName.indexOf( ' ' );
         int endIndex = fullName.lastIndexOf( ' ' );
 
@@ -187,7 +174,7 @@
         patient.setFirstName( firstName );
         patient.setMiddleName( middleName );
         patient.setLastName( lastName );
-       
+
         // ---------------------------------------------------------------------
         // Set Other information for patient
         // ---------------------------------------------------------------------
@@ -230,8 +217,8 @@
             {
                 if ( identifierType.getFormat() != null && identifierType.getFormat().equals( "State Format" ) )
                 {
-                    value = organisationUnit.getCode() + request.getParameter( "progcode" ) + request.getParameter( "yearcode" )
-                        + request.getParameter( "benicode" );
+                    value = organisationUnit.getCode() + request.getParameter( "progcode" )
+                        + request.getParameter( "yearcode" ) + request.getParameter( "benicode" );
                 }
                 else
                 {
@@ -327,7 +314,7 @@
         // -------------------------------------------------------------------------
 
         id = patientService.createPatient( patient, representativeId, relationshipTypeId, patientAttributeValues );
-        
+
         return SUCCESS;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddRepresentativeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddRepresentativeAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddRepresentativeAction.java	2011-03-31 01:42:05 +0000
@@ -66,15 +66,11 @@
     private OrganisationUnitSelectionManager selectionManager;
 
     // -------------------------------------------------------------------------
-    // Input - name
+    // Input
     // -------------------------------------------------------------------------
 
     private String fullName;
 
-    // -------------------------------------------------------------------------
-    // Input - demographics
-    // -------------------------------------------------------------------------
-
     private String birthDate;
 
     private char ageType;
@@ -111,10 +107,6 @@
         patient = new Patient();
 
         // ---------------------------------------------------------------------
-        // Get FirstName, MiddleName, LastName by FullName
-        // ---------------------------------------------------------------------
-
-        // ---------------------------------------------------------------------
         // Set FirstName, MiddleName, LastName by FullName
         // ---------------------------------------------------------------------
         

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/DefinePatientOrgnunitRegistrationAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/DefinePatientOrgnunitRegistrationAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/DefinePatientOrgnunitRegistrationAction.java	2011-03-31 01:42:05 +0000
@@ -62,7 +62,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientOrgnunitRegistrationAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientOrgnunitRegistrationAction.java	2011-02-16 02:55:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientOrgnunitRegistrationAction.java	2011-03-31 01:42:05 +0000
@@ -62,7 +62,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientsByNameAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientsByNameAction.java	2011-03-28 07:13:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientsByNameAction.java	2011-03-31 01:42:05 +0000
@@ -42,7 +42,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientService patientService;
@@ -68,7 +68,7 @@
     {
         this.fullName = fullName;
     }
-    
+
     public List<Patient> getPatients()
     {
         return patients;
@@ -80,8 +80,8 @@
 
     public String execute()
     {
-fullName = fullName.trim();
-        
+        fullName = fullName.trim();
+
         int startIndex = fullName.indexOf( ' ' );
         int endIndex = fullName.lastIndexOf( ' ' );
 
@@ -103,7 +103,7 @@
                 lastName = fullName.substring( endIndex + 1, fullName.length() );
             }
         }
-       
+
         patients = new ArrayList<Patient>( patientService.getPatients( firstName + " " + middleName + " " + lastName ) );
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentAction.java	2011-03-31 01:42:05 +0000
@@ -160,10 +160,8 @@
 
         ProgramInstance programInstance = programInstanceService.getProgramInstance( programInstanceId );
 
-        // Get selected patient from programInstance
         patient = programInstance.getPatient();
 
-        // Get selected program from programInstance
         Program program = programInstance.getProgram();
 
         // ---------------------------------------------------------------------
@@ -188,7 +186,10 @@
 
         Set<ProgramAttribute> programAttributes = new HashSet<ProgramAttribute>();
 
+        // ---------------------------------------------------------------------
         // End-user inputs attribute value for DEAD-attribute
+        // ---------------------------------------------------------------------
+        
         boolean flag = false;
 
         if ( attributes != null && attributes.size() > 0 )
@@ -207,7 +208,6 @@
                     ProgramAttributeValue attributeValue = programAttributeValueService.getProgramAttributeValue(
                         programInstance, attribute );
 
-                    // attributeValue is not exist
                     if ( attributeValue == null )
                     {
                         attributeValue = new ProgramAttributeValue();
@@ -246,11 +246,8 @@
                             patientService.updatePatient( patient );
                         }
 
-                        // save values
                         programAttributeValueService.saveProgramAttributeValue( attributeValue );
-
                     }
-                    // attributeValue is exist
                     else
                     {
                         if ( ProgramAttribute.TYPE_COMBO.equalsIgnoreCase( attribute.getValueType() ) )
@@ -269,12 +266,11 @@
                         }
                     }
 
-                    // update values
                     programAttributeValueService.updateProgramAttributeValue( attributeValue );
                 }
             }
         }
-        
+
         programInstance.setAttributes( programAttributes );
 
         programInstanceService.updateProgramInstance( programInstance );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentSelectAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentSelectAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemoveEnrollmentSelectAction.java	2011-03-31 01:42:05 +0000
@@ -48,7 +48,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependency
+    // Dependencies
     // -------------------------------------------------------------------------
 
     private ProgramAttributeService programAttributeService;
@@ -76,7 +76,7 @@
     private Patient patient;
 
     // -------------------------------------------------------------------------
-    // Getter
+    // Setter && Getter
     // -------------------------------------------------------------------------
 
     public void setProgramAttributeService( ProgramAttributeService programAttributeService )
@@ -130,7 +130,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemovePatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemovePatientAction.java	2010-10-22 06:43:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/RemovePatientAction.java	2011-03-31 01:42:05 +0000
@@ -41,7 +41,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientService patientService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java	2011-02-24 06:02:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java	2011-03-31 01:42:05 +0000
@@ -399,7 +399,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Support methods
+    // Supporting methods
     // -------------------------------------------------------------------------
 
     private void getParamsToSearch()
@@ -425,12 +425,9 @@
 
     private void listAllPatient( OrganisationUnit organisationUnit, PatientAttribute sortingPatientAttribute )
     {
-        // Get patients by the selected organisation - unit
-
         total = patientService.countGetPatientsByOrgUnit( organisationUnit );
-
         this.paging = createPaging( total );
-
+        
         patients = new ArrayList<Patient>( patientService.getPatients( organisationUnit, paging.getStartPos(), paging
             .getPageSize() ) );
 
@@ -440,7 +437,6 @@
             {
                 mapRelationShip.put( patient.getId(), relationshipService.getRelationshipsForPatient( patient ) );
 
-                // Get patient-attribute-values
                 if ( sortingPatientAttribute != null )
                 {
                     PatientAttributeValue attributeValue = patientAttributeValueService.getPatientAttributeValue(
@@ -469,7 +465,6 @@
             {
                 mapRelationShip.put( patient.getId(), relationshipService.getRelationshipsForPatient( patient ) );
 
-                // Get patient-attribute-values
                 if ( sortingPatientAttribute != null )
                 {
                     PatientAttributeValue attributeValue = patientAttributeValueService.getPatientAttributeValue(
@@ -528,8 +523,8 @@
     private void searchPatientByAttribute( String searchText, PatientAttribute sortingPatientAttribute )
     {
         total = patientService.countGetPatients( searchText );
-
         this.paging = createPaging( total );
+        
         patients = patientService.getPatients( searchText, paging.getStartPos(), paging.getPageSize() );
 
         if ( patients != null && patients.size() > 0 )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientFormAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientFormAction.java	2011-03-31 01:42:05 +0000
@@ -64,7 +64,7 @@
     }
 
     private ProgramService programService;
-    
+
     public void setProgramService( ProgramService programService )
     {
         this.programService = programService;
@@ -89,29 +89,25 @@
     }
 
     private Collection<Program> programs;
-    
+
     public Collection<Program> getPrograms()
     {
         return programs;
     }
-    
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
-    
+
     public String execute()
         throws Exception
     {
-        // ---------------------------------------------------------------------
-        // Validate selected OrganisationUnit
-        // ---------------------------------------------------------------------
-
         organisationUnit = selectionManager.getSelectedOrganisationUnit();
 
         patientAttributes = patientAttributeService.getAllPatientAttributes();
 
         programs = programService.getPrograms( organisationUnit );
-        
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddRepresentativeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddRepresentativeAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddRepresentativeAction.java	2011-03-31 01:42:05 +0000
@@ -70,7 +70,9 @@
     public String execute()
     {
         relationshipTypes = new ArrayList<RelationshipType>( relationshipTypeService.getAllRelationshipTypes() );
+        
         identifierTypes = patientIdentifierTypeService.getAllPatientIdentifierTypes();
+        
         attributes = patientAttributeService.getAllPatientAttributes();
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/UpdatePatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/UpdatePatientAction.java	2011-02-23 04:27:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/UpdatePatientAction.java	2011-03-31 01:42:05 +0000
@@ -82,36 +82,19 @@
     private PatientAttributeOptionService patientAttributeOptionService;
 
     // -------------------------------------------------------------------------
-    // Input - Id
+    // Input
     // -------------------------------------------------------------------------
+
     private Integer id;
 
-    // -------------------------------------------------------------------------
-    // Input - name
-    // -------------------------------------------------------------------------
-
     private String fullName;
 
-    // -------------------------------------------------------------------------
-    // Input - demographics
-    // -------------------------------------------------------------------------
-
     private String birthDate;
 
     private boolean isDead;
 
     private String deathDate;
 
-    public void setDead( boolean isDead )
-    {
-        this.isDead = isDead;
-    }
-
-    public void setDeathDate( String deathDate )
-    {
-        this.deathDate = deathDate;
-    }
-
     private Integer age;
 
     private char ageType;
@@ -127,8 +110,7 @@
     private Integer relationshipTypeId;
 
     // -------------------------------------------------------------------------
-    // Output - making the patient available so that its attributes can be
-    // edited
+    // Output
     // -------------------------------------------------------------------------
 
     private Patient patient;
@@ -140,13 +122,8 @@
     public String execute()
         throws Exception
     {
-
         OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
 
-        // ---------------------------------------------------------------------
-        // Get patient by Id
-        // ---------------------------------------------------------------------
-
         patient = patientService.getPatient( id );
 
         // ---------------------------------------------------------------------
@@ -160,7 +137,7 @@
         String middleName = "";
         String lastName = "";
 
-        if( fullName.indexOf( ' ' ) != -1 )
+        if ( fullName.indexOf( ' ' ) != -1 )
         {
             firstName = fullName.substring( 0, startIndex );
             if ( startIndex == endIndex )
@@ -174,17 +151,17 @@
                 lastName = fullName.substring( endIndex + 1, fullName.length() );
             }
         }
-        
+
         patient.setFirstName( firstName );
         patient.setMiddleName( middleName );
         patient.setLastName( lastName );
-        
+
         // ---------------------------------------------------------------------
         // Set Other information for patient
         // ---------------------------------------------------------------------
 
         patient.setGender( gender );
-       
+
         patient.setIsDead( isDead );
         if ( deathDate != null )
         {
@@ -209,6 +186,7 @@
         // -------------------------------------------------------------------------------------
         // Save PatientIdentifier
         // -------------------------------------------------------------------------------------
+
         HttpServletRequest request = ServletActionContext.getRequest();
 
         String value = null;
@@ -276,8 +254,6 @@
             patient.getAttributes().clear();
             valuesForDelete = patientAttributeValueService.getPatientAttributeValues( patient );
 
-            // Save other attributes
-
             for ( PatientAttribute attribute : attributes )
             {
                 value = request.getParameter( AddPatientAction.PREFIX_ATTRIBUTE + attribute.getId() );
@@ -393,6 +369,16 @@
         this.id = id;
     }
 
+    public void setDead( boolean isDead )
+    {
+        this.isDead = isDead;
+    }
+
+    public void setDeathDate( String deathDate )
+    {
+        this.deathDate = deathDate;
+    }
+
     public void setFullName( String fullName )
     {
         this.fullName = fullName;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientAction.java	2011-03-25 06:47:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientAction.java	2011-03-31 01:42:05 +0000
@@ -123,7 +123,6 @@
 
     public String execute()
     {
-
         Date dateOfBirth;
 
         if ( selectionManager.getSelectedOrganisationUnit() == null )
@@ -140,7 +139,7 @@
             return INPUT;
         }
 
-        if ( dobType != null && (dobType == Patient.DOB_TYPE_VERIFIED || dobType == Patient.DOB_TYPE_DECLARED ) )
+        if ( dobType != null && (dobType == Patient.DOB_TYPE_VERIFIED || dobType == Patient.DOB_TYPE_DECLARED) )
         {
             birthDate = birthDate.trim();
 
@@ -155,18 +154,18 @@
         }
 
         fullName = fullName.trim();
-        
+
         // ---------------------------------------------------------------------
-        // Check duplicate by FirstName, MiddleName, LastName, Birthday, Gender
+        // Check duplicated patients
         // ---------------------------------------------------------------------
 
         int startIndex = fullName.indexOf( ' ' );
         int endIndex = fullName.lastIndexOf( ' ' );
-        
-        String firstName = fullName.toString();        
+
+        String firstName = fullName.toString();
         String middleName = "";
         String lastName = "";
-        
+
         if ( fullName.indexOf( ' ' ) != -1 )
         {
             firstName = fullName.substring( 0, startIndex );
@@ -181,10 +180,9 @@
                 lastName = fullName.substring( endIndex + 1, fullName.length() );
             }
         }
-        
+
         if ( !checkedDuplicate )
         {
-            // Check duplication name, birthdate, gender
             patients = patientService.getPatient( firstName, middleName, lastName, format.parseDate( birthDate ),
                 gender );
 
@@ -214,7 +212,9 @@
             }
         }
 
+        // ---------------------------------------------------------------------
         // Check Under age information
+        // ---------------------------------------------------------------------
 
         if ( underAge )
         {
@@ -230,7 +230,6 @@
             }
         }
 
-        // Check ID duplicate
         Patient p = new Patient();
 
         if ( birthDate != null )
@@ -252,7 +251,7 @@
         {
             String value = null;
             String idDuplicate = "";
-            
+
             for ( PatientIdentifierType idType : identifiers )
             {
                 if ( !underAge || (underAge && !idType.isRelated()) )
@@ -287,9 +286,9 @@
         return SUCCESS;
     }
 
-    // ---------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     // Getter/Setter
-    // ---------------------------------------------------------------------
+    // -------------------------------------------------------------------------
 
     public Collection<Patient> getPatients()
     {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientProgramEnrollmentAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientProgramEnrollmentAction.java	2010-05-17 02:59:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidatePatientProgramEnrollmentAction.java	2011-03-31 01:42:05 +0000
@@ -108,7 +108,6 @@
 
         ValidationCriteria criteria = program.isValid( patient );
 
-        // Check validation criteria
         if ( criteria != null )
         {
             message = i18n.getString( "program_is_invalid" ) + " " + criteria.getName();
@@ -174,10 +173,10 @@
 
                     return INPUT;
                 }
-                
+
                 Date DateOfEnrollment = format.parseDate( enrollmentDate );
 
-                if ( DateOfEnrollment.before( DateOfIncident))
+                if ( DateOfEnrollment.before( DateOfIncident ) )
                 {
                     message = i18n.getString( "date_of_incident_invalid" );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidateSearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidateSearchPatientAction.java	2011-02-24 06:02:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ValidateSearchPatientAction.java	2011-03-31 01:42:05 +0000
@@ -40,7 +40,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private OrganisationUnitSelectionManager selectionManager;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetOptionalPatientAttributesWithoutGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetOptionalPatientAttributesWithoutGroupAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetOptionalPatientAttributesWithoutGroupAction.java	2011-03-31 01:42:05 +0000
@@ -43,7 +43,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientAttributeService patientAttributeService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeAction.java	2011-03-31 01:42:05 +0000
@@ -40,7 +40,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientAttributeService patientAttributeService;
@@ -69,7 +69,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeListAction.java	2010-01-29 03:08:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeListAction.java	2011-03-31 01:42:05 +0000
@@ -43,7 +43,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientAttributeService patientAttributeService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributesWithdoutGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributesWithdoutGroupAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributesWithdoutGroupAction.java	2011-03-31 01:42:05 +0000
@@ -42,11 +42,9 @@
  */
 public class GetPatientAttributesWithdoutGroupAction 
     implements Action
-{
-    //TODO typo in class name
-    
+{   
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientAttributeService patientAttributeService;
@@ -67,7 +65,6 @@
         return patientAttributes;
     }
 
-   
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/RemovePatientAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/RemovePatientAttributeAction.java	2010-10-22 06:43:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/RemovePatientAttributeAction.java	2011-03-31 01:42:05 +0000
@@ -42,7 +42,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientAttributeService patientAttributeService;
@@ -77,7 +77,7 @@
     }
     
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/RemovePatientAttributeOptionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/RemovePatientAttributeOptionAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/RemovePatientAttributeOptionAction.java	2011-03-31 01:42:05 +0000
@@ -53,14 +53,42 @@
 
     private int id;
 
+    private String message;
+
+    private I18n i18n;
+
+    // -------------------------------------------------------------------------
+    // Getter && Setter
+    // -------------------------------------------------------------------------
+
+    public void setPatientAttributeOptionService( PatientAttributeOptionService patientAttributeOptionService )
+    {
+        this.patientAttributeOptionService = patientAttributeOptionService;
+    }
+
+    public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService )
+    {
+        this.patientAttributeValueService = patientAttributeValueService;
+    }
+
     public void setId( int id )
     {
         this.id = id;
     }
 
-    private String message;
-
-    private I18n i18n;
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
 
     public String execute()
         throws Exception
@@ -90,23 +118,4 @@
 
     }
 
-    public void setPatientAttributeOptionService( PatientAttributeOptionService patientAttributeOptionService )
-    {
-        this.patientAttributeOptionService = patientAttributeOptionService;
-    }
-
-    public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService )
-    {
-        this.patientAttributeValueService = patientAttributeValueService;
-    }
-
-    public String getMessage()
-    {
-        return message;
-    }
-
-    public void setI18n( I18n i18n )
-    {
-        this.i18n = i18n;
-    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ValidatePatientAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ValidatePatientAttributeAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ValidatePatientAttributeAction.java	2011-03-31 01:42:05 +0000
@@ -43,7 +43,7 @@
 {
 
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientAttributeService patientAttributeService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/AddPatientAttributeGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/AddPatientAttributeGroupAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/AddPatientAttributeGroupAction.java	2011-03-31 01:42:05 +0000
@@ -45,7 +45,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependency
+    // Dependencies
     // -------------------------------------------------------------------------
 
     private PatientAttributeGroupService patientAttributeGroupService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupAction.java	2010-05-06 13:24:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupAction.java	2011-03-31 01:42:05 +0000
@@ -55,15 +55,11 @@
     private PatientAttributeService patientAttributeService;
 
     // -------------------------------------------------------------------------
-    // Input
+    // Input/Output
     // -------------------------------------------------------------------------
 
     private int id;
 
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
     private List<PatientAttribute> patientAttributes;
 
     private PatientAttributeGroup patientAttributeGroup;
@@ -98,7 +94,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/UpdatePatientAttributeGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/UpdatePatientAttributeGroupAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/UpdatePatientAttributeGroupAction.java	2011-03-31 01:42:05 +0000
@@ -45,7 +45,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependency
+    // Dependencies
     // -------------------------------------------------------------------------
 
     private PatientAttributeGroupService patientAttributeGroupService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/ValidatePatientAttributeGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/ValidatePatientAttributeGroupAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/ValidatePatientAttributeGroupAction.java	2011-03-31 01:42:05 +0000
@@ -42,7 +42,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientAttributeGroupService patientAttributeGroupService;
@@ -65,7 +65,7 @@
     private I18n i18n;
 
     // -------------------------------------------------------------------------
-    // Action implementation
+    // Getter && Setter
     // -------------------------------------------------------------------------
 
     public void setI18n( I18n i18n )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java	2010-11-29 05:40:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java	2011-03-31 01:42:05 +0000
@@ -33,7 +33,7 @@
 import com.opensymphony.xwork2.Action;
 
 /**
- * @author Viet 
+ * @author Viet
  * @version $Id$
  */
 public class AddPatientIdentifierTypeAction
@@ -44,7 +44,7 @@
     // -------------------------------------------------------------------------
 
     private PatientIdentifierTypeService patientIdentifierTypeService;
-    
+
     // -------------------------------------------------------------------------
     // Input/Output
     // -------------------------------------------------------------------------
@@ -52,39 +52,18 @@
     private String name;
 
     private String formater;
-    
+
     private String description;
-    
+
     private Boolean mandatory;
-    
+
     private Boolean related;
-    
+
     private Integer noChars;
 
     private String type;
 
     // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        PatientIdentifierType patientIdentifierType = new PatientIdentifierType();
-        patientIdentifierType.setName( name );
-        patientIdentifierType.setDescription( description );
-        patientIdentifierType.setFormat( formater == null ? "" : formater );
-        patientIdentifierType.setRelated( related.booleanValue() );
-        patientIdentifierType.setMandatory( mandatory.booleanValue() );
-        patientIdentifierType.setNoChars( noChars );
-        patientIdentifierType.setType( type );
-        
-        patientIdentifierTypeService.savePatientIdentifierType( patientIdentifierType );
-
-        return SUCCESS;
-    }
-    
-    // -------------------------------------------------------------------------
     // Getters && Setters
     // -------------------------------------------------------------------------
 
@@ -102,7 +81,7 @@
     {
         this.noChars = noChars;
     }
-    
+
     public void setType( String type )
     {
         this.type = type;
@@ -120,11 +99,33 @@
 
     public void setMandatory( Boolean mandatory )
     {
-        this.mandatory = mandatory; 
+        this.mandatory = mandatory;
     }
 
     public void setRelated( Boolean related )
     {
         this.related = related;
     }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+        throws Exception
+    {
+        PatientIdentifierType patientIdentifierType = new PatientIdentifierType();
+        patientIdentifierType.setName( name );
+        patientIdentifierType.setDescription( description );
+        patientIdentifierType.setFormat( formater == null ? "" : formater );
+        patientIdentifierType.setRelated( related.booleanValue() );
+        patientIdentifierType.setMandatory( mandatory.booleanValue() );
+        patientIdentifierType.setNoChars( noChars );
+        patientIdentifierType.setType( type );
+
+        patientIdentifierTypeService.savePatientIdentifierType( patientIdentifierType );
+
+        return SUCCESS;
+    }
+
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeAction.java	2010-02-22 09:19:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeAction.java	2011-03-31 01:42:05 +0000
@@ -40,38 +40,22 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientIdentifierTypeService patientIdentifierTypeService;
 
     // -------------------------------------------------------------------------
-    // Input
+    // Input/Output
     // -------------------------------------------------------------------------
 
     private Integer id;
 
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
     private PatientIdentifierType patientIdentifierType;
 
     // -------------------------------------------------------------------------
-    // Action
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        patientIdentifierType = patientIdentifierTypeService.getPatientIdentifierType( id );
-        return SUCCESS;
-    }
-    
-    // -------------------------------------------------------------------------
     // Getters && Setters
     // -------------------------------------------------------------------------
-    
 
     public PatientIdentifierType getPatientIdentifierType()
     {
@@ -92,4 +76,16 @@
     {
         this.patientIdentifierTypeService = patientIdentifierTypeService;
     }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+        throws Exception
+    {
+        patientIdentifierType = patientIdentifierTypeService.getPatientIdentifierType( id );
+
+        return SUCCESS;
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeListAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeListAction.java	2011-03-31 01:42:05 +0000
@@ -38,7 +38,7 @@
 import com.opensymphony.xwork2.Action;
 
 /**
- * @author Viet 
+ * @author Viet
  * @version $Id$
  */
 public class GetPatientIdentifierTypeListAction
@@ -49,13 +49,26 @@
     // -------------------------------------------------------------------------
 
     private PatientIdentifierTypeService patientIdentifierTypeService;
-    
+
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
 
     private List<PatientIdentifierType> identifierTypes = new ArrayList<PatientIdentifierType>();
-    
+
+    // -------------------------------------------------------------------------
+    // Getter && Setter
+    // -------------------------------------------------------------------------
+
+    public List<PatientIdentifierType> getIdentifierTypes()
+    {
+        return identifierTypes;
+    }
+
+    public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService )
+    {
+        this.patientIdentifierTypeService = patientIdentifierTypeService;
+    }
 
     // -------------------------------------------------------------------------
     // Action implementation
@@ -72,18 +85,4 @@
         return SUCCESS;
     }
 
-    // -------------------------------------------------------------------------
-    // Getter && Setter
-    // -------------------------------------------------------------------------
-    
-    public List<PatientIdentifierType> getIdentifierTypes()
-    {
-        return identifierTypes;
-    }
-    
-    public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService )
-    {
-        this.patientIdentifierTypeService = patientIdentifierTypeService;
-    }    
-   
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/RemovePatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/RemovePatientIdentifierTypeAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/RemovePatientIdentifierTypeAction.java	2011-03-31 01:42:05 +0000
@@ -42,7 +42,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientIdentifierTypeService patientIdentifierTypeService;
@@ -58,7 +58,31 @@
     private I18n i18n;
 
     // -------------------------------------------------------------------------
-    // Action
+    // Getters && Setters
+    // -------------------------------------------------------------------------
+
+    public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService )
+    {
+        this.patientIdentifierTypeService = patientIdentifierTypeService;
+    }
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()
@@ -98,27 +122,4 @@
         return ERROR;
     }
 
-    // -------------------------------------------------------------------------
-    // Getters && Setters
-    // -------------------------------------------------------------------------
-
-    public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService )
-    {
-        this.patientIdentifierTypeService = patientIdentifierTypeService;
-    }
-
-    public void setId( Integer id )
-    {
-        this.id = id;
-    }
-
-    public String getMessage()
-    {
-        return message;
-    }
-
-    public void setI18n( I18n i18n )
-    {
-        this.i18n = i18n;
-    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java	2010-11-29 05:40:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java	2011-03-31 01:42:05 +0000
@@ -44,49 +44,27 @@
     // -------------------------------------------------------------------------
 
     private PatientIdentifierTypeService patientIdentifierTypeService;
-    
+
     // -------------------------------------------------------------------------
     // Input/Output
     // -------------------------------------------------------------------------
 
     private Integer id;
-    
+
     private String name;
 
     private String description;
 
     private String formater;
-    
+
     private Boolean mandatory;
-    
+
     private Boolean related;
-    
+
     private Integer noChars;
 
     private String type;
-    
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-    public String execute()
-        throws Exception
-    {
-        PatientIdentifierType identifierType = patientIdentifierTypeService.getPatientIdentifierType( id );
-        if( identifierType != null )
-        {
-            identifierType.setName( name );
-            identifierType.setDescription( description );
-            identifierType.setFormat( formater == null ? "" : formater );
-            identifierType.setMandatory( mandatory.booleanValue() );
-            identifierType.setRelated( related.booleanValue() );
-            identifierType.setNoChars( noChars );
-            identifierType.setType( type );
-            patientIdentifierTypeService.updatePatientIdentifierType( identifierType );
-        }
-        
-        return SUCCESS;
-    }
-    
+
     // -------------------------------------------------------------------------
     // Getters && Setters
     // -------------------------------------------------------------------------
@@ -110,7 +88,7 @@
     {
         this.name = name;
     }
-    
+
     public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService )
     {
         this.patientIdentifierTypeService = patientIdentifierTypeService;
@@ -135,4 +113,28 @@
     {
         this.related = related;
     }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+        throws Exception
+    {
+        PatientIdentifierType identifierType = patientIdentifierTypeService.getPatientIdentifierType( id );
+        if ( identifierType != null )
+        {
+            identifierType.setName( name );
+            identifierType.setDescription( description );
+            identifierType.setFormat( formater == null ? "" : formater );
+            identifierType.setMandatory( mandatory.booleanValue() );
+            identifierType.setRelated( related.booleanValue() );
+            identifierType.setNoChars( noChars );
+            identifierType.setType( type );
+            patientIdentifierTypeService.updatePatientIdentifierType( identifierType );
+        }
+
+        return SUCCESS;
+    }
+
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/ValidatePatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/ValidatePatientIdentifierTypeAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/ValidatePatientIdentifierTypeAction.java	2011-03-31 01:42:05 +0000
@@ -41,9 +41,8 @@
 public class ValidatePatientIdentifierTypeAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private PatientIdentifierTypeService patientIdentifierTypeService;
@@ -61,6 +60,35 @@
     private Integer id;
 
     // -------------------------------------------------------------------------
+    // Getters && Setters
+    // -------------------------------------------------------------------------
+
+    public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService )
+    {
+        this.patientIdentifierTypeService = patientIdentifierTypeService;
+    }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
 
@@ -80,33 +108,4 @@
 
         return SUCCESS;
     }
-
-    // -------------------------------------------------------------------------
-    // Getters && Setters
-    // -------------------------------------------------------------------------
-
-    public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService )
-    {
-        this.patientIdentifierTypeService = patientIdentifierTypeService;
-    }
-    
-    public String getMessage()
-    {
-        return message;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    public void setI18n( I18n i18n )
-    {
-        this.i18n = i18n;
-    }
-
-    public void setId( Integer id )
-    {
-        this.id = id;
-    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/ImportPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/ImportPatientAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/ImportPatientAction.java	2011-03-31 01:42:05 +0000
@@ -95,7 +95,6 @@
 public class ImportPatientAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -133,15 +132,11 @@
     private I18n i18n;
 
     // -------------------------------------------------------------------------
-    // Input
+    // Input/Output
     // -------------------------------------------------------------------------
 
     private File output;
 
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
     private HashMap<Integer, Patient> errPatients = new HashMap<Integer, Patient>();
 
     private HashMap<Integer, String> errMessage = new HashMap<Integer, String>();
@@ -273,7 +268,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override
@@ -387,13 +382,10 @@
                         patientAttributeValueService.savePatientAttributeValue( attributeValue );
                     }
 
-                    // patientService.updatePatient( patient );
-
-                    // save program-instance
                     programInstanceService.addProgramInstance( programInstance );
-                    // update Patient
+
                     patientService.updatePatient( patient );
-                    // save programStageInstances
+
                     for ( ProgramStageInstance programStageInstance : programStageInstances )
                     {
                         programStageInstanceService.addProgramStageInstance( programStageInstance );
@@ -404,7 +396,7 @@
                     // -------------------------------------------------------------
 
                     patientDataValues = getPatientDataValue( orgunit, programInstance, programStageInstances, row, wb );
-                    
+
                     for ( PatientDataValue patientDataValue : patientDataValues )
                     {
                         patientDataValueService.savePatientDataValue( patientDataValue );
@@ -422,11 +414,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Support methods
-    // -------------------------------------------------------------------------
-
-    // -------------------------------------------------------------------------
-    // Get data from Excel file
+    // Supporting methods
     // -------------------------------------------------------------------------
 
     private Patient getPatient( int row, OrganisationUnit orgunit, HSSFWorkbook wb )
@@ -440,9 +428,9 @@
         patient.setRegistrationDate( new Date() );
         patient.setUnderAge( false );
 
-        // ---------------------------------------------------------
+        // ---------------------------------------------------------------------
         // Create Patient
-        // ---------------------------------------------------------
+        // ---------------------------------------------------------------------
 
         for ( XMLItem xmlItem : itemProperty )
         {
@@ -450,9 +438,9 @@
 
             String value = readValue( row, xmlItem.getColumn(), sheet );
 
-            // ---------------------------------------------------------
+            // -----------------------------------------------------------------
             // Import identifier values
-            // ---------------------------------------------------------
+            // -----------------------------------------------------------------
 
             if ( xmlItem.isType( XMLItem.IDENTIFIER_TYPE ) )
             {
@@ -492,8 +480,8 @@
         // PatientIdentifierType will be null
         // -------------------------------------------------------------
 
-        String systemIdentifier = PatientIdentifierGenerator.getNewIdentifier( patient.getBirthDate(),
-            patient.getGender() );
+        String systemIdentifier = PatientIdentifierGenerator.getNewIdentifier( patient.getBirthDate(), patient
+            .getGender() );
 
         PatientIdentifier systemGenerateIdentifier = patientIdentifierService.get( null, systemIdentifier );
         while ( systemGenerateIdentifier != null )
@@ -548,29 +536,24 @@
             if ( PatientAttribute.TYPE_COMBO.equalsIgnoreCase( attribute.getValueType() ) )
             {
                 // value is the id of the option
-                PatientAttributeOption option = patientAttributeOptionService
-                    .get( Integer.parseInt( value.split( ":" )[1] ) );
+                PatientAttributeOption option = patientAttributeOptionService.get( Integer
+                    .parseInt( value.split( ":" )[1] ) );
 
                 if ( option != null )
                 {
                     attributeValue.setPatientAttributeOption( option );
                     attributeValue.setValue( option.getName() );
                 }
-            }// end Attribute is combo-type
+            }
             else
             {
                 attributeValue.setValue( value.trim() );
             }
 
             attributeValues.add( attributeValue );
-
-            // patientAttributeValueService.savePatientAttributeValue(
-            // attributeValue );
-
         }
 
         patient.setAttributes( attributes );
-        // patientService.updatePatient( patient );
 
         return attributeValues;
     }
@@ -584,14 +567,8 @@
         for ( XMLItem xmlItem : itemEnrollProgram )
         {
             HSSFSheet sheet = wb.getSheetAt( xmlItem.getSheet() );
-
-            // Get value into Excel-file
             String value = readValue( row, xmlItem.getColumn(), sheet );
 
-            // ---------------------------------------------------------
-            // Create programInstance
-            // ---------------------------------------------------------
-
             Date date = format.parseDate( value );
 
             ProgramInstance.class.getMethod( "set" + StringUtils.capitalize( xmlItem.getValue() ), Date.class ).invoke(
@@ -607,10 +584,7 @@
         programInstance.setPatient( patient );
         programInstance.setCompleted( false );
 
-        // programInstanceService.addProgramInstance( programInstance );
-
         patient.getPrograms().add( program );
-        // patientService.updatePatient( patient );
 
         return programInstance;
     }
@@ -630,14 +604,12 @@
             programStageInstance.setProgramStage( programStage );
             programStageInstance.setStageInProgram( programStage.getStageInProgram() );
 
-            Date dueDate = DateUtils.getDateAfterAddition( programInstance.getDateOfIncident(),
-                programStage.getMinDaysFromStart() );
+            Date dueDate = DateUtils.getDateAfterAddition( programInstance.getDateOfIncident(), programStage
+                .getMinDaysFromStart() );
 
             programStageInstance.setDueDate( dueDate );
 
             programStageInstances.add( programStageInstance );
-            // programStageInstanceService.addProgramStageInstance(
-            // programStageInstance );
         }
 
         return programStageInstances;
@@ -646,19 +618,16 @@
     private Collection<PatientDataValue> getPatientDataValue( OrganisationUnit orgunit,
         ProgramInstance programInstance, List<ProgramStageInstance> stageInstances, int row, HSSFWorkbook wb )
     {
-
         Collection<PatientDataValue> dataValues = new HashSet<PatientDataValue>();
 
         for ( XMLItem xmlItem : itemProgramStage )
         {
             HSSFSheet sheet = wb.getSheetAt( xmlItem.getSheet() );
-
-            // Get value into Excel-file
             String value = readValue( row, xmlItem.getColumn(), sheet );
 
-            // ---------------------------------------------------------
+            // -----------------------------------------------------------------
             // Create PatientDataValue
-            // ---------------------------------------------------------
+            // -----------------------------------------------------------------
 
             String[] infor = xmlItem.getValue().split( "\\." );
 
@@ -712,17 +681,6 @@
                 dataValue.setValue( value );
 
                 dataValues.add( dataValue );
-
-                // patientDataValueService.savePatientDataValue( dataValue
-                // );
-
-                // else
-                // {
-                // dataValue.setTimestamp( new Date() );
-                // dataValue.setValue( value );
-                //
-                // patientDataValueService.updatePatientDataValue( dataValue );
-                // }
             }
 
         }
@@ -754,7 +712,10 @@
             return false;
         }
 
-        // Check duplication name, birthdate, gender
+        // ---------------------------------------------------------------------
+        // Check duplicated patient
+        // ---------------------------------------------------------------------
+
         Collection<Patient> patients = patientService.getPatient( patient.getFirstName(), patient.getMiddleName(),
             patient.getLastName(), patient.getBirthDate(), patient.getGender() );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java	2010-12-27 07:59:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java	2011-03-31 01:42:05 +0000
@@ -40,7 +40,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramService programService;
@@ -68,10 +68,6 @@
         this.description = description;
     }
 
-    /**
-     * Description of Date of Enrollment This description is differ from each
-     * program
-     */
     private String dateOfEnrollmentDescription;
 
     public void setDateOfEnrollmentDescription( String dateOfEnrollmentDescription )
@@ -79,10 +75,6 @@
         this.dateOfEnrollmentDescription = dateOfEnrollmentDescription;
     }
 
-    /**
-     * Description of Date of Incident This description is differ from each
-     * program
-     */
     private String dateOfIncidentDescription;
 
     public void setDateOfIncidentDescription( String dateOfIncidentDescription )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/DefineProgramAssociationsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/DefineProgramAssociationsAction.java	2010-05-17 16:13:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/DefineProgramAssociationsAction.java	2011-03-31 01:42:05 +0000
@@ -77,7 +77,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()
@@ -108,7 +108,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Supportive methods
+    // Supporting methods
     // -------------------------------------------------------------------------
 
     private Set<OrganisationUnit> convert( Collection<OrganisationUnit> organisationUnits )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAction.java	2011-02-27 21:18:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAction.java	2011-03-31 01:42:05 +0000
@@ -30,9 +30,7 @@
 import java.util.List;
 
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramService;
@@ -126,7 +124,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeAction.java	2010-11-09 02:09:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeAction.java	2011-03-31 01:42:05 +0000
@@ -27,9 +27,6 @@
 
 package org.hisp.dhis.patient.action.program;
 
-import java.util.Date;
-
-import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.program.ProgramAttribute;
 import org.hisp.dhis.program.ProgramAttributeService;
 
@@ -71,21 +68,21 @@
         this.id = id;
     }
 
-    // -------------------------------------------------------------------------
-    // Implementation Action
-    // -------------------------------------------------------------------------
-
     public ProgramAttribute getProgramAttribute()
     {
         return programAttribute;
     }
 
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
     @Override
     public String execute()
         throws Exception
     {
         programAttribute = programAttributeService.getProgramAttribute( id );
-        
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java	2011-02-27 21:18:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java	2011-03-31 01:42:05 +0000
@@ -49,14 +49,15 @@
     private ProgramAttributeService programAttributeService;
 
     // -------------------------------------------------------------------------
-    // Input/Output
+    // Output
     // -------------------------------------------------------------------------
 
     private Collection<ProgramAttribute> programAttributes;
 
     // -------------------------------------------------------------------------
-    // Getter
+    // Getter && Setter
     // -------------------------------------------------------------------------
+    
     public void setProgramAttributeService( ProgramAttributeService programAttributeService )
     {
         this.programAttributeService = programAttributeService;
@@ -68,7 +69,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java	2011-03-31 01:42:05 +0000
@@ -109,7 +109,6 @@
     public String execute()
         throws Exception
     {
-
         programs = programService.getAllPrograms();
 
         associations = programStageService.getAllProgramStages();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAction.java	2009-09-25 11:33:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAction.java	2011-03-31 01:42:05 +0000
@@ -40,7 +40,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramService programService;
@@ -51,7 +51,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Input/Output
+    // Input
     // -------------------------------------------------------------------------
 
     private int id;
@@ -61,6 +61,10 @@
         this.id = id;
     }
 
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
     public String execute()
         throws Exception
     {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeAction.java	2011-02-27 21:18:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeAction.java	2011-03-31 01:42:05 +0000
@@ -52,13 +52,13 @@
     }
 
     // -------------------------------------------------------------------------
-    // Input/Output
+    // Input
     // -------------------------------------------------------------------------
 
     private Integer id;
 
     // -------------------------------------------------------------------------
-    // Getters && Setters
+    // Setters
     // -------------------------------------------------------------------------
     
     public void setId( Integer id )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ShowAddProgramFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ShowAddProgramFormAction.java	2009-10-10 08:57:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ShowAddProgramFormAction.java	2011-03-31 01:42:05 +0000
@@ -42,9 +42,8 @@
 public class ShowAddProgramFormAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramStageService programStageService;
@@ -55,7 +54,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Input/Output
+    // Output
     // -------------------------------------------------------------------------
 
     private Collection<ProgramStage> programStages;
@@ -71,7 +70,6 @@
 
     public String execute()
     {
-
         programStages = new ArrayList<ProgramStage>( programStageService.getAllProgramStages() );
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ShowValidationDEAssociationsFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ShowValidationDEAssociationsFormAction.java	2011-02-27 21:18:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ShowValidationDEAssociationsFormAction.java	2011-03-31 01:42:05 +0000
@@ -44,7 +44,6 @@
 public class ShowValidationDEAssociationsFormAction
     implements Action
 {
-    
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java	2010-12-27 03:17:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java	2011-03-31 01:42:05 +0000
@@ -40,7 +40,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramService programService;
@@ -74,7 +74,7 @@
     {
         this.description = description;
     }
-    
+
     private Integer version;
 
     public Integer getVersion()
@@ -87,10 +87,6 @@
         this.version = version;
     }
 
-    /**
-     * Description of Date of Enrollment This description is differ from each
-     * program
-     */
     private String dateOfEnrollmentDescription;
 
     public void setDateOfEnrollmentDescription( String dateOfEnrollmentDescription )
@@ -98,10 +94,6 @@
         this.dateOfEnrollmentDescription = dateOfEnrollmentDescription;
     }
 
-    /**
-     * Description of Date of Incident This description is differ from each
-     * program
-     */
     private String dateOfIncidentDescription;
 
     public void setDateOfIncidentDescription( String dateOfIncidentDescription )
@@ -133,12 +125,12 @@
         Program program = programService.getProgram( id );
         program.setName( name );
         program.setDescription( description );
-        program.setVersion(version);
+        program.setVersion( version );
         program.setDateOfEnrollmentDescription( dateOfEnrollmentDescription );
         program.setDateOfIncidentDescription( dateOfIncidentDescription );
         program.setMinDaysAllowedInputData( minDaysAllowedInputData );
         program.setMaxDaysAllowedInputData( maxDaysAllowedInputData );
-        
+
         programService.updateProgram( program );
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java	2011-03-31 01:42:05 +0000
@@ -56,7 +56,7 @@
     public static final String PREFIX_ATTRIBUTE_OPTION = "attrOption";
 
     // -------------------------------------------------------------------------
-    // Dependency
+    // Dependencies
     // -------------------------------------------------------------------------
 
     private ProgramAttributeService programAttributeService;
@@ -117,7 +117,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAction.java	2011-03-31 01:42:05 +0000
@@ -42,9 +42,8 @@
 public class ValidateProgramAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramService programService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java	2011-03-31 01:42:05 +0000
@@ -42,9 +42,8 @@
 public class ValidateProgramAttributeAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramAttributeService programAttributeService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java	2011-03-31 01:42:05 +0000
@@ -147,7 +147,7 @@
         programStage.setProgram( program );
         programStage.setName( name );
         programStage.setDescription( description );
-        minDaysFromStart = (minDaysFromStart == null ) ? 0 : minDaysFromStart;
+        minDaysFromStart = (minDaysFromStart == null) ? 0 : minDaysFromStart;
         programStage.setMinDaysFromStart( minDaysFromStart );
 
         programStageService.saveProgramStage( programStage );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/SaveProgramStageSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/SaveProgramStageSortOrderAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/SaveProgramStageSortOrderAction.java	2011-03-31 01:42:05 +0000
@@ -44,7 +44,7 @@
 {
 
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramStageService programStageService;
@@ -55,7 +55,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Input
+    // Input/Output
     // -------------------------------------------------------------------------
 
     private List<Integer> programStageList;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowAddProgramStageFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowAddProgramStageFormAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowAddProgramStageFormAction.java	2011-03-31 01:42:05 +0000
@@ -45,7 +45,6 @@
 public class ShowAddProgramStageFormAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowSortProgramStageFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowSortProgramStageFormAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowSortProgramStageFormAction.java	2011-03-31 01:42:05 +0000
@@ -43,9 +43,8 @@
 public class ShowSortProgramStageFormAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramService programService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ValidateProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ValidateProgramStageAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ValidateProgramStageAction.java	2011-03-31 01:42:05 +0000
@@ -42,9 +42,8 @@
 public class ValidateProgramStageAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
-    // Dependencies
+    // Dependency
     // -------------------------------------------------------------------------
 
     private ProgramStageService programStageService;
@@ -71,7 +70,7 @@
     {
         this.name = name;
     }
-   
+
     private String message;
 
     public String getMessage()
@@ -93,7 +92,6 @@
     public String execute()
         throws Exception
     {
-
         ProgramStage match = programStageService.getProgramStageByName( name );
 
         if ( match != null && (id == null || match.getId() != id) )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipPatientAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipPatientAction.java	2011-03-31 01:42:05 +0000
@@ -66,15 +66,11 @@
     private RelationshipTypeService relationshipTypeService;
 
     // -------------------------------------------------------------------------
-    // Input - name
+    // Input
     // -------------------------------------------------------------------------
 
     private String fullName;
 
-    // -------------------------------------------------------------------------
-    // Input - demographics
-    // -------------------------------------------------------------------------
-
     private String birthDate;
 
     private char ageType;
@@ -87,10 +83,6 @@
 
     private String bloodGroup;
 
-    // -------------------------------------------------------------------------
-    // Input - others
-    // -------------------------------------------------------------------------
-
     private boolean underAge;
 
     private Integer relationshipId;
@@ -98,8 +90,7 @@
     private Integer relationshipTypeId;
 
     // -------------------------------------------------------------------------
-    // Output - making the patient available so that its attributes can be
-    // edited
+    // Output
     // -------------------------------------------------------------------------
 
     private Patient patient;
@@ -115,24 +106,16 @@
 
     public String execute()
     {
-        // ---------------------------------------------------------------------
-        // Prepare values
-        // ---------------------------------------------------------------------
-
         OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
 
         patient = new Patient();
-        
-        // ---------------------------------------------------------------------
-        // Set FirstName, MiddleName, LastName by FullName
-        // ---------------------------------------------------------------------
-
-        // ---------------------------------------------------------------------
-        // Set FirstName, MiddleName, LastName by FullName
-        // ---------------------------------------------------------------------
-        
+
+        // ---------------------------------------------------------------------
+        // Set FirstName, MiddleName, LastName by FullName
+        // ---------------------------------------------------------------------
+
         fullName = fullName.trim();
-        
+
         int startIndex = fullName.indexOf( ' ' );
         int endIndex = fullName.lastIndexOf( ' ' );
 
@@ -140,7 +123,7 @@
         String middleName = "";
         String lastName = "";
 
-        if( fullName.indexOf( ' ' ) != -1 )
+        if ( fullName.indexOf( ' ' ) != -1 )
         {
             firstName = fullName.substring( 0, startIndex );
             if ( startIndex == endIndex )
@@ -158,7 +141,7 @@
         patient.setFirstName( firstName );
         patient.setMiddleName( middleName );
         patient.setLastName( lastName );
-        
+
         // ---------------------------------------------------------------------
         // Set Other information for patient
         // ---------------------------------------------------------------------
@@ -266,6 +249,7 @@
         // -----------------------------------------------------------------------------
         // Save Patient Attributes
         // -----------------------------------------------------------------------------
+       
         Collection<PatientAttribute> attributes = patientAttributeService.getAllPatientAttributes();
 
         PatientAttributeValue attributeValue = null;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetPartnerAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetPartnerAction.java	2009-11-12 11:27:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetPartnerAction.java	2011-03-31 01:42:05 +0000
@@ -49,7 +49,6 @@
 public class GetPartnerAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -85,15 +84,15 @@
     // -------------------------------------------------------------------------
     // Input/Output
     // -------------------------------------------------------------------------
-    
+
     private boolean partnerIsRepresentative = false;
-    
+
     public boolean isPartnerIsRepresentative()
     {
         return partnerIsRepresentative;
     }
 
-    private int patientId;    
+    private int patientId;
 
     public int getPatientId()
     {
@@ -104,7 +103,7 @@
     {
         this.patientId = patientId;
     }
-    
+
     private int partnerId;
 
     public int getPartnerId()
@@ -152,18 +151,17 @@
     public String execute()
         throws Exception
     {
-
         Patient patient = patientService.getPatient( patientId );
-        
+
         partner = patientService.getPatient( partnerId );
-        
-        if( patient.getRepresentative() != null )
+
+        if ( patient.getRepresentative() != null )
         {
-            if( patient.getRepresentative() == partner )
+            if ( patient.getRepresentative() == partner )
             {
                 partnerIsRepresentative = true;
             }
-        }       
+        }
 
         patientIdentifier = patientIdentifierService.getPatientIdentifier( partner );
 
@@ -179,11 +177,10 @@
         {
             patientAttributeValueMap.put( patientAttributeValue.getPatientAttribute().getId(), patientAttributeValue
                 .getValue() );
-        }       
-        
+        }
+
         programs = programService.getAllPrograms();
 
         return SUCCESS;
-
     }
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipTypeAction.java	2009-11-05 07:15:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipTypeAction.java	2011-03-31 01:42:05 +0000
@@ -69,7 +69,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Action
+    // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipTypeListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipTypeListAction.java	2009-11-05 07:15:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipTypeListAction.java	2011-03-31 01:42:05 +0000
@@ -54,7 +54,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Output
+    // Input/Output
     // -------------------------------------------------------------------------
 
     private Collection<RelationshipType> relationshipTypes = new ArrayList<RelationshipType>();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRepresentativeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRepresentativeAction.java	2009-11-24 16:26:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRepresentativeAction.java	2011-03-31 01:42:05 +0000
@@ -39,7 +39,6 @@
 public class RemoveRepresentativeAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -76,7 +75,6 @@
     public String execute()
         throws Exception
     {
-
         patient = selectedStateManager.getSelectedPatient();
 
         patient.setRepresentative( null );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRelationshipAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRelationshipAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRelationshipAction.java	2011-03-31 01:42:05 +0000
@@ -44,7 +44,6 @@
 public class SaveRelationshipAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -155,25 +154,25 @@
         // ---------------------------------------------------------------------
 
         relationship = new Relationship();
-        
+
         if ( relationshipType.getaIsToB().equalsIgnoreCase( relationshipName ) )
         {
             relationship.setPatientA( partner );
             relationship.setPatientB( patient );
-            
+
             relationship.setRelationshipType( relationshipType );
             relationshipService.saveRelationship( relationship );
-            
-        }        
+
+        }
         else if ( relationshipType.getbIsToA().equalsIgnoreCase( relationshipName ) )
         {
             relationship.setPatientA( patient );
             relationship.setPatientB( partner );
-            
+
             relationship.setRelationshipType( relationshipType );
             relationshipService.saveRelationship( relationship );
         }
-        
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipFormAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipFormAction.java	2011-03-31 01:42:05 +0000
@@ -52,7 +52,6 @@
 public class ShowAddRelationshipFormAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowRelationshipListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowRelationshipListAction.java	2009-11-25 08:30:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowRelationshipListAction.java	2011-03-31 01:42:05 +0000
@@ -85,11 +85,6 @@
     public String execute()
         throws Exception
     {
-
-        // ---------------------------------------------------------------------
-        // Validate selected Patient
-        // ---------------------------------------------------------------------
-
         if ( id != null )
         {
             patient = patientService.getPatient( id );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateAddRelationshipPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateAddRelationshipPatientAction.java	2011-01-11 01:56:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateAddRelationshipPatientAction.java	2011-03-31 01:42:05 +0000
@@ -134,7 +134,7 @@
         }
         
         // ---------------------------------------------------------------------
-        // Check duplicate by FirstName, MiddleName, LastName, Birthday, Gender
+        // Check duplicated patient
         // ---------------------------------------------------------------------
 
         int startIndex = fullName.indexOf( ' ' );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java	2011-03-31 01:42:05 +0000
@@ -41,7 +41,6 @@
 public class ValidateRelationshipTypeAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateSearchAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateSearchAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateSearchAction.java	2011-03-31 01:42:05 +0000
@@ -39,10 +39,6 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddProgramStageDEValidationAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddProgramStageDEValidationAction.java	2010-05-14 01:45:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddProgramStageDEValidationAction.java	2011-03-31 01:42:05 +0000
@@ -46,7 +46,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependency
+    // Dependencies
     // -------------------------------------------------------------------------
 
     private ProgramStageDataElementValidationService validationService;
@@ -137,11 +137,11 @@
     {
         ProgramStageDataElementValidation validation = new ProgramStageDataElementValidation();
 
-        // Description
-
         validation.setDescription( description );
 
+        // ---------------------------------------------------------------------
         // leftProgramStageDataElement
+        // ---------------------------------------------------------------------
 
         ProgramStage programStage = programStageService.getProgramStage( leftProgramStageId );
 
@@ -157,7 +157,9 @@
 
         validation.setLeftProgramStageDataElement( leftProgramStageDataElement );
 
+        // ---------------------------------------------------------------------
         // rightProgramStageDataElement
+        // ---------------------------------------------------------------------
 
         programStage = programStageService.getProgramStage( rightProgramStageId );
 
@@ -173,8 +175,10 @@
 
         validation.setRightProgramStageDataElement( rightProgramStageDataElement );
 
-        // operator
-
+        // ---------------------------------------------------------------------
+        // Operator
+        // ---------------------------------------------------------------------
+        
         validation.setOperator( operator );
 
         validationService.saveProgramStageDataElementValidation( validation );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddValidationCriteriaAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddValidationCriteriaAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddValidationCriteriaAction.java	2011-03-31 01:42:05 +0000
@@ -128,7 +128,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Support method
+    // Supporting method
     // -------------------------------------------------------------------------
 
     private Object getObject()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java	2010-05-18 03:42:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java	2011-03-31 01:42:05 +0000
@@ -44,7 +44,6 @@
 public class DefineProgramListForValidationCriteriaAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependency
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java	2011-03-31 01:42:05 +0000
@@ -44,7 +44,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependency
+    // Dependencies
     // -------------------------------------------------------------------------
 
     private ValidationCriteriaService validationCriteriaService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramStageDEValidationListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramStageDEValidationListAction.java	2010-05-12 02:15:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramStageDEValidationListAction.java	2011-03-31 01:42:05 +0000
@@ -48,7 +48,7 @@
     private ProgramStageDataElementValidationService programStageDataElementValidationService;
 
     // -------------------------------------------------------------------------
-    // Out put
+    // Output
     // -------------------------------------------------------------------------
 
     private Collection<ProgramStageDataElementValidation> validations;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/UpdateValidationCriteriaAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/UpdateValidationCriteriaAction.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/UpdateValidationCriteriaAction.java	2011-03-31 01:42:05 +0000
@@ -135,7 +135,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Support method
+    // Supporting method
     // -------------------------------------------------------------------------
 
     private Object getObject()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/ValidateValidationCriteriaAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/ValidateValidationCriteriaAction.java	2010-05-12 02:15:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/ValidateValidationCriteriaAction.java	2011-03-31 01:42:05 +0000
@@ -41,7 +41,7 @@
     implements Action
 {
     // -------------------------------------------------------------------------
-    // Dependency
+    // Dependencies
     // -------------------------------------------------------------------------
 
     private ValidationCriteriaService validationCriteriaService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/idgen/PatientIdentifierGenerator.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/idgen/PatientIdentifierGenerator.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/idgen/PatientIdentifierGenerator.java	2011-03-31 01:42:05 +0000
@@ -39,17 +39,18 @@
     /**
      * Creates a new Patient Identifier: (BirthDate)(Gender)(XXXXXX)(checkdigit) <br>
      * <strong>BirthDate</strong> = YYYYMMDD <br>
-     * <strong>Gender</strong>    = Male : 1 | Female : 0<br>
-     * <strong>XXXXXX</strong>    = random digits e.g. from 0 - 999999 <br>
+     * <strong>Gender</strong> = Male : 1 | Female : 0<br>
+     * <strong>XXXXXX</strong> = random digits e.g. from 0 - 999999 <br>
      * <strong>checkdigit</strong>= using the Lunh Algorithm
+     * 
      * @param birthDate
      * @param gender
      * @return
      */
     public static String getNewIdentifier( Date birthDate, String gender )
     {
-        String noCheck = formatDate(birthDate) + formatGender(gender)
-                        + getFixLengthOfNumber(new Random().nextInt( 100000 ),6);
+        String noCheck = formatDate( birthDate ) + formatGender( gender )
+            + getFixLengthOfNumber( new Random().nextInt( 100000 ), 6 );
         return noCheck + getCheckdigit( noCheck );
     }
 
@@ -66,7 +67,7 @@
         for ( int i = 0; i < idWithoutCheckdigit.length(); i++ )
         {
             char ch = idWithoutCheckdigit.charAt( idWithoutCheckdigit.length() - i - 1 );
-            
+
             int digit = (int) ch - 48;
             int weight;
             if ( i % 2 == 0 )
@@ -107,15 +108,15 @@
         DecimalFormat df = new DecimalFormat( pattern );
         return df.format( number );
     }
-    
-    private static String formatDate(Date birthDate)
+
+    private static String formatDate( Date birthDate )
     {
-        SimpleDateFormat formater = new SimpleDateFormat("yyyyMMdd");
+        SimpleDateFormat formater = new SimpleDateFormat( "yyyyMMdd" );
         String bd = formater.format( birthDate );
         return bd;
     }
-    
-    private static String formatGender(String gender)
+
+    private static String formatGender( String gender )
     {
         return gender.equalsIgnoreCase( "f" ) ? "0" : "1";
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/DefaultSelectedStateManager.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/DefaultSelectedStateManager.java	2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/DefaultSelectedStateManager.java	2011-03-31 01:42:05 +0000
@@ -47,15 +47,12 @@
 public class DefaultSelectedStateManager
     implements SelectedStateManager
 {
-
     public static final String SESSION_KEY_SELECTED_SEARCHING_ATTRIBUTE_ID = "selected_searching_attribute_id";
 
     public static final String SESSION_KEY_SPECIFIED_SEARCH_TEXT = "specified_search_text";
 
     public static final String SESSION_KEY_SELECTED_SORT_ATTRIBUTE_ID = "selected_sort_attribute_id";
 
-    
-    
     public static final String SESSION_KEY_SELECTED_PATIENT_ID = "selected_patient_id";
 
     public static final String SESSION_KEY_SELECTED_PROGRAM_ID = "selected_program_id";
@@ -199,15 +196,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Support methods
-    // -------------------------------------------------------------------------
-
-    private static final Map getSession()
-    {
-        return ActionContext.getContext().getSession();
-    }
-
-    // -------------------------------------------------------------------------
     // Search patients by patient-attribute
     // -------------------------------------------------------------------------
 
@@ -246,7 +234,7 @@
     // -------------------------------------------------------------------------
     // Sort by patient-attribute
     // -------------------------------------------------------------------------
-    
+
     @SuppressWarnings( "unchecked" )
     public void setSortingAttributeId( int sortAttributeId )
     {
@@ -257,9 +245,19 @@
     {
         return (Integer) getSession().get( SESSION_KEY_SELECTED_SORT_ATTRIBUTE_ID );
     }
-    
+
     public void clearSortingAttributeId()
     {
         getSession().remove( SESSION_KEY_SELECTED_SORT_ATTRIBUTE_ID );
     }
+
+    // -------------------------------------------------------------------------
+    // Supporting methods
+    // -------------------------------------------------------------------------
+
+    @SuppressWarnings("unchecked")
+    private static final Map getSession()
+    {
+        return ActionContext.getContext().getSession();
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/SelectedStateManager.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/SelectedStateManager.java	2011-02-24 06:02:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/SelectedStateManager.java	2011-03-31 01:42:05 +0000
@@ -38,7 +38,6 @@
  */
 public interface SelectedStateManager
 {
-
     OrganisationUnit getSelectedOrganisationUnit();
 
     // -------------------------------------------------------------------------

=== 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	2011-03-29 03:06:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2011-03-31 01:42:05 +0000
@@ -249,8 +249,7 @@
 dataelement_group = Dataelement Group
 dataelement = Dataelement
 program_stage_de = ProgramStageDataElement
-case_properties = Case Properties
-case_attributes = Case Attributes
+case_attributes = Beneficiary Attributes
 operator = Operator
 and_or = And/Or
 dataentryform_management_for_program_stage = Data entry form management for Program stage

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm	2011-03-24 06:04:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm	2011-03-31 01:42:05 +0000
@@ -45,12 +45,6 @@
 	
 	<tr>
 		<input type="radio" id="operator" name="operator" value="COUNT" checked style='display:none;'>
-			
-		<!-- <td width="20em"><label for="operator">$i18n.getString( "operator" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td>
-			<input type="radio" id="operator" name="operator" value="COUNT" checked style='display:none;'> $i18n.getString( "count" ) 
-			<input type="radio" id="operator" name="operator" value="SUM"> $i18n.getString( "sum" )
-		</td> -->		
 	</tr>
 	<tr>
         <td colspan="2"><p></p></td>
@@ -64,7 +58,7 @@
 <table>
 	<thead>
 		<tr>
-			<th colspan="4">$i18n.getString( "condition_detail" )</th>
+			<th colspan="3">$i18n.getString( "condition_detail" )</th>
 		</tr>
 	</thead>
 	
@@ -128,36 +122,23 @@
 		
 		<td>
 		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "case_properties" )</legend>
+		<legend>$i18n.getString( "case_attributes" )</legend>
 		
 		<table>
 		
 			<tr>
 				<td>
-					<select id="caseProperty" name="caseProperty" size="8" ondblclick="insertInfo(this);" style="width:15em; height:16.5em" >
+					<select id="caseProperty" name="caseProperty" size="8" ondblclick="insertInfo(this);" style="width:18em; height:16.5em" >
 						<option value="[CP:gender]">$i18n.getString( "gender" )</option>
 						<option value="[CP:dobType]">$i18n.getString( "dobType" )</option>
-					</select>
-				</td>
-			</tr>
-		</table>
-		</td>
-		
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "case_attributes" )</legend>
-			<table>
-			<tr>
-				<td>
-					<select id="caseAttribute" name="caseAttribute" size="8" ondblclick="insertInfo(this);" style="width:15em; height:16.5em" >
-					#foreach( $patientAttribute in $patientAttributes )
+						
+						#foreach( $patientAttribute in $patientAttributes )
 						<option value="[CA:$patientAttribute.id]">$encoder.htmlEncode( $patientAttribute.name )</option>
-					#end                            
+						#end
 					</select>
 				</td>
 			</tr>
 		</table>
-		</fieldset>
 		</td>
 		
 		<td>
@@ -168,7 +149,7 @@
 		
 			<tr>
 				<td>
-					<select id="caseProperty" name="caseProperty" size="8" ondblclick="insertInfo(this);" style="width:15em; height:16.5em" >
+					<select id="caseProperty" name="caseProperty" size="8" ondblclick="insertInfo(this);" style="width:18em; height:16.5em" >
 						<option value="[PP:enrollmentdate - dateofincident]">$i18n.getString( "enrolldate_minus_incidentdate" )</option>
 						<option value="[PP:enrollmentdate]">$i18n.getString( "date_of_enrollment" )</option>
 						<option value="[PP:incidentdate]">$i18n.getString( "date_of_incident" )</option>
@@ -180,36 +161,38 @@
 		
 	</tr>	
 	<tr>
-		<td colspan='4'>
+		<td colspan='3'>
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "<" );' style="cursor:pointer;">
 			<img src="../images/less_or_equal.png" alt="$i18n.getString( 'less_or_equal' )" onclick='insertOperator( "<=" );' style="cursor:pointer;">
 			<img src="../images/greater.png" alt="$i18n.getString( 'greater' )" onclick='insertOperator( ">" );' style="cursor:pointer;">
 			<img src="../images/greater_or_equal.png" alt="$i18n.getString( 'greater_or_equal' )" onclick='insertOperator( ">=" );' style="cursor:pointer;">
 			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "=" );' style="cursor:pointer;">
 			<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "!=" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "+" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 			<img src="../images/is_null.png" alt="$i18n.getString( 'is_null' )" onclick='insertOperator( "is null" );' style="cursor:pointer;">
 			<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "is not null" );' style="cursor:pointer;">
-			&nbsp;
-			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "+" );' style="cursor:pointer;">
-			&nbsp;
-			<img src="../images/in.png" alt="$i18n.getString( 'in' )" onclick='insertOperator( "IN" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 			<img src="../images/and.png" alt="$i18n.getString( 'and' )" onclick='insertOperator( "AND" );' style="cursor:pointer;">
 			<img src="../images/or.png" alt="$i18n.getString( 'or' )" onclick='insertOperator( "OR" );' style="cursor:pointer;">
+			<img src="../images/in.png" alt="$i18n.getString( 'in' )" onclick='insertOperator( "IN" );' style="cursor:pointer;">
 			
 			<img src="../images/clear.png" align="right" alt="$i18n.getString( 'clear' )" onclick="byId('aggregationCondition').value='';" style="cursor:pointer;">
 		</td>
+	</tr>
+    </tbody>
 	
-    </tbody>
 	<tr>
-		<td colspan='4'>
+		<td colspan='3'>
 			<fieldset style="border: 1px solid #3f5d8e; ">
 				<legend>$i18n.getString( "condition" )</legend>
-				<textarea id="aggregationCondition" name="aggregationCondition" style="width:72.5em; height:10em" class="{validate:{required:true}}" onkeyup='getConditionDescription();'></textarea>
+				<textarea id="aggregationCondition" name="aggregationCondition" style="width:62.5em; height:10em" class="{validate:{required:true}}" onkeyup='getConditionDescription();'></textarea>
 			</fieldset>
 		</td>
 	</tr>
 	<tr>
-		<td colspan='4'>
+		<td colspan='3'>
 			<fieldset style="border: 1px solid #3f5d8e; ">
 				<legend>$i18n.getString( "description" )</legend>
 				<div id='aggregationDescription'></div>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm	2011-03-24 06:35:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm	2011-03-31 01:42:05 +0000
@@ -50,7 +50,7 @@
 	<tr>
 		<td width="20em"><label for="operator">$i18n.getString( "operator" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td>
-			<input type="radio" id="operator" name="operator" value="COUNT" #if( "$caseAggregation.operator" == "COUNT") checked #end >$i18n.getString( "count" )
+			<input type="radio" id="operator" name="operator" value="COUNT" #if( "$caseAggregation.operator" == "COUNT") checked #end style='display:none;'>
 		</td>				
 	</tr>
 	<tr>
@@ -65,7 +65,7 @@
 <table>
 	<thead>
 		<tr>
-			<th colspan="4">$i18n.getString( "condition_detail" )</th>
+			<th colspan="3">$i18n.getString( "condition_detail" )</th>
 		</tr>
 	</thead>
 	
@@ -131,31 +131,17 @@
 		
 			<tr>
 				<td>
-					<select id="caseProperty" name="caseProperty" size="5" ondblclick="insertInfo(this);" style="width:15em; height:14.5em" >
+					<select id="caseProperty" name="caseProperty" size="5" ondblclick="insertInfo(this);" style="width:20em; height:14.5em" >
 						<option value="[CP:gender]">$i18n.getString( "gender" )</option>
 						<option value="[CP:dob]">$i18n.getString( "dob" )</option>
-					</select>
-				</td>
-			</tr>
-		</table>
-		</td>
-		
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "case_attributes" )</legend>
-			<table>
-			<tr>
-				<td>
-					<select id="caseAttribute" name="caseAttribute" size="5" ondblclick="insertInfo(this);" style="width:15em; height:14.5em" >
-					#foreach( $patientAttribute in $patientAttributes )
+						
+						#foreach( $patientAttribute in $patientAttributes )
 						<option value="[CA:$patientAttribute.id]">$encoder.htmlEncode( $patientAttribute.name )</option>
-					#end                            
+						#end
 					</select>
 				</td>
 			</tr>
 		</table>
-		</fieldset>
-	
 		</td>
 		
 		<td>
@@ -175,37 +161,38 @@
 		</td>
 	</tr>	
 	<tr>
-		<td colspan=4>
+		<td colspan='3'>
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "<" );' style="cursor:pointer;">
 			<img src="../images/less_or_equal.png" alt="$i18n.getString( 'less_or_equal' )" onclick='insertOperator( "<=" );' style="cursor:pointer;">
 			<img src="../images/greater.png" alt="$i18n.getString( 'greater' )" onclick='insertOperator( ">" );' style="cursor:pointer;">
 			<img src="../images/greater_or_equal.png" alt="$i18n.getString( 'greater_or_equal' )" onclick='insertOperator( ">=" );' style="cursor:pointer;">
 			<img src="../images/equal.png" alt="$i18n.getString( 'equal' )" onclick='insertOperator( "=" );' style="cursor:pointer;">
 			<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "!=" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "+" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 			<img src="../images/is_null.png" alt="$i18n.getString( 'is_null' )" onclick='insertOperator( "is null" );' style="cursor:pointer;">
 			<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "is not null" );' style="cursor:pointer;">
-			&nbsp;
-			<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "+" );' style="cursor:pointer;">
-			&nbsp;
-			<img src="../images/in.png" alt="$i18n.getString( 'in' )" onclick='insertOperator( "IN" );' style="cursor:pointer;">
+			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 			<img src="../images/and.png" alt="$i18n.getString( 'and' )" onclick='insertOperator( "AND" );' style="cursor:pointer;">
 			<img src="../images/or.png" alt="$i18n.getString( 'or' )" onclick='insertOperator( "OR" );' style="cursor:pointer;">
+			<img src="../images/in.png" alt="$i18n.getString( 'in' )" onclick='insertOperator( "IN" );' style="cursor:pointer;">
 			
 			<img src="../images/clear.png" align="right" alt="$i18n.getString( 'clear' )" onclick="byId('aggregationCondition').value='';" style="cursor:pointer;">
 		</td>
 	
     </tbody>
 	<tr>
-		<td colspan='4'>
+		<td colspan='3'>
 			<fieldset style="border: 1px solid #3f5d8e; ">
 				<legend>$i18n.getString( "condition" )</legend>
-				<textarea id="aggregationCondition" name="aggregationCondition" style="width:72.5em; height:10em" class="{validate:{required:true}}" >$caseAggregation.aggregationExpression</textarea>
+				<textarea id="aggregationCondition" name="aggregationCondition" style="width:62.5em; height:10em" class="{validate:{required:true}}" >$caseAggregation.aggregationExpression</textarea>
 			</fieldset>
 		</td>
 	</tr>
 	
 	<tr>
-		<td colspan='4'>
+		<td colspan='3'>
 			<fieldset style="border: 1px solid #3f5d8e; ">
 				<legend>$i18n.getString( "description" )</legend>
 				<div id='aggregationDescription'>$!description</div>