← Back to team overview

dhis2-devs team mailing list archive

[Merge] lp:~sis-ma/dhis2/SISMA-33 into lp:dhis2

 

Leandro Soares has proposed merging lp:~sis-ma/dhis2/SISMA-33 into lp:dhis2.

Requested reviews:
  Lars Helge Øverland (larshelge)

For more details, see:
https://code.launchpad.net/~sis-ma/dhis2/SISMA-33/+merge/179713

Changes were made on top of branch 2.12 source code, on file forms.js from module web-data-entry.

This new feature enables users to view offline inserted data while in temporarily offline mode.

-- 
The attached diff has been truncated due to its size.
https://code.launchpad.net/~sis-ma/dhis2/SISMA-33/+merge/179713
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/aggregation/AggregatedDataValueService.java'
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/aggregation/AggregatedDataValueStore.java'
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java	2013-07-05 07:05:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java	2013-08-12 14:01:06 +0000
@@ -99,6 +99,7 @@
         + OBJECT_PATIENT_ATTRIBUTE + "|" + OBJECT_PATIENT_PROPERTY + "|" + OBJECT_PROGRAM_PROPERTY + ")"
         + SEPARATOR_OBJECT + "([a-zA-Z0-9@#\\- ]+[" + SEPARATOR_ID + "[a-zA-Z0-9]*]*)" + "\\]";
 
+<<<<<<< TREE
     public static final String dataelementRegExp = MINUS_OPERATOR + "{1}\\s*\\(\\s*(\\["
         + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([0-9]+" + SEPARATOR_ID + "[0-9]+" + SEPARATOR_ID
         + "[0-9]+)+\\])\\s*(,)+\\s*(" + OBJECT_PROGRAM_PROPERTY_INCIDENT_DATE + "|"
@@ -108,6 +109,12 @@
         + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([0-9]+" + SEPARATOR_ID + "[0-9]+" + SEPARATOR_ID
         + "[0-9]+)+\\])\\s*(,)\\s*(\\[" + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([0-9]+"
         + SEPARATOR_ID + "[0-9]+" + SEPARATOR_ID + "[0-9]+)+\\])\\s*\\)\\s*(>=|<=|!=|>|<|=){1}\\s*([0-9]+)";
+=======
+    public static final String dataelementRegExp = MINUS_OPERATOR + "{1}\\s*\\(\\s*(\\["
+        + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([0-9]+" + SEPARATOR_ID + "[0-9]+" + SEPARATOR_ID
+        + "[0-9]+)+\\])\\s*(,)+\\s*(" + OBJECT_PROGRAM_PROPERTY_INCIDENT_DATE + "|"
+        + OBJECT_PROGRAM_PROPERTY_REPORT_DATE_DATE + "|" + OBJECT_PROGRAM_PROPERTY_ENROLLEMENT_DATE + ")+\\s*\\)\\s*";
+>>>>>>> MERGE-SOURCE
 
     // -------------------------------------------------------------------------
     // Fields

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java'
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObjectUtils.java'
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java	2013-07-08 09:42:17 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java	2013-08-12 14:01:06 +0000
@@ -71,7 +71,7 @@
     public static final String TYPE_SECTION_MULTIORG = "multiorg_section";
 
     public static final int NO_EXPIRY = 0;
-
+    
     /**
      * Determines if a de-serialized file is compatible with this class.
      */

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/ReportService.java'
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
=== modified file 'dhis-2/dhis-dxf2/pom.xml'
--- dhis-2/dhis-dxf2/pom.xml	2013-07-16 14:06:13 +0000
+++ dhis-2/dhis-dxf2/pom.xml	2013-08-12 14:01:06 +0000
@@ -45,6 +45,7 @@
       <artifactId>dhis-support-xml</artifactId>
     </dependency>
     <dependency>
+<<<<<<< TREE
       <groupId>net.sourceforge.javacsv</groupId>
       <artifactId>javacsv</artifactId>
     </dependency>
@@ -52,6 +53,11 @@
       <groupId>com.lowagie</groupId>
       <artifactId>itext</artifactId>
     </dependency>
+=======
+      <groupId>net.sourceforge.javacsv</groupId>
+      <artifactId>javacsv</artifactId>
+    </dependency>
+>>>>>>> MERGE-SOURCE
     <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
       <artifactId>jackson-core</artifactId>

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java'
=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/DefaultPdfDataEntryFormService.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/DefaultPdfDataEntryFormService.java	2013-07-13 04:26:58 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/DefaultPdfDataEntryFormService.java	2013-08-12 14:01:06 +0000
@@ -182,11 +182,19 @@
             document.add( mainTable );
 
 
+<<<<<<< TREE
             document.add( Chunk.NEWLINE );             
             document.add( Chunk.NEWLINE );
             
             insertSaveAsButton( document, writer, PdfDataEntryFormUtil.LABELCODE_BUTTON_SAVEAS, dataSet.getDisplayName() );
              
+=======
+            //document.add( Chunk.NEWLINE );             
+            //document.add( Chunk.NEWLINE );
+            
+            //insertSaveAsButton( document, writer, PdfDataEntryFormUtil.LABELCODE_BUTTON_SAVEAS, dataSet.getDisplayName() );
+             
+>>>>>>> MERGE-SOURCE
         }
     }
 

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/PdfDataEntryFormUtil.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/PdfDataEntryFormUtil.java	2013-07-16 14:06:13 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/PdfDataEntryFormUtil.java	2013-08-12 14:01:06 +0000
@@ -50,9 +50,16 @@
 import com.lowagie.text.pdf.PdfPCell;
 import com.lowagie.text.pdf.PdfReader;
 
-/**
- * @author James Chang
- */
+<<<<<<< TREE
+/**
+ * @author James Chang
+ */
+=======
+/**
+ * @author James Chang
+ */
+
+>>>>>>> MERGE-SOURCE
 public class PdfDataEntryFormUtil
 {
     public static final int DATATYPE_DATASET = 0;
@@ -144,7 +151,16 @@
         }
     }
 
-    public static PdfPCell getPdfPCell( boolean hasBorder )
+<<<<<<< TREE
+    public static PdfPCell getPdfPCell( boolean hasBorder )
+=======
+//  public static PdfPCell getPdfPCell( float minHeight )
+//  {
+//      return getPdfPCell( minHeight, CELL_COLUMN_TYPE_LABEL );
+//  }
+
+    public static PdfPCell getPdfPCell( boolean hasBorder )
+>>>>>>> MERGE-SOURCE
     {
         return getPdfPCell( CELL_MIN_HEIGHT_DEFAULT, CELL_COLUMN_TYPE_ENTRYFIELD, hasBorder );
     }

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/PdfFieldCell.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/PdfFieldCell.java	2013-07-16 14:06:13 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/PdfFieldCell.java	2013-08-12 14:01:06 +0000
@@ -27,6 +27,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.Locale;
+
 import com.lowagie.text.Element;
 import com.lowagie.text.Phrase;
 import com.lowagie.text.Rectangle;

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java'
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2013-08-09 14:10:43 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2013-08-12 14:01:06 +0000
@@ -177,6 +177,9 @@
 
     @Autowired
     private CurrentUserService currentUserService;
+    
+    @Autowired
+    private DataElementOperandService operandService;
 
     public void setCurrentUserService( CurrentUserService currentUserService )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/DefaultAggregatedDataValueService.java'
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/jdbc/JdbcAggregatedDataValueStore.java'
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultDimensionService.java'
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java'
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitLevelStore.java'
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2013-08-05 08:23:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2013-08-12 14:01:06 +0000
@@ -620,11 +620,17 @@
         executeSql( "ALTER TABLE dataelement ALTER COLUMN domaintype SET NOT NULL" );
         executeSql( "update dataelementcategory set datadimension = false where datadimension is null" );
         
+<<<<<<< TREE
         executeSql( "alter table validationrulegroup rename column validationgroupid to validationrulegroupid" );
         executeSql( "alter table sqlview rename column viewid to sqlviewid" );
 
         executeSql( "UPDATE optionset SET version=1 WHERE version IS NULL" );
 
+=======
+        executeSql( "alter table validationrulegroup rename column validationgroupid to validationrulegroupid" );
+        executeSql( "alter table sqlview rename column viewid to sqlviewid" );
+        
+>>>>>>> MERGE-SOURCE
         log.info( "Tables updated" );
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/pom.xml'
=== added file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMap.java.OTHER'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMap.java.OTHER	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMap.java.OTHER	2013-08-12 14:01:06 +0000
@@ -0,0 +1,296 @@
+package org.hisp.dhis.mapgeneration;
+
+/*
+ * Copyright (c) 2004-2012, 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.
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.geotools.data.DataUtilities;
+import org.geotools.data.simple.SimpleFeatureCollection;
+import org.geotools.feature.FeatureCollections;
+import org.geotools.feature.SchemaException;
+import org.geotools.feature.simple.SimpleFeatureBuilder;
+import org.geotools.geometry.jts.ReferencedEnvelope;
+import org.geotools.map.FeatureLayer;
+import org.geotools.map.Layer;
+import org.geotools.map.MapContent;
+import org.geotools.renderer.GTRenderer;
+import org.geotools.renderer.lite.StreamingRenderer;
+import org.geotools.styling.SLD;
+import org.geotools.styling.Style;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.MultiPolygon;
+import com.vividsolutions.jts.geom.Point;
+import com.vividsolutions.jts.geom.Polygon;
+
+/**
+ * This class can be used to render map objects onto a map image. The projection
+ * is transformed automatically to "EPSG 3785".
+ * 
+ * @author Kjetil Andresen <kjetand@xxxxxxxxxx>
+ * @author Olai Solheim <olais@xxxxxxxxxx>
+ */
+public class GeoToolsMap
+    extends InternalMap
+{
+    // The flat list of map objects in this map.
+    private List<GeoToolsMapObject> mapObjects;
+
+    /**
+     * Creates an empty map.
+     */
+    public GeoToolsMap()
+    {
+        this.mapObjects = new LinkedList<GeoToolsMapObject>();
+    }
+
+    /**
+     * Creates a map with the given initial map layer.
+     * 
+     * @param layer the initial map layer
+     */
+    public GeoToolsMap( InternalMapLayer layer )
+    {
+        this.mapObjects = new LinkedList<GeoToolsMapObject>();
+        this.addMapLayer( layer );
+    }
+
+    /**
+     * Creates a map with the given initial map layers.
+     * 
+     * @param layers the list of initial map layers
+     */
+    public GeoToolsMap( List<InternalMapLayer> layers )
+    {
+        this.mapObjects = new LinkedList<GeoToolsMapObject>();
+        this.addAllMapLayers( layers );
+    }
+
+    /**
+     * Adds a map object to this map.
+     * 
+     * @param mapObject the map object
+     */
+    public void addMapObject( GeoToolsMapObject mapObject )
+    {
+        this.mapObjects.add( mapObject );
+    }
+
+    /**
+     * Adds all map objects contained in the list.
+     * 
+     * @param mapObjects the list of map objects
+     */
+    public void addMapObjects( List<GeoToolsMapObject> mapObjects )
+    {
+        this.mapObjects.addAll( mapObjects );
+    }
+
+    // -------------------------------------------------------------------------
+    // InternalMap implementation
+    // -------------------------------------------------------------------------
+
+    public void addMapLayer( InternalMapLayer layer )
+    {
+        for ( InternalMapObject mapObject : layer.getAllMapObjects() )
+        {
+            this.addMapObject( (GeoToolsMapObject) mapObject );
+        }
+    }
+
+    public void addAllMapLayers( List<InternalMapLayer> layers )
+    {
+        for ( InternalMapLayer layer : layers )
+        {
+            for ( InternalMapObject mapObject : layer.getAllMapObjects() )
+            {
+                this.addMapObject( (GeoToolsMapObject) mapObject );
+            }
+        }
+    }
+
+    public BufferedImage render()
+    {
+        return render( DEFAULT_MAP_WIDTH );
+    }
+
+    public BufferedImage render( int imageWidth )
+    {
+        MapContent map = new MapContent();
+
+        // Convert map objects to features, and add them to the map
+        for ( GeoToolsMapObject mapObject : mapObjects )
+        {
+            try
+            {
+                map.addLayer( createFeatureLayerFromMapObject( mapObject ) );
+            }
+            catch ( SchemaException ex )
+            {
+                throw new RuntimeException( "Could not add map object: " + mapObject.toString() + ": " + ex.getMessage() );
+            }
+        }
+
+        // Create a renderer for this map
+        GTRenderer renderer = new StreamingRenderer();
+        renderer.setMapContent( map );
+
+        // Calculate image height
+        // TODO Might want to add a margin of say 25 pixels surrounding the map
+        ReferencedEnvelope mapBounds = map.getMaxBounds();
+        double imageHeightFactor = mapBounds.getSpan( 1 ) / mapBounds.getSpan( 0 );
+        Rectangle imageBounds = new Rectangle( 0, 0, imageWidth, (int) Math.ceil( imageWidth * imageHeightFactor ) );
+
+        // Create an image and get the graphics context from it
+        BufferedImage image = new BufferedImage( imageBounds.width, imageBounds.height, BufferedImage.TYPE_INT_ARGB );
+        Graphics2D g = (Graphics2D) image.getGraphics();
+
+        // Draw a background if the background color is specified
+        // NOTE It will be transparent otherwise, which is desired
+        if ( backgroundColor != null )
+        {
+            g.setColor( backgroundColor );
+            g.fill( imageBounds );
+        }
+
+        // Enable anti-aliasing if specified
+        if ( isAntiAliasingEnabled )
+        {
+            g.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
+        }
+        else
+        {
+            g.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );
+        }
+
+        // Render the map
+        renderer.paint( g, imageBounds, mapBounds );
+
+        map.dispose();
+        
+        return image;
+    }
+
+    // -------------------------------------------------------------------------
+    // Internal
+    // -------------------------------------------------------------------------
+
+    /**
+     * Creates a feature layer based on a map object.
+     */
+    private Layer createFeatureLayerFromMapObject( GeoToolsMapObject mapObject )
+        throws SchemaException
+    {
+        SimpleFeatureType featureType;
+        SimpleFeatureBuilder featureBuilder;
+        SimpleFeature feature;
+        SimpleFeatureCollection featureCollection;
+        Style style = null;
+
+        featureType = createFeatureType( mapObject.getGeometry() );
+        featureBuilder = new SimpleFeatureBuilder( featureType );
+        featureBuilder.add( mapObject.getGeometry() );
+        feature = featureBuilder.buildFeature( null );
+
+        featureCollection = FeatureCollections.newCollection();
+        featureCollection.add( feature );
+
+        // Create style for this map object
+        if ( mapObject.getGeometry() instanceof Point )
+        {
+            style = SLD.createPointStyle( "Circle", mapObject.getStrokeColor(), mapObject.getFillColor(),
+                mapObject.getFillOpacity(), mapObject.getRadius() );
+        }
+        else if ( mapObject.getGeometry() instanceof Polygon || mapObject.getGeometry() instanceof MultiPolygon )
+        {
+            style = SLD.createPolygonStyle( mapObject.getStrokeColor(), mapObject.getFillColor(),
+                mapObject.getFillOpacity() );
+        }
+        else
+        {
+            style = SLD.createSimpleStyle( featureType );
+        }
+
+        return new FeatureLayer( featureCollection, style );
+    }
+
+    /**
+     * Creates a feature type for a GeoTools geometric primitive.
+     */
+    private SimpleFeatureType createFeatureType( Geometry geom )
+        throws SchemaException
+    {
+        String type = "";
+
+        if ( geom instanceof Point )
+        {
+            type = "Point";
+        }
+        else if ( geom instanceof Polygon )
+        {
+            type = "Polygon";
+        }
+        else if ( geom instanceof MultiPolygon )
+        {
+            type = "MultiPolygon";
+        }
+        else
+        {
+            throw new IllegalArgumentException();
+        }
+
+        return DataUtilities.createType( "geometries", "geometry:" + type + ":srid=3785" );
+    }
+
+    /**
+     * Creates an image with text indicating an error.
+     */
+    @SuppressWarnings( "unused" )
+    private BufferedImage createErrorImage( String error )
+    {
+        String str = "Error creating map image: " + error;
+        BufferedImage image = new BufferedImage( 500, 25, BufferedImage.TYPE_INT_RGB );
+        Graphics2D g = (Graphics2D) image.createGraphics();
+
+        g.setColor( Color.WHITE );
+        g.fill( new Rectangle( 500, 25 ) );
+
+        g.setColor( Color.RED );
+        g.drawString( str, 1, 12 );
+
+        return image;
+    }
+}

=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java	2013-08-07 14:42:55 +0000
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java	2013-08-12 14:01:06 +0000
@@ -34,8 +34,12 @@
 import java.awt.image.BufferedImage;
 import java.util.ArrayList;
 import java.util.Collection;
+<<<<<<< TREE
 import java.util.HashMap;
 import java.util.List;
+=======
+import java.util.List;
+>>>>>>> MERGE-SOURCE
 
 import org.apache.commons.lang.StringUtils;
 import org.hisp.dhis.analytics.AnalyticsService;
@@ -156,13 +160,18 @@
 
     private InternalMapLayer getSingleInternalMapLayer( MapView mapView )
     {
+<<<<<<< TREE
         if ( mapView == null || mapView.getPeriod() == null || mapView.getParentOrganisationUnit() == null )
         {
             return null;
         }
+=======
+        Assert.isTrue( mapView != null );
+>>>>>>> MERGE-SOURCE
 
         boolean isIndicator = MapView.VALUE_TYPE_INDICATOR.equals( mapView.getValueType() );
 
+<<<<<<< TREE
         List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>( organisationUnitService.
             getOrganisationUnitsAtLevel( mapView.getOrganisationUnitLevel().getLevel(), mapView.getParentOrganisationUnit() ) );
 
@@ -180,6 +189,43 @@
         Collection<MapValue> mapValues = getMapValues( grid );
         
         if ( mapValues.isEmpty() )
+=======
+        List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>( organisationUnitService.
+            getOrganisationUnitsAtLevel( mapView.getOrganisationUnitLevel().getLevel(), mapView.getParentOrganisationUnit() ) );
+
+        DataQueryParams params = new DataQueryParams();
+        
+        if ( mapView.getIndicator() != null )
+        {
+            params.setIndicators( getList( mapView.getIndicator() ) );
+        }
+        else if ( mapView.getDataElement() != null )
+        {
+            params.setDataElements( getList( mapView.getDataElement() ) );
+        }
+        
+        //TODO operands
+
+        params.setOrganisationUnits( organisationUnits );
+        params.setFilterPeriods( getList( mapView.getPeriod() ) );
+        
+        Grid grid = analyticsService.getAggregatedDataValues( params );
+        
+        Collection<MapValue> mapValues = new ArrayList<MapValue>();
+
+        for ( List<Object> row : grid.getRows() )
+        {
+            if ( row != null && row.size() >= 3 )
+            {
+                String ou = (String) row.get( 1 );
+                Double value = (Double) row.get( 2 );
+                
+                mapValues.add( new MapValue( ou, value ) );
+            }
+        }
+                
+        if ( mapValues.isEmpty() )
+>>>>>>> MERGE-SOURCE
         {
             return null;
         }
@@ -226,7 +272,11 @@
         for ( MapValue mapValue : mapValues )
         {
             // Get the org unit for this map value
+<<<<<<< TREE
             OrganisationUnit orgUnit = uidOuMap.get( mapValue.getOu() );
+=======
+            OrganisationUnit orgUnit = organisationUnitService.getOrganisationUnit( mapValue.getOu() );
+>>>>>>> MERGE-SOURCE
             
             if ( orgUnit != null && orgUnit.hasCoordinates() && orgUnit.hasFeatureType() )
             {
@@ -249,6 +299,7 @@
         return mapLayer;
     }
 
+<<<<<<< TREE
     /**
      * Creates a Grid with aggregated data.
      */
@@ -296,6 +347,10 @@
     
     private InternalMapObject buildSingleGeoToolsMapObjectForMapLayer( InternalMapLayer mapLayer,
         double mapValue, OrganisationUnit orgUnit )
+=======
+    private GeoToolsMapObject buildSingleGeoToolsMapObjectForMapLayer( InternalMapLayer mapLayer,
+        double mapValue, OrganisationUnit orgUnit )
+>>>>>>> MERGE-SOURCE
     {
         // Create and setup an internal map object
         InternalMapObject mapObject = new InternalMapObject();

=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/MapValue.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/MapValue.java	2013-07-06 15:18:10 +0000
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/MapValue.java	2013-08-12 14:01:06 +0000
@@ -1,3 +1,4 @@
+<<<<<<< TREE
 package org.hisp.dhis.mapgeneration;
 
 /*
@@ -59,3 +60,39 @@
         this.value = value;
     }
 }
+=======
+package org.hisp.dhis.mapgeneration;
+
+public class MapValue
+{
+    private String ou;
+    
+    private double value;
+
+    public MapValue( String ou, double value )
+    {
+        this.ou = ou;
+        this.value = value;
+    }
+
+    public String getOu()
+    {
+        return ou;
+    }
+
+    public void setOu( String ou )
+    {
+        this.ou = ou;
+    }
+
+    public double getValue()
+    {
+        return value;
+    }
+
+    public void setValue( double value )
+    {
+        this.value = value;
+    }
+}
+>>>>>>> MERGE-SOURCE

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.java'
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java'
=== 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	2013-08-09 03:31:35 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2013-08-12 14:01:06 +0000
@@ -217,12 +217,16 @@
         executeSql( "ALTER TABLE program ALTER COLUMN dateofenrollmentdescription DROP NOT NULL");
         executeSql( "UPDATE program SET displayOnAllOrgunit=true where displayOnAllOrgunit is null" );
         executeSql( "UPDATE program SET useFormNameDataElement=true where useFormNameDataElement is null" );
+<<<<<<< TREE
         executeSql( "ALTER TABLE caseaggregationcondition ALTER COLUMN aggregationexpression TYPE varchar(1000)");
         executeSql( "update patientattribute set displayonvisitschedule = false where displayonvisitschedule is null");
         executeSql( "update program set useBirthDateAsIncidentDate = false where useBirthDateAsIncidentDate is null");
         executeSql( "update program set useBirthDateAsEnrollmentDate = false where useBirthDateAsEnrollmentDate is null");
         executeSql( "update program set selectEnrollmentDatesInFuture = true where selectEnrollmentDatesInFuture is null");
         executeSql( "update programstage set relatedPatient = false where relatedPatient is null");
+=======
+        executeSql( "ALTER TABLE caseaggregationcondition ALTER COLUMN aggregationexpression TYPE varchar(1000)");
+>>>>>>> MERGE-SOURCE
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java'
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2013-08-08 06:20:51 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2013-08-12 14:01:06 +0000
@@ -498,13 +498,22 @@
         }
 
         // Filter is only one orgunit
+<<<<<<< TREE
 
+=======
+        
+>>>>>>> MERGE-SOURCE
         if ( position == PatientAggregateReport.POSITION_ROW_PERIOD_COLUMN_DATA )
         {
             String orgunitName = organisationUnitService.getOrganisationUnit( orgunitIds.iterator().next() )
                 .getDisplayName();
+<<<<<<< TREE
 
             grid.setSubtitle( subTitle + i18n.getString( "orgunit" ) + ": " + orgunitName );
+=======
+            
+            grid.setSubtitle( subTitle + i18n.getString( "orgunit" ) + ": " + orgunitName );
+>>>>>>> MERGE-SOURCE
         }
         // Filter is only one period
         else if ( position == PatientAggregateReport.POSITION_ROW_ORGUNIT
@@ -525,8 +534,13 @@
                 String endDate = format.formatDate( period.getEndDate() );
                 periodName += startDate + " -> " + endDate;
             }
+<<<<<<< TREE
 
             grid.setSubtitle( subTitle + i18n.getString( "period" ) + ": " + periodName );
+=======
+            
+            grid.setSubtitle( subTitle + i18n.getString( "period" ) + ": " + periodName );
+>>>>>>> MERGE-SOURCE
         }
         else
         {
@@ -565,7 +579,7 @@
             {
                 filterDataDes = "; " + i18n.getString( "data_filter" ) + ": " + filterDataDes;
             }
-
+            
             subTitle += filterOrgunitDes + filterPeriodDes + filterDataDes;
             if ( subTitle.isEmpty() )
             {
@@ -576,7 +590,7 @@
                 grid.setSubtitle( subTitle );
             }
         }
-
+        
         // ---------------------------------------------------------------------
         // Get SQL and build grid
         // ---------------------------------------------------------------------
@@ -1283,14 +1297,20 @@
             }
         }
 
+<<<<<<< TREE
         sql = sql.substring( 0, sql.length() - 6 ) + " ) ";
 
         sql += " ORDER BY orgunit asc ";
+=======
+        sql = sql.substring( 0, sql.length() - 6 ) + " ) ";
+       
+        sql += " ORDER BY orgunit asc ";
+>>>>>>> MERGE-SOURCE
         if ( limit != null )
         {
             sql += "LIMIT " + limit;
         }
-
+        
         return sql;
     }
 
@@ -1374,6 +1394,7 @@
             }
         }
 
+<<<<<<< TREE
         sql = sql.substring( 0, sql.length() - 10 );
 
         if ( periods.size() > 1 )
@@ -1382,6 +1403,16 @@
             {
                 sql += " LIMIT " + limit;
             }
+=======
+        sql = sql.substring( 0, sql.length() - 10 );
+        
+        if( periods.size() > 1 )
+        
+        if ( limit != null )
+        {
+            sql += " LIMIT " + limit;
+        }
+>>>>>>> MERGE-SOURCE
 
         return sql;
     }
@@ -2243,8 +2274,13 @@
             for ( int i = 1; i <= cols; i++ )
             {
                 // meta column
+<<<<<<< TREE
                 if ( rs.getMetaData().getColumnType( i ) == Types.VARCHAR
                     || rs.getMetaData().getColumnType( i ) == Types.OTHER )
+=======
+                if ( rs.getMetaData().getColumnType( i ) == Types.VARCHAR 
+                    || rs.getMetaData().getColumnType( i ) == Types.OTHER )
+>>>>>>> MERGE-SOURCE
                 {
                     grid.addValue( rs.getObject( i ) );
                 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml'
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java'
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.java	2013-08-12 13:07:42 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.java	2013-08-12 14:01:06 +0000
@@ -81,10 +81,15 @@
 public class DefaultReportService
     implements ReportService
 {
+<<<<<<< TREE
     public static final String ORGUNIT_LEVEL_COLUMN_PREFIX = "idlevel";
     public static final String ORGUNIT_UID_LEVEL_COLUMN_PREFIX = "uidlevel";
 
     private static final Encoder ENCODER = new Encoder();
+=======
+    public static final String ORGUNIT_LEVEL_COLUMN_PREFIX = "idlevel";
+    public static final String ORGUNIT_UID_LEVEL_COLUMN_PREFIX = "uidlevel";
+>>>>>>> MERGE-SOURCE
     
     // -------------------------------------------------------------------------
     // Dependencies

=== added directory 'dhis-2/dhis-services/dhis-service-sms'
=== added directory 'dhis-2/dhis-services/dhis-service-sms/src'
=== added directory 'dhis-2/dhis-services/dhis-service-sms/src/main'
=== added directory 'dhis-2/dhis-services/dhis-service-sms/src/main/java'
=== added directory 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org'
=== added directory 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp'
=== added directory 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis'
=== added directory 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms'
=== added directory 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound'
=== added file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/SmsSender.java.OTHER'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/SmsSender.java.OTHER	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/SmsSender.java.OTHER	2013-08-12 14:01:06 +0000
@@ -0,0 +1,295 @@
+/*
+ * Copyright (c) 2004-2012, 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.sms.outbound;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.message.MessageSender;
+import org.hisp.dhis.sms.SmsServiceException;
+import org.hisp.dhis.sms.smslib.SmsLibService;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserService;
+import org.hisp.dhis.user.UserSetting;
+import org.hisp.dhis.user.UserSettingService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @author Nguyen Kim Lai
+ * 
+ * @version SmsSender.java 10:29:11 AM Apr 16, 2013 $
+ */
+public class SmsSender
+    implements MessageSender
+{
+    private static final Log log = LogFactory.getLog( SmsSender.class );
+
+    private static final char[] HEX_CHARS = "0123456789abcdef".toCharArray();
+
+    private static final int MAX_HEX_CHAR = 280;
+
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private CurrentUserService currentUserService;
+
+    public void setCurrentUserService( CurrentUserService currentUserService )
+    {
+        this.currentUserService = currentUserService;
+    }
+
+    private UserService userService;
+
+    public void setUserService( UserService userService )
+    {
+        this.userService = userService;
+    }
+
+    private OutboundSmsService outboundSmsService;
+
+    public void setOutboundSmsService( OutboundSmsService outboundSmsService )
+    {
+        this.outboundSmsService = outboundSmsService;
+    }
+
+    @Autowired
+    private OutboundSmsTransportService transportService;
+
+    /**
+     * Note this methods is invoked asynchronously.
+     */
+    // @Async
+    @Override
+    public String sendMessage( String subject, String text, User sender, Set<User> users, boolean forceSend )
+    {
+        if ( transportService == null || SmsLibService.gatewayMap == null || SmsLibService.gatewayMap.get( "bulk_gw" ) == null )
+        {
+            return null;
+        }
+        
+        String message = null;
+
+        Set<User> toSendList = new HashSet<User>();
+
+        String gatewayId = transportService.getDefaultGateway();
+        
+        if ( SmsLibService.gatewayMap.get( "bulk_gw" ).equals( gatewayId ) )
+        {
+            //bulk is limited in sending long SMS. to be continue....
+        }
+
+        if ( gatewayId != null && !gatewayId.trim().isEmpty() )
+        {
+            for ( User user : users )
+            {
+                if ( currentUserService.getCurrentUser() != null )
+                {
+                    if ( !currentUserService.getCurrentUser().equals( user ) )
+                    {
+                        if ( isQualifiedReceiver( user ) )
+                        {
+                            toSendList.add( user );
+                        }
+                    }
+                }
+                else if ( currentUserService.getCurrentUser() == null )
+                {
+                    if ( isQualifiedReceiver( user ) )
+                    {
+                        toSendList.add( user );
+                    }
+                }
+            }
+
+            Set<String> phoneNumbers = null;
+
+            if ( outboundSmsService != null || outboundSmsService.isEnabled() )
+            {
+                text = createMessage( subject, text, sender );
+
+                phoneNumbers = getRecipientsPhoneNumber( toSendList );
+
+                if ( !phoneNumbers.isEmpty() && phoneNumbers.size() > 0 )
+                {
+                    message = sendMessage( text, phoneNumbers, gatewayId );
+                }
+
+            }
+        }
+        
+        return message;
+    }
+
+    // -------------------------------------------------------------------------
+    // Supportive methods
+    // -------------------------------------------------------------------------
+
+    private boolean isQualifiedReceiver( User user )
+    {
+        // if receiver is raw number
+        if ( user.getFirstName() == null )
+        {
+            return true;
+        }
+        // if receiver is user
+        else
+        {
+            UserSetting userSetting = userService
+                .getUserSetting( user, UserSettingService.KEY_MESSAGE_SMS_NOTIFICATION );
+            if ( userSetting != null )
+            {
+                boolean sendSMSNotification = (Boolean) userSetting.getValue();
+                if ( sendSMSNotification == true )
+                {
+                    return true;
+                }
+                else
+                {
+                    return false;
+                }
+            }
+            else
+            {
+                return false;
+            }
+        }
+    }
+
+    private String createMessage( String subject, String text, User sender )
+    {
+        String name = "DHIS";
+
+        if ( sender != null )
+        {
+            name = sender.getUsername();
+        }
+
+        if ( subject == null || subject.isEmpty() )
+        {
+            subject = "";
+        }
+        else
+        {
+            subject = " - " + subject;
+        }
+
+        text = name + subject + ": " + text;
+
+        // Simplistic cut off 160 characters
+        int length = text.length();
+
+        return (length > 160) ? text.substring( 0, 157 ) + "..." : text;
+    }
+
+    private Set<String> getRecipientsPhoneNumber( Set<User> users )
+    {
+        Set<String> recipients = new HashSet<String>();
+
+        for ( User user : users )
+        {
+            String phoneNumber = user.getPhoneNumber();
+
+            if ( phoneNumber != null && !phoneNumber.trim().isEmpty() )
+            {
+                recipients.add( phoneNumber );
+            }
+        }
+
+        return recipients;
+    }
+
+    private String sendMessage( String text, Set<String> recipients, String gateWayId )
+    // private String sendMessage( String text, Set<String> recipients, String
+    // gateWayId, boolean isUnicode )
+    {
+        String message = null;
+        OutboundSms sms = new OutboundSms();
+        sms.setMessage( text );
+        sms.setRecipients( recipients );
+
+        try
+        {
+            message = outboundSmsService.sendMessage( sms, gateWayId );
+        }
+        catch ( SmsServiceException e )
+        {
+            message = "Unable to send message through sms: " + sms + e.getCause().getMessage();
+
+            log.warn( "Unable to send message through sms: " + sms, e );
+        }
+
+        return message;
+    }
+
+    public static String toHex( byte[] buf )
+    {
+        char[] chars = new char[2 * buf.length];
+        for ( int i = 0; i < buf.length; ++i )
+        {
+            chars[2 * i] = HEX_CHARS[(buf[i] & 0xF0) >>> 4];
+            chars[2 * i + 1] = HEX_CHARS[buf[i] & 0x0F];
+        }
+        return new String( chars );
+    }
+
+    public static List<String> spitLongHexString( String hexString, String message, List<String> result )
+    {
+
+        String firstTempHex = null;
+        String secondTempHex = null;
+        String firstTempString = null;
+        String secondTempString = null;
+        int indexToCut;
+
+        firstTempHex = hexString.substring( 0, MAX_HEX_CHAR );
+
+        int lastSpaceIndex = firstTempHex.lastIndexOf( "0020" );
+
+        firstTempHex = firstTempHex.substring( 0, lastSpaceIndex );
+        indexToCut = (firstTempHex.length() - 4) / 4;
+        firstTempString = message.substring( 0, indexToCut );
+        result.add( firstTempString );
+
+        secondTempHex = "feff" + hexString.substring( firstTempHex.length() + 4, hexString.length() );
+        secondTempString = message.substring( indexToCut + 1, message.length() );
+        if ( secondTempHex.length() <= MAX_HEX_CHAR )
+        {
+            result.add( secondTempString );
+            return result;
+        }
+        else
+        {
+            return spitLongHexString( secondTempHex, secondTempString, result );
+        }
+    }
+}

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java'
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/MathUtilsTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/MathUtilsTest.java	2013-08-09 10:02:06 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/MathUtilsTest.java	2013-08-12 14:01:06 +0000
@@ -241,6 +241,7 @@
     {
         assertEquals( 7.5, MathUtils.getAverage( Arrays.asList( 5.0, 5.0, 10.0, 10.0 ) ), 0.01 );
     }
+<<<<<<< TREE
     
     @Test
     public void testGetRounded()
@@ -264,4 +265,18 @@
         assertEquals( 5d, MathUtils.calculateExpression( "sqrt(25)" ), 0.01 );
         assertEquals( 1d, MathUtils.calculateExpression( "mod(7,2)" ), 0.01 );
     }
+=======
+    
+    @Test
+    public void testGetRounded()
+    {
+        assertEquals( 10, MathUtils.getRounded( 10.00 ), 0.01 );
+        assertEquals( 10, MathUtils.getRounded( 10 ), 0.01 );
+        assertEquals( 0.53, MathUtils.getRounded( 0.5281 ), 0.01 );
+        assertEquals( 0.5, MathUtils.getRounded( 0.5 ), 0.01 );
+        assertEquals( 0, MathUtils.getRounded( 0 ), 0.01 );
+        assertEquals( -0.43, MathUtils.getRounded( -0.43123 ), 0.01 );
+        assertEquals( -10, MathUtils.getRounded( -10.00 ), 0.01 );        
+    }
+>>>>>>> MERGE-SOURCE
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/PDFFormController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/PDFFormController.java	2013-07-16 14:06:13 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/PDFFormController.java	2013-08-12 14:01:06 +0000
@@ -43,7 +43,12 @@
 import org.hisp.dhis.api.utils.ContextUtils.CacheStrategy;
 import org.hisp.dhis.api.utils.PdfDataEntryFormImportUtil;
 import org.hisp.dhis.common.IdentifiableObject.IdentifiableProperty;
-import org.hisp.dhis.dataset.DataSetService;
+<<<<<<< TREE
+import org.hisp.dhis.dataset.DataSetService;
+=======
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+>>>>>>> MERGE-SOURCE
 import org.hisp.dhis.dxf2.datavalueset.DataValueSetService;
 import org.hisp.dhis.dxf2.metadata.ImportOptions;
 import org.hisp.dhis.dxf2.pdfform.PdfDataEntryFormService;
@@ -52,8 +57,14 @@
 import org.hisp.dhis.i18n.I18nManager;
 import org.hisp.dhis.i18n.I18nManagerException;
 import org.hisp.dhis.importexport.ImportStrategy;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.program.ProgramStageService;
+<<<<<<< TREE
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.program.ProgramStageService;
+=======
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.program.ProgramStage;
+import org.hisp.dhis.program.ProgramStageService;
+>>>>>>> MERGE-SOURCE
 import org.hisp.dhis.scheduling.TaskCategory;
 import org.hisp.dhis.scheduling.TaskId;
 import org.hisp.dhis.system.notification.Notifier;

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportController.java	2013-08-12 13:07:42 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportController.java	2013-08-12 14:01:06 +0000
@@ -176,12 +176,21 @@
         
         I18nFormat format = i18nManager.getI18nFormat();
 
+<<<<<<< TREE
         if ( report == null )
         {
             ContextUtils.notFoundResponse( response, "Report does not exist: " + uid );
             return;
         }
         
+=======
+        if ( report == null )
+        {
+            ContextUtils.notFoundResponse( response, "Report does not exist: " + uid );
+            return null;
+        }
+        
+>>>>>>> MERGE-SOURCE
         if ( organisationUnitUid == null && report.hasReportTable() && report.getReportTable().hasReportParams()
             && report.getReportTable().getReportParams().isOrganisationUnitSet() )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java	2013-06-06 07:31:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java	2013-08-12 14:01:06 +0000
@@ -305,6 +305,7 @@
         reportTable.getRowDimensions().clear();
         reportTable.getFilterDimensions().clear();
         
+<<<<<<< TREE
         reportTable.getColumnDimensions().addAll( getUniqueDimensions( reportTable.getColumns() ) );
         reportTable.getRowDimensions().addAll( getUniqueDimensions( reportTable.getRows() ) );
         reportTable.getFilterDimensions().addAll( getUniqueDimensions( reportTable.getFilters() ) );
@@ -313,5 +314,10 @@
         {
             reportTable.setLegendSet( mappingService.getMapLegendSet( reportTable.getLegendSet().getUid() ) );
         }
+=======
+        reportTable.getColumnDimensions().addAll( getUniqueDimensions( reportTable.getColumns() ) );
+        reportTable.getRowDimensions().addAll( getUniqueDimensions( reportTable.getRows() ) );
+        reportTable.getFilterDimensions().addAll( getUniqueDimensions( reportTable.getFilters() ) );        
+>>>>>>> MERGE-SOURCE
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java	2013-06-07 08:28:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java	2013-08-12 14:01:06 +0000
@@ -39,6 +39,10 @@
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
+<<<<<<< TREE
+=======
+import org.hisp.dhis.datavalue.DataValueService;
+>>>>>>> MERGE-SOURCE
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -53,7 +57,11 @@
 public class CaseAggregationResultAction
     implements Action
 {
+<<<<<<< TREE
     // -------------------------------------------------------------------------
+=======
+   // -------------------------------------------------------------------------
+>>>>>>> MERGE-SOURCE
     // Dependencies
     // -------------------------------------------------------------------------
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java	2013-08-08 06:20:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java	2013-08-12 14:01:06 +0000
@@ -220,10 +220,16 @@
         // Get patient-attribute-values
         // ---------------------------------------------------------------------
 
+<<<<<<< TREE
         Collection<PatientAttributeValue> _attributeValues = patientAttributeValueService
             .getPatientAttributeValues( patient );
         attributeValues = new HashSet<PatientAttributeValue>();
 
+=======
+       Collection<PatientAttributeValue> _attributeValues = patientAttributeValueService.getPatientAttributeValues( patient );
+        attributeValues = new HashSet<PatientAttributeValue>();
+        
+>>>>>>> MERGE-SOURCE
         for ( Program program : programs )
         {
             Collection<PatientAttribute> atttributes = program.getPatientAttributes();
@@ -240,9 +246,15 @@
         // Get patient-identifiers
         // ---------------------------------------------------------------------
 
+<<<<<<< TREE
         Collection<PatientIdentifier> _identifiers = patient.getIdentifiers();
         identifiers = new HashSet<PatientIdentifier>();
 
+=======
+        Collection<PatientIdentifier> _identifiers = patient.getIdentifiers();
+        identifiers = new HashSet<PatientIdentifier>();
+        
+>>>>>>> MERGE-SOURCE
         for ( Program program : programs )
         {
             Collection<PatientIdentifierType> identifierTypes = program.getPatientIdentifierTypes();
@@ -250,7 +262,11 @@
             {
                 if ( !identifierTypes.contains( identifier.getIdentifierType() ) )
                 {
+<<<<<<< TREE
                     identifiers.add( identifier );
+=======
+                    identifiers.add(identifier);
+>>>>>>> MERGE-SOURCE
                 }
             }
         }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-08-12 06:23:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-08-12 14:01:06 +0000
@@ -654,6 +654,7 @@
 toggle_risk_status = Toggle risk status
 with = with
 status_events = events
+<<<<<<< TREE
 use_data_element_form_names = Use data element form names
 section = Section
 orgunit_registered = Organisation registered
@@ -674,4 +675,8 @@
 event_registration = Event registration
 add_patient_related_the_seleced_event = Add person related to the selected event
 related_patient = Related person
-search_by_user_orgunits = Search by user orgunits
\ No newline at end of file
+search_by_user_orgunits = Search by user orgunits=======
+use_data_element_form_names = Use data element form names
+section = Section
+orgunit_registered = Organisation registered
+users_in_orgunit_registered = Users in organisation registered>>>>>>> MERGE-SOURCE

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm	2013-08-06 06:40:06 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm	2013-08-12 14:01:06 +0000
@@ -1,5 +1,9 @@
 CACHE MANIFEST
+<<<<<<< TREE
 # 2.13-SNAPSHOT V4
+=======
+# 2.12 V10
+>>>>>>> MERGE-SOURCE
 NETWORK:
 *
 CACHE:

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-08-12 06:23:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-08-12 14:01:06 +0000
@@ -37,8 +37,13 @@
 		<tr id='entryPostComment'>
 			<th class='coordinates1'><label for="postComment">$i18n.getString('post_comment'):</label></th>
 			<th colspan='3'>
+<<<<<<< TREE
 				<input type="text" class="{validate:{maxlength:160}} criteria" id="commentInput" name='commentInput'
                         style="width:380px;#if($programStage.captureCoordinates=='false') margin-left:11px; padding-left: 2px;  #end "
+=======
+				<input type="text" class="{validate:{maxlength:160}} criteria" id="commentInput"
+                        style="width:380px;#if($programStage.captureCoordinates=='false') margin-left:11px; padding-left: 2px;  #end "
+>>>>>>> MERGE-SOURCE
                        onkeypress="keypressOnComment( event, this );">
 				<input id="commentButton" name='commentButton' type="button" style='width:40px' value="$i18n.getString('add')" onclick='addComment( byId("commentInput"), $programStageInstance.id )'>
 			</th>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramMetaData.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageCompletenessSelect.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm	2013-07-20 12:47:46 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm	2013-08-12 14:01:06 +0000
@@ -1,5 +1,9 @@
 CACHE MANIFEST
+<<<<<<< TREE
 # 2.13-SNAPSHOT V3
+=======
+# 2.12 V1
+>>>>>>> MERGE-SOURCE
 NETWORK:
 *
 CACHE:

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2013-07-11 05:42:16 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2013-08-12 14:01:06 +0000
@@ -730,9 +730,31 @@
             }
             else
             {
+<<<<<<< TREE
                 subtree.getChildren( parent.id ).done( function () {
                     createChildren( parentTag, parent );
                 } );
+=======
+                $.post( '../dhis-web-commons-ajax-json/getOrganisationUnitTree.action?parentId=' + parent.id,
+                function ( data, textStatus, jqXHR )
+                    {
+                        // load additional organisationUnits into sessionStorage
+                        if ( sessionStorage["organisationUnits"] === undefined )
+                        {
+                            sessionStorage["organisationUnits"] = JSON.stringify( data.organisationUnits );
+                        } 
+                        else 
+                        {
+                            var units = JSON.parse( sessionStorage["organisationUnits"] );
+                            $.extend(units, data.organisationUnits);
+                            sessionStorage["organisationUnits"] = JSON.stringify( units );
+                        }
+
+                        $.extend(organisationUnits, data.organisationUnits);
+                        createChildren( parentTag, parent );
+                    }
+                );
+>>>>>>> MERGE-SOURCE
             }
         }
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm	2013-07-18 09:25:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm	2013-08-12 14:01:06 +0000
@@ -44,12 +44,22 @@
             <form id="loginForm" action="../../dhis-web-commons-security/login.action" method="post">
                 <table>
                     <tr>
+<<<<<<< TREE
                         <td><label for="j_username">$i18n.getString( "login_username" )</label></td>
                         <td><input type="text" id="j_username" name="j_username"></td>
+=======
+                        <td><label for="j_username">Username</label></td>
+                        <td><input type="text" id="j_username" name="j_username"></td>
+>>>>>>> MERGE-SOURCE
                     </tr>
                     <tr>
+<<<<<<< TREE
                         <td><label for="j_password">$i18n.getString( "login_password" )</label></td>
                         <td><input type="password" id="j_password" name="j_password" autocomplete="off"></td>
+=======
+                        <td><label for="j_password">Password</label></td>
+                        <td><input type="password" id="j_password" name="j_password" autocomplete="off"></td>
+>>>>>>> MERGE-SOURCE
                     </tr>
                     <tr>
                         <td></td>
@@ -80,6 +90,10 @@
             <div id="notificationArea">$!{keyApplicationNotification}</div>
             #end
         </div>
+<<<<<<< TREE
         <div id="footerArea"><span>$i18n.getString( "powered_by" ) <a href="http://www.dhis2.org";>DHIS 2</a>&nbsp;&nbsp;$!{keyApplicationFooter}</div>
+=======
+        <div id="footerArea"><span>Powered by <a href="http://www.dhis2.org";>DHIS 2</a>&nbsp;&nbsp;$!{keyApplicationFooter}</div>
+>>>>>>> MERGE-SOURCE
     </body>
 </html>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitTreeAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitTreeAction.java	2013-07-03 05:50:10 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitTreeAction.java	2013-08-12 14:01:06 +0000
@@ -176,7 +176,12 @@
 
             if ( parent != null )
             {
-                organisationUnits.addAll( parent.getChildren() );
+<<<<<<< TREE
+                organisationUnits.addAll( parent.getChildren() );
+=======
+                // organisationUnits.addAll( organisationUnitService.getOrganisationUnitWithChildren( parent.getId() ) );
+                organisationUnits.addAll( parent.getChildren() );
+>>>>>>> MERGE-SOURCE
             }
 
             return "partial";

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java	2013-07-18 09:25:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java	2013-08-12 14:01:06 +0000
@@ -85,8 +85,13 @@
         map.put( KEY_APPLICATION_TITLE, systemSettingManager.getSystemSetting( KEY_APPLICATION_TITLE, DEFAULT_APPLICATION_TITLE ) );
         map.put( KEY_APPLICATION_INTRO, systemSettingManager.getSystemSetting( KEY_APPLICATION_INTRO ) );
         map.put( KEY_APPLICATION_NOTIFICATION, systemSettingManager.getSystemSetting( KEY_APPLICATION_NOTIFICATION ) );
+<<<<<<< TREE
         map.put( KEY_APPLICATION_FOOTER, systemSettingManager.getSystemSetting( KEY_APPLICATION_FOOTER ) );
         map.put( KEY_FLAG, systemSettingManager.getSystemSetting( KEY_FLAG, DEFAULT_FLAG ) );
+=======
+        map.put( KEY_APPLICATION_FOOTER, systemSettingManager.getSystemSetting( KEY_APPLICATION_FOOTER ) );
+        map.put( KEY_FLAG, systemSettingManager.getSystemSetting( KEY_FLAG ) );
+>>>>>>> MERGE-SOURCE
         map.put( KEY_FLAG_IMAGE, systemSettingManager.getFlagImage() );
         map.put( KEY_START_MODULE, systemSettingManager.getSystemSetting( KEY_START_MODULE, DEFAULT_START_MODULE ) );
         map.put( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, systemSettingManager.getSystemSetting( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, false ) );

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties	2013-07-26 13:53:21 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties	2013-08-12 14:01:06 +0000
@@ -87,8 +87,13 @@
 intro_dhis-web-light=Access a mobile device optimized version of data entry, messages and analysis.
 intro_dhis-web-mobile=Access a smartphone optimized version of data entry, settings, messages.
 intro_dhis-web-dashboard-integration=Get an overview of favorite charts, reports and maps and view or write messages.
+<<<<<<< TREE
 intro_dhis-web-visualizer=Create dynamic data visualizations for data elements and indicators.
 intro_dhis-web-pivot=Generate flexible pivot tables with data aggregated in all dimensions. 
+=======
+intro_dhis-web-visualizer=Create dynamic data visualizations for data elements and indicators.
+intro_dhis-web-pivot=Generate flexible pivot tables with data arranged and aggregated in all dimensions. 
+>>>>>>> MERGE-SOURCE
 intro_dhis-web-sms=Send reminders and notifications as SMS to phones, manually or as scheduled tasks.
 intro_dhis-web-spreadsheet-reporting=Generate and import data from reports based on predefined Excel templates.
 intro_dhis-web-appmanager=Access and upload apps, which are extensions to the standard user interface.

=== added file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_en_GB.properties.OTHER'
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm	2013-08-07 10:03:12 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm	2013-08-12 14:01:06 +0000
@@ -14,8 +14,13 @@
 var i18n_drag_to_new_position = '$encoder.jsEscape( $i18n.getString( "drag_to_new_position" ), "'")';
 </script>
 
+<<<<<<< TREE
 <div id="dashboardHeader"><h3>
 <a href="profile.action?id=${currentUser.uid}"><img src="../images/user_small.png"></a> &nbsp;<a href="profile.action?id=${currentUser.uid}">$encoder.htmlEncode( $currentUser.name )</a>
+=======
+<h3>
+<a href="profile.action?id=${currentUser.uid}"><img src="../images/user_small.png"></a> &nbsp;<a href="profile.action?id=${currentUser.uid}">$encoder.htmlEncode( $currentUser.name )</a>
+>>>>>>> MERGE-SOURCE
 #if( !$currentUser.profileFilled )<span class="alert">(</span><a class="alert" href="../dhis-web-commons-about/showUpdateUserProfileForm.action">$i18n.getString( "update_profile" )</a><span class="alert">)</span> #end
 &nbsp;&#8226;&nbsp; <a href="showSendFeedback.action">$i18n.getString( "write_feedback" )</a>
 #if( $messageCount > 0 )&nbsp;&#8226;&nbsp; <a class="alert" href="message.action">$messageCount #if( $messageCount > 1 )$i18n.getString( "unread_messages" )#else$i18n.getString( "unread_message" )#end</a> #end

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java'
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2013-08-07 14:18:03 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2013-08-12 14:01:06 +0000
@@ -1023,6 +1023,79 @@
     displayEntryFormCompleted();
 }
 
+function insertOfflineDataValues(dataSetId, periodId, dataValueMap){
+    var formType = dataSets[dataSetId].type;
+
+    $( '[name="entryfield"]' ).each( function( i )
+        {
+            var id = $( this ).attr( 'id' );
+
+            var split = splitFieldId( id );
+            var dataElementId = split.dataElementId;
+            var optionComboId = split.optionComboId;
+            currentOrganisationUnitId = split.organisationUnitId;
+
+            var elem = storageManager.getDataValue( dataElementId, optionComboId, periodId, currentOrganisationUnitId );
+            if (elem != null)
+            {
+                var fieldId = '#' + elem.dataElementId + '-' + elem.optionComboId + '-val';
+
+                if ( $( fieldId ).length > 0 ) // Insert for fixed input fields
+                {
+                    if ( $( fieldId ).attr( 'name' ) == 'entrytrueonly' ) {
+                        $( fieldId ).attr('checked', true);
+                    } else {
+                        $( fieldId ).val( elem.value );
+                    }
+                }
+                else // Insert for potential dynamic input fields
+                {
+                    var dataElementId = elem.dataElementId;
+                    var optionComboId = elem.optionComboId;
+
+                    var selectElementId = '#' + getDynamicSelectElementId( dataElementId );
+
+                    if ( $( selectElementId ).length == 0 )
+                    {
+                        log( 'Could not find dynamic select element for data element: ' + dataElementId );
+                        return true;
+                    }
+
+                    var code = $( selectElementId ).attr( 'id' ).split( '-' )[0];
+
+                    if ( !isDefined( code ) )
+                    {
+                        log( 'Could not find code on select element: ' + selectElementId );
+                        return true;
+                    }
+
+                    var dynamicInputId = '#' + code + '-' + optionComboId + '-dyninput';
+
+                    if ( $( dynamicInputId ).length == 0 )
+                    {
+                        log( 'Could not find find dynamic input element for option combo: ' + optionComboId );
+                        return true;
+                    }
+
+                    // Set data element in select list
+
+                    $( selectElementId ).val( dataElementId );
+
+                    // Enable input fields and set value
+
+                    $( 'input[code="' + code + '"]' ).prop( 'disabled', false );
+                    $( 'input[code="' + code + '"]' ).css( 'background-color', COLOR_WHITE );
+
+                    $( dynamicInputId ).val( elem.val );
+                }
+
+                dataValueMap[elem.dataElementId+'-'+elem.optionComboId] = elem.val
+            }
+        }
+    );
+}
+
+
 function insertDataValues()
 {
     var dataValueMap = [];
@@ -1050,6 +1123,7 @@
     
     // Disable and grey dynamic fields to start with and enable later
 
+<<<<<<< TREE
     $.ajax( {
     	url: 'getDataValues.action',
     	data:
@@ -1159,6 +1233,159 @@
             }
         }
 	} );
+=======
+    $( '[name="dyninput"]' ).prop( 'disabled', true );    
+    $( '[name="dyninput"]' ).css( 'background-color', COLOR_GREY );
+
+    //Validation if user is Online or Offline
+    if(!dhis2.availability._isAvailable){
+        insertOfflineDataValues(dataSetId, periodId, dataValueMap);
+    } else{
+        
+	    $.ajax( {
+	    	url: 'getDataValues.action',
+	    	data:
+		    {
+		        periodId : periodId,
+		        dataSetId : dataSetId,
+		        organisationUnitId : currentOrganisationUnitId,
+	            multiOrganisationUnit: multiOrganisationUnit
+		    },
+		    dataType: 'json',
+		    error: function() // offline
+		    {
+		    	insertOfflineDataValues(dataSetId, periodId, dataValueMap);
+		    	$( '#contentDiv' ).show();
+		    	$( '#completenessDiv' ).show();
+		    	$( '#infoDiv' ).hide();
+		    	
+		    },
+		    success: function( json ) // online
+		    {
+		    	if ( json.locked )
+		    	{
+		    		$( '#contentDiv' ).hide();
+		    		$( '#completenessDiv' ).hide();
+		    		setHeaderDelayMessage( i18n_dataset_is_locked );
+		    		return;
+		    	}
+		    	else
+		    	{	    		
+		    		$( '#contentDiv' ).show();
+		    		$( '#completenessDiv' ).show();
+		    	}
+		    	
+		        // Set data values, works for selects too as data value=select value
+	
+		        $.safeEach( json.dataValues, function( i, value )
+		        {
+		            var fieldId = '#' + value.id + '-val';
+	
+		            if ( $( fieldId ).length > 0 ) // Insert for fixed input fields
+		            {
+	                    if ( $( fieldId ).attr( 'name' ) == 'entrytrueonly' ) {
+	                        $( fieldId ).attr('checked', true);
+	                    } else {
+	                        $( fieldId ).val( value.val );
+	                    }
+	                }
+		            else // Insert for potential dynamic input fields
+		            {
+	                    var split = splitFieldId( value.id );
+		                var dataElementId = split.dataElementId;
+		                var optionComboId = split.optionComboId;
+		                
+		                var selectElementId = '#' + getDynamicSelectElementId( dataElementId );
+		                
+		                if ( $( selectElementId ).length == 0 )
+		                {
+		                	log( 'Could not find dynamic select element for data element: ' + dataElementId );
+		                	return true;
+		                }
+	
+	                	var code = $( selectElementId ).attr( 'id' ).split( '-' )[0];
+	        			
+	        			if ( !isDefined( code ) )
+	        			{
+	        				log( 'Could not find code on select element: ' + selectElementId );
+	        				return true;
+	        			}
+	
+	    				var dynamicInputId = '#' + code + '-' + optionComboId + '-dyninput';
+	
+	        			if ( $( dynamicInputId ).length == 0 )
+	    				{
+	        				log( 'Could not find find dynamic input element for option combo: ' + optionComboId );
+	        				return true;
+	    				}
+	
+	        			// Set data element in select list
+	        			    		    
+	        			$( selectElementId ).val( dataElementId );
+	
+	        			// Enable input fields and set value
+	        			
+	        		    $( 'input[code="' + code + '"]' ).prop( 'disabled', false );    
+	        		    $( 'input[code="' + code + '"]' ).css( 'background-color', COLOR_WHITE );
+	        		    
+	    				$( dynamicInputId ).val( value.val );
+		            }
+	
+		            dataValueMap[value.id] = value.val;
+		        } );
+	
+		        // Set min-max values and colorize violation fields
+	
+		        $.safeEach( json.minMaxDataElements, function( i, value )
+		        {
+		            var minId = value.id + '-min';
+		            var maxId = value.id + '-max';
+	
+		            var valFieldId = '#' + value.id + '-val';
+	
+		            var dataValue = dataValueMap[value.id];
+	
+		            if ( dataValue && ( ( value.min && new Number( dataValue ) < new Number(
+		            	value.min ) ) || ( value.max && new Number( dataValue ) > new Number( value.max ) ) ) )
+		            {
+		                $( valFieldId ).css( 'background-color', COLOR_ORANGE );
+		            }
+	
+		            currentMinMaxValueMap[minId] = value.min;
+		            currentMinMaxValueMap[maxId] = value.max;
+		        } );
+	
+		        // Update indicator values in form
+	
+		        updateIndicators();
+		        updateDataElementTotals();
+	
+		        // Set completeness button
+	
+		        if ( json.complete )
+		        {
+		            $( '#completeButton' ).attr( 'disabled', 'disabled' );
+		            $( '#undoButton' ).removeAttr( 'disabled' );
+	
+		            if ( json.storedBy )
+		            {
+		                $( '#infoDiv' ).show();
+		                $( '#completedBy' ).html( json.storedBy );
+		                $( '#completedDate' ).html( json.date );
+	
+		                currentCompletedByUser = json.storedBy;
+		            }
+		        }
+		        else
+		        {
+		            $( '#completeButton' ).removeAttr( 'disabled' );
+		            $( '#undoButton' ).attr( 'disabled', 'disabled' );
+		            $( '#infoDiv' ).hide();
+		        }
+		    }
+		} );
+    }
+>>>>>>> MERGE-SOURCE
 }
 
 function displayEntryFormCompleted()

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties'
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm	2013-08-08 12:00:17 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm	2013-08-12 14:01:06 +0000
@@ -84,8 +84,16 @@
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
 				#elseif( $dataElement.type == "int" && $dataElement.numberType == "negativeNumber" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
+<<<<<<< TREE
 				#elseif($dataElement.type=="trueOnly")
 					<input name="$key" type="checkbox" #if($!dataValues.get($key) == "on" ) checked #end/>
+=======
+				#elseif($dataElement.type=="trueOnly")
+					<select name="$key">
+						<option value="">$i18n.getString("please_select")</option>
+						<option #if( $prevDataValues.get( $key ) == "true" ) selected="selected" #end value="true">$i18n.getString("yes")</option>
+					</select>	
+>>>>>>> MERGE-SOURCE
 				#end
 				#end
 			#end

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/maintenance/PerformMaintenanceAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/maintenance/PerformMaintenanceAction.java	2013-07-22 11:47:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/maintenance/PerformMaintenanceAction.java	2013-08-12 14:01:06 +0000
@@ -186,10 +186,20 @@
         
         if ( clearDataMart )
         {
+<<<<<<< TREE
             aggregatedDataValueService.dropDataMart();
             aggregatedDataValueService.createDataMart();
             
             log.info( "'" + username + "': Cleared data mart" );
+=======
+            aggregatedDataValueService.deleteAggregatedDataValues();
+            aggregatedDataValueService.deleteAggregatedIndicatorValues();
+            
+            aggregatedOrgUnitDataValueService.deleteAggregatedDataValues();
+            aggregatedOrgUnitDataValueService.deleteAggregatedIndicatorValues();
+            
+            log.info( "'" + username + "': Cleared data mart" );
+>>>>>>> MERGE-SOURCE
         }
         
         if ( dataMartIndex )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml'
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties	2013-07-20 12:35:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/org/hisp/dhis/dataset/i18n_module.properties	2013-08-12 14:01:06 +0000
@@ -100,9 +100,13 @@
 form_details=Form details
 complete_allowed_only_if_validation_passes=Complete allowed only if validation passes
 notification_recipients=Complete notification recipients
+<<<<<<< TREE
 skip_offline=Skip offline
 render_as_tabs=Render sections as tabs
 render_horizontally=Render Vertically
+=======
+skip_offline=Skip offline
+>>>>>>> MERGE-SOURCE
 object_not_deleted_associated_by_objects=Object not deleted because it is associated by objects of type
 auto_save_data_entry_forms=Auto-save data entry forms
 notify_completing_user=Send notification to completing user

=== 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	2013-08-12 06:23:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2013-08-12 14:01:06 +0000
@@ -410,6 +410,7 @@
 view_all = View all
 patient_attribute_visit_schedule = Patient Attribute Visit Schedule
 patient_attribute_visit_schedule_form = Patient attribute visit schedule
+<<<<<<< TREE
 intro_patient_attribute_visit_schedule = Configure which person attributes are added to the visit schedule. Gives better overview when used for tracking.
 selected_program_stages = Selected program stages
 patient = Person
@@ -449,4 +450,7 @@
 default_form_name = Default form name
 custom_form_name = Custom form name
 allow_select_enrollment_dates_in_future = Allow seleting enrollment dates in future
-related_patient = Related person
\ No newline at end of file
+related_patient = Related person=======
+intro_patient_attribute_visit_schedule = Configure which person attributes are added to the visit schedule. Gives better overview when used for tracking.
+selected_program_stages = Selected program stages
+>>>>>>> MERGE-SOURCE

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregationForm.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeVisitSchedule.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewPatientRegistationForm.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addRoleForm.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateRoleForm.vm'
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/pom.xml'
=== added file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddMapViewToDashboardAction.java.OTHER'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddMapViewToDashboardAction.java.OTHER	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddMapViewToDashboardAction.java.OTHER	2013-08-12 14:01:06 +0000
@@ -0,0 +1,101 @@
+package org.hisp.dhis.mapping.action;
+
+/*
+ * Copyright (c) 2004-2012, 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.
+ */
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.dashboard.DashboardContent;
+import org.hisp.dhis.dashboard.DashboardService;
+import org.hisp.dhis.mapping.Map;
+import org.hisp.dhis.mapping.MappingService;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.User;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Lars Helge Overland
+ */
+public class AddMapViewToDashboardAction
+    implements Action
+{
+    private static final Log log = LogFactory.getLog( AddMapViewToDashboardAction.class );
+    
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    @Autowired
+    private CurrentUserService currentUserService;
+
+    @Autowired
+    private DashboardService dashboardService;
+
+    @Autowired
+    private MappingService mappingService;
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private String id;
+
+    public void setId( String id )
+    {
+        this.id = id;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        User user = currentUserService.getCurrentUser();
+        
+        if ( user != null )
+        {        
+            DashboardContent content = dashboardService.getDashboardContent( user );
+            
+            Map map = mappingService.getMap( id );
+            
+            content.addMap( map );
+            
+            dashboardService.saveDashboardContent( content );
+            
+            log.info( "Added mapview '" + map.getName() + "' to dashboard for user '" + user.getName() + "'" );
+        }
+        else
+        {
+            log.warn( "Could not add mapview to dashboard, no current user" );
+        }
+        
+        return SUCCESS;
+    }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml	2013-07-24 17:28:39 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml	2013-08-12 14:01:06 +0000
@@ -18,6 +18,12 @@
         <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
     </bean>
 
+    <!-- Dashboard -->
+    
+    <bean id="org.hisp.dhis.mapping.action.AddMapViewToDashboardAction"
+        class="org.hisp.dhis.mapping.action.AddMapViewToDashboardAction"
+        scope="prototype"/>
+
 	<!-- OrganisationUnit -->
 
 	<bean id="org.hisp.dhis.mapping.action.GetOrganisationUnitChildrenAction"

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml	2013-07-24 17:28:39 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml	2013-08-12 14:01:06 +0000
@@ -14,7 +14,17 @@
     <action name="index" class="org.hisp.dhis.mapping.action.NoAction">
       <result name="success" type="redirect">app/index.html</result>
     </action>
+<<<<<<< TREE
 		
+=======
+	
+	<!-- Dashboard -->
+	
+	<action name="addMapViewToDashboard" class="org.hisp.dhis.mapping.action.AddMapViewToDashboardAction">
+	  <result name="success" type="velocity-json">/dhis-web-mapping/void.vm</result>
+	</action>
+	
+>>>>>>> MERGE-SOURCE
     <!-- Security -->
 	  
     <action name="deleteMapLegendSet" class="org.hisp.dhis.mapping.action.NoAction">

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2013-08-01 12:56:35 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2013-08-12 14:01:06 +0000
@@ -5264,6 +5264,7 @@
 					};
 					GIS.core.MapLoader(gis).load();
 				}
+<<<<<<< TREE
 				
 				if (base.length) {
 				
@@ -5299,6 +5300,8 @@
 						}
 					}
 				}				
+=======
+>>>>>>> MERGE-SOURCE
 			};
 
 			viewport = Ext.create('Ext.container.Viewport', {

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2013-08-01 12:56:35 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2013-08-12 14:01:06 +0000
@@ -1788,12 +1788,20 @@
 	gis.olmap = GIS.core.getOLMap(gis);
 	gis.layer = GIS.core.getLayers(gis);
 
+<<<<<<< TREE
 	if (window.google) {
 		layers.push(gis.layer.googleStreets, gis.layer.googleHybrid);
 	}
 
 	layers.push(
 		gis.layer.openStreetMap,
+=======
+	if (window.google) {
+		layers.push(gis.layer.googleStreets, gis.layer.googleHybrid);
+	}
+
+	layers.push(gis.layer.openStreetMap,
+>>>>>>> MERGE-SOURCE
 		gis.layer.thematic4,
 		gis.layer.thematic3,
 		gis.layer.thematic2,

=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/resources/dhis-mobile-manifest.appcache'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/resources/dhis-mobile-manifest.appcache	2013-05-31 11:16:36 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/resources/dhis-mobile-manifest.appcache	2013-08-12 14:01:06 +0000
@@ -1,5 +1,9 @@
 CACHE MANIFEST
+<<<<<<< TREE
 # 2.13-SNAPSHOT V1
+=======
+# 2.12 V10
+>>>>>>> MERGE-SOURCE
 
 CACHE:
 ../mobile/index

=== added file 'dhis-2/dhis-web/dhis-web-mobile/src/main/resources/org/hisp/dhis/web/mobile/i18n_module_fr.properties'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/resources/org/hisp/dhis/web/mobile/i18n_module_fr.properties	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/resources/org/hisp/dhis/web/mobile/i18n_module_fr.properties	2013-08-12 14:01:06 +0000
@@ -0,0 +1,13 @@
+#Resource generated by I18n Resource Editor
+#Mon Apr 08 13:22:00 GMT 2013
+none_selected=Aucune selection
+change_to_invalid_page=A essay\u00E9 de passer \u00E0 une page non valide
+aggregate_reporting=Rapports agr\u00E9g\u00E9s
+no_messages=Aucun message
+no_organisation_units_for_data_entry=Aucune unit\u00E9 d'organisation disponible pour la saisie de donn\u00E9es
+unable_to_get_inbox=Impossible d'ouvir la boite de reception, veuillez r\u00E9essayer plus tard
+you_have=Vous avez
+form_stored=Formulaire stock\u00E9
+forms_stored=Formulaires stock\u00E9s
+unable_to_send_reply=Impossible d'envoyer la r\u00E9ponse, veuillez r\u00E9essayer plus tard
+no_data_is_stored=Aucune donn\u00E9e n'est enregistr\u00E9e

=== renamed file 'dhis-2/dhis-web/dhis-web-mobile/src/main/resources/org/hisp/dhis/web/mobile/i18n_module_fr.properties' => 'dhis-2/dhis-web/dhis-web-mobile/src/main/resources/org/hisp/dhis/web/mobile/i18n_module_fr.properties.moved'
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js	2013-08-04 15:11:08 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js	2013-08-12 14:01:06 +0000
@@ -4136,6 +4136,7 @@
 								}
 							});
 
+<<<<<<< TREE
 							b.menu.show();
 						}
 					},
@@ -4295,12 +4296,552 @@
 							id: dim.dimensionName,
 							name: dimConf.objectNameMap[dim.dimensionName].name
 						});
+=======
+							return config.items.length ? config : null;
+						},
+						onExpand: function() {
+							if (!availableStore.isLoaded) {
+								availableStore.load();
+							}
+
+							var h = pt.viewport.westRegion.hasScrollbar ?
+								pt.conf.layout.west_scrollbarheight_accordion_group : pt.conf.layout.west_maxheight_accordion_group;
+							pt.util.dimension.panel.setHeight(h);
+
+							pt.util.multiselect.setHeight(
+								[available, selected],
+								this,
+								pt.conf.layout.west_fill_accordion_dataset
+							);
+						},
+						items: [
+							{
+								xtype: 'panel',
+								layout: 'column',
+								bodyStyle: 'border-style:none',
+								items: [
+									available,
+									selected
+								]
+							}
+						],
+						listeners: {
+							added: function() {
+								pt.cmp.dimension.panels.push(this);
+							},
+							expand: function(p) {
+								p.onExpand();
+							}
+						}
+					};
+
+					return panel;
+				};
+
+				getPanels = function() {
+					var panels = [];
+
+					for (var i = 0, panel; i < dimensions.length; i++) {
+						panel = createPanel(dimensions[i]);
+
+						panels.push(panel);
+					}
+
+					return panels;
+				};
+
+				return getPanels();
+			};
+
+			validateSpecialCases = function(layout) {
+				var dimConf = pt.conf.finals.dimension;
+
+				if (!layout) {
+					return;
+				}
+
+				if (layout.filters && layout.filters.length) {
+					for (var i = 0; i < layout.filters.length; i++) {
+
+						// Indicators as filter
+						if (layout.filters[i].dimension === dimConf.indicator.objectName) {
+							alert(PT.i18n.indicators_cannot_be_specified_as_filter);
+							return;
+						}
+
+						// Categories as filter
+						if (layout.filters[i].dimension === dimConf.category.objectName) {
+							alert(PT.i18n.categories_cannot_be_specified_as_filter);
+							return;
+						}
+
+						// Data sets as filter
+						if (layout.filters[i].dimension === dimConf.category.objectName) {
+							alert(PT.i18n.data_sets_cannot_be_specified_as_filter);
+							return;
+						}
+					}
+				}
+
+				// Degs and datasets in the same query
+				//if (Ext.Array.contains(dimensionNames, dimConf.data.dimensionName) && pt.store.dataSetSelected.data.length) {
+					//for (var i = 0; i < pt.init.degs.length; i++) {
+						//if (Ext.Array.contains(dimensionNames, pt.init.degs[i].id)) {
+							//alert(PT.i18n.data_element_group_sets_cannot_be_specified_together_with_data_sets);
+							//return;
+						//}
+					//}
+				//}
+
+				return true;
+			};
+
+			update = function() {
+				var config = pt.util.pivot.getLayoutConfig(),
+				layout = pt.api.layout.Layout(config);
+
+				if (!validateSpecialCases(layout)) {
+					return;
+				}
+
+				pt.util.pivot.createTable(layout, pt);
+			};
+
+			accordionBody = Ext.create('Ext.panel.Panel', {
+				layout: 'accordion',
+				activeOnTop: true,
+				cls: 'pt-accordion',
+				bodyStyle: 'border:0 none; margin-bottom:2px',
+				height: 700,
+				items: function() {
+					var panels = [
+						indicator,
+						dataElement,
+						dataSet,
+						period,
+						organisationUnit
+					],
+					dims = Ext.clone(pt.init.dimensions);
+
+					pt.util.array.sortObjectsByString(dims);
+
+					panels = panels.concat(getDimensionPanels(dims, 'pt-panel-title-dimension'));
+
+					last = panels[panels.length - 1];
+					last.cls = 'pt-accordion-last';
+
+					return panels;
+				}()
+			});
+
+			accordion = Ext.create('Ext.panel.Panel', {
+				bodyStyle: 'border-style:none; padding:2px; padding-bottom:0; overflow-y:scroll;',
+				items: accordionBody,
+				listeners: {
+					added: function() {
+						pt.cmp.dimension.accordion = this;
+					}
+				}
+			});
+
+			westRegion = Ext.create('Ext.panel.Panel', {
+				region: 'west',
+				preventHeader: true,
+				collapsible: true,
+				collapseMode: 'mini',
+				width: function() {
+					if (Ext.isWebKit) {
+						return pt.conf.layout.west_width + 8;
+					}
+					else {
+						if (Ext.isLinux && Ext.isGecko) {
+							return pt.conf.layout.west_width + 13;
+						}
+						return pt.conf.layout.west_width + 17;
+					}
+				}(),
+				items: accordion
+			});
+
+			layoutButton = Ext.create('Ext.button.Button', {
+				text: 'Layout',
+				menu: {},
+				handler: function() {
+					if (!pt.viewport.layoutWindow) {
+						pt.viewport.layoutWindow = PT.app.LayoutWindow(pt);
+					}
+
+					pt.viewport.layoutWindow.show();
+				}
+			});
+
+			optionsButton = Ext.create('Ext.button.Button', {
+				text: 'Options',
+				menu: {},
+				handler: function() {
+					if (!pt.viewport.optionsWindow) {
+						pt.viewport.optionsWindow = PT.app.OptionsWindow();
+					}
+
+					pt.viewport.optionsWindow.show();
+				}
+			});
+
+			favoriteButton = Ext.create('Ext.button.Button', {
+				text: 'Favorites',
+				menu: {},
+				handler: function() {
+					if (pt.viewport.favoriteWindow) {
+						pt.viewport.favoriteWindow.destroy();
+					}
+
+					pt.viewport.favoriteWindow = PT.app.FavoriteWindow();
+					pt.viewport.favoriteWindow.show();
+				}
+			});
+
+			openTableLayoutTab = function(type, isNewTab) {
+				if (pt.baseUrl && pt.paramString) {
+					var url = pt.baseUrl + '/api/analytics.' + type + pt.util.pivot.getParamString(pt.xLayout);
+					url += '&tableLayout=true&columns=' + pt.xLayout.columnDimensionNames.join(';') + '&rows=' + pt.xLayout.rowDimensionNames.join(';');
+
+					window.open(url, isNewTab ? '_blank' : '_top');
+				}
+			};
+
+			downloadButton = Ext.create('Ext.button.Button', {
+				text: 'Download',
+				disabled: true,
+				menu: {
+					cls: 'pt-menu',
+					shadow: false,
+					showSeparator: false,
+					items: [
+						{
+							xtype: 'label',
+							text: PT.i18n.table_layout,
+							style: 'padding:7px 5px 5px 7px; font-weight:bold'
+						},
+						{
+							text: 'Microsoft Excel (.xls)',
+							iconCls: 'pt-menu-item-tablelayout',
+							handler: function() {
+								openTableLayoutTab('xls');
+							}
+						},
+						{
+							text: 'CSV (.csv)',
+							iconCls: 'pt-menu-item-tablelayout',
+							handler: function() {
+								openTableLayoutTab('csv');
+							}
+						},
+						{
+							text: 'HTML (.html)',
+							iconCls: 'pt-menu-item-tablelayout',
+							handler: function() {
+								openTableLayoutTab('html', true);
+							}
+						},
+						{
+							xtype: 'label',
+							text: PT.i18n.plain_data_sources,
+							style: 'padding:7px 5px 5px 7px; font-weight:bold'
+						},
+						{
+							text: 'JSON',
+							iconCls: 'pt-menu-item-datasource',
+							handler: function() {
+								if (pt.baseUrl && pt.paramString) {
+									window.open(pt.baseUrl + '/api/analytics.json' + pt.paramString, '_blank');
+								}
+							}
+						},
+						{
+							text: 'XML',
+							iconCls: 'pt-menu-item-datasource',
+							handler: function() {
+								if (pt.baseUrl && pt.paramString) {
+									window.open(pt.baseUrl + '/api/analytics.xml' + pt.paramString, '_blank');
+								}
+							}
+						},
+						{
+							text: 'Microsoft Excel',
+							iconCls: 'pt-menu-item-datasource',
+							handler: function() {
+								if (pt.baseUrl && pt.paramString) {
+									window.location.href = pt.baseUrl + '/api/analytics.xls' + pt.paramString;
+								}
+							}
+						},
+						{
+							text: 'CSV',
+							iconCls: 'pt-menu-item-datasource',
+							handler: function() {
+								if (pt.baseUrl && pt.paramString) {
+									window.location.href = pt.baseUrl + '/api/analytics.csv' + pt.paramString;
+								}
+							}
+						},
+						{
+							text: 'JRXML',
+							iconCls: 'pt-menu-item-datasource',
+							handler: function() {
+								if (pt.baseUrl && pt.paramString) {
+									window.open(pt.baseUrl + '/api/analytics.jrxml' + pt.paramString, '_blank');
+								}
+							}
+						}
+					],
+					listeners: {
+						afterrender: function() {
+							this.getEl().addCls('pt-toolbar-btn-menu');
+						}
+					}
+				}
+			});
+
+			interpretationButton = Ext.create('Ext.button.Button', {
+				text: PT.i18n.share,
+				menu: {},
+				disabled: true,
+				xable: function() {
+					if (pt.favorite) {
+						this.enable();
+						this.disabledTooltip.destroy();
+					}
+					else {
+						if (pt.xLayout) {
+							this.disable();
+							this.createTooltip();
+						}
+					}
+				},
+				disabledTooltip: null,
+				createTooltip: function() {
+					this.disabledTooltip = Ext.create('Ext.tip.ToolTip', {
+						target: this.getEl(),
+						html: PT.i18n.save_load_favorite_before_sharing,
+						'anchor': 'bottom'
+					});
+				},
+				handler: function() {
+					if (pt.viewport.interpretationWindow) {
+						pt.viewport.interpretationWindow.destroy();
+					}
+
+					pt.viewport.interpretationWindow = PT.app.InterpretationWindow();
+
+					if (pt.viewport.interpretationWindow) {
+						pt.viewport.interpretationWindow.show();
+					}
+				}
+			});
+
+			centerRegion = Ext.create('Ext.panel.Panel', {
+				region: 'center',
+				bodyStyle: 'padding:1px',
+				autoScroll: true,
+				tbar: {
+                    defaults: {
+                        height: 26
+                    },
+					items: [
+						{
+							text: '<<<',
+							handler: function(b) {
+								var text = b.getText();
+								text = text === '<<<' ? '>>>' : '<<<';
+								b.setText(text);
+
+								westRegion.toggleCollapse();
+							}
+						},
+						{
+							text: '<b>' + PT.i18n.update + '</b>',
+							handler: function() {
+								update();
+							}
+						},
+						layoutButton,
+						optionsButton,
+						{
+							xtype: 'tbseparator',
+							height: 18,
+							style: 'border-color:transparent; border-right-color:#d1d1d1; margin-right:4px',
+						},
+						favoriteButton,
+						downloadButton,
+						interpretationButton,
+                        '->',
+						{
+							text: PT.i18n.table,
+                            toggleGroup: 'module',
+							pressed: true
+						},
+						{
+							text: PT.i18n.chart,
+                            toggleGroup: 'module',
+							handler: function(b) {
+                                window.location.href = '../../dhis-web-visualizer/app/index.html';
+							}
+						},
+						{
+							text: PT.i18n.map,
+                            toggleGroup: 'module',
+							handler: function(b) {
+                                window.location.href = '../../dhis-web-mapping/app/index.html';
+							}
+						},
+						{
+							xtype: 'tbseparator',
+							height: 18,
+							style: 'border-color:transparent; border-right-color:#d1d1d1; margin-right:4px',
+						},
+                        {
+                            xtype: 'button',
+                            text: PT.i18n.home,
+                            handler: function() {
+                                window.location.href = '../../dhis-web-commons-about/redirect.action';
+                            }
+                        }
+					]
+				},
+				listeners: {
+					afterrender: function(p) {
+						var liStyle = 'padding:3px 10px; color:#333',
+							html = '';
+
+						html += '<div style="padding:20px">';
+						html += '<div style="font-size:14px; padding-bottom:8px">' + PT.i18n.example1 + '</div>';
+						html += '<div style="' + liStyle + '">- ' + PT.i18n.example2 + '</div>';
+						html += '<div style="' + liStyle + '">- ' + PT.i18n.example3 + '</div>';
+						html += '<div style="' + liStyle + '">- ' + PT.i18n.example4 + '</div>';
+						html += '<div style="font-size:14px; padding-top:20px; padding-bottom:8px">' + PT.i18n.example5 + '</div>';
+						html += '<div style="' + liStyle + '">- ' + PT.i18n.example6 + '</div>';
+						html += '<div style="' + liStyle + '">- ' + PT.i18n.example7 + '</div>';
+						html += '<div style="' + liStyle + '">- ' + PT.i18n.example8 + '</div>';
+						html += '</div>';
+
+						p.update(html);
+					}
+				}
+			});
+
+			setFavorite = function(layout) {
+				var dimConf = pt.conf.finals.dimension,
+					xLayout,
+					dimMap,
+					recMap,
+					graphMap,
+					objectName,
+					periodRecords,
+					fixedPeriodRecords = [],
+                    dimNames = [],
+					isOu = false,
+					isOuc = false;
+
+				// State
+				pt.viewport.interpretationButton.enable();
+
+				// Create chart
+				pt.util.pivot.createTable(layout, pt);
+
+				// Set gui
+
+				xLayout = pt.util.pivot.getExtendedLayout(layout);
+				dimMap = xLayout.objectNameDimensionsMap;
+				recMap = xLayout.objectNameItemsMap;
+				graphMap = layout.parentGraphMap;
+
+				// Indicators
+				pt.store.indicatorSelected.removeAll();
+				objectName = dimConf.indicator.objectName;
+				if (dimMap[objectName]) {
+					pt.store.indicatorSelected.add(Ext.clone(recMap[objectName]));
+					pt.util.multiselect.filterAvailable({store: pt.store.indicatorAvailable}, {store: pt.store.indicatorSelected});
+				}
+
+				// Data elements
+				pt.store.dataElementSelected.removeAll();
+				objectName = dimConf.dataElement.objectName;
+				if (dimMap[objectName]) {
+					pt.store.dataElementSelected.add(Ext.clone(recMap[objectName]));
+					pt.util.multiselect.filterAvailable({store: pt.store.dataElementAvailable}, {store: pt.store.dataElementSelected});
+				}
+
+				// Data sets
+				pt.store.dataSetSelected.removeAll();
+				objectName = dimConf.dataSet.objectName;
+				if (dimMap[objectName]) {
+					pt.store.dataSetSelected.add(Ext.clone(recMap[objectName]));
+					pt.util.multiselect.filterAvailable({store: pt.store.dataSetAvailable}, {store: pt.store.dataSetSelected});
+				}
+
+				// Periods
+				pt.store.fixedPeriodSelected.removeAll();
+				pt.util.checkbox.setAllFalse();
+				periodRecords = recMap[dimConf.period.objectName] || [];
+				for (var i = 0, peroid, checkbox; i < periodRecords.length; i++) {
+					period = periodRecords[i];
+					checkbox = relativePeriod.valueComponentMap[period.id];
+					if (checkbox) {
+						checkbox.setValue(true);
+					}
+					else {
+						fixedPeriodRecords.push(period);
+					}
+				}
+				pt.store.fixedPeriodSelected.add(fixedPeriodRecords);
+				pt.util.multiselect.filterAvailable({store: pt.store.fixedPeriodAvailable}, {store: pt.store.fixedPeriodSelected});
+
+				// Group sets
+				for (var key in dimensionIdSelectedStoreMap) {
+					if (dimensionIdSelectedStoreMap.hasOwnProperty(key)) {
+						var a = dimensionIdAvailableStoreMap[key],
+							s = dimensionIdSelectedStoreMap[key];
+
+						if (s.getCount() > 0) {
+							a.reset();
+							s.removeAll();
+						}
+
+						if (recMap[key]) {
+							s.add(recMap[key]);
+							pt.util.multiselect.filterAvailable({store: a}, {store: s});
+						}
+					}
+				}
+
+				// Layout
+				pt.viewport.dimensionStore.reset(true);
+				pt.viewport.colStore.removeAll();
+				pt.viewport.rowStore.removeAll();
+				pt.viewport.filterStore.removeAll();
+
+				if (layout.columns) {
+                    dimNames = [];
+
+					for (var i = 0, dim; i < layout.columns.length; i++) {
+						dim = dimConf.objectNameMap[layout.columns[i].dimension];
+
+                        if (!Ext.Array.contains(dimNames, dim.dimensionName)) {
+                            pt.viewport.colStore.add({
+                                id: dim.dimensionName,
+                                name: dimConf.objectNameMap[dim.dimensionName].name
+                            });
+
+                            dimNames.push(dim.dimensionName);
+                        }
+>>>>>>> MERGE-SOURCE
 
 						dimNames.push(dim.dimensionName);
 					}
 
 					pt.viewport.dimensionStore.remove(pt.viewport.dimensionStore.getById(dim.dimensionName));
 				}
+<<<<<<< TREE
 			}
 
 			if (layout.rows) {
@@ -4314,12 +4855,30 @@
 							id: dim.dimensionName,
 							name: dimConf.objectNameMap[dim.dimensionName].name
 						});
+=======
+
+				if (layout.rows) {
+                    dimNames = [];
+
+					for (var i = 0, dim; i < layout.rows.length; i++) {
+						dim = dimConf.objectNameMap[layout.rows[i].dimension];
+
+                        if (!Ext.Array.contains(dimNames, dim.dimensionName)) {
+                            pt.viewport.rowStore.add({
+                                id: dim.dimensionName,
+                                name: dimConf.objectNameMap[dim.dimensionName].name
+                            });
+
+                            dimNames.push(dim.dimensionName);
+                        }
+>>>>>>> MERGE-SOURCE
 
 						dimNames.push(dim.dimensionName);
 					}
 
 					pt.viewport.dimensionStore.remove(pt.viewport.dimensionStore.getById(dim.dimensionName));
 				}
+<<<<<<< TREE
 			}
 
 			if (layout.filters) {
@@ -4333,6 +4892,23 @@
 							id: dim.dimensionName,
 							name: dimConf.objectNameMap[dim.dimensionName].name
 						});
+=======
+
+				if (layout.filters) {
+                    dimNames = [];
+
+					for (var i = 0, dim; i < layout.filters.length; i++) {
+						dim = dimConf.objectNameMap[layout.filters[i].dimension];
+
+                        if (!Ext.Array.contains(dimNames, dim.dimensionName)) {
+                            pt.viewport.filterStore.add({
+                                id: dim.dimensionName,
+                                name: dimConf.objectNameMap[dim.dimensionName].name
+                            });
+
+                            dimNames.push(dim.dimensionName);
+                        }
+>>>>>>> MERGE-SOURCE
 
 						dimNames.push(dim.dimensionName);
 					}
@@ -4369,6 +4945,7 @@
 				toolMenu.clickHandler('explicit');
 				userOrganisationUnit.setValue(isOu);
 				userOrganisationUnitChildren.setValue(isOuc);
+<<<<<<< TREE
 			}
 
 			// If fav has organisation units, wait for tree callback before update
@@ -4384,6 +4961,69 @@
 			else {
 				treePanel.reset();
 			}
+=======
+
+				// If fav has organisation units, wait for tree callback before update
+				if (recMap[dimConf.organisationUnit.objectName] && Ext.isObject(graphMap)) {
+					treePanel.numberOfRecords = pt.util.object.getLength(graphMap);
+
+                    for (var i = 0, a = xLayout.objectNameItemsMap[dimConf.organisationUnit.objectName]; i < a.length; i++) {
+                        if (graphMap.hasOwnProperty(a[i].id)) {
+                            treePanel.multipleExpand(a[i].id, graphMap[a[i].id], false);
+                        }
+                    }
+				}
+				else {
+					treePanel.reset();
+				}
+			};
+
+			viewport = Ext.create('Ext.container.Viewport', {
+				layout: 'border',
+				accordion: accordion,
+				accordionBody: accordionBody,
+				westRegion: westRegion,
+				centerRegion: centerRegion,
+				updateViewport: update,
+				layoutButton: layoutButton,
+				optionsButton: optionsButton,
+				favoriteButton: favoriteButton,
+				downloadButton: downloadButton,
+				interpretationButton: interpretationButton,
+				userOrganisationUnit: userOrganisationUnit,
+				userOrganisationUnitChildren: userOrganisationUnitChildren,
+				setFavorite: setFavorite,
+				items: [
+					westRegion,
+					centerRegion
+				],
+				listeners: {
+					render: function(vp) {
+						pt.viewport = vp;
+					},
+					afterrender: function() {
+						pt.init.afterRender();
+					}
+				}
+			});
+
+			addListeners = function() {
+				pt.store.indicatorAvailable.on('load', function() {
+					pt.util.multiselect.filterAvailable(indicatorAvailable, indicatorSelected);
+				});
+
+				pt.store.dataElementAvailable.on('load', function() {
+					pt.util.multiselect.filterAvailable(dataElementAvailable, dataElementSelected);
+				});
+
+				pt.store.dataSetAvailable.on('load', function(s) {
+					pt.util.multiselect.filterAvailable(dataSetAvailable, dataSetSelected);
+					s.sort('name', 'ASC');
+				});
+			}();
+
+			return viewport;
+>>>>>>> MERGE-SOURCE
 		};
 
 		viewport = Ext.create('Ext.container.Viewport', {

=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js	2013-08-06 11:37:06 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js	2013-08-12 14:01:06 +0000
@@ -374,6 +374,7 @@
 						s.storage[r.data.id] = {id: r.data.id, name: r.data.name, parent: s.parent};
 					}
 				});
+<<<<<<< TREE
 				if (records) {
 					Ext.Array.each(records, function(r) {
 						if (!s.storage[r.data.id]) {
@@ -513,13 +514,166 @@
 			},
 
 			roundIf: function(x, prec) {
+=======
+			}
+		},
+		loadFromStorage: function(s) {
+			var items = [];
+			s.removeAll();
+			for (var obj in s.storage) {
+				if (s.storage[obj].parent === s.parent) {
+					items.push(s.storage[obj]);
+				}
+			}
+			s.add(items);
+			s.sort('name', 'ASC');
+		},
+		containsParent: function(s) {
+			for (var obj in s.storage) {
+				if (s.storage[obj].parent === s.parent) {
+					return true;
+				}
+			}
+			return false;
+		}
+	};
+
+	util.mask = {
+		showMask: function(cmp, msg) {
+			cmp = cmp || pt.viewport;
+			msg = msg || 'Loading..';
+
+			if (pt.viewport.mask) {
+				pt.viewport.mask.destroy();
+			}
+			pt.viewport.mask = new Ext.create('Ext.LoadMask', cmp, {
+				id: 'pt-loadmask',
+				shadow: false,
+				msg: msg,
+				style: 'box-shadow:0',
+				bodyStyle: 'box-shadow:0'
+			});
+			pt.viewport.mask.show();
+		},
+		hideMask: function() {
+			if (pt.viewport.mask) {
+				pt.viewport.mask.hide();
+			}
+		}
+	};
+
+	util.checkbox = {
+		setRelativePeriods: function(rp) {
+			if (rp) {
+				for (var r in rp) {
+					var cmp = pt.util.getCmp('checkbox[relativePeriodId="' + r + '"]');
+					if (cmp) {
+						cmp.setValue(rp[r]);
+					}
+				}
+			}
+			else {
+				PT.util.checkbox.setAllFalse();
+			}
+		},
+		setAllFalse: function() {
+			var a = pt.cmp.dimension.relativePeriod.checkbox;
+			for (var i = 0; i < a.length; i++) {
+				a[i].setValue(false);
+			}
+		},
+		isAllFalse: function() {
+			var a = pt.cmp.dimension.relativePeriod.checkbox;
+			for (var i = 0; i < a.length; i++) {
+				if (a[i].getValue()) {
+					return false;
+				}
+			}
+			return true;
+		}
+	};
+
+	util.array = {
+		sortDimensions: function(dimensions, key) {
+			key = key || 'dimensionName';
+
+			// Sort object order
+			Ext.Array.sort(dimensions, function(a,b) {
+				if (a[key] < b[key]) {
+					return -1;
+				}
+				if (a[key] > b[key]) {
+					return 1;
+				}
+				return 0;
+			});
+
+			// Sort object items, ids
+			for (var i = 0, dim; i < dimensions.length; i++) {
+				dim = dimensions[i];
+
+				if (dim.items) {
+					dimensions[i].items = util.array.sortDimensions(dim.items, 'id');
+				}
+
+				if (dim.ids) {
+					dimensions[i].ids = dim.ids.sort();
+				}
+			}
+
+			return dimensions;
+		},
+
+		sortObjectsByString: function(array, key) {
+			key = key || 'name';
+			array.sort( function(a, b) {
+				var nameA = a[key].toLowerCase(),
+					nameB = b[key].toLowerCase();
+
+				if (nameA < nameB) {
+					return -1;
+				}
+				if (nameA > nameB) {
+					return 1;
+				}
+				return 0;
+			});
+			return array;
+		}
+	};
+
+	util.number = {
+		getNumberOfDecimals: function(x) {
+			var tmp = new String(x);
+			return (tmp.indexOf('.') > -1) ? (tmp.length - tmp.indexOf('.') - 1) : 0;
+		},
+
+		roundIf: function(x, fix) {
+			if (Ext.isString(x)) {
+>>>>>>> MERGE-SOURCE
 				x = parseFloat(x);
+<<<<<<< TREE
 				prec = parseFloat(prec);
 
 				if (Ext.isNumber(x) && Ext.isNumber(prec)) {
 					var dec = pt.util.number.getNumberOfDecimals(x);
 					return dec > prec ? Ext.Number.toFixed(x, prec) : x;
 				}
+=======
+			}
+
+			if (Ext.isNumber(x) && Ext.isNumber(fix)) {
+				var dec = pt.util.number.getNumberOfDecimals(x);
+				return dec > fix ? x.toFixed(fix) : x;
+			}
+			return x;
+		},
+
+		pp: function(x, nf) {
+			nf = nf || 'space';
+
+			if (nf === 'none') {
+>>>>>>> MERGE-SOURCE
 				return x;
 			},
 
@@ -1562,6 +1716,7 @@
 							}
 
 							if (obj.parent) {
+<<<<<<< TREE
 								recursiveReduce(obj.parent);
 							}
 						};
@@ -1656,6 +1811,98 @@
 									empty: !Ext.Array.contains(empty, false)
 								});
 
+=======
+								obj.parent.children = obj.parent.children - 1;
+							}
+						}
+
+						if (obj.parent) {
+							recursiveReduce(obj.parent);
+						}
+					};
+
+					// Populate dim objects
+					if (xRowAxis) {
+						for (var i = 0, row; i < xRowAxis.objects.all[0].length; i++) {
+							row = [];
+
+							for (var j = 0, obj, newObj; j < xRowAxis.objects.all.length; j++) {
+								obj = xRowAxis.objects.all[j][i];
+								obj.type = 'dimension';
+								obj.cls = 'pivot-dim td-nobreak';
+								obj.noBreak = true;
+								obj.hidden = !(obj.rowSpan || obj.colSpan);
+								obj.htmlValue = xResponse.metaData.names[obj.id];
+
+								row.push(obj);
+							}
+
+							axisObjects.push(row);
+						}
+					}
+
+					// Value objects
+					for (var i = 0, valueItemsRow, valueObjectsRow, map = Ext.clone(xResponse.idValueMap); i < rowSize; i++) {
+						valueItemsRow = [];
+						valueObjectsRow = [];
+
+						for (var j = 0, id, value, htmlValue, empty; j < colSize; j++) {
+							id = (xColAxis ? xColAxis.ids[j] : '') + (xRowAxis ? xRowAxis.ids[i] : '');
+							empty = false;
+
+							if (map[id]) {
+								value = parseFloat(map[id]);
+								htmlValue = parseFloat(map[id]).toString();
+							}
+							else {
+								value = 0;
+								htmlValue = '&nbsp;';
+								empty = true;
+							}
+
+							valueItemsRow.push(value);
+							valueObjectsRow.push({
+								type: 'value',
+								cls: 'pivot-value',
+								value: value,
+								htmlValue: htmlValue,
+								empty: empty
+							});
+						}
+
+						valueItems.push(valueItemsRow);
+						valueObjects.push(valueObjectsRow);
+					}
+
+					// Value total objects
+					if (xColAxis && doTotals()) {
+						for (var i = 0, empty = [], total = 0; i < valueObjects.length; i++) {
+							for (j = 0, obj; j < valueObjects[i].length; j++) {
+								obj = valueObjects[i][j];
+
+								empty.push(obj.empty);
+								total += obj.value;
+							}
+
+							totalValueObjects.push({
+								type: 'valueTotal',
+								cls: 'pivot-value-total',
+								value: total,
+								htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(total, 2)).toString() : '&nbsp;',
+								empty: !Ext.Array.contains(empty, false)
+							});
+
+							empty = [];
+							total = 0;
+						}
+					}
+
+					// Hide empty rows (dims/values/totals)
+					if (xColAxis && xRowAxis) {
+						if (layout.hideEmptyRows) {
+							for (var i = 0, valueRow, empty, parent; i < valueObjects.length; i++) {
+								valueRow = valueObjects[i];
+>>>>>>> MERGE-SOURCE
 								empty = [];
 								total = 0;
 							}
@@ -1669,6 +1916,7 @@
 									empty = [];
 
 									for (var j = 0; j < valueRow.length; j++) {
+<<<<<<< TREE
 										empty.push(!!valueRow[j].empty);
 									}
 
@@ -1826,13 +2074,139 @@
 										cls: 'pivot-value-total-subgrandtotal',
 										value: subTotal,
 										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(subTotal, 2)).toString() : '&nbsp;',
+=======
+										valueRow[j].collapsed = true;
+									}
+
+									// Hide total
+									if (doTotals()) {
+										totalValueObjects[i].collapsed = true;
+									}
+
+									// Hide/reduce parent dim span
+									parent = axisObjects[i][xRowAxis.dims-1];
+									recursiveReduce(parent);
+								}
+							}
+						}
+					}
+
+					xValueObjects = Ext.clone(valueObjects);
+
+					// Col subtotals
+					if (doSubTotals(xColAxis)) {
+						var tmpValueObjects = [];
+
+						for (var i = 0, row, rowSubTotal, colCount; i < xValueObjects.length; i++) {
+							row = [];
+							rowSubTotal = 0;
+							colCount = 0;
+
+							for (var j = 0, item, collapsed = [], empty = []; j < xValueObjects[i].length; j++) {
+								item = xValueObjects[i][j];
+								rowSubTotal += item.value;
+								empty.push(!!item.empty);
+								collapsed.push(!!item.collapsed);
+								colCount++;
+
+								row.push(item);
+
+								if (colCount === colUniqueFactor) {
+									row.push({
+										type: 'valueSubtotal',
+										cls: 'pivot-value-subtotal',
+										value: rowSubTotal,
+										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(rowSubTotal, 2)).toString() : '&nbsp',
+>>>>>>> MERGE-SOURCE
 										empty: !Ext.Array.contains(empty, false),
 										collapsed: !Ext.Array.contains(collapsed, false)
 									});
 
 									collapsed = [];
+<<<<<<< TREE
 									empty = [];
+=======
+								}
+							}
+
+							tmpValueObjects.push(row);
+						}
+
+						xValueObjects = tmpValueObjects;
+					}
+
+					// Row subtotals
+					if (doSubTotals(xRowAxis)) {
+						var tmpAxisObjects = [],
+							tmpValueObjects = [],
+							tmpTotalValueObjects = [],
+							getAxisSubTotalRow;
+
+						getAxisSubTotalRow = function(collapsed) {
+							var row = [];
+
+							for (var i = 0, obj; i < xRowAxis.dims; i++) {
+								obj = {};
+								obj.type = 'dimensionSubtotal';
+								obj.cls = 'pivot-dim-subtotal';
+								obj.collapsed = Ext.Array.contains(collapsed, true);
+
+								if (i === 0) {
+									obj.htmlValue = '&nbsp;';
+									obj.colSpan = xRowAxis.dims;
+								}
+								else {
+									obj.hidden = true;
+								}
+
+								row.push(obj);
+							}
+
+							return row;
+						};
+
+						// tmpAxisObjects
+						for (var i = 0, row, collapsed = []; i < axisObjects.length; i++) {
+							tmpAxisObjects.push(axisObjects[i]);
+							collapsed.push(!!axisObjects[i][0].collapsed);
+
+							// Insert subtotal after last objects
+							if (!Ext.isArray(axisObjects[i+1]) || !!axisObjects[i+1][0].root) {
+								tmpAxisObjects.push(getAxisSubTotalRow(collapsed));
+
+								collapsed = [];
+							}
+						}
+
+						// tmpValueObjects
+						for (var i = 0; i < tmpAxisObjects.length; i++) {
+							tmpValueObjects.push([]);
+						}
+
+						for (var i = 0; i < xValueObjects[0].length; i++) {
+							for (var j = 0, rowCount = 0, tmpCount = 0, subTotal = 0, empty = [], collapsed, item; j < xValueObjects.length; j++) {
+								item = xValueObjects[j][i];
+								tmpValueObjects[tmpCount++].push(item);
+								subTotal += item.value;
+								empty.push(!!item.empty);
+								rowCount++;
+
+								if (axisObjects[j][0].root) {
+									collapsed = !!axisObjects[j][0].collapsed;
+								}
+
+								if (!Ext.isArray(axisObjects[j+1]) || axisObjects[j+1][0].root) {
+									tmpValueObjects[tmpCount++].push({
+										type: item.type === 'value' ? 'valueSubtotal' : 'valueSubtotalTotal',
+										value: subTotal,
+										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(subTotal, 2)).toString() : '&nbsp;',
+										collapsed: collapsed,
+										cls: item.type === 'value' ? 'pivot-value-subtotal' : 'pivot-value-subtotal-total'
+									});
+									rowCount = 0;
+>>>>>>> MERGE-SOURCE
 									subTotal = 0;
+<<<<<<< TREE
 									count = 0;
 								}
 							}
@@ -1892,6 +2266,29 @@
 									type: 'valueTotal',
 									value: total,
 									htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(total, 2)).toString() : '&nbsp;',
+=======
+									empty = [];
+								}
+							}
+						}
+
+						// tmpTotalValueObjects
+						for (var i = 0, obj, collapsed = [], empty = [], subTotal = 0, count = 0; i < totalValueObjects.length; i++) {
+							obj = totalValueObjects[i];
+							tmpTotalValueObjects.push(obj);
+
+							collapsed.push(!!obj.collapsed);
+							empty.push(!!obj.empty);
+							subTotal += obj.value;
+							count++;
+
+							if (count === xRowAxis.span[0]) {
+								tmpTotalValueObjects.push({
+									type: 'valueTotalSubgrandtotal',
+									cls: 'pivot-value-total-subgrandtotal',
+									value: subTotal,
+									htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(subTotal, 2)).toString() : '&nbsp;',
+>>>>>>> MERGE-SOURCE
 									empty: !Ext.Array.contains(empty, false),
 									cls: 'pivot-value-total'
 								});
@@ -1948,6 +2345,7 @@
 								obj = totalColObjects[i];
 
 								total += obj.value;
+<<<<<<< TREE
 								empty.push(obj.empty);
 							}
 
@@ -2131,6 +2529,145 @@
 					
 				if (!Ext.isString(id)) {
 					alert('Invalid uid');
+=======
+								empty.push(!!obj.empty);
+							}
+
+							totalColObjects.push({
+								type: 'valueTotal',
+								value: total,
+								htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(total, 2)).toString() : '&nbsp;',
+								empty: !Ext.Array.contains(empty, false),
+								cls: 'pivot-value-total'
+							});
+
+							total = 0;
+							empty = [];
+						}
+
+						xTotalColObjects = Ext.clone(totalColObjects);
+
+						if (xColAxis && doSubTotals(xColAxis)) {
+							var tmp = [];
+
+							for (var i = 0, item, subTotal = 0, empty = [], colCount = 0; i < xTotalColObjects.length; i++) {
+								item = xTotalColObjects[i];
+								tmp.push(item);
+								subTotal += item.value;
+								empty.push(!!item.empty);
+								colCount++;
+
+								if (colCount === colUniqueFactor) {
+									tmp.push({
+										type: 'valueTotalSubgrandtotal',
+										value: subTotal,
+										htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(subTotal, 2)).toString() : '&nbsp;',
+										empty: !Ext.Array.contains(empty, false),
+										cls: 'pivot-value-total-subgrandtotal'
+									});
+
+									subTotal = 0;
+									colCount = 0;
+								}
+							}
+
+							xTotalColObjects = tmp;
+						}
+
+						// Total col html items
+						for (var i = 0; i < xTotalColObjects.length; i++) {
+							a.push(getTdHtml(xTotalColObjects[i]));
+						}
+					}
+
+					return a;
+				};
+
+				getGrandTotalHtmlArray = function() {
+					var total = 0,
+						empty = [],
+						a = [];
+
+					if (doTotals()) {
+						for (var i = 0, obj; i < totalColObjects.length; i++) {
+							obj = totalColObjects[i];
+
+							total += obj.value;
+							empty.push(obj.empty);
+							//values.push(totalColObjects[i].value);
+						}
+
+						if (xColAxis && xRowAxis) {
+							a.push(getTdHtml({
+								type: 'valueGrandTotal',
+								cls: 'pivot-value-grandtotal',
+								htmlValue: Ext.Array.contains(empty, false) ? parseFloat(pt.util.number.roundIf(total, 2)).toString() : '&nbsp;',
+								empty: !Ext.Array.contains(empty, false)
+							}));
+						}
+					}
+
+					return a;
+				};
+
+				getTotalHtmlArray = function() {
+					var dimTotalArray,
+						colTotal = getColTotalHtmlArray(),
+						grandTotal = getGrandTotalHtmlArray(),
+						row,
+						a = [];
+
+					if (doTotals()) {
+						if (xRowAxis) {
+							dimTotalArray = [getTdHtml({
+								type: 'dimensionSubtotal',
+								cls: 'pivot-dim-total',
+								colSpan: xRowAxis.dims,
+								htmlValue: 'Total'
+							})];
+						}
+
+						row = [].concat(dimTotalArray || [], Ext.clone(colTotal) || [], Ext.clone(grandTotal) || []);
+
+						a.push(row);
+					}
+
+					return a;
+				};
+
+				getHtml = function() {
+					var s = '<table id="' + pt.el + '" class="pivot">';
+
+					for (var i = 0; i < htmlArray.length; i++) {
+						s += '<tr>' + htmlArray[i].join('') + '</tr>';
+					}
+
+					return s += '</table>';
+				};
+
+				htmlArray = [].concat(getColAxisHtmlArray(), getRowHtmlArray(), getTotalHtmlArray());
+				htmlArray = Ext.Array.clean(htmlArray);
+
+				return getHtml(htmlArray);
+			};
+
+			initialize = function() {
+				var url,
+					xLayout,
+					xResponse,
+					xColAxis,
+					xRowAxis;
+
+				// Extended layout
+				xLayout = util.pivot.getExtendedLayout(layout);
+
+				// Param string
+				pt.paramString = util.pivot.getParamString(xLayout, true);
+				url = pt.init.contextPath + '/api/analytics.json' + pt.paramString;
+
+				// Validate request size
+				if (!validateUrl(url)) {
+>>>>>>> MERGE-SOURCE
 					return;
 				}
 				

=== modified file 'dhis-2/dhis-web/dhis-web-portal/india-pom.xml'
--- dhis-2/dhis-web/dhis-web-portal/india-pom.xml	2012-05-10 12:05:02 +0000
+++ dhis-2/dhis-web/dhis-web-portal/india-pom.xml	2013-08-12 14:01:06 +0000
@@ -2,30 +2,30 @@
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
   <modelVersion>4.0.0</modelVersion>
-  
+
   <parent>
     <groupId>org.hisp.dhis</groupId>
     <artifactId>dhis-web</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.12</version>
   </parent>
-  
-  <artifactId>dhis-web-india-portal</artifactId>
+
+  <artifactId>dhis-web-portal</artifactId>
   <packaging>war</packaging>
   <name>DHIS Web Portal</name>
-  
+
   <build>
     <finalName>dhis</finalName>
   </build>
-  
+
   <dependencies>
-  
+
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
-	</dependency>
-	
+    </dependency>
+
     <!-- DHIS -->
-    
+
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-commons</artifactId>
@@ -35,25 +35,40 @@
       <artifactId>dhis-web-commons-resources</artifactId>
       <type>war</type>
     </dependency>
+
+    <!-- Web-API modules -->
+
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-api</artifactId>
-    </dependency>	
-    
+    </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-api-fred</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
+
     <!-- Web maintenance modules -->
-    
+
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-sms</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-maintenance-datadictionary</artifactId>
       <version>${project.version}</version>
       <type>war</type>
-    </dependency>	
+    </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-maintenance-dataset</artifactId>
       <version>${project.version}</version>
       <type>war</type>
-    </dependency>	
+    </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-maintenance-organisationunit</artifactId>
@@ -78,19 +93,18 @@
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
-	<dependency>
+    <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-maintenance-patient</artifactId>
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
-  <dependency>
+    <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-maintenance-mobile</artifactId>
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
-	
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-importexport</artifactId>
@@ -102,7 +116,7 @@
       <artifactId>dhis-web-validationrule</artifactId>
       <version>${project.version}</version>
       <type>war</type>
-    </dependency>	
+    </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-dataentry</artifactId>
@@ -114,7 +128,7 @@
       <artifactId>dhis-web-dashboard-integration</artifactId>
       <version>${project.version}</version>
       <type>war</type>
-    </dependency>	
+    </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-mapping</artifactId>
@@ -127,14 +141,11 @@
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
-	<!--
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-api-mobile</artifactId>
-      <version>${project.version}</version>
       <type>jar</type>
     </dependency>
-	-->
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-light</artifactId>
@@ -143,23 +154,40 @@
     </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-mobile</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-reporting</artifactId>
       <version>${project.version}</version>
       <type>war</type>
-    </dependency>	
+    </dependency>
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-visualizer</artifactId>
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-pivot</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-appmanager</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
 	
     <!-- India modules -->
-    
-
+    	
     <dependency>
       <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-coldchain</artifactId>
+      <artifactId>dhis-web-alert</artifactId>
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
@@ -171,13 +199,6 @@
       <type>war</type>
     </dependency>
 	
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-reports-national</artifactId>
-      <version>${project.version}</version>
-      <type>war</type>
-    </dependency>
-
 	<dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-dataentry-national</artifactId>
@@ -201,26 +222,27 @@
 
     <dependency>
       <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-reports-national</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
+
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-survey</artifactId>
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
-
-	<dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-web-coldchain</artifactId>
-      <version>${project.version}</version>
-      <type>war</type>
-    </dependency>
-<!-- SMS Mobile application -->
-<!--
+	
+	<!-- SMS Mobile application -->
+	<!--
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-mobile</artifactId>
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
--->       
+	-->       
   </dependencies>
   <properties>
     <rootDir>../../</rootDir>

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
=== modified file 'dhis-2/pom.xml'
=== modified file 'local/in/dhis-in-api/pom.xml'
--- local/in/dhis-in-api/pom.xml	2013-03-25 05:08:43 +0000
+++ local/in/dhis-in-api/pom.xml	2013-08-12 14:01:06 +0000
@@ -1,22 +1,25 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.hisp.dhis</groupId>
-    <artifactId>dhis</artifactId>
-	<version>2.12-SNAPSHOT</version>
-  </parent>
-  
-  <artifactId>dhis-in-api</artifactId>
-  <packaging>jar</packaging>
-  <name>DHIS India API</name>
-	
-  <dependencies>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-api</artifactId>
-	  <version>${project.version}</version>
-    </dependency>
-  </dependencies>
-			
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.hisp.dhis</groupId>
+        <artifactId>dhis</artifactId>
+        <version>2.12</version>
+    </parent>
+
+    <artifactId>dhis-in-api</artifactId>
+    <packaging>jar</packaging>
+    <name>DHIS India API</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hisp.dhis</groupId>
+            <artifactId>dhis-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+
 </project>

=== removed directory 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain'
=== removed directory 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog'
=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/Catalog.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/Catalog.java	2012-05-30 10:46:26 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/Catalog.java	1970-01-01 00:00:00 +0000
@@ -1,202 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.io.File;
-import java.sql.Blob;
-
-import org.hisp.dhis.common.BaseNameableObject;
-//public class Catalog implements Serializable
-public class Catalog extends BaseNameableObject
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = -6551567526188061690L;
-    
-    public static final String DEFAULT_CCEMFOLDER = "CCEMIMAGES";
-    
-    private int id;
-    
-    private String name;
-    
-    private String description;
-    
-    private String catalogImage;
-    
-    //private Blob image;
-
-    private CatalogType catalogType;
-    
-   // private File image;
-    
-    //private byte[] image;
-    
-
-    // -------------------------------------------------------------------------
-    // Contructors
-    // -------------------------------------------------------------------------
-    public Catalog()
-    {
-        
-    }
-
-    public Catalog( String name, CatalogType catalogType )
-    {
-        this.name = name;
-        this.catalogType = catalogType;
-    }
-    
-    public Catalog( String name, String description, CatalogType catalogType )
-    {
-        this.name = name;
-        this.description = description;
-        this.catalogType = catalogType;
-    }
-    
-    /*
-    public Catalog( Blob image ) 
-    {
-        this.image = image;
-    }
-    
-   
-    public Catalog( byte[] image ) 
-    {
-        this.image = image;
-    }
-    */
-
-    // -------------------------------------------------------------------------
-    // hashCode and equals
-    // -------------------------------------------------------------------------
-
-
-
-    @Override
-    public int hashCode()
-    {
-        return name.hashCode();
-    }
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof Catalog) )
-        {
-            return false;
-        }
-
-        final Catalog other = (Catalog) o;
-
-        return name.equals( other.getName() );
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    public String getDescription()
-    {
-        return description;
-    }
-
-    public void setDescription( String description )
-    {
-        this.description = description;
-    }
-
-    public CatalogType getCatalogType()
-    {
-        return catalogType;
-    }
-
-    public void setCatalogType( CatalogType catalogType )
-    {
-        this.catalogType = catalogType;
-    }
-    
-    public String getCatalogImage()
-    {
-        return catalogImage;
-    }
-
-    public void setCatalogImage( String catalogImage )
-    {
-        this.catalogImage = catalogImage;
-    }
-    /*
-    public File getImage()
-    {
-        return image;
-    }
-
-    public void setImage( File image )
-    {
-        this.image = image;
-    }
-    
-    public void setBinaryStream( Blob image )
-    {
-        this.image = image;
-    }
-    
-    public Blob getBinaryStream()
-    {
-        return image;
-    }
-    
-    public Blob getImage()
-    {
-        return image;
-    }
-
-    public void setImage( Blob image )
-    {
-        this.image = image;
-    }
-    
-    
-    public byte[] getImage()
-    {
-        return image;
-    }
-
-    public void setImage( byte[] image )
-    {
-        this.image = image;
-    }
-    */
-
-    
-    
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataEntryService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataEntryService.java	2012-07-21 10:27:27 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataEntryService.java	1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-import java.util.regex.Pattern;
-
-import org.hisp.dhis.i18n.I18n;
-
-/**
- * @author Mithilesh Kumar Thakur
- *
- * @version CatalogDataEntryService.java Jun 7, 2012 5:12:27 PM	
- */
-public interface CatalogDataEntryService
-{
-    final Pattern INPUT_PATTERN = Pattern.compile( "(<input.*?)[/]?>", Pattern.DOTALL );
-    
-    //final Pattern IDENTIFIER_PATTERN_FIELD = Pattern.compile( "id=\"(\\d+)-(\\d+)-val\"" );
-    
-    final Pattern IDENTIFIER_PATTERN_FIELD = Pattern.compile( "id=\"attr(\\d+)\"" );
-    
-    //--------------------------------------------------------------------------
-    // ProgramDataEntryService
-    //--------------------------------------------------------------------------
-    
-    String prepareDataEntryFormForCatalog( String htmlCode, Collection<CatalogDataValue> dataValues, String disabled,
-        I18n i18n, CatalogType catalogType );
-    
-    String prepareDataEntryFormForEdit( String htmlCode );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValue.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValue.java	2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValue.java	1970-01-01 00:00:00 +0000
@@ -1,107 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.io.Serializable;
-
-public class CatalogDataValue implements Serializable
-{
-
-    private Catalog catalog;
-    
-    private CatalogTypeAttribute catalogTypeAttribute;
-    
-    private String value;
-    
-    private CatalogTypeAttributeOption catalogTypeAttributeOption;
-    
-    // -------------------------------------------------------------------------
-    // Constructor
-    // -------------------------------------------------------------------------
-    public CatalogDataValue( )
-    {
-        
-    }
-    public CatalogDataValue( Catalog catalog, CatalogTypeAttribute catalogTypeAttribute, String value )
-    {
-        this.catalog = catalog;
-        this.catalogTypeAttribute = catalogTypeAttribute;
-        this.value = value;
-    }
-
-    // -------------------------------------------------------------------------
-    // hashCode and equals
-    // -------------------------------------------------------------------------
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof CatalogDataValue) )
-        {
-            return false;
-        }
-
-        final CatalogDataValue other = (CatalogDataValue) o;
-
-        return catalogTypeAttribute.equals( other.getCatalogTypeAttribute() ) && catalog.equals( other.getCatalog() );
-
-    }
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-
-        result = result * prime + catalogTypeAttribute.hashCode();
-        result = result * prime + catalog.hashCode();
-
-        return result;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-    
-    public Catalog getCatalog()
-    {
-        return catalog;
-    }
-    public void setCatalog( Catalog catalog )
-    {
-        this.catalog = catalog;
-    }
-    public CatalogTypeAttribute getCatalogTypeAttribute()
-    {
-        return catalogTypeAttribute;
-    }
-    public void setCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        this.catalogTypeAttribute = catalogTypeAttribute;
-    }
-    public String getValue()
-    {
-        return value;
-    }
-    public void setValue( String value )
-    {
-        this.value = value;
-    }
-    public CatalogTypeAttributeOption getCatalogTypeAttributeOption()
-    {
-        return catalogTypeAttributeOption;
-    }
-    public void setCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        this.catalogTypeAttributeOption = catalogTypeAttributeOption;
-    }
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueService.java	2012-04-30 11:56:21 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueService.java	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-public interface CatalogDataValueService
-{
-    String ID = CatalogDataValueService.class.getName();
-    
-    void addCatalogDataValue( CatalogDataValue catalogDataValue );
-
-    void updateCatalogDataValue( CatalogDataValue catalogDataValue );
-
-    void deleteCatalogDataValue( CatalogDataValue catalogDataValue );
-
-    Collection<CatalogDataValue> getAllCatalogDataValues();
-    
-    Collection<CatalogDataValue> getAllCatalogDataValuesByCatalog( Catalog catalog );
-    
-    CatalogDataValue catalogDataValue ( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute );
-    
-    CatalogDataValue catalogDataValue ( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute, CatalogTypeAttributeOption catalogTypeAttributeOption );
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueStore.java	2012-04-30 11:56:21 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueStore.java	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-public interface CatalogDataValueStore
-{
-    String ID = CatalogDataValueStore.class.getName();
-    
-    void addCatalogDataValue( CatalogDataValue catalogDataValue );
-
-    void updateCatalogDataValue( CatalogDataValue catalogDataValue );
-
-    void deleteCatalogDataValue( CatalogDataValue catalogDataValue );
-
-    Collection<CatalogDataValue> getAllCatalogDataValues();
-    
-    Collection<CatalogDataValue> getAllCatalogDataValuesByCatalog( Catalog catalog );
-    
-    CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute );
-    
-    CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute, CatalogTypeAttributeOption catalogTypeAttributeOption );
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogService.java	2012-06-26 08:38:56 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogService.java	1970-01-01 00:00:00 +0000
@@ -1,51 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-import java.util.List;
-
-public interface CatalogService
-{
-    String ID = CatalogService.class.getName();
-    
-    int addCatalog( Catalog catalog );
-
-    void updateCatalog( Catalog catalog );
-
-    void deleteCatalog( Catalog catalog );
-    
-    void deleteCatalogData( Catalog catalog );
-
-    Collection<Catalog> getAllCatalogs();
-    
-    Catalog getCatalog( int id );
-    
-    Catalog getCatalogByName( String name );
-    
-    Collection<Catalog> getCatalogs( CatalogType catalogType );
-    
-    int createCatalog( Catalog catalog, List<CatalogDataValue> catalogDataValues );
-    
-    void updateCatalogAndDataValue(  Catalog catalog, List<CatalogDataValue> valuesForSave, List<CatalogDataValue> valuesForUpdate, Collection<CatalogDataValue> valuesForDelete );
-
-    void deleteCatalogAndDataValue( Catalog catalog );
-    
-    
-    //  methods
-    
-    int getCatalogCount();
-    
-    int getCatalogCountByName( String name );
-    
-    Collection<Catalog> getCatalogsBetween( int first, int max );
-    
-    Collection<Catalog> getCatalogsBetweenByName( String name, int first, int max );
-    
-    
-    int getCountCatalog( CatalogType catalogType );
-    
-    Collection<Catalog> getCatalogs( CatalogType catalogType, int min, int max );
-    
-    int getCountCatalog( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute, String searchText );
-    
-    Collection<Catalog> getCatalogs( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute, String searchText, int min, int max );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogStore.java	2012-06-26 08:38:56 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogStore.java	1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericNameableObjectStore;
-
-public interface CatalogStore extends GenericNameableObjectStore<Catalog>
-{
-
-    String ID = CatalogStore.class.getName();
-    /*
-    int addCatalog( Catalog catalog );
-
-    void updateCatalog( Catalog catalog );
-
-    void deleteCatalog( Catalog catalog );
-    */
-    Catalog getCatalog( int id );
-    
-    Catalog getCatalogByName( String name );
-
-    Collection<Catalog> getAllCatalogs();
-    
-    Collection<Catalog> getCatalogs( CatalogType catalogType );
-    
-    
-    
-    int getCountCatalog( CatalogType catalogType );
-    
-    Collection<Catalog> getCatalogs( CatalogType catalogType, int min, int max );
-    
-    int getCountCatalog( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute, String searchText );
-    
-    Collection<Catalog> getCatalogs( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute, String searchText, int min, int max );
-    
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogType.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogType.java	2012-05-30 10:46:26 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogType.java	1970-01-01 00:00:00 +0000
@@ -1,134 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.common.BaseNameableObject;
-import org.hisp.dhis.dataentryform.DataEntryForm;
-
-//public class CatalogType implements Serializable
-public class CatalogType extends BaseNameableObject
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = -6551567526188061690L;
-    
-    private int id;
-    
-    private String name;
-    
-    private String description;
-    
-    private List<CatalogTypeAttribute> catalogTypeAttributes = new ArrayList<CatalogTypeAttribute>();
-	
-    private DataEntryForm dataEntryForm;
-    
-    private String catalogTypeImage;
- 
-    // -------------------------------------------------------------------------
-    // Contructors
-    // -------------------------------------------------------------------------
-    public CatalogType()
-    {
-
-    }
-    public CatalogType( String name )
-    {
-        this.name = name;
-    }
-    
-    public CatalogType( String name, String description )
-    {
-        this.name = name;
-        this.description = description;
-    }
-    
-    // -------------------------------------------------------------------------
-    // hashCode and equals
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int hashCode()
-    {
-        return name.hashCode();
-    }
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof CatalogType) )
-        {
-            return false;
-        }
-
-        final CatalogType other = (CatalogType) o;
-
-        return name.equals( other.getName() );
-    }
-    
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-    
-    public int getId()
-    {
-        return id;
-    }
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-    public String getName()
-    {
-        return name;
-    }
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-    public String getDescription()
-    {
-        return description;
-    }
-    public void setDescription( String description )
-    {
-        this.description = description;
-    }
-
-    public DataEntryForm getDataEntryForm()
-    {
-        return dataEntryForm;
-    }
-    public void setDataEntryForm( DataEntryForm dataEntryForm )
-    {
-        this.dataEntryForm = dataEntryForm;
-    }
-    public List<CatalogTypeAttribute> getCatalogTypeAttributes()
-    {
-        return catalogTypeAttributes;
-    }
-    public void setCatalogTypeAttributes( List<CatalogTypeAttribute> catalogTypeAttributes )
-    {
-        this.catalogTypeAttributes = catalogTypeAttributes;
-    }
-    
-    public String getCatalogTypeImage()
-    {
-        return catalogTypeImage;
-    }
-    public void setCatalogTypeImage( String catalogTypeImage )
-    {
-        this.catalogTypeImage = catalogTypeImage;
-    }
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttribute.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttribute.java	2012-05-09 12:08:52 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttribute.java	1970-01-01 00:00:00 +0000
@@ -1,160 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.List;
-import java.util.Set;
-
-import org.hisp.dhis.common.BaseNameableObject;
-
-public class CatalogTypeAttribute extends BaseNameableObject
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = -6551567526188061690L;
-    
-    public static final String TYPE_DATE = "DATE";
-
-    public static final String TYPE_STRING = "TEXT";
-
-    public static final String TYPE_INT = "NUMBER";
-
-    public static final String TYPE_BOOL = "YES/NO";
-
-    public static final String TYPE_COMBO = "COMBO";
-
-    private int id;
-    
-    private String name;
-    
-    private String description;
-
-    private String valueType;
-    
-    private boolean mandatory;
-
-    private Integer noChars;
-
-    private Set<CatalogTypeAttributeOption> attributeOptions;
-    
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-
-    public CatalogTypeAttribute()
-    {
-    }
-
-    // -------------------------------------------------------------------------
-    // hashCode, equals and toString
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int hashCode()
-    {
-        return name.hashCode();
-    }
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof CatalogTypeAttribute) )
-        {
-            return false;
-        }
-
-        final CatalogTypeAttribute other = (CatalogTypeAttribute) o;
-
-        return name.equals( other.getName() );
-    }
-
-    @Override
-    public String toString()
-    {
-        return "[" + name + "]";
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    public String getDescription()
-    {
-        return description;
-    }
-
-    public void setDescription( String description )
-    {
-        this.description = description;
-    }
-
-    public String getValueType()
-    {
-        return valueType;
-    }
-
-    public void setValueType( String valueType )
-    {
-        this.valueType = valueType;
-    }
-
-    public boolean isMandatory()
-    {
-        return mandatory;
-    }
-
-    public void setMandatory( boolean mandatory )
-    {
-        this.mandatory = mandatory;
-    }
-
-    public Integer getNoChars()
-    {
-        return noChars;
-    }
-
-    public void setNoChars( Integer noChars )
-    {
-        this.noChars = noChars;
-    }
-
-    public Set<CatalogTypeAttributeOption> getAttributeOptions()
-    {
-        return attributeOptions;
-    }
-
-    public void setAttributeOptions( Set<CatalogTypeAttributeOption> attributeOptions )
-    {
-        this.attributeOptions = attributeOptions;
-    }
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeOption.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeOption.java	2012-04-21 10:23:39 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeOption.java	1970-01-01 00:00:00 +0000
@@ -1,102 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.io.Serializable;
-
-public class CatalogTypeAttributeOption implements Serializable
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = 9052641474847384010L;
-    
-    private int id;
-    
-    private String name;
-
-    private CatalogTypeAttribute catalogTypeAttribute;
-    
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-
-    public CatalogTypeAttributeOption()
-    {
-        
-    }
-    
-    // -------------------------------------------------------------------------
-    // hashCode, equals and toString
-    // -------------------------------------------------------------------------
-    
-    @Override
-    public int hashCode()
-    {
-        return name.hashCode();
-    }
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof CatalogTypeAttributeOption) )
-        {
-            return false;
-        }
-
-        final CatalogTypeAttributeOption other = (CatalogTypeAttributeOption) o;
-
-        return name.equals( other.getName() );
-    }
-
-    @Override
-    public String toString()
-    {
-        return "[" + name + "]";
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    public CatalogTypeAttribute getCatalogTypeAttribute()
-    {
-        return catalogTypeAttribute;
-    }
-
-    public void setCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        this.catalogTypeAttribute = catalogTypeAttribute;
-    }
-
-    
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeOptionService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeOptionService.java	2012-04-21 10:23:39 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeOptionService.java	1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-public interface CatalogTypeAttributeOptionService
-{
-    String ID = CatalogTypeAttributeOptionService.class.getName();
-    
-    int addCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption );
-
-    void updateCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption );
-
-    void deleteCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption );
-    
-    CatalogTypeAttributeOption getCatalogTypeAttributeOption( int id );
-    
-    int countByCatalogTypeAttributeoption( CatalogTypeAttributeOption catalogTypeAttributeOption );
-
-    Collection<CatalogTypeAttributeOption> getCatalogTypeAttributeOptions( CatalogTypeAttribute catalogTypeAttribute );
-    
-    CatalogTypeAttributeOption getCatalogTypeAttributeOptionName( CatalogTypeAttribute catalogTypeAttribute, String name );
-    
-    Collection<CatalogTypeAttributeOption> getAllCatalogTypeAttributeOptions();
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeOptionStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeOptionStore.java	2012-04-21 10:23:39 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeOptionStore.java	1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-public interface CatalogTypeAttributeOptionStore
-{
-    String ID = CatalogTypeAttributeOptionStore.class.getName();
-    
-    int addCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption );
-
-    void updateCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption );
-
-    void deleteCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption );
-    
-    CatalogTypeAttributeOption getCatalogTypeAttributeOption( int id );
-    
-    int countByCatalogTypeAttributeoption( CatalogTypeAttributeOption catalogTypeAttributeOption );
-    
-    Collection<CatalogTypeAttributeOption> getCatalogTypeAttributeOptions( CatalogTypeAttribute catalogTypeAttribute );
-    
-    CatalogTypeAttributeOption getCatalogTypeAttributeOptionName( CatalogTypeAttribute catalogTypeAttribute, String name );
-    
-    Collection<CatalogTypeAttributeOption> getAllCatalogTypeAttributeOptions();
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeService.java	2012-05-07 11:49:40 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeService.java	1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-public interface CatalogTypeAttributeService
-{
-    String ID = CatalogTypeAttributeService.class.getName();
-    
-    int addCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute );
-
-    void updateCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute );
-
-    void deleteCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute );
-    
-    CatalogTypeAttribute getCatalogTypeAttribute( int id );
-    
-    CatalogTypeAttribute getCatalogTypeAttributeByName( String name );
-    
-    //CatalogType getCatalogTypeByAttribute( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute);
-
-    Collection<CatalogTypeAttribute> getAllCatalogTypeAttributes();
-    
-    //  methods
-    
-    int getCatalogTypeAttributeCount();
-    
-    int getCatalogTypeAttributeCountByName( String name );
-    
-    Collection<CatalogTypeAttribute> getCatalogTypeAttributesBetween( int first, int max );
-    
-    Collection<CatalogTypeAttribute> getCatalogTypeAttributesBetweenByName( String name, int first, int max );
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeStore.java	2012-05-07 11:49:40 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeAttributeStore.java	1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericNameableObjectStore;
-
-public interface CatalogTypeAttributeStore extends GenericNameableObjectStore<CatalogTypeAttribute>
-{
-    String ID = CatalogTypeAttributeStore.class.getName();
-    
-    /*
-    int addCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute );
-    
-    void updateCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute );
-
-    void deleteCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute );
-    */
-    CatalogTypeAttribute getCatalogTypeAttribute( int id );
-    
-    CatalogTypeAttribute getCatalogTypeAttributeByName( String name );
-    
-    Collection<CatalogTypeAttribute> getAllCatalogTypeAttributes();
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeService.java	2012-05-09 07:02:15 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeService.java	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-public interface CatalogTypeService
-{
-    String ID = CatalogTypeService.class.getName();
-    
-    int addCatalogType( CatalogType catalogType );
-
-    void updateCatalogType( CatalogType catalogType );
-
-    void deleteCatalogType( CatalogType catalogType );
-    
-    CatalogType getCatalogType( int id );
-    
-    CatalogType getCatalogTypeByName( String name );
-
-    Collection<CatalogType> getAllCatalogTypes();
-    
-    //  methods
-    
-    int getCatalogTypeCount();
-    
-    int getCatalogTypeCountByName( String name );
-    
-    Collection<CatalogType> getCatalogTypesBetween( int first, int max );
-    
-    Collection<CatalogType> getCatalogTypesBetweenByName( String name, int first, int max );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeStore.java	2012-05-09 07:02:15 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogTypeStore.java	1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericNameableObjectStore;
-
-//public interface CatalogTypeStore
-public interface CatalogTypeStore extends GenericNameableObjectStore<CatalogType>
-{
-    String ID = CatalogTypeStore.class.getName();
-    /*
-    int addCatalogType( CatalogType catalogType );
-
-    void updateCatalogType( CatalogType catalogType );
-
-    void deleteCatalogType( CatalogType catalogType );
-    */
-    
-    CatalogType getCatalogType( int id );
-    
-    CatalogType getCatalogTypeByName( String name );
-    
-    //CatalogType getCatalogTypeByAttribute( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute);
-
-    Collection<CatalogType> getAllCatalogTypes();
-
-}

=== removed directory 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator'
=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogComparator.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogComparator.java	2012-04-30 11:56:21 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogComparator.java	1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-package org.hisp.dhis.coldchain.catalog.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.coldchain.catalog.Catalog;
-
-public class CatalogComparator implements Comparator<Catalog>
-{
-    public int compare( Catalog catalog0, Catalog catalog1 )
-    {
-        return catalog0.getName().compareToIgnoreCase( catalog1.getName() );
-    }
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogTypeAttributeComparator.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogTypeAttributeComparator.java	2012-04-21 10:23:39 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogTypeAttributeComparator.java	1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-package org.hisp.dhis.coldchain.catalog.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute;
-
-public class CatalogTypeAttributeComparator
-    implements Comparator<CatalogTypeAttribute>
-{
-    public int compare( CatalogTypeAttribute catalogTypeAttribute0, CatalogTypeAttribute catalogTypeAttribute1 )
-    {
-        return catalogTypeAttribute0.getName().compareToIgnoreCase( catalogTypeAttribute1.getName() );
-    }
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogTypeAttributeOptionComparator.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogTypeAttributeOptionComparator.java	2012-08-01 12:21:34 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogTypeAttributeOptionComparator.java	1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-package org.hisp.dhis.coldchain.catalog.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOption;
-
-/**
- * @author Mithilesh Kumar Thakur
- *
- * @version CatalogTypeAttributeOptionComparator.java Aug 1, 2012 12:57:58 PM	
- */
-public class CatalogTypeAttributeOptionComparator implements Comparator<CatalogTypeAttributeOption>
-{
-    public int compare( CatalogTypeAttributeOption catalogTypeAttributeOption0, CatalogTypeAttributeOption catalogTypeAttributeOption1 )
-    {
-        return catalogTypeAttributeOption0.getName().compareToIgnoreCase( catalogTypeAttributeOption1.getName() );
-    }
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogTypeComparator.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogTypeComparator.java	2012-05-02 06:03:10 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogTypeComparator.java	1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-package org.hisp.dhis.coldchain.catalog.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.coldchain.catalog.CatalogType;
-
-public class CatalogTypeComparator
-implements Comparator<CatalogType>
-{
-    public int compare( CatalogType catalogType0, CatalogType catalogType1 )
-    {
-        return catalogType0.getName().compareToIgnoreCase( catalogType1.getName() );
-    }
-}

=== removed directory 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory'
=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/Equipment.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/Equipment.java	2012-05-15 12:19:04 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/Equipment.java	1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.io.Serializable;
-
-public class Equipment implements Serializable
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = -6551567526188061690L;
-    
-    private EquipmentInstance equipmentInstance;
-    
-    private InventoryTypeAttribute inventoryTypeAttribute;
-    
-    private String value;
-    
-    private InventoryTypeAttributeOption inventoryTypeAttributeOption;
-    
-    // -------------------------------------------------------------------------
-    // Constructor
-    // -------------------------------------------------------------------------
-
-    public Equipment()
-    {
-        
-    }
-    public Equipment( EquipmentInstance equipmentInstance, InventoryTypeAttribute inventoryTypeAttribute, String value )
-    {
-        this.equipmentInstance = equipmentInstance;
-        this.inventoryTypeAttribute = inventoryTypeAttribute;
-        this.value = value;
-    }
-    
-    // -------------------------------------------------------------------------
-    // hashCode and equals
-    // -------------------------------------------------------------------------
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof Equipment) )
-        {
-            return false;
-        }
-
-        final Equipment other = (Equipment) o;
-
-        return equipmentInstance.equals( other.getEquipmentInstance() ) && inventoryTypeAttribute.equals( other.getInventoryTypeAttribute() );
-
-    }
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-
-        result = result * prime + equipmentInstance.hashCode();
-        result = result * prime + inventoryTypeAttribute.hashCode();
-
-        return result;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public EquipmentInstance getEquipmentInstance()
-    {
-        return equipmentInstance;
-    }
-    public void setEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        this.equipmentInstance = equipmentInstance;
-    }
-    public InventoryTypeAttribute getInventoryTypeAttribute()
-    {
-        return inventoryTypeAttribute;
-    }
-    public void setInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        this.inventoryTypeAttribute = inventoryTypeAttribute;
-    }
-    public String getValue()
-    {
-        return value;
-    }
-    public void setValue( String value )
-    {
-        this.value = value;
-    }
-    public InventoryTypeAttributeOption getInventoryTypeAttributeOption()
-    {
-        return inventoryTypeAttributeOption;
-    }
-    public void setInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption )
-    {
-        this.inventoryTypeAttributeOption = inventoryTypeAttributeOption;
-    }
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentDataValue.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentDataValue.java	2012-05-16 11:24:58 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentDataValue.java	1970-01-01 00:00:00 +0000
@@ -1,142 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.period.Period;
-
-public class EquipmentDataValue  implements Serializable
-{
-    private EquipmentInstance equipmentInstance;
-
-    private DataElement dataElement;
-    
-    private Period period;
-    
-    private String value;
-
-    private String storedBy;
-
-    private Date timestamp;
-
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-
-    public EquipmentDataValue()
-    {
-    }
-
-    public EquipmentDataValue( EquipmentInstance equipmentInstance, DataElement dataElement, Period period )
-    {
-        this.dataElement = dataElement;
-        this.period = period;
-        this.equipmentInstance = equipmentInstance;
-    }
-
-    // -------------------------------------------------------------------------
-    // hashCode and equals
-    // -------------------------------------------------------------------------
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof EquipmentDataValue) )
-        {
-            return false;
-        }
-
-        final EquipmentDataValue other = (EquipmentDataValue) o;
-
-        return dataElement.equals( other.getDataElement() ) && period.equals( other.getPeriod() ) && equipmentInstance.equals( other.getEquipmentInstance() );
-    }
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-
-        result = result * prime + period.hashCode();
-        result = result * prime + dataElement.hashCode();
-        result = result * prime + equipmentInstance.hashCode();
-
-        return result;
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public EquipmentInstance getEquipmentInstance()
-    {
-        return equipmentInstance;
-    }
-
-    public void setEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        this.equipmentInstance = equipmentInstance;
-    }
-
-    public DataElement getDataElement()
-    {
-        return dataElement;
-    }
-
-    public void setDataElement( DataElement dataElement )
-    {
-        this.dataElement = dataElement;
-    }
-
-    public Period getPeriod()
-    {
-        return period;
-    }
-
-    public void setPeriod( Period period )
-    {
-        this.period = period;
-    }
-
-    public String getValue()
-    {
-        return value;
-    }
-
-    public void setValue( String value )
-    {
-        this.value = value;
-    }
-
-    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;
-    }
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentDataValueService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentDataValueService.java	2012-05-23 06:35:17 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentDataValueService.java	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.period.Period;
-
-public interface EquipmentDataValueService
-{
-    String ID = EquipmentDataValueService.class.getName();
-    
-    // -------------------------------------------------------------------------
-    // EquipmentDataValue
-    // -------------------------------------------------------------------------
-
-    void addEquipmentDataValue( EquipmentDataValue equipmentDataValue );
-    
-    void updateEquipmentDataValue( EquipmentDataValue equipmentDataValue );
-    
-    void deleteEquipmentDataValue( EquipmentDataValue equipmentDataValue );
-    
-    Collection<EquipmentDataValue> getEquipmentDataValues( EquipmentInstance equipmentInstance, Period period, Collection<DataElement> dataElements );
-    
-    EquipmentDataValue getEquipmentDataValue( EquipmentInstance equipmentInstance, Period period, DataElement dataElement );
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentDataValueStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentDataValueStore.java	2012-05-23 06:35:17 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentDataValueStore.java	1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.period.Period;
-
-public interface EquipmentDataValueStore
-{
-    String ID = EquipmentDataValueStore.class.getName();
-    
-    // -------------------------------------------------------------------------
-    // EquipmentDataValue
-    // -------------------------------------------------------------------------
-
-    void addEquipmentDataValue( EquipmentDataValue equipmentDataValue );
-    
-    void updateEquipmentDataValue( EquipmentDataValue equipmentDataValue );
-    
-    void deleteEquipmentDataValue( EquipmentDataValue equipmentDataValue );
-    
-    Collection<EquipmentDataValue> getEquipmentDataValues( EquipmentInstance equipmentInstance, Period period, Collection<DataElement> dataElements );
-    
-    EquipmentDataValue getEquipmentDataValue( EquipmentInstance equipmentInstance, Period period, DataElement dataElement );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentInstance.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentInstance.java	2012-06-13 06:35:38 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentInstance.java	1970-01-01 00:00:00 +0000
@@ -1,143 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.io.Serializable;
-import java.util.Set;
-
-import org.hisp.dhis.coldchain.catalog.Catalog;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-public class EquipmentInstance implements Serializable
-{
-
-    private int id;
-    
-    private InventoryType inventoryType;
-    
-    private OrganisationUnit organisationUnit;
-    
-    private Catalog catalog;
-    
-    private boolean working = false;
-    
-    private Set<EquipmentStatus> equipmentStatusUpdates;
-    
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-    
-    public EquipmentInstance()
-    {
-        
-    }
-    
-    public EquipmentInstance( InventoryType inventoryType, OrganisationUnit organisationUnit )
-    {
-        this.inventoryType = inventoryType;
-        this.organisationUnit = organisationUnit;
-    }
-    
-    // -------------------------------------------------------------------------
-    // hashCode and equals
-    // -------------------------------------------------------------------------
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof EquipmentInstance) )
-        {
-            return false;
-        }
-
-        final EquipmentInstance other = (EquipmentInstance) o;
-
-        return inventoryType.equals( other.getInventoryType() ) && organisationUnit.equals( other.getOrganisationUnit() );
-
-    }
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-
-        result = result * prime + inventoryType.hashCode();
-        result = result * prime + organisationUnit.hashCode();
-
-        return result;
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public InventoryType getInventoryType()
-    {
-        return inventoryType;
-    }
-
-    public void setInventoryType( InventoryType inventoryType )
-    {
-        this.inventoryType = inventoryType;
-    }
-
-    public OrganisationUnit getOrganisationUnit()
-    {
-        return organisationUnit;
-    }
-
-    public void setOrganisationUnit( OrganisationUnit organisationUnit )
-    {
-        this.organisationUnit = organisationUnit;
-    }
-
-    public boolean isWorking()
-    {
-        return working;
-    }
-
-    public void setWorking( boolean working )
-    {
-        this.working = working;
-    }
-
-    public Set<EquipmentStatus> getEquipmentStatusUpdates()
-    {
-        return equipmentStatusUpdates;
-    }
-
-    public void setEquipmentStatusUpdates( Set<EquipmentStatus> equipmentStatusUpdates )
-    {
-        this.equipmentStatusUpdates = equipmentStatusUpdates;
-    }
-
-    public Catalog getCatalog()
-    {
-        return catalog;
-    }
-
-    public void setCatalog( Catalog catalog )
-    {
-        this.catalog = catalog;
-    }
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentInstanceService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentInstanceService.java	2012-05-15 10:33:46 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentInstanceService.java	1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-public interface EquipmentInstanceService
-{
-    String ID = EquipmentInstanceService.class.getName();
-    
-    int addEquipmentInstance( EquipmentInstance equipmentInstance );
-
-    void updateEquipmentInstance( EquipmentInstance equipmentInstance );
-
-    void deleteEquipmentInstance( EquipmentInstance equipmentInstance );
-    
-    void deleteCompleteEquipmentInstance( EquipmentInstance equipmentInstance );
-    
-    int createEquipment( EquipmentInstance equipmentInstance, List<Equipment> equipmentDetails );
-
-    EquipmentInstance getEquipmentInstance( int id );
-    
-    Collection<EquipmentInstance> getAllEquipmentInstance();
-
-    Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType );
-    
-    Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit );
-    
-    int getCountEquipmentInstance( OrganisationUnit orgUnit, InventoryType inventoryType );
-    
-    Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType, int min, int max );
-    
-    int getCountEquipmentInstance( OrganisationUnit orgUnit, InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, String searchText );
-    
-    Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, String searchText, int min, int max );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentInstanceStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentInstanceStore.java	2012-05-02 09:18:42 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentInstanceStore.java	1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericStore;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-public interface EquipmentInstanceStore extends GenericStore<EquipmentInstance>
-{
-    String ID = EquipmentInstanceStore.class.getName();
-    
-    //int addEquipmentInstance( EquipmentInstance equipmentInstance );
-
-    //void updateEquipmentInstance( EquipmentInstance equipmentInstance );
-
-    //void deleteEquipmentInstance( EquipmentInstance equipmentInstance );
-
-    //Collection<EquipmentInstance> getAllEquipmentInstance();
-    
-    Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit );
-    
-    Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType );
-    
-    int getCountEquipmentInstance( OrganisationUnit orgUnit, InventoryType inventoryType );
-    
-    Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType, int min, int max );
-
-    int getCountEquipmentInstance( OrganisationUnit orgUnit, InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, String searchText );
-
-    Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, String searchText, int min, int max );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentService.java	2012-05-19 14:42:20 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentService.java	1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-import java.util.List;
-
-public interface EquipmentService
-{
-    String ID = EquipmentService.class.getName();
-    
-    void addEquipment( Equipment equipment );
-
-    void updateEquipment( Equipment equipment );
-
-    void deleteEquipment( Equipment equipment );
-
-    Collection<Equipment> getAllEquipments();
-
-    Collection<Equipment> getEquipments( EquipmentInstance equipmentInstance );
-    
-    Equipment getEquipment( EquipmentInstance equipmentInstance, InventoryTypeAttribute inventoryTypeAttribute );
-    
-    //Map<String, String> inventryTypeAttributeAndValue( EquipmentInstance equipmentInstance, List<InventoryTypeAttribute> inventoryTypeAttributeList );
-    
-    String inventryTypeAttributeAndValue( EquipmentInstance equipmentInstance, List<InventoryTypeAttribute> inventoryTypeAttributeList );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStatus.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStatus.java	2012-04-30 08:30:00 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStatus.java	1970-01-01 00:00:00 +0000
@@ -1,153 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.io.Serializable;
-import java.util.Date;
-
-public class EquipmentStatus implements Serializable
-{
-    public static final String STATUS_WORKING = "WORKING";
-    public static final String STATUS_NOTWORKING = "NOTWORKING";
-    public static final String STATUS_REPAIR = "REPAIR";
-    
-    
-    private int id;
-    
-    private EquipmentInstance equipmentInstance;
-    
-    private Date reportingDate;
-    
-    private Date updationDate;
-    
-    private String status;
-    
-    private String description;
-    
-    private String storedBy;
-    
-    
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-
-    public EquipmentStatus( )
-    {
-        
-    }
-    
-    public EquipmentStatus( EquipmentInstance equipmentInstance, Date reportingDate, Date updationDate, String status )
-    {
-        this.equipmentInstance = equipmentInstance;
-    }
-    
-    // -------------------------------------------------------------------------
-    // hashCode and equals
-    // -------------------------------------------------------------------------
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof EquipmentStatus) )
-        {
-            return false;
-        }
-
-        final EquipmentStatus other = (EquipmentStatus) o;
-
-        return equipmentInstance.equals( other.getEquipmentInstance() );
-
-    }
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-
-        result = result * prime + equipmentInstance.hashCode();
-
-        return result;
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public EquipmentInstance getEquipmentInstance()
-    {
-        return equipmentInstance;
-    }
-
-    public void setEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        this.equipmentInstance = equipmentInstance;
-    }
-
-    public Date getReportingDate()
-    {
-        return reportingDate;
-    }
-
-    public void setReportingDate( Date reportingDate )
-    {
-        this.reportingDate = reportingDate;
-    }
-
-    public Date getUpdationDate()
-    {
-        return updationDate;
-    }
-
-    public void setUpdationDate( Date updationDate )
-    {
-        this.updationDate = updationDate;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-
-    public void setStatus( String status )
-    {
-        this.status = status;
-    }
-
-    public String getDescription()
-    {
-        return description;
-    }
-
-    public void setDescription( String description )
-    {
-        this.description = description;
-    }
-
-    public String getStoredBy()
-    {
-        return storedBy;
-    }
-
-    public void setStoredBy( String storedBy )
-    {
-        this.storedBy = storedBy;
-    }
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStatusService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStatusService.java	2012-05-02 09:18:42 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStatusService.java	1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-public interface EquipmentStatusService
-{
-    String ID = EquipmentStatusService.class.getName();
-    
-    int addEquipmentStatus( EquipmentStatus equipmentStatus );
-
-    void updateEquipmentStatus( EquipmentStatus equipmentStatus );
-
-    void deleteEquipmentStatus( EquipmentStatus equipmentStatus );
-
-    Collection<EquipmentStatus> getAllEquipmentStatus();
-    
-    Collection<EquipmentStatus> getEquipmentStatusHistory( EquipmentInstance equipmentInstance );
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStatusStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStatusStore.java	2012-05-02 09:18:42 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStatusStore.java	1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericStore;
-
-public interface EquipmentStatusStore extends GenericStore<EquipmentStatus>
-{
-    String ID = EquipmentStatusStore.class.getName();
-    
-    //int addEquipmentStatus( EquipmentStatus equipmentStatus );
-
-    //void updateEquipmentStatus( EquipmentStatus equipmentStatus );
-
-    //void deleteEquipmentStatus( EquipmentStatus equipmentStatus );
-
-    //Collection<EquipmentStatus> getAllEquipmentStatus();
-    
-    Collection<EquipmentStatus> getEquipmentStatusHistory( EquipmentInstance equipmentInstance );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStore.java	2012-05-15 12:19:04 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/EquipmentStore.java	1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-public interface EquipmentStore
-{
-    String ID = EquipmentStore.class.getName();
-    
-    void addEquipment( Equipment equipment );
-
-    void updateEquipment( Equipment equipment );
-
-    void deleteEquipment( Equipment equipment );
-    
-    Collection<Equipment> getAllEquipments();
-
-    Collection<Equipment> getEquipments( EquipmentInstance equipmentInstance );
-    
-    Equipment getEquipment( EquipmentInstance equipmentInstance, InventoryTypeAttribute inventoryTypeAttribute );
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType.java	2012-06-21 09:47:23 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType.java	1970-01-01 00:00:00 +0000
@@ -1,196 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hisp.dhis.coldchain.catalog.CatalogType;
-import org.hisp.dhis.common.BaseNameableObject;
-import org.hisp.dhis.dataentryform.DataEntryForm;
-import org.hisp.dhis.dataset.DataSet;
-
-//public class InventoryType implements Serializable
-public class InventoryType extends BaseNameableObject
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = -6551567526188061690L;
-    
-    private int id;
-    
-    private String name;
-    
-    private String description;
-    
-    private boolean tracking;
-    
-    private CatalogType catalogType;
-    
-   // private Set<InventoryTypeAttribute> inventoryTypeAttributes;
-    
-    //private List<InventoryTypeAttribute> inventoryTypeAttributes = new ArrayList<InventoryTypeAttribute>();
-    
-    //private List<Boolean> display = new ArrayList<Boolean>();
-    
-    private Set<InventoryType_Attribute> inventoryType_Attributes;
-    
-    private Set<DataSet> dataSets = new HashSet<DataSet>();
-    
-    private DataEntryForm dataEntryForm;
-    
-    // -------------------------------------------------------------------------
-    // Contructors
-    // -------------------------------------------------------------------------
-
-    public InventoryType()
-    {
-        
-    }
-    public InventoryType( String name, boolean tracking )
-    {
-        this.name = name;
-        this.tracking = tracking;
-    }
-    
-    public InventoryType( String name, String description, boolean tracking, CatalogType catalogType )
-    {
-        this.name = name;
-        this.description = description;
-        this.tracking = tracking;
-        this.catalogType = catalogType;
-    }
-    
-    // -------------------------------------------------------------------------
-    // hashCode, equals and toString
-    // -------------------------------------------------------------------------
-    @Override
-    public int hashCode()
-    {
-        return name.hashCode();
-    }
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof InventoryType) )
-        {
-            return false;
-        }
-
-        final InventoryType other = (InventoryType) o;
-
-        return name.equals( other.getName() );
-    }
-    
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-    
-    public int getId()
-    {
-        return id;
-    }
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-    public String getName()
-    {
-        return name;
-    }
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-    public String getDescription()
-    {
-        return description;
-    }
-    public void setDescription( String description )
-    {
-        this.description = description;
-    }
-    public boolean isTracking()
-    {
-        return tracking;
-    }
-    public void setTracking( boolean tracking )
-    {
-        this.tracking = tracking;
-    }
-    public CatalogType getCatalogType()
-    {
-        return catalogType;
-    }
-    public void setCatalogType( CatalogType catalogType )
-    {
-        this.catalogType = catalogType;
-    }
-    /*
-    public Set<InventoryTypeAttribute> getInventoryTypeAttributes()
-    {
-        return inventoryTypeAttributes;
-    }
-    public void setInventoryTypeAttributes( Set<InventoryTypeAttribute> inventoryTypeAttributes )
-    {
-        this.inventoryTypeAttributes = inventoryTypeAttributes;
-    }
-    */
-    /*
-    public List<InventoryTypeAttribute> getInventoryTypeAttributes()
-    {
-        return inventoryTypeAttributes;
-    }
-    public void setInventoryTypeAttributes( List<InventoryTypeAttribute> inventoryTypeAttributes )
-    {
-        this.inventoryTypeAttributes = inventoryTypeAttributes;
-    }
-    */
-    public DataEntryForm getDataEntryForm()
-    {
-        return dataEntryForm;
-    }
-    public void setDataEntryForm( DataEntryForm dataEntryForm )
-    {
-        this.dataEntryForm = dataEntryForm;
-    }
-    
-    public Set<DataSet> getDataSets()
-    {
-        return dataSets;
-    }
-    public void setDataSets( Set<DataSet> dataSets )
-    {
-        this.dataSets = dataSets;
-    }
-    /*
-    public boolean isDisplay()
-    {
-        return display;
-    }
-    public void setDisplay( boolean display )
-    {
-        this.display = display;
-    }
-    */
-    
-    public Set<InventoryType_Attribute> getInventoryType_Attributes()
-    {
-        return inventoryType_Attributes;
-    }
-    public void setInventoryType_Attributes( Set<InventoryType_Attribute> inventoryType_Attributes )
-    {
-        this.inventoryType_Attributes = inventoryType_Attributes;
-    }
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttribute.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttribute.java	2012-06-21 09:47:23 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttribute.java	1970-01-01 00:00:00 +0000
@@ -1,186 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hisp.dhis.common.BaseNameableObject;
-
-//public class InventoryTypeAttribute implements Serializable
-public class InventoryTypeAttribute extends BaseNameableObject
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = -6551567526188061690L;
-    
-    public static final String TYPE_DATE = "DATE";
-
-    public static final String TYPE_STRING = "TEXT";
-
-    public static final String TYPE_INT = "NUMBER";
-
-    public static final String TYPE_BOOL = "YES/NO";
-
-    public static final String TYPE_COMBO = "COMBO";
-
-    public static final String TYPE_CATALOG = "CATALOG";
-    
-    private int id;
-    
-    private String name;
-    
-    private String description;
-
-    private String valueType;
-    
-    private boolean mandatory;
-    
-    /*
-     * True if this InventoryTypeAttribute is for display in list
-     */
-    //private boolean display = false;
-    
-    private Integer noChars;
-
-    private Set<InventoryTypeAttributeOption> attributeOptions;
-    
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-
-    public InventoryTypeAttribute()
-    {
-    }
-
-    // -------------------------------------------------------------------------
-    // hashCode, equals and toString
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int hashCode()
-    {
-        return name.hashCode();
-    }
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof InventoryTypeAttribute) )
-        {
-            return false;
-        }
-
-        final InventoryTypeAttribute other = (InventoryTypeAttribute) o;
-
-        return name.equals( other.getName() );
-    }
-
-    @Override
-    public String toString()
-    {
-        return "[" + name + "]";
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    public String getDescription()
-    {
-        return description;
-    }
-
-    public void setDescription( String description )
-    {
-        this.description = description;
-    }
-
-    public String getValueType()
-    {
-        return valueType;
-    }
-
-    public void setValueType( String valueType )
-    {
-        this.valueType = valueType;
-    }
-
-    public boolean isMandatory()
-    {
-        return mandatory;
-    }
-
-    public void setMandatory( boolean mandatory )
-    {
-        this.mandatory = mandatory;
-    }
-
-    public Integer getNoChars()
-    {
-        return noChars;
-    }
-
-    public void setNoChars( Integer noChars )
-    {
-        this.noChars = noChars;
-    }
-
-    public Set<InventoryTypeAttributeOption> getAttributeOptions()
-    {
-        return attributeOptions;
-    }
-
-    public void setAttributeOptions( Set<InventoryTypeAttributeOption> attributeOptions )
-    {
-        this.attributeOptions = attributeOptions;
-    }
-    
-    public void addAttributeOptions( InventoryTypeAttributeOption option )
-    {
-        if ( attributeOptions == null )
-            attributeOptions = new HashSet<InventoryTypeAttributeOption>();
-        attributeOptions.add( option );
-    }
-    
-    /*
-    public boolean isDisplay()
-    {
-        return display;
-    }
-
-    public void setDisplay( boolean display )
-    {
-        this.display = display;
-    }
-    */
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeOption.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeOption.java	2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeOption.java	1970-01-01 00:00:00 +0000
@@ -1,94 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.io.Serializable;
-
-public class InventoryTypeAttributeOption implements Serializable
-{
-    private int id;
-    
-    private String name;
-
-    private InventoryTypeAttribute inventoryTypeAttribute;
-    
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-    public InventoryTypeAttributeOption()
-    {
-        
-    }
-    
-    // -------------------------------------------------------------------------
-    // hashCode, equals and toString
-    // -------------------------------------------------------------------------
-    
-    @Override
-    public int hashCode()
-    {
-        return name.hashCode();
-    }
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-
-        if ( o == null )
-        {
-            return false;
-        }
-
-        if ( !(o instanceof InventoryTypeAttributeOption) )
-        {
-            return false;
-        }
-
-        final InventoryTypeAttributeOption other = (InventoryTypeAttributeOption) o;
-
-        return name.equals( other.getName() );
-    }
-
-    @Override
-    public String toString()
-    {
-        return "[" + name + "]";
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-    
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    public InventoryTypeAttribute getInventoryTypeAttribute()
-    {
-        return inventoryTypeAttribute;
-    }
-
-    public void setInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        this.inventoryTypeAttribute = inventoryTypeAttribute;
-    }
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeOptionService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeOptionService.java	2012-04-21 12:57:24 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeOptionService.java	1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-public interface InventoryTypeAttributeOptionService
-{
-    String ID = InventoryTypeAttributeOptionService.class.getName();
-    
-    int addInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption );
-
-    void updateInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption );
-
-    void deleteInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption );
-
-    InventoryTypeAttributeOption getInventoryTypeAttributeOption( int id );
-    
-    Collection<InventoryTypeAttributeOption> getAllInventoryTypeAttributeOptions();
-    
-    Collection<InventoryTypeAttributeOption> get( InventoryTypeAttribute inventoryTypeAttribute);
-    
-    InventoryTypeAttributeOption get( InventoryTypeAttribute inventoryTypeAttribute, String name );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeOptionStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeOptionStore.java	2012-04-21 12:57:24 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeOptionStore.java	1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-public interface InventoryTypeAttributeOptionStore
-{
-    String ID = InventoryTypeAttributeOptionStore.class.getName();
-    
-    int addInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption );
-
-    void updateInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption );
-
-    void deleteInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption );
-
-    InventoryTypeAttributeOption getInventoryTypeAttributeOption( int id );
-    
-    Collection<InventoryTypeAttributeOption> getAllInventoryTypeAttributeOptions();
-
-    Collection<InventoryTypeAttributeOption> get( InventoryTypeAttribute inventoryTypeAttribute);
-    
-    InventoryTypeAttributeOption get( InventoryTypeAttribute inventoryTypeAttribute, String name );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeService.java	2012-05-16 07:06:15 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeService.java	1970-01-01 00:00:00 +0000
@@ -1,36 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-public interface InventoryTypeAttributeService
-{
-    String ID = InventoryTypeAttributeService.class.getName();
-    
-    int addInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute );
-
-    void updateInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute );
-
-    void deleteInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute );
-
-    Collection<InventoryTypeAttribute> getAllInventoryTypeAttributes();
-    
-    InventoryTypeAttribute getInventoryTypeAttribute( int id );
-    
-    InventoryTypeAttribute getInventoryTypeAttributeByName( String name );
-    
-    //  methods
-    
-    int getInventoryTypeAttributeCount();
-    
-    int getInventoryTypeAttributeCountByName( String name );
-    
-    Collection<InventoryTypeAttribute> getInventoryTypeAttributesBetween( int first, int max );
-    
-    Collection<InventoryTypeAttribute> getInventoryTypeAttributesBetweenByName( String name, int first, int max );
-    
-    
-    //Collection<InventoryTypeAttribute> getAllInventoryTypeAttributesForDisplay( InventoryTypeAttribute inventoryTypeAttribute );
-    
-
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeStore.java	2012-05-16 07:06:15 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeAttributeStore.java	1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericNameableObjectStore;
-
-//public interface InventoryTypeAttributeStore
-public interface InventoryTypeAttributeStore extends GenericNameableObjectStore<InventoryTypeAttribute>
-{
-    String ID = InventoryTypeAttributeStore.class.getName();
-    /*
-    int addInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute );
-
-    void updateInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute );
-
-    void deleteInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute );
-    */
-    
-    Collection<InventoryTypeAttribute> getAllInventoryTypeAttributes();
-    
-    InventoryTypeAttribute getInventoryTypeAttribute( int id );
-    
-    InventoryTypeAttribute getInventoryTypeAttributeByName( String name );
-    
-    //Collection<InventoryTypeAttribute> getAllInventoryTypeAttributesForDisplay( InventoryTypeAttribute inventoryTypeAttribute );
-    
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeService.java	2012-05-16 07:06:15 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeService.java	1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-public interface InventoryTypeService
-{
-    String ID = InventoryTypeService.class.getName();
-    
-    int addInventoryType( InventoryType inventoryType );
-
-    void updateInventoryType( InventoryType inventoryType );
-
-    void deleteInventoryType( InventoryType inventoryType );
-
-    Collection<InventoryType> getAllInventoryTypes();
-    
-    InventoryType getInventoryTypeByName( String name );
-    
-    InventoryType getInventoryType( int id );
-    
-    //  methods
-    
-    int getInventoryTypeCount();
-    
-    int getInventoryTypeCountByName( String name );
-    
-    Collection<InventoryType> getInventoryTypesBetween( int first, int max );
-    
-    Collection<InventoryType> getInventoryTypesBetweenByName( String name, int first, int max );
-    
-    Collection<InventoryTypeAttribute> getAllInventoryTypeAttributesForDisplay( InventoryType inventoryType );
-    
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeStore.java	2012-05-16 07:06:15 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryTypeStore.java	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericNameableObjectStore;
-
-//public interface InventoryTypeStore
-
-public interface InventoryTypeStore extends GenericNameableObjectStore<InventoryType>
-{
-    String ID = InventoryTypeStore.class.getName();
-    /*
-    int addInventoryType( InventoryType inventoryType );
-
-    void updateInventoryType( InventoryType inventoryType );
-
-    void deleteInventoryType( InventoryType inventoryType );
-    */
-    Collection<InventoryType> getAllInventoryTypes();
-    
-    InventoryType getInventoryTypeByName( String name );
-    
-    InventoryType getInventoryType( int id );
-    
-    //Collection<InventoryTypeAttribute> getAllInventoryTypeAttributesForDisplay( InventoryType inventoryType );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType_Attribute.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType_Attribute.java	2012-06-21 09:47:23 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType_Attribute.java	1970-01-01 00:00:00 +0000
@@ -1,135 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.io.Serializable;
-
-/**
- * @author Mithilesh Kumar Thakur
- *
- * @version InventoryType_Attribute.java Jun 14, 2012 1:27:37 PM	
- */
-public class InventoryType_Attribute implements Serializable
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = -5670110591005778814L;
-    
-    
-    /**
-     * Part of composite key
-     */
-    private InventoryType inventoryType;
-
-    /**
-     * Part of composite key
-     */
-    private InventoryTypeAttribute inventoryTypeAttribute;
-    
-    private boolean display = false;
-    
-    private Integer sortOrder;
-    
-    
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-    
-    //Default Constructors
-    
-    public InventoryType_Attribute()
-    {
-        
-    }
-    
-    
-    public InventoryType_Attribute( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, boolean display )
-    {
-        this.inventoryType = inventoryType;
-        this.inventoryTypeAttribute = inventoryTypeAttribute;
-        this.display = display;
-    }
-
-    public InventoryType_Attribute( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, boolean display, Integer sortOrder)
-    {
-        this.inventoryType = inventoryType;
-        this.inventoryTypeAttribute = inventoryTypeAttribute;
-        this.display = display;
-        this.sortOrder = sortOrder;
-    }
-
-    // -------------------------------------------------------------------------
-    // hashCode, equals and toString
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int hashCode()
-    {
-        return inventoryType.hashCode() + inventoryTypeAttribute.hashCode();
-    }
-
-    @Override
-    public boolean equals( Object object )
-    {
-
-        if ( object == null )
-        {
-            return false;
-        }
-
-        if ( getClass() != object.getClass() )
-        {
-            return false;
-        }
-
-        final InventoryType_Attribute other = ( InventoryType_Attribute ) object;
-
-        return inventoryTypeAttribute.getId() == other.getInventoryTypeAttribute().getId()
-            && inventoryType.getId() == other.getInventoryType().getId();
-    }
-
-    
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public InventoryType getInventoryType()
-    {
-        return inventoryType;
-    }
-
-    public void setInventoryType( InventoryType inventoryType )
-    {
-        this.inventoryType = inventoryType;
-    }
-
-    public InventoryTypeAttribute getInventoryTypeAttribute()
-    {
-        return inventoryTypeAttribute;
-    }
-
-    public void setInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        this.inventoryTypeAttribute = inventoryTypeAttribute;
-    }
-
-    public boolean isDisplay()
-    {
-        return display;
-    }
-
-    public void setDisplay( boolean display )
-    {
-        this.display = display;
-    }
-
-    public Integer getSortOrder()
-    {
-        return sortOrder;
-    }
-
-    public void setSortOrder( Integer sortOrder )
-    {
-        this.sortOrder = sortOrder;
-    }
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType_AttributeService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType_AttributeService.java	2012-06-18 09:15:09 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType_AttributeService.java	1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-/**
- * @author Mithilesh Kumar Thakur
- *
- * @version InventoryType_AttributeService.java Jun 14, 2012 2:30:47 PM	
- */
-public interface InventoryType_AttributeService
-{
-    String ID = InventoryType_AttributeService.class.getName();
-    
-    void addInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute );
-    
-    void updateInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute );
-
-    void deleteInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute );
-    
-    InventoryType_Attribute getInventoryTypeAttribute( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute );
-
-    Collection<InventoryType_Attribute> getAllInventoryTypeAttributes();
-
-    Collection<InventoryType_Attribute> getAllInventoryTypeAttributesByInventoryType( InventoryType inventoryType );
-    
-    Collection<InventoryTypeAttribute> getListInventoryTypeAttribute( InventoryType inventoryType );
-    
-    InventoryType_Attribute getInventoryTypeAttributeForDisplay( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, boolean display);
-    
-    Collection<InventoryType_Attribute> getAllInventoryTypeAttributeForDisplay( InventoryType inventoryType, boolean display );
-    
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType_AttributeStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType_AttributeStore.java	2012-06-18 09:15:09 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/InventoryType_AttributeStore.java	1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericStore;
-
-/**
- * @author Mithilesh Kumar Thakur
- *
- * @version InventoryType_AttributeStore.java Jun 14, 2012 2:43:57 PM	
- */
-//public interface InventoryType_AttributeStore extends GenericStore<InventoryType_Attribute>
-public interface InventoryType_AttributeStore
-{
-    String ID = InventoryType_AttributeStore.class.getName();
-    
-    void addInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute );
-    
-    void updateInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute );
-
-    void deleteInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute );
-    
-    Collection<InventoryType_Attribute> getAllInventoryTypeAttributes();
-    
-    InventoryType_Attribute getInventoryTypeAttribute( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute );
-    
-    InventoryType_Attribute getInventoryTypeAttributeForDisplay( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, boolean display);
-    
-    Collection<InventoryType_Attribute> getAllInventoryTypeAttributeForDisplay( InventoryType inventoryType, boolean display );
-
-    Collection<InventoryType_Attribute> getAllInventoryTypeAttributesByInventoryType( InventoryType inventoryType );
-    
-    Collection<InventoryTypeAttribute> getListInventoryTypeAttribute( InventoryType inventoryType );    
-    
-}

=== removed directory 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator'
=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeAttributeComparator.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeAttributeComparator.java	2012-05-02 06:03:10 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeAttributeComparator.java	1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute;
-
-public class InventoryTypeAttributeComparator
-    implements Comparator<InventoryTypeAttribute>
-{
-    public int compare( InventoryTypeAttribute inventoryTypeAttribute0, InventoryTypeAttribute inventoryTypeAttribute1 )
-    {
-        return inventoryTypeAttribute0.getName().compareToIgnoreCase( inventoryTypeAttribute1.getName() );
-    }
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeAttributeMandatoryComparator.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeAttributeMandatoryComparator.java	2012-05-19 14:42:20 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeAttributeMandatoryComparator.java	1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute;
-
-public class InventoryTypeAttributeMandatoryComparator implements Comparator<InventoryTypeAttribute>
-{
-    public int compare( InventoryTypeAttribute inventoryTypeAttribute0, InventoryTypeAttribute inventoryTypeAttribute1 )
-    {
-        if( ( inventoryTypeAttribute0.isMandatory() ) && ( inventoryTypeAttribute1.isMandatory() ) )
-        {
-            return inventoryTypeAttribute0.getName().compareToIgnoreCase( inventoryTypeAttribute1.getName() );
-           //Boolean boolean1 = inventoryTypeAttribute0.isMandatory();
-           //return boolean1.compareTo( inventoryTypeAttribute1.isMandatory() );
-        }
-        else
-        {
-            return inventoryTypeAttribute0.getName().compareToIgnoreCase( inventoryTypeAttribute1.getName() );
-        }
-        /*
-        if( inventoryTypeAttribute0.isMandatory() )
-            return 1;
-        else
-            return 0;
-        */
-    }
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeAttributeOptionComparator.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeAttributeOptionComparator.java	2012-08-01 12:21:34 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeAttributeOptionComparator.java	1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeOption;
-
-/**
- * @author Mithilesh Kumar Thakur
- *
- * @version InventoryTypeAttributeOptionComparator.java Aug 1, 2012 3:50:35 PM	
- */
-public class InventoryTypeAttributeOptionComparator implements Comparator<InventoryTypeAttributeOption>
-{
-    public int compare( InventoryTypeAttributeOption inventoryTypeAttributeOption0, InventoryTypeAttributeOption inventoryTypeAttributeOption1 )
-    {
-        return inventoryTypeAttributeOption0.getName().compareToIgnoreCase( inventoryTypeAttributeOption1.getName() );
-    }
-}
-

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeComparator.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeComparator.java	2012-05-02 06:03:10 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/inventory/comparator/InventoryTypeComparator.java	1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.coldchain.inventory.InventoryType;
-
-public class InventoryTypeComparator implements Comparator<InventoryType>
-{
-    public int compare( InventoryType inventoryType0, InventoryType inventoryType1 )
-    {
-        return inventoryType0.getName().compareToIgnoreCase( inventoryType1.getName() );
-    }
-}

=== removed directory 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports'
=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReport.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReport.java	2012-06-19 10:18:55 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReport.java	1970-01-01 00:00:00 +0000
@@ -1,85 +0,0 @@
-package org.hisp.dhis.coldchain.reports;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "ccemReport")
-public class CCEMReport
-{
-
-    public static final String CATALOGTYPE_ATTRIBUTE_VALUE = "CATALOGTYPE_ATTRIBUTE_VALUE";
-    public static final String CATALOGTYPE_ATTRIBUTE_VALUE_AGE_GROUP = "CATALOGTYPE_ATTRIBUTE_VALUE_AGE_GROUP";
-    public static final String ORGUNITGROUP_DATAVALUE = "ORGUNITGROUP_DATAVALUE";
-    public static final String ORGUNIT_EQUIPMENT_ROUTINE_DATAVALUE = "ORGUNIT_EQUIPMENT_ROUTINE_DATAVALUE";
-    public static final String VACCINE_STORAGE_CAPACITY = "VACCINE_STORAGE_CAPACITY";
-    
-    public static final String LAST_YEAR = "LAST_YEAR";
-    public static final String CURRENT_YEAR = "CURRENT_YEAR";
-    public static final String LAST_6_MONTHS = "LAST_6_MONTHS";
-    public static final String LAST_3_MONTHS = "LAST_3_MONTHS";
-    
-    private String reportId;
-    
-    private String reportName;
-    
-    private String xmlTemplateName;
-    
-    private String outputType;
-    
-    private String reportType;
-    
-    private String periodRequire;
-    
-    // -------------------------------------------------------------------------
-    // Getters & Setters
-    // -------------------------------------------------------------------------
-
-    public String getReportId()
-    {
-        return reportId;
-    }
-    public void setReportId( String reportId )
-    {
-        this.reportId = reportId;
-    }
-    public String getReportName()
-    {
-        return reportName;
-    }
-    public void setReportName( String reportName )
-    {
-        this.reportName = reportName;
-    }
-    public String getXmlTemplateName()
-    {
-        return xmlTemplateName;
-    }
-    public void setXmlTemplateName( String xmlTemplateName )
-    {
-        this.xmlTemplateName = xmlTemplateName;
-    }
-    public String getOutputType()
-    {
-        return outputType;
-    }
-    public void setOutputType( String outputType )
-    {
-        this.outputType = outputType;
-    }
-    public String getReportType()
-    {
-        return reportType;
-    }
-    public void setReportType( String reportType )
-    {
-        this.reportType = reportType;
-    }
-    public String getPeriodRequire()
-    {
-        return periodRequire;
-    }
-    public void setPeriodRequire( String periodRequire )
-    {
-        this.periodRequire = periodRequire;
-    }
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReportDesign.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReportDesign.java	2012-06-13 06:35:38 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReportDesign.java	1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-package org.hisp.dhis.coldchain.reports;
-
-public class CCEMReportDesign
-{
-
-    private int row;
-    
-    private String content;
-    
-    private String displayheading;
-    
-
-    public int getRow()
-    {
-        return row;
-    }
-
-    public void setRow( int row )
-    {
-        this.row = row;
-    }
-
-    public String getContent()
-    {
-        return content;
-    }
-
-    public void setContent( String content )
-    {
-        this.content = content;
-    }
-
-    public String getDisplayheading()
-    {
-        return displayheading;
-    }
-
-    public void setDisplayheading( String displayheading )
-    {
-        this.displayheading = displayheading;
-    }
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReportManager.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReportManager.java	2012-06-19 10:18:55 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReportManager.java	1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-package org.hisp.dhis.coldchain.reports;
-
-import java.util.List;
-import java.util.Map;
-
-public interface CCEMReportManager
-{
-    String getOrgunitIdsByComma( List<Integer> selOrgUnitList, List<Integer> orgunitGroupList );
-    
-    Map<String,String> getCCEMSettings();
-    
-    List<CCEMReportDesign> getCCEMReportDesign( String designXMLFile );
-    
-    CCEMReport getCCEMReportByReportId( String selReportId );
-    
-    Map<String, Integer> getCatalogTypeAttributeValue( String orgUnitIdsByComma, Integer inventoryTypeId, Integer catalogTypeAttributeId );
-    
-    Map<String, Integer> getCatalogTypeAttributeValueByAge( String orgUnitIdsByComma, Integer inventoryTypeId, Integer catalogTypeAttributeId, Integer yearInvTypeAttId, Integer ageStart, Integer ageEnd );
-    
-    List<String> getDistinctDataElementValue( Integer dataelementID, Integer optComboId, Integer periodId );
-    
-    List<Integer> getOrgunitIds( List<Integer> selOrgUnitList, Integer orgUnitGroupId );
-    
-    Map<String, Integer> getDataValueCountforDataElements( String dataElementIdsByComma, String optComboIdsByComma, Integer periodId, String orgUnitIdsBycomma );
-    
-    Integer getPeriodId( String startDate, String periodType );
-    
-    Map<String, Integer> getFacilityWiseEquipmentRoutineData( String orgUnitIdsByComma, String periodIdsByComma, String dataElementIdsByComma, String optComboIdsByComma );
-    
-    Map<Integer, Double> getCatalogDataSumByEquipmentData( String orgUnitIdsByComma, Integer inventoryTypeId, Integer catalogTypeAttributeId, Integer inventoryTypeAttributeId, String equipmentValue );
-    
-    Map<Integer, Double> getSumOfEquipmentDatabyInventoryType( String orgUnitIdsByComma, Integer inventoryTypeId, Integer inventoryTypeAttributeId, Double factor );
-    
-    Map<String, String> getOrgUnitGroupAttribDataForRequirement( String orgUnitGroupIdsByComma, String orgUnitGroupAttribIds );
-    
-    Map<String, String> getDataElementDataForCatalogOptionsForRequirement( String orgUnitIdsByComma, String catalogOption_DataelementIds, Integer periodId );
-    
-    Map<String, String> getCatalogDataForRequirement( Integer vsReqCatalogTypeId, Integer vsReqStorageTempId, String vsReqStorageTemp, Integer vsReqNationalSupplyId, String vsReqNationalSupply, String vsReqCatalogAttribIds );
-    
-    List<Integer> getCatalogIdsForRequirement( Integer vsReqCatalogTypeId, Integer vsReqStorageTempId, String vsReqStorageTemp, Integer vsReqNationalSupplyId, String vsReqNationalSupply );
-    
-    Map<Integer, String> getOrgunitAndOrgUnitGroupMap( String orgUnitGroupIdsByComma, String orgUnitIdsByComma );
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReportOutput.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReportOutput.java	2012-06-27 06:56:57 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMReportOutput.java	1970-01-01 00:00:00 +0000
@@ -1,68 +0,0 @@
-package org.hisp.dhis.coldchain.reports;
-
-import java.util.List;
-
-public class CCEMReportOutput
-{
-
-    private String reportHeading;
-    
-    private String outputType;
-    
-    private List<String> tableHeadings;
-    
-    private List<List<String>> tableSubHeadings;
-    
-    private List<List<String>> tableData;
-
-    public List<String> getTableHeadings()
-    {
-        return tableHeadings;
-    }
-
-    public void setTableHeadings( List<String> tableHeadings )
-    {
-        this.tableHeadings = tableHeadings;
-    }
-
-    public List<List<String>> getTableData()
-    {
-        return tableData;
-    }
-
-    public void setTableData( List<List<String>> tableData )
-    {
-        this.tableData = tableData;
-    }
-
-    public List<List<String>> getTableSubHeadings()
-    {
-        return tableSubHeadings;
-    }
-
-    public void setTableSubHeadings( List<List<String>> tableSubHeadings )
-    {
-        this.tableSubHeadings = tableSubHeadings;
-    }
-
-    public String getReportHeading()
-    {
-        return reportHeading;
-    }
-
-    public void setReportHeading( String reportHeading )
-    {
-        this.reportHeading = reportHeading;
-    }
-
-    public String getOutputType()
-    {
-        return outputType;
-    }
-
-    public void setOutputType( String outputType )
-    {
-        this.outputType = outputType;
-    }
-    
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMSettings.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMSettings.java	2012-06-13 06:35:38 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/reports/CCEMSettings.java	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-package org.hisp.dhis.coldchain.reports;
-
-public class CCEMSettings
-{
-
-    private String commonId;
-    
-    private String ccemId;
-
-    public String getCommonId()
-    {
-        return commonId;
-    }
-
-    public void setCommonId( String commonId )
-    {
-        this.commonId = commonId;
-    }
-
-    public String getCcemId()
-    {
-        return ccemId;
-    }
-
-    public void setCcemId( String ccemId )
-    {
-        this.ccemId = ccemId;
-    }
-    
-}

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/config/Configuration_IN.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/config/Configuration_IN.java	2012-05-30 10:46:26 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/config/Configuration_IN.java	2013-08-12 14:01:06 +0000
@@ -39,7 +39,7 @@
     public static final String DEFAULT_REPORTFOLDER = "ra_national";
     
     public static final String DEFAULT_TEMPFOLDER = "temp";
-    
+
     private int id;
     
     private String key;

=== removed directory 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager'
=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager/AggDataService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager/AggDataService.java	2013-03-25 05:08:43 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager/AggDataService.java	1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-package org.hisp.dhis.ihrissyncmanager;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.period.Period;
-
-/**
- * Gaurav<gaurav08021@xxxxxxxxx>, 8/27/12 [2:07 PM]
- */
-public interface AggDataService {
-
-    String ID = AggDataService.class.getName();
-
-    public DataElement createNewAggDataElement(String aggDataElementName);
-
-    public void addNewEntries(String aggDataElementName,OrganisationUnit orgUnit,Period period, Double aggValue);
-
-    public void deleteAggDataElement(String nameOfDataElement);
-
-}
\ No newline at end of file

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager/SyncIHRISOrgUnitService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager/SyncIHRISOrgUnitService.java	2013-03-25 05:08:43 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager/SyncIHRISOrgUnitService.java	1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-package org.hisp.dhis.ihrissyncmanager;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-/**
- * Gaurav<gaurav08021@xxxxxxxxx>, 8/29/12 [3:10 PM]
- */
-public interface SyncIHRISOrgUnitService {
-
-    String ID = SyncIHRISOrgUnitService.class.getName();
-
-    public OrganisationUnit createNewOrgUnit(String orgUnitName, String parentOrgUnitName);
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager/SynciHRISUserService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager/SynciHRISUserService.java	2013-03-25 05:08:43 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/ihrissyncmanager/SynciHRISUserService.java	1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-package org.hisp.dhis.ihrissyncmanager;
-
-import org.hisp.dhis.user.User;
-
-/**
- * Created with IntelliJ IDEA.
- * User: Mohit
- * Date: 29/8/12
- * Time: 1:44 PM
- * To change this template use File | Settings | File Templates.
- */
-public interface SynciHRISUserService
-{
-    String ID = SynciHRISUserService.class.getName();
-
-    public User createNewiHRISUser(String ihrisUsername, String firstName, String lastName, String email, String password);
-
-
-}

=== removed file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/GlobalConfigService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/GlobalConfigService.java	2012-06-30 10:19:34 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/GlobalConfigService.java	1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-package org.hisp.dhis.reports;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * <gaurav>,Date: 6/26/12, Time: 2:25 PM
- */
-public interface GlobalConfigService {
-
-    String ID = GlobalConfigService.class.getName();
-
-    public File[] getFileNames();
-
-    public void updateDecodeFiles();
-
-    public void writeGlobalSettings(Map<String, String> globalValueMap);
-
-}

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportModel.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportModel.java	2010-12-29 07:57:25 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportModel.java	2013-08-12 14:01:06 +0000
@@ -55,7 +55,8 @@
     
     public final static String RM_PROGRESSIVE_PERIOD = "PROGRESSIVE-PERIOD";
     
-        
+    public final static String RM_PROGRESSIVE_BATCH = "PROGRESSIVE-BATCH";
+    
     public static List<String> getReportModels()
     {
         List<String> reportModels = new ArrayList<String>();
@@ -81,6 +82,8 @@
         reportModels.add( RM_PROGRESSIVE_ORGUNIT );
         
         reportModels.add( RM_PROGRESSIVE_PERIOD );
+        
+        reportModels.add( RM_PROGRESSIVE_BATCH );
 
         return reportModels;            
     }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java	2012-07-26 09:20:56 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java	2013-08-12 14:01:06 +0000
@@ -36,8 +36,10 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.patient.Patient;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.program.Program;
 
 public interface ReportService
 {
@@ -68,7 +70,15 @@
     Collection<Report_in> getReportsByPeriodAndReportType( PeriodType periodType, String reportType );
 
     Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, OrganisationUnit source, String reportType );
+	
+    // get Patients List ByOrgUnit
+    Collection<Patient> getPatientByOrgUnit( OrganisationUnit organisationUnit );
+    // get Programs List ByOrgUnit
+    Collection<Program> getProgramsByOrgUnit( OrganisationUnit organisationUnit );
 
+    // get Patients List By OrgUnit and Program
+    Collection<Patient> getPatientByOrgUnitAndProgram( OrganisationUnit organisationUnit, Program program );
+	
     // -------------------------------------------------------------------------
     // Report_in Design
     // -------------------------------------------------------------------------
@@ -105,6 +115,15 @@
     
     List<Report_inDesign> getReportDesign( String fileName );
     
+    
+    List<Report_inDesign> getReportDesignForGlobalSetting( String fileName );
+    
+    List<Report_inDesign> getReportDesignForTracker( String fileName );
+    
+    List<Report_inDesign> getReportDesignForHeader( String fileName );
+    
+    
+
     List<Report_inDesign> getDistrictFeedbackReportDesign( String fileName );
     
     String getResultDataValue( String formula, Date startDate, Date endDate, OrganisationUnit organisationUnit , String reportModelTB );
@@ -181,4 +200,18 @@
     String getDataelementIdsByStype( List<Report_inDesign> reportDesignList, String sType );
     
     Map<String, String> getAggNonNumberDataFromDataValueTable( String orgUnitIdsByComma, String dataElmentIdsByComma, String periodIdsByComma );
+    
+    
+    //
+    String getResultDataValueForOrgUnitGroupMember( String formula, String childOrgUnitsByComma ,Date startDate, Date endDate ,String reportModelTB );
+    
+    Integer getDataCountFromDataValueTable( String orgUnitIdsByComma, String dataElmentIdsByComma, String periodIdsByComma );
+    
+    
+    Map<String, String> getBatchDataFromDataValueTable( String orgUnitIdsByComma, String dataElmentIdsByComma, String periodIdsByComma );
+    
+    List<Report_inDesign> getHeaderInfo( String fileName );
+    
+    String getTextDataFromDataValueTable( String orgUnitIdsByComma, String dataElmentIdsByComma, String periodIdsByComma );
+    
 }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportStore.java	2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportStore.java	2013-08-12 14:01:06 +0000
@@ -30,36 +30,44 @@
 import java.util.Collection;
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.patient.Patient;
 import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.program.Program;
 
-public interface ReportStore
+public interface ReportStore 
 {
-    String ID = ReportStore.class.getName();
-
+        String ID = ReportStore.class.getName();
+        
     // -------------------------------------------------------------------------
     // Report_in
     // -------------------------------------------------------------------------
 
-    int addReport( Report_in report );
-
-    void updateReport( Report_in report );
-
-    void deleteReport( Report_in report );
-
-    Report_in getReport( int id );
-
-    Report_in getReportByName( String name );
-
-    Collection<Report_in> getReportBySource( OrganisationUnit source );
-
-    Collection<Report_in> getAllReports();
-
-    Collection<Report_in> getReportsByReportType( String reportType );
-
-    Collection<Report_in> getReportsByPeriodType( PeriodType periodType );
-
-    Collection<Report_in> getReportsByPeriodAndReportType( PeriodType periodType, String reportType );
-
-    Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, OrganisationUnit source,
-        String reportType );
+        int addReport( Report_in report );
+        
+        void updateReport( Report_in report );
+        
+        void deleteReport( Report_in report );
+        
+        Report_in getReport( int id );
+        
+        Report_in getReportByName( String name );
+        
+        Collection<Report_in> getReportBySource( OrganisationUnit source );
+        
+        Collection<Report_in> getAllReports();
+        
+        Collection<Report_in> getReportsByReportType( String reportType );
+        
+        Collection<Report_in> getReportsByPeriodType( PeriodType periodType );
+        
+        Collection<Report_in> getReportsByPeriodAndReportType( PeriodType periodType, String reportType );
+
+        Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, OrganisationUnit source, String reportType );
+		
+	// getPatientByOrgUnit
+	Collection<Patient> getPatientByOrgUnit( OrganisationUnit organisationUnit );
+    
+	// get Patients List By OrgUnit and Program
+	Collection<Patient> getPatientByOrgUnitAndProgram( OrganisationUnit organisationUnit, Program program );
+
 }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportType.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportType.java	2012-07-24 12:38:31 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportType.java	2013-08-12 14:01:06 +0000
@@ -67,6 +67,10 @@
     public final static String RT_RANKING_REPORT = "Ranking Reports";
 
     public final static String RT_FEEDBACK_TEMPLATE = "Feedback Template";
+    
+    public final static String RT_PROGRAMWISE_ORGUNITPROGRESS_REPORT = "Programwise OrgUnitProgress Reports";
+    
+    public final static String RT_PERIOD_ORGUNIT_SERVICE_PROGRESS_REPORT = "Period OrgUnit Progress Reports";
 
     public static List<String> getReportTypes()
     {
@@ -108,6 +112,10 @@
 
         reportTypes.add(RT_FEEDBACK_TEMPLATE);
         
+        reportTypes.add(RT_PROGRAMWISE_ORGUNITPROGRESS_REPORT);
+        
+        reportTypes.add(RT_PERIOD_ORGUNIT_SERVICE_PROGRESS_REPORT);
+        
         return reportTypes;
     }
 }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/Report_inDesign.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/Report_inDesign.java	2012-07-24 12:38:31 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/Report_inDesign.java	2013-08-12 14:01:06 +0000
@@ -211,5 +211,4 @@
     public static final String E_PERIOD_MONTH = "PERIOD-MONTH";
     public static final String E_PERIOD_YEAR = "PERIOD-YEAR";
     
-    
 }
\ No newline at end of file

=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain'
=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/pom.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/pom.xml	2013-03-25 05:08:43 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/pom.xml	1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0";
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
-	<modelVersion>4.0.0</modelVersion>
-  
-	<parent>
-		<groupId>org.hisp.dhis</groupId>
-		<artifactId>dhis-in-services</artifactId>
-		<version>2.12-SNAPSHOT</version>
-	</parent>
-  
-  <artifactId>dhis-in-service-coldchain</artifactId>
-  <packaging>jar</packaging>
-  <name>DHIS India ColdChain Service</name>
-  
-  <dependencies>
-    
-    <!-- DHIS -->
-    
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-in-api</artifactId>
-	  <version>${project.version}</version>
-    </dependency>	
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-service-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-in-service-configuration</artifactId>
-      <version>${project.version}</version>
-    </dependency>   
-	<dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-service-aggregationengine-default</artifactId>
-      <version>${project.version}</version>   
-    </dependency>	  
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-support-system</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.hisp.dhis</groupId>
-      <artifactId>dhis-service-reporting</artifactId>
-    </dependency>
-	
-    
-    <!-- Other -->
-    
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-math</groupId>
-      <artifactId>commons-math</artifactId>
-    </dependency>
-    
-  </dependencies>
-</project>

=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog'
=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataEntryService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataEntryService.java	2012-07-21 10:27:27 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataEntryService.java	1970-01-01 00:00:00 +0000
@@ -1,1316 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.lang.BooleanUtils;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.program.ProgramDataEntryService;
-
-/**
- * @author Mithilesh Kumar Thakur
- *
- * @version DefaultCatalogDataEntryService.java Jun 7, 2012 5:18:09 PM	
- */
-public class DefaultCatalogDataEntryService implements CatalogDataEntryService
-{
-    
-    private static final String EMPTY = "";
-
-    private static final String CATALOG_TYPE_ATTRIBUTE_DOES_NOT_EXIST = "[ Catalogtype attribute does not exist ]";
-
-    private static final String EMPTY_VALUE_TAG = "value=\"\"";
-
-    private static final String EMPTY_TITLE_TAG = "title=\"\"";
-    
-    
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    private CatalogTypeAttributeService catalogTypeAttributeService;
-    
-    public void setCatalogTypeAttributeService( CatalogTypeAttributeService catalogTypeAttributeService )
-    {
-        this.catalogTypeAttributeService = catalogTypeAttributeService;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    @Override
-    public  String prepareDataEntryFormForCatalog( String htmlCode, Collection<CatalogDataValue> dataValues, String disabled,
-        I18n i18n, CatalogType catalogType )
-    {
-        Map<Integer, Collection<CatalogDataValue>> mapDataValue = new HashMap<Integer, Collection<CatalogDataValue>>();
-
-        String result = "";
-
-        result = populateCustomDataEntryForTextBox( htmlCode, dataValues, disabled, i18n, catalogType, mapDataValue );
-        
-        result = populateCustomDataEntryForCOMBO( htmlCode, dataValues, disabled, i18n, catalogType, mapDataValue );
-
-        result = populateCustomDataEntryForDate( result, dataValues, disabled, i18n, catalogType, mapDataValue );
-
-        result = populateCustomDataEntryForBoolean( result, dataValues, disabled, i18n, catalogType,  mapDataValue );
-
-        result = populateI18nStrings( result, i18n );
-
-        return result;
-    }
-    
-    
-    
-    public String prepareDataEntryFormForEdit( String htmlCode )
-    {
-        String result = populateCustomDataEntryForDate( htmlCode );
-
-        result = populateCustomDataEntryForBoolean( result );
-
-        result = populateCustomDataEntryForTextBox( result );
-        
-        result = populateCustomDataEntryForCOMBO( result );
-
-        return result;
-    }
-    
-    
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-    
-    private String populateCustomDataEntryForTextBox( String htmlCode )
-    {
-     // ---------------------------------------------------------------------
-        // Metadata code to add to HTML before outputting
-        // ---------------------------------------------------------------------
-
-        StringBuffer sb = new StringBuffer();
-
-        // ---------------------------------------------------------------------
-        // Pattern to match catalogType attribute in the HTML code
-        // ---------------------------------------------------------------------
-
-        Matcher inputMatcher = INPUT_PATTERN.matcher( htmlCode );
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching catalogType attribute fields
-        // ---------------------------------------------------------------------
-        
-        while ( inputMatcher.find() )
-        {
-            // -----------------------------------------------------------------
-            // Get HTML input field code
-            // -----------------------------------------------------------------
-
-            String catalogTypeAttributeCode = inputMatcher.group( 1 );
-
-            String inputHTML = inputMatcher.group();
-            inputHTML = inputHTML.replace( ">", "" );
-
-            Matcher identifierMatcher = CatalogDataEntryService.IDENTIFIER_PATTERN_FIELD.matcher( catalogTypeAttributeCode );
-
-            if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
-            {
-                // -------------------------------------------------------------
-                // Get catalogType attribute ID of catalogType attribute
-                // -------------------------------------------------------------
-
-                int catalogTypeAttributeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-                
-                CatalogTypeAttribute catalogTypeAttribute = catalogTypeAttributeService.getCatalogTypeAttribute( catalogTypeAttributeId );
-                
-                if ( catalogTypeAttribute != null && !CatalogTypeAttribute.TYPE_INT.equalsIgnoreCase( catalogTypeAttribute.getValueType() ) )
-                {
-                    continue;
-                }
-                else if ( catalogTypeAttribute != null && !CatalogTypeAttribute.TYPE_STRING.equalsIgnoreCase( catalogTypeAttribute.getValueType() ) )
-                {
-                    continue;
-                }
-
-                String displayValue = ( catalogTypeAttribute == null ) ? " value=\"" + CATALOG_TYPE_ATTRIBUTE_DOES_NOT_EXIST + "\" "
-                    : " value=\"[ " + catalogTypeAttribute.getName() + " ]\"";
-                
-                inputHTML = inputHTML.contains( EMPTY_VALUE_TAG ) ? inputHTML.replace( EMPTY_VALUE_TAG, displayValue )
-                    : inputHTML + " " + displayValue;
-
-                String displayTitle = ( catalogTypeAttribute == null ) ? " title=\"" + CATALOG_TYPE_ATTRIBUTE_DOES_NOT_EXIST + "\" "
-                    : " title=\"" + catalogTypeAttribute.getId() + "." + catalogTypeAttribute.getName() + "-"
-                        + catalogTypeAttribute.getValueType() + "\" ";
-                
-                inputHTML = inputHTML.contains( EMPTY_TITLE_TAG ) ? inputHTML.replace( EMPTY_TITLE_TAG, displayTitle )
-                    : inputHTML + " " + displayTitle;
-
-                inputHTML = inputHTML + ">";
-
-                inputMatcher.appendReplacement( sb, inputHTML );
-            }
-        }
-
-        inputMatcher.appendTail( sb );
-
-        return (sb.toString().isEmpty()) ? htmlCode : sb.toString();
-    }
-    
- 
-    private String populateCustomDataEntryForCOMBO( String htmlCode )
-    {
-     // ---------------------------------------------------------------------
-        // Metadata code to add to HTML before outputting
-        // ---------------------------------------------------------------------
-
-        StringBuffer sb = new StringBuffer();
-
-        // ---------------------------------------------------------------------
-        // Pattern to match catalogType attribute in the HTML code
-        // ---------------------------------------------------------------------
-
-        Matcher inputMatcher = INPUT_PATTERN.matcher( htmlCode );
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching catalogType attribute fields
-        // ---------------------------------------------------------------------
-        
-        while ( inputMatcher.find() )
-        {
-            // -----------------------------------------------------------------
-            // Get HTML input field code
-            // -----------------------------------------------------------------
-
-            String catalogTypeAttributeCode = inputMatcher.group( 1 );
-
-            String inputHTML = inputMatcher.group();
-            inputHTML = inputHTML.replace( ">", "" );
-
-            Matcher identifierMatcher = CatalogDataEntryService.IDENTIFIER_PATTERN_FIELD.matcher( catalogTypeAttributeCode );
-
-            if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
-            {
-                // -------------------------------------------------------------
-                // Get catalogType attribute ID of catalogType attribute
-                // -------------------------------------------------------------
-
-                int catalogTypeAttributeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-                
-                CatalogTypeAttribute catalogTypeAttribute = catalogTypeAttributeService.getCatalogTypeAttribute( catalogTypeAttributeId );
-                
-                if ( catalogTypeAttribute != null && !CatalogTypeAttribute.TYPE_COMBO.equalsIgnoreCase( catalogTypeAttribute.getValueType() )  )
-                {
-                    continue;
-                }
-                
-
-                String displayValue = ( catalogTypeAttribute == null ) ? " value=\"" + CATALOG_TYPE_ATTRIBUTE_DOES_NOT_EXIST + "\" "
-                    : " value=\"[ " + catalogTypeAttribute.getName() + " ]\"";
-                
-                inputHTML = inputHTML.contains( EMPTY_VALUE_TAG ) ? inputHTML.replace( EMPTY_VALUE_TAG, displayValue )
-                    : inputHTML + " " + displayValue;
-
-                String displayTitle = ( catalogTypeAttribute == null ) ? " title=\"" + CATALOG_TYPE_ATTRIBUTE_DOES_NOT_EXIST + "\" "
-                    : " title=\"" + catalogTypeAttribute.getId() + "." + catalogTypeAttribute.getName() + "-"
-                        + catalogTypeAttribute.getValueType() + "\" ";
-                
-                inputHTML = inputHTML.contains( EMPTY_TITLE_TAG ) ? inputHTML.replace( EMPTY_TITLE_TAG, displayTitle )
-                    : inputHTML + " " + displayTitle;
-
-                inputHTML = inputHTML + ">";
-
-                inputMatcher.appendReplacement( sb, inputHTML );
-            }
-        }
-
-        inputMatcher.appendTail( sb );
-
-        return (sb.toString().isEmpty()) ? htmlCode : sb.toString();
-    }
-        
-   
-    private String populateCustomDataEntryForBoolean( String htmlCode )
-    {
-        // ---------------------------------------------------------------------
-        // Metadata code to add to HTML before outputting
-        // ---------------------------------------------------------------------
-
-        StringBuffer sb = new StringBuffer();
-
-        // ---------------------------------------------------------------------
-        // Pattern to match catalogType attribute in the HTML code
-        // ---------------------------------------------------------------------
-
-        Matcher inputMatcher = INPUT_PATTERN.matcher( htmlCode );
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching catalogType attribute fields
-        // ---------------------------------------------------------------------
-
-        while ( inputMatcher.find() )
-        {
-            String inputHTML = inputMatcher.group();
-            inputHTML = inputHTML.replace( ">", "" );
-
-            // -----------------------------------------------------------------
-            // Get HTML input field code
-            // -----------------------------------------------------------------
-
-            String catalogTypeAttributeCode = inputMatcher.group( 1 );
-
-            Matcher identifierMatcher = IDENTIFIER_PATTERN_FIELD.matcher( catalogTypeAttributeCode );
-
-            if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
-            {
-                // -------------------------------------------------------------
-                // Get catalogType attribute ID of catalogType attribute
-                // -------------------------------------------------------------
-                int catalogTypeAttributeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-                
-                CatalogTypeAttribute catalogTypeAttribute = catalogTypeAttributeService.getCatalogTypeAttribute( catalogTypeAttributeId );
-                
-                if ( catalogTypeAttribute != null && !CatalogTypeAttribute.TYPE_BOOL.equalsIgnoreCase( catalogTypeAttribute.getValueType() ) )
-                {
-                    continue;
-                }
-
-                String displayValue = ( catalogTypeAttribute == null) ? " value=\"" + CATALOG_TYPE_ATTRIBUTE_DOES_NOT_EXIST + "\" "
-                    : " value=\"[ " + catalogTypeAttribute.getName() + " ]\" ";
-                
-                inputHTML = inputHTML.contains( EMPTY_VALUE_TAG ) ? inputHTML.replace( EMPTY_VALUE_TAG, displayValue )
-                    : inputHTML + " " + displayValue;
-
-                String displayTitle = ( catalogTypeAttribute == null) ? " title=\"" + CATALOG_TYPE_ATTRIBUTE_DOES_NOT_EXIST + "\" "
-                    : " title=\"" + catalogTypeAttribute.getId() + "." + catalogTypeAttribute.getName() + "-"
-                        + catalogTypeAttribute.getValueType() + "\" ";
-                
-                inputHTML = inputHTML.contains( EMPTY_TITLE_TAG ) ? inputHTML.replace( EMPTY_TITLE_TAG, displayTitle )
-                    : inputHTML + " " + displayTitle;
-
-                inputHTML = inputHTML + ">";
-
-                inputMatcher.appendReplacement( sb, inputHTML );
-            }
-        }
-
-        inputMatcher.appendTail( sb );
-
-        return (sb.toString().isEmpty()) ? htmlCode : sb.toString();
-    }
-    
- 
-    private String populateCustomDataEntryForDate( String htmlCode )
-    {
-        // ---------------------------------------------------------------------
-        // Metadata code to add to HTML before outputting
-        // ---------------------------------------------------------------------
-
-        StringBuffer sb = new StringBuffer();
-
-        // ---------------------------------------------------------------------
-        // Pattern to match data elements in the HTML code
-        // ---------------------------------------------------------------------
-
-        Matcher inputMatcher = INPUT_PATTERN.matcher( htmlCode );
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching data element fields
-        // ---------------------------------------------------------------------
-
-        while ( inputMatcher.find() )
-        {
-            String inputHTML = inputMatcher.group();
-
-            inputHTML = inputHTML.replace( ">", "" );
-
-            // -----------------------------------------------------------------
-            // Get HTML input field code
-            // -----------------------------------------------------------------
-
-            String catalogTypeAttributeCode = inputMatcher.group( 1 );
-
-            Matcher identifierMatcher = IDENTIFIER_PATTERN_FIELD.matcher( catalogTypeAttributeCode );
-
-            if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
-            {
-                // -------------------------------------------------------------
-                // Get catalogType attribute ID of catalogType attribute
-                // -------------------------------------------------------------
-                
-                int catalogTypeAttributeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-                
-                CatalogTypeAttribute catalogTypeAttribute = catalogTypeAttributeService.getCatalogTypeAttribute( catalogTypeAttributeId );
-
-                //int dataElementId = Integer.parseInt( identifierMatcher.group( 2 ) );
-                //DataElement dataElement = dataElementService.getDataElement( dataElementId );
-
-                if ( catalogTypeAttribute != null && !CatalogTypeAttribute.TYPE_DATE.equalsIgnoreCase( catalogTypeAttribute.getValueType() ) )
-                {
-                    continue;
-                }
-
-                String displayValue = ( catalogTypeAttribute == null ) ? " value=\"" + CATALOG_TYPE_ATTRIBUTE_DOES_NOT_EXIST + "\""
-                    : " value=\"[ " + catalogTypeAttribute.getName() + " ]\"";
-                
-                inputHTML = inputHTML.contains( EMPTY_VALUE_TAG ) ? inputHTML.replace( EMPTY_VALUE_TAG, displayValue )
-                    : inputHTML + " " + displayValue;
-
-                String displayTitle = (catalogTypeAttribute == null) ? " title=\"" + CATALOG_TYPE_ATTRIBUTE_DOES_NOT_EXIST + "\""
-                    : " title=\"" + catalogTypeAttribute.getId() + "." + catalogTypeAttribute.getName() + "-"
-                        + catalogTypeAttribute.getValueType() + "\" ";
-                
-                inputHTML = inputHTML.contains( EMPTY_TITLE_TAG ) ? inputHTML.replace( EMPTY_TITLE_TAG, displayTitle )
-                    : inputHTML + " " + displayTitle;
-
-                inputHTML = inputHTML + ">";
-
-                inputMatcher.appendReplacement( sb, inputHTML );
-            }
-        }
-
-        inputMatcher.appendTail( sb );
-
-        return (sb.toString().isEmpty()) ? htmlCode : sb.toString();
-    }    
-    
-    private String populateCustomDataEntryForBoolean( String dataEntryFormCode,
-        Collection<CatalogDataValue> dataValues, String disabled, I18n i18n, CatalogType catalogType,Map<Integer, Collection<CatalogDataValue>> mapDataValue )
-    {
-        // ---------------------------------------------------------------------
-        // Inline Javascript to add to HTML before outputting
-        // ---------------------------------------------------------------------
-
-        final String jsCodeForBoolean = " name=\"entryselect\" $DISABLED data=\"{mandatory:$MANDATORY, catalogTypeAttributeName:'$CATALOGTYPEATTRIBUTENAME' }\" onchange=\"saveOpt( $CATALOGTYPEATTRIBUTEID )\" style=\"  text-align:center;\" ";
-
-        StringBuffer sb = new StringBuffer();
-
-        // ---------------------------------------------------------------------
-        // Pattern to match CatalogTypeAttributes in the HTML code
-        // ---------------------------------------------------------------------
-
-        Matcher CatalogTypeAttributeMatcher = INPUT_PATTERN.matcher( dataEntryFormCode );
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching catalogTypeAttribute fields
-        // ---------------------------------------------------------------------
-       
-        Map<Integer, CatalogTypeAttribute> catalogTypeAttributeMap = getCatalogTypeAttributeMap( catalogType );
-        
-        int catalogTypeId = catalogType.getId();
-        
-        while ( CatalogTypeAttributeMatcher.find() )
-        {
-            // -----------------------------------------------------------------
-            // Get HTML input field code
-            // -----------------------------------------------------------------
-
-            String mandatory = "null";
-           
-            
-            String catalogTypeAttributeCode = CatalogTypeAttributeMatcher.group( 1 );
-            
-            Matcher identifierMatcher = IDENTIFIER_PATTERN_FIELD.matcher( catalogTypeAttributeCode );
-            if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
-            {
-               
-                // -------------------------------------------------------------
-                // Get catalogType attribute ID of catalogType attribute
-                // -------------------------------------------------------------
-
-                //int catalogTypeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-                
-                int catalogTypeAttributeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-
-                CatalogTypeAttribute catalogTypeAttribute = null;
-
-                String catalogTypeName = catalogType.getName();
-
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    catalogTypeAttribute = catalogTypeAttributeService.getCatalogTypeAttribute( catalogTypeAttributeId );
-                }
-                else
-                {
-                    catalogTypeAttribute = catalogTypeAttributeMap.get( catalogTypeAttributeId );
-                    
-                    if ( catalogTypeAttribute == null )
-                    {
-                        return i18n.getString( "some_catalogType_attribute_not_exist" );
-                    }
-                   
-                    mandatory = BooleanUtils.toStringTrueFalse( catalogTypeAttribute.isMandatory() );
-                }
-
-                if ( catalogTypeAttribute == null )
-                {
-                    continue;
-                }
-
-                if ( !CatalogTypeAttribute.TYPE_BOOL.equalsIgnoreCase( catalogTypeAttribute.getValueType() ) )
-                {
-                    continue;
-                }
-
-                // -------------------------------------------------------------
-                // Find type of catalogType attribute
-                // -------------------------------------------------------------
-
-                String catalogTypeAttributeType = catalogTypeAttribute.getValueType();
-
-                // -------------------------------------------------------------
-                // Find existing value of catalogType Attribute
-                // -------------------------------------------------------------
-
-                CatalogDataValue catalogDataValue = null;
-               
-
-                String catalogTypeAttributeValue = EMPTY;
-
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    
-                    
-                    Collection<CatalogDataValue> catalogDataValues = mapDataValue.get( catalogTypeId );
-
-                    if ( catalogDataValues == null )
-                    {
-                       
-                    }
-
-                    catalogDataValue = getValue( catalogDataValues, catalogTypeAttributeId );
-
-                    catalogTypeAttributeValue = catalogDataValue != null ? catalogDataValue.getValue() : catalogTypeAttributeValue;
-                }
-                else
-                {
-
-                    catalogDataValue = getValue( dataValues, catalogTypeAttributeId );
-
-                    if ( catalogDataValue != null )
-                    {
-                        catalogTypeAttributeValue = catalogDataValue.getValue();
-                    }
-                }
-
-                String appendCode = catalogTypeAttributeCode.replaceFirst( "input", "select" );
-                appendCode = appendCode.replace( "name=\"entryselect\"", jsCodeForBoolean );
-
-                // -------------------------------------------------------------
-                // Add title
-                // -------------------------------------------------------------
-
-                if ( catalogTypeAttributeCode.contains( "title=\"\"" ) )
-                {
-                    appendCode = appendCode.replace( "title=\"\"", "title=\"" + catalogTypeAttribute.getId() + "."
-                        + catalogTypeAttribute.getName() + "-" + catalogTypeAttributeType + "\" " );
-                }
-                else
-                {
-                    appendCode += "title=\"" + catalogTypeAttribute.getId() + "." + catalogTypeAttribute.getName() + "-"
-                        + catalogTypeAttributeType + "\" ";
-                }
-
-                appendCode += ">";
-                appendCode += "<option value=\"\">" + i18n.getString( "Please select" ) + "</option>";
-                appendCode += "<option value=\"true\">" + i18n.getString( "yes" ) + "</option>";
-                appendCode += "<option value=\"false\">" + i18n.getString( "no" ) + "</option>";
-
-                // -------------------------------------------------------------
-                // Insert value of catalogType Attribute in output code
-                // -------------------------------------------------------------
-
-                if ( catalogDataValue != null )
-                {
-                    if ( catalogTypeAttributeValue.equalsIgnoreCase( "true" ) )
-                    {
-                        appendCode = appendCode.replace( "<option value=\"true\">", "<option value=\""
-                            + i18n.getString( "true" ) + "\" selected>" );
-                    }
-
-                    if ( catalogTypeAttributeValue.equalsIgnoreCase( "false" ) )
-                    {
-                        appendCode = appendCode.replace( "<option value=\"false\">", "<option value=\""
-                            + i18n.getString( "false" ) + "\" selected>" );
-                    }
-                }
-
-                appendCode += "</select>";
-
-                // -----------------------------------------------------------
-                // Check if this dataElement is from another programStage then
-                // disable
-                // If programStagsInstance is completed then disabled it
-                // -----------------------------------------------------------
-
-                disabled = "";
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    disabled = "disabled";
-                }
-                // -----------------------------------------------------------
-                // 
-                // -----------------------------------------------------------
-
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTEID", String.valueOf( catalogTypeAttributeId ) );
-                appendCode = appendCode.replace( "$CATALOGTYPEID", String.valueOf( catalogTypeId ) );
-                appendCode = appendCode.replace( "$CATALOGTYPENAME", catalogTypeName );
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTENAME", catalogTypeAttribute.getName() );
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTETYPE", catalogTypeAttributeType );
-                appendCode = appendCode.replace( "$DISABLED", disabled );
-                appendCode = appendCode.replace( "$MANDATORY", mandatory );
-                appendCode = appendCode.replace( "i18n_yes", i18n.getString( "yes" ) );
-                appendCode = appendCode.replace( "i18n_no", i18n.getString( "no" ) );
-                appendCode = appendCode.replace( "i18n_select_value", i18n.getString( "select_value" ) );
-                appendCode = appendCode.replace( "$SAVEMODE", "false" );
-
-                appendCode = appendCode.replaceAll( "\\$", "\\\\\\$" );
-
-                CatalogTypeAttributeMatcher.appendReplacement( sb, appendCode );
-            }
-        }
-
-        CatalogTypeAttributeMatcher.appendTail( sb );
-
-        return sb.toString();
-    }
-
-
-    private String populateCustomDataEntryForTextBox( String dataEntryFormCode,
-        Collection<CatalogDataValue> dataValues, String disabled, I18n i18n, CatalogType catalogType,
-         Map<Integer, Collection<CatalogDataValue>> mapDataValue )
-    {
-        // ---------------------------------------------------------------------
-        // Inline Javascript to add to HTML before outputting
-        // ---------------------------------------------------------------------
-
-        final String jsCodeForInputs = " $DISABLED onchange=\"saveVal( $CATALOGTYPEATTRIBUTEID )\" data=\"{mandatory:$MANDATORY, catalogTypeAttributeName:'$CATALOGTYPEATTRIBUTENAME', catalogTypeAttributeValueType:'$CATALOGTYPEATTRIBUTEVALUETYPE'}\" onkeypress=\"return keyPress(event, this)\" style=\" text-align:center;\"  ";
-       // final String jsCodeForOptions = " $DISABLED options='$OPTIONS' catalogTypeAttributeId=\"$CATALOGTYPEATTRIBUTEID\" data=\"{mandatory:$MANDATORY, catalogTypeAttributeName:'$CATALOGTYPEATTRIBUTENAME', catalogTypeAttributeValueType:'$CATALOGTYPEATTRIBUTEVALUETYPE'}\" onkeypress=\"return keyPress(event, this)\" style=\" text-align:center;\"  ";
-
-        
-        StringBuffer sb = new StringBuffer();
-
-        // ---------------------------------------------------------------------
-        // Pattern to match CatalogTypeAttributes in the HTML code
-        // ---------------------------------------------------------------------
-        
-        Pattern INPUT_PATTERN = Pattern.compile( "(<input.*?)[/]?>", Pattern.DOTALL );
-        
-        Matcher CatalogTypeAttributeMatcher = INPUT_PATTERN.matcher( dataEntryFormCode );
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching catalogTypeAttribute fields
-        // ---------------------------------------------------------------------
-       
-        Map<Integer, CatalogTypeAttribute> catalogTypeAttributeMap = getCatalogTypeAttributeMap( catalogType );
-        int catalogTypeId = catalogType.getId();
-       // Map<Integer, DataElement> dataElementMap = getDataElementMap( programStage );
-
-        while ( CatalogTypeAttributeMatcher.find() )
-        {
-            // -----------------------------------------------------------------
-            // Get HTML input field code
-            // -----------------------------------------------------------------
-
-            String mandatory = "null";
-            
-            String catalogTypeAttributeCode = CatalogTypeAttributeMatcher.group( 1 );
-
-            Matcher identifierMatcher = IDENTIFIER_PATTERN_FIELD.matcher( catalogTypeAttributeCode );
-
-            if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
-            {
-                // -------------------------------------------------------------
-                // Get catalogType attribute ID of catalogType attribute
-                // -------------------------------------------------------------
-
-                //int catalogTypeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-                
-                int catalogTypeAttributeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-
-                CatalogTypeAttribute catalogTypeAttribute = null;
-
-                String catalogTypeName = catalogType.getName();
-
-                
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    catalogTypeAttribute = catalogTypeAttributeService.getCatalogTypeAttribute( catalogTypeAttributeId );
-                }
-                
-                else
-                {
-                    catalogTypeAttribute = catalogTypeAttributeMap.get( catalogTypeAttributeId );
-                    
-                    if ( catalogTypeAttribute == null )
-                    {
-                        return i18n.getString( "some_catalogType_attribute_not_exist" );
-                    }
-                   
-                    mandatory = BooleanUtils.toStringTrueFalse( catalogTypeAttribute.isMandatory() );
-                    
-                }
-
-                if ( catalogTypeAttribute == null )
-                {
-                    continue;
-                }
-               
-                if ( !CatalogTypeAttribute.TYPE_INT.equalsIgnoreCase( catalogTypeAttribute.getValueType() )
-                    && !CatalogTypeAttribute.TYPE_STRING.equalsIgnoreCase( catalogTypeAttribute.getValueType() ) )
-                {
-                    continue;
-                }
-               
-                
-                // -------------------------------------------------------------
-                // Find type of catalogType attribute
-                // -------------------------------------------------------------
-
-                String catalogTypeAttributeType = catalogTypeAttribute.getValueType();
-
-                
-                // -------------------------------------------------------------
-                // Find existing value of catalogType Attribute
-                // -------------------------------------------------------------
-
-                CatalogDataValue catalogDataValue = null;
-               
-
-                String catalogTypeAttributeValue = EMPTY;
-                
-                
-                
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    
-                    
-                    Collection<CatalogDataValue> catalogDataValues = mapDataValue.get( catalogTypeId );
-
-                    if ( catalogDataValues == null )
-                    {
-                       
-                    }
-
-                    catalogDataValue = getValue( catalogDataValues, catalogTypeAttributeId );
-
-                    catalogTypeAttributeValue = catalogDataValue != null ? catalogDataValue.getValue() : catalogTypeAttributeValue;
-                }
-                else
-                {
-                    catalogDataValue = getValue( dataValues, catalogTypeAttributeId );
-
-                    if ( catalogDataValue != null )
-                    {
-                        catalogTypeAttributeValue = catalogDataValue.getValue();
-                    }
-                }
-
-                // -------------------------------------------------------------
-                // Insert title information - Data element id, name, type, min,
-                // max
-                // -------------------------------------------------------------
-                
-                
-                if ( catalogTypeAttributeCode.contains( "title=\"\"" ) )
-                {
-                    catalogTypeAttributeCode = catalogTypeAttributeCode.replace( "title=\"\"", "title=\"" + catalogTypeAttribute.getId() + "."
-                        + catalogTypeAttribute.getName() + " (" + catalogTypeAttributeType + ")\" " );
-                }
-                else
-                {
-                    catalogTypeAttributeCode += "title=\"" + catalogTypeAttribute.getId() + "." + catalogTypeAttribute.getName() + " ("
-                        + catalogTypeAttributeType + ")\" ";
-                }
-
-                // -------------------------------------------------------------
-                // Insert value of catalogType Attribute in output code
-                // -------------------------------------------------------------
-                
-                String appendCode = catalogTypeAttributeCode;
-
-                if ( appendCode.contains( "value=\"\"" ) )
-                {
-                    appendCode = appendCode.replace( "value=\"\"", "value=\"" + catalogTypeAttributeValue + "\"" );
-                }
-                else
-                {
-                    appendCode += "value=\"" + catalogTypeAttributeValue + "\"";
-                }
-
-                appendCode += jsCodeForInputs;
-              
-
-                appendCode += " />";
-
-
-                disabled = "";
-                
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    disabled = "disabled=\"\"";
-                }
-                
-                // -----------------------------------------------------------
-                // 
-                // -----------------------------------------------------------
-                
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTEID", String.valueOf( catalogTypeAttributeId ) );
-                appendCode = appendCode.replace( "$CATALOGTYPEID", String.valueOf( catalogTypeId ) );
-                appendCode = appendCode.replace( "$CATALOGTYPENAME", catalogTypeName );
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTENAME", catalogTypeAttribute.getName() );
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTEVALUETYPE", catalogTypeAttributeType );
-                appendCode = appendCode.replace( "$DISABLED", disabled );
-                appendCode = appendCode.replace( "$MANDATORY", mandatory );
-                appendCode = appendCode.replace( "$SAVEMODE", "false" );
-                appendCode = appendCode.replaceAll( "\\$", "\\\\\\$" );
-                
-                System.out.println( "---appendCode---" + appendCode );
-                
-                CatalogTypeAttributeMatcher.appendReplacement( sb, appendCode );
-            }
-        }
-
-        CatalogTypeAttributeMatcher.appendTail( sb );
-
-        return sb.toString();
-    }    
-    
- 
-    
-    
-    
-    private String populateCustomDataEntryForCOMBO( String dataEntryFormCode,
-        Collection<CatalogDataValue> dataValues, String disabled, I18n i18n, CatalogType catalogType,
-         Map<Integer, Collection<CatalogDataValue>> mapDataValue )
-    {
-        // ---------------------------------------------------------------------
-        // Inline Javascript to add to HTML before outputting
-        // ---------------------------------------------------------------------
-
-        //final String jsCodeForInputs = " $DISABLED onchange=\"saveVal( $CATALOGTYPEATTRIBUTEID )\" data=\"{mandatory:$MANDATORY, catalogTypeAttributeName:'$CATALOGTYPEATTRIBUTENAME', catalogTypeAttributeValueType:'$CATALOGTYPEATTRIBUTEVALUETYPE'}\" onkeypress=\"return keyPress(event, this)\" style=\" text-align:center;\"  ";
-        final String jsCodeForOptions = " $DISABLED options='$OPTIONS' catalogTypeAttributeId=\"$CATALOGTYPEATTRIBUTEID\" data=\"{mandatory:$MANDATORY, catalogTypeAttributeName:'$CATALOGTYPEATTRIBUTENAME', catalogTypeAttributeValueType:'$CATALOGTYPEATTRIBUTEVALUETYPE'}\" onkeypress=\"return keyPress(event, this)\" style=\" text-align:center;\"  ";
-
-        
-        StringBuffer sb = new StringBuffer();
-
-        // ---------------------------------------------------------------------
-        // Pattern to match CatalogTypeAttributes in the HTML code
-        // ---------------------------------------------------------------------
-
-        Pattern INPUT_PATTERN = Pattern.compile( "(<input.*?)[/]?>", Pattern.DOTALL );
-        
-        Matcher CatalogTypeAttributeMatcher = INPUT_PATTERN.matcher( dataEntryFormCode );
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching catalogTypeAttribute fields
-        // ---------------------------------------------------------------------
-       
-        Map<Integer, CatalogTypeAttribute> catalogTypeAttributeMap = getCatalogTypeAttributeMap( catalogType );
-        int catalogTypeId = catalogType.getId();
-
-       // Map<Integer, DataElement> dataElementMap = getDataElementMap( programStage );
-
-        while ( CatalogTypeAttributeMatcher.find() )
-        {
-            // -----------------------------------------------------------------
-            // Get HTML input field code
-            // -----------------------------------------------------------------
-
-            String mandatory = "null";
-            
-            String catalogTypeAttributeCode = CatalogTypeAttributeMatcher.group( 1 );
-
-            Matcher identifierMatcher = IDENTIFIER_PATTERN_FIELD.matcher( catalogTypeAttributeCode );
-
-            if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
-            {
-                // -------------------------------------------------------------
-                // Get catalogType attribute ID of catalogType attribute
-                // -------------------------------------------------------------
-
-                //int catalogTypeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-                
-                int catalogTypeAttributeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-
-                CatalogTypeAttribute catalogTypeAttribute = null;
-
-                String catalogTypeName = catalogType.getName();
-
-                
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    catalogTypeAttribute = catalogTypeAttributeService.getCatalogTypeAttribute( catalogTypeAttributeId );
-                }
-                
-                else
-                {
-                    catalogTypeAttribute = catalogTypeAttributeMap.get( catalogTypeAttributeId );
-                    
-                    if ( catalogTypeAttribute == null )
-                    {
-                        return i18n.getString( "some_catalogType_attribute_not_exist" );
-                    }
-                   
-                    mandatory = BooleanUtils.toStringTrueFalse( catalogTypeAttribute.isMandatory() );
-                    
-                }
-
-                if ( catalogTypeAttribute == null )
-                {
-                    continue;
-                }
-                
-                if ( !CatalogTypeAttribute.TYPE_COMBO.equalsIgnoreCase( catalogTypeAttribute.getValueType() ) )
-                {
-                    continue;
-                }
-               
-                // -------------------------------------------------------------
-                // Find type of catalogType attribute
-                // -------------------------------------------------------------
-
-                String catalogTypeAttributeType = catalogTypeAttribute.getValueType();
-
-                
-                // -------------------------------------------------------------
-                // Find existing value of catalogType Attribute
-                // -------------------------------------------------------------
-
-                CatalogDataValue catalogDataValue = null;
-               
-
-                String catalogTypeAttributeValue = EMPTY;
-                
-                
-                
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    
-                    Collection<CatalogDataValue> catalogDataValues = mapDataValue.get( catalogTypeId );
-
-                    if ( catalogDataValues == null )
-                    {
-                       
-                    }
-
-                    catalogDataValue = getValue( catalogDataValues, catalogTypeAttributeId );
-
-                    catalogTypeAttributeValue = catalogDataValue != null ? catalogDataValue.getValue() : catalogTypeAttributeValue;
-                }
-                else
-                {
-                    catalogDataValue = getValue( dataValues, catalogTypeAttributeId );
-
-                    if ( catalogDataValue != null )
-                    {
-                        catalogTypeAttributeValue = catalogDataValue.getValue();
-                    }
-                }
-
-                
-                String appendCode = catalogTypeAttributeCode.replaceFirst( "input", "select" );
-                appendCode = appendCode.replace( "name=\"entryfield\"", jsCodeForOptions );
-
-                // -------------------------------------------------------------
-                // Add title
-                // -------------------------------------------------------------
-
-                if ( catalogTypeAttributeCode.contains( "title=\"\"" ) )
-                {
-                    appendCode = appendCode.replace( "title=\"\"", "title=\"" + catalogTypeAttribute.getId() + "."
-                        + catalogTypeAttribute.getName() + "-" + catalogTypeAttributeType + "\" " );
-                }
-                else
-                {
-                    appendCode += "title=\"" + catalogTypeAttribute.getId() + "." + catalogTypeAttribute.getName() + "-"
-                        + catalogTypeAttributeType + "\" ";
-                }
-
-                appendCode += ">";
-                
-                
-                appendCode += "<option value=\"\">" + i18n.getString( "Please select" ) + "</option>";
-                
-                for( CatalogTypeAttributeOption catalogTypeAttributeOption : catalogTypeAttribute.getAttributeOptions() )
-                {
-                    appendCode += "<option value=\""+ catalogTypeAttributeOption.getId() +"\">" + catalogTypeAttributeOption.getName() + "</option>";
-                }
-                //appendCode += "<option value=\"true\">" + i18n.getString( "yes" ) + "</option>";
-                //appendCode += "<option value=\"false\">" + i18n.getString( "no" ) + "</option>";
-                
-                //--------------------------------------------------------------
-                // Insert title information - Data element id, name, type, min,
-                // max
-                // -------------------------------------------------------------
-
-                /*
-                if ( catalogTypeAttributeCode.contains( "title=\"\"" ) )
-                {
-                    catalogTypeAttributeCode = catalogTypeAttributeCode.replace( "title=\"\"", "title=\"" + catalogTypeAttribute.getId() + "."
-                        + catalogTypeAttribute.getName() + " (" + catalogTypeAttributeType + ")\" " );
-                }
-                else
-                {
-                    catalogTypeAttributeCode += "title=\"" + catalogTypeAttribute.getId() + "." + catalogTypeAttribute.getName() + " ("
-                        + catalogTypeAttributeType + ")\" ";
-                }
-*/
-                // -------------------------------------------------------------
-                // Insert value of catalogType Attribute in output code
-                // -------------------------------------------------------------
-                
-                //String appendCode = catalogTypeAttributeCode;
-
-                /*
-                if ( appendCode.contains( "value=\"\"" ) )
-                {
-                    appendCode = appendCode.replace( "value=\"\"", "value=\"" + catalogTypeAttributeValue + "\"" );
-                }
-                else
-                {
-                    appendCode += "value=\"" + catalogTypeAttributeValue + "\"";
-                }
-
-                if ( catalogTypeAttribute.getAttributeOptions() != null )
-                {
-                    appendCode += jsCodeForOptions;
-
-                    appendCode = appendCode.replace( "$OPTIONS", catalogTypeAttribute.getAttributeOptions().toString() );
-                }
-
-                appendCode += " />";
-                */
-                appendCode += "</select>";
-                disabled = "";
-                
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    disabled = "disabled=\"\"";
-                }
-                
-                // -----------------------------------------------------------
-                // 
-                // -----------------------------------------------------------
-
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTEID", String.valueOf( catalogTypeAttributeId ) );
-                appendCode = appendCode.replace( "$CATALOGTYPEID", String.valueOf( catalogTypeId ) );
-                appendCode = appendCode.replace( "$CATALOGTYPENAME", catalogTypeName );
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTENAME", catalogTypeAttribute.getName() );
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTEVALUETYPE", catalogTypeAttributeType );
-                appendCode = appendCode.replace( "$DISABLED", disabled );
-                appendCode = appendCode.replace( "$MANDATORY", mandatory );
-                appendCode = appendCode.replace( "$SAVEMODE", "false" );
-                appendCode = appendCode.replaceAll( "\\$", "\\\\\\$" );
-                
-                //System.out.println( "---appendCode---" + appendCode );
-                
-                CatalogTypeAttributeMatcher.appendReplacement( sb, appendCode );
-            }
-        }
-
-        CatalogTypeAttributeMatcher.appendTail( sb );
-
-        return sb.toString();
-    }    
-   
-    
-    private String populateCustomDataEntryForDate( String dataEntryFormCode, Collection<CatalogDataValue> dataValues,
-        String disabled, I18n i18n, CatalogType catalogType, Map<Integer, Collection<CatalogDataValue>> mapDataValue )
-    {
-        // ---------------------------------------------------------------------
-        // Inline Javascript to add to HTML before outputting
-        // ---------------------------------------------------------------------
-
-        final String jsCodeForDate = " name=\"entryfield\" $DISABLED data=\"{mandatory:$MANDATORY, catalogTypeAttributeName:'$CATALOGTYPEATTRIBUTENAME'}\" onchange=\"saveVal( $CATALOGTYPEATTRIBUTEID )\" style=\" text-align:center;\" ";
-        
-        // ---------------------------------------------------------------------
-        // Metadata code to add to HTML before outputting
-        // ---------------------------------------------------------------------
-
-        final String jQueryCalendar = "<script> " + "datePicker(\"$CATALOGTYPEID-$CATALOGTYPEATTRIBUTEID-val\", false)"
-            + ";</script>";
-       
-        //System.out.println( "jQueryCalendar" + jQueryCalendar +  "--- $CATALOGTYPEID----" + catalogType.getId());
-        
-        StringBuffer sb = new StringBuffer();
-
-
-        // ---------------------------------------------------------------------
-        // Pattern to match CatalogTypeAttributes in the HTML code
-        // ---------------------------------------------------------------------
-
-        Pattern catalogTypeAttributePattern = Pattern.compile( "(<input.*?)[/]?/>" );
-        
-        Matcher CatalogTypeAttributeMatcher = catalogTypeAttributePattern.matcher( dataEntryFormCode );
-
-        // ---------------------------------------------------------------------
-        // Pattern to extract catalogTypeAttribute ID from catalogTypeAttribute field
-        // ---------------------------------------------------------------------
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching catalogTypeAttribute fields
-        // ---------------------------------------------------------------------
-        
-        Map<Integer, CatalogTypeAttribute> catalogTypeAttributeMap = getCatalogTypeAttributeMap( catalogType );
-        
-        int catalogTypeId = catalogType.getId();
-       
-        while ( CatalogTypeAttributeMatcher.find() )
-        {
-            // -----------------------------------------------------------------
-            // Get HTML input field code
-            // -----------------------------------------------------------------
-
-            String mandatory = "null";
-           
-
-            String catalogTypeAttributeCode = CatalogTypeAttributeMatcher.group( 1 );
-            
-            Matcher identifierMatcher = IDENTIFIER_PATTERN_FIELD.matcher( catalogTypeAttributeCode );
-
-            if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
-            {
-                // -------------------------------------------------------------
-                // Get data element ID of data element
-                // -------------------------------------------------------------
-
-                //int catalogTypeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-                
-                int catalogTypeAttributeId = Integer.parseInt( identifierMatcher.group( 1 ) );
-
-                CatalogTypeAttribute catalogTypeAttribute = null;
-
-                String catalogTypeName = catalogType.getName();
-                
-
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    catalogTypeAttribute = catalogTypeAttributeService.getCatalogTypeAttribute( catalogTypeAttributeId );
-                }
-                else
-                {
-                   
-                    
-                    catalogTypeAttribute = catalogTypeAttributeMap.get( catalogTypeAttributeId );
-                    
-                    if ( catalogTypeAttribute == null )
-                    {
-                        return i18n.getString( "some_catalogType_attribute_not_exist" );
-                    }
-                   
-                    mandatory = BooleanUtils.toStringTrueFalse( catalogTypeAttribute.isMandatory() );
-                    
-                }
-
-                if ( catalogTypeAttribute == null )
-                {
-                    continue;
-                }
-                if ( !CatalogTypeAttribute.TYPE_DATE.equalsIgnoreCase( catalogTypeAttribute.getValueType() ) )
-                {
-                    continue;
-                }
-
-                // -------------------------------------------------------------
-                // Find type of catalogType attribute
-                // -------------------------------------------------------------
-
-                String catalogTypeAttributeType = catalogTypeAttribute.getValueType();
-                
-                
-                // -------------------------------------------------------------
-                // Find existing value of catalogType Attribute
-                // -------------------------------------------------------------
-
-                CatalogDataValue catalogDataValue = null;
-               
-
-                String catalogTypeAttributeValue = EMPTY;
-
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    
-                    
-                    Collection<CatalogDataValue> catalogDataValues = mapDataValue.get( catalogTypeId );
-
-                    if ( catalogDataValues == null )
-                    {
-                       
-                    }
-
-                    catalogDataValue = getValue( catalogDataValues, catalogTypeAttributeId );
-
-                    catalogTypeAttributeValue = catalogDataValue != null ? catalogDataValue.getValue() : catalogTypeAttributeValue;
-                }
-                else
-                {
-                    
-                    catalogDataValue = getValue( dataValues, catalogTypeAttributeId );
-                    
-                    catalogTypeAttributeValue = catalogDataValue != null ? catalogDataValue.getValue() : catalogTypeAttributeValue;
-                }
-
-
-                // -------------------------------------------------------------
-                // Insert value of catalogTypeAttribute in output code
-                // -------------------------------------------------------------
-
-                if ( catalogTypeAttributeCode.contains( "value=\"\"" ) )
-                {
-                    catalogTypeAttributeCode = catalogTypeAttributeCode.replace( "value=\"\"", "value=\"" + catalogTypeAttributeValue + "\"" );
-                }
-                else
-                {
-                    catalogTypeAttributeCode += "value=\"" + catalogTypeAttributeValue + "\"";
-                }
-
-                // -------------------------------------------------------------
-                // Insert title information - catalogTypeAttribute id, name, type,
-                // -------------------------------------------------------------
-
-                if ( catalogTypeAttributeCode.contains( "title=\"\"" ) )
-                {
-                    catalogTypeAttributeCode = catalogTypeAttributeCode.replace( "title=\"\"", "title=\"" + catalogTypeAttribute.getId() + "."
-                        + catalogTypeAttribute.getName() + " (" + catalogTypeAttributeType + ")\" " );
-                }
-                else
-                {
-                    catalogTypeAttributeCode += "title=\"" + catalogTypeAttribute.getId() + "." + catalogTypeAttribute.getName() + " ("
-                        + catalogTypeAttributeType + ")\" ";
-                }
-
-                // -------------------------------------------------------------
-                // Append Javascript code and meta data (type/min/max) for
-                // persisting to output code, and insert value and type for
-                // fields
-                // -------------------------------------------------------------
-
-                String appendCode = catalogTypeAttributeCode + "/>";
-                appendCode = appendCode.replace( "name=\"entryfield\"", jsCodeForDate );
-
-               
-                disabled = "";
-                if ( catalogTypeId != catalogType.getId() )
-                {
-                    disabled = "disabled=\"\"";
-                }
-
-                appendCode += jQueryCalendar;
-
-                // -------------------------------------------------------------
-                // 
-                // -------------------------------------------------------------
-
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTEID", String.valueOf( catalogTypeAttributeId ) );
-                appendCode = appendCode.replace( "$CATALOGTYPEID", String.valueOf( catalogTypeId ) );
-                appendCode = appendCode.replace( "$CATALOGTYPENAME", catalogTypeName );
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTENAME", catalogTypeAttribute.getName() );
-                appendCode = appendCode.replace( "$CATALOGTYPEATTRIBUTETYPE", catalogTypeAttributeType );
-                appendCode = appendCode.replace( "$DISABLED", disabled );
-                appendCode = appendCode.replace( "$MANDATORY", mandatory );
-                appendCode = appendCode.replace( "$SAVEMODE", "false" );
-
-                appendCode = appendCode.replaceAll( "\\$", "\\\\\\$" );
-                
-                
-               // System.out.println( "---appendCode---" + appendCode );
-                
-                CatalogTypeAttributeMatcher.appendReplacement( sb, appendCode );
-            }
-        }
-
-        CatalogTypeAttributeMatcher.appendTail( sb );
-
-        return sb.toString();
-    }
-
-    /**
-     * Replaces i18n string in the custom form code.
-     * 
-     * @param dataEntryFormCode the data entry form html.
-     * @param i18n the I18n object.
-     * @return internationalized data entry form html.
-     */
-    private String populateI18nStrings( String dataEntryFormCode, I18n i18n )
-    {
-        StringBuffer sb = new StringBuffer();
-
-        // ---------------------------------------------------------------------
-        // Pattern to match i18n strings in the HTML code
-        // ---------------------------------------------------------------------
-
-        Pattern i18nPattern = Pattern.compile( "(<i18n.*?)[/]?</i18n>", Pattern.DOTALL );
-        Matcher i18nMatcher = i18nPattern.matcher( dataEntryFormCode );
-
-        // ---------------------------------------------------------------------
-        // Iterate through all matching i18n element fields
-        // ---------------------------------------------------------------------
-
-        while ( i18nMatcher.find() )
-        {
-            String i18nCode = i18nMatcher.group( 1 );
-
-            i18nCode = i18nCode.replaceAll( "<i18n>", "" );
-
-            i18nCode = i18n.getString( i18nCode );
-
-            i18nMatcher.appendReplacement( sb, i18nCode );
-        }
-
-        i18nMatcher.appendTail( sb );
-
-        String result = sb.toString();
-
-        result.replaceAll( "</i18n>", "" );
-
-        return result;
-    }
-    
-    
-    /**
-     * Returns the value of the CatalogDataValue in the Collection of DataValues
-     * with the given data element identifier.
-     */
-    private CatalogDataValue getValue( Collection<CatalogDataValue> dataValues, int catalogTypeAttributeId )
-    {
-        for ( CatalogDataValue dataValue : dataValues )
-        {
-            if ( dataValue.getCatalogTypeAttribute().getId() == catalogTypeAttributeId )
-            {
-                return dataValue;
-            }
-        }
-
-        return null;
-    }
-    
-    
-    
-    /**
-     * Returns a Map of all DataElements in the given ProgramStage where the key
-     * is the DataElement identifier and the value is the DataElement.
-     */
-    private Map<Integer, CatalogTypeAttribute> getCatalogTypeAttributeMap( CatalogType catalogType )
-    {
-        Collection<CatalogTypeAttribute> catalogTypeAttributes =  catalogType.getCatalogTypeAttributes();
-        
-        if ( catalogType == null )
-        {
-            return null;
-        }
-        Map<Integer, CatalogTypeAttribute> map = new HashMap<Integer, CatalogTypeAttribute>();
-
-        for ( CatalogTypeAttribute attribute : catalogTypeAttributes )
-        {
-            map.put( attribute.getId(), attribute );
-        }
-
-        return map;
-    }
-    
-    
-    
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataValueService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataValueService.java	2012-04-30 11:56:21 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataValueService.java	1970-01-01 00:00:00 +0000
@@ -1,74 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-import org.springframework.transaction.annotation.Transactional;
-
-public class DefaultCatalogDataValueService implements CatalogDataValueService
-{
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    private CatalogDataValueStore catalogDataValueStore;
-    
-    public void setCatalogDataValueStore( CatalogDataValueStore catalogDataValueStore )
-    {
-        this.catalogDataValueStore = catalogDataValueStore;
-    }
-    
-    // -------------------------------------------------------------------------
-    // CatalogDataValue
-    // -------------------------------------------------------------------------
-    @Transactional
-    @Override
-    public void addCatalogDataValue( CatalogDataValue catalogDataValue )
-    {
-        
-        catalogDataValueStore.addCatalogDataValue( catalogDataValue );
-    }
-    
-    @Transactional
-    @Override
-    public void deleteCatalogDataValue( CatalogDataValue catalogDataValue )
-    {
-        catalogDataValueStore.deleteCatalogDataValue( catalogDataValue );
-    }
-    
-    @Transactional
-    @Override
-    public Collection<CatalogDataValue> getAllCatalogDataValues()
-    {
-        return catalogDataValueStore.getAllCatalogDataValues();
-    }
-    
-    @Transactional
-    @Override
-    public Collection<CatalogDataValue> getAllCatalogDataValuesByCatalog( Catalog catalog )
-    {
-        return catalogDataValueStore.getAllCatalogDataValuesByCatalog( catalog );
-    }
-    
-    @Transactional
-    @Override
-    public void updateCatalogDataValue( CatalogDataValue catalogDataValue )
-    {
-        catalogDataValueStore.updateCatalogDataValue( catalogDataValue );
-    }
-    
-    @Transactional
-    @Override
-    public CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute )
-    {
-        return catalogDataValueStore.catalogDataValue( catalog, catalogTypeAttribute );
-    }
-    
-    @Transactional
-    @Override
-    public CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute, CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        return catalogDataValueStore.catalogDataValue( catalog, catalogTypeAttribute, catalogTypeAttributeOption );
-    }
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogService.java	2012-06-26 08:38:56 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogService.java	1970-01-01 00:00:00 +0000
@@ -1,198 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import static org.hisp.dhis.i18n.I18nUtils.getCountByName;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetween;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetweenByName;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.hisp.dhis.coldchain.inventory.EquipmentInstance;
-import org.hisp.dhis.coldchain.inventory.InventoryType;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute;
-import org.hisp.dhis.i18n.I18nService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.springframework.transaction.annotation.Transactional;
-
-@Transactional
-public class DefaultCatalogService
-    implements CatalogService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private CatalogStore catalogStore;
-
-    public void setCatalogStore( CatalogStore catalogStore )
-    {
-        this.catalogStore = catalogStore;
-    }
-
-    private CatalogDataValueService catalogDataValueService;
-
-    public void setCatalogDataValueService( CatalogDataValueService catalogDataValueService )
-    {
-        this.catalogDataValueService = catalogDataValueService;
-    }
-
-    private I18nService i18nService;
-
-    public void setI18nService( I18nService service )
-    {
-        i18nService = service;
-    }
-
-    // -------------------------------------------------------------------------
-    // Catalog
-    // -------------------------------------------------------------------------
-    /*
-     * public int addCatalog( Catalog catalog ) { return
-     * catalogStore.addCatalog( catalog ); }
-     * 
-     * public void deleteCatalog( Catalog catalog ) {
-     * catalogStore.deleteCatalog( catalog ); }
-     * 
-     * public void updateCatalog( Catalog catalog ) {
-     * catalogStore.updateCatalog( catalog ); }
-     */
-
-    @Override
-    public int addCatalog( Catalog catalog )
-    {
-        return catalogStore.save( catalog );
-    }
-
-    @Override
-    public void deleteCatalog( Catalog catalog )
-    {
-        catalogStore.delete( catalog );
-    }
-
-    @Override
-    public void updateCatalog( Catalog catalog )
-    {
-        catalogStore.update( catalog );
-    }
-
-    @Override
-    public void deleteCatalogData( Catalog catalog )
-    {
-        catalogStore.delete( catalog );
-    }
-
-    public Collection<Catalog> getAllCatalogs()
-    {
-        return catalogStore.getAllCatalogs();
-    }
-
-    @Override
-    public Catalog getCatalog( int id )
-    {
-        return catalogStore.getCatalog( id );
-    }
-
-    @Override
-    public Catalog getCatalogByName( String name )
-    {
-        return catalogStore.getCatalogByName( name );
-    }
-
-    @Override
-    public int createCatalog( Catalog catalog, List<CatalogDataValue> catalogDataValues )
-    {
-        int catalogId = addCatalog( catalog );
-
-        for ( CatalogDataValue catalogDataValue : catalogDataValues )
-        {
-            catalogDataValueService.addCatalogDataValue( catalogDataValue );
-        }
-
-        return catalogId;
-    }
-
-    @Override
-    public void updateCatalogAndDataValue( Catalog catalog, List<CatalogDataValue> valuesForSave,
-        List<CatalogDataValue> valuesForUpdate, Collection<CatalogDataValue> valuesForDelete )
-    {
-        catalogStore.update( catalog );
-        // catalogStore.updateCatalog( catalog );
-
-        for ( CatalogDataValue catalogDataValueAdd : valuesForSave )
-        {
-            catalogDataValueService.addCatalogDataValue( catalogDataValueAdd );
-        }
-
-        for ( CatalogDataValue catalogDataValueUpdate : valuesForUpdate )
-        {
-            catalogDataValueService.updateCatalogDataValue( catalogDataValueUpdate );
-        }
-
-        for ( CatalogDataValue catalogDataValueDelete : valuesForDelete )
-        {
-            catalogDataValueService.deleteCatalogDataValue( catalogDataValueDelete );
-        }
-    }
-
-    @Override
-    public void deleteCatalogAndDataValue( Catalog catalog )
-    {
-        Collection<CatalogDataValue> valuesForDelete = catalogDataValueService
-            .getAllCatalogDataValuesByCatalog( catalog );
-        for ( CatalogDataValue catalogDataValueDelete : valuesForDelete )
-        {
-            catalogDataValueService.deleteCatalogDataValue( catalogDataValueDelete );
-        }
-
-        // catalogStore.deleteCatalog( catalog );
-    }
-
-    public Collection<Catalog> getCatalogs( CatalogType catalogType )
-    {
-        return catalogStore.getCatalogs( catalogType );
-    }
-
-    // Methods
-    public int getCatalogCount()
-    {
-        return catalogStore.getCount();
-    }
-
-    public int getCatalogCountByName( String name )
-    {
-        return getCountByName( i18nService, catalogStore, name );
-    }
-
-    public Collection<Catalog> getCatalogsBetween( int first, int max )
-    {
-        return getObjectsBetween( i18nService, catalogStore, first, max );
-    }
-
-    public Collection<Catalog> getCatalogsBetweenByName( String name, int first, int max )
-    {
-        return getObjectsBetweenByName( i18nService, catalogStore, name, first, max );
-    }
-
-    @Override
-    public int getCountCatalog( CatalogType catalogType )
-    {
-        return catalogStore.getCountCatalog( catalogType );
-    }
-
-    public Collection<Catalog> getCatalogs( CatalogType catalogType, int min, int max )
-    {
-        return catalogStore.getCatalogs( catalogType, min, max );
-    }
-
-    public int getCountCatalog( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute, String searchText )
-    {
-        return catalogStore.getCountCatalog( catalogType, catalogTypeAttribute, searchText );
-    }
-
-    public Collection<Catalog> getCatalogs( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute,
-        String searchText, int min, int max )
-    {
-        return catalogStore.getCatalogs( catalogType, catalogTypeAttribute, searchText, min, max );
-    }
-
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogTypeAttributeOptionService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogTypeAttributeOptionService.java	2012-05-10 05:39:14 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogTypeAttributeOptionService.java	1970-01-01 00:00:00 +0000
@@ -1,79 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import java.util.Collection;
-
-import org.springframework.transaction.annotation.Transactional;
-
-public class DefaultCatalogTypeAttributeOptionService implements CatalogTypeAttributeOptionService
-{
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private CatalogTypeAttributeOptionStore catalogTypeAttributeOptionStore;
-
-    public void setCatalogTypeAttributeOptionStore( CatalogTypeAttributeOptionStore catalogTypeAttributeOptionStore )
-    {
-        this.catalogTypeAttributeOptionStore = catalogTypeAttributeOptionStore;
-    }
-
-    // -------------------------------------------------------------------------
-    // CatalogTypeAttributeOption
-    // -------------------------------------------------------------------------
-    @Transactional
-    @Override
-    public int addCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        return catalogTypeAttributeOptionStore.addCatalogTypeAttributeOption( catalogTypeAttributeOption );
-    }
-    
-    @Transactional
-    @Override
-    public void deleteCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        catalogTypeAttributeOptionStore.deleteCatalogTypeAttributeOption( catalogTypeAttributeOption );
-    }
-    
-    @Transactional
-    @Override
-    public Collection<CatalogTypeAttributeOption> getAllCatalogTypeAttributeOptions()
-    {
-        return catalogTypeAttributeOptionStore.getAllCatalogTypeAttributeOptions();
-    }
-    
-    @Transactional
-    @Override
-    public void updateCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        catalogTypeAttributeOptionStore.updateCatalogTypeAttributeOption( catalogTypeAttributeOption );
-    }
-   
-    @Transactional
-    @Override
-    public CatalogTypeAttributeOption getCatalogTypeAttributeOption( int id )
-    {
-        return catalogTypeAttributeOptionStore.getCatalogTypeAttributeOption( id );
-    }
-    
-    @Transactional
-    @Override
-    public int countByCatalogTypeAttributeoption( CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        return catalogTypeAttributeOptionStore.countByCatalogTypeAttributeoption( catalogTypeAttributeOption );
-    }
-    
-    @Transactional
-    @Override
-    public Collection<CatalogTypeAttributeOption> getCatalogTypeAttributeOptions( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        return catalogTypeAttributeOptionStore.getCatalogTypeAttributeOptions( catalogTypeAttribute );
-    }
-    
-    @Transactional
-    @Override
-    public CatalogTypeAttributeOption getCatalogTypeAttributeOptionName( CatalogTypeAttribute catalogTypeAttribute, String name )
-    {
-        return catalogTypeAttributeOptionStore.getCatalogTypeAttributeOptionName( catalogTypeAttribute, name );
-    }
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogTypeAttributeService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogTypeAttributeService.java	2012-05-07 11:49:40 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogTypeAttributeService.java	1970-01-01 00:00:00 +0000
@@ -1,125 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import static org.hisp.dhis.i18n.I18nUtils.getCountByName;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetween;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetweenByName;
-
-import java.util.Collection;
-
-import org.hisp.dhis.i18n.I18nService;
-import org.springframework.transaction.annotation.Transactional;
-@Transactional
-public class DefaultCatalogTypeAttributeService implements CatalogTypeAttributeService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private CatalogTypeAttributeStore catalogTypeAttributeStore;
-
-    public void setCatalogTypeAttributeStore( CatalogTypeAttributeStore catalogTypeAttributeStore )
-    {
-        this.catalogTypeAttributeStore = catalogTypeAttributeStore;
-    }
-    
-    private I18nService i18nService;
-
-    public void setI18nService( I18nService service )
-    {
-        i18nService = service;
-    }
-    
-    // -------------------------------------------------------------------------
-    // CatalogTypeAttribute
-    // -------------------------------------------------------------------------
-    /*
-    @Override
-    public int addCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        return catalogTypeAttributeStore.addCatalogTypeAttribute( catalogTypeAttribute );
-    }
-    @Override
-    public void deleteCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        catalogTypeAttributeStore.deleteCatalogTypeAttribute( catalogTypeAttribute );
-    }
-    @Override
-    public Collection<CatalogTypeAttribute> getAllCatalogTypeAttributes()
-    {
-        return catalogTypeAttributeStore.getAllCatalogTypeAttributes();
-    }
-    
-    @Transactional
-    @Override
-    public void updateCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        catalogTypeAttributeStore.updateCatalogTypeAttribute( catalogTypeAttribute );
-    }
-    @Override
-    public CatalogTypeAttribute getCatalogTypeAttribute( int id )
-    {
-        return catalogTypeAttributeStore.getCatalogTypeAttribute( id );
-    }
-    @Override
-    public CatalogTypeAttribute getCatalogTypeAttributeByName( String name )
-    {
-        return catalogTypeAttributeStore.getCatalogTypeAttributeByName( name );
-        
-    }
-    */
-    // -------------------------------------------------------------------------
-    // CatalogTypeAttribute
-    // -------------------------------------------------------------------------
-    @Override
-    public int addCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        return catalogTypeAttributeStore.save( catalogTypeAttribute );
-    }
-    @Override
-    public void deleteCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        catalogTypeAttributeStore.delete( catalogTypeAttribute );       
-    }
-    @Override
-    public void updateCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        catalogTypeAttributeStore.update( catalogTypeAttribute );
-    }
-    
-    @Override
-    public Collection<CatalogTypeAttribute> getAllCatalogTypeAttributes()
-    {
-        return catalogTypeAttributeStore.getAllCatalogTypeAttributes();
-    }
-    @Override
-    public CatalogTypeAttribute getCatalogTypeAttribute( int id )
-    {
-        return catalogTypeAttributeStore.getCatalogTypeAttribute( id );
-    }
-    @Override
-    public CatalogTypeAttribute getCatalogTypeAttributeByName( String name )
-    {
-        return catalogTypeAttributeStore.getCatalogTypeAttributeByName( name );
-        
-    }
-    //Methods
-    public int getCatalogTypeAttributeCount()
-    {
-        return catalogTypeAttributeStore.getCount();
-    }
-    
-    public int getCatalogTypeAttributeCountByName( String name )
-    {
-        return getCountByName( i18nService, catalogTypeAttributeStore, name );
-    }
-
-    public Collection<CatalogTypeAttribute> getCatalogTypeAttributesBetween( int first, int max )
-    {
-        return getObjectsBetween( i18nService, catalogTypeAttributeStore, first, max );
-    }
-
-    public Collection<CatalogTypeAttribute> getCatalogTypeAttributesBetweenByName( String name, int first, int max )
-    {
-        return getObjectsBetweenByName( i18nService, catalogTypeAttributeStore, name, first, max );
-    }
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogTypeService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogTypeService.java	2012-05-09 07:02:15 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogTypeService.java	1970-01-01 00:00:00 +0000
@@ -1,139 +0,0 @@
-package org.hisp.dhis.coldchain.catalog;
-
-import static org.hisp.dhis.i18n.I18nUtils.getCountByName;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetween;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetweenByName;
-
-import java.util.Collection;
-
-import org.hisp.dhis.i18n.I18nService;
-import org.springframework.transaction.annotation.Transactional;
-@Transactional
-public class DefaultCatalogTypeService implements CatalogTypeService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private CatalogTypeStore catalogTypeStore;
-    
-    public void setCatalogTypeStore( CatalogTypeStore catalogTypeStore )
-    {
-        this.catalogTypeStore = catalogTypeStore;
-    }
-    private I18nService i18nService;
-
-    public void setI18nService( I18nService service )
-    {
-        i18nService = service;
-    }
-    
-    // -------------------------------------------------------------------------
-    // CatalogType
-    // -------------------------------------------------------------------------
-    /*
-    @Transactional
-    @Override
-    public int addCatalogType( CatalogType catalogType )
-    {
-        return catalogTypeStore.addCatalogType( catalogType );
-    }
-    
-    @Transactional
-    @Override
-    public void deleteCatalogType( CatalogType catalogType )
-    {
-        catalogTypeStore.deleteCatalogType( catalogType );
-    }
-
-    @Transactional
-    @Override
-    public Collection<CatalogType> getAllCatalogTypes()
-    {
-        return catalogTypeStore.getAllCatalogTypes();
-    }
-
-    @Transactional
-    @Override
-    public void updateCatalogType( CatalogType catalogType )
-    {
-        catalogTypeStore.updateCatalogType( catalogType );
-    }
-    
-    @Transactional
-    @Override
-    public CatalogType getCatalogType( int id )
-    {
-        return catalogTypeStore.getCatalogType( id );
-    }
-    
-    @Transactional
-    @Override
-    public CatalogType getCatalogTypeByName( String name )
-    {
-        return catalogTypeStore.getCatalogTypeByName( name );
-    }
-    */
-    
-    
-    // -------------------------------------------------------------------------
-    // CatalogType
-    // -------------------------------------------------------------------------
-    
-    @Override
-    public int addCatalogType( CatalogType catalogType )
-    {
-        return catalogTypeStore.save( catalogType );
-    }
-    
-    @Override
-    public void deleteCatalogType( CatalogType catalogType )
-    {
-        catalogTypeStore.delete( catalogType );
-    }
-    
-    @Override
-    public void updateCatalogType( CatalogType catalogType )
-    {
-        catalogTypeStore.update( catalogType );
-    }
-    
-    @Override
-    public Collection<CatalogType> getAllCatalogTypes()
-    {
-        return catalogTypeStore.getAllCatalogTypes();
-    }
-    
-    @Override
-    public CatalogType getCatalogType( int id )
-    {
-        return catalogTypeStore.getCatalogType( id );
-    }
-    
-    @Override
-    public CatalogType getCatalogTypeByName( String name )
-    {
-        return catalogTypeStore.getCatalogTypeByName( name );
-    }
-    
-    //Methods
-    public int getCatalogTypeCount()
-    {
-        return catalogTypeStore.getCount();
-    }
-    
-    public int getCatalogTypeCountByName( String name )
-    {
-        return getCountByName( i18nService, catalogTypeStore, name );
-    }
-
-    public Collection<CatalogType> getCatalogTypesBetween( int first, int max )
-    {
-        return getObjectsBetween( i18nService, catalogTypeStore, first, max );
-    }
-
-    public Collection<CatalogType> getCatalogTypesBetweenByName( String name, int first, int max )
-    {
-        return getObjectsBetweenByName( i18nService, catalogTypeStore, name, first, max );
-    }    
-}

=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate'
=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogDataValueStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogDataValueStore.java	2012-05-15 10:33:46 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogDataValueStore.java	1970-01-01 00:00:00 +0000
@@ -1,103 +0,0 @@
-package org.hisp.dhis.coldchain.catalog.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.Criteria;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.catalog.Catalog;
-import org.hisp.dhis.coldchain.catalog.CatalogDataValue;
-import org.hisp.dhis.coldchain.catalog.CatalogDataValueStore;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOption;
-
-public class HibernateCatalogDataValueStore implements CatalogDataValueStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-    
-    // -------------------------------------------------------------------------
-    // CatalogDataValue
-    // -------------------------------------------------------------------------
-
-    @Override
-    public void addCatalogDataValue( CatalogDataValue catalogDataValue )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.save( catalogDataValue );
-    }
-
-    @Override
-    public void deleteCatalogDataValue( CatalogDataValue catalogDataValue )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( catalogDataValue );
-    }
-
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<CatalogDataValue> getAllCatalogDataValues()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( CatalogDataValue.class ).list();
-    }
-
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<CatalogDataValue> getAllCatalogDataValuesByCatalog( Catalog catalog )
-    {
-        Session session = sessionFactory.getCurrentSession();
-        
-        Criteria criteria = session.createCriteria( CatalogDataValue.class );
-        
-        criteria.add( Restrictions.eq( "catalog", catalog ) );
-        return criteria.list();
-    }
-    
-    @Override
-    public void updateCatalogDataValue( CatalogDataValue catalogDataValue )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( catalogDataValue );
-    }
-    
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( CatalogDataValue.class );
-        criteria.add( Restrictions.eq( "catalog", catalog ) );
-        criteria.add( Restrictions.eq( "catalogTypeAttribute", catalogTypeAttribute ) );
-
-        return (CatalogDataValue) criteria.uniqueResult();
-    }
-    
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute, CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( CatalogDataValue.class );
-        criteria.add( Restrictions.eq( "catalog", catalog ) );
-        criteria.add( Restrictions.eq( "catalogTypeAttribute", catalogTypeAttribute ) );
-        criteria.add( Restrictions.eq( "catalogTypeAttributeOption", catalogTypeAttributeOption ) );
-
-        return (CatalogDataValue) criteria.uniqueResult();
-    }
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogStore.java	2012-06-27 06:56:57 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogStore.java	1970-01-01 00:00:00 +0000
@@ -1,89 +0,0 @@
-package org.hisp.dhis.coldchain.catalog.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.Query;
-import org.hibernate.criterion.Projections;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.catalog.Catalog;
-import org.hisp.dhis.coldchain.catalog.CatalogStore;
-import org.hisp.dhis.coldchain.catalog.CatalogType;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
-
-public class HibernateCatalogStore extends HibernateGenericStore<Catalog> implements CatalogStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    
-    // -------------------------------------------------------------------------
-    // Catalog
-    // -------------------------------------------------------------------------
-    
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<Catalog> getAllCatalogs()
-    {
-        return sessionFactory.getCurrentSession().createCriteria( Catalog.class ).list();
-    }
-    
-    @Override
-    public Catalog getCatalog( int id )
-    {
-        return (Catalog) sessionFactory.getCurrentSession().get( Catalog.class, id );
-    }
-    
-    @Override
-    public Catalog getCatalogByName( String name )
-    {
-        return (Catalog) getCriteria( Restrictions.eq( "name", name ) ).uniqueResult();
-    }
-    
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<Catalog> getCatalogs( CatalogType catalogType )
-    {
-        return getCriteria( Restrictions.eq( "catalogType", catalogType ) ).list();
-    }
-      
-    public int getCountCatalog( CatalogType catalogType )
-    {
-        Number rs = (Number) getCriteria(  Restrictions.eq( "catalogType", catalogType ) ).setProjection( Projections.rowCount() ).uniqueResult();
-
-        return rs != null ? rs.intValue() : 0;
-    }   
-    
-    @SuppressWarnings( "unchecked" )
-    public Collection<Catalog> getCatalogs( CatalogType catalogType, int min, int max )
-    {
-        return getCriteria( Restrictions.eq( "catalogType", catalogType ) ).setFirstResult( min ).setMaxResults( max ).list();
-    }
-    
-    public int getCountCatalog( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute, String searchText )
-    {
-        String hql = "SELECT COUNT( DISTINCT cat ) FROM Catalog AS cat  " +
-                        " WHERE cat IN ( SELECT catdata.catalog FROM CatalogDataValue catdata  WHERE catdata.catalogTypeAttribute.id = "+ catalogTypeAttribute.getId()+" AND catdata.value LIKE '%" + searchText + "%' ) " +
-                        " AND cat.catalogType.id = " + catalogType.getId();
-
-        Query query = getQuery( hql );
-
-        Number rs = (Number) query.uniqueResult();
-
-        return (rs != null) ? rs.intValue() : 0;
-    }
-    
-    @SuppressWarnings( "unchecked" )
-    public Collection<Catalog> getCatalogs( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute, String searchText, int min, int max )
-    {
-        String hql = "SELECT DISTINCT cat FROM Catalog AS cat  " +
-                        " WHERE cat IN ( SELECT catdata.catalog FROM CatalogDataValue catdata WHERE catdata.catalogTypeAttribute.id = "+ catalogTypeAttribute.getId()+" AND catdata.value LIKE '%" + searchText + "%' ) " +
-                        " AND cat.catalogType.id = " + catalogType.getId();
-
-        Query query = getQuery( hql ).setFirstResult( min ).setMaxResults( max );
-
-        return query.list();
-    }   
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeAttributeOptionStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeAttributeOptionStore.java	2012-05-15 10:33:46 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeAttributeOptionStore.java	1970-01-01 00:00:00 +0000
@@ -1,113 +0,0 @@
-package org.hisp.dhis.coldchain.catalog.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.Criteria;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.criterion.Projections;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOption;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOptionStore;
-
-public class HibernateCatalogTypeAttributeOptionStore implements CatalogTypeAttributeOptionStore
-{
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-    
-    // -------------------------------------------------------------------------
-    // CatalogTypeAttributeOption
-    // -------------------------------------------------------------------------
-    @Override
-    public int addCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (Integer) session.save( catalogTypeAttributeOption );
-    }
-
-    @Override
-    public void deleteCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( catalogTypeAttributeOption );
-    }
-
-    @Override
-    public Collection<CatalogTypeAttributeOption> getAllCatalogTypeAttributeOptions()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( CatalogTypeAttributeOption.class ).list();
-    }
-
-    @Override
-    public void updateCatalogTypeAttributeOption( CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( catalogTypeAttributeOption );
-    }
-    @Override
-    public CatalogTypeAttributeOption getCatalogTypeAttributeOption( int id )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (CatalogTypeAttributeOption) session.get( CatalogTypeAttributeOption.class, id );
-    }
-    
-    public int countByCatalogTypeAttributeoption( CatalogTypeAttributeOption catalogTypeAttributeOption )
-    {
-        
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( CatalogTypeAttributeOption.class );
-        Number rs = (Number)criteria.add( Restrictions.eq( "catalogTypeAttributeOption", catalogTypeAttributeOption ) ).setProjection( Projections.rowCount() ).uniqueResult();
-        return rs != null ? rs.intValue() : 0;
-        
-        /*
-        Number rs = (Number) getCriteria( Restrictions.eq( "catalogTypeAttributeOption", catalogTypeAttributeOption ) ).setProjection(
-            Projections.rowCount() ).uniqueResult();
-        return rs != null ? rs.intValue() : 0;
-        */
-    }
-    
-    @SuppressWarnings( "unchecked" )
-    public Collection<CatalogTypeAttributeOption> getCatalogTypeAttributeOptions( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-        Criteria criteria = session.createCriteria( CatalogTypeAttributeOption.class );
-        return criteria.add( Restrictions.eq( "catalogTypeAttribute", catalogTypeAttribute ) ).list();
-        //return getCriteria( Restrictions.eq( "catalogTypeAttribute", catalogTypeAttribute ) ).list();
-    }
-    
-    public CatalogTypeAttributeOption getCatalogTypeAttributeOptionName( CatalogTypeAttribute catalogTypeAttribute, String name )
-    {
-        Session session = sessionFactory.getCurrentSession();
-        Criteria criteria = session.createCriteria( CatalogTypeAttributeOption.class );
-        
-        criteria.add( Restrictions.eq( "name", name ) );
-       
-        criteria.add( Restrictions.eq( "catalogTypeAttribute", catalogTypeAttribute ) );
-
-        return (CatalogTypeAttributeOption) criteria.uniqueResult();
-        
-        /*
-        return (CatalogTypeAttributeOption) getCriteria( Restrictions.eq( "name", name ),
-            Restrictions.eq( "catalogTypeAttribute", catalogTypeAttribute ) ).uniqueResult();
-       */
-    }
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeAttributeStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeAttributeStore.java	2012-05-09 07:02:15 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeAttributeStore.java	1970-01-01 00:00:00 +0000
@@ -1,100 +0,0 @@
-package org.hisp.dhis.coldchain.catalog.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeStore;
-import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-
-//public class HibernateCatalogTypeAttributeStore implements CatalogTypeAttributeStore
-public class HibernateCatalogTypeAttributeStore extends HibernateIdentifiableObjectStore<CatalogTypeAttribute> implements CatalogTypeAttributeStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    /*
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )o
-    {
-        this.sessionFactory = sessionFactory;
-    }
-    */
-    // -------------------------------------------------------------------------
-    // CatalogTypeAttribute
-    // -------------------------------------------------------------------------
-
-    /*
-    @Override
-    public void addCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        
-        sessionFactory.getCurrentSession().save( catalogTypeAttribute );
-       
-        Session session = sessionFactory.getCurrentSession();
-
-        return (Integer) session.save( catalogTypeAttribute );
-        
-    }
-
-    @Override
-    public void deleteCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        
-        sessionFactory.getCurrentSession().delete( catalogTypeAttribute );
-       
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( catalogTypeAttribute );
-        
-    }
-    
-    @Override
-    public void updateCatalogTypeAttribute( CatalogTypeAttribute catalogTypeAttribute )
-    {
-        sessionFactory.getCurrentSession().update( catalogTypeAttribute );
-        
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( catalogTypeAttribute );
-             
-    }
-    */
-    @Override
-    public CatalogTypeAttribute getCatalogTypeAttribute( int id )
-    {
-        return (CatalogTypeAttribute) sessionFactory.getCurrentSession().get( CatalogTypeAttribute.class, id );
-        
-        /*
-        Session session = sessionFactory.getCurrentSession();
-
-        return (CatalogTypeAttribute) session.get( CatalogTypeAttribute.class, id );
-        */
-    }
-
-    @Override
-    public CatalogTypeAttribute getCatalogTypeAttributeByName( String name )
-    {
-        return (CatalogTypeAttribute) getCriteria( Restrictions.eq( "name", name ) ).uniqueResult();
-        
-        /*
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( CatalogTypeAttribute.class );
-        criteria.add( Restrictions.eq( "name", name ) );
-        return (CatalogTypeAttribute) criteria.uniqueResult();
-        */
-
-    }
-    @SuppressWarnings( "unchecked" )
-    public Collection<CatalogTypeAttribute> getAllCatalogTypeAttributes()
-    {
-        return sessionFactory.getCurrentSession().createCriteria( CatalogTypeAttribute.class ).list();
-        /*
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( CatalogTypeAttribute.class ).list();
-        */
-    }
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeStore.java	2012-05-09 07:02:15 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeStore.java	1970-01-01 00:00:00 +0000
@@ -1,136 +0,0 @@
-package org.hisp.dhis.coldchain.catalog.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.catalog.CatalogType;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeStore;
-import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-
-
-//public class HibernateCatalogTypeStore implements CatalogTypeStore
-public class HibernateCatalogTypeStore  extends HibernateIdentifiableObjectStore<CatalogType> implements CatalogTypeStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    /*
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-    */
-    // -------------------------------------------------------------------------
-    // CatalogType
-    // -------------------------------------------------------------------------
-    /*
-    @Override
-    public int addCatalogType( CatalogType catalogType )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (Integer) session.save( catalogType );
-    }
-
-    @Override
-    public void deleteCatalogType( CatalogType catalogType )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( catalogType );        
-    }
-
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<CatalogType> getAllCatalogTypes()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( CatalogType.class ).list();
-    }
-
-    @Override
-    public void updateCatalogType( CatalogType catalogType )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( catalogType );        
-    }
-    
-    @Override
-    public CatalogType getCatalogType( int id )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (CatalogType) session.get( CatalogType.class, id );
-    }
-    
-    @Override
-    public CatalogType getCatalogTypeByName( String name )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( CatalogType.class );
-        criteria.add( Restrictions.eq( "name", name ) );
-
-        return (CatalogType) criteria.uniqueResult();
-    }
-    */
-    
-    /*
-    @Override
-    public CatalogType getCatalogTypeByAttribute( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute)
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( CatalogType.class );
-        criteria.add( Restrictions.eq( "name", catalogTypeAttribute ) );
-
-        return (CatalogType) criteria.uniqueResult();
-    }
-    */
-    
-    // -------------------------------------------------------------------------
-    // CatalogType
-    // -------------------------------------------------------------------------
-   
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<CatalogType> getAllCatalogTypes()
-    {
-        return sessionFactory.getCurrentSession().createCriteria( CatalogType.class ).list();
-    }
-    
-    @Override
-    public CatalogType getCatalogType( int id )
-    {
-        return (CatalogType) sessionFactory.getCurrentSession().get( CatalogType.class, id );
-    }
-    
-    @Override
-    public CatalogType getCatalogTypeByName( String name )
-    {
-        return (CatalogType) getCriteria( Restrictions.eq( "name", name ) ).uniqueResult();
-    }
-    
-    /*
-    @Override
-    public CatalogType getCatalogTypeByAttribute( CatalogType catalogType, CatalogTypeAttribute catalogTypeAttribute)
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( CatalogType.class );
-        criteria.add( Restrictions.eq( "name", catalogTypeAttribute ) );
-
-        return (CatalogType) criteria.uniqueResult();
-
-    }
-    */
-        
-    
-    
-    
-    
-}

=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory'
=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentDataValueService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentDataValueService.java	2012-05-23 06:35:17 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentDataValueService.java	1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.period.Period;
-import org.springframework.transaction.annotation.Transactional;
-
-@Transactional
-public class DefaultEquipmentDataValueService implements EquipmentDataValueService
-{
-    private static final Log log = LogFactory.getLog( DefaultEquipmentDataValueService.class );
-    
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private EquipmentDataValueStore equipmentDataValueStore;
-
-    public void setEquipmentDataValueStore( EquipmentDataValueStore equipmentDataValueStore )
-    {
-        this.equipmentDataValueStore = equipmentDataValueStore;
-    }
-    
-    // -------------------------------------------------------------------------
-    // EquipmentDataValue
-    // -------------------------------------------------------------------------
-
-    public void addEquipmentDataValue( EquipmentDataValue equipmentDataValue )
-    {
-        equipmentDataValueStore.addEquipmentDataValue( equipmentDataValue );
-    }
-    
-    public void updateEquipmentDataValue( EquipmentDataValue equipmentDataValue )
-    {
-        equipmentDataValueStore.updateEquipmentDataValue( equipmentDataValue );
-    }
-    
-    public void deleteEquipmentDataValue( EquipmentDataValue equipmentDataValue )
-    {
-        equipmentDataValueStore.deleteEquipmentDataValue( equipmentDataValue );
-    }
-    
-    public Collection<EquipmentDataValue> getEquipmentDataValues( EquipmentInstance equipmentInstance, Period period, Collection<DataElement> dataElements )
-    {
-        return equipmentDataValueStore.getEquipmentDataValues( equipmentInstance, period, dataElements );
-    }
-    
-    public EquipmentDataValue getEquipmentDataValue( EquipmentInstance equipmentInstance, Period period, DataElement dataElement )
-    {
-        return equipmentDataValueStore.getEquipmentDataValue( equipmentInstance, period, dataElement );
-    }
-    
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentInstanceService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentInstanceService.java	2012-05-15 10:33:46 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentInstanceService.java	1970-01-01 00:00:00 +0000
@@ -1,133 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.springframework.transaction.annotation.Transactional;
-
-@Transactional
-public class DefaultEquipmentInstanceService implements EquipmentInstanceService
-{
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private EquipmentInstanceStore equipmentInstanceStore;
-
-    public void setEquipmentInstanceStore( EquipmentInstanceStore equipmentInstanceStore )
-    {
-        this.equipmentInstanceStore = equipmentInstanceStore;
-    }
-
-    private EquipmentService equipmentService;
-    
-    public void setEquipmentService( EquipmentService equipmentService )
-    {
-        this.equipmentService = equipmentService;
-    }
-
-    private EquipmentStatusService equipmentStatusService;
-    
-    public void setEquipmentStatusService( EquipmentStatusService equipmentStatusService )
-    {
-        this.equipmentStatusService = equipmentStatusService;
-    }
-    
-    // -------------------------------------------------------------------------
-    // EquipmentInstance
-    // -------------------------------------------------------------------------
-    
-    @Override
-    public int addEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        //return equipmentInstanceStore.addEquipmentInstance( equipmentInstance );
-        return equipmentInstanceStore.save( equipmentInstance );
-    }
-    @Override
-    public void deleteEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        //equipmentInstanceStore.deleteEquipmentInstance( equipmentInstance );
-        equipmentInstanceStore.delete( equipmentInstance );
-    }
-    
-    public void deleteCompleteEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        List<Equipment> equipmentDetailsList = new ArrayList<Equipment>( equipmentService.getEquipments( equipmentInstance ) );
-        for( Equipment equipmentDetails : equipmentDetailsList )
-        {
-            equipmentService.deleteEquipment( equipmentDetails );
-        }
-        
-        List<EquipmentStatus> equipmentStatusHistory = new ArrayList<EquipmentStatus>( equipmentStatusService.getEquipmentStatusHistory( equipmentInstance ) );
-        for( EquipmentStatus equipmentStatus : equipmentStatusHistory )
-        {
-            equipmentStatusService.deleteEquipmentStatus( equipmentStatus );
-        }
-        
-        deleteEquipmentInstance( equipmentInstance );
-    }
-    
-    @Override
-    public Collection<EquipmentInstance> getAllEquipmentInstance()
-    {
-        //return equipmentInstanceStore.getAllEquipmentInstance();
-        return equipmentInstanceStore.getAll();
-    }
-    @Override
-    public void updateEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        //equipmentInstanceStore.updateEquipmentInstance( equipmentInstance );
-        equipmentInstanceStore.update( equipmentInstance );
-    }
-    
-    public int createEquipment( EquipmentInstance equipmentInstance, List<Equipment> equipmentDetails )
-    {
-        int equipmentInstanceId = addEquipmentInstance( equipmentInstance );
-        
-        for( Equipment equipment : equipmentDetails )
-        {
-            equipmentService.addEquipment( equipment );
-        }
-        
-        return equipmentInstanceId;
-    }
-
-    public EquipmentInstance getEquipmentInstance( int id )
-    {
-        return equipmentInstanceStore.get( id );
-    }
-    
-    public Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit )
-    {
-        return equipmentInstanceStore.getEquipmentInstances( orgUnit );
-    }
-
-    public Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType )
-    {
-        return equipmentInstanceStore.getEquipmentInstances( orgUnit, inventoryType );
-    }
-
-    public Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType, int min, int max )
-    {
-        return equipmentInstanceStore.getEquipmentInstances( orgUnit, inventoryType, min, max );
-    }
-
-    @Override
-    public int getCountEquipmentInstance( OrganisationUnit orgUnit, InventoryType inventoryType )
-    {
-        return equipmentInstanceStore.getCountEquipmentInstance( orgUnit, inventoryType );
-    }
-
-    public int getCountEquipmentInstance( OrganisationUnit orgUnit, InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, String searchText )
-    {
-        return equipmentInstanceStore.getCountEquipmentInstance(  orgUnit,  inventoryType, inventoryTypeAttribute ,  searchText );
-    }
-
-    public Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, String searchText, int min, int max )
-    {
-        return equipmentInstanceStore.getEquipmentInstances( orgUnit, inventoryType, inventoryTypeAttribute, searchText, min, max );
-    }
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentService.java	2012-05-19 14:42:20 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentService.java	1970-01-01 00:00:00 +0000
@@ -1,136 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.springframework.transaction.annotation.Transactional;
-@Transactional
-public class DefaultEquipmentService implements EquipmentService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private EquipmentStore equipmentStore;
-    
-    public void setEquipmentStore( EquipmentStore equipmentStore )
-    {
-        this.equipmentStore = equipmentStore;
-    }
-
-    // -------------------------------------------------------------------------
-    // EquipmentDetails
-    // -------------------------------------------------------------------------
-    
-    @Override
-    public void addEquipment( Equipment equipment )
-    {
-        equipmentStore.addEquipment( equipment );
-    }
-    @Override
-    public void deleteEquipment( Equipment equipment )
-    {
-        equipmentStore.deleteEquipment( equipment );
-    }
-    @Override
-    public Collection<Equipment> getAllEquipments()
-    {
-        return equipmentStore.getAllEquipments();
-    }
-    @Override
-    public void updateEquipment( Equipment equipment )
-    {
-        equipmentStore.updateEquipment( equipment );
-    }
-    
-    public Collection<Equipment> getEquipments( EquipmentInstance equipmentInstance)
-    {
-        return equipmentStore.getEquipments( equipmentInstance );
-    }
-
-    public Equipment getEquipment( EquipmentInstance equipmentInstance, InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        return equipmentStore.getEquipment( equipmentInstance, inventoryTypeAttribute );
-    }
- /*   
-    public Map<String, String> inventryTypeAttributeAndValue( EquipmentInstance equipmentInstance, List<InventoryTypeAttribute> inventoryTypeAttributeList )
-    {
-        String inventoryTypeAttributeName = "";
-        
-        String inventoryTypeAttributeValue = "";
-        
-        String inventoryTypeAttributeNameValue = "";
-        
-        Map<String, String> inventryTypeAttributeAndValueMap = new HashMap<String, String>();
-        
-        for( InventoryTypeAttribute inventoryTypeAttribute : inventoryTypeAttributeList )
-        {
-            Equipment equipmentDetail = getEquipment( equipmentInstance, inventoryTypeAttribute );
-            if( equipmentDetail != null && equipmentDetail.getValue() != null )
-            {
-                
-                if ( InventoryTypeAttribute.TYPE_COMBO.equalsIgnoreCase( equipmentDetail.getInventoryTypeAttribute().getValueType() ) )
-                {
-                    inventryTypeAttributeAndValueMap.put( inventoryTypeAttribute.getName(), equipmentDetail.getInventoryTypeAttributeOption().getName() );
-                    
-                    inventoryTypeAttributeName += "--" + inventoryTypeAttribute.getName();
-                    inventoryTypeAttributeValue += "--" + equipmentDetail.getInventoryTypeAttributeOption().getName();
-                }
-                else
-                {
-                    inventryTypeAttributeAndValueMap.put( inventoryTypeAttribute.getName(), equipmentDetail.getValue() );
-                    
-                    inventoryTypeAttributeName += "--" + inventoryTypeAttribute.getName();
-                    inventoryTypeAttributeValue += "--" + equipmentDetail.getValue();
-                }
-                
-                inventoryTypeAttributeNameValue = inventoryTypeAttributeName + "#@" + inventoryTypeAttributeValue;
-            }
-        }
-        
-        
-        
-        return inventryTypeAttributeAndValueMap;
-    }
- */
-    public String inventryTypeAttributeAndValue( EquipmentInstance equipmentInstance, List<InventoryTypeAttribute> inventoryTypeAttributeList )
-    {
-        String inventoryTypeAttributeName = "";
-        
-        String inventoryTypeAttributeValue = "";
-        
-        String inventoryTypeAttributeNameValue = "";
-        
-        //Map<String, String> inventryTypeAttributeAndValueMap = new HashMap<String, String>();
-        
-        for( InventoryTypeAttribute inventoryTypeAttribute : inventoryTypeAttributeList )
-        {
-            Equipment equipmentDetail = getEquipment( equipmentInstance, inventoryTypeAttribute );
-            if( equipmentDetail != null && equipmentDetail.getValue() != null )
-            {
-                
-                if ( InventoryTypeAttribute.TYPE_COMBO.equalsIgnoreCase( equipmentDetail.getInventoryTypeAttribute().getValueType() ) )
-                {
-                    //inventryTypeAttributeAndValueMap.put( inventoryTypeAttribute.getName(), equipmentDetail.getInventoryTypeAttributeOption().getName() );
-                    
-                    inventoryTypeAttributeName += "--" + inventoryTypeAttribute.getName();
-                    inventoryTypeAttributeValue += "--" + equipmentDetail.getInventoryTypeAttributeOption().getName();
-                }
-                else
-                {
-                    //inventryTypeAttributeAndValueMap.put( inventoryTypeAttribute.getName(), equipmentDetail.getValue() );
-                    
-                    inventoryTypeAttributeName += "--" + inventoryTypeAttribute.getName();
-                    inventoryTypeAttributeValue += "--" + equipmentDetail.getValue();
-                }
-                
-                inventoryTypeAttributeNameValue = inventoryTypeAttributeName.substring( 2 ) + "#@#" + inventoryTypeAttributeValue.substring( 2 );
-            }
-        }
-        
-        //System.out.println( inventoryTypeAttributeName + "#@#" + inventoryTypeAttributeValue );
-        
-        return inventoryTypeAttributeNameValue;
-    }    
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentStatusService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentStatusService.java	2012-05-02 09:18:42 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultEquipmentStatusService.java	1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.springframework.transaction.annotation.Transactional;
-@Transactional
-public class DefaultEquipmentStatusService implements EquipmentStatusService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private EquipmentStatusStore equipmentStatusStore;
-
-    public void setEquipmentStatusStore( EquipmentStatusStore equipmentStatusStore )
-    {
-        this.equipmentStatusStore = equipmentStatusStore;
-    }
-    
-    // -------------------------------------------------------------------------
-    // EquipmentWorkingStatus
-    // -------------------------------------------------------------------------
-    
-    @Override
-    public int addEquipmentStatus( EquipmentStatus equipmentStatus )
-    {
-        return equipmentStatusStore.save( equipmentStatus );
-    }
-    @Override
-    public void deleteEquipmentStatus( EquipmentStatus equipmentStatus )
-    {
-        equipmentStatusStore.delete( equipmentStatus );
-    }
-    @Override
-    public Collection<EquipmentStatus> getAllEquipmentStatus()
-    {
-        return equipmentStatusStore.getAll();
-    }
-    @Override
-    public void updateEquipmentStatus( EquipmentStatus equipmentStatus )
-    {
-        equipmentStatusStore.update( equipmentStatus );
-    }
-    
-    public Collection<EquipmentStatus> getEquipmentStatusHistory( EquipmentInstance equipmentInstance )
-    {
-        return equipmentStatusStore.getEquipmentStatusHistory( equipmentInstance );
-    }
-
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryTypeAttributeOptionService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryTypeAttributeOptionService.java	2012-04-21 12:57:24 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryTypeAttributeOptionService.java	1970-01-01 00:00:00 +0000
@@ -1,61 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.springframework.transaction.annotation.Transactional;
-
-public class DefaultInventoryTypeAttributeOptionService implements InventoryTypeAttributeOptionService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    private InventoryTypeAttributeOptionStore inventoryTypeAttributeOptionStore;
-
-    public void setInventoryTypeAttributeOptionStore( InventoryTypeAttributeOptionStore inventoryTypeAttributeOptionStore )
-    {
-        this.inventoryTypeAttributeOptionStore = inventoryTypeAttributeOptionStore;
-    }
-
-    // -------------------------------------------------------------------------
-    // InventoryTypeAttributeOption
-    // -------------------------------------------------------------------------
-    @Transactional
-    @Override
-    public int addInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption )
-    {
-        return inventoryTypeAttributeOptionStore.addInventoryTypeAttributeOption( inventoryTypeAttributeOption );
-    }
-    @Transactional
-    @Override
-    public void deleteInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption )
-    {
-        inventoryTypeAttributeOptionStore.deleteInventoryTypeAttributeOption( inventoryTypeAttributeOption );
-    }
-    @Transactional
-    @Override
-    public Collection<InventoryTypeAttributeOption> getAllInventoryTypeAttributeOptions()
-    {
-        return inventoryTypeAttributeOptionStore.getAllInventoryTypeAttributeOptions();
-    }
-    @Transactional
-    @Override
-    public void updateInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption )
-    {
-        inventoryTypeAttributeOptionStore.updateInventoryTypeAttributeOption( inventoryTypeAttributeOption );
-    }
-    
-    public Collection<InventoryTypeAttributeOption> get( InventoryTypeAttribute inventoryTypeAttribute)
-    {
-        return inventoryTypeAttributeOptionStore.get( inventoryTypeAttribute );
-    }
-    
-    public InventoryTypeAttributeOption get( InventoryTypeAttribute inventoryTypeAttribute, String name )
-    {
-        return inventoryTypeAttributeOptionStore.get( inventoryTypeAttribute, name );
-    }
-    
-    public InventoryTypeAttributeOption getInventoryTypeAttributeOption( int id )
-    {
-        return inventoryTypeAttributeOptionStore.getInventoryTypeAttributeOption( id );
-    }
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryTypeAttributeService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryTypeAttributeService.java	2012-05-16 07:06:15 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryTypeAttributeService.java	1970-01-01 00:00:00 +0000
@@ -1,138 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import static org.hisp.dhis.i18n.I18nUtils.getCountByName;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetween;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetweenByName;
-
-import java.util.Collection;
-
-import org.hisp.dhis.i18n.I18nService;
-import org.springframework.transaction.annotation.Transactional;
-
-@Transactional
-public class DefaultInventoryTypeAttributeService implements InventoryTypeAttributeService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private InventoryTypeAttributeStore inventoryTypeAttributeStore;
-
-    public void setInventoryTypeAttributeStore( InventoryTypeAttributeStore inventoryTypeAttributeStore )
-    {
-        this.inventoryTypeAttributeStore = inventoryTypeAttributeStore;
-    }
-    
-    private I18nService i18nService;
-
-    public void setI18nService( I18nService service )
-    {
-        i18nService = service;
-    }
-
-    // -------------------------------------------------------------------------
-    // InventoryTypeAttribute
-    // -------------------------------------------------------------------------
-    /*
-    @Transactional
-    @Override
-    public int addInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        return inventoryTypeAttributeStore.addInventoryTypeAttribute( inventoryTypeAttribute );
-    }
-    
-    @Transactional
-    @Override
-    public void deleteInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        inventoryTypeAttributeStore.deleteInventoryTypeAttribute( inventoryTypeAttribute );
-    }
-    
-    @Transactional
-    @Override
-    public Collection<InventoryTypeAttribute> getAllInventoryTypeAttributes()
-    {
-        return inventoryTypeAttributeStore.getAllInventoryTypeAttributes();
-    }
-    
-    @Transactional
-    @Override
-    public void updateInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        inventoryTypeAttributeStore.updateInventoryTypeAttribute( inventoryTypeAttribute );
-    }
-    
-    public InventoryTypeAttribute getInventoryTypeAttribute( int id )
-    {
-        return inventoryTypeAttributeStore.getInventoryTypeAttribute( id );
-    }
-    
-    public  InventoryTypeAttribute getInventoryTypeAttributeByName( String name )
-    {
-        return inventoryTypeAttributeStore.getInventoryTypeAttributeByName( name );
-    }
-    */
-    
-
-    @Override
-    public int addInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        return inventoryTypeAttributeStore.save( inventoryTypeAttribute );
-    }
-    
-    @Override
-    public void deleteInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        inventoryTypeAttributeStore.delete( inventoryTypeAttribute );
-    }
-    
-    @Override
-    public Collection<InventoryTypeAttribute> getAllInventoryTypeAttributes()
-    {
-        return inventoryTypeAttributeStore.getAllInventoryTypeAttributes();
-    }
-    
-    @Override
-    public void updateInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        inventoryTypeAttributeStore.update( inventoryTypeAttribute );
-    }
-    
-    public InventoryTypeAttribute getInventoryTypeAttribute( int id )
-    {
-        return inventoryTypeAttributeStore.getInventoryTypeAttribute( id );
-    }
-    
-    public  InventoryTypeAttribute getInventoryTypeAttributeByName( String name )
-    {
-        return inventoryTypeAttributeStore.getInventoryTypeAttributeByName( name );
-    }
-
-    
-    //Methods
-    public int getInventoryTypeAttributeCount()
-    {
-        return inventoryTypeAttributeStore.getCount();
-    }
-    
-    public int getInventoryTypeAttributeCountByName( String name )
-    {
-        return getCountByName( i18nService, inventoryTypeAttributeStore, name );
-    }
-
-    public Collection<InventoryTypeAttribute> getInventoryTypeAttributesBetween( int first, int max )
-    {
-        return getObjectsBetween( i18nService, inventoryTypeAttributeStore, first, max );
-    }
-    
-    public Collection<InventoryTypeAttribute> getInventoryTypeAttributesBetweenByName( String name, int first, int max )
-    {
-        return getObjectsBetweenByName( i18nService, inventoryTypeAttributeStore, name, first, max );
-    }
-    /*
-    public Collection<InventoryTypeAttribute> getAllInventoryTypeAttributesForDisplay( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        return inventoryTypeAttributeStore.getAllInventoryTypeAttributesForDisplay( inventoryTypeAttribute );
-    }
-    */
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryTypeService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryTypeService.java	2012-06-21 09:47:23 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryTypeService.java	1970-01-01 00:00:00 +0000
@@ -1,158 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import static org.hisp.dhis.i18n.I18nUtils.getCountByName;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetween;
-import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetweenByName;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.hisp.dhis.i18n.I18nService;
-import org.springframework.transaction.annotation.Transactional;
-@Transactional
-public class DefaultInventoryTypeService implements InventoryTypeService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    private InventoryTypeStore inventoryTypeStore;
-
-    public void setInventoryTypeStore( InventoryTypeStore inventoryTypeStore )
-    {
-        this.inventoryTypeStore = inventoryTypeStore;
-    }
-    
-    private I18nService i18nService;
-
-    public void setI18nService( I18nService service )
-    {
-        i18nService = service;
-    }
-    
-    // -------------------------------------------------------------------------
-    // InventoryType
-    // -------------------------------------------------------------------------
-    /*
-    @Transactional
-    @Override
-    public int addInventoryType( InventoryType inventoryType )
-    {
-        return inventoryTypeStore.addInventoryType( inventoryType );
-    }
-
-    @Transactional
-    @Override
-    public void deleteInventoryType( InventoryType inventoryType )
-    {
-        inventoryTypeStore.deleteInventoryType( inventoryType );
-    }
-
-    @Transactional
-    @Override
-    public Collection<InventoryType> getAllInventoryTypes()
-    {
-        return inventoryTypeStore.getAllInventoryTypes();
-    }
-
-    @Transactional
-    @Override
-    public void updateInventoryType( InventoryType inventoryType )
-    {
-        inventoryTypeStore.updateInventoryType( inventoryType );
-    }
-    
-    public InventoryType getInventoryTypeByName( String name )
-    {
-        return inventoryTypeStore.getInventoryTypeByName( name );
-    }
-    
-    public InventoryType getInventoryType( int id )
-    {
-        return inventoryTypeStore.getInventoryType( id );
-    }
-    */
-    
- 
-    @Override
-    public int addInventoryType( InventoryType inventoryType )
-    {
-        return inventoryTypeStore.save( inventoryType );
-    }
-   
-    @Override
-    public void deleteInventoryType( InventoryType inventoryType )
-    {
-        inventoryTypeStore.delete( inventoryType );
-    }
-    
-    @Override
-    public void updateInventoryType( InventoryType inventoryType )
-    {
-        inventoryTypeStore.update( inventoryType );
-    }
-    
-    @Override
-    public Collection<InventoryType> getAllInventoryTypes()
-    {
-        return inventoryTypeStore.getAllInventoryTypes();
-    }
-    
-    @Override
-    public InventoryType getInventoryTypeByName( String name )
-    {
-        return inventoryTypeStore.getInventoryTypeByName( name );
-    }
-    
-    @Override
-    public InventoryType getInventoryType( int id )
-    {
-        return inventoryTypeStore.getInventoryType( id );
-    }
-    
-    //Methods
-    public int getInventoryTypeCount()
-    {
-        return inventoryTypeStore.getCount();
-    }
-    
-    public int getInventoryTypeCountByName( String name )
-    {
-        return getCountByName( i18nService, inventoryTypeStore, name );
-    }
-    
-    public Collection<InventoryType> getInventoryTypesBetween( int first, int max )
-    {
-        return getObjectsBetween( i18nService, inventoryTypeStore, first, max );
-    }
-    
-    public Collection<InventoryType> getInventoryTypesBetweenByName( String name, int first, int max )
-    {
-        return getObjectsBetweenByName( i18nService, inventoryTypeStore, name, first, max );
-    } 
-    /*
-    public Collection<InventoryTypeAttribute> getAllInventoryTypeAttributesForDisplay( InventoryType inventoryType )
-    {
-        return inventoryTypeStore.getAllInventoryTypeAttributesForDisplay( inventoryType );
-    }
-    */
-    public Collection<InventoryTypeAttribute> getAllInventoryTypeAttributesForDisplay( InventoryType inventoryType )
-    {
-        List<InventoryTypeAttribute> inventoryTypeAttributeList = new ArrayList<InventoryTypeAttribute>();
-       
-        List<InventoryType_Attribute> inventoryType_AttributeList = new ArrayList<InventoryType_Attribute>( inventoryType.getInventoryType_Attributes() );
-        for ( InventoryType_Attribute inventoryType_Attribute : inventoryType_AttributeList )
-        {
-            
-            if ( inventoryType_Attribute.isDisplay() )
-            {
-                inventoryTypeAttributeList.add( inventoryType_Attribute.getInventoryTypeAttribute() );
-            }
-        }
-
-        return inventoryTypeAttributeList;
-    }
-    
-    
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryType_AttributeService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryType_AttributeService.java	2012-06-18 09:15:09 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/DefaultInventoryType_AttributeService.java	1970-01-01 00:00:00 +0000
@@ -1,94 +0,0 @@
-package org.hisp.dhis.coldchain.inventory;
-
-import java.util.Collection;
-
-import org.springframework.transaction.annotation.Transactional;
-
-
-/**
- * @author Mithilesh Kumar Thakur
- *
- * @version DefaultInventoryType_AttributeService.java Jun 14, 2012 3:19:02 PM	
- */
-
-public class DefaultInventoryType_AttributeService implements InventoryType_AttributeService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    private InventoryType_AttributeStore inventoryType_AttributeStore;
-
-    public void setInventoryType_AttributeStore( InventoryType_AttributeStore inventoryType_AttributeStore )
-    {
-        this.inventoryType_AttributeStore = inventoryType_AttributeStore;
-    }
-    
-    
-    // -------------------------------------------------------------------------
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    @Transactional
-    @Override
-    public void addInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute )
-    {
-        inventoryType_AttributeStore.addInventoryType_Attribute( inventoryType_Attribute );
-    }
-    
-    @Transactional
-    @Override
-    public void deleteInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute )
-    {
-        inventoryType_AttributeStore.deleteInventoryType_Attribute( inventoryType_Attribute );
-    }
-    
-    @Transactional
-    @Override
-    public void updateInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute )
-    {
-        inventoryType_AttributeStore.updateInventoryType_Attribute( inventoryType_Attribute );
-    }
-    
-    @Transactional
-    @Override
-    public Collection<InventoryType_Attribute> getAllInventoryTypeAttributes()
-    {
-        return inventoryType_AttributeStore.getAllInventoryTypeAttributes();
-    }
-    
-    @Transactional
-    @Override
-    public InventoryType_Attribute getInventoryTypeAttribute( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        return inventoryType_AttributeStore.getInventoryTypeAttribute( inventoryType, inventoryTypeAttribute );
-    }
-    
-    @Transactional
-    @Override
-    public Collection<InventoryType_Attribute> getAllInventoryTypeAttributesByInventoryType( InventoryType inventoryType )
-    {
-        return inventoryType_AttributeStore.getAllInventoryTypeAttributesByInventoryType( inventoryType );
-    }
-    
-    @Transactional
-    @Override
-    public Collection<InventoryTypeAttribute> getListInventoryTypeAttribute( InventoryType inventoryType )
-    {
-        return inventoryType_AttributeStore.getListInventoryTypeAttribute( inventoryType );
-    }
-
-    @Transactional
-    @Override
-    public InventoryType_Attribute getInventoryTypeAttributeForDisplay( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, boolean display)
-    {
-        return inventoryType_AttributeStore.getInventoryTypeAttributeForDisplay( inventoryType, inventoryTypeAttribute, display );
-    }
-    
-    @Transactional
-    @Override
-    public Collection<InventoryType_Attribute> getAllInventoryTypeAttributeForDisplay( InventoryType inventoryType, boolean display )
-    {
-        return inventoryType_AttributeStore.getAllInventoryTypeAttributeForDisplay( inventoryType, display );
-    }   
-    
-}

=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate'
=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentDataValueStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentDataValueStore.java	2012-05-23 06:35:17 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentDataValueStore.java	1970-01-01 00:00:00 +0000
@@ -1,108 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.hibernate;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.hibernate.Criteria;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.inventory.EquipmentDataValue;
-import org.hisp.dhis.coldchain.inventory.EquipmentDataValueStore;
-import org.hisp.dhis.coldchain.inventory.EquipmentInstance;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodStore;
-
-public class HibernateEquipmentDataValueStore implements EquipmentDataValueStore
-{
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-
-    private PeriodStore periodStore;
-
-    public void setPeriodStore( PeriodStore periodStore )
-    {
-        this.periodStore = periodStore;
-    }
-
-    // -------------------------------------------------------------------------
-    // EquipmentDataValue
-    // -------------------------------------------------------------------------
-
-    public void addEquipmentDataValue( EquipmentDataValue equipmentDataValue )
-    {
-        equipmentDataValue.setPeriod( periodStore.reloadForceAddPeriod( equipmentDataValue.getPeriod() ) );
-
-        Session session = sessionFactory.getCurrentSession();
-
-        session.save( equipmentDataValue );
-    }
-
-    public void updateEquipmentDataValue( EquipmentDataValue equipmentDataValue )
-    {
-        equipmentDataValue.setPeriod( periodStore.reloadForceAddPeriod( equipmentDataValue.getPeriod() ) );
-
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( equipmentDataValue );
-    }
-
-    public void deleteEquipmentDataValue( EquipmentDataValue equipmentDataValue )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( equipmentDataValue );
-    }
-    @SuppressWarnings( "unchecked" )
-    public Collection<EquipmentDataValue> getEquipmentDataValues( EquipmentInstance equipmentInstance, Period period, Collection<DataElement> dataElements )
-    {
-        Period storedPeriod = periodStore.reloadPeriod( period );
-
-        if ( storedPeriod == null || dataElements == null || dataElements.isEmpty() )
-        {
-            return Collections.emptySet();
-        }
-
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( EquipmentDataValue.class );
-        criteria.add( Restrictions.eq( "equipmentInstance", equipmentInstance ) );
-        criteria.add( Restrictions.eq( "period", storedPeriod ) );
-        criteria.add( Restrictions.in( "dataElement", dataElements ) );
-
-        return criteria.list();
-    }
-    
-    public EquipmentDataValue getEquipmentDataValue( EquipmentInstance equipmentInstance, Period period, DataElement dataElement )
-    {
-        Period storedPeriod = periodStore.reloadPeriod( period );
-
-        if ( storedPeriod == null || dataElement == null )
-        {
-            return null;
-        }
-
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( EquipmentDataValue.class );
-        criteria.add( Restrictions.eq( "equipmentInstance", equipmentInstance ) );
-        criteria.add( Restrictions.eq( "period", storedPeriod ) );
-        criteria.add( Restrictions.eq( "dataElement", dataElement ) );
-
-        return (EquipmentDataValue) criteria.uniqueResult();
-    }
-    
-    
-    
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentInstanceStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentInstanceStore.java	2012-06-26 08:38:56 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentInstanceStore.java	1970-01-01 00:00:00 +0000
@@ -1,157 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.Criteria;
-import org.hibernate.Query;
-import org.hibernate.criterion.Conjunction;
-import org.hibernate.criterion.Projections;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.inventory.EquipmentInstance;
-import org.hisp.dhis.coldchain.inventory.EquipmentInstanceStore;
-import org.hisp.dhis.coldchain.inventory.InventoryType;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.springframework.transaction.annotation.Transactional;
-
-@Transactional
-public class HibernateEquipmentInstanceStore 
-    extends HibernateGenericStore<EquipmentInstance>
-    implements EquipmentInstanceStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    /*
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-    */
-    
-
-    // -------------------------------------------------------------------------
-    // EquipmentInstance
-    // -------------------------------------------------------------------------
-
-    /*
-    public int addEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (Integer) session.save( equipmentInstance );
-    }
-
-    
-    public void deleteEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( equipmentInstance );
-    }
-
-    
-    public Collection<EquipmentInstance> getAllEquipmentInstance()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( EquipmentInstance.class ).list();
-    }
-
-    
-    public void updateEquipmentInstance( EquipmentInstance equipmentInstance )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( equipmentInstance );
-    }
-
-    */
-    
-    @SuppressWarnings( "unchecked" )
-    public Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit )
-    {
-        /*
-        Session session = sessionFactory.getCurrentSession();
-        
-        Criteria criteria = session.createCriteria( InventoryTypeAttribute.class );
-        criteria.add( Restrictions.eq( "organisationUnit", orgUnit ) );
-
-        return criteria.list();
-        */
-        
-        return getCriteria( Restrictions.eq( "organisationUnit", orgUnit ) ).list();
-    }
-    
-    @SuppressWarnings( "unchecked" )
-    public Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType )
-    {
-        /*
-        Session session = sessionFactory.getCurrentSession();
-        
-        Criteria criteria = session.createCriteria( InventoryTypeAttribute.class );
-        criteria.add( Restrictions.eq( "organisationUnit", orgUnit ) );
-        criteria.add( Restrictions.eq( "inventoryType", inventoryType ) );
-
-        return criteria.list();
-        */
-        
-        Criteria crit = getCriteria();
-        Conjunction con = Restrictions.conjunction();
-
-        con.add( Restrictions.eq( "organisationUnit", orgUnit ) );
-        con.add( Restrictions.eq( "inventoryType", inventoryType ) );
-
-        crit.add( con );
-
-        return crit.list();
-    }
-    
-    public int getCountEquipmentInstance( OrganisationUnit orgUnit, InventoryType inventoryType )
-    {
-        Number rs = (Number) getCriteria( Restrictions.eq( "organisationUnit", orgUnit ) ).add( Restrictions.eq( "inventoryType", inventoryType ) ).setProjection(
-            Projections.rowCount() ).uniqueResult();
-
-        return rs != null ? rs.intValue() : 0;
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType, int min, int max )
-    {
-        return getCriteria( Restrictions.eq( "organisationUnit", orgUnit ) ).add( Restrictions.eq( "inventoryType", inventoryType ) ).setFirstResult( min ).setMaxResults( max ).list();
-    }
-
-    public int getCountEquipmentInstance( OrganisationUnit orgUnit, InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, String searchText )
-    {
-        String hql = "SELECT COUNT( DISTINCT ei ) FROM EquipmentInstance AS ei  " +
-                        " WHERE ei IN ( SELECT ed.equipmentInstance FROM Equipment AS ed WHERE ed.inventoryTypeAttribute.id = "+ inventoryTypeAttribute.getId()+" AND ed.value LIKE '%" + searchText + "%' ) " +
-                        " AND ei.organisationUnit.id = " + orgUnit.getId()  +
-                        " AND ei.inventoryType.id = " + inventoryType.getId();
-
-        
-        Query query = getQuery( hql );
-
-        Number rs = (Number) query.uniqueResult();
-
-        return (rs != null) ? rs.intValue() : 0;
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public Collection<EquipmentInstance> getEquipmentInstances( OrganisationUnit orgUnit, InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, String searchText, int min, int max )
-    {
-        String hql = "SELECT DISTINCT ei FROM EquipmentInstance AS ei  " +
-                        " WHERE ei IN ( SELECT ed.equipmentInstance FROM Equipment AS ed WHERE ed.inventoryTypeAttribute.id = "+ inventoryTypeAttribute.getId()+" AND ed.value like '%" + searchText + "%' ) " +
-                        " AND ei.organisationUnit.id = " + orgUnit.getId()  +
-                        " AND ei.inventoryType.id = " + inventoryType.getId();
-
-        
-        Query query = getQuery( hql ).setFirstResult( min ).setMaxResults( max );
-
-        return query.list();
-    }
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentStatusStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentStatusStore.java	2012-05-02 09:18:42 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentStatusStore.java	1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.inventory.EquipmentInstance;
-import org.hisp.dhis.coldchain.inventory.EquipmentStatus;
-import org.hisp.dhis.coldchain.inventory.EquipmentStatusStore;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
-import org.springframework.transaction.annotation.Transactional;
-
-@Transactional
-public class HibernateEquipmentStatusStore 
-    extends HibernateGenericStore<EquipmentStatus>
-    implements EquipmentStatusStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    /*
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-    */
-    
-    // -------------------------------------------------------------------------
-    // EquipmentWorkingStatus
-    // -------------------------------------------------------------------------
-
-    /*
-    @Override
-    public int addEquipmentStatus( EquipmentStatus equipmentStatus )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (Integer) session.save( equipmentStatus );
-    }
-
-    @Override
-    public void deleteEquipmentStatus( EquipmentStatus equipmentStatus )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( equipmentStatus );
-    }
-
-    @Override
-    public Collection<EquipmentStatus> getAllEquipmentStatus()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( EquipmentStatus.class ).list();
-    }
-
-    @Override
-    public void updateEquipmentStatus( EquipmentStatus equipmentStatus )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( equipmentStatus );
-    }
-    */
-    
-    @SuppressWarnings( "unchecked" )
-    public Collection<EquipmentStatus> getEquipmentStatusHistory( EquipmentInstance equipmentInstance )
-    {
-        return getCriteria( Restrictions.eq( "equipmentInstance", equipmentInstance ) ).list();
-    }
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentStore.java	2012-05-15 12:19:04 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateEquipmentStore.java	1970-01-01 00:00:00 +0000
@@ -1,87 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.Criteria;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.inventory.Equipment;
-import org.hisp.dhis.coldchain.inventory.EquipmentInstance;
-import org.hisp.dhis.coldchain.inventory.EquipmentStore;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute;
-
-public class HibernateEquipmentStore implements EquipmentStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-    
-    // -------------------------------------------------------------------------
-    // EquipmentDetails
-    // -------------------------------------------------------------------------
-    
-    @Override
-    public void addEquipment( Equipment equipment )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.save( equipment );
-    }
-
-    @Override
-    public void deleteEquipment( Equipment equipment )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( equipment );
-    }
-
-    @Override
-    public Collection<Equipment> getAllEquipments()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( Equipment.class ).list();
-    }
-
-    @Override
-    public void updateEquipment( Equipment equipment )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( equipment );
-    }
-    
-    
-    public Collection<Equipment> getEquipments( EquipmentInstance equipmentInstance )
-    {
-        Session session = sessionFactory.getCurrentSession();
-        
-        Criteria criteria = session.createCriteria( Equipment.class );
-        
-        criteria.add( Restrictions.eq( "equipmentInstance", equipmentInstance ) );
-        
-        return criteria.list();
-    }
-
-    public Equipment getEquipment( EquipmentInstance equipmentInstance, InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-        
-        Criteria criteria = session.createCriteria( Equipment.class );
-        
-        criteria.add( Restrictions.eq( "equipmentInstance", equipmentInstance ) );
-        criteria.add( Restrictions.eq( "inventoryTypeAttribute", inventoryTypeAttribute ) );
-        
-        return (Equipment) criteria.uniqueResult();
-    }
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryTypeAttributeOptionStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryTypeAttributeOptionStore.java	2012-04-21 12:57:24 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryTypeAttributeOptionStore.java	1970-01-01 00:00:00 +0000
@@ -1,89 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.Criteria;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeOption;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeOptionStore;
-
-public class HibernateInventoryTypeAttributeOptionStore implements InventoryTypeAttributeOptionStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-
-    // -------------------------------------------------------------------------
-    // InventoryTypeAttributeOption
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int addInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (Integer) session.save( inventoryTypeAttributeOption );
-    }
-
-    @Override
-    public void deleteInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( inventoryTypeAttributeOption );
-    }
-
-    @Override
-    public Collection<InventoryTypeAttributeOption> getAllInventoryTypeAttributeOptions()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( InventoryTypeAttributeOption.class ).list();
-    }
-
-    @Override
-    public void updateInventoryTypeAttributeOption( InventoryTypeAttributeOption inventoryTypeAttributeOption )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( inventoryTypeAttributeOption );
-    }
-    
-    public InventoryTypeAttributeOption getInventoryTypeAttributeOption( int id )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (InventoryTypeAttributeOption) session.get( InventoryTypeAttributeOption.class, id );
-    }
-
-    public Collection<InventoryTypeAttributeOption> get( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( InventoryTypeAttributeOption.class );
-        criteria.add( Restrictions.eq( "inventoryTypeAttribute", inventoryTypeAttribute ) );
-
-        return criteria.list();
-    }
-
-    public InventoryTypeAttributeOption get( InventoryTypeAttribute inventoryTypeAttribute, String name )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( InventoryTypeAttributeOption.class );
-        criteria.add( Restrictions.eq( "inventoryTypeAttribute", inventoryTypeAttribute ) );
-        criteria.add( Restrictions.eq( "name", name ) );
-
-        return (InventoryTypeAttributeOption) criteria.uniqueResult();
-    }
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryTypeAttributeStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryTypeAttributeStore.java	2012-05-16 07:06:15 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryTypeAttributeStore.java	1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeStore;
-import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-
-public class HibernateInventoryTypeAttributeStore extends HibernateIdentifiableObjectStore<InventoryTypeAttribute> implements InventoryTypeAttributeStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    /*
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-    */
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    /*
-    @Override
-    public int addInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (Integer) session.save( inventoryTypeAttribute );
-    }
-
-    @Override
-    public void deleteInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( inventoryTypeAttribute );
-    }
-
-    @Override
-    public Collection<InventoryTypeAttribute> getAllInventoryTypeAttributes()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( InventoryTypeAttribute.class ).list();
-    }
-
-    @Override
-    public void updateInventoryTypeAttribute( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( inventoryTypeAttribute );
-    }
-
-    public InventoryTypeAttribute getInventoryTypeAttribute( int id )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (InventoryTypeAttribute) session.get( InventoryTypeAttribute.class, id );
-    }
-    
-    public InventoryTypeAttribute getInventoryTypeAttributeByName( String name )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( InventoryTypeAttribute.class );
-        criteria.add( Restrictions.eq( "name", name ) );
-
-        return (InventoryTypeAttribute) criteria.uniqueResult();
-    }
-    */
-    
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<InventoryTypeAttribute> getAllInventoryTypeAttributes()
-    {
-        return sessionFactory.getCurrentSession().createCriteria( InventoryTypeAttribute.class ).list();        
-    }
-
-    public InventoryTypeAttribute getInventoryTypeAttribute( int id )
-    {
-        return (InventoryTypeAttribute) sessionFactory.getCurrentSession().get( InventoryTypeAttribute.class, id );
-    }
-    
-    public InventoryTypeAttribute getInventoryTypeAttributeByName( String name )
-    {
-        return (InventoryTypeAttribute) getCriteria( Restrictions.eq( "name", name ) ).uniqueResult();
-        
-    }
-    /*
-    @SuppressWarnings( "unchecked" )
-    public Collection<InventoryTypeAttribute> getAllInventoryTypeAttributesForDisplay( InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        //return sessionFactory.getCurrentSession().createCriteria( InventoryTypeAttribute.class,inventoryTypeAttribute.isDisplay() ).list();
-        
-        Criteria criteria = sessionFactory.getCurrentSession().createCriteria( InventoryTypeAttribute.class );
-        criteria.setProjection( Projections.property( "display" ) );
-        return criteria.list();
-    }
-    */
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryTypeStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryTypeStore.java	2012-05-16 07:06:15 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryTypeStore.java	1970-01-01 00:00:00 +0000
@@ -1,108 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.inventory.InventoryType;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeStore;
-import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-//public class HibernateInventoryTypeStore implements InventoryTypeStore
-public class HibernateInventoryTypeStore extends HibernateIdentifiableObjectStore<InventoryType> implements InventoryTypeStore
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-   /*
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }
-    */
-    // -------------------------------------------------------------------------
-    // InventoryTypeStore
-    // -------------------------------------------------------------------------
-    /*
-    @Override
-    public int addInventoryType( InventoryType inventoryType )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (Integer) session.save( inventoryType );
-    }
-
-    @Override
-    public void deleteInventoryType( InventoryType inventoryType )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( inventoryType );
-    }
-
-    @Override
-    public Collection<InventoryType> getAllInventoryTypes()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( InventoryType.class ).list();
-    }
-
-    @Override
-    public void updateInventoryType( InventoryType inventoryType )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( inventoryType );
-    }
-
-    public InventoryType getInventoryTypeByName( String name )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( InventoryType.class );
-        criteria.add( Restrictions.eq( "name", name ) );
-
-        return (InventoryType) criteria.uniqueResult();
-    }
-
-    public InventoryType getInventoryType( int id )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return (InventoryType) session.get( InventoryType.class, id );
-    }
-    */
-    
-    // -------------------------------------------------------------------------
-    // InventoryTypeStore
-    // -------------------------------------------------------------------------
-    
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<InventoryType> getAllInventoryTypes()
-    {
-        return sessionFactory.getCurrentSession().createCriteria( InventoryType.class ).list();
-    }
-    @Override
-    public InventoryType getInventoryTypeByName( String name )
-    {
-        return (InventoryType) getCriteria( Restrictions.eq( "name", name ) ).uniqueResult();
-    }
-    @Override
-    public InventoryType getInventoryType( int id )
-    {
-        return (InventoryType) sessionFactory.getCurrentSession().get( InventoryType.class, id );
-    }
-    /*
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<InventoryTypeAttribute> getAllInventoryTypeAttributesForDisplay( InventoryType inventoryType )
-    {
-        Criteria criteria = sessionFactory.getCurrentSession().createCriteria( InventoryTypeAttribute.class );
-        criteria.setProjection( Projections.property( "display" ) );
-        return criteria.list();
-    }
-    */
-    
-}

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryType_AttributeStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryType_AttributeStore.java	2012-06-18 09:15:09 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/inventory/hibernate/HibernateInventoryType_AttributeStore.java	1970-01-01 00:00:00 +0000
@@ -1,155 +0,0 @@
-package org.hisp.dhis.coldchain.inventory.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.Criteria;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.criterion.Projections;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.coldchain.inventory.InventoryType;
-import org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute;
-import org.hisp.dhis.coldchain.inventory.InventoryType_Attribute;
-import org.hisp.dhis.coldchain.inventory.InventoryType_AttributeStore;
-
-/**
- * @author Mithilesh Kumar Thakur
- *
- * @version HibernateInventoryType_AttributeStore.java Jun 14, 2012 2:50:04 PM	
- */
-
-//public class HibernateInventoryType_AttributeStore extends HibernateGenericStore<InventoryType_Attribute> implements InventoryType_AttributeStore
-public class HibernateInventoryType_AttributeStore  implements InventoryType_AttributeStore
-{
-    
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private SessionFactory sessionFactory;
-
-    public void setSessionFactory( SessionFactory sessionFactory )
-    {
-        this.sessionFactory = sessionFactory;
-    }   
-    
-    
-    // -------------------------------------------------------------------------
-    // InventoryType_Attribute
-    // -------------------------------------------------------------------------
-    
-    //add
-    
-    @Override
-    public void addInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.save( inventoryType_Attribute );
-    }
-    
-    //update
-    @Override
-    public void updateInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.update( inventoryType_Attribute );
-    }
-    
-    //delete
-    @Override
-    public void deleteInventoryType_Attribute( InventoryType_Attribute inventoryType_Attribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        session.delete( inventoryType_Attribute );
-    }
-    
-    // get all
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<InventoryType_Attribute> getAllInventoryTypeAttributes()
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        return session.createCriteria( InventoryType_Attribute.class ).list();
-    }
-
-    @Override
-    public InventoryType_Attribute getInventoryTypeAttribute( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( InventoryType_Attribute.class );
-        criteria.add( Restrictions.eq( "inventoryType", inventoryType ) );
-        criteria.add( Restrictions.eq( "inventoryTypeAttribute", inventoryTypeAttribute ) );
-
-        return (InventoryType_Attribute) criteria.uniqueResult();
-        
-        //return (InventoryType_Attribute) getCriteria( Restrictions.eq( "inventoryType", inventoryType ),Restrictions.eq( "inventoryTypeAttribute", inventoryTypeAttribute ) ).uniqueResult();
-    }
-    
-    @Override
-    public InventoryType_Attribute getInventoryTypeAttributeForDisplay( InventoryType inventoryType, InventoryTypeAttribute inventoryTypeAttribute, boolean display)
-    {
-        
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( InventoryType_Attribute.class );
-        criteria.add( Restrictions.eq( "inventoryType", inventoryType ) );
-        criteria.add( Restrictions.eq( "inventoryTypeAttribute", inventoryTypeAttribute ) );
-        criteria.add( Restrictions.eq( "display", display ) );
-        
-        return (InventoryType_Attribute) criteria.uniqueResult();
-        
-        //return (InventoryType_Attribute) getCriteria( Restrictions.eq( "inventoryType", inventoryType ), Restrictions.eq( "inventoryTypeAttribute", inventoryTypeAttribute ), Restrictions.eq( "display", display ) ).uniqueResult();
-    }
-    
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<InventoryType_Attribute> getAllInventoryTypeAttributesByInventoryType( InventoryType inventoryType )
-    {
-        Session session = sessionFactory.getCurrentSession();
-        
-        Criteria criteria = session.createCriteria( InventoryType_Attribute.class );
-        criteria.add( Restrictions.eq( "inventoryType", inventoryType ) );
-        return criteria.list();
-        
-        //return getCriteria( Restrictions.eq( "inventoryType", inventoryType ) ).list();
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public Collection<InventoryType_Attribute> getAllInventoryTypeAttributeForDisplay( InventoryType inventoryType, boolean display )
-    {
-        Session session = sessionFactory.getCurrentSession();
-        
-        Criteria criteria = session.createCriteria( InventoryType_Attribute.class );
-        criteria.add( Restrictions.eq( "inventoryType", inventoryType ) );
-        criteria.add( Restrictions.eq( "display", display ) );
-        return criteria.list();
-        
-        //return getCriteria( Restrictions.eq( "inventoryType", inventoryType ), Restrictions.eq( "display", display ) ).list();
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public Collection<InventoryTypeAttribute> getListInventoryTypeAttribute( InventoryType inventoryType )
-    {
-        Session session = sessionFactory.getCurrentSession();
-        
-        Criteria criteria = session.createCriteria( InventoryType_Attribute.class );
-        
-        criteria.add( Restrictions.eq( "inventoryType", inventoryType ) );
-        criteria.setProjection( Projections.property( "inventoryTypeAttribute" ) );
-        return criteria.list();
-        
-        /*
-        Criteria criteria = sessionFactory.getCurrentSession().createCriteria( getClazz() );
-        criteria.add( Restrictions.eq( "inventoryType", inventoryType ) );
-        criteria.setProjection( Projections.property( "inventoryTypeAttribute" ) );
-        return criteria.list();
-        */
-    }
-}
-
-

=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/reports'
=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/DefaultCCEMReportManager.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/DefaultCCEMReportManager.java	2012-06-19 10:18:55 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/DefaultCCEMReportManager.java	1970-01-01 00:00:00 +0000
@@ -1,761 +0,0 @@
-package org.hisp.dhis.coldchain.reports;
-
-import static org.hisp.dhis.system.util.TextUtils.getCommaDelimitedString;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.jdbc.support.rowset.SqlRowSet;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-public class DefaultCCEMReportManager implements CCEMReportManager
-{
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    private JdbcTemplate jdbcTemplate;
-
-    public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
-    {
-        this.jdbcTemplate = jdbcTemplate;
-    }
-
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Implementation Methods
-    // -------------------------------------------------------------------------
-    
-    public Map<Integer, String> getOrgunitAndOrgUnitGroupMap( String orgUnitGroupIdsByComma, String orgUnitIdsByComma )
-    {
-        Map<Integer, String> orgUnitGroupMap = new HashMap<Integer, String>();
-        int prevOrgUnitId = 0;
-        try
-        {
-            String query = "SELECT organisationunitid, orgunitgroup.name FROM orgunitgroupmembers " +
-            		        " INNER JOIN orgunitgroup ON orgunitgroupmembers.orgunitgroupid = orgunitgroup.orgunitgroupid "+
-            		        " WHERE " +
-            		            " orgunitgroup.orgunitgroupid IN ("+ orgUnitGroupIdsByComma +") AND " +
-            		            " organisationunitid IN ("+ orgUnitIdsByComma +") ORDER BY organisationunitid"; 
-                                        
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );            
-            while ( rs.next() )
-            {
-                Integer orgUnitID = rs.getInt( 1 );
-                String ouGroupName = rs.getString( 2 );
-
-                if( prevOrgUnitId == orgUnitID )
-                {
-                    String temp = orgUnitGroupMap.get( orgUnitID );
-                    if( temp == null ) temp = "";
-                    temp += "," +ouGroupName;
-                    orgUnitGroupMap.put( orgUnitID, temp );
-                }
-                else
-                {
-                    orgUnitGroupMap.put( orgUnitID, ouGroupName );
-                }
-                
-                prevOrgUnitId = orgUnitID;
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return orgUnitGroupMap;
-    }
-
-    
-    public Map<String, String> getOrgUnitGroupAttribDataForRequirement( String orgUnitGroupIdsByComma, String orgUnitGroupAttribIds )
-    {
-        Map<String, String> orgUnitGroupAttribDataForRequirement = new HashMap<String, String>();
-        try
-        {
-            String query = "SELECT orgunitgroupmembers.organisationunitid, attributevalue.attributeid, value FROM attributevalue "+
-                                " INNER JOIN orgunitgroupattributevalues ON attributevalue.attributevalueid = orgunitgroupattributevalues.attributevalueid "+ 
-                                " INNER JOIN orgunitgroupmembers ON orgunitgroupmembers.orgunitgroupid = orgunitgroupattributevalues.orgunitgroupid "+
-                                " WHERE "+
-                                    " attributeid IN ("+orgUnitGroupAttribIds+") AND " +
-                                    " orgunitgroupattributevalues.orgunitgroupid IN ("+ orgUnitGroupIdsByComma +")";
-                        
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer orgUnitID = rs.getInt( 1 );
-                Integer attribId = rs.getInt( 2 );
-                String value = rs.getString( 3 );
-
-                orgUnitGroupAttribDataForRequirement.put( orgUnitID+":"+attribId, value );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return orgUnitGroupAttribDataForRequirement;
-    }
-
-    
-    public Map<String, String> getDataElementDataForCatalogOptionsForRequirement( String orgUnitIdsByComma, String catalogOption_DataelementIds, Integer periodId )
-    {
-        Map<String, String> dataElementDataForRequirement = new HashMap<String, String>();
-        try
-        {
-            String query = "SELECT dataelementid, periodid, sourceid, value FROM datavalue " +
-                                " WHERE " +
-                                    " dataelementid IN ( "+ catalogOption_DataelementIds +") AND " +
-                                    " sourceid IN ( " + orgUnitIdsByComma + " ) AND " +
-                                    " periodid = "+periodId; 
-                        
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer deId = rs.getInt( 1 );
-                Integer pId = rs.getInt( 2 );
-                Integer sourceId = rs.getInt( 3 );
-                String value = rs.getString( 4 );
-                
-                dataElementDataForRequirement.put( deId+":"+pId+":"+sourceId, value );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return dataElementDataForRequirement;
-    }
-
-    
-    public Map<String, String> getCatalogDataForRequirement( Integer vsReqCatalogTypeId, Integer vsReqStorageTempId, String vsReqStorageTemp, Integer vsReqNationalSupplyId, String vsReqNationalSupply, String vsReqCatalogAttribIds )
-    {
-        Map<String, String> catalogDataForRequirement = new HashMap<String, String>();
-        try
-        {
-            String query = "SELECT catalog.catalogid, catalogtypeattributeid, value FROM catalogdatavalue " +
-            		        " INNER JOIN catalog ON catalog.catalogid = catalogdatavalue.catalogid "+
-            		        " WHERE " +
-            		            " catalog.catalogid IN " +
-            		                "( SELECT cd1.catalogid FROM catalogdatavalue AS cd1 INNER JOIN catalogdatavalue AS cd2 ON cd1.catalogid = cd2.catalogid " +
-            		                    " WHERE cd1.catalogtypeattributeid = "+vsReqNationalSupplyId+" AND cd1.value = '"+vsReqNationalSupply+"' AND cd2.catalogtypeattributeid = "+vsReqStorageTempId+" AND cd2.value = '"+ vsReqStorageTemp +"') " + 
-            		            " AND catalogtypeattributeid IN ("+vsReqCatalogAttribIds+") AND " +
-            		            " catalog.catalogtypeid = "+vsReqCatalogTypeId;
-                        
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer catalogId = rs.getInt( 1 );
-                Integer catalogTypeAttribId = rs.getInt( 2 );
-                String value = rs.getString( 3 );
-                
-                catalogDataForRequirement.put( catalogId+":"+catalogTypeAttribId, value );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return catalogDataForRequirement;
-    }
-
-    public List<Integer> getCatalogIdsForRequirement( Integer vsReqCatalogTypeId, Integer vsReqStorageTempId, String vsReqStorageTemp, Integer vsReqNationalSupplyId, String vsReqNationalSupply )
-    {
-        List<Integer> catalogIdsForRequirement = new ArrayList<Integer>();
-        try
-        {
-            String query = "SELECT DISTINCT(catalog.catalogid) FROM catalogdatavalue " +
-                                " INNER JOIN catalog ON catalog.catalogid = catalogdatavalue.catalogid "+
-                                " WHERE " +
-                                    " catalog.catalogid IN " +
-                                        "( SELECT cd1.catalogid FROM catalogdatavalue AS cd1 INNER JOIN catalogdatavalue AS cd2 ON cd1.catalogid = cd2.catalogid " +
-                                            " WHERE cd1.catalogtypeattributeid = "+vsReqNationalSupplyId+" AND cd1.value = '"+vsReqNationalSupply+"' AND cd2.catalogtypeattributeid = "+vsReqStorageTempId+" AND cd2.value = '"+ vsReqStorageTemp +"') " + 
-                                    " AND catalog.catalogtypeid = "+vsReqCatalogTypeId;
-                        
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer catalogId = rs.getInt( 1 );
-                
-                catalogIdsForRequirement.add( catalogId );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return catalogIdsForRequirement;
-    }
-    
-    public Map<Integer, Double> getSumOfEquipmentDatabyInventoryType( String orgUnitIdsByComma, Integer inventoryTypeId, Integer inventoryTypeAttributeId, Double factor )
-    {
-        Map<Integer, Double> equipmentSumByInventoryTypeMap = new HashMap<Integer, Double>();
-        try
-        {
-            String query = "SELECT organisationunitid, SUM(value*"+factor+") FROM equipment " +
-                                " INNER JOIN equipmentinstance on equipment.equipmentinstanceid = equipmentinstance.equipmentinstanceid " +
-                                " WHERE " + 
-                                    " equipmentinstance.working = 1 AND "+
-                                    " equipmentinstance.inventorytypeid =  "+ inventoryTypeId +" AND "+       
-                                    " equipmentinstance.organisationunitid in (" + orgUnitIdsByComma +") AND "+
-                                    " equipment.inventorytypeattributeid = "+ inventoryTypeAttributeId +" "+
-                                    " GROUP BY organisationunitid";                  
-
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer orgUnitId = rs.getInt( 1 );
-                Double catalogDataValueSum = rs.getDouble( 2 );
-                equipmentSumByInventoryTypeMap.put( orgUnitId, catalogDataValueSum );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return equipmentSumByInventoryTypeMap;
-    }
-
-    
-    public Map<Integer, Double> getCatalogDataSumByEquipmentData( String orgUnitIdsByComma, Integer inventoryTypeId, Integer catalogTypeAttributeId, Integer inventoryTypeAttributeId, String equipmentValue )
-    {
-        Map<Integer, Double> catalogSumByEquipmentDataMap = new HashMap<Integer, Double>();
-        try
-        {
-            String query =  "SELECT equipmentinstance.organisationunitid, sum(catalogdatavalue.value) FROM catalogdatavalue " +  
-                            " INNER JOIN equipmentinstance on catalogdatavalue.catalogid = equipmentinstance.catalogid " +  
-                            " WHERE " + 
-                                " equipmentinstance.working = 1 AND " +
-                                " equipmentinstance.inventorytypeid =  " + inventoryTypeId + " AND " + 
-                                " catalogdatavalue.catalogtypeattributeid =  " + catalogTypeAttributeId + " AND " +
-                                " equipmentinstance.organisationunitid in ("+ orgUnitIdsByComma +") AND " +
-                                " equipmentinstance.equipmentinstanceid in " +
-                                    "( SELECT equipmentinstanceid FROM equipment WHERE inventorytypeattributeid = "+ inventoryTypeAttributeId +" AND equipment.value IN ('"+ equipmentValue +"') ) "+
-                                " GROUP BY equipmentinstance.organisationunitid";
-
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer orgUnitId = rs.getInt( 1 );
-                Double catalogDataValueSum = rs.getDouble( 2 );
-                catalogSumByEquipmentDataMap.put( orgUnitId, catalogDataValueSum );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return catalogSumByEquipmentDataMap;
-    }
-    
-    public Map<String, Integer> getFacilityWiseEquipmentRoutineData( String orgUnitIdsByComma, String periodIdsByComma, String dataElementIdsByComma, String optComboIdsByComma )
-    {
-        Map<String, Integer> equipmentDataValueMap = new HashMap<String, Integer>();
-        try
-        {
-            String query = "SELECT equipmentinstance.organisationunitid, dataelementid, periodid, value FROM equipmentdatavalue "+ 
-                            "INNER JOIN equipmentinstance " +
-                                " ON equipmentinstance.equipmentinstanceid = equipmentdatavalue.equipmentinstanceid " +                                
-                            " WHERE "+
-                                " equipmentinstance.organisationunitid IN ("+ orgUnitIdsByComma +") AND "+
-                                " dataelementid IN ("+ dataElementIdsByComma +") AND " +
-                                " periodid IN ("+ periodIdsByComma +")"; 
-
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer orgUnitId = rs.getInt( 1 );
-                Integer dataElementId = rs.getInt( 2 );
-                Integer periodId = rs.getInt( 3 );                
-                Integer value = rs.getInt( 4 );
-                
-                equipmentDataValueMap.put( orgUnitId+":"+dataElementId+":"+periodId, value );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return equipmentDataValueMap;
-    }
-    
-    public Integer getPeriodId( String startDate, String periodType )
-    {
-        Integer periodId = 0;
-        try
-        {
-            String query = "SELECT periodid FROM period " +
-            		    " INNER JOIN periodtype ON period.periodtypeid = periodtype.periodtypeid " +
-            		    " WHERE " +
-            		        " periodtype.name = '"+ periodType +"' AND " +
-            		        " period.startdate = '"+ startDate +"'"; 
-            
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            if( rs!= null && rs.next() )
-            {
-                periodId = rs.getInt( 1 );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return periodId;
-    }
-    
-    public Map<String, Integer> getDataValueCountforDataElements( String dataElementIdsByComma, String optComboIdsByComma, Integer periodId, String orgUnitIdsBycomma )
-    {
-        Map<String, Integer> dataValueCountMap = new HashMap<String, Integer>();
-        try
-        {
-            String query = "SELECT dataelementid, categoryoptioncomboid, value, COUNT(*) FROM datavalue " +
-            		    " WHERE " +
-            		        " dataelementid IN ("+ dataElementIdsByComma +") AND " +
-            		    	" periodid = "+ periodId +" AND " +
-            		    	" sourceid IN ( "+ orgUnitIdsBycomma +" ) " +
-            		    	" GROUP BY dataelementid,categoryoptioncomboid,value";
-                
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer dataElementId = rs.getInt( 1 );
-                Integer optComboId = rs.getInt( 2 );                
-                String dataElementValue = rs.getString( 3 );
-                Integer totCount = rs.getInt( 4 );
-                
-                dataValueCountMap.put( dataElementId+":"+optComboId+":"+dataElementValue, totCount );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return dataValueCountMap;
-    }
-
-    
-    public List<String> getDistinctDataElementValue( Integer dataelementID, Integer optComboId, Integer periodId )
-    {
-        List<String> distinctDataElementValues = new ArrayList<String>();
-        try
-        {
-            String query = "SELECT DISTINCT(value) FROM datavalue " +                            
-                            " WHERE " +
-                                " dataelementid = "+ dataelementID +" AND " +
-                                " periodid = "+ periodId +" AND " +
-                                " categoryoptioncomboid = "+ optComboId;
-                                
-
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                String dataElementValue = rs.getString( 1 );
-                distinctDataElementValues.add( dataelementID+":"+optComboId+":"+dataElementValue );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return distinctDataElementValues;
-    }
-    
-    
-    public List<Integer> getOrgunitIds( List<Integer> selOrgUnitList, Integer orgUnitGroupId )
-    {
-        String selOrgUnitsByComma = getCommaDelimitedString( selOrgUnitList );
-        
-        int maxOULevels = organisationUnitService.getMaxOfOrganisationUnitLevels();
-        
-        List<Integer> orgUnitIds = new ArrayList<Integer>();
-        
-        try
-        {
-            String query = "select orgunitgroupmembers.organisationunitid from orgunitgroupmembers " +
-                            " inner join _orgunitstructure on orgunitgroupmembers.organisationunitid = _orgunitstructure.organisationunitid " + 
-                            " where orgunitgroupid in (" + orgUnitGroupId + ") and ( ";
-            for( int i = 1; i <= maxOULevels; i++ )
-            {
-                query += " idlevel"+ i +" in (" + selOrgUnitsByComma + ") OR ";
-            }
-            query = query.substring( 0, query.length()-4 );
-            
-            query += ")";
-            
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer orgUnitId = rs.getInt( 1 );
-                orgUnitIds.add( orgUnitId );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return orgUnitIds;
-    }
-    
-    
-    
-    
-    
-    
-    public String getOrgunitIdsByComma( List<Integer> selOrgUnitList, List<Integer> orgunitGroupList )
-    {
-        String selOrgUnitsByComma = getCommaDelimitedString( selOrgUnitList );
-        String selOrgUnitGroupsByComma = getCommaDelimitedString( orgunitGroupList );
-        
-        int maxOULevels = organisationUnitService.getMaxOfOrganisationUnitLevels();
-        
-        String orgUnitIdsByComma = "-1";
-        
-        try
-        {
-            String query = "select orgunitgroupmembers.organisationunitid from orgunitgroupmembers " +
-                            " inner join _orgunitstructure on orgunitgroupmembers.organisationunitid = _orgunitstructure.organisationunitid " + 
-                            " where orgunitgroupid in (" + selOrgUnitGroupsByComma + ") and ( ";
-            for( int i = 1; i <= maxOULevels; i++ )
-            {
-                query += " idlevel"+ i +" in (" + selOrgUnitsByComma + ") OR ";
-            }
-            query = query.substring( 0, query.length()-4 );
-            
-            query += ")";
-            
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                Integer orgUnitId = rs.getInt( 1 );
-                orgUnitIdsByComma += "," + orgUnitId;
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return orgUnitIdsByComma;
-    }
-    
-    public Map<String, Integer> getCatalogTypeAttributeValueByAge( String orgUnitIdsByComma, Integer inventoryTypeId, Integer catalogTypeAttributeId, Integer yearInvTypeAttId, Integer ageStart, Integer ageEnd )
-    {
-        Map<String, Integer> CatalogTypeAttributeValueMap = new HashMap<String, Integer>();
-        try
-        {
-            /*
-            String query = "SELECT catalogdatavalue.value, COUNT(*) FROM equipment INNER JOIN equipmentinstance ON "+ 
-                            " equipmentinstance.equipmentinstanceid = equipment.equipmentinstanceid INNER JOIN catalog ON equipment.value = catalog.name " +
-                            " INNER JOIN catalogdatavalue ON catalog.catalogid = catalogdatavalue.catalogid " + 
-                            " WHERE equipmentinstance.equipmentinstanceid IN " +
-                                            "( SELECT equipmentinstanceid FROM equipment WHERE inventorytypeattributeid = "+yearInvTypeAttId+" AND " +
-                                            		"( YEAR(CURDATE()) - value ) >= "+ageStart+" AND ( YEAR(CURDATE()) - value ) <= "+ageEnd+") AND " +
-                            "organisationunitid IN ("+ orgUnitIdsByComma +") AND inventorytypeattributeid = "+ inventoryTypeAttributeId +" AND " +
-                            " catalog.catalogtypeid = "+ catalogTypeId +" AND catalogdatavalue.catalogtypeattributeid = "+ catalogTypeAttributeId +" GROUP BY catalogdatavalue.value";
-            */
-            
-            String query = "SELECT catalogdatavalue.value, COUNT(*) FROM catalogdatavalue "+
-                           " INNER JOIN equipmentinstance ON catalogdatavalue.catalogid = equipmentinstance.catalogid "+ 
-                           " INNER JOIN equipment on equipmentinstance.equipmentinstanceid = equipment.equipmentinstanceid "+ 
-                           " WHERE "+ 
-                                " equipmentinstance.inventorytypeid = "+ inventoryTypeId +" AND "+ 
-                                " catalogdatavalue.catalogtypeattributeid = "+ catalogTypeAttributeId +" AND "+ 
-                                " equipment.inventorytypeattributeid = "+ yearInvTypeAttId +" AND "+
-                                " ( YEAR(CURDATE()) - equipment.value ) >= "+ ageStart +" AND "; 
-                                
-                                if( ageEnd != -1 )
-                                {
-                                   query +=  " ( YEAR(CURDATE()) - equipment.value ) <= "+ ageEnd +" AND ";
-                                }
-                                
-                                query += " equipmentinstance.organisationunitid IN ( "+orgUnitIdsByComma+" ) " +
-                                " GROUP BY catalogdatavalue.value";
-            
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                String catalogDataValue = rs.getString( 1 );
-                Integer catalogDataValueCount = rs.getInt( 2 );
-                CatalogTypeAttributeValueMap.put( catalogDataValue, catalogDataValueCount );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return CatalogTypeAttributeValueMap;
-    }
-    
-    
-    public Map<String, Integer> getCatalogTypeAttributeValue( String orgUnitIdsByComma, Integer inventoryTypeId, Integer catalogTypeAttributeId )
-    {
-        Map<String, Integer> CatalogTypeAttributeValueMap = new HashMap<String, Integer>();
-        try
-        {
-            /*
-            String query = "SELECT catalogdatavalue.value, COUNT(*) FROM equipment INNER JOIN equipmentinstance ON "+ 
-                            " equipmentinstance.equipmentinstanceid = equipment.equipmentinstanceid INNER JOIN catalog ON equipment.value = catalog.name " +
-                            " INNER JOIN catalogdatavalue ON catalog.catalogid = catalogdatavalue.catalogid " + 
-                            " WHERE organisationunitid IN ("+ orgUnitIdsByComma +") AND inventorytypeattributeid = "+ inventoryTypeAttributeId +" AND " +
-                            " catalog.catalogtypeid = "+ catalogTypeId +" AND catalogdatavalue.catalogtypeattributeid = "+ catalogTypeAttributeId +" GROUP BY catalogdatavalue.value";
-            */
-            
-            String query = "SELECT catalogdatavalue.value, COUNT(*) FROM catalogdatavalue " +
-            		    " INNER JOIN equipmentinstance on catalogdatavalue.catalogid = equipmentinstance.catalogid "+
-            		    " WHERE " +
-            		        " equipmentinstance.inventorytypeid = "+ inventoryTypeId +" AND " +
-            		        " catalogdatavalue.catalogtypeattributeid = "+ catalogTypeAttributeId +" AND "+            		        
-            		        " equipmentinstance.organisationunitid in ("+ orgUnitIdsByComma +")" +
-            		    " GROUP BY catalogdatavalue.value";    
-            
-            SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
-            while ( rs.next() )
-            {
-                String catalogDataValue = rs.getString( 1 );
-                Integer catalogDataValueCount = rs.getInt( 2 );
-                CatalogTypeAttributeValueMap.put( catalogDataValue, catalogDataValueCount );
-            }
-        }
-        catch( Exception e )
-        {
-            throw new RuntimeException( "Exception: ", e );
-        }
-        
-        return CatalogTypeAttributeValueMap;
-    }
-    
-    public Map<String,String> getCCEMSettings()
-    {
-        String fileName = "ccemSettings.xml";
-        String path = System.getenv( "DHIS2_HOME" )+ File.separator + "ccemreports" + File.separator + fileName;
-        
-        Map<String, String> ccemSettingsMap = new HashMap<String, String>();
-
-        try
-        {
-            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
-            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
-            Document doc = docBuilder.parse( new File( path ) );
-            if ( doc == null )
-            {
-                System.out.println( "XML File Not Found at user home" );
-                return null;
-            }
-
-            NodeList listOfReports = doc.getElementsByTagName( "ccemSetting" );
-            int totalReports = listOfReports.getLength();
-            for ( int s = 0; s < totalReports; s++ )
-            {
-                Node reportNode = listOfReports.item( s );
-                if ( reportNode.getNodeType() == Node.ELEMENT_NODE )
-                {
-                    Element reportElement = (Element) reportNode;
-
-                    String commonId = reportElement.getAttribute( "commonId" );
-                    String ccemId = reportElement.getAttribute( "ccemId" );
-                    
-                    ccemSettingsMap.put( commonId, ccemId );
-                }
-            }// end of for loop with s var
-        }// try block end
-        catch ( SAXParseException err )
-        {
-            System.out.println( "** Parsing error" + ", line " + err.getLineNumber() + ", uri " + err.getSystemId() );
-            System.out.println( " " + err.getMessage() );
-        }
-        catch ( SAXException e )
-        {
-            Exception x = e.getException();
-            ((x == null) ? e : x).printStackTrace();
-        }
-        catch ( Throwable t )
-        {
-            t.printStackTrace();
-        }
-        
-        return ccemSettingsMap;
-    }
-    
-    
-    public List<CCEMReportDesign> getCCEMReportDesign( String designXMLFile )
-    {
-        String path = System.getenv( "DHIS2_HOME" )+ File.separator + "ccemreports" + File.separator + designXMLFile;
-        
-        List<CCEMReportDesign> ccemReportDesignList = new ArrayList<CCEMReportDesign>();
-        
-        try
-        {
-            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
-            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
-            Document doc = docBuilder.parse( new File( path ) );
-            if ( doc == null )
-            {
-                System.out.println( "XML File Not Found at user home" );
-                return null;
-            }
-
-            NodeList listOfReports = doc.getElementsByTagName( "ccemreportcell" );
-            int totalReports = listOfReports.getLength();
-            for ( int s = 0; s < totalReports; s++ )
-            {
-                Node reportNode = listOfReports.item( s );
-                if ( reportNode.getNodeType() == Node.ELEMENT_NODE )
-                {
-                    Element reportElement = (Element) reportNode;
-
-                    Integer row = Integer.parseInt( reportElement.getAttribute( "row" ) );
-                    String content = reportElement.getAttribute( "content" );
-                    String displayheading = reportElement.getAttribute( "displayheading" );
-
-                    CCEMReportDesign ccemReportDesign = new CCEMReportDesign();
-                    ccemReportDesign.setRow( row );
-                    ccemReportDesign.setContent( content );
-                    ccemReportDesign.setDisplayheading( displayheading );
-                    
-                    ccemReportDesignList.add( ccemReportDesign );
-                }
-            }// end of for loop with s var
-        }// try block end
-        catch ( SAXParseException err )
-        {
-            System.out.println( "** Parsing error" + ", line " + err.getLineNumber() + ", uri " + err.getSystemId() );
-            System.out.println( " " + err.getMessage() );
-        }
-        catch ( SAXException e )
-        {
-            Exception x = e.getException();
-            ((x == null) ? e : x).printStackTrace();
-        }
-        catch ( Throwable t )
-        {
-            t.printStackTrace();
-        }
-
-        return ccemReportDesignList;
-    }
-    
-    public CCEMReport getCCEMReportByReportId( String selReportId )
-    {
-        String fileName = "ccemReportList.xml";
-        String path = System.getenv( "DHIS2_HOME" )+ File.separator + "ccemreports" + File.separator + fileName;
-        
-        CCEMReport reportObj = new CCEMReport( );
-        
-        try
-        {
-            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
-            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
-            Document doc = docBuilder.parse( new File( path ) );
-            if ( doc == null )
-            {
-                System.out.println( "XML File Not Found at user home" );
-                return null;
-            }
-
-            NodeList listOfReports = doc.getElementsByTagName( "ccemReport" );
-            int totalReports = listOfReports.getLength();
-            for ( int s = 0; s < totalReports; s++ )
-            {
-                Node reportNode = listOfReports.item( s );
-                if ( reportNode.getNodeType() == Node.ELEMENT_NODE )
-                {
-                    Element reportElement = (Element) reportNode;
-
-                    NodeList nodeList1 = reportElement.getElementsByTagName( "reportId" );
-                    Element element1 = (Element) nodeList1.item( 0 );
-                    NodeList textNodeList1 = element1.getChildNodes();
-                    String reportId = ((Node) textNodeList1.item( 0 )).getNodeValue().trim();
-
-                    if( !reportId.equalsIgnoreCase( selReportId ) )
-                    {
-                        continue;
-                    }
-                    
-                    NodeList nodeList2 = reportElement.getElementsByTagName( "reportName" );
-                    Element element2 = (Element) nodeList2.item( 0 );
-                    NodeList textNodeList2 = element2.getChildNodes();
-                    String reportName = ((Node) textNodeList2.item( 0 )).getNodeValue().trim();
-
-                    NodeList nodeList3 = reportElement.getElementsByTagName( "xmlTemplateName" );
-                    Element element3 = (Element) nodeList3.item( 0 );
-                    NodeList textNodeList3 = element3.getChildNodes();
-                    String xmlTemplateName = ((Node) textNodeList3.item( 0 )).getNodeValue().trim();
-
-                    NodeList nodeList4 = reportElement.getElementsByTagName( "outputType" );
-                    Element element4 = (Element) nodeList4.item( 0 );
-                    NodeList textNodeList4 = element4.getChildNodes();
-                    String outputType = ((Node) textNodeList4.item( 0 )).getNodeValue().trim();
-
-                    NodeList nodeList5 = reportElement.getElementsByTagName( "reportType" );
-                    Element element5 = (Element) nodeList5.item( 0 );
-                    NodeList textNodeList5 = element5.getChildNodes();
-                    String reportType = ((Node) textNodeList5.item( 0 )).getNodeValue().trim();
-
-                    NodeList nodeList6 = reportElement.getElementsByTagName( "periodRequire" );
-                    Element element6 = (Element) nodeList6.item( 0 );
-                    NodeList textNodeList6 = element6.getChildNodes();
-                    String periodRequire = ((Node) textNodeList6.item( 0 )).getNodeValue().trim();
-
-                    reportObj.setOutputType( outputType );
-                    reportObj.setReportId( reportId );
-                    reportObj.setReportName( reportName );
-                    reportObj.setXmlTemplateName( xmlTemplateName );
-                    reportObj.setReportType( reportType );
-                    reportObj.setPeriodRequire( periodRequire );
-                    
-                }
-            }// end of for loop with s var
-        }// try block end
-        catch ( SAXParseException err )
-        {
-            System.out.println( "** Parsing error" + ", line " + err.getLineNumber() + ", uri " + err.getSystemId() );
-            System.out.println( " " + err.getMessage() );
-        }
-        catch ( SAXException e )
-        {
-            Exception x = e.getException();
-            ((x == null) ? e : x).printStackTrace();
-        }
-        catch ( Throwable t )
-        {
-            t.printStackTrace();
-        }
-
-        return reportObj;
-        
-    }// getReportList end
-
-    
-}

=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/META-INF'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/META-INF/dhis'
=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/META-INF/dhis/beans.xml	2012-06-18 09:15:09 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/META-INF/dhis/beans.xml	1970-01-01 00:00:00 +0000
@@ -1,223 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans";
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-	xsi:schemaLocation="
-http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd";>
-
-	<!-- Store definitions -->
-	<bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOptionStore"
-        class="org.hisp.dhis.coldchain.catalog.hibernate.HibernateCatalogTypeAttributeOptionStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
-	<!--
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeStore"
-        class="org.hisp.dhis.coldchain.catalog.hibernate.HibernateCatalogTypeAttributeStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
-	-->	
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeStore"
-        class="org.hisp.dhis.coldchain.catalog.hibernate.HibernateCatalogTypeAttributeStore">
-		<property name="clazz" value="org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute" />
-		<property name="sessionFactory" ref="sessionFactory"/>
-		<property name="cacheable" value="true" />
-    </bean>	
-<!--	
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeStore"
-        class="org.hisp.dhis.coldchain.catalog.hibernate.HibernateCatalogTypeStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
--->	
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeStore"
-        class="org.hisp.dhis.coldchain.catalog.hibernate.HibernateCatalogTypeStore">
-		<property name="clazz" value="org.hisp.dhis.coldchain.catalog.CatalogType" />
-        <property name="sessionFactory" ref="sessionFactory"/>
-		<property name="cacheable" value="true" />
-    </bean>	
-	
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogStore"
-        class="org.hisp.dhis.coldchain.catalog.hibernate.HibernateCatalogStore">
-        <property name="clazz" value="org.hisp.dhis.coldchain.catalog.Catalog" />
-		<property name="sessionFactory" ref="sessionFactory"/>
-		<property name="cacheable" value="true" />
-    </bean>
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogDataValueStore"
-        class="org.hisp.dhis.coldchain.catalog.hibernate.HibernateCatalogDataValueStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
-<!--	
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentDetailsStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateEquipmentDetailsStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
--->	
-	
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateEquipmentStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>	
-	
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentInstanceStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateEquipmentInstanceStore">
-		<property name="clazz" value="org.hisp.dhis.coldchain.inventory.EquipmentInstance" />
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentStatusStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateEquipmentStatusStore">
-		<property name="clazz" value="org.hisp.dhis.coldchain.inventory.EquipmentStatus" />
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
-    <bean id="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeOptionStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateInventoryTypeAttributeOptionStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
-<!--	
-    <bean id="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateInventoryTypeAttributeStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
--->	
-    <bean id="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateInventoryTypeAttributeStore">
-		<property name="clazz" value="org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute" />
-        <property name="sessionFactory" ref="sessionFactory"/>
-		<property name="cacheable" value="true" />
-    </bean>	
-	
-<!--	
-    <bean id="org.hisp.dhis.coldchain.inventory.InventoryTypeStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateInventoryTypeStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>
--->
-    <bean id="org.hisp.dhis.coldchain.inventory.InventoryTypeStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateInventoryTypeStore">
-        <property name="clazz" value="org.hisp.dhis.coldchain.inventory.InventoryType" />
-		<property name="sessionFactory" ref="sessionFactory"/>
-		<property name="cacheable" value="true" />
-    </bean>		
-
-	<!-- Service definitions -->
-	<bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOptionService"
-        class="org.hisp.dhis.coldchain.catalog.DefaultCatalogTypeAttributeOptionService">
-        <property name="catalogTypeAttributeOptionStore" ref="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOptionStore"/>
-    </bean>
-<!--	
-	<bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeService"
-        class="org.hisp.dhis.coldchain.catalog.DefaultCatalogTypeAttributeService">
-        <property name="catalogTypeAttributeStore" ref="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeStore"/>
-    </bean>
--->
-	<bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeService"
-        class="org.hisp.dhis.coldchain.catalog.DefaultCatalogTypeAttributeService">
-        <property name="catalogTypeAttributeStore" ref="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeStore"/>
-		<property name="i18nService" ref="org.hisp.dhis.i18n.I18nService" />
-    </bean>	
-<!--	
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeService"
-        class="org.hisp.dhis.coldchain.catalog.DefaultCatalogTypeService">
-        <property name="catalogTypeStore" ref="org.hisp.dhis.coldchain.catalog.CatalogTypeStore"/>
-    </bean>
--->	
-	
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogTypeService"
-        class="org.hisp.dhis.coldchain.catalog.DefaultCatalogTypeService">
-        <property name="catalogTypeStore" ref="org.hisp.dhis.coldchain.catalog.CatalogTypeStore"/>
-		<property name="i18nService" ref="org.hisp.dhis.i18n.I18nService" />
-    </bean>	
-	
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogService"
-        class="org.hisp.dhis.coldchain.catalog.DefaultCatalogService">
-        <property name="catalogStore" ref="org.hisp.dhis.coldchain.catalog.CatalogStore"/>
-		<property name="catalogDataValueService" ref="org.hisp.dhis.coldchain.catalog.CatalogDataValueService"/>
-		<property name="i18nService" ref="org.hisp.dhis.i18n.I18nService" />
-    </bean>
-    <bean id="org.hisp.dhis.coldchain.catalog.CatalogDataValueService"
-        class="org.hisp.dhis.coldchain.catalog.DefaultCatalogDataValueService">
-        <property name="catalogDataValueStore" ref="org.hisp.dhis.coldchain.catalog.CatalogDataValueStore"/>
-    </bean>
-<!--
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentDetailsService"
-        class="org.hisp.dhis.coldchain.inventory.DefaultEquipmentDetailsService">
-        <property name="equipmentDetailsStore" ref="org.hisp.dhis.coldchain.inventory.EquipmentDetailsStore"/>
-    </bean>
--->	
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentService"
-        class="org.hisp.dhis.coldchain.inventory.DefaultEquipmentService">
-        <property name="equipmentStore" ref="org.hisp.dhis.coldchain.inventory.EquipmentStore"/>
-    </bean>	
-	
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentInstanceService"
-        class="org.hisp.dhis.coldchain.inventory.DefaultEquipmentInstanceService">
-        <property name="equipmentInstanceStore" ref="org.hisp.dhis.coldchain.inventory.EquipmentInstanceStore"/>
-		<property name="equipmentService" ref="org.hisp.dhis.coldchain.inventory.EquipmentService"/>
-		<property name="equipmentStatusService" ref="org.hisp.dhis.coldchain.inventory.EquipmentStatusService"/>
-    </bean>
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentStatusService"
-        class="org.hisp.dhis.coldchain.inventory.DefaultEquipmentStatusService">
-        <property name="equipmentStatusStore" ref="org.hisp.dhis.coldchain.inventory.EquipmentStatusStore"/>
-    </bean>
-    <bean id="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeOptionService"
-        class="org.hisp.dhis.coldchain.inventory.DefaultInventoryTypeAttributeOptionService">
-        <property name="inventoryTypeAttributeOptionStore" ref="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeOptionStore"/>
-    </bean>
-    <bean id="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeService"
-        class="org.hisp.dhis.coldchain.inventory.DefaultInventoryTypeAttributeService">
-        <property name="inventoryTypeAttributeStore" ref="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeStore"/>
-		<property name="i18nService" ref="org.hisp.dhis.i18n.I18nService" />
-    </bean>
-    <bean id="org.hisp.dhis.coldchain.inventory.InventoryTypeService"
-        class="org.hisp.dhis.coldchain.inventory.DefaultInventoryTypeService">
-        <property name="inventoryTypeStore" ref="org.hisp.dhis.coldchain.inventory.InventoryTypeStore"/>
-		<property name="i18nService" ref="org.hisp.dhis.i18n.I18nService" />
-    </bean>
-	
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentDataValueService"
-        class="org.hisp.dhis.coldchain.inventory.DefaultEquipmentDataValueService">
-        <property name="equipmentDataValueStore" ref="org.hisp.dhis.coldchain.inventory.EquipmentDataValueStore"/>
-    </bean>	
-	
-    <bean id="org.hisp.dhis.coldchain.inventory.EquipmentDataValueStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateEquipmentDataValueStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-		<property name="periodStore" ref="org.hisp.dhis.period.PeriodStore"/>
-    </bean>		
-
-	<!-- Catalog Custom data entry form -->
-	
-	<bean id="org.hisp.dhis.coldchain.catalog.CatalogDataEntryService"
-        class="org.hisp.dhis.coldchain.catalog.DefaultCatalogDataEntryService">
-        <property name="catalogTypeAttributeService" ref="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeService"/>
-    </bean>	
-
-	<!-- for Display -->
-	
-	<bean id="org.hisp.dhis.coldchain.inventory.InventoryType_AttributeService"
-		class="org.hisp.dhis.coldchain.inventory.DefaultInventoryType_AttributeService">
-			<property name="inventoryType_AttributeStore"
-	  		ref="org.hisp.dhis.coldchain.inventory.InventoryType_AttributeStore" />
-  	</bean>	
-	<!--
-	<bean id="org.hisp.dhis.coldchain.inventory.InventoryType_AttributeStore"
-		class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateInventoryType_AttributeStore">    
-			<property name="clazz" value="org.hisp.dhis.coldchain.inventory.InventoryType_Attribute"/>
-			<property name="sessionFactory" ref="sessionFactory"/>
-			<property name="cacheable" value="true" />
-	</bean>	
-	-->	
-
-    <bean id="org.hisp.dhis.coldchain.inventory.InventoryType_AttributeStore"
-        class="org.hisp.dhis.coldchain.inventory.hibernate.HibernateInventoryType_AttributeStore">
-        <property name="sessionFactory" ref="sessionFactory"/>
-    </bean>	
-		
-	
-<!-- CCEM Report Manager -->
-    <bean id="org.hisp.dhis.coldchain.reports.CCEMReportManager"
-        class="org.hisp.dhis.coldchain.reports.DefaultCCEMReportManager">
-        <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
-        <property name="jdbcTemplate" ref="jdbcTemplate"/>
-    </bean>	
-	
-	<!-- DeletionHandlers -->
-	
-</beans>

=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain'
=== removed directory 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate'
=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/Catalog.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/Catalog.hbm.xml	2012-05-30 10:46:26 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/Catalog.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.catalog.Catalog" table="catalog">
-    <id name="id" column="catalogid">
-      <generator class="native"/>
-    </id>
-
-    <property name="name" not-null="true" unique="true" length="160"/>
-    
-    <property name="description" not-null="false" length="250"/>
-	  
-	<property name="catalogImage" not-null="false" column="imageName" length="160"/>
-	  
-	  
-	<!--<property name="image" type="binary" column="IMAGE" />-->
-	  
-	<!--<property name="image" column="IMAGE" />-->
-	
-	<!--<property name="image" type="blob" column="IMAGE" />-->     
-
-    <many-to-one name="catalogType" class="org.hisp.dhis.coldchain.catalog.CatalogType" 
-        column="catalogtypeid" not-null="true" foreign-key="fk_coldchain_catalog_catalogtypeid"/>
-        
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogDataValue.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogDataValue.hbm.xml	2012-04-17 11:59:19 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogDataValue.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.catalog.CatalogDataValue" table="catalogdatavalue">
-
-    <composite-id>
-      <key-many-to-one name="catalog" class="org.hisp.dhis.coldchain.catalog.Catalog" column="catalogid"
-        foreign-key="fk_catalogdatavlaue_catalogid" />
-      <key-many-to-one name="catalogTypeAttribute" class="org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute" column="catalogtypeattributeid"
-        foreign-key="fk_catalogdatavlaue_catalogtypeattributeid" />
-    </composite-id>
-
-    <property name="value" />
-
-    <many-to-one name="catalogTypeAttributeOption" class="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOption" column="catalogtypeattributeoptionid"
-      foreign-key="fk_catalogdatavlaue_catalogtypeattributeoptionid" />
-
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogType.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogType.hbm.xml	2012-06-14 05:58:42 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogType.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.catalog.CatalogType" table="catalogtype">
-    <id name="id" column="catalogtypeid">
-      <generator class="native"/>
-    </id>
-
-    <property name="name" not-null="true" unique="true" length="160"/>
-    
-    <property name="description" not-null="false" length="250"/>
-	
-	<property name="catalogTypeImage" not-null="false" column="imageName" length="160"/>   
-	<!--
-	<set name="catalogTypeAttributes" table="catalogtype_attributes">
-      <key column="catalogtypeid" foreign-key="fk_catalogtype_attributes_catalogtypeid" />
-      <many-to-many class="org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute" column="catalogtypeattributeid"
-          foreign-key="fk_catalogtype_attributes_catalogtypeattribtueid" />
-    </set>
-	-->
-	
-	<list name="catalogTypeAttributes" table="catalogtype_attributes">
-		<key column="catalogtypeid" foreign-key="fk_catalogtype_attributes_catalogtypeid" />					 
-        <list-index column="sort_order" base="0" />
-        <many-to-many class="org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute" column="catalogtypeattributeid"
-			foreign-key="fk_catalogtype_attributes_catalogtypeattribtueid" />
-	</list>
-
-    <many-to-one name="dataEntryForm" class="org.hisp.dhis.dataentryform.DataEntryForm"
-      foreign-key="fk_catalogtype_dataentryform" />
-
-	  
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogTypeAttribute.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogTypeAttribute.hbm.xml	2012-04-17 11:59:19 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogTypeAttribute.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute" table="catalogtypeattribute">
-    <id name="id" column="catalogtypeattributeid">
-      <generator class="native"/>
-    </id>
-
-    <property name="name" not-null="true" unique="true" length="160"/>
-    
-    <property name="description" not-null="false" length="250"/>
-	
-	<property name="valueType" column="valuetype" not-null="true" />
-
-    <property name="mandatory" column="mandatory" not-null="true" />
-
-    <property name="noChars" />
-	
-	<set name="attributeOptions">
-      <key column="catalogtypeattributeid" />
-      <one-to-many class="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOption" />
-    </set>
-	
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogTypeAttributeOption.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogTypeAttributeOption.hbm.xml	2012-05-10 05:39:14 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/CatalogTypeAttributeOption.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOption" table="catalogtypeattributeoption">
-    <id name="id" column="catalogtypeattributeoptionid">
-      <generator class="native"/>
-    </id>
-
-    <property name="name" not-null="true" length="160"/>
-	<!--<property name="name" not-null="true" unique="true" length="160"/>-->
-    
-    <many-to-one name="catalogTypeAttribute" column="catalogtypeattributeid" class="org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute"
-      foreign-key="fk_catalogtypeattributeoption_catalogtypeAttributeid" />
-
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/Equipment.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/Equipment.hbm.xml	2012-05-15 10:33:46 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/Equipment.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.inventory.Equipment" table="equipment">
-
-    <composite-id>
-      <key-many-to-one name="equipmentInstance" class="org.hisp.dhis.coldchain.inventory.EquipmentInstance" column="equipmentinstanceid"
-        foreign-key="fk_equipment_equipmentmentinstanceid" />
-      <key-many-to-one name="inventoryTypeAttribute" class="org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute" column="inventorytypeattributeid"
-        foreign-key="fk_equipment_inventorytypeattributeid" />
-    </composite-id>
-
-    <property name="value" />
-
-    <many-to-one name="inventoryTypeAttributeOption" class="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeOption" column="inventorytypeattributeoptionid"
-      foreign-key="fk_equipment_inventorytypeattributeoptionid" />
-
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/EquipmentDataValue.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/EquipmentDataValue.hbm.xml	2012-05-16 11:24:58 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/EquipmentDataValue.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.inventory.EquipmentDataValue" table="equipmentdatavalue">
-
-    <composite-id>
-	  <key-many-to-one name="equipmentInstance" class="org.hisp.dhis.coldchain.inventory.EquipmentInstance" column="equipmentinstanceid" foreign-key="fk_equipmentdatavalue_equipmentinstanceid" />
-      <key-many-to-one name="dataElement" class="org.hisp.dhis.dataelement.DataElement" column="dataelementid" foreign-key="fk_equipmentdatavalue_dataelementid" />
-      <key-many-to-one name="period" class="org.hisp.dhis.period.Period" column="periodid" foreign-key="fk_equipmentdatavalue_periodid" />      
-    </composite-id>
-
-    <property name="value" />
-
-    <property name="storedBy" column="storedby" length="31" />
-
-    <property name="timestamp" column="lastupdated" type="date" />
-
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/EquipmentInstance.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/EquipmentInstance.hbm.xml	2012-06-13 06:35:38 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/EquipmentInstance.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.inventory.EquipmentInstance" table="equipmentinstance">
-
-    <id name="id" column="equipmentinstanceid">
-      <generator class="native" />
-    </id>
-
-    <many-to-one name="inventoryType" class="org.hisp.dhis.coldchain.inventory.InventoryType" column="inventorytypeid"
-      not-null="true" foreign-key="fk_equipmentinstance_inventorytypeid" />
-
-    <many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit"
-        column="organisationunitid" foreign-key="fk_equipmentinstance_organisationunitid" />
-
-    <many-to-one name="catalog" class="org.hisp.dhis.coldchain.catalog.Catalog" column="catalogid"
-      not-null="false" foreign-key="fk_equipmentinstance_catalogid" />
-
-    <property name="working" not-null="true" />
-    
-	<set name="equipmentStatusUpdates" cascade="all-delete-orphan" inverse="true" >
-      <key column="equipmentinstanceid" />
-	  <one-to-many class="org.hisp.dhis.coldchain.inventory.EquipmentStatus" />
-    </set>
-	
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/EquipmentStatus.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/EquipmentStatus.hbm.xml	2012-04-17 12:28:23 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/EquipmentStatus.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-<hibernate-mapping>
-	<class name="org.hisp.dhis.coldchain.inventory.EquipmentStatus" table="equipmentstatusupdates">
-
-		<id name="id" column="equipmentstatusid">
-			<generator class="native" />
-		</id>
-
-        <many-to-one name="equipmentInstance" class="org.hisp.dhis.coldchain.inventory.EquipmentInstance" column="equipmentinstanceid"
-            foreign-key="fk_equipmentstatus_equipmentInstanceid" />
-
-		<property name="reportingDate" column="reportingdate" />
-
-		<property name="updationDate" column="updationdate" />
-
-		<property name="status" column="status" />
-		 
-		<property name="description" column="description" />
-
-		<property name="storedBy" column="storedby" />
-
-	</class>
-</hibernate-mapping>
\ No newline at end of file

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryType.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryType.hbm.xml	2012-06-21 09:47:23 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryType.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
- 
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.inventory.InventoryType" table="inventorytype">
-    <id name="id" column="inventorytypeid">
-      <generator class="native"/>
-    </id>
-
-    <property name="name" not-null="true" unique="true" length="160"/>
-    
-    <property name="description" not-null="false" length="250"/>
-	
-	<many-to-one name="catalogType" class="org.hisp.dhis.coldchain.catalog.CatalogType" column="catalogtypeid"
-      foreign-key="fk_inventorytype_catalogypeid" />
-
-    <property name="tracking" column="tracking" />
-
-	<set name="dataSets" table="inventorytype_datasets">
-      <key column="inventorytypeid" foreign-key="fk_inventorytype_datasets_inventorytypeid" />
-      <many-to-many class="org.hisp.dhis.dataset.DataSet" column="datasetid"
-          foreign-key="inventorytype_datasets_datasetid" />
-    </set>
-
-	  
-    <set name="inventoryType_Attributes" order-by="sort_order" >
-      <key column="inventorytypeid" foreign-key="fk_inventorytype_inventoryType_Attributes_inventorytypeid" />
-      <one-to-many class="org.hisp.dhis.coldchain.inventory.InventoryType_Attribute" />
-    </set>	  
-	  	  
-	  	
-<!--	
-	<set name="inventoryTypeAttributes" table="inventorytype_attributes">
-      <key column="inventorytypeid" foreign-key="fk_inventorytype_attributes_inventorytypeid" />
-      <many-to-many class="org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute" column="inventorytypeattributeid"
-          foreign-key="fk_inventorytype_attributes_inventorytypeattributeid" />
-    </set>
--->	
-
-<!--
-	<list name="inventoryTypeAttributes" table="inventorytype_attributes">
-		<key column="inventorytypeid" foreign-key="fk_inventorytype_attributes_inventorytypeid" />					 
-        <list-index column="sort_order" base="0" />
-        <many-to-many class="org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute" column="inventorytypeattributeid"
-			foreign-key="fk_inventorytype_attributes_inventorytypeattributeid" />
-	</list>
--->
-
-    <many-to-one name="dataEntryForm" class="org.hisp.dhis.dataentryform.DataEntryForm"
-      foreign-key="fk_inventorytype_dataentryform" />		  
-
-  </class>
-</hibernate-mapping>
\ No newline at end of file

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryTypeAttribute.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryTypeAttribute.hbm.xml	2012-06-21 09:47:23 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryTypeAttribute.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute" table="inventorytypeattribute">
-    <id name="id" column="inventorytypeattributeid">
-      <generator class="native"/>
-    </id>
-
-    <property name="name" not-null="true" unique="true" length="160"/>
-    
-    <property name="description" not-null="false" length="250"/>
-	
-	<property name="valueType" column="valuetype" not-null="true" />
-
-    <property name="mandatory" column="mandatory" not-null="true" />
-	  
-	<!--<property name="display" column="display" not-null="true" /> -->  
-
-    <property name="noChars" />
-	
-	<set name="attributeOptions">
-      <key column="inventorytypeattributeid" />
-      <one-to-many class="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeOption" />
-    </set>
-	
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryTypeAttributeOption.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryTypeAttributeOption.hbm.xml	2012-05-10 05:39:14 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryTypeAttributeOption.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.inventory.InventoryTypeAttributeOption" table="inventorytypeattributeoption">
-    <id name="id" column="inventorytypeattributeoptionid">
-      <generator class="native"/>
-    </id>
-
-    <property name="name" not-null="true" length="160"/>
-	<!--<property name="name" not-null="true" unique="true" length="160"/>-->
-    
-    <many-to-one name="inventoryTypeAttribute" column="inventorytypeattributeid" class="org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute"
-      foreign-key="fk_inventorytypetypeattributeoption_inventorytypeattributeid" />
-
-  </class>
-</hibernate-mapping>

=== removed file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryType_Attribute.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryType_Attribute.hbm.xml	2012-06-21 09:47:23 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/org/hisp/dhis/coldchain/hibernate/InventoryType_Attribute.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.coldchain.inventory.InventoryType_Attribute" table="inventorytype_attributes">
-
-    <composite-id>
-      <key-many-to-one name="inventoryType" class="org.hisp.dhis.coldchain.inventory.InventoryType" column="inventorytypeid"
-        foreign-key="fk_inventorytype_attribute_display_inventorytypeid" />
-      <key-many-to-one name="inventoryTypeAttribute" class="org.hisp.dhis.coldchain.inventory.InventoryTypeAttribute" column="inventorytypeattributeid"
-        foreign-key="fk_fk_inventorytype_attribute_display_inventorytypeattributeid" />
-    </composite-id>
-
-    <property name="display" column="display" not-null="true" />
-	  
-	<property name="sortOrder" column="sort_order" /> 
-
-  </class>
-</hibernate-mapping>

=== modified file 'local/in/dhis-in-services/dhis-in-service-configuration/pom.xml'
--- local/in/dhis-in-services/dhis-in-service-configuration/pom.xml	2013-03-25 05:08:43 +0000
+++ local/in/dhis-in-services/dhis-in-service-configuration/pom.xml	2013-08-12 14:01:06 +0000
@@ -1,11 +1,12 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
   <modelVersion>4.0.0</modelVersion>
   
   <parent>
     <groupId>org.hisp.dhis</groupId>
     <artifactId>dhis-in-services</artifactId>
-	<version>2.12-SNAPSHOT</version>
+    <version>2.12</version>
   </parent>
   
   <artifactId>dhis-in-service-configuration</artifactId>

=== modified file 'local/in/dhis-in-services/dhis-in-service-configuration/src/main/resources/org/hisp/dhis/config/hibernate/ConfigIn.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-configuration/src/main/resources/org/hisp/dhis/config/hibernate/ConfigIn.hbm.xml	2012-04-17 11:59:19 +0000
+++ local/in/dhis-in-services/dhis-in-service-configuration/src/main/resources/org/hisp/dhis/config/hibernate/ConfigIn.hbm.xml	2013-08-12 14:01:06 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>
 
 <hibernate-mapping>
   <class name="org.hisp.dhis.config.Configuration_IN" table="config_in">

=== modified file 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/pom.xml'
--- local/in/dhis-in-services/dhis-in-service-dataentrystatus/pom.xml	2013-03-25 05:08:43 +0000
+++ local/in/dhis-in-services/dhis-in-service-dataentrystatus/pom.xml	2013-08-12 14:01:06 +0000
@@ -1,12 +1,13 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
   <modelVersion>4.0.0</modelVersion>
   
-	<parent>
-		<groupId>org.hisp.dhis</groupId>
-		<artifactId>dhis-in-services</artifactId>
-		<version>2.12-SNAPSHOT</version>
-	</parent>
+  <parent>
+    <groupId>org.hisp.dhis</groupId>
+    <artifactId>dhis-in-services</artifactId>
+    <version>2.12</version>
+  </parent>
   
   <artifactId>dhis-in-service-dataentrystatus</artifactId>
   <packaging>jar</packaging>

=== modified file 'local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/hibernate/DataEntryStatus.hbm.xml'
--- local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/hibernate/DataEntryStatus.hbm.xml	2012-04-17 11:59:19 +0000
+++ local/in/dhis-in-services/dhis-in-service-dataentrystatus/src/main/resources/org/hisp/dhis/dataentrystatus/hibernate/DataEntryStatus.hbm.xml	2013-08-12 14:01:06 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>
 
 <hibernate-mapping>
   <class name="org.hisp.dhis.dataentrystatus.DataEntryStatus" table="dataentrystatus">

=== modified file 'local/in/dhis-in-services/dhis-in-service-dbmanager/pom.xml'
--- local/in/dhis-in-services/dhis-in-service-dbmanager/pom.xml	2013-03-25 05:08:43 +0000
+++ local/in/dhis-in-services/dhis-in-service-dbmanager/pom.xml	2013-08-12 14:01:06 +0000
@@ -1,69 +1,69 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0";
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
-	<modelVersion>4.0.0</modelVersion>
-	
-	<parent>
-		<groupId>org.hisp.dhis</groupId>
-		<artifactId>dhis-in-services</artifactId>
-		<version>2.12-SNAPSHOT</version>
-	</parent>
-	
-	<artifactId>dhis-in-service-dbmanager</artifactId>
-	<packaging>jar</packaging>
-	<name>DHIS India DBManager Service</name>
-	
-	<dependencies>
-		
-		<!-- DHIS -->
-		
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-in-api</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-service-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-support-hibernate</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hisp.dhis</groupId>
-			<artifactId>dhis-support-system</artifactId>
-		</dependency>
-		<!--
-		<dependency>
-		<groupId>org.hisp.dhis</groupId>
-		<artifactId>dhis-service-options</artifactId>
-		</dependency>  
-		-->
-		<dependency>
-			<groupId>net.sourceforge.jexcelapi</groupId>
-			<artifactId>jxl</artifactId>
-		</dependency>
-		
-		<!-- Other -->
-		<!--
-		<dependency>
-		<groupId>mysql</groupId>
-		<artifactId>mysql-connector-java</artifactId>
-		</dependency>
-		-->
-		<dependency>
-			<groupId>jep</groupId>
-			<artifactId>jep</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>commons-collections</groupId>
-			<artifactId>commons-collections</artifactId>
-		</dependency>
-		
-	</dependencies>
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  
+  <parent>
+    <groupId>org.hisp.dhis</groupId>
+    <artifactId>dhis-in-services</artifactId>
+    <version>2.12</version>
+  </parent>
+  
+  <artifactId>dhis-in-service-dbmanager</artifactId>
+  <packaging>jar</packaging>
+  <name>DHIS India DBManager Service</name>
+  
+  <dependencies>
+    
+    <!-- DHIS -->
+    
+     <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-api</artifactId>
+    </dependency>
+     <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-in-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-service-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-support-hibernate</artifactId>
+    </dependency>    
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-support-system</artifactId>
+    </dependency>
+<!--
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-service-options</artifactId>
+    </dependency>  
+-->
+   <dependency>
+      <groupId>net.sourceforge.jexcelapi</groupId>
+      <artifactId>jxl</artifactId>
+    </dependency>
+        
+    <!-- Other -->
+    <!--
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+    </dependency>
+	  -->
+    <dependency>
+      <groupId>jep</groupId>
+      <artifactId>jep</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+    </dependency>
+	  
+  </dependencies>	  
 </project>

=== removed directory 'local/in/dhis-in-services/dhis-in-service-ihrissyncmanager'
=== removed file 'local/in/dhis-in-services/dhis-in-service-ihrissyncmanager/pom.xml'
--- local/in/dhis-in-services/dhis-in-service-ihrissyncma