=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2012-10-03 18:12:37 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2012-10-10 08:50:17 +0000 @@ -27,6 +27,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_SCHEDULED_PERIOD_TYPES; + import java.io.Serializable; import java.util.Collection; import java.util.HashSet; @@ -72,6 +74,9 @@ final String KEY_SEND_MESSAGE_SCHEDULED_TASKS = "sendMessageScheduled"; final String KEY_SCHEDULE_MESSAGE_TASKS = "scheduleMessage"; final String PHONE_NUMBER_AREA_CODE = "phoneNumberAreaCode"; + final String KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS = "scheduleAggregateQueryBuilder"; + final String KEY_SCHEDULED_AGGREGATE_QUERY_BUILDER_PERIOD_TYPES = "keyScheduledAggregateQueryBuilderPeriodTypes"; + final String KEY_AGGREGATE_QUERY_BUILDER_ORGUNITGROUPSET_AGG_LEVEL = "aggQueryBuilderorgUnitGroupSetAggregationLevel"; final int DEFAULT_MAX_NUMBER_OF_ATTEMPTS = 20; final int DEFAULT_TIMEFRAME_MINUTES = 1; === added file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionSchedulingManager.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionSchedulingManager.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionSchedulingManager.java 2012-10-10 08:50:17 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2004-2009, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.hisp.dhis.patient.scheduling; + +import java.util.Map; + +/** + * @author Chau Thu Tran + * + * @version CaseAggregateConditionSchedulingManager.java 10:42:58 AM Oct 10, 2012 $ + */ +public interface CaseAggregateConditionSchedulingManager +{ + final String TASK_AGGREGATE_QUERY_BUILDER_LAST_12_MONTHS = "aggregateLast12MonthsTask"; + final String TASK_AGGREGATE_QUERY_BUILDER_LAST_6_MONTS = "aggregateLast6MonthsTask"; + final String TASK_AGGREGATE_QUERY_BUILDER_FROM_6_TO_12_MONTS = "aggregateFrom6To12MonthsTask"; + + void scheduleTasks(); + + void scheduleTasks( Map keyCronMap ); + + void stopTasks(); + + void executeTasks(); + + Map getScheduledTasks(); + + String getTaskStatus(); +} === added file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionTask.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionTask.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionTask.java 2012-10-10 08:50:17 +0000 @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2004-2009, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.hisp.dhis.patient.scheduling; + +import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_ORGUNITGROUPSET_AGG_LEVEL; +import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_SCHEDULED_PERIOD_TYPES; +import static org.hisp.dhis.setting.SystemSettingManager.KEY_AGGREGATE_QUERY_BUILDER_ORGUNITGROUPSET_AGG_LEVEL; +import static org.hisp.dhis.setting.SystemSettingManager.KEY_SCHEDULED_AGGREGATE_QUERY_BUILDER_PERIOD_TYPES; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Set; + +import org.hisp.dhis.caseaggregation.CaseAggregationCondition; +import org.hisp.dhis.caseaggregation.CaseAggregationConditionService; +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; +import org.hisp.dhis.datavalue.DataValue; +import org.hisp.dhis.datavalue.DataValueService; +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.organisationunit.OrganisationUnitService; +import org.hisp.dhis.period.Period; +import org.hisp.dhis.period.RelativePeriods; +import org.hisp.dhis.setting.SystemSettingManager; + +/** + * @author Chau Thu Tran + * + * @version RunCaseAggregateConditionTask.java 9:52:10 AM Oct 10, 2012 $ + */ +public class CaseAggregateConditionTask + implements Runnable +{ + private OrganisationUnitService organisationUnitService; + + private CaseAggregationConditionService aggregationConditionService; + + private DataValueService dataValueService; + + private SystemSettingManager systemSettingManager; + + // ------------------------------------------------------------------------- + // Params + // ------------------------------------------------------------------------- + + private List periods; + + public void setPeriods( List periods ) + { + this.periods = periods; + } + + private boolean last6Months; + + public void setLast6Months( boolean last6Months ) + { + this.last6Months = last6Months; + } + + private boolean last6To12Months; + + public void setLast6To12Months( boolean last6To12Months ) + { + this.last6To12Months = last6To12Months; + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + public CaseAggregateConditionTask( OrganisationUnitService organisationUnitService, + CaseAggregationConditionService aggregationConditionService, DataValueService dataValueService, + SystemSettingManager systemSettingManager ) + { + this.organisationUnitService = organisationUnitService; + this.aggregationConditionService = aggregationConditionService; + this.dataValueService = dataValueService; + this.systemSettingManager = systemSettingManager; + } + + // ------------------------------------------------------------------------- + // Runnable implementation + // ------------------------------------------------------------------------- + + @Override + @SuppressWarnings( "unchecked" ) + public void run() + { + int level = (Integer) systemSettingManager.getSystemSetting( + KEY_AGGREGATE_QUERY_BUILDER_ORGUNITGROUPSET_AGG_LEVEL, DEFAULT_ORGUNITGROUPSET_AGG_LEVEL ); + Collection orgunits = organisationUnitService.getOrganisationUnitsAtLevel( level ); + + Collection aggConditions = aggregationConditionService + .getAllCaseAggregationCondition(); + + // --------------------------------------------------------------------- + // Get Period list in system-setting + // --------------------------------------------------------------------- + + Set periodTypes = (Set) systemSettingManager.getSystemSetting( + KEY_SCHEDULED_AGGREGATE_QUERY_BUILDER_PERIOD_TYPES, DEFAULT_SCHEDULED_PERIOD_TYPES ); + + List periods = getPeriods( periodTypes ); + + // --------------------------------------------------------------------- + // Aggregation + // --------------------------------------------------------------------- + + for ( OrganisationUnit orgUnit : orgunits ) + { + for ( CaseAggregationCondition aggCondition : aggConditions ) + { + DataElementCategoryOptionCombo optionCombo = aggCondition.getOptionCombo(); + + DataElement dElement = aggCondition.getAggregationDataElement(); + + for ( Period period : periods ) + { + Double resultValue = aggregationConditionService.parseConditition( aggCondition, orgUnit, period ); + + DataValue dataValue = dataValueService.getDataValue( orgUnit, dElement, period, optionCombo ); + + if ( resultValue != null && resultValue != 0.0 ) + { + // ----------------------------------------- + // Add dataValue + // ----------------------------------------- + + if ( dataValue == null ) + { + dataValue = new DataValue( dElement, period, orgUnit, "" + resultValue, "", new Date(), + null, optionCombo ); + dataValueService.addDataValue( dataValue ); + } + // ----------------------------------------- + // Update dataValue + // ----------------------------------------- + else + { + dataValue.setValue( "" + resultValue ); + dataValue.setTimestamp( new Date() ); + dataValueService.updateDataValue( dataValue ); + } + + } + // ----------------------------------------- + // Delete dataValue + // ----------------------------------------- + else if ( dataValue != null ) + { + dataValueService.deleteDataValue( dataValue ); + } + + } + } + } + + } + + // ------------------------------------------------------------------------- + // Supportive methods + // ------------------------------------------------------------------------- + + private List getPeriods( Set periodTypes ) + { + if ( periods != null && periods.size() > 0 ) + { + return periods; + } + + List relatives = new ArrayList(); + + if ( last6Months ) + { + relatives.addAll( new RelativePeriods().getLast6Months( periodTypes ) ); + } + + if ( last6To12Months ) + { + relatives.addAll( new RelativePeriods().getLast6To12Months( periodTypes ) ); + } + + return relatives; + } + +} === added file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/DefaultCaseAggregateConditionSchedulingManager.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/DefaultCaseAggregateConditionSchedulingManager.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/DefaultCaseAggregateConditionSchedulingManager.java 2012-10-10 08:50:17 +0000 @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2004-2009, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.hisp.dhis.patient.scheduling; + +import static org.hisp.dhis.setting.SystemSettingManager.KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS; +import static org.hisp.dhis.system.scheduling.Scheduler.STATUS_NOT_STARTED; + +import java.util.HashMap; +import java.util.Map; + +import org.hisp.dhis.setting.SystemSettingManager; +import org.hisp.dhis.system.scheduling.Scheduler; + +/** + * @author Chau Thu Tran + * + * @version DefaultCaseAggregateConditionSchedulingManager.java 10:42:25 AM Oct + * 10, 2012 $ + */ +public class DefaultCaseAggregateConditionSchedulingManager + implements CaseAggregateConditionSchedulingManager +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private SystemSettingManager systemSettingManager; + + public void setSystemSettingManager( SystemSettingManager systemSettingManager ) + { + this.systemSettingManager = systemSettingManager; + } + + private Scheduler scheduler; + + public void setScheduler( Scheduler scheduler ) + { + this.scheduler = scheduler; + } + + private Map tasks = new HashMap(); + + public void setTasks( Map tasks ) + { + this.tasks = tasks; + } + + // ------------------------------------------------------------------------- + // SchedulingManager implementation + // ------------------------------------------------------------------------- + + public void scheduleTasks() + { + Map keyCronMap = getScheduledTasks(); + + for ( String key : keyCronMap.keySet() ) + { + String cron = keyCronMap.get( key ); + Runnable task = tasks.get( key ); + + if ( cron != null && task != null ) + { + scheduler.scheduleTask( key, task, cron ); + } + } + } + + public void scheduleTasks( Map keyCronMap ) + { + systemSettingManager.saveSystemSetting( KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS, + new HashMap( keyCronMap ) ); + + scheduleTasks(); + } + + public void stopTasks() + { + systemSettingManager.saveSystemSetting( KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS, null ); + + scheduler.stopAllTasks(); + } + + public void executeTasks() + { + Map keyCronMap = getScheduledTasks(); + + for ( String key : keyCronMap.keySet() ) + { + Runnable task = tasks.get( key ); + + if ( task != null ) + { + scheduler.executeTask( task ); + } + } + } + + @SuppressWarnings( "unchecked" ) + public Map getScheduledTasks() + { + return (Map) systemSettingManager.getSystemSetting( KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS, + new HashMap() ); + } + + public String getTaskStatus() + { + Map keyCronMap = getScheduledTasks(); + + if ( keyCronMap.size() == 0 ) + { + return STATUS_NOT_STARTED; + } + + return scheduler.getTaskStatus( keyCronMap.keySet().iterator().next() ); + } +} === 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-04 15:05:38 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2012-10-10 08:50:17 +0000 @@ -141,6 +141,8 @@ executeSql( "CREATE INDEX index_programinstance ON programinstance( programinstanceid )" ); executeSql( "ALTER TABLE program DROP COLUMN maxDaysAllowedInputData"); + + executeSql( "ALTER TABLE programstage_dataelements DROP CONSTRAINT \"fkaf0e5fc634ee4761\" "); } // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2012-10-02 06:23:53 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2012-10-10 08:50:17 +0000 @@ -365,7 +365,7 @@ class="org.hisp.dhis.program.ProgramStageInstanceDeletionHandler"> - + @@ -418,6 +418,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -451,10 +491,12 @@ - + - + @@ -464,7 +506,8 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/GetScheduleParamsAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/GetScheduleParamsAction.java 2012-09-25 06:44:53 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/GetScheduleParamsAction.java 2012-10-10 08:50:17 +0000 @@ -32,9 +32,7 @@ import org.hisp.dhis.patient.scheduling.ProgramSchedulingManager; import org.hisp.dhis.setting.SystemSettingManager; -import org.hisp.dhis.sms.outbound.OutboundSmsTransportService; import org.hisp.dhis.system.scheduling.Scheduler; -import org.springframework.beans.factory.annotation.Autowired; import com.opensymphony.xwork2.Action; @@ -56,10 +54,7 @@ { this.systemSettingManager = systemSettingManager; } - - @Autowired - private OutboundSmsTransportService transportService; - + private ProgramSchedulingManager schedulingManager; public void setSchedulingManager( ProgramSchedulingManager schedulingManager ) === added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/ScheduleCaseAggregateConditionAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/ScheduleCaseAggregateConditionAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/ScheduleCaseAggregateConditionAction.java 2012-10-10 08:50:17 +0000 @@ -0,0 +1,223 @@ +/* + * Copyright (c) 2004-2009, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.hisp.dhis.patient.action.schedule; + +import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_ORGUNITGROUPSET_AGG_LEVEL; +import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_SCHEDULED_PERIOD_TYPES; +import static org.hisp.dhis.setting.SystemSettingManager.KEY_AGGREGATE_QUERY_BUILDER_ORGUNITGROUPSET_AGG_LEVEL; +import static org.hisp.dhis.setting.SystemSettingManager.KEY_SCHEDULED_AGGREGATE_QUERY_BUILDER_PERIOD_TYPES; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.hisp.dhis.organisationunit.OrganisationUnitLevel; +import org.hisp.dhis.organisationunit.OrganisationUnitService; +import org.hisp.dhis.patient.scheduling.CaseAggregateConditionSchedulingManager; +import org.hisp.dhis.setting.SystemSettingManager; +import org.hisp.dhis.system.scheduling.Scheduler; + +import com.opensymphony.xwork2.Action; + +/** + * @author Chau Thu Tran + * + * @version ScheduleCaseAggregateConditionAction.java 11:14:34 AM Oct 10, 2012 $ + */ +public class ScheduleCaseAggregateConditionAction + implements Action +{ + private static final String STRATEGY_LAST_12_DAILY = "last12Daily"; + + private static final String STRATEGY_LAST_6_DAILY_6_TO_12_WEEKLY = "last6Daily6To12Weekly"; + + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private SystemSettingManager systemSettingManager; + + public void setSystemSettingManager( SystemSettingManager systemSettingManager ) + { + this.systemSettingManager = systemSettingManager; + } + + private CaseAggregateConditionSchedulingManager schedulingManager; + + public void setSchedulingManager( CaseAggregateConditionSchedulingManager schedulingManager ) + { + this.schedulingManager = schedulingManager; + } + + private OrganisationUnitService organisationUnitService; + + public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) + { + this.organisationUnitService = organisationUnitService; + } + + // ------------------------------------------------------------------------- + // Input + // ------------------------------------------------------------------------- + + private boolean execute; + + public void setExecute( boolean execute ) + { + this.execute = execute; + } + + private boolean schedule; + + public void setSchedule( boolean schedule ) + { + this.schedule = schedule; + } + + private Set scheduledPeriodTypes = new HashSet(); + + public Set getScheduledPeriodTypes() + { + return scheduledPeriodTypes; + } + + public void setScheduledPeriodTypes( Set scheduledPeriodTypes ) + { + this.scheduledPeriodTypes = scheduledPeriodTypes; + } + + private Integer orgUnitGroupSetAggLevel; + + public Integer getOrgUnitGroupSetAggLevel() + { + return orgUnitGroupSetAggLevel; + } + + public void setOrgUnitGroupSetAggLevel( Integer orgUnitGroupSetAggLevel ) + { + this.orgUnitGroupSetAggLevel = orgUnitGroupSetAggLevel; + } + + private String aggQueryBuilderStrategy; + + public String getAggQueryBuilderStrategy() + { + return aggQueryBuilderStrategy; + } + + public void setAggQueryBuilderStrategy( String aggQueryBuilderStrategy ) + { + this.aggQueryBuilderStrategy = aggQueryBuilderStrategy; + } + + // ------------------------------------------------------------------------- + // Output + // ------------------------------------------------------------------------- + + private String status; + + public String getStatus() + { + return status; + } + + private boolean running; + + public boolean isRunning() + { + return running; + } + + private List levels; + + public List getLevels() + { + return levels; + } + + // ------------------------------------------------------------------------- + // Action implementation + // ------------------------------------------------------------------------- + + @SuppressWarnings( "unchecked" ) + @Override + public String execute() + throws Exception + { + if ( execute ) + { + schedulingManager.executeTasks(); + } + else if ( schedule ) + { + systemSettingManager.saveSystemSetting( KEY_SCHEDULED_AGGREGATE_QUERY_BUILDER_PERIOD_TYPES, + (HashSet) scheduledPeriodTypes ); + + if ( Scheduler.STATUS_RUNNING.equals( schedulingManager.getTaskStatus() ) ) + { + schedulingManager.stopTasks(); + } + else + { + Map keyCronMap = new HashMap(); + + if ( STRATEGY_LAST_12_DAILY.equals( aggQueryBuilderStrategy ) ) + { + keyCronMap.put( CaseAggregateConditionSchedulingManager.TASK_AGGREGATE_QUERY_BUILDER_LAST_12_MONTHS, Scheduler.CRON_DAILY_0AM ); + } + else if ( STRATEGY_LAST_6_DAILY_6_TO_12_WEEKLY.equals( aggQueryBuilderStrategy ) ) + { + keyCronMap.put( CaseAggregateConditionSchedulingManager.TASK_AGGREGATE_QUERY_BUILDER_LAST_6_MONTS, + Scheduler.CRON_DAILY_0AM_EXCEPT_SUNDAY ); + keyCronMap.put( CaseAggregateConditionSchedulingManager.TASK_AGGREGATE_QUERY_BUILDER_FROM_6_TO_12_MONTS, + Scheduler.CRON_WEEKLY_SUNDAY_0AM ); + } + + schedulingManager.scheduleTasks( keyCronMap ); + } + } + else + { + scheduledPeriodTypes = (Set) systemSettingManager.getSystemSetting( + KEY_SCHEDULED_AGGREGATE_QUERY_BUILDER_PERIOD_TYPES, DEFAULT_SCHEDULED_PERIOD_TYPES ); + orgUnitGroupSetAggLevel = (Integer) systemSettingManager.getSystemSetting( + KEY_AGGREGATE_QUERY_BUILDER_ORGUNITGROUPSET_AGG_LEVEL, DEFAULT_ORGUNITGROUPSET_AGG_LEVEL ); + aggQueryBuilderStrategy = schedulingManager.getScheduledTasks().containsKey( + CaseAggregateConditionSchedulingManager.TASK_AGGREGATE_QUERY_BUILDER_LAST_12_MONTHS ) ? STRATEGY_LAST_12_DAILY + : STRATEGY_LAST_6_DAILY_6_TO_12_WEEKLY; + } + + status = schedulingManager.getTaskStatus(); + running = Scheduler.STATUS_RUNNING.equals( status ); + levels = organisationUnitService.getOrganisationUnitLevels(); + + return SUCCESS; + } +} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2012-10-01 09:38:04 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2012-10-10 08:50:17 +0000 @@ -150,10 +150,9 @@ scope="prototype"> - + - + - - + + - - + @@ -195,25 +197,32 @@ class="org.hisp.dhis.patient.action.program.ShowAddProgramFormAction" scope="prototype"> - - + + - - - - + + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + @@ -898,5 +929,15 @@ + + + + + + \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2012-10-10 02:23:29 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2012-10-10 08:50:17 +0000 @@ -303,4 +303,13 @@ confirm_delete_prorgam_stage_section = Are you sure you want to delete this program stage section ? form_details = Form details enrollment_details = Enrollment details -repeatable_program_stage_details = Repeatable program stage details \ No newline at end of file +repeatable_program_stage_details = Repeatable program stage details +schedule_aggregation_query_builder = Aggregation Query Builder +intro_schedule_aggregation_query_builder = Schedule for running aggregate builder formulas automatically. +aggregation_period_types = Aggregation period types +financial_yearly = Financial Yearly +organisation_unit_group_set_aggregation_level = Organisation unit group set aggregation level +aggregate task strategy = Aggregate task strategy +last_12_months_daily = Last 12 months daily +last_6_months_daily_6_to_12_months_weekly = Last 6 months daily + 6 to 12 months weekly +execute_tasks_confirmation=Are you sure you want to execute all tasks now? Task processing might fully utilize your system resources and slow down other operations. \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2012-09-28 06:26:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2012-10-10 08:50:17 +0000 @@ -28,14 +28,16 @@ - /dhis-web-commons/ajax/jsonRelationshipType.vm + /dhis-web-commons/ajax/jsonRelationshipType.vm + plainTextError - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + F_RELATIONSHIPTYPE_DELETE @@ -73,11 +75,14 @@ - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseError.vm + /dhis-web-commons/ajax/jsonResponseError.vm + - /dhis-web-commons/ajax/jsonResponseInput.vm + /dhis-web-commons/ajax/jsonResponseInput.vm + plainTextError @@ -95,30 +100,35 @@ - /dhis-web-commons/ajax/jsonPatientAttribute.vm + /dhis-web-commons/ajax/jsonPatientAttribute.vm + plainTextError - /dhis-web-commons/ajax/jsonPatientAttributes.vm + /dhis-web-commons/ajax/jsonPatientAttributes.vm + plainTextError - /dhis-web-commons/ajax/jsonPatientAttributes.vm + /dhis-web-commons/ajax/jsonPatientAttributes.vm + plainTextError - + - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseError.vm + /dhis-web-commons/ajax/jsonResponseError.vm + F_PATIENTATTRIBUTE_DELETE @@ -159,20 +169,25 @@ - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseInput.vm + /dhis-web-commons/ajax/jsonResponseInput.vm + plainTextError - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseError.vm + /dhis-web-commons/ajax/jsonResponseError.vm + - /dhis-web-commons/ajax/jsonResponseInput.vm + /dhis-web-commons/ajax/jsonResponseInput.vm + F_PATIENTATTRIBUTE_DELETE @@ -189,16 +204,19 @@ - /dhis-web-commons/ajax/jsonProgram.vm + /dhis-web-commons/ajax/jsonProgram.vm + plainTextError - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseError.vm + /dhis-web-commons/ajax/jsonResponseError.vm + F_PROGRAM_DELETE @@ -238,14 +256,17 @@ - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseError.vm + /dhis-web-commons/ajax/jsonResponseError.vm + - /dhis-web-commons/ajax/jsonResponseInput.vm + /dhis-web-commons/ajax/jsonResponseInput.vm + plainTextError - + - /dhis-web-commons/ajax/jsonProgramStage.vm + /dhis-web-commons/ajax/jsonProgramStage.vm + plainTextError - /dhis-web-commons/ajax/xmlResponseInput.vm + /dhis-web-commons/ajax/xmlResponseInput.vm + /main.vm /dhis-web-maintenance-patient/addProgramStageForm.vm @@ -300,16 +323,19 @@ - ../dhis-web-commons/ajax/jsonResponseSuccess.vm + ../dhis-web-commons/ajax/jsonResponseSuccess.vm + - ../dhis-web-commons/ajax/jsonResponseError.vm + ../dhis-web-commons/ajax/jsonResponseError.vm + plainTextError - programStage.action?id=${programId} + programStage.action?id=${programId} + F_PROGRAMSTAGE_UPDATE @@ -326,9 +352,11 @@ - ../dhis-web-commons/ajax/jsonResponseSuccess.vm + ../dhis-web-commons/ajax/jsonResponseSuccess.vm + - ../dhis-web-commons/ajax/jsonResponseError.vm + ../dhis-web-commons/ajax/jsonResponseError.vm + plainTextError F_PROGRAMSTAGE_DELETE @@ -336,18 +364,19 @@ - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - + /content.vm /dhis-web-maintenance-patient/programStageList.vm javascript/programStage.js - + - + /main.vm @@ -357,7 +386,7 @@ style/basic.css F_PROGRAMSTAGE_SECTION_MANAGEMENT - + /main.vm @@ -367,14 +396,14 @@ style/basic.css F_PROGRAMSTAGE_SECTION_ADD - + programStageSectionList.action?id=${programStageId} F_PROGRAMSTAGE_SECTION_ADD - + /main.vm @@ -384,7 +413,7 @@ style/basic.css F_PROGRAMSTAGE_SECTION_UPDATE - + programStageSectionList.action?id=${programStageId} @@ -395,18 +424,21 @@ - /dhis-web-maintenance-patient/jsonProgramStageSection.vm + /dhis-web-maintenance-patient/jsonProgramStageSection.vm + - + - ../dhis-web-commons/ajax/jsonResponseSuccess.vm + ../dhis-web-commons/ajax/jsonResponseSuccess.vm + - ../dhis-web-commons/ajax/jsonResponseError.vm + ../dhis-web-commons/ajax/jsonResponseError.vm + F_PROGRAMSTAGE_SECTION_DELETE - + /main.vm @@ -416,20 +448,23 @@ style/basic.css F_PROGRAMSTAGE_SECTION_MANAGEMENT - + - programStageSectionList.action?id=${id} + programStageSectionList.action?id=${id} + - + - ../dhis-web-commons/ajax/jsonResponseSuccess.vm + ../dhis-web-commons/ajax/jsonResponseSuccess.vm + - ../dhis-web-commons/ajax/jsonResponseError.vm + ../dhis-web-commons/ajax/jsonResponseError.vm + - + - programStage.action?id=${programId} + programStage.action?id=${programId} + - programStage.action?id=${programId} + programStage.action?id=${programId} + - ../dhis-web-commons/ajax/jsonResponseSuccess.vm + ../dhis-web-commons/ajax/jsonResponseSuccess.vm + - ../dhis-web-commons/ajax/jsonResponseError.vm + ../dhis-web-commons/ajax/jsonResponseError.vm + plainTextError - /dhis-web-maintenance-patient/responseSelDataElementList.vm + /dhis-web-maintenance-patient/responseSelDataElementList.vm + - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + F_PATIENTATTRIBUTE_DELETE @@ -536,11 +577,14 @@ - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseError.vm + /dhis-web-commons/ajax/jsonResponseError.vm + - /dhis-web-commons/ajax/jsonResponseInput.vm + /dhis-web-commons/ajax/jsonResponseInput.vm + plainTextError @@ -574,11 +618,14 @@ - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseError.vm + /dhis-web-commons/ajax/jsonResponseError.vm + - /dhis-web-commons/ajax/jsonResponseInput.vm + /dhis-web-commons/ajax/jsonResponseInput.vm + plainTextError @@ -612,9 +659,11 @@ - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseError.vm + /dhis-web-commons/ajax/jsonResponseError.vm + F_PATIENTIDENTIFIERTYPE_DELETE @@ -674,22 +723,24 @@ - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - + /dhis-web-maintenance-patient/responseAggerateDataElement.vm - + /dhis-web-maintenance-patient/jsonParamsByProgram.vm - + @@ -707,32 +758,38 @@ - /dhis-web-commons/ajax/jsonCaseAggregation.vm + /dhis-web-commons/ajax/jsonCaseAggregation.vm + plainTextError - /dhis-web-maintenance-patient/responseCaseAggDescription.vm + /dhis-web-maintenance-patient/responseCaseAggDescription.vm + plainTextError - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseInput.vm + /dhis-web-commons/ajax/jsonResponseInput.vm + plainTextError - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseInput.vm + /dhis-web-commons/ajax/jsonResponseInput.vm + plainTextError @@ -777,7 +834,8 @@ - /dhis-web-commons/ajax/jsonValidationCriteria.vm + /dhis-web-commons/ajax/jsonValidationCriteria.vm + - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + F_VALIDATIONCRITERIA_DELETE - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + - /dhis-web-commons/ajax/jsonResponseInput.vm + /dhis-web-commons/ajax/jsonResponseInput.vm + - validationCriteria.action + validationCriteria.action + F_PROGRAM_UPDATE @@ -856,7 +918,8 @@ - programValidation.action?programId=${programId} + programValidation.action?programId=${programId} + F_PROGRAM_VALIDATION @@ -881,21 +944,24 @@ - programValidation.action?programId=${programId} + programValidation.action?programId=${programId} + F_PROGRAM_VALIDATION - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + F_PROGRAM_VALIDATION - /dhis-web-commons/ajax/jsonProgramValidation.vm + /dhis-web-commons/ajax/jsonProgramValidation.vm + plainTextError @@ -908,46 +974,73 @@ - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + F_PROGRAM_VALIDATION - /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseSuccess.vm + F_PROGRAM_VALIDATION - /dhis-web-maintenance-patient/responseCaseAggDescription.vm + /dhis-web-maintenance-patient/responseCaseAggDescription.vm + plainTextError - + - - - /main.vm - /dhis-web-maintenance-patient/scheduleSendMessage.vm - /dhis-web-maintenance-patient/menu.vm - javascript/scheduling.js - true - F_SCHEDULING_SEND_MESSAGE - - - - - /dhis-web-maintenance-patient/jsonResponseScheduleTasks.vm - F_SCHEDULING_SEND_MESSAGE - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - F_SCHEDULING_SEND_MESSAGE - - + + + /main.vm + /dhis-web-maintenance-patient/scheduleSendMessage.vm + /dhis-web-maintenance-patient/menu.vm + javascript/scheduling.js + true + F_SCHEDULING_SEND_MESSAGE + + + + + /dhis-web-maintenance-patient/jsonResponseScheduleTasks.vm + + F_SCHEDULING_SEND_MESSAGE + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_SCHEDULING_SEND_MESSAGE + + + + /main.vm + /dhis-web-maintenance-patient/viewScheduledCaseAggTasks.vm + /dhis-web-maintenance-patient/menu.vm + javascript/scheduling.js + F_SCHEDULING_ADMIN + + + + /main.vm + /dhis-web-maintenance-patient/viewScheduledCaseAggTasks.vm + /dhis-web-maintenance-patient/menu.vm + javascript/scheduling.js + true + F_SCHEDULING_ADMIN + + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm 2012-10-06 05:12:17 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm 2012-10-10 08:50:17 +0000 @@ -19,4 +19,7 @@ #if( $auth.hasAccess( "dhis-web-maintenance-patient", "viewScheduleTasks" ) ) #introListImgItem( "viewScheduleTasks.action" "schedule_message" "scheduling" ) #end + + #introListImgItem( "viewScheduledCaseAggCondTasks.action" "schedule_aggregation_query_builder" "scheduling" ) + \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js 2012-10-09 05:25:36 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/scheduling.js 2012-10-10 08:50:17 +0000 @@ -1,3 +1,8 @@ + +// ----------------------------------------------------------------------- +// Schedule Messages +// ----------------------------------------------------------------------- + function scheduleTasks() { $.post( 'scheduleTasks.action',{ @@ -31,3 +36,23 @@ setMessage(i18n_execute_success); }); } + +// ----------------------------------------------------------------------- +// Schedule Aggregate Query Builder +// ----------------------------------------------------------------------- + +function submitSchedulingForm() +{ + $( '.scheduling' ).removeAttr( 'disabled' ); + $( '#schedulingForm' ).submit(); +} + +function executeAggCondTasks() +{ + var ok = confirm( i18n_execute_tasks_confirmation ); + + if ( ok ) + { + $.get( 'scheduleCaseAggTasks.action?execute=true' ); + } +} \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.vm 2012-10-06 05:12:17 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.vm 2012-10-10 08:50:17 +0000 @@ -17,5 +17,6 @@

$i18n.getString( "scheduling" )

#end === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menuScheduling.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menuScheduling.vm 2012-09-10 10:28:33 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menuScheduling.vm 1970-01-01 00:00:00 +0000 @@ -1,14 +0,0 @@ -

$i18n.getString( "patients" )

- - -

$i18n.getString( "programs" )

- === added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewScheduledCaseAggTasks.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewScheduledCaseAggTasks.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewScheduledCaseAggTasks.vm 2012-10-10 08:50:17 +0000 @@ -0,0 +1,76 @@ + + +

$i18n.getString( "schedule_aggregation_query_builder" ) #openHelp( "scheduling" )

+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
$i18n.getString( "aggregation_period_types" )
+   +   +   +

+   +   + +
$i18n.getString( "organisation_unit_group_set_aggregation_level" )
+ +
$i18n.getString( "aggregate_task_strategy" )
+ +
+ + +
+
+ +$i18n.getString( "scheduling_is" ) $!i18n.getString( $!status )