← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7032: Minor fix.

 

------------------------------------------------------------
revno: 7032
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-05-24 17:44:17 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentSelectAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.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-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java	2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java	2012-05-24 10:44:17 +0000
@@ -125,8 +125,7 @@
 
         for ( ProgramInstance programInstance : programInstances )
         {
-            if ( programInstance.getProgram().getType() == Program.SINGLE_EVENT_WITH_REGISTRATION 
-                || programInstance.getProgram().getType() == Program.SINGLE_EVENT_WITHOUT_REGISTRATION )
+            if ( programInstance.getProgram().isSingleEvent() )
             {
                 completedPrograms.add( programInstance.getProgram() );
             }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java	2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java	2012-05-24 10:44:17 +0000
@@ -187,7 +187,7 @@
                     programStageInstanceService.addProgramStageInstance( programStageInstance );
                     selectedStateManager.setSelectedProgramInstance( programInstance );
                 }
-                else if ( type == Program.SINGLE_EVENT_WITH_REGISTRATION )
+                else if ( type == Program.SINGLE_EVENT_WITHOUT_REGISTRATION )
                 {
                     ProgramInstance programInstance = programInstanceService.getProgramInstances( patient, program ).iterator().next();
                     
@@ -214,8 +214,7 @@
                 programStageInstance.setStoredBy( storedBy );
                 programStageInstance.setOrganisationUnit( selectedStateManager.getSelectedOrganisationUnit() );
 
-                if ( programStageInstance.getProgramInstance().getProgram().getType() == Program.SINGLE_EVENT_WITH_REGISTRATION  ||
-                    programStageInstance.getProgramInstance().getProgram().getType() == Program.SINGLE_EVENT_WITHOUT_REGISTRATION )
+                if ( programStageInstance.getProgramInstance().getProgram().isSingleEvent() )
                 {
                     programStageInstance.setDueDate( dateValue );
                 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentAction.java	2012-05-23 19:48:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentAction.java	2012-05-24 10:44:17 +0000
@@ -320,7 +320,7 @@
         {
             return false;
         }
-        else if ( program.getType() == Program.MULTIPLE_EVENTS_WITH_REGISTRATION && programInstance == null )
+        else if ( !program.isSingleEvent() && programInstance == null )
         {
             return false;
         }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentSelectAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentSelectAction.java	2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentSelectAction.java	2012-05-24 10:44:17 +0000
@@ -130,8 +130,7 @@
 
         for ( ProgramInstance programInstance : programInstances )
         {
-            int type = programInstance.getProgram().getType();
-            if ( type == Program.SINGLE_EVENT_WITH_REGISTRATION || type == Program.SINGLE_EVENT_WITHOUT_REGISTRATION )
+            if ( programInstance.getProgram().isSingleEvent() )
             {
                 completedPrograms.add( programInstance.getProgram() );
             }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java	2012-05-03 10:18:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java	2012-05-24 10:44:17 +0000
@@ -72,6 +72,8 @@
 
     private List<Integer> searchingAttributeId = new ArrayList<Integer>();
 
+    private String facilityLB;
+
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -110,6 +112,11 @@
         return patientAttributes;
     }
 
+    public void setFacilityLB( String facilityLB )
+    {
+        this.facilityLB = facilityLB;
+    }
+
     public Map<Integer, String> getMapPatientOrgunit()
     {
         return mapPatientOrgunit;