← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5423: Change the property Program.anonymousEvent to anonymous (finished)

 

------------------------------------------------------------
revno: 5423
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-12-15 10:09:59 +0700
message:
  Change the property Program.anonymousEvent to anonymous (finished)
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadProgramStagesAction.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-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.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-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2011-12-15 03:09:59 +0000
@@ -108,7 +108,7 @@
         
         executeSql( "UPDATE program SET singleEvent = false WHERE singleevent is null" );
         
-        executeSql( "UPDATE program SET anonymousEvent = false WHERE anonymousEvent is null" );
+        executeSql( "UPDATE program SET anonymous = false WHERE anonymous is null" );
         
         executeSql( "UPDATE programstage SET irregular = false WHERE irregular is null" );
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadProgramStagesAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadProgramStagesAction.java	2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadProgramStagesAction.java	2011-12-15 03:09:59 +0000
@@ -142,7 +142,7 @@
 
         List<ProgramInstance> programInstances = new ArrayList<ProgramInstance>();
 
-        if ( program.getAnonymousEvent() )
+        if ( program.getAnonymous() )
         {
             programInstances = new ArrayList<ProgramInstance>( programInstanceService.getProgramInstances( program,
                 false ) );

=== 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	2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java	2011-12-15 03:09:59 +0000
@@ -157,7 +157,7 @@
                     programInstance.setProgram( program );
                     programInstance.setCompleted( false );
                     
-                    if ( !programStage.getProgram().getAnonymousEvent() )
+                    if ( !programStage.getProgram().getAnonymous() )
                     {
                         programInstance.setPatient( patient );
                         patient.getPrograms().add( program );

=== 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	2011-12-15 02:50:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java	2011-12-15 03:09:59 +0000
@@ -153,19 +153,6 @@
 
         programService.updateProgram( program );
 
-        if ( singleEvent )
-        {
-            ProgramStage programStage = new ProgramStage();
-
-            programStage.setName( name );
-            programStage.setDescription( description );
-            programStage.setStageInProgram( program.getProgramStages().size() + 1 );
-            programStage.setProgram( program );
-            programStage.setMinDaysFromStart( 0 );
-
-            programStageService.saveProgramStage( programStage );
-        }
-
         return SUCCESS;
     }
 }