=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/PBFDataValue.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/PBFDataValue.java 2014-04-26 11:27:06 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/PBFDataValue.java 2014-06-20 10:21:56 +0000 @@ -8,22 +8,25 @@ import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.period.Period; -public class PBFDataValue implements Serializable +@SuppressWarnings( "serial" ) +public class PBFDataValue implements Serializable { private OrganisationUnit organisationUnit; - + private DataElement dataElement; - + private DataSet dataSet; private Period period; private Integer quantityReported; - + private Integer quantityValidated; - + + private Integer quantityExternalVerification; + private Double tariffAmount; - + private String storedBy; private Date timestamp; @@ -35,10 +38,11 @@ // ------------------------------------------------------------------------- public PBFDataValue() { - + } - - public PBFDataValue( OrganisationUnit organisationUnit, DataElement dataElement, DataSet dataSet, Period period, Integer quantityReported, Integer quantityValidated, Double tariffAmount ) + + public PBFDataValue( OrganisationUnit organisationUnit, DataElement dataElement, DataSet dataSet, Period period, + Integer quantityReported, Integer quantityValidated, Integer quantityExternalVerification, Double tariffAmount ) { this.organisationUnit = organisationUnit; this.dataElement = dataElement; @@ -46,6 +50,7 @@ this.period = period; this.quantityReported = quantityReported; this.quantityValidated = quantityValidated; + this.quantityExternalVerification = quantityExternalVerification; this.tariffAmount = tariffAmount; } @@ -73,7 +78,8 @@ final PBFDataValue other = (PBFDataValue) o; - return dataElement.equals( other.getDataElement() ) && dataSet.equals( other.getDataSet() ) && organisationUnit.equals( other.getOrganisationUnit() ) && period.equals( other.getPeriod() ); + return dataElement.equals( other.getDataElement() ) && dataSet.equals( other.getDataSet() ) + && organisationUnit.equals( other.getOrganisationUnit() ) && period.equals( other.getPeriod() ); } @Override @@ -94,103 +100,113 @@ // Getters and setters // ------------------------------------------------------------------------- - public OrganisationUnit getOrganisationUnit() - { - return organisationUnit; - } - - public void setOrganisationUnit(OrganisationUnit organisationUnit) - { - this.organisationUnit = organisationUnit; - } - - public DataElement getDataElement() - { - return dataElement; - } - - public void setDataElement(DataElement dataElement) - { - this.dataElement = dataElement; - } - - public DataSet getDataSet() - { - return dataSet; - } - - public void setDataSet(DataSet dataSet) - { - this.dataSet = dataSet; - } - - public Period getPeriod() - { - return period; - } - - public void setPeriod(Period period) - { - this.period = period; - } - - public Integer getQuantityReported() - { - return quantityReported; - } - - public void setQuantityReported(Integer quantityReported) - { - this.quantityReported = quantityReported; - } - - public Integer getQuantityValidated() - { - return quantityValidated; - } - - public void setQuantityValidated(Integer quantityValidated) - { - this.quantityValidated = quantityValidated; - } - - public Double getTariffAmount() - { - return tariffAmount; - } - - public void setTariffAmount(Double tariffAmount) - { - this.tariffAmount = tariffAmount; - } - - public String getStoredBy() - { - return storedBy; - } - - public void setStoredBy(String storedBy) - { - this.storedBy = storedBy; - } - - public Date getTimestamp() - { - return timestamp; - } - - public void setTimestamp(Date timestamp) - { - this.timestamp = timestamp; - } - - public String getComment() - { - return comment; - } - - public void setComment(String comment) - { - this.comment = comment; - } + public OrganisationUnit getOrganisationUnit() + { + return organisationUnit; + } + + public void setOrganisationUnit( OrganisationUnit organisationUnit ) + { + this.organisationUnit = organisationUnit; + } + + public DataElement getDataElement() + { + return dataElement; + } + + public void setDataElement( DataElement dataElement ) + { + this.dataElement = dataElement; + } + + public DataSet getDataSet() + { + return dataSet; + } + + public void setDataSet( DataSet dataSet ) + { + this.dataSet = dataSet; + } + + public Period getPeriod() + { + return period; + } + + public void setPeriod( Period period ) + { + this.period = period; + } + + public Integer getQuantityReported() + { + return quantityReported; + } + + public void setQuantityReported( Integer quantityReported ) + { + this.quantityReported = quantityReported; + } + + public Integer getQuantityValidated() + { + return quantityValidated; + } + + public void setQuantityValidated( Integer quantityValidated ) + { + this.quantityValidated = quantityValidated; + } + + public Integer getQuantityExternalVerification() + { + return quantityExternalVerification; + } + + public void setQuantityExternalVerification( Integer quantityExternalVerification ) + { + this.quantityExternalVerification = quantityExternalVerification; + } + + public Double getTariffAmount() + { + return tariffAmount; + } + + public void setTariffAmount( Double tariffAmount ) + { + this.tariffAmount = tariffAmount; + } + + public String getStoredBy() + { + return storedBy; + } + + public void setStoredBy( String storedBy ) + { + this.storedBy = storedBy; + } + + public Date getTimestamp() + { + return timestamp; + } + + public void setTimestamp( Date timestamp ) + { + this.timestamp = timestamp; + } + + public String getComment() + { + return comment; + } + + public void setComment( String comment ) + { + this.comment = comment; + } } === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/UtilizationRate.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/UtilizationRate.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/UtilizationRate.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,159 @@ +package org.hisp.dhis.rbf.api; + +import java.io.Serializable; +import java.util.Date; + +import org.hisp.dhis.dataelement.DataElement; + +/** + * @author Mithilesh Kumar Thakur + */ +public class UtilizationRate implements Serializable +{ + /** + * + */ + private static final long serialVersionUID = 1L; + + private DataElement dataElement; + + private Double startRange; + + private Double endRange; + + private Double tariff; + + private String storedBy; + + private Date timestamp; + + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + public UtilizationRate() + { + + } + + public UtilizationRate( DataElement dataElement, Double startRange, Double endRange, Double tariff ) + { + this.dataElement = dataElement; + this.startRange = startRange; + this.endRange = endRange; + this.tariff = tariff; + } + + public UtilizationRate( DataElement dataElement, Double startRange, Double endRange, Double tariff, String storedBy, Date timestamp ) + { + this.dataElement = dataElement; + this.startRange = startRange; + this.endRange = endRange; + this.tariff = tariff; + this.storedBy = storedBy; + this.timestamp = timestamp; + } + + // ------------------------------------------------------------------------- + // hashCode and equals + // ------------------------------------------------------------------------- + @Override + public boolean equals( Object o ) + { + if ( this == o ) + { + return true; + } + + if ( o == null ) + { + return false; + } + + if ( !(o instanceof UtilizationRate) ) + { + return false; + } + + final UtilizationRate other = (UtilizationRate) o; + + return dataElement.equals( other.getDataElement() ); + } + + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + + result = result * prime + dataElement.hashCode(); + + return result; + } + + // ------------------------------------------------------------------------- + // Getters and setters + // ------------------------------------------------------------------------- + + public DataElement getDataElement() + { + return dataElement; + } + + public void setDataElement( DataElement dataElement ) + { + this.dataElement = dataElement; + } + + public Double getStartRange() + { + return startRange; + } + + public void setStartRange( Double startRange ) + { + this.startRange = startRange; + } + + public Double getEndRange() + { + return endRange; + } + + public void setEndRange( Double endRange ) + { + this.endRange = endRange; + } + + public Double getTariff() + { + return tariff; + } + + public void setTariff( Double tariff ) + { + this.tariff = tariff; + } + + public String getStoredBy() + { + return storedBy; + } + + public void setStoredBy( String storedBy ) + { + this.storedBy = storedBy; + } + + public Date getTimestamp() + { + return timestamp; + } + + public void setTimestamp( Date timestamp ) + { + this.timestamp = timestamp; + } + +} + === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/UtilizationRateService.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/UtilizationRateService.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/UtilizationRateService.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,31 @@ +package org.hisp.dhis.rbf.api; + +import java.util.Collection; +import java.util.Map; + +import org.hisp.dhis.dataelement.DataElement; + +/** + * @author Mithilesh Kumar Thakur + */ +public interface UtilizationRateService +{ + String ID = UtilizationRateService.class.getName(); + + void addUtilizationRate( UtilizationRate utilizationRate ); + + void updateUtilizationRate( UtilizationRate utilizationRate ); + + void deleteUtilizationRate( UtilizationRate utilizationRate ); + + UtilizationRate getUtilizationRate( DataElement dataElement, Double startRange, Double endRange ); + + Collection getAllUtilizationRate(); + + Collection getUtilizationRates( DataElement dataElement ); + + Double getUtilizationRateTariffValue( DataElement dataElement, Double startRange, Double endRange ); + + MapgetUtilizationRates(); + +} === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/UtilizationRateStore.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/UtilizationRateStore.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/api/UtilizationRateStore.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,31 @@ +package org.hisp.dhis.rbf.api; + +import java.util.Collection; +import java.util.Map; + +import org.hisp.dhis.dataelement.DataElement; + +/** + * @author Mithilesh Kumar Thakur + */ +public interface UtilizationRateStore +{ + String ID = UtilizationRateStore.class.getName(); + + void addUtilizationRate( UtilizationRate utilizationRate ); + + void updateUtilizationRate( UtilizationRate utilizationRate ); + + void deleteUtilizationRate( UtilizationRate utilizationRate ); + + UtilizationRate getUtilizationRate( DataElement dataElement, Double startRange, Double endRange ); + + Collection getAllUtilizationRate(); + + Collection getUtilizationRates( DataElement dataElement ); + + Double getUtilizationRateTariffValue( DataElement dataElement, Double startRange, Double endRange ); + + MapgetUtilizationRates(); + +} === modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/LoadDataEntryFormAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/LoadDataEntryFormAction.java 2014-05-31 13:40:53 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/LoadDataEntryFormAction.java 2014-06-20 10:21:56 +0000 @@ -10,13 +10,16 @@ import java.util.Set; import org.apache.velocity.tools.generic.NumberTool; +import org.hisp.dhis.attribute.AttributeValue; import org.hisp.dhis.constant.Constant; import org.hisp.dhis.constant.ConstantService; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; import org.hisp.dhis.dataelement.DataElementCategoryService; +import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.datavalue.DataValue; import org.hisp.dhis.datavalue.DataValueService; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitGroup; @@ -29,6 +32,7 @@ import org.hisp.dhis.rbf.api.PBFDataValue; import org.hisp.dhis.rbf.api.PBFDataValueService; import org.hisp.dhis.rbf.api.TariffDataValueService; +import org.hisp.dhis.rbf.api.UtilizationRateService; import org.hisp.dhis.user.CurrentUserService; import org.springframework.beans.factory.annotation.Autowired; @@ -37,11 +41,11 @@ /** * @author Mithilesh Kumar Thakur */ -public class LoadDataEntryFormAction - implements Action +public class LoadDataEntryFormAction implements Action { private final static String TARIFF_SETTING_AUTHORITY = "TARIFF_SETTING_AUTHORITY"; - + private final static String UTILIZATION_RULE_DATAELEMENT_ATTRIBUTE = "UTILIZATION_RULE_DATAELEMENT_ATTRIBUTE"; + private final static String UTILIZATION_RATE_DATAELEMENT_ID = "UTILIZATION_RATE_DATAELEMENT_ID"; // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- @@ -108,9 +112,22 @@ { this.constantService = constantService; } - + @Autowired private OrganisationUnitGroupService orgUnitGroupService; + + private UtilizationRateService utilizationRateService; + + public void setUtilizationRateService( UtilizationRateService utilizationRateService ) + { + this.utilizationRateService = utilizationRateService; + } + + @Autowired + private DataElementService dataElementService; + + @Autowired + private DataElementCategoryService categoryService; // ------------------------------------------------------------------------- // Comparator // ------------------------------------------------------------------------- @@ -216,10 +233,32 @@ return nullTool; } + public Map utilizationRatesMap = new HashMap(); + + public Map getUtilizationRatesMap() + { + return utilizationRatesMap; + } + + private List utilizationRateDataElements = new ArrayList(); + + public List getUtilizationRateDataElements() + { + return utilizationRateDataElements; + } + + private String utilizationRate = ""; + + public String getUtilizationRate() + { + return utilizationRate; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- + public String execute() { dataValueMap = new HashMap(); @@ -339,6 +378,7 @@ pbfDataValueMap.put( de, pbfDataValue ); } } + /* * for( DataElement dataElement : dataElements ) { @@ -386,7 +426,46 @@ * System.out.println(" decombo ---" + decombo.getId() +" -- " + * decombo.getName() ); } */ - + + + Constant utilizationRuleAttribute = constantService.getConstantByName( UTILIZATION_RULE_DATAELEMENT_ATTRIBUTE ); + + utilizationRateDataElements = new ArrayList(); + + for ( DataElement de : dataElements ) + { + Set attrValueSet = new HashSet( de.getAttributeValues() ); + for ( AttributeValue attValue : attrValueSet ) + { + if ( attValue.getAttribute().getId() == utilizationRuleAttribute.getValue() && attValue.getValue().equalsIgnoreCase( "true" ) ) + { + utilizationRateDataElements.add( de ); + } + } + } + + utilizationRatesMap = new HashMap( utilizationRateService.getUtilizationRates() ); + + /* + for( Integer key : utilizationRatesMap.keySet() ) + { + System.out.println( " Key is ---" + key + " -- Value " + utilizationRatesMap.get( key ) ); + } + */ + + //------------------------------------------------------------- + // Availbale Amount + //------------------------------------------------------------- + Constant paymentAmount = constantService.getConstantByName( UTILIZATION_RATE_DATAELEMENT_ID ); + DataElement dataElement = dataElementService.getDataElement( (int) paymentAmount.getValue() ); + DataElementCategoryOptionCombo optionCombo = categoryService.getDefaultDataElementCategoryOptionCombo(); + DataValue dataValue = dataValueService.getDataValue( dataElement, period, organisationUnit, optionCombo ); + if ( dataValue != null ) + { + utilizationRate = dataValue.getValue(); + } + + return SUCCESS; } === modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/PageInitAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/PageInitAction.java 2014-04-26 11:27:06 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/PageInitAction.java 2014-06-20 10:21:56 +0000 @@ -4,6 +4,8 @@ import java.util.Collections; import java.util.List; +import org.hisp.dhis.constant.Constant; +import org.hisp.dhis.constant.ConstantService; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -11,6 +13,7 @@ import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager; import org.hisp.dhis.rbf.api.Lookup; import org.hisp.dhis.rbf.api.LookupService; +import org.springframework.beans.factory.annotation.Autowired; import com.opensymphony.xwork2.Action; @@ -19,6 +22,8 @@ */ public class PageInitAction implements Action { + private final static String UTILIZATION_RATE_DATAELEMENT_ID = "UTILIZATION_RATE_DATAELEMENT_ID"; + // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- @@ -51,6 +56,8 @@ this.dataSetService = dataSetService; } + @Autowired + private ConstantService constantService; // ------------------------------------------------------------------------- // Input/output @@ -77,10 +84,18 @@ return dataSets; } + private String utilizationRateDataElementId; + + public String getUtilizationRateDataElementId() + { + return utilizationRateDataElementId; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- + public String execute() throws Exception { //selectionManager.clearSelectedOrganisationUnits(); @@ -129,6 +144,10 @@ } */ + Constant utilizationRateDeId = constantService.getConstantByName( UTILIZATION_RATE_DATAELEMENT_ID ); + + utilizationRateDataElementId = utilizationRateDeId.getValue()+""; + return SUCCESS; } } === modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/SaveValueAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/SaveValueAction.java 2014-05-08 11:03:37 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/dataentry/SaveValueAction.java 2014-06-20 10:21:56 +0000 @@ -338,6 +338,11 @@ pbfDataValue.setQuantityValidated( Integer.parseInt( value ) ); } + else if( valueType.equals("3") ) + { + pbfDataValue.setQuantityExternalVerification( Integer.parseInt( value ) ); + } + pbfDataValue.setStoredBy(storedBy); pbfDataValue.setTimestamp(now); pbfDataValueService.addPBFDataValue(pbfDataValue); @@ -355,7 +360,12 @@ { pbfDataValue.setQuantityValidated( Integer.parseInt( value ) ); } - + + else if( valueType.equals("3") ) + { + pbfDataValue.setQuantityExternalVerification( Integer.parseInt( value ) ); + } + pbfDataValue.setStoredBy(storedBy); pbfDataValue.setTimestamp(now); === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/DefaultUtilizationRateService.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/DefaultUtilizationRateService.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/DefaultUtilizationRateService.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,78 @@ +package org.hisp.dhis.rbf.impl; + +import java.util.Collection; +import java.util.Map; + +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.rbf.api.UtilizationRate; +import org.hisp.dhis.rbf.api.UtilizationRateService; +import org.hisp.dhis.rbf.api.UtilizationRateStore; +import org.springframework.transaction.annotation.Transactional; + +/** + * @author Mithilesh Kumar Thakur + */ +@Transactional +public class DefaultUtilizationRateService implements UtilizationRateService +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private UtilizationRateStore utilizationRateStore; + + public void setUtilizationRateStore( UtilizationRateStore utilizationRateStore ) + { + this.utilizationRateStore = utilizationRateStore; + } + + // ------------------------------------------------------------------------- + // UtilizationRateService Methods implements + // ------------------------------------------------------------------------- + + @Override + public void addUtilizationRate( UtilizationRate utilizationRate ) + { + utilizationRateStore.addUtilizationRate( utilizationRate ); + } + + @Override + public void updateUtilizationRate( UtilizationRate utilizationRate ) + { + utilizationRateStore.updateUtilizationRate( utilizationRate ); + } + + @Override + public void deleteUtilizationRate( UtilizationRate utilizationRate ) + { + utilizationRateStore.deleteUtilizationRate( utilizationRate ); + } + + @Override + public UtilizationRate getUtilizationRate( DataElement dataElement, Double startRange, Double endRange ) + { + return utilizationRateStore.getUtilizationRate( dataElement, startRange, endRange ); + } + + @Override + public Collection getAllUtilizationRate() + { + return utilizationRateStore.getAllUtilizationRate(); + } + + @Override + public Collection getUtilizationRates( DataElement dataElement ) + { + return utilizationRateStore.getUtilizationRates( dataElement ); + } + + public Double getUtilizationRateTariffValue( DataElement dataElement, Double startRange, Double endRange ) + { + return utilizationRateStore.getUtilizationRateTariffValue( dataElement, startRange, endRange ); + } + + public MapgetUtilizationRates() + { + return utilizationRateStore.getUtilizationRates(); + } +} === modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateBankDetailsStore.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateBankDetailsStore.java 2014-04-26 11:27:06 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateBankDetailsStore.java 2014-06-20 10:21:56 +0000 @@ -65,6 +65,7 @@ return (BankDetails) criteria.uniqueResult(); } + @SuppressWarnings( "unchecked" ) @Override public Collection getAllBankDetails() { @@ -75,6 +76,7 @@ return criteria.list(); } + @SuppressWarnings( "unchecked" ) @Override public Collection getBankDetails( OrganisationUnit organisationUnit ) { === modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernatePBFDataValueStore.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernatePBFDataValueStore.java 2014-04-26 11:27:06 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernatePBFDataValueStore.java 2014-06-20 10:21:56 +0000 @@ -100,6 +100,7 @@ return ( PBFDataValue ) criteria.uniqueResult(); } + @SuppressWarnings( "unchecked" ) @Override public Collection getPBFDataValues( OrganisationUnit organisationUnit, DataSet dataSet, Period period ) { === modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateQualityMaxValueStore.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateQualityMaxValueStore.java 2014-05-31 13:40:53 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateQualityMaxValueStore.java 2014-06-20 10:21:56 +0000 @@ -138,7 +138,8 @@ return (QualityMaxValue) criteria.uniqueResult(); } - @Override + @SuppressWarnings( "unchecked" ) + @Override public Collection getQuanlityMaxValues( OrganisationUnit organisationUnit, DataElement dataElement) { @@ -151,7 +152,8 @@ return criteria.list(); } - @Override + @SuppressWarnings( "unchecked" ) + @Override public Collection getQuanlityMaxValues( OrganisationUnitGroup orgUnitGroup, OrganisationUnit organisationUnit, DataElement dataElement) { === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateUtilizationRateStore.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateUtilizationRateStore.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/impl/HibernateUtilizationRateStore.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,161 @@ +package org.hisp.dhis.rbf.impl; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.hibernate.Criteria; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.criterion.Restrictions; +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.rbf.api.UtilizationRate; +import org.hisp.dhis.rbf.api.UtilizationRateStore; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.support.rowset.SqlRowSet; + +/** + * @author Mithilesh Kumar Thakur + */ +public class HibernateUtilizationRateStore implements UtilizationRateStore +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private SessionFactory sessionFactory; + + public void setSessionFactory( SessionFactory sessionFactory ) + { + this.sessionFactory = sessionFactory; + } + + private JdbcTemplate jdbcTemplate; + + public void setJdbcTemplate( JdbcTemplate jdbcTemplate ) + { + this.jdbcTemplate = jdbcTemplate; + } + + // ------------------------------------------------------------------------- + // UtilizationRateStore Methods implements + // ------------------------------------------------------------------------- + + public void addUtilizationRate( UtilizationRate utilizationRate ) + { + Session session = sessionFactory.getCurrentSession(); + + session.save( utilizationRate ); + } + + public void updateUtilizationRate( UtilizationRate utilizationRate ) + { + Session session = sessionFactory.getCurrentSession(); + + session.update( utilizationRate ); + } + + public void deleteUtilizationRate( UtilizationRate utilizationRate ) + { + Session session = sessionFactory.getCurrentSession(); + + session.delete( utilizationRate ); + } + + + public UtilizationRate getUtilizationRate( DataElement dataElement, Double startRange, Double endRange ) + { + Session session = sessionFactory.getCurrentSession(); + + Criteria criteria = session.createCriteria( UtilizationRate.class ); + criteria.add( Restrictions.eq( "dataElement", dataElement ) ); + criteria.add( Restrictions.eq( "startRange", startRange ) ); + criteria.add( Restrictions.eq( "endRange", endRange ) ); + + return (UtilizationRate) criteria.uniqueResult(); + } + + + @SuppressWarnings( "unchecked" ) + public Collection getAllUtilizationRate() + { + Session session = sessionFactory.getCurrentSession(); + + Criteria criteria = session.createCriteria( UtilizationRate.class ); + + return criteria.list(); + } + + @SuppressWarnings( "unchecked" ) + public Collection getUtilizationRates( DataElement dataElement ) + { + Session session = sessionFactory.getCurrentSession(); + + Criteria criteria = session.createCriteria( UtilizationRate.class ); + criteria.add( Restrictions.eq( "dataElement", dataElement ) ); + + return criteria.list(); + } + + public Double getUtilizationRateTariffValue( DataElement dataElement, Double startRange, Double endRange ) + { + Double tariffValue = null; + + try + { + String query = "SELECT tariff FROM utilizationrate WHERE dataelementid = " + dataElement.getId() + " AND startrange = " + startRange + " AND " + + " endrange = " + endRange; + + SqlRowSet rs = jdbcTemplate.queryForRowSet( query ); + + if ( rs.next() ) + { + tariffValue = rs.getDouble( 1 ); + } + } + catch ( Exception e ) + { + e.printStackTrace(); + } + + return tariffValue; + } + + + public MapgetUtilizationRates() + { + Map utilizationRatesMap = new HashMap(); + + try + { + + String query = "SELECT dataelementid, startrange, endrange, tariff FROM utilizationrate"; + + //System.out.println("Query: " + query ); + SqlRowSet rs = jdbcTemplate.queryForRowSet( query ); + while ( rs.next() ) + { + Integer dataElementId = rs.getInt( 1 ); + Double startRange = rs.getDouble( 2 ); + Double endRange = rs.getDouble( 3 ); + Double tariff = rs.getDouble( 4 ); + + String value = startRange + ":" + endRange + ":" + tariff; + utilizationRatesMap.put( dataElementId, value ); + //System.out.println( dataElementId + " : " + value ); + } + } + catch( Exception e ) + { + System.out.println("In getUtilizationRates Exception :"+ e.getMessage() ); + } + + return utilizationRatesMap; +} + + + + + + +} === modified file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/report/action/PBFReportFormAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/report/action/PBFReportFormAction.java 2014-06-02 11:30:23 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/report/action/PBFReportFormAction.java 2014-06-20 10:21:56 +0000 @@ -5,9 +5,18 @@ import java.util.Calendar; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import org.hisp.dhis.constant.Constant; +import org.hisp.dhis.constant.ConstantService; import org.hisp.dhis.i18n.I18nFormat; +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.organisationunit.OrganisationUnitGroup; +import org.hisp.dhis.organisationunit.OrganisationUnitGroupService; +import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet; +import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.period.CalendarPeriodType; import org.hisp.dhis.period.MonthlyPeriodType; import org.hisp.dhis.period.Period; @@ -22,12 +31,33 @@ */ public class PBFReportFormAction implements Action { - + private final static String REPORTING_GROUP_SET = "REPORTING_GROUP_SET"; + // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- - + private OrganisationUnitService organisationUnitService; + + public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) + { + this.organisationUnitService = organisationUnitService; + } + + private OrganisationUnitGroupService organisationUnitGroupService; + + public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService ) + { + this.organisationUnitGroupService = organisationUnitGroupService; + } + + private ConstantService constantService; + + public void setConstantService( ConstantService constantService ) + { + this.constantService = constantService; + } + // ------------------------------------------------------------------------- // Input & Output @@ -66,6 +96,20 @@ return birtPath; } + private List orgUnitList; + + public List getOrgUnitList() + { + return orgUnitList; + } + + private Map orgUnitGroupNameMap = new HashMap(); + + public Map getOrgUnitGroupNameMap() + { + return orgUnitGroupNameMap; + } + // ------------------------------------------------------------------------- // Action // ------------------------------------------------------------------------- @@ -97,7 +141,71 @@ { period.setName( format.formatPeriod( period ) ); } - + + orgUnitList = new ArrayList(); + orgUnitList = new ArrayList( organisationUnitService.getAllOrganisationUnits() ); + + Constant orgUnitGroupSetId = constantService.getConstantByName( REPORTING_GROUP_SET ); + + OrganisationUnitGroupSet organisationUnitGroupSet = organisationUnitGroupService.getOrganisationUnitGroupSet( (int) orgUnitGroupSetId.getValue() ); + + + //System.out.println( " organisationUnit List size " + orgUnitList.size() );orgUnitGroupSetId + + /* + List organisationUnitGroupSetList = new ArrayList(); + + organisationUnitGroupSetList = new ArrayList(); + + organisationUnitGroupSetList = new ArrayList( organisationUnitGroupService.getAllOrganisationUnitGroupSets() ); + + //System.out.println( " organisationUnit Group Set List size Before Remove " + organisationUnitGroupSetList.size() ); + + // remove the orgUnitGroupSet which has no any orgUnitGroup + Iterator allorganisationUnitGroupSetIterator = organisationUnitGroupSetList.iterator(); + while ( allorganisationUnitGroupSetIterator.hasNext() ) + { + OrganisationUnitGroupSet organisationUnitGroupSet = allorganisationUnitGroupSetIterator.next(); + + if ( organisationUnitGroupSet.getOrganisationUnitGroups().size() == 0 ) + { + //System.out.println(" organisationUnitGroupSet Name " + organisationUnitGroupSet.getName() ); + allorganisationUnitGroupSetIterator.remove(); + } + } + */ + + //System.out.println( " organisationUnit Group Set List size After Remove " + organisationUnitGroupSetList.size() ); + + orgUnitGroupNameMap = new HashMap(); + for( OrganisationUnit orgUnit : orgUnitList ) + { + for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitGroupSet.getOrganisationUnitGroups() ) + { + if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 ) + { + if( orgUnit.getGroups().contains( organisationUnitGroup ) ) + { + orgUnitGroupNameMap.put( orgUnit.getUid(), organisationUnitGroup.getName() ); + break; + } + } + } + } + + + //System.out.println( " organisationUnit Group Map size " + orgUnitGroupNameMap.size() ); + + /* + for( String key : orgUnitGroupNameMap.keySet() ) + { + System.out.println( " OrganisationUnit Uid " + key + " OrganisationUnit Group Name " + orgUnitGroupNameMap.get( key ) ); + } + */ + + + + return SUCCESS; } === added directory 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement' === added directory 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action' === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/AddUtilizationRateAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/AddUtilizationRateAction.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/AddUtilizationRateAction.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,138 @@ +package org.hisp.dhis.rbf.utilizationRuleManagement.action; + +import java.util.Date; + +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementService; +import org.hisp.dhis.rbf.api.UtilizationRate; +import org.hisp.dhis.rbf.api.UtilizationRateService; +import org.hisp.dhis.user.CurrentUserService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Mithilesh Kumar Thakur + */ +public class AddUtilizationRateAction implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private UtilizationRateService utilizationRateService; + + public void setUtilizationRateService( UtilizationRateService utilizationRateService ) + { + this.utilizationRateService = utilizationRateService; + } + + private DataElementService dataElementService; + + public void setDataElementService( DataElementService dataElementService ) + { + this.dataElementService = dataElementService; + } + + private CurrentUserService currentUserService; + + public void setCurrentUserService( CurrentUserService currentUserService ) + { + this.currentUserService = currentUserService; + } + + // ------------------------------------------------------------------------- + // Input & output + // ------------------------------------------------------------------------- + + private String dataElementId; + + public void setDataElementId( String dataElementId ) + { + this.dataElementId = dataElementId; + } + + private String startRange; + + public void setStartRange( String startRange ) + { + this.startRange = startRange; + } + + private String endRange; + + public void setEndRange( String endRange ) + { + this.endRange = endRange; + } + + private String tariff; + + public void setTariff( String tariff ) + { + this.tariff = tariff; + } + // ------------------------------------------------------------------------- + // Action + // ------------------------------------------------------------------------- + + + public String execute() throws Exception + { + DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( dataElementId ) ); + + if( dataElement != null ) + { + UtilizationRate utilizationRate = utilizationRateService.getUtilizationRate( dataElement, Double.parseDouble( startRange ), Double.parseDouble( endRange ) ); + + if( utilizationRate == null ) + { + utilizationRate = new UtilizationRate(); + + utilizationRate.setDataElement( dataElement ); + utilizationRate.setStartRange( Double.parseDouble( startRange ) ); + utilizationRate.setEndRange( Double.parseDouble( endRange ) ); + utilizationRate.setTariff( Double.parseDouble( tariff ) ); + + String storedBy = currentUserService.getCurrentUsername(); + + Date now = new Date(); + + if ( storedBy == null ) + { + storedBy = "[unknown]"; + } + + utilizationRate.setStoredBy( storedBy ); + utilizationRate.setTimestamp( now ); + + utilizationRateService.addUtilizationRate( utilizationRate ); + } + + else + { + utilizationRate.setDataElement( dataElement ); + utilizationRate.setStartRange( Double.parseDouble( startRange ) ); + utilizationRate.setEndRange( Double.parseDouble( endRange ) ); + utilizationRate.setTariff( Double.parseDouble( tariff ) ); + + String storedBy = currentUserService.getCurrentUsername(); + + Date now = new Date(); + + if ( storedBy == null ) + { + storedBy = "[unknown]"; + } + + utilizationRate.setStoredBy( storedBy ); + utilizationRate.setTimestamp( now ); + + utilizationRateService.updateUtilizationRate( utilizationRate ); + } + + } + + return SUCCESS; + } + +} === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/GetUtilizationRateListAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/GetUtilizationRateListAction.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/GetUtilizationRateListAction.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,80 @@ +package org.hisp.dhis.rbf.utilizationRuleManagement.action; + +import java.util.ArrayList; +import java.util.List; + +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementService; +import org.hisp.dhis.rbf.api.UtilizationRate; +import org.hisp.dhis.rbf.api.UtilizationRateService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Mithilesh Kumar Thakur + */ +public class GetUtilizationRateListAction implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private UtilizationRateService utilizationRateService; + + public void setUtilizationRateService( UtilizationRateService utilizationRateService ) + { + this.utilizationRateService = utilizationRateService; + } + + private DataElementService dataElementService; + + public void setDataElementService( DataElementService dataElementService ) + { + this.dataElementService = dataElementService; + } + + + // ------------------------------------------------------------------------- + // Input & output + // ------------------------------------------------------------------------- + + private String dataElementId; + + public void setDataElementId( String dataElementId ) + { + this.dataElementId = dataElementId; + } + + private List utilizationRateList = new ArrayList(); + + public List getUtilizationRateList() + { + return utilizationRateList; + } + + private DataElement dataElement; + + public DataElement getDataElement() + { + return dataElement; + } + // ------------------------------------------------------------------------- + // Action + // ------------------------------------------------------------------------- + + public String execute() throws Exception + { + dataElement = dataElementService.getDataElement( Integer.parseInt( dataElementId ) ); + + utilizationRateList = new ArrayList(); + + if( dataElement != null ) + { + utilizationRateList = new ArrayList( utilizationRateService.getUtilizationRates( dataElement ) ); + + } + + return SUCCESS; + } + +} === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/GetUtilizationRuleDataElementListAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/GetUtilizationRuleDataElementListAction.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/GetUtilizationRuleDataElementListAction.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,76 @@ +package org.hisp.dhis.rbf.utilizationRuleManagement.action; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.hisp.dhis.attribute.AttributeValue; +import org.hisp.dhis.constant.Constant; +import org.hisp.dhis.constant.ConstantService; +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Mithilesh Kumar Thakur + */ +public class GetUtilizationRuleDataElementListAction implements Action +{ + private final static String UTILIZATION_RULE_DATAELEMENT_ATTRIBUTE = "UTILIZATION_RULE_DATAELEMENT_ATTRIBUTE"; + + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private DataElementService dataElementtService; + + public void setDataElementtService( DataElementService dataElementtService ) + { + this.dataElementtService = dataElementtService; + } + + private ConstantService constantService; + + public void setConstantService( ConstantService constantService ) + { + this.constantService = constantService; + } + + // ------------------------------------------------------------------------- + // Input / Output + // ------------------------------------------------------------------------- + + private List dataElements = new ArrayList(); + + public List getDataElements() + { + return dataElements; + } + + + // ------------------------------------------------------------------------- + // Action implementation + // ------------------------------------------------------------------------- + + public String execute() throws Exception + { + Constant utilizationRuleAttribute = constantService.getConstantByName( UTILIZATION_RULE_DATAELEMENT_ATTRIBUTE ); + + List dataElementList = new ArrayList( dataElementtService.getAllDataElements() ); + for ( DataElement de : dataElementList ) + { + Set attrValueSet = new HashSet( de.getAttributeValues() ); + for ( AttributeValue attValue : attrValueSet ) + { + if ( attValue.getAttribute().getId() == utilizationRuleAttribute.getValue() && attValue.getValue().equalsIgnoreCase( "true" ) ) + { + dataElements.add( de ); + } + } + } + + return SUCCESS; + } +} \ No newline at end of file === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/RemoveUtilizationRateAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/RemoveUtilizationRateAction.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/RemoveUtilizationRateAction.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,107 @@ +package org.hisp.dhis.rbf.utilizationRuleManagement.action; + +import org.hisp.dhis.common.DeleteNotAllowedException; +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementService; +import org.hisp.dhis.i18n.I18n; +import org.hisp.dhis.rbf.api.UtilizationRate; +import org.hisp.dhis.rbf.api.UtilizationRateService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Mithilesh Kumar Thakur + */ +public class RemoveUtilizationRateAction implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private UtilizationRateService utilizationRateService; + + public void setUtilizationRateService( UtilizationRateService utilizationRateService ) + { + this.utilizationRateService = utilizationRateService; + } + + private DataElementService dataElementService; + + public void setDataElementService( DataElementService dataElementService ) + { + this.dataElementService = dataElementService; + } + + // ------------------------------------------------------------------------- + // Input & output + // ------------------------------------------------------------------------- + + private String dataElementId; + + public void setDataElementId( String dataElementId ) + { + this.dataElementId = dataElementId; + } + + private String startRange; + + public void setStartRange( String startRange ) + { + this.startRange = startRange; + } + + private String endRange; + + public void setEndRange( String endRange ) + { + this.endRange = endRange; + } + + private I18n i18n; + + public void setI18n( I18n i18n ) + { + this.i18n = i18n; + } + + private String message; + + public String getMessage() + { + return message; + } + + // ------------------------------------------------------------------------- + // Action + // ------------------------------------------------------------------------- + + public String execute() throws Exception + { + DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( dataElementId ) ); + + if( dataElement != null ) + { + try + { + UtilizationRate utilizationRate = utilizationRateService.getUtilizationRate( dataElement, Double.parseDouble( startRange ), Double.parseDouble( endRange ) ); + + if( utilizationRate != null ) + { + utilizationRateService.deleteUtilizationRate( utilizationRate ); + } + } + catch ( DeleteNotAllowedException ex ) + { + if ( ex.getErrorCode().equals( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS ) ) + { + message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getMessage(); + } + + return ERROR; + } + + } + + return SUCCESS; + } +} === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/ShowAddUtilizationRateFormAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/ShowAddUtilizationRateFormAction.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/ShowAddUtilizationRateFormAction.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,59 @@ +package org.hisp.dhis.rbf.utilizationRuleManagement.action; + +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Mithilesh Kumar Thakur + */ +public class ShowAddUtilizationRateFormAction implements Action +{ + + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private DataElementService dataElementService; + + public void setDataElementService( DataElementService dataElementService ) + { + this.dataElementService = dataElementService; + } + + // ------------------------------------------------------------------------- + // Input / Output + // ------------------------------------------------------------------------- + + private String dataElementId; + + public String getDataElementId() + { + return dataElementId; + } + + public void setDataElementId( String dataElementId ) + { + this.dataElementId = dataElementId; + } + + private DataElement dataElement; + + public DataElement getDataElement() + { + return dataElement; + } + + // ------------------------------------------------------------------------- + // Action Implementation + // ------------------------------------------------------------------------- + + public String execute() throws Exception + { + dataElement = dataElementService.getDataElement( Integer.parseInt( dataElementId ) ); + + return SUCCESS; + } + +} === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/ShowUpdateUtilizationRateFormAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/ShowUpdateUtilizationRateFormAction.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/ShowUpdateUtilizationRateFormAction.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,89 @@ +package org.hisp.dhis.rbf.utilizationRuleManagement.action; + +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementService; +import org.hisp.dhis.rbf.api.UtilizationRate; +import org.hisp.dhis.rbf.api.UtilizationRateService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Mithilesh Kumar Thakur + */ +public class ShowUpdateUtilizationRateFormAction implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private UtilizationRateService utilizationRateService; + + public void setUtilizationRateService( UtilizationRateService utilizationRateService ) + { + this.utilizationRateService = utilizationRateService; + } + + private DataElementService dataElementService; + + public void setDataElementService( DataElementService dataElementService ) + { + this.dataElementService = dataElementService; + } + + // ------------------------------------------------------------------------- + // Input & output + // ------------------------------------------------------------------------- + + private String dataElementId; + + public void setDataElementId( String dataElementId ) + { + this.dataElementId = dataElementId; + } + + private String startRange; + + public void setStartRange( String startRange ) + { + this.startRange = startRange; + } + + private String endRange; + + public void setEndRange( String endRange ) + { + this.endRange = endRange; + } + + private UtilizationRate utilizationRate; + + public UtilizationRate getUtilizationRate() + { + return utilizationRate; + } + + private DataElement dataElement; + + public DataElement getDataElement() + { + return dataElement; + } + + // ------------------------------------------------------------------------- + // Action + // ------------------------------------------------------------------------- + + public String execute() throws Exception + { + dataElement = dataElementService.getDataElement( Integer.parseInt( dataElementId ) ); + + if( dataElement != null ) + { + utilizationRate = utilizationRateService.getUtilizationRate( dataElement, Double.parseDouble( startRange ), Double.parseDouble( endRange ) ); + } + + return SUCCESS; + } + +} + === added file 'local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/UpdateUtilizationRateAction.java' --- local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/UpdateUtilizationRateAction.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/java/org/hisp/dhis/rbf/utilizationRuleManagement/action/UpdateUtilizationRateAction.java 2014-06-20 10:21:56 +0000 @@ -0,0 +1,116 @@ +package org.hisp.dhis.rbf.utilizationRuleManagement.action; + +import java.util.Date; + +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementService; +import org.hisp.dhis.rbf.api.UtilizationRate; +import org.hisp.dhis.rbf.api.UtilizationRateService; +import org.hisp.dhis.user.CurrentUserService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Mithilesh Kumar Thakur + */ +public class UpdateUtilizationRateAction implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private UtilizationRateService utilizationRateService; + + public void setUtilizationRateService( UtilizationRateService utilizationRateService ) + { + this.utilizationRateService = utilizationRateService; + } + + private DataElementService dataElementService; + + public void setDataElementService( DataElementService dataElementService ) + { + this.dataElementService = dataElementService; + } + + private CurrentUserService currentUserService; + + public void setCurrentUserService( CurrentUserService currentUserService ) + { + this.currentUserService = currentUserService; + } + + // ------------------------------------------------------------------------- + // Input & output + // ------------------------------------------------------------------------- + + private String dataElementId; + + public void setDataElementId( String dataElementId ) + { + this.dataElementId = dataElementId; + } + + private String startRange; + + public void setStartRange( String startRange ) + { + this.startRange = startRange; + } + + private String endRange; + + public void setEndRange( String endRange ) + { + this.endRange = endRange; + } + + private String tariff; + + public void setTariff( String tariff ) + { + this.tariff = tariff; + } + // ------------------------------------------------------------------------- + // Action + // ------------------------------------------------------------------------- + + + public String execute() throws Exception + { + DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( dataElementId ) ); + + if( dataElement != null ) + { + UtilizationRate utilizationRate = utilizationRateService.getUtilizationRate( dataElement, Double.parseDouble( startRange ), Double.parseDouble( endRange ) ); + + if( utilizationRate != null ) + { + //System.out.println( dataElement.getId() + " : " + Double.parseDouble( startRange ) + " : " + Double.parseDouble( endRange ) ); + + utilizationRate.setDataElement( dataElement ); + utilizationRate.setStartRange( Double.parseDouble( startRange ) ); + utilizationRate.setEndRange( Double.parseDouble( endRange ) ); + utilizationRate.setTariff( Double.parseDouble( tariff ) ); + + String storedBy = currentUserService.getCurrentUsername(); + + Date now = new Date(); + + if ( storedBy == null ) + { + storedBy = "[unknown]"; + } + + utilizationRate.setStoredBy( storedBy ); + utilizationRate.setTimestamp( now ); + + utilizationRateService.updateUtilizationRate( utilizationRate ); + } + + } + + return SUCCESS; + } + +} === modified file 'local/in/dhis-web-maintenance-rbf/src/main/resources/META-INF/dhis/beans.xml' --- local/in/dhis-web-maintenance-rbf/src/main/resources/META-INF/dhis/beans.xml 2014-06-02 11:30:23 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/resources/META-INF/dhis/beans.xml 2014-06-20 10:21:56 +0000 @@ -59,6 +59,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -155,7 +177,6 @@ - @@ -167,6 +188,7 @@ + @@ -465,7 +487,66 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file === modified file 'local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/PBFDataValue.hbm.xml' --- local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/PBFDataValue.hbm.xml 2014-04-26 11:27:06 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/PBFDataValue.hbm.xml 2014-06-20 10:21:56 +0000 @@ -17,6 +17,8 @@ + + === added file 'local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/UtilizationRate.hbm.xml' --- local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/UtilizationRate.hbm.xml 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/hibernate/UtilizationRate.hbm.xml 2014-06-20 10:21:56 +0000 @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file === modified file 'local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/i18n_module.properties' --- local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/i18n_module.properties 2014-06-02 11:30:23 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/resources/org/hisp/dhis/rbf/i18n_module.properties 2014-06-20 10:21:56 +0000 @@ -16,7 +16,7 @@ later_periods = Later periods select = Select period = Period -dataelement = Data Element +dataelement = DataElement total = Total qty_reported = Quantity Reported qty_validated = Quantity Validated @@ -84,4 +84,11 @@ pbf_report_management = PBF Report Management report = Report outputFormat = Output Format -generate = Generate \ No newline at end of file +generate = Generate + + + +utilization_rule_management = Utilization Rule Management +select_dataElement = Select DataElement +confirm_delete_utilization_rate_reule = Are you sure you want to delete Utilization Rule Rate +qty_external_verification = Quantity External Verification \ No newline at end of file === modified file 'local/in/dhis-web-maintenance-rbf/src/main/resources/struts.xml' --- local/in/dhis-web-maintenance-rbf/src/main/resources/struts.xml 2014-06-02 11:30:23 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/resources/struts.xml 2014-06-20 10:21:56 +0000 @@ -110,7 +110,12 @@ - + + + /content.vm + /dhis-web-maintenance-rbf/loadDataEntryForm.vm + F_QUANTITY_EXTERNAL_VERIFICATION + @@ -403,8 +408,54 @@ - - + + + + + /main.vm + /dhis-web-maintenance-rbf/utilizationRuleDataElements.vm + javascript/utilizationRule.js + /dhis-web-maintenance-rbf/menu.vm + + + + + + /content.vm + /dhis-web-maintenance-rbf/utilizationRateList.vm + + + + + + /content.vm + /dhis-web-maintenance-rbf/addUtilizationRateForm.vm + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + + + + /content.vm + /dhis-web-maintenance-rbf/updateUtilizationRateForm.vm + + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + /dhis-web-commons/ajax/jsonResponseError.vm + + \ No newline at end of file === added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/addUtilizationRateForm.vm' --- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/addUtilizationRateForm.vm 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/addUtilizationRateForm.vm 2014-06-20 10:21:56 +0000 @@ -0,0 +1,78 @@ +## Macro for generating the jQuery validation rules +#macro( validate $type $require ) + #if( $type == "NUMBER" ) + {validate:{ number:true #if($require), required:true #end }} + #elseif( $require ) + {validate:{required:true}} + #end +#end + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
$i18n.getString( "Utilization Rule Details" ) : $dataElement.name
  
  
  
+ + +
+
=== modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/dataEntrySelection.vm' --- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/dataEntrySelection.vm 2014-04-26 11:27:06 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/dataEntrySelection.vm 2014-06-20 10:21:56 +0000 @@ -1,4 +1,4 @@ -

$i18n.getString( "pbf_dataentry" )

@@ -27,7 +86,7 @@ -
+
@@ -44,6 +103,7 @@ #end + @@ -56,8 +116,11 @@ - + + + +
=== added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/images/ajax-loader.gif' Binary files local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/images/ajax-loader.gif 1970-01-01 00:00:00 +0000 and local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/images/ajax-loader.gif 2014-06-20 10:21:56 +0000 differ === added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/images/deleteRed.png' Binary files local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/images/deleteRed.png 1970-01-01 00:00:00 +0000 and local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/images/deleteRed.png 2014-06-20 10:21:56 +0000 differ === modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/pbfDataEntry.js' --- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/pbfDataEntry.js 2014-05-08 11:03:37 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/pbfDataEntry.js 2014-06-20 10:21:56 +0000 @@ -163,11 +163,16 @@ { valueId = "pbfdv_qty_reported_"+dataElementId; } - else + else if( valueType == 2 ) { valueId = "pbfdv_qty_validated_"+dataElementId; } + else + { + valueId = "pbfdv_qty_external_verification_"+dataElementId; + } + var tariffValueId = "pbfdv_tariff_amt_"+dataElementId; var tariffAmt = document.getElementById( tariffValueId ).value; @@ -298,16 +303,3 @@ } ); } - - - - - - - - - - - - - === added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/utilizationRule.js' --- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/utilizationRule.js 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/javascript/utilizationRule.js 2014-06-20 10:21:56 +0000 @@ -0,0 +1,187 @@ + +window.onload=function(){ + + jQuery('#addUpdateUtilizationRateDiv').dialog({autoOpen: false}); +} + + +function loadUtilizationRate() +{ + $( '#utilizationRateListDiv' ).html(''); + + var dataElementId = $( '#dataElementId' ).val(); + + if ( dataElementId == "-1" ) + { + $( '#utilizationRateListDiv' ).html(''); + showWarningMessage( "Please Select DataElement" ); + return false; + } + + else + { + document.getElementById('overlayUtilization').style.visibility = 'visible'; + jQuery('#utilizationRateListDiv').load('getUtilizationRateList.action', + { + dataElementId:dataElementId + }, function() + { + showById('utilizationRateListDiv'); + document.getElementById('overlayUtilization').style.visibility = 'hidden'; + }); + } +} + + +function showAddUtilizationRateForm() +{ + var dataElementId = $( '#dataElementId' ).val(); + + if ( dataElementId == "-1" ) + { + showWarningMessage( "Please Select DataElement" ); + return false; + } + + else + { + //var url = "showAddUtilizationRateForm.action?dataElementId=" + dataElementId; + //window.location.href = url; + + + jQuery('#addUpdateUtilizationRateDiv').dialog('destroy').remove(); + jQuery('
' ).load( 'showAddUtilizationRateForm.action?dataElementId='+ dataElementId ).dialog({ + title: 'Add Utilization Rule', + maximize: true, + closable: true, + modal:true, + overlay:{background:'#000000', opacity:0.1}, + width: 450, + height: 300 + }); + + } +} + +function addUtilizationRate() +{ + $.ajax({ + type: "POST", + url: 'addUtilizationRate.action', + data: getParamsForDiv('addUpdateUtilizationRateDiv'), + success: function(json) { + var type = json.response; + + jQuery('#addUpdateUtilizationRateDiv').dialog('destroy').remove(); + loadUtilizationRate(); + + } + }); +} + + +function closePopUpWindow() +{ + jQuery('#addUpdateUtilizationRateDiv').dialog('destroy').remove(); +} + + +function showUpdateutilizationRateForm( startRange, endRange, dataElementId ) +{ + var dataElementId = $( '#dataElementId' ).val(); + + if ( dataElementId == "-1" ) + { + showWarningMessage( "Please Select DataElement" ); + return false; + } + + else + { + //var url = "showAddUtilizationRateForm.action?dataElementId=" + dataElementId; + //window.location.href = url; + + + jQuery('#addUpdateUtilizationRateDiv').dialog('destroy').remove(); + jQuery('
' ).load( 'showUpdateUtilizationRateForm.action?dataElementId='+ dataElementId + "&startRange=" + startRange + "&endRange=" + endRange ).dialog({ + title: 'Update Utilization Rule', + maximize: true, + closable: true, + modal:true, + overlay:{background:'#000000', opacity:0.1}, + width: 450, + height: 300 + }); + + } +} + + +function updateUtilizationRate() +{ + $.ajax({ + type: "POST", + url: 'updateUtilizationRate.action', + data: getParamsForDiv('addUpdateUtilizationRateDiv'), + success: function(json) { + var type = json.response; + + jQuery('#addUpdateUtilizationRateDiv').dialog('destroy').remove(); + loadUtilizationRate(); + + } + }); +} + + +function getParamsForDiv( equipmentDiv ) +{ + var params = ''; + + jQuery("#" + equipmentDiv + " :input").each(function() + { + var elementId = $(this).attr('id'); + + if( $(this).attr('type') == 'checkbox' ) + { + var checked = jQuery(this).attr('checked') ? true : false; + params += elementId + "=" + checked + "&"; + } + else if( $(this).attr('type') != 'button' ) + { + var value = ""; + if( jQuery(this).val() != '' ) + { + value = htmlEncode(jQuery(this).val()); + } + params += elementId + "="+ value + "&"; + } + + }); + + //alert( params ); + + return params; +} + + +function removeutilizationRate( startRange, endRange, dataElementId ) +{ + var result = window.confirm( i18n_confirm_delete ); + + if ( result ) + { + $.ajax({ + type: "POST", + url: 'removeUtilizationRate.action?dataElementId='+ dataElementId + "&startRange=" + startRange + "&endRange=" + endRange, + success: function( json ) { + + loadUtilizationRate(); + } + }); + } +} + + + + === modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm' --- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm 2014-04-30 05:26:01 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/loadDataEntryForm.vm 2014-06-20 10:21:56 +0000 @@ -1,4 +1,18 @@ + + ## Macro for generating the jQuery validation rules @@ -21,6 +35,13 @@ #end #end + + + #set( $tabIndex = 1 ) #if ( $dataElements.size() > 0) @@ -31,6 +52,7 @@ #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") ) $i18n.getString( "qty_validated" ) + $i18n.getString( "qty_external_verification" ) $i18n.getString( "tariff_amount" ) $i18n.getString( "total" ) #end @@ -52,23 +74,23 @@ #set( $pbfDataValue = $!pbfDataValueMap.get( $dataElement ) ) - #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") ) + #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") || $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") ) - + + + + + + + #end + + - #end - #set( $count = $count + 1) #set( $tabIndex = $tabIndex + 1 ) #set( $mark = !$mark) #end - #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") ) + #if( $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityValidated") || $auth.hasAccess( "dhis-web-maintenance-rbf", "quanitityExternalVerification") )         - +   + #end - + + + getUtilizationRateTariffValue(); + === modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/menu.vm' --- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/menu.vm 2014-06-02 11:30:23 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/menu.vm 2014-06-20 10:21:56 +0000 @@ -9,7 +9,10 @@
  • $i18n.getString( "dataelement_tariff_target_management" )
  • -
  • $i18n.getString( "bank_details_management" )
  • +
  • $i18n.getString( "bank_details_management" )
  • + +
  • $i18n.getString( "utilization_rule_management" )
  • +

    $i18n.getString( "quality_score_payment" )

    @@ -17,7 +20,6 @@
  • $i18n.getString( "quality_score_payment" )
  • -

    $i18n.getString( "aggregation_builder" )

    #end + \ No newline at end of file === modified file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/pbfReportForm.vm' --- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/pbfReportForm.vm 2014-06-02 11:30:23 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/pbfReportForm.vm 2014-06-20 10:21:56 +0000 @@ -1,6 +1,17 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    $i18n.getString( "Utilization Rule Details" ) : $dataElement.name
      
      
      
    + + +
    +
    === added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/utilizationRateList.vm' --- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/utilizationRateList.vm 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/utilizationRateList.vm 2014-06-20 10:21:56 +0000 @@ -0,0 +1,53 @@ + + + + + + + +
    + + + + + + + + + + + + + + + + + + + #set( $count=1 ) + #foreach( $utilizationRate in $utilizationRateList ) + + + + + + + + + + + #set($count = $count + 1) + #end + +
    #$i18n.getString( "stare_range" )$i18n.getString( "end_range" )$i18n.getString( "Tariff Value" )$i18n.getString( "operations" )
    + $count + $encoder.htmlEncode( $!utilizationRate.getStartRange() )$encoder.htmlEncode( $!utilizationRate.getEndRange() )$encoder.htmlEncode( $!utilizationRate.getTariff() ) + $i18n.getString( "edit" ) + $i18n.getString( "remove" ) +
    +
    \ No newline at end of file === added file 'local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/utilizationRuleDataElements.vm' --- local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/utilizationRuleDataElements.vm 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-maintenance-rbf/src/main/webapp/dhis-web-maintenance-rbf/utilizationRuleDataElements.vm 2014-06-20 10:21:56 +0000 @@ -0,0 +1,57 @@ + +
    +
    +
    + + + +

    Utilization Rate Rules Management

    + + + + + + + + + +
    + + + +
    + + +#parse( "/dhis-web-commons/loader/loader.vm" ) +
    +
    + +