dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19295
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8348: Remove duration in days property of Program object.
------------------------------------------------------------
revno: 8348
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-10-03 10:46:16 +0700
message:
Remove duration in days property of Program object.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.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-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.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/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/javascript/program.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/updateProgramForm.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 2012-09-25 05:18:34 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2012-10-03 03:46:16 +0000
@@ -79,9 +79,7 @@
private Set<ProgramStage> programStages = new HashSet<ProgramStage>();
private Set<ValidationCriteria> patientValidationCriteria = new HashSet<ValidationCriteria>();
-
- private Integer maxDaysAllowedInputData;
-
+
private Integer type;
private Boolean displayProvidedOtherFacility;
@@ -214,17 +212,7 @@
{
this.dateOfEnrollmentDescription = dateOfEnrollmentDescription;
}
-
- public Integer getMaxDaysAllowedInputData()
- {
- return maxDaysAllowedInputData;
- }
-
- public void setMaxDaysAllowedInputData( Integer maxDaysAllowedInputData )
- {
- this.maxDaysAllowedInputData = maxDaysAllowedInputData;
- }
-
+
public String getDateOfIncidentDescription()
{
return dateOfIncidentDescription;
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2012-09-14 02:43:21 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2012-10-03 03:46:16 +0000
@@ -142,7 +142,7 @@
@Override
public ActivityPlan getAllActivityPlan( OrganisationUnit unit, String localeString )
{
- long time = System.currentTimeMillis();
+// long time = System.currentTimeMillis();
List<Activity> items = new ArrayList<Activity>();
@@ -210,8 +210,7 @@
{
ProgramStageInstance programStageInstance = programStageInstances.get( i );
- expiredDate.setTime( DateUtils.getDateAfterAddition( programStageInstance.getDueDate(),
- programStageInstance.getProgramInstance().getProgram().getMaxDaysAllowedInputData() ) );
+ expiredDate.setTime( DateUtils.getDateAfterAddition( programStageInstance.getDueDate(), 0 ) );
if ( programStageInstance.getDueDate().getTime() <= time
&& expiredDate.getTimeInMillis() > time )
@@ -295,8 +294,7 @@
activity.setDueDate( instance.getDueDate() );
activity.setTask( getTask( instance ) );
activity.setLate( late );
- activity.setExpireDate( DateUtils.getDateAfterAddition( instance.getDueDate(), instance.getProgramInstance()
- .getProgram().getMaxDaysAllowedInputData() ) );
+ activity.setExpireDate( DateUtils.getDateAfterAddition( instance.getDueDate(), 0) );
return activity;
}
=== 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 2012-10-03 02:46:58 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2012-10-03 03:46:16 +0000
@@ -139,7 +139,8 @@
executeSql( "CREATE INDEX index_patientdatavalue ON patientdatavalue( programstageinstanceid, dataelementid, value, timestamp )" );
executeSql( "CREATE INDEX index_programinstance ON programinstance( programinstanceid )" );
-
+
+ executeSql( "ALTER TABLE program DROP COLUMN maxDaysAllowedInputData");
}
// -------------------------------------------------------------------------
=== 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 2012-10-01 05:30:38 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2012-10-03 03:46:16 +0000
@@ -36,8 +36,6 @@
<key column="programid" foreign-key="fk_program_criteria_programid" />
<many-to-many column="validationcriteriaid" class="org.hisp.dhis.validation.ValidationCriteria" foreign-key="fk_program_criteria_validationcriteriaid" />
</set>
-
- <property name="maxDaysAllowedInputData" />
<property name="type" />
=== 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 2012-09-25 05:18:34 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm 2012-10-03 03:46:16 +0000
@@ -10,7 +10,6 @@
"dateOfEnrollmentDescription": "$!encoder.jsEncode( ${program.dateOfEnrollmentDescription} )",
"dateOfIncidentDescription": "$!encoder.jsEncode( ${program.dateOfIncidentDescription} )",
"programStageCount": "${program.programStages.size()}",
- "maxDay": "$!program.maxDaysAllowedInputData",
"noAttributes": "$!program.patientAttributes.size()",
"noIdentifierTypes": "$!program.patientIdentifierTypes.size()"
}
=== 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 2012-10-01 03:06:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java 2012-10-03 03:46:16 +0000
@@ -127,13 +127,6 @@
this.dateOfIncidentDescription = dateOfIncidentDescription;
}
- private Integer maxDaysAllowedInputData;
-
- public void setMaxDaysAllowedInputData( Integer maxDaysAllowedInputData )
- {
- this.maxDaysAllowedInputData = maxDaysAllowedInputData;
- }
-
private Integer type;
public void setType( Integer type )
@@ -194,7 +187,6 @@
program.setVersion( 1 );
program.setDateOfEnrollmentDescription( dateOfEnrollmentDescription );
program.setDateOfIncidentDescription( dateOfIncidentDescription );
- program.setMaxDaysAllowedInputData( maxDaysAllowedInputData );
program.setType( type );
program.setDisplayProvidedOtherFacility( displayProvidedOtherFacility );
program.setDisplayIncidentDate( displayIncidentDate );
=== 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 2012-09-25 05:18:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2012-10-03 03:46:16 +0000
@@ -123,13 +123,6 @@
this.dateOfIncidentDescription = dateOfIncidentDescription;
}
- private Integer maxDaysAllowedInputData;
-
- public void setMaxDaysAllowedInputData( Integer maxDaysAllowedInputData )
- {
- this.maxDaysAllowedInputData = maxDaysAllowedInputData;
- }
-
private Integer type;
public void setType( Integer type )
@@ -189,7 +182,6 @@
program.setVersion( version );
program.setDateOfEnrollmentDescription( dateOfEnrollmentDescription );
program.setDateOfIncidentDescription( dateOfIncidentDescription );
- program.setMaxDaysAllowedInputData( maxDaysAllowedInputData );
program.setType( type );
program.setDisplayProvidedOtherFacility( displayProvidedOtherFacility );
program.setDisplayIncidentDate( displayIncidentDate );
=== 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 2012-10-01 09:28:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2012-10-03 03:46:16 +0000
@@ -64,12 +64,6 @@
<td><label>$i18n.getString( "date_of_incident_description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td><input style="width: 330px;" type="text" id="dateOfIncidentDescription" name="dateOfIncidentDescription" class="{validate:{required:true,minlength:2}}"></td>
<td></td>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "duration_in_days" )</label></td>
- <td><input style="width: 330px;" type="text" id="maxDaysAllowedInputData" name="maxDaysAllowedInputData" class="{validate:{number:true}}"></td>
- <td></td>
</tr>
<tbody>
</table>
=== 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 2012-09-25 05:18:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2012-10-03 03:46:16 +0000
@@ -29,7 +29,6 @@
setInnerHTML( 'dateOfEnrollmentDescriptionField', json.program.dateOfEnrollmentDescription );
setInnerHTML( 'dateOfIncidentDescriptionField', json.program.dateOfIncidentDescription );
setInnerHTML( 'programStageCountField', json.program.programStageCount );
- setInnerHTML( 'durationInDaysField', json.program.maxDay );
setInnerHTML( 'noAttributesField', json.program.noAttributes );
setInnerHTML( 'noIdentifierTypesField', json.program.noIdentifierTypes );
=== 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 2012-09-25 05:18:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2012-10-03 03:46:16 +0000
@@ -55,8 +55,6 @@
<p><label class="bold">$i18n.getString( "generated_by_enrollment_date" ):</label><br><span id="generatedByEnrollmentDateField"></span></p>
<p><label class="bold">$i18n.getString( "date_of_enrollment_description" ):</label><br><span id="dateOfEnrollmentDescriptionField"></span></p>
<p><label class="bold">$i18n.getString( "date_of_incident_description" ):</label><br><span id="dateOfIncidentDescriptionField"></span></p>
- <p><label class="bold">$i18n.getString( "stage_in_program" ):</label><br><span id="programStageCountField"></span></p>
- <p><label class="bold">$i18n.getString( "duration_in_days" ):</label><br><span id="durationInDaysField"></span></p>
<p><label class="bold">$i18n.getString( "number_of_attributes" ):</label><br><span id="noAttributesField"></span></p>
<p><label class="bold">$i18n.getString( "number_of_identifier_types" ):</label><br><span id="noIdentifierTypesField"></span></p>
</div>
=== 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 2012-10-01 09:28:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2012-10-03 03:46:16 +0000
@@ -68,13 +68,7 @@
<td><label>$i18n.getString( "date_of_incident_description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td><input style="width: 330px;" type="text" id="dateOfIncidentDescription" name="dateOfIncidentDescription" value="$!program.dateOfIncidentDescription" class="{validate:{required:true,minlength:4}}" #if( $program.type=='2' || $program.type=='3') disabled #end ></td>
<td></td>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "duration_in_days" )</label></td>
- <td><input style="width: 330px;" type="text" id="maxDaysAllowedInputData" name="maxDaysAllowedInputData" value="$!program.maxDaysAllowedInputData" class="{validate:{number:true}}"></td>
- <td></td>
- </tr>
+ </tr>
<tbody>
</table>