dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19794
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8779: Create only one event for non-autogenerate program-stage with repeatable as false.
------------------------------------------------------------
revno: 8779
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-10-31 11:09:25 +0700
message:
Create only one event for non-autogenerate program-stage with repeatable as false.
modified:
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/webapp/dhis-web-caseentry/javascript/caseAggregationForm.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.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-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 2012-10-09 03:53:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SaveProgramEnrollmentAction.java 2012-10-31 04:09:25 +0000
@@ -184,11 +184,6 @@
dateCreatedEvent = format.parseDate( enrollmentDate );
}
- if( program.isRegistration() && program.isSingleEvent())
- {
-
- }
-
boolean isFirstStage = false;
for ( ProgramStage programStage : program.getProgramStages() )
{
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseAggregationForm.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseAggregationForm.js 2011-08-19 21:33:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseAggregationForm.js 2012-10-31 04:09:25 +0000
@@ -13,8 +13,7 @@
validation2( 'caseAggregationForm', function(form) {
validationCaseAggregation();
- }, {
-
+ },{
'rules': rules
});
});
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-10-26 04:51:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-10-31 04:09:25 +0000
@@ -621,6 +621,10 @@
}
jQuery('#ps_' + programStageInstanceId ).focus();
+ var repeatable = jQuery('#repeatableProgramStage_' + programInstanceId + " [value=" + programStageId + "]" )
+ if( repeatable.attr("repeatable")=="false"){
+ repeatable.remove();
+ }
jQuery('#createNewEncounterDiv_' + programInstanceId).dialog("close");
resetActiveEvent(programInstanceId);
loadDataEntry( programStageInstanceId );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2012-10-23 04:48:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2012-10-31 04:09:25 +0000
@@ -57,9 +57,17 @@
<select id='repeatableProgramStage_$!programInstance.id' name='repeatableProgramStageId_$!programInstance.id' onchange="setSuggestedDueDate('$programInstance.id')">
#foreach( $programStage in $programInstance.program.programStages )
#if( $programStage.irregular=='true')
- <option value="$programStage.id" standardInterval='$programStage.standardInterval'>$!programStage.name</option>
+ <option value="$programStage.id" standardInterval='$programStage.standardInterval' repeatable="true">$!programStage.name</option>
#elseif( $programStage.autoGenerateEvent=='false')
- <option value="$programStage.id" standardInterval='$programStage.minDaysFromStart'>$!programStage.name</option>
+ #set($hasEvent="false")
+ #foreach( $programStageInstance in $programInstance.programStageInstances )
+ #if( $programStage.id== $programStageInstance.programStage.id)
+ #set($hasEvent="true")
+ #end
+ #end
+ #if($hasEvent=="false")
+ <option value="$programStage.id" standardInterval='$programStage.minDaysFromStart' repeatable="false">$!programStage.name</option>
+ #end
#end
#end
</select>