← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11372: Error when to eroll a person into single event with registration.

 

------------------------------------------------------------
revno: 11372
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-07-09 15:28:54 +0700
message:
  Error when to eroll a person into single event with registration.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.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/patient/AddPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java	2013-07-09 06:58:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java	2013-07-09 08:28:54 +0000
@@ -223,15 +223,6 @@
             _birthDate = patient.getBirthDate();
             patient.setDobType( dobType );
         }
-//        else
-//        {
-//            Character dobType = Patient.DOB_TYPE_DECLARED;
-//            Calendar today = Calendar.getInstance();
-//            PeriodType.clearTimeOfDay( today );
-//            Date date = today.getTime();
-//            patient.setBirthDate( date ); 
-//            patient.setDobType( dobType );
-//        }
 
         // -----------------------------------------------------------------------------
         // Registration Date

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java	2013-07-02 12:24:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java	2013-07-09 08:28:54 +0000
@@ -249,7 +249,10 @@
         programStage.setIrregular( irregular );
         programStage.setMinDaysFromStart( minDaysFromStart );
         programStage.setDisplayGenerateEventBox( displayGenerateEventBox );
-        programStage.setAutoGenerateEvent( autoGenerateEvent );
+        if ( !programStage.getProgram().isSingleEvent() )
+        {
+            programStage.setAutoGenerateEvent( autoGenerateEvent );
+        }
         programStage.setValidCompleteOnly( validCompleteOnly );
         programStage.setCaptureCoordinates( captureCoordinates );