dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21457
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10163: Minor fix for average number of stages for complete programs in program statistics.
------------------------------------------------------------
revno: 10163
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-03-13 14:26:34 +0700
message:
Minor fix for average number of stages for complete programs in program statistics.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2013-03-12 03:33:20 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2013-03-13 07:26:34 +0000
@@ -369,7 +369,7 @@
if ( totalCompleted != 0 )
{
int stageCompleted = averageNumberCompletedProgramInstance( program, orgunitIds, startDate, endDate, true );
- percent = (stageCompleted + 0.0) / totalCompleted;
+ percent = (stageCompleted + 0.0) / ( totalCompleted - totalDiscontinued );
}
grid.addValue( format.formatValue( percent ) );
grid.addValue( "" );