← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11869: Move some properties from program to program-stage.

 

------------------------------------------------------------
revno: 11869
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-09-03 04:20:47 +0700
message:
  Move some properties from program to program-stage.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java
  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/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveProgramEnrollmentAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramMetaData.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm
  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/UpdateProgramAction.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/UpdateProgramStageAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.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-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2013-09-02 08:27:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2013-09-02 21:20:47 +0000
@@ -57,7 +57,7 @@
 /**
  * @author Abyot Asalefew
  */
-@JacksonXmlRootElement(localName = "program", namespace = DxfNamespaces.DXF_2_0)
+@JacksonXmlRootElement( localName = "program", namespace = DxfNamespaces.DXF_2_0 )
 public class Program
     extends BaseIdentifiableObject
 {
@@ -66,11 +66,13 @@
      */
     private static final long serialVersionUID = -2581751965520009382L;
 
-    public static final List<String> TYPE_LOOKUP = Arrays.asList( "",
-        "MULTIPLE_EVENTS_WITH_REGISTRATION", "SINGLE_EVENT_WITH_REGISTRATION", "SINGLE_EVENT_WITHOUT_REGISTRATION" );
+    public static final List<String> TYPE_LOOKUP = Arrays.asList( "", "MULTIPLE_EVENTS_WITH_REGISTRATION",
+        "SINGLE_EVENT_WITH_REGISTRATION", "SINGLE_EVENT_WITHOUT_REGISTRATION" );
 
     public static final int MULTIPLE_EVENTS_WITH_REGISTRATION = 1;
+
     public static final int SINGLE_EVENT_WITH_REGISTRATION = 2;
+
     public static final int SINGLE_EVENT_WITHOUT_REGISTRATION = 3;
 
     private String description;
@@ -99,30 +101,18 @@
 
     private Integer type;
 
-    private Boolean displayProvidedOtherFacility;
-
     private Boolean displayIncidentDate;
 
-    private Boolean generatedByEnrollmentDate;
-
     private Boolean ignoreOverdueEvents;
 
     private List<PatientIdentifierType> patientIdentifierTypes;
 
     private List<PatientAttribute> patientAttributes;
 
-    private Boolean blockEntryForm = false;
-
     private Set<UserAuthorityGroup> userRoles = new HashSet<UserAuthorityGroup>();
 
     private Boolean onlyEnrollOnce = false;
 
-    /**
-     * Enabled this property to show a pop-up for confirming Complete a program
-     * after to complete a progam-stage
-     */
-    private Boolean remindCompleted = false;
-
     private Set<PatientReminder> patientReminders = new HashSet<PatientReminder>();
 
     /**
@@ -228,7 +218,7 @@
         return null;
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings( "unchecked" )
     public ValidationCriteria isValid( Patient patient )
     {
         try
@@ -267,21 +257,8 @@
     // -------------------------------------------------------------------------
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
-    public Boolean getDisplayProvidedOtherFacility()
-    {
-        return displayProvidedOtherFacility;
-    }
-
-    public void setDisplayProvidedOtherFacility( Boolean displayProvidedOtherFacility )
-    {
-        this.displayProvidedOtherFacility = displayProvidedOtherFacility;
-    }
-
-    @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getDescription()
     {
         return description;
@@ -298,8 +275,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public Integer getVersion()
     {
         return version;
@@ -310,33 +287,20 @@
         this.version = version;
     }
 
-    @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
-    public Boolean getRemindCompleted()
-    {
-        return remindCompleted;
-    }
-
-    public void setRemindCompleted( Boolean remindCompleted )
-    {
-        this.remindCompleted = remindCompleted;
-    }
-
-    @JsonProperty(value = "organisationUnits")
-    @JsonSerialize(contentAs = BaseIdentifiableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "organisationUnits", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "organisationUnit", namespace = DxfNamespaces.DXF_2_0)
+    @JsonProperty( value = "organisationUnits" )
+    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "organisationUnits", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "organisationUnit", namespace = DxfNamespaces.DXF_2_0 )
     public Set<OrganisationUnit> getOrganisationUnits()
     {
         return organisationUnits;
     }
 
-    @JsonProperty(value = "programInstances")
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "programInstances", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "programInstance", namespace = DxfNamespaces.DXF_2_0)
+    @JsonProperty( value = "programInstances" )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "programInstances", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "programInstance", namespace = DxfNamespaces.DXF_2_0 )
     public Set<ProgramInstance> getProgramInstances()
     {
         return programInstances;
@@ -347,11 +311,11 @@
         this.programInstances = programInstances;
     }
 
-    @JsonProperty(value = "programStages")
-    @JsonSerialize(contentAs = BaseIdentifiableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "programStages", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "programStage", namespace = DxfNamespaces.DXF_2_0)
+    @JsonProperty( value = "programStages" )
+    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "programStages", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "programStage", namespace = DxfNamespaces.DXF_2_0 )
     public Set<ProgramStage> getProgramStages()
     {
         return programStages;
@@ -363,8 +327,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getDateOfEnrollmentDescription()
     {
         return dateOfEnrollmentDescription;
@@ -376,8 +340,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getDateOfIncidentDescription()
     {
         return dateOfIncidentDescription;
@@ -407,11 +371,11 @@
         this.type = type;
     }
 
-    @JsonProperty(value = "validationCriterias")
-    @JsonSerialize(contentAs = BaseIdentifiableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "validationCriterias", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "validationCriteria", namespace = DxfNamespaces.DXF_2_0)
+    @JsonProperty( value = "validationCriterias" )
+    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "validationCriterias", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "validationCriteria", namespace = DxfNamespaces.DXF_2_0 )
     public Set<ValidationCriteria> getPatientValidationCriteria()
     {
         return patientValidationCriteria;
@@ -422,11 +386,11 @@
         this.patientValidationCriteria = patientValidationCriteria;
     }
 
-    @JsonProperty(value = "identifierTypes")
-    @JsonSerialize(contentAs = BaseIdentifiableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "identifierTypes", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "identifierType", namespace = DxfNamespaces.DXF_2_0)
+    @JsonProperty( value = "identifierTypes" )
+    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "identifierTypes", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "identifierType", namespace = DxfNamespaces.DXF_2_0 )
     public List<PatientIdentifierType> getPatientIdentifierTypes()
     {
         return patientIdentifierTypes;
@@ -437,11 +401,11 @@
         this.patientIdentifierTypes = patientIdentifierTypes;
     }
 
-    @JsonProperty(value = "attributes")
-    @JsonSerialize(contentAs = BaseIdentifiableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "attributes", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "attribute", namespace = DxfNamespaces.DXF_2_0)
+    @JsonProperty( value = "attributes" )
+    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "attributes", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "attribute", namespace = DxfNamespaces.DXF_2_0 )
     public List<PatientAttribute> getPatientAttributes()
     {
         return patientAttributes;
@@ -453,8 +417,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public Boolean getDisplayIncidentDate()
     {
         return displayIncidentDate;
@@ -466,8 +430,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     private Object getValueFromPatient( String property, Patient patient )
         throws Exception
     {
@@ -475,21 +439,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
-    public Boolean getGeneratedByEnrollmentDate()
-    {
-        return generatedByEnrollmentDate;
-    }
-
-    public void setGeneratedByEnrollmentDate( Boolean generatedByEnrollmentDate )
-    {
-        this.generatedByEnrollmentDate = generatedByEnrollmentDate;
-    }
-
-    @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public Boolean getIgnoreOverdueEvents()
     {
         return ignoreOverdueEvents;
@@ -501,39 +452,26 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
-    public Boolean getBlockEntryForm()
-    {
-        return blockEntryForm;
-    }
-
-    public void setBlockEntryForm( Boolean blockEntryForm )
-    {
-        this.blockEntryForm = blockEntryForm;
-    }
-
-    @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public boolean isSingleEvent()
     {
         return type != null && (SINGLE_EVENT_WITH_REGISTRATION == type || SINGLE_EVENT_WITHOUT_REGISTRATION == type);
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public boolean isRegistration()
     {
         return type != null && (SINGLE_EVENT_WITH_REGISTRATION == type || MULTIPLE_EVENTS_WITH_REGISTRATION == type);
     }
 
     @JsonProperty
-    @JsonSerialize(contentAs = BaseIdentifiableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "userRoles", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "userRole", namespace = DxfNamespaces.DXF_2_0)
+    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "userRoles", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "userRole", namespace = DxfNamespaces.DXF_2_0 )
     public Set<UserAuthorityGroup> getUserRoles()
     {
         return userRoles;
@@ -545,8 +483,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public Boolean getOnlyEnrollOnce()
     {
         return onlyEnrollOnce;
@@ -558,8 +496,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public Set<PatientReminder> getPatientReminders()
     {
         return patientReminders;
@@ -571,9 +509,9 @@
     }
 
     @JsonProperty
-    @JsonSerialize(contentAs = BaseIdentifiableObject.class)
-    @JacksonXmlElementWrapper(localName = "organisationUnitGroups", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "organisationUnitGroup", namespace = DxfNamespaces.DXF_2_0)
+    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+    @JacksonXmlElementWrapper( localName = "organisationUnitGroups", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "organisationUnitGroup", namespace = DxfNamespaces.DXF_2_0 )
     public Set<OrganisationUnitGroup> getOrganisationUnitGroups()
     {
         return organisationUnitGroups;
@@ -585,7 +523,7 @@
     }
 
     @JsonProperty
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public Boolean getDisplayOnAllOrgunit()
     {
         return displayOnAllOrgunit;
@@ -597,8 +535,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public Boolean getUseBirthDateAsIncidentDate()
     {
         return useBirthDateAsIncidentDate;
@@ -610,8 +548,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public Boolean getUseBirthDateAsEnrollmentDate()
     {
         return useBirthDateAsEnrollmentDate;
@@ -623,8 +561,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public Boolean getSelectEnrollmentDatesInFuture()
     {
         return selectEnrollmentDatesInFuture;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2013-09-02 21:20:47 +0000
@@ -34,6 +34,7 @@
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+
 import org.hisp.dhis.common.BaseIdentifiableObject;
 import org.hisp.dhis.common.DxfNamespaces;
 import org.hisp.dhis.common.view.DetailedView;
@@ -52,9 +53,11 @@
     extends BaseIdentifiableObject
 {
     public static final String TYPE_DEFAULT = "default";
+
     public static final String TYPE_SECTION = "section";
+
     public static final String TYPE_CUSTOM = "custom";
-    
+
     /**
      * Determines if a de-serialized file is compatible with this class.
      */
@@ -85,11 +88,23 @@
     private Boolean validCompleteOnly = false;
 
     private Boolean displayGenerateEventBox = true;
-    
+
     private Boolean captureCoordinates = false;
-    
+
     private Boolean relatedPatient = false;
 
+    private Boolean displayProvidedOtherFacility;
+
+    private Boolean blockEntryForm = false;
+
+    /**
+     * Enabled this property to show a pop-up for confirming Complete a program
+     * after to complete a progam-stage
+     */
+    private Boolean remindCompleted = false;
+
+    private Boolean generatedByEnrollmentDate;
+
     // -------------------------------------------------------------------------
     // Constructors
     // -------------------------------------------------------------------------
@@ -148,6 +163,58 @@
     // Getters and setters
     // -------------------------------------------------------------------------
 
+    @JsonProperty
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public Boolean getGeneratedByEnrollmentDate()
+    {
+        return generatedByEnrollmentDate;
+    }
+
+    public void setGeneratedByEnrollmentDate( Boolean generatedByEnrollmentDate )
+    {
+        this.generatedByEnrollmentDate = generatedByEnrollmentDate;
+    }
+
+    @JsonProperty
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public Boolean getBlockEntryForm()
+    {
+        return blockEntryForm;
+    }
+
+    public void setBlockEntryForm( Boolean blockEntryForm )
+    {
+        this.blockEntryForm = blockEntryForm;
+    }
+
+    @JsonProperty
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public Boolean getDisplayProvidedOtherFacility()
+    {
+        return displayProvidedOtherFacility;
+    }
+
+    public void setDisplayProvidedOtherFacility( Boolean displayProvidedOtherFacility )
+    {
+        this.displayProvidedOtherFacility = displayProvidedOtherFacility;
+    }
+
+    @JsonProperty
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public Boolean getRemindCompleted()
+    {
+        return remindCompleted;
+    }
+
+    public void setRemindCompleted( Boolean remindCompleted )
+    {
+        this.remindCompleted = remindCompleted;
+    }
+
     public Set<PatientReminder> getPatientReminders()
     {
         return patientReminders;
@@ -360,5 +427,5 @@
     {
         this.relatedPatient = relatedPatient;
     }
-    
+
 }

=== 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	2013-09-02 18:49:20 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2013-09-02 21:20:47 +0000
@@ -225,6 +225,15 @@
         executeSql( "update program set selectEnrollmentDatesInFuture = true where selectEnrollmentDatesInFuture is null");
         executeSql( "update programstage set relatedPatient = false where relatedPatient is null");
         executeSql( "update validationcriteria set description = name where description is null or description='' ");
+        executeSql( "update programstage set generatedByEnrollmentDate = false where generatedByEnrollmentDate is null ");
+        executeSql( "update programstage set blockEntryForm = false where blockEntryForm is null ");
+        executeSql( "update programstage set remindCompleted = false where remindCompleted is null ");
+        executeSql( "update programstage set displayProvidedOtherFacility = false where displayProvidedOtherFacility is null ");
+        executeSql( "ALTER TABLE program DROP COLUMN generatedByEnrollmentDate" );
+        executeSql( "ALTER TABLE program DROP COLUMN blockEntryForm" );
+        executeSql( "ALTER TABLE program DROP COLUMN remindCompleted" );
+        executeSql( "ALTER TABLE program DROP COLUMN displayProvidedOtherFacility" );
+        
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2013-08-29 18:09:46 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2013-09-02 21:20:47 +0000
@@ -42,8 +42,6 @@
 
     <property name="type" />
 
-    <property name="displayProvidedOtherFacility" />
-
     <property name="displayIncidentDate" />
     
     <property name="onlyEnrollOnce" />
@@ -61,21 +59,14 @@
       <many-to-many column="patientattributeid" class="org.hisp.dhis.patient.PatientAttribute"
         foreign-key="fk_program_patientAttributes_patientattributeid" />
     </list>
-
-    <property name="generatedByEnrollmentDate" />
-
     <property name="ignoreOverdueEvents" />
 
-    <property name="blockEntryForm" />
-
 	<set name="userRoles" table="program_userroles">
 		<key column="programid" />
 		<many-to-many class="org.hisp.dhis.user.UserAuthorityGroup"
 			column="userroleid" foreign-key="fk_program_userroles"/>
 	</set>
 			
- 	<property name="remindCompleted" />
- 
  	<set name="patientReminders" order-by="daysAllowedSendMessage" cascade="all">
       <key column="programid" />
       <one-to-many class="org.hisp.dhis.patient.PatientReminder" />

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2013-07-31 06:51:17 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2013-09-02 21:20:47 +0000
@@ -56,8 +56,16 @@
 		<property name="displayGenerateEventBox" />
 
 		<property name="captureCoordinates" />
+
+		<property name="relatedPatient" />
 		
-		<property name="relatedPatient" />
+		<property name="generatedByEnrollmentDate" />
+
+		<property name="blockEntryForm" />
+
+		<property name="remindCompleted" />
+
+		<property name="displayProvidedOtherFacility" />
 
 	</class>
 </hibernate-mapping>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java	2013-09-02 21:20:47 +0000
@@ -297,8 +297,8 @@
         Collections.sort( programStageDataElements, new ProgramStageDataElementSortOrderComparator() );
 
         DataEntryForm dataEntryForm = programStage.getDataEntryForm();
-        Boolean displayProvidedOtherFacility = program.getDisplayProvidedOtherFacility() == null
-            || !program.getDisplayProvidedOtherFacility();
+        Boolean displayProvidedOtherFacility = programStage.getDisplayProvidedOtherFacility() == null
+            || !programStage.getDisplayProvidedOtherFacility();
 
         if ( programStage.getDataEntryType().equals( ProgramStage.TYPE_SECTION ) )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveProgramEnrollmentAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveProgramEnrollmentAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveProgramEnrollmentAction.java	2013-09-02 21:20:47 +0000
@@ -206,21 +206,26 @@
             patient.getPrograms().add( program );
             patientService.updatePatient( patient );
 
-            Date dateCreatedEvent = format.parseDate( dateOfIncident );
-            if ( program.getGeneratedByEnrollmentDate() )
-            {
-                dateCreatedEvent = format.parseDate( enrollmentDate );
-            }
-
             boolean isFirstStage = false;
             Date currentDate = new Date();
             for ( ProgramStage programStage : program.getProgramStages() )
             {
                 if ( programStage.getAutoGenerateEvent() )
                 {
+                    Date dateCreatedEvent = null;
+                    if ( programStage.getGeneratedByEnrollmentDate() )
+                    {
+                        dateCreatedEvent = format.parseDate( enrollmentDate );
+                    }
+                    else
+                    {
+                        dateCreatedEvent = format.parseDate( dateOfIncident );
+
+                    }
+
                     Date dueDate = DateUtils
                         .getDateAfterAddition( dateCreatedEvent, programStage.getMinDaysFromStart() );
-
+                    
                     if ( !program.getIgnoreOverdueEvents()
                         || !(program.getIgnoreOverdueEvents() && dueDate.before( currentDate )) )
                     {
@@ -252,7 +257,7 @@
             {
                 outboundSms = new ArrayList<OutboundSms>();
             }
-            
+
             outboundSms.addAll( programInstanceService.sendMessages( programInstance,
                 PatientReminder.SEND_WHEN_TO_EMROLLEMENT, format ) );
             programInstanceService.updateProgramInstance( programInstance );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-08-19 06:54:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-09-02 21:20:47 +0000
@@ -676,4 +676,5 @@
 related_patient = Related person
 search_by_user_orgunits = Search by user orgunits
 show_data = Show data
-name_in_use = Name is in use
\ No newline at end of file
+name_in_use = Name is in use
+incomplete_confirm_message = Are you sure this event is incompleted?
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm	2013-08-29 09:34:09 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm	2013-09-02 21:20:47 +0000
@@ -3,7 +3,7 @@
 		<col id="deCol">
 		<col id="deCol">
 		<col id="entryCol">
-		#if( $!program.displayProvidedOtherFacility=='true')
+		#if( $!programStage.displayProvidedOtherFacility=='true')
 		<col width="5%" />
 		#end
 	</colgroup>
@@ -11,7 +11,7 @@
 	<tr>
 		<th>$i18n.getString( "data_element" )</th>                   
 		<th>$i18n.getString( "value" )</th>
-		#if( $program.displayProvidedOtherFacility=='true')
+		#if( $programStage.displayProvidedOtherFacility=='true')
 		<th>$i18n.getString( "provided_elsewhere" )</th>
 		#end
 	</tr>
@@ -75,7 +75,7 @@
 					onkeypress="return keyPress(event, this)" tabindex="$tabIndex"/>
 			#end
 		</td> 
-		#if( $programStage.program.displayProvidedOtherFacility=='true' )
+		#if( $programStage.displayProvidedOtherFacility=='true' )
 		<td style='width:20px;' align='center'>
 			#set( $id = $programStageDataElement.programStage.uid + '-' + $programStageDataElement.dataElement.uid + '-facility' )
 			#if( $programStageDataElement.allowProvidedElsewhere == 'true')

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2013-09-02 19:05:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2013-09-02 21:20:47 +0000
@@ -795,8 +795,8 @@
             $( "#entryFormContainer input[id='programId']" ).val( data.program.id );
             $( "#entryFormContainer input[id='validCompleteOnly']" ).val( data.programStage.validCompleteOnly );
             $( "#entryFormContainer input[id='currentUsername']" ).val( data.currentUsername );
-            $( "#entryFormContainer input[id='blockEntryForm']" ).val( data.program.blockEntryForm );
-            $( "#entryFormContainer input[id='remindCompleted']" ).val( data.program.remindCompleted );
+            $( "#entryFormContainer input[id='blockEntryForm']" ).val( data.programStage.blockEntryForm );
+            $( "#entryFormContainer input[id='remindCompleted']" ).val( data.programStage.remindCompleted );
 
             $( "input[id='dueDate']" ).val( data.dueDate );
             $( "input[id='executionDate']" ).val( data.executionDate );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramMetaData.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramMetaData.vm	2013-08-06 06:39:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramMetaData.vm	2013-09-02 21:20:47 +0000
@@ -12,8 +12,6 @@
     "enrollmentDescription":"$encoder.jsonEncode( ${program.dateOfEnrollmentDescription} )",
     "incidentDescription":"$encoder.jsonEncode( ${program.dateOfIncidentDescription} )",
     "type": "$!program.type",
-    "blockEntryForm": $!{program.blockEntryForm},
-    "remindCompleted": $!{program.remindCompleted},
     "programStages":[#set( $pssize = $program.programStages.size() )
     #foreach( $ps in $program.programStages )
     {
@@ -24,7 +22,9 @@
         "irregular": "$!{ps.irregular}",
         "displayGenerateEventBox": "$!{ps.displayGenerateEventBox}",
         "validCompleteOnly": "$!{ps.validCompleteOnly}",
-        "captureCoordinates": "$!{ps.captureCoordinates}"
+        "captureCoordinates": "$!{ps.captureCoordinates}",
+        "blockEntryForm": "$!ps.blockEntryForm",
+        "remindCompleted": "$!ps.remindCompleted"
     }#if( $velocityCount < $pssize ),#end
     #end],
     "programAssociations": $programAssociations.get( ${program.id} )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm	2013-04-15 07:46:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm	2013-09-02 21:20:47 +0000
@@ -32,9 +32,7 @@
     "program": {
         "id": "$!programStageInstance.programInstance.program.id",
         "uid": "$encoder.jsonEncode( $!programStageInstance.programInstance.program.uid )",
-        "type": "$!programStageInstance.programInstance.program.type",
-        "blockEntryForm": "$!programStageInstance.programInstance.program.blockEntryForm",
-        "remindCompleted": "$!programStageInstance.programInstance.program.remindCompleted"
+        "type": "$!programStageInstance.programInstance.program.type"
     },
 
     "programStage": {
@@ -44,7 +42,9 @@
         "irregular": "$!programStageInstance.programStage.irregular",
         "displayGenerateEventBox": "$!programStageInstance.programStage.displayGenerateEventBox",
         "validCompleteOnly": "$!programStageInstance.programStage.validCompleteOnly",
-        "captureCoordinates": "$!programStageInstance.programStage.captureCoordinates"
+        "captureCoordinates": "$!programStageInstance.programStage.captureCoordinates",
+        "blockEntryForm": "$!programStageInstance.programStage.blockEntryForm",
+        "remindCompleted": "$!programStageInstance.programStage.remindCompleted"
     },
 
     "programInstance": {

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm	2013-08-29 09:34:09 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm	2013-09-02 21:20:47 +0000
@@ -13,7 +13,7 @@
 						<colgroup>
 							<col id="deCol">
 							<col id="entryCol">
-							#if( $programStage.program.displayProvidedOtherFacility=='true')
+							#if( $programStage.displayProvidedOtherFacility=='true')
 							<col width="5%" />
 							#end
 						</colgroup>
@@ -24,7 +24,7 @@
 								<input type="text" class="sectionFilter" placeholder="$encoder.jsEscape( $i18n.getString( "filter_in_section" ) , "'")" onkeyup="filterInSection($(this));" >
 							</td>                   
 							<th>$i18n.getString( "value" )</th>
-							#if( $programStage.program.displayProvidedOtherFacility=='true')
+							#if( $programStage.displayProvidedOtherFacility=='true')
 							<th>$i18n.getString( "provided_elsewhere" )</th>
 							#end
 						</tr>
@@ -87,7 +87,7 @@
 										onkeypress="return keyPress(event, this)" tabindex="$tabIndex"/>
 								#end
 							</td> 
-							#if( $programStage.program.displayProvidedOtherFacility=='true' )
+							#if( $programStage.displayProvidedOtherFacility=='true' )
 							<td style='width:20px;' align='center'>
 								#set( $id = $programStageDataElement.programStage.uid + '-' + $programStageDataElement.dataElement.uid + '-facility' )
 								#if( $programStageDataElement.allowProvidedElsewhere == 'true')

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm	2013-04-04 06:01:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm	2013-09-02 21:20:47 +0000
@@ -32,7 +32,7 @@
 						<colgroup>
 							<col id="deCol">
 							<col id="entryCol">
-							#if( $programStage.program.displayProvidedOtherFacility=='true')
+							#if( $programStage.displayProvidedOtherFacility=='true')
 							<col width="5%" />
 							#end
 						</colgroup>
@@ -43,7 +43,7 @@
 								<input type="text" class="sectionFilter" placeholder="$encoder.jsEscape( $i18n.getString( "filter_in_section" ) , "'")" onkeyup="filterInSection($(this));" >
 							</td>                   
 							<th>$i18n.getString( "value" )</th>
-							#if( $programStage.program.displayProvidedOtherFacility=='true')
+							#if( $programStage.displayProvidedOtherFacility=='true')
 							<th>$i18n.getString( "provided_elsewhere" )</th>
 							#end
 						</tr>
@@ -121,7 +121,7 @@
 											</td>
 											
 										<td>
-										#if( $programStage.program.displayProvidedOtherFacility=='true' )
+										#if( $programStage.displayProvidedOtherFacility=='true' )
 											#set( $id = $programStageDataElement.programStage.uid + '_' + $programStageDataElement.dataElement.uid + '_facility' )
 											#if( $programStageDataElement.allowProvidedElsewhere == 'true')
 												<input class='provided-elsewhere' name="$id" id="$id" type="checkbox" title="$i18n.getString('provided_elsewhere') ?"/>
@@ -223,7 +223,7 @@
 			#else
 				<input name="entryfield" id="$id" type="text" value="$!encoder.htmlEncode( $patientDataValue.value )" class="{validate:{$validate}}" />
 			#end
-			#if( $programStage.program.displayProvidedOtherFacility=='true' )
+			#if( $programStage.displayProvidedOtherFacility=='true' )
 				#set( $id = $programStageDataElement.programStage.uid + '_' + $programStageDataElement.dataElement.uid + '_facility' )
 				#if( $programStageDataElement.allowProvidedElsewhere == 'true')
 					<input class='provided-elsewhere' name="$id" id="$id" type="checkbox" title="$i18n.getString('provided_elsewhere') ?"/>

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm	2013-07-25 02:32:32 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm	2013-09-02 21:20:47 +0000
@@ -4,18 +4,14 @@
 	"name": "$!encoder.jsEncode( ${program.name} )",
 	"description": "$!encoder.jsEncode( ${program.description} )",
 	"type": "$!program.type",
-	"displayProvidedOtherFacility": "$!program.displayProvidedOtherFacility",
 	"displayIncidentDate": "$!program.displayIncidentDate",
-	"generatedByEnrollmentDate": "$!program.generatedByEnrollmentDate",
 	"ignoreOverdueEvents": "$!program.ignoreOverdueEvents",
 	"dateOfEnrollmentDescription": "$!encoder.jsEncode( ${program.dateOfEnrollmentDescription} )",
 	"dateOfIncidentDescription": "$!encoder.jsEncode( ${program.dateOfIncidentDescription} )",
 	"programStageCount": "${program.programStages.size()}",
 	"noAttributes": "$!program.patientAttributes.size()",
 	"noIdentifierTypes": "$!program.patientIdentifierTypes.size()",
-	"blockEntryForm": "$!program.blockEntryForm",
 	"onlyEnrollOnce": "$!program.onlyEnrollOnce",
-	"remindCompleted": "$!program.remindCompleted",
 	"displayOnAllOrgunit": "$!program.displayOnAllOrgunit",
 	"useBirthDateAsIncidentDate": "$!program.useBirthDateAsIncidentDate",
 	"useBirthDateAsEnrollmentDate": "$!program.useBirthDateAsEnrollmentDate",

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm	2013-07-31 06:51:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm	2013-09-02 21:20:47 +0000
@@ -8,6 +8,10 @@
 	"dataElementCount": "${programStageDataElements.size()}",
 	"standardInterval": "$!programStage.standardInterval",
 	"reportDateDescription": "$!encoder.jsonEncode( ${programStage.reportDateDescription} )",
+	"blockEntryForm": "$!program.blockEntryForm",
+	"remindCompleted": "$!program.remindCompleted",
+	"generatedByEnrollmentDate": "$!program.generatedByEnrollmentDate",
+	"displayProvidedOtherFacility": "$!program.displayProvidedOtherFacility",
 	"patientReminders":[
 	#foreach($patientReminder in $programStage.patientReminders)
 	  {

=== 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	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java	2013-09-02 21:20:47 +0000
@@ -102,7 +102,7 @@
     }
 
     private UserGroupService userGroupService;
-    
+
     public void setUserGroupService( UserGroupService userGroupService )
     {
         this.userGroupService = userGroupService;
@@ -147,13 +147,6 @@
         this.type = type;
     }
 
-    private Boolean displayProvidedOtherFacility;
-
-    public void setDisplayProvidedOtherFacility( Boolean displayProvidedOtherFacility )
-    {
-        this.displayProvidedOtherFacility = displayProvidedOtherFacility;
-    }
-
     private Boolean displayIncidentDate;
 
     public void setDisplayIncidentDate( Boolean displayIncidentDate )
@@ -175,13 +168,6 @@
         this.personDisplayNames = personDisplayNames;
     }
 
-    private Boolean generateBydEnrollmentDate;
-
-    public void setGenerateBydEnrollmentDate( Boolean generateBydEnrollmentDate )
-    {
-        this.generateBydEnrollmentDate = generateBydEnrollmentDate;
-    }
-
     private Boolean ignoreOverdueEvents;
 
     public void setIgnoreOverdueEvents( Boolean ignoreOverdueEvents )
@@ -189,13 +175,6 @@
         this.ignoreOverdueEvents = ignoreOverdueEvents;
     }
 
-    private Boolean blockEntryForm;
-
-    public void setBlockEntryForm( Boolean blockEntryForm )
-    {
-        this.blockEntryForm = blockEntryForm;
-    }
-
     private Boolean onlyEnrollOnce = false;
 
     public void setOnlyEnrollOnce( Boolean onlyEnrollOnce )
@@ -203,13 +182,6 @@
         this.onlyEnrollOnce = onlyEnrollOnce;
     }
 
-    private Boolean remindCompleted = false;
-
-    public void setRemindCompleted( Boolean remindCompleted )
-    {
-        this.remindCompleted = remindCompleted;
-    }
-
     private List<Integer> daysAllowedSendMessages = new ArrayList<Integer>();
 
     public void setDaysAllowedSendMessages( List<Integer> daysAllowedSendMessages )
@@ -258,9 +230,9 @@
     {
         this.useBirthDateAsEnrollmentDate = useBirthDateAsEnrollmentDate;
     }
-    
+
     private List<Integer> userGroup = new ArrayList<Integer>();
-    
+
     public void setUserGroup( List<Integer> userGroup )
     {
         this.userGroup = userGroup;
@@ -279,6 +251,7 @@
     {
         this.selectEnrollmentDatesInFuture = selectEnrollmentDatesInFuture;
     }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -286,13 +259,9 @@
     public String execute()
         throws Exception
     {
-        displayProvidedOtherFacility = (displayProvidedOtherFacility == null) ? false : displayProvidedOtherFacility;
         displayIncidentDate = (displayIncidentDate == null) ? false : displayIncidentDate;
-        generateBydEnrollmentDate = (generateBydEnrollmentDate == null) ? false : generateBydEnrollmentDate;
         ignoreOverdueEvents = (ignoreOverdueEvents == null) ? false : ignoreOverdueEvents;
-        blockEntryForm = (blockEntryForm == null) ? false : blockEntryForm;
         onlyEnrollOnce = (onlyEnrollOnce == null) ? false : onlyEnrollOnce;
-        remindCompleted = (remindCompleted == null) ? false : remindCompleted;
         displayOnAllOrgunit = (displayOnAllOrgunit == null) ? false : displayOnAllOrgunit;
         useBirthDateAsIncidentDate = (useBirthDateAsIncidentDate == null) ? false : useBirthDateAsIncidentDate;
         useBirthDateAsEnrollmentDate = (useBirthDateAsEnrollmentDate == null) ? false : useBirthDateAsEnrollmentDate;
@@ -306,11 +275,8 @@
         program.setDateOfEnrollmentDescription( dateOfEnrollmentDescription );
         program.setDateOfIncidentDescription( dateOfIncidentDescription );
         program.setType( type );
-        program.setDisplayProvidedOtherFacility( displayProvidedOtherFacility );
         program.setDisplayIncidentDate( displayIncidentDate );
-        program.setBlockEntryForm( blockEntryForm );
         program.setOnlyEnrollOnce( onlyEnrollOnce );
-        program.setRemindCompleted( remindCompleted );
         program.setDisplayOnAllOrgunit( displayOnAllOrgunit );
         program.setUseBirthDateAsIncidentDate( useBirthDateAsIncidentDate );
         program.setUseBirthDateAsEnrollmentDate( useBirthDateAsEnrollmentDate );
@@ -318,12 +284,10 @@
 
         if ( type == Program.MULTIPLE_EVENTS_WITH_REGISTRATION )
         {
-            program.setGeneratedByEnrollmentDate( generateBydEnrollmentDate );
             program.setIgnoreOverdueEvents( ignoreOverdueEvents );
         }
         else
         {
-            program.setGeneratedByEnrollmentDate( true );
             program.setIgnoreOverdueEvents( false );
         }
 

=== 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	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java	2013-09-02 21:20:47 +0000
@@ -293,7 +293,7 @@
         useBirthDateAsIncidentDate = (useBirthDateAsIncidentDate == null) ? false : useBirthDateAsIncidentDate;
         useBirthDateAsEnrollmentDate = (useBirthDateAsEnrollmentDate == null) ? false : useBirthDateAsEnrollmentDate;
         selectEnrollmentDatesInFuture = (selectEnrollmentDatesInFuture == null) ? false : selectEnrollmentDatesInFuture;
-        
+
         Program program = programService.getProgram( id );
         program.setName( name );
         program.setDescription( description );
@@ -301,11 +301,8 @@
         program.setDateOfEnrollmentDescription( dateOfEnrollmentDescription );
         program.setDateOfIncidentDescription( dateOfIncidentDescription );
         program.setType( type );
-        program.setDisplayProvidedOtherFacility( displayProvidedOtherFacility );
         program.setDisplayIncidentDate( displayIncidentDate );
-        program.setBlockEntryForm( blockEntryForm );
         program.setOnlyEnrollOnce( onlyEnrollOnce );
-        program.setRemindCompleted( remindCompleted );
         program.setDisplayOnAllOrgunit( displayOnAllOrgunit );
         program.setUseBirthDateAsIncidentDate( useBirthDateAsIncidentDate );
         program.setUseBirthDateAsEnrollmentDate( useBirthDateAsEnrollmentDate );
@@ -313,12 +310,10 @@
 
         if ( type == Program.MULTIPLE_EVENTS_WITH_REGISTRATION )
         {
-            program.setGeneratedByEnrollmentDate( generateBydEnrollmentDate );
             program.setIgnoreOverdueEvents( ignoreOverdueEvents );
         }
         else
         {
-            program.setGeneratedByEnrollmentDate( true );
             program.setIgnoreOverdueEvents( false );
         }
 
@@ -360,7 +355,7 @@
             reminder.setDateToCompare( datesToCompare.get( i ) );
             reminder.setSendTo( sendTo.get( i ) );
             reminder.setWhenToSend( whenToSend.get( i ) );
-            
+
             if ( reminder.getSendTo() == PatientReminder.SEND_TO_USER_GROUP )
             {
                 UserGroup selectedUserGroup = userGroupService.getUserGroup( userGroup.get( i ) );

=== 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	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java	2013-09-02 21:20:47 +0000
@@ -257,6 +257,34 @@
         this.relatedPatient = relatedPatient;
     }
 
+    private Boolean displayProvidedOtherFacility;
+
+    public void setDisplayProvidedOtherFacility( Boolean displayProvidedOtherFacility )
+    {
+        this.displayProvidedOtherFacility = displayProvidedOtherFacility;
+    }
+
+    private Boolean generatedByEnrollmentDate;
+
+    public void setGeneratedByEnrollmentDate( Boolean generatedByEnrollmentDate )
+    {
+        this.generatedByEnrollmentDate = generatedByEnrollmentDate;
+    }
+
+    private Boolean blockEntryForm;
+
+    public void setBlockEntryForm( Boolean blockEntryForm )
+    {
+        this.blockEntryForm = blockEntryForm;
+    }
+
+    private Boolean remindCompleted = false;
+
+    public void setRemindCompleted( Boolean remindCompleted )
+    {
+        this.remindCompleted = remindCompleted;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -270,7 +298,11 @@
         validCompleteOnly = (validCompleteOnly == null) ? false : validCompleteOnly;
         displayGenerateEventBox = (displayGenerateEventBox == null) ? false : displayGenerateEventBox;
         captureCoordinates = (captureCoordinates == null) ? false : captureCoordinates;
-        relatedPatient = ( relatedPatient == null ) ? false : relatedPatient;
+        relatedPatient = (relatedPatient == null) ? false : relatedPatient;
+        displayProvidedOtherFacility = (displayProvidedOtherFacility == null) ? false : displayProvidedOtherFacility;
+        generatedByEnrollmentDate = (generatedByEnrollmentDate == null) ? false : generatedByEnrollmentDate;
+        blockEntryForm = (blockEntryForm == null) ? false : blockEntryForm;
+        remindCompleted = (remindCompleted == null) ? false : remindCompleted;
 
         ProgramStage programStage = new ProgramStage();
         Program program = programService.getProgram( id );
@@ -287,6 +319,10 @@
         programStage.setAutoGenerateEvent( autoGenerateEvent );
         programStage.setCaptureCoordinates( captureCoordinates );
         programStage.setRelatedPatient( relatedPatient );
+        programStage.setDisplayProvidedOtherFacility( displayProvidedOtherFacility );
+        programStage.setBlockEntryForm( blockEntryForm );
+        programStage.setRemindCompleted( remindCompleted );
+        programStage.setGeneratedByEnrollmentDate( generatedByEnrollmentDate );
 
         Set<PatientReminder> patientReminders = new HashSet<PatientReminder>();
         for ( int i = 0; i < daysAllowedSendMessages.size(); i++ )

=== 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-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java	2013-09-02 21:20:47 +0000
@@ -250,6 +250,35 @@
         this.relatedPatient = relatedPatient;
     }
 
+    private Boolean displayProvidedOtherFacility;
+
+    public void setDisplayProvidedOtherFacility( Boolean displayProvidedOtherFacility )
+    {
+        this.displayProvidedOtherFacility = displayProvidedOtherFacility;
+    }
+
+    private Boolean generatedByEnrollmentDate;
+
+    public void setGeneratedByEnrollmentDate( Boolean generatedByEnrollmentDate )
+    {
+        this.generatedByEnrollmentDate = generatedByEnrollmentDate;
+    }
+
+
+    private Boolean blockEntryForm;
+
+    public void setBlockEntryForm( Boolean blockEntryForm )
+    {
+        this.blockEntryForm = blockEntryForm;
+    }
+
+    private Boolean remindCompleted = false;
+
+    public void setRemindCompleted( Boolean remindCompleted )
+    {
+        this.remindCompleted = remindCompleted;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -264,6 +293,10 @@
         displayGenerateEventBox = (displayGenerateEventBox == null) ? false : displayGenerateEventBox;
         captureCoordinates = (captureCoordinates == null) ? false : captureCoordinates;
         relatedPatient = (relatedPatient == null) ? false : relatedPatient;
+        displayProvidedOtherFacility = (displayProvidedOtherFacility == null) ? false : displayProvidedOtherFacility;
+        generatedByEnrollmentDate = (generatedByEnrollmentDate == null) ? false : generatedByEnrollmentDate;
+        blockEntryForm = (blockEntryForm == null) ? false : blockEntryForm;
+        remindCompleted = (remindCompleted == null) ? false : remindCompleted;
 
         ProgramStage programStage = programStageService.getProgramStage( id );
 
@@ -276,6 +309,10 @@
         programStage.setMinDaysFromStart( minDaysFromStart );
         programStage.setDisplayGenerateEventBox( displayGenerateEventBox );
         programStage.setRelatedPatient( relatedPatient );
+        programStage.setDisplayProvidedOtherFacility( displayProvidedOtherFacility );
+        programStage.setBlockEntryForm( blockEntryForm );
+        programStage.setRemindCompleted( remindCompleted );
+        programStage.setGeneratedByEnrollmentDate( generatedByEnrollmentDate );
 
         if ( !programStage.getProgram().isSingleEvent() )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm	2013-08-27 03:49:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm	2013-09-02 21:20:47 +0000
@@ -134,39 +134,11 @@
 			<td></td>
 		</tr>
 		
-		<tr>
-			<th colspan="2">$i18n.getString( "form_details" )</th>
-		</tr>
-	
-		<tr>
-			<td><label>$i18n.getString( "show_provided_provided_elsewhere" )</label></td>
-			<td><input type="checkbox" id="displayProvidedOtherFacility" name="displayProvidedOtherFacility" value='true' checked></td>
-			<td></td>
-		</tr>
-		
-		<tr>
-			<td><label>$i18n.getString( "block_entry_form_after_completed" )</label></td>
-			<td><input type="checkbox" id="blockEntryForm" name="blockEntryForm" value='true'></td>
-			<td></td>
-		</tr>
-		
-		<tr>
-			<td><label>$i18n.getString( "remind_completing_program_after_program_stage_completed" )</label></td>
-			<td><input type="checkbox" id="remindCompleted" name="remindCompleted" value='true' ></td>
-			<td></td>
-		</tr>
-		
 		<tr name='nonAnonymous'>
 			<th colspan="2">$i18n.getString( "enrollment_details" )</th>
 		</tr>
 		
 		<tr name='nonAnonymous'>
-			<td><label>$i18n.getString( "generated_events_by_enrollment_date" )</label></td>
-			<td><input type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true'></td>
-			<td></td>
-		</tr>
-		
-		<tr name='nonAnonymous'>
 			<td><label>$i18n.getString( "skip_to_generate_overdue_events" )</label></td>
 			<td><input type="checkbox" id="ignoreOverdueEvents" name="ignoreOverdueEvents" value='true'></td>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm	2013-08-01 03:48:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm	2013-09-02 21:20:47 +0000
@@ -72,6 +72,32 @@
 	<tr><th colspan="2">$i18n.getString( "form_details" )</th></tr>
 	
 	<tr>
+		<td><label>$i18n.getString( "show_provided_provided_elsewhere" )</label></td>
+		<td><input type="checkbox" id="displayProvidedOtherFacility" name="displayProvidedOtherFacility" value='true' checked></td>
+		<td></td>
+	</tr>
+	
+	<tr>
+		<td><label>$i18n.getString( "block_entry_form_after_completed" )</label></td>
+		<td><input type="checkbox" id="blockEntryForm" name="blockEntryForm" value='true'></td>
+		<td></td>
+	</tr>
+	
+	<tr>
+		<td><label>$i18n.getString( "remind_completing_program_after_program_stage_completed" )</label></td>
+		<td><input type="checkbox" id="remindCompleted" name="remindCompleted" value='true' ></td>
+		<td></td>
+	</tr>
+	
+	#if($program.type==1)
+	<tr>
+		<td><label>$i18n.getString( "generated_events_by_enrollment_date" )</label></td>
+		<td><input type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true'></td>
+		<td></td>
+	</tr>
+	#end
+	
+	<tr>
 		<td><label>$i18n.getString( "capture_coordinates" )</label></td>
 		<td><input type="checkbox" id="captureCoordinates" name="captureCoordinates" value="true" /></td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js	2013-08-02 03:34:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js	2013-09-02 21:20:47 +0000
@@ -15,20 +15,11 @@
 			type = i18n_single_event_with_registration;
 		else if( json.program.type == "3"  )
 			type = i18n_single_event_without_registration;
-		setInnerHTML( 'typeField', type );  
-		
-		var displayProvidedOtherFacility = ( json.program.displayProvidedOtherFacility == 'true') ? i18n_yes : i18n_no;
-		setInnerHTML( 'displayProvidedOtherFacilityField', displayProvidedOtherFacility );   	
-		
-		var blockEntryForm = ( json.program.blockEntryForm == 'true') ? i18n_yes : i18n_no;
-		setInnerHTML( 'blockEntryFormField', blockEntryForm );   	
+		setInnerHTML( 'typeField', type ); 
 		
 		var displayIncidentDate = ( json.program.displayIncidentDate == 'true') ? i18n_yes : i18n_no;
 		setInnerHTML( 'displayIncidentDateField', displayIncidentDate );   	
 		
-		var generatedByEnrollmentDate = ( json.program.generatedByEnrollmentDate == 'true') ? i18n_yes : i18n_no;
-		setInnerHTML( 'generatedByEnrollmentDateField', generatedByEnrollmentDate );   	
-		
 		var ignoreOverdueEvents = ( json.program.ignoreOverdueEvents == 'true') ? i18n_yes : i18n_no;
 		setInnerHTML( 'ignoreOverdueEventsField', ignoreOverdueEvents );   	
 		
@@ -38,9 +29,6 @@
 		var displayOnAllOrgunit= ( json.program.displayOnAllOrgunit == 'true') ? i18n_yes : i18n_no;
 		setInnerHTML( 'displayOnAllOrgunitField', displayOnAllOrgunit );   	
 		
-		var remindCompleted = ( json.program.remindCompleted == 'true') ? i18n_yes : i18n_no;
-		setInnerHTML( 'remindCompletedField', remindCompleted );   	
-		
 		var useBirthDateAsIncidentDate = ( json.program.useBirthDateAsIncidentDate == 'true') ? i18n_yes : i18n_no;
 		setInnerHTML( 'useBirthDateAsIncidentDateField', useBirthDateAsIncidentDate );   	
 		

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js	2013-08-27 03:49:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js	2013-09-02 21:20:47 +0000
@@ -78,6 +78,18 @@
 		setInnerHTML( 'dataElementCountField', json.programStage.dataElementCount );   
 		setInnerHTML( 'reportDateDescriptionField', json.programStage.reportDateDescription );
 		
+		var displayProvidedOtherFacility = ( json.programStage.displayProvidedOtherFacility == 'true') ? i18n_yes : i18n_no;
+		setInnerHTML( 'displayProvidedOtherFacilityField', displayProvidedOtherFacility );   	
+		
+		var blockEntryForm = ( json.programStage.blockEntryForm == 'true') ? i18n_yes : i18n_no;
+		setInnerHTML( 'blockEntryFormField', blockEntryForm );   	
+		
+		var generatedByEnrollmentDate = ( json.programStage.generatedByEnrollmentDate == 'true') ? i18n_yes : i18n_no;
+		setInnerHTML( 'generatedByEnrollmentDateField', generatedByEnrollmentDate );   	
+		
+		var remindCompleted = ( json.programStage.remindCompleted == 'true') ? i18n_yes : i18n_no;
+		setInnerHTML( 'remindCompletedField', remindCompleted );   	
+		
 		var templateMessage = "";
 		for(var i in json.programStage.patientReminders){
 			var index = eval(i) + 1;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm	2013-07-16 04:31:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm	2013-09-02 21:20:47 +0000
@@ -87,13 +87,10 @@
 				<p><label class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
 				<p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>				
 				<p><label class="bold">$i18n.getString( "type" ):</label><br><span id="typeField"></span></p>                           
-				<p><label class="bold">$i18n.getString( "display_provided_other_facility_column" ):</label><br><span id="displayProvidedOtherFacilityField"></span></p>
-				<p><label class="bold">$i18n.getString( "display_date_of_incident" ):</label><br><span id="displayIncidentDateField"></span></p>                                 <p><label class="bold">$i18n.getString( "generated_events_by_enrollment_date" ):</label><br><span id="generatedByEnrollmentDateField"></span></p>
+				<p><label class="bold">$i18n.getString( "display_date_of_incident" ):</label><br><span id="displayIncidentDateField"></span></p>
 				<p><label class="bold">$i18n.getString( "skip_to_generate_overdue_events" ):</label><br><span id="ignoreOverdueEventsField"></span></p>
 				<p><label class="bold">$i18n.getString( "only_enroll_once" ):</label><br><span id="onlyEnrollOnceField"></span></p>
 				<p><label class="bold">$i18n.getString( "used_by_all_orgunits" ):</label><br><span id="displayOnAllOrgunitField"></span></p>
-				<p><label class="bold">$i18n.getString( "block_entry_form_after_completed" ):</label><br><span id="blockEntryFormField"></span></p>
-				<p><label class="bold">$i18n.getString( "remind_completing_program_after_program_stage_completed" ):</label><br><span id="remindCompletedField"></span></p>
 				<p><label class="bold">$i18n.getString( "use_birth_date_as_incident_date" ):</label><br><span id="useBirthDateAsIncidentDate"></span></p>                              
 				<p><label class="bold">$i18n.getString( "show_incident_date" ):</label><br><span id="displayIncidentDate"></span></p>                              
 				<p><label class="bold">$i18n.getString( "date_of_incident_description" ):</label><br><span id="dateOfIncidentDescriptionField"></span></p>                              

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm	2013-07-31 06:51:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm	2013-09-02 21:20:47 +0000
@@ -66,6 +66,10 @@
 				<p><label class="bold">$i18n.getString( "irregular" ):</label><br><span id="irregularField"></span></p>
 				<p><label class="bold">$i18n.getString( "display_generate_event_box_after_completed" ):</label><br><span id="displayGenerateEventBoxField"></span></p>
 				<p><label class="bold">$i18n.getString( "standard_interval_days" ):</label><br><span id="standardIntervalField"></span></p>
+				<p><label class="bold">$i18n.getString( "block_entry_form_after_completed" ):</label><br><span id="blockEntryFormField"></span></p>
+				<p><label class="bold">$i18n.getString( "remind_completing_program_after_program_stage_completed" ):</label><br><span id="remindCompletedField"></span></p>
+				<p><label class="bold">$i18n.getString( "display_provided_other_facility_column" ):</label><br><span id="displayProvidedOtherFacilityField"></span></p>
+				<p><label class="bold">$i18n.getString( "generated_events_by_enrollment_date" ):</label><br><span id="generatedByEnrollmentDateField"></span></p>
 				<p><label class="bold">$i18n.getString( "capture_coordinates" ):</label><br><span id="captureCoordinatesField"></span></p>
 				<p><label class="bold">$i18n.getString( "complete_allowed_only_if_validation_passes" ):</label><br><span id="validCompleteOnlyField"></span></p>
 				<p><label class="bold">$i18n.getString( "report_date_description" ):</label><br><span id="reportDateDescriptionField"></span></p>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm	2013-08-02 03:34:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm	2013-09-02 21:20:47 +0000
@@ -147,39 +147,11 @@
 			<td></td>
 		</tr>
 		
-		<tr>
-			<th colspan="2">$i18n.getString( "form_details" )</th>
-		</tr>
-		
-		<tr>
-			<td><label>$i18n.getString( "show_provided_provided_elsewhere" )</label></td>
-			<td><input type="checkbox" id="displayProvidedOtherFacility" name="displayProvidedOtherFacility" value='true' #if( $program.displayProvidedOtherFacility=='true' ) checked #end ></td>
-			<td></td>
-		</tr>
-		
-		<tr>
-			<td><label>$i18n.getString( "block_entry_form_after_completed" )</label></td>
-			<td><input type="checkbox" id="blockEntryForm" name="blockEntryForm" value='true' #if( $program.blockEntryForm=='true' ) checked #end ></td>
-			<td></td>
-		</tr>
-		
-		<tr>
-			<td><label>$i18n.getString( "remind_completing_program_after_program_stage_completed" )</label></td>
-			<td><input type="checkbox" id="remindCompleted" name="remindCompleted" value='true' #if( $program.remindCompleted=='true' ) checked #end ></td>
-			<td></td>
-		</tr>
-			
 		<tr name='nonAnonymous'>
 			<th colspan="2">$i18n.getString( "enrollment_details" )</th>
 		</tr>
 		
 		<tr name='nonAnonymous'>
-			<td><label>$i18n.getString( "generated_events_by_enrollment_date" )</label></td>
-			<td><input type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true' #if($program.generatedByEnrollmentDate=='true') checked #end #if( $program.type!='1' ) disabled #end ></td>
-			<td></td>
-		</tr>
-		
-		<tr name='nonAnonymous'>
 			<td><label>$i18n.getString( "skip_to_generate_overdue_events" )</label></td>
 			<td><input type="checkbox" id="ignoreOverdueEvents" name="ignoreOverdueEvents" value='true' #if($program.ignoreOverdueEvents=='true') checked #end #if( $program.type!='1' ) disabled #end ></td>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm	2013-08-01 03:48:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm	2013-09-02 21:20:47 +0000
@@ -71,7 +71,33 @@
 			#end
 			
 			<tr><th colspan="2">$i18n.getString( "form_details" )</th></tr>
-	
+			
+			<tr>
+				<td><label>$i18n.getString( "show_provided_provided_elsewhere" )</label></td>
+				<td><input type="checkbox" id="displayProvidedOtherFacility" name="displayProvidedOtherFacility" value='true' #if( $programStage.displayProvidedOtherFacility=='true' ) checked #end ></td>
+				<td></td>
+			</tr>
+			
+			<tr>
+				<td><label>$i18n.getString( "block_entry_form_after_completed" )</label></td>
+				<td><input type="checkbox" id="blockEntryForm" name="blockEntryForm" value='true' #if( $programStage.blockEntryForm=='true' ) checked #end ></td>
+				<td></td>
+			</tr>
+			
+			<tr>
+				<td><label>$i18n.getString( "remind_completing_program_after_program_stage_completed" )</label></td>
+				<td><input type="checkbox" id="remindCompleted" name="remindCompleted" value='true' #if( $programStage.remindCompleted=='true' ) checked #end ></td>
+				<td></td>
+			</tr>
+			
+			#if($programStage.program.type==1)
+			<tr>
+				<td><label>$i18n.getString( "generated_events_by_enrollment_date" )</label></td>
+				<td><input type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true' #if($programStage.generatedByEnrollmentDate=='true') checked #end #if( $programStage.program.type!='1' ) disabled #end ></td>
+				<td></td>
+			</tr>
+			#end
+		
 			<tr>
 				<td><label>$i18n.getString( "capture_coordinates" )</label></td>
 				<td><input type="checkbox" id="captureCoordinates" name="captureCoordinates" value='true' #if( $programStage.captureCoordinates && $programStage.captureCoordinates=='true' ) checked #end /></td>