← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4182: Fixed bug: Don't display default program-attributes in the list form ( Patient module ).

 

------------------------------------------------------------
revno: 4182
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-07-21 15:26:15 +0700
message:
  Fixed bug: Don't display default program-attributes in the list form ( Patient module ).
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java	2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java	2011-07-21 08:26:15 +0000
@@ -46,6 +46,7 @@
     // -------------------------------------------------------------------------
     // Define ValueType
     // -------------------------------------------------------------------------
+    
     public static final String TYPE_DATE = "DATE";
 
     public static final String TYPE_STRING = "TEXT";

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2011-07-18 07:54:57 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2011-07-21 08:26:15 +0000
@@ -38,7 +38,6 @@
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataentryform.DataEntryForm;
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.patientdatavalue.PatientDataValue;

=== 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-03-31 01:42:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java	2011-07-21 08:26:15 +0000
@@ -57,7 +57,7 @@
     // -------------------------------------------------------------------------
     // Getter && Setter
     // -------------------------------------------------------------------------
-    
+
     public void setProgramAttributeService( ProgramAttributeService programAttributeService )
     {
         this.programAttributeService = programAttributeService;
@@ -76,8 +76,15 @@
     public String execute()
         throws Exception
     {
+        ProgramAttribute deadDateAttribute = programAttributeService.getProgramAttributeByName( ProgramAttribute.DEAD_NAME );
+        ProgramAttribute closedDateAttribute = programAttributeService
+            .getProgramAttributeByName( ProgramAttribute.CLOSED_DATE );
+        
         programAttributes = programAttributeService.getAllProgramAttributes();
         
+        programAttributes.remove( deadDateAttribute );
+        programAttributes.remove( closedDateAttribute );
+
         return SUCCESS;
     }
 }