← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2805: Removed dubious import of dataentryforms implementation. Removed check for matching orgunit code ...

 

------------------------------------------------------------
revno: 2805
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-02-02 18:56:01 +0100
message:
  Removed dubious import of dataentryforms implementation. Removed check for matching orgunit code during orgunit import.
removed:
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataEntryFormConverter.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/importexport/GroupMemberType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportObjectManager.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DXFConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataSetConverter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/exporter/DefaultDXFExportService.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/OrganisationUnitImporter.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/DefaultObjectMappingGenerator.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/ObjectMappingGenerator.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectService.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/GetOrganisationUnitByCodeAction.java
  dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/MetaDataExportAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/importexport/GroupMemberType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/importexport/GroupMemberType.java	2010-12-23 11:56:44 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/importexport/GroupMemberType.java	2011-02-02 17:56:01 +0000
@@ -44,7 +44,6 @@
     DATADICTIONARY_INDICATOR,
     DATASET,
     DATASET_SOURCE,
-    DATASET_DATAENTRYFORM,
     ORGANISATIONUNITGROUP,
     ORGANISATIONUNITGROUPSET,
     ORGANISATIONUNITRELATIONSHIP,

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitService.java	2011-01-14 16:18:27 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitService.java	2011-02-02 17:56:01 +0000
@@ -131,14 +131,6 @@
     OrganisationUnit getOrganisationUnitByNameIgnoreCase( String name );
 
     /**
-     * Returns an OrganisationUnit with a given code.
-     * 
-     * @param code the code of the OrganisationUnit to return.
-     * @return the OrganisationUnit with the given code, or null if not match.
-     */
-    OrganisationUnit getOrganisationUnitByCode( String code );
-    
-    /**
      * Returns all root OrganisationUnits. A root OrganisationUnit is an
      * OrganisationUnit with no parent/the parent set to null.
      * 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitStore.java	2010-12-12 13:35:21 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitStore.java	2011-02-02 17:56:01 +0000
@@ -68,14 +68,6 @@
     OrganisationUnit getOrganisationUnitByNameIgnoreCase( String name );
 
     /**
-     * Returns an OrganisationUnit with a given code.
-     * 
-     * @param code the code of the OrganisationUnit to return.
-     * @return the OrganisationUnit with the given code, or null if not match.
-     */
-    OrganisationUnit getOrganisationUnitByCode( String code );
-    
-    /**
      * Returns all root OrganisationUnits. A root OrganisationUnit is an
      * OrganisationUnit with no parent/has the parent set to null.
      * 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java	2011-01-08 05:58:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java	2011-02-02 17:56:01 +0000
@@ -187,11 +187,6 @@
         return organisationUnitStore.getOrganisationUnitByNameIgnoreCase( name );
     }
 
-    public OrganisationUnit getOrganisationUnitByCode( String code )
-    {
-        return organisationUnitStore.getOrganisationUnitByCode( code );
-    }
-
     public Collection<OrganisationUnit> getRootOrganisationUnits()
     {
         return organisationUnitStore.getRootOrganisationUnits();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java	2010-12-12 18:39:35 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java	2011-02-02 17:56:01 +0000
@@ -111,17 +111,6 @@
         return (OrganisationUnit) criteria.uniqueResult();
     }
 
-    public OrganisationUnit getOrganisationUnitByCode( String code )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Query query = session.createQuery( "from OrganisationUnit o where o.code = :code" );
-
-        query.setString( "code", code );
-
-        return (OrganisationUnit) query.uniqueResult();
-    }
-
     @SuppressWarnings( "unchecked" )
     public Collection<OrganisationUnit> getRootOrganisationUnits()
     {

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java	2011-01-17 17:03:05 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java	2011-02-02 17:56:01 +0000
@@ -99,8 +99,6 @@
     
     private Collection<Integer> olapUrls = new ArrayList<Integer>();
     
-    private Collection<Integer> dataEntryForms = new ArrayList<Integer>();
-    
     private I18n i18n;
     
     private I18nFormat format;
@@ -455,16 +453,4 @@
     {
         this.olapUrls = olapUrls;
     }
-    
-
-    public Collection<Integer> getDataEntryForms()
-    {
-        return dataEntryForms;
-    }
-
-    public void setDataEntryForms( Collection<Integer> dataEntryForms )
-    {
-        this.dataEntryForms = dataEntryForms;
-    }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportObjectManager.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportObjectManager.java	2010-12-23 11:56:44 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportObjectManager.java	2011-02-02 17:56:01 +0000
@@ -110,6 +110,4 @@
     void importCompleteDataSetRegistrations();
     
     void importDataValues();
-    
-    void importDataEntryForms();
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DXFConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DXFConverter.java	2011-01-31 19:47:04 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DXFConverter.java	2011-02-02 17:56:01 +0000
@@ -53,8 +53,6 @@
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementGroupSet;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataentryform.DataEntryForm;
-import org.hisp.dhis.dataentryform.DataEntryFormService;
 import org.hisp.dhis.dataset.CompleteDataSetRegistration;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
@@ -91,7 +89,6 @@
 import org.hisp.dhis.jdbc.batchhandler.DataElementGroupMemberBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataElementGroupSetBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataElementGroupSetMemberBatchHandler;
-import org.hisp.dhis.jdbc.batchhandler.DataEntryFormBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataSetBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataSetMemberBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataSetSourceAssociationBatchHandler;
@@ -301,13 +298,6 @@
         this.converterInvoker = converterInvoker;
     }
 
-    private DataEntryFormService dataEntryFormService;
-
-    public void setDataEntryFormService( DataEntryFormService dataEntryFormService )
-    {
-        this.dataEntryFormService = dataEntryFormService;
-    }
-
     public void write( XMLWriter writer, ExportParams params, ProcessState state )
     {
         throw new UnsupportedOperationException( "Not supported yet." );
@@ -693,22 +683,6 @@
 
                 log.info( "Imported DataDictionary Indicators" );
             }
-            else if ( reader.isStartElement( DataEntryFormConverter.COLLECTION_NAME ) )
-            {
-                state.setMessage( "importing_data_entry_forms" );
-                
-                BatchHandler<DataEntryForm> batchHandler = batchHandlerFactory.createBatchHandler(
-                    DataEntryFormBatchHandler.class ).init();
-
-                XMLConverter converter = new DataEntryFormConverter( batchHandler, importObjectService, dataEntryFormService, 
-                    objectMappingGenerator.getDataElementMapping( params.skipMapping() ), objectMappingGenerator.getCategoryComboMapping( params.skipMapping() ) );
-
-                converterInvoker.invokeRead( converter, reader, params );
-
-                batchHandler.flush();
-
-                log.info( "Imported DataEntryForms" );
-            }
             else if ( reader.isStartElement( DataSetConverter.COLLECTION_NAME ) )
             {
                 state.setMessage( "importing_data_sets" );
@@ -717,7 +691,7 @@
                     .init();
 
                 XMLConverter converter = new DataSetConverter( batchHandler, importObjectService, dataSetService,
-                    objectMappingGenerator.getPeriodTypeMapping(), objectMappingGenerator.getDataEntryFormMapping( params.skipMapping() ) );
+                    objectMappingGenerator.getPeriodTypeMapping() );
 
                 converterInvoker.invokeRead( converter, reader, params );
 

=== removed file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataEntryFormConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataEntryFormConverter.java	2011-01-17 13:40:50 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataEntryFormConverter.java	1970-01-01 00:00:00 +0000
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 2004-2010, 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.importexport.dxf.converter;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.regex.Matcher;
-
-import org.amplecode.quick.BatchHandler;
-import org.amplecode.staxwax.reader.XMLReader;
-import org.amplecode.staxwax.writer.XMLWriter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.dataentryform.DataEntryForm;
-import org.hisp.dhis.dataentryform.DataEntryFormService;
-import org.hisp.dhis.importexport.ExportParams;
-import org.hisp.dhis.importexport.ImportObjectService;
-import org.hisp.dhis.importexport.ImportParams;
-import org.hisp.dhis.importexport.XMLConverter;
-import org.hisp.dhis.importexport.importer.DataEntryFormImporter;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version $ID: DataEntryFormConverter.java Dec 20, 2010 09:34:28 AM $
- */
-public class DataEntryFormConverter
-    extends DataEntryFormImporter
-    implements XMLConverter
-{
-    private static final Log log = LogFactory.getLog( DataEntryFormConverter.class );
-    
-    public static final String COLLECTION_NAME = "dataEntryForms";
-    public static final String ELEMENT_NAME = "dataEntryForm";
-    private static final String FIELD_ID = "id";
-    private static final String FIELD_NAME = "name";
-    private static final String FIELD_HTMLCODE = "htmlCode";
-
-    private Map<Object, Integer> dataElementMapping;
-    private Map<Object, Integer> categoryOptionComboMapping;
-
-    // -------------------------------------------------------------------------
-    // Constructor
-    // -------------------------------------------------------------------------
-
-    /**
-     * Constructor for write operations.
-     */
-    public DataEntryFormConverter( DataEntryFormService dataEntryFormService )
-    {
-        this.dataEntryFormService = dataEntryFormService;
-    }
-
-    /**
-     * Constructor for read operations.
-     */
-    public DataEntryFormConverter( BatchHandler<DataEntryForm> batchHandler,
-        ImportObjectService importObjectService,
-        DataEntryFormService dataEntryFormService,
-        Map<Object, Integer> dataElementMapping, 
-        Map<Object, Integer> categoryOptionComboMapping )
-    {
-        this.batchHandler = batchHandler;
-        this.importObjectService = importObjectService;
-        this.dataEntryFormService = dataEntryFormService;
-        this.dataElementMapping = dataElementMapping;
-        this.categoryOptionComboMapping = categoryOptionComboMapping;
-    }
-
-    // -------------------------------------------------------------------------
-    // Override methods
-    // -------------------------------------------------------------------------
-
-    @Override
-    public void write( XMLWriter writer, ExportParams params )
-    {
-        Collection<DataEntryForm> dataEntryForms = dataEntryFormService.getDataEntryForms( params.getDataEntryForms() );
-
-        if ( dataEntryForms != null && dataEntryForms.size() > 0 )
-        {
-            writer.openElement( COLLECTION_NAME );
-
-            for ( DataEntryForm dataEntryForm : dataEntryForms )
-            {
-                writer.openElement( ELEMENT_NAME );
-
-                writer.writeElement( FIELD_ID, String.valueOf( dataEntryForm.getId() ) );
-                writer.writeElement( FIELD_NAME, dataEntryForm.getName() );
-                writer.writeCData( FIELD_HTMLCODE, dataEntryForm.getHtmlCode() );
-
-                writer.closeElement();
-            }
-
-            writer.closeElement();
-        }
-    }
-
-    @Override
-    public void read( XMLReader reader, ImportParams params )
-    {
-        while ( reader.moveToStartElement( ELEMENT_NAME, COLLECTION_NAME ) )
-        {
-            final DataEntryForm dataEntryForm = new DataEntryForm();
-
-            final Map<String, String> values = reader.readElements( ELEMENT_NAME );
-            
-            String htmlCode = values.get( FIELD_HTMLCODE );
-            
-            dataEntryForm.setId( Integer.parseInt( values.get( FIELD_ID ) ) );
-            dataEntryForm.setName( values.get( FIELD_NAME ) );            
-            dataEntryForm.setHtmlCode( processHtmlCode( htmlCode, dataEntryForm.getName() ) );
-            
-            importObject( dataEntryForm, params );
-        }
-    }
-
-    // -------------------------------------------------------------------------
-    // Support method
-    // -------------------------------------------------------------------------
-
-    private String processHtmlCode( String htmlCode, String name )
-    {
-        if ( htmlCode == null )
-        {
-            return null;
-        }
-
-        StringBuffer buffer = new StringBuffer();
-
-        Matcher matcher = DataEntryForm.INPUT_PATTERN.matcher( htmlCode );
-        
-        while ( matcher.find() )
-        {
-            if ( matcher.groupCount() > 0 )
-            {
-                String dataElement = matcher.group( 1 );
-                String categoryOptionCombo = matcher.group( 2 );
-
-                Integer dataElementId = dataElementMapping.get( Integer.valueOf( dataElement ) );
-                Integer categoryOptionComboId = categoryOptionComboMapping.get( Integer.valueOf( categoryOptionCombo ) );
-                
-                if ( dataElement == null )
-                {
-                    log.warn( "Data element or category option combo does not exist for data entry form: " + name );
-                    continue;
-                }
-                
-                if ( categoryOptionComboId == null )
-                {
-                    log.warn( "Category option combo does not exist for data entry form: " + name );
-                    continue;
-                }
-                
-                matcher.appendReplacement( buffer, String.valueOf( dataElementId ) );
-                matcher.appendReplacement( buffer, String.valueOf( categoryOptionComboId ) );
-            }
-        }
-        
-        matcher.appendTail( buffer );
-        
-        return buffer.toString();
-    }
-}

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataSetConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataSetConverter.java	2010-12-23 11:56:44 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataSetConverter.java	2011-02-02 17:56:01 +0000
@@ -33,8 +33,6 @@
 import org.amplecode.quick.BatchHandler;
 import org.amplecode.staxwax.reader.XMLReader;
 import org.amplecode.staxwax.writer.XMLWriter;
-import org.apache.commons.lang.StringUtils;
-import org.hisp.dhis.dataentryform.DataEntryForm;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.importexport.ExportParams;
@@ -61,16 +59,12 @@
     private static final String FIELD_SHORT_NAME = "shortName";
     private static final String FIELD_CODE = "code";
     private static final String FIELD_PERIOD_TYPE = "periodType";
-    private static final String FIELD_DATA_ENTRY_FORM_ID = "dataEntryForm";
-
-    private static final String BLANK = "";
-
+    
     // -------------------------------------------------------------------------
     // Properties
     // -------------------------------------------------------------------------
 
     private Map<String, Integer> periodTypeMapping;
-    private Map<Object, Integer> dataEntryFormMapping;
 
     // -------------------------------------------------------------------------
     // Constructor
@@ -92,13 +86,12 @@
      * @param importObjectService the importObjectService to use.
      */
     public DataSetConverter( BatchHandler<DataSet> batchHandler, ImportObjectService importObjectService,
-        DataSetService dataSetService, Map<String, Integer> periodTypeMapping, Map<Object, Integer> dataEntryFormMapping )
+        DataSetService dataSetService, Map<String, Integer> periodTypeMapping )
     {
         this.batchHandler = batchHandler;
         this.importObjectService = importObjectService;
         this.dataSetService = dataSetService;
         this.periodTypeMapping = periodTypeMapping;
-        this.dataEntryFormMapping = dataEntryFormMapping;
     }
 
     /**
@@ -134,8 +127,6 @@
                 writer.writeCData( FIELD_SHORT_NAME, dataSet.getShortName() );
                 writer.writeElement( FIELD_CODE, dataSet.getCode() );
                 writer.writeElement( FIELD_PERIOD_TYPE, dataSet.getPeriodType().getName() );
-                writer.writeElement( FIELD_DATA_ENTRY_FORM_ID, String
-                    .valueOf( dataSet.getDataEntryForm() == null ? BLANK : dataSet.getDataEntryForm().getId() ) );
 
                 writer.closeElement();
             }
@@ -161,15 +152,6 @@
             dataSet.setCode( values.get( FIELD_CODE ) );
             dataSet.getPeriodType().setId( periodTypeMapping.get( values.get( FIELD_PERIOD_TYPE ) ) );
             
-            String dataEntryFormId = StringUtils.trimToNull( values.get( FIELD_DATA_ENTRY_FORM_ID ) );
-            
-            if ( dataEntryFormId != null )
-            {
-                DataEntryForm form = new DataEntryForm();
-                dataSet.setDataEntryForm( form );
-                dataSet.getDataEntryForm().setId( dataEntryFormMapping.get( Integer.parseInt( dataEntryFormId ) ) );                
-            }
-            
             importObject( dataSet, params );
         }
     }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/exporter/DefaultDXFExportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/exporter/DefaultDXFExportService.java	2011-01-17 17:03:05 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/exporter/DefaultDXFExportService.java	2011-02-02 17:56:01 +0000
@@ -52,7 +52,6 @@
 import org.hisp.dhis.datadictionary.DataDictionaryService;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataentryform.DataEntryFormService;
 import org.hisp.dhis.dataset.CompleteDataSetRegistrationService;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.importexport.ExportParams;
@@ -77,7 +76,6 @@
 import org.hisp.dhis.importexport.dxf.converter.DataElementGroupMemberConverter;
 import org.hisp.dhis.importexport.dxf.converter.DataElementGroupSetConverter;
 import org.hisp.dhis.importexport.dxf.converter.DataElementGroupSetMemberConverter;
-import org.hisp.dhis.importexport.dxf.converter.DataEntryFormConverter;
 import org.hisp.dhis.importexport.dxf.converter.DataSetConverter;
 import org.hisp.dhis.importexport.dxf.converter.DataSetMemberConverter;
 import org.hisp.dhis.importexport.dxf.converter.DataSetSourceAssociationConverter;
@@ -180,13 +178,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private DataEntryFormService dataEntryFormService;
-
-    public void setDataEntryFormService( DataEntryFormService dataEntryFormService )
-    {
-        this.dataEntryFormService = dataEntryFormService;
-    }
-
     private OrganisationUnitService organisationUnitService;
 
     public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
@@ -323,7 +314,6 @@
             thread.registerXMLConverter( new DataDictionaryDataElementConverter( dataDictionaryService ) );
             thread.registerXMLConverter( new DataDictionaryIndicatorConverter( dataDictionaryService ) );
             
-            thread.registerXMLConverter( new DataEntryFormConverter( dataEntryFormService ) );
             thread.registerXMLConverter( new DataSetConverter( dataSetService ) );
             thread.registerXMLConverter( new DataSetMemberConverter( dataSetService, dataElementService ) );
 

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/OrganisationUnitImporter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/OrganisationUnitImporter.java	2010-08-27 10:58:42 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/OrganisationUnitImporter.java	2011-02-02 17:56:01 +0000
@@ -100,14 +100,7 @@
     @Override
     protected OrganisationUnit getMatching( OrganisationUnit object )
     {
-        OrganisationUnit match = organisationUnitService.getOrganisationUnitByName( object.getName() );
-        
-        if ( match == null )
-        {
-            match = organisationUnitService.getOrganisationUnitByCode( object.getCode() );
-        }
-        
-        return match;
+        return organisationUnitService.getOrganisationUnitByName( object.getName() );
     }
 
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/DefaultObjectMappingGenerator.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/DefaultObjectMappingGenerator.java	2010-12-23 11:56:44 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/DefaultObjectMappingGenerator.java	2011-02-02 17:56:01 +0000
@@ -42,7 +42,6 @@
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementGroupSet;
-import org.hisp.dhis.dataentryform.DataEntryForm;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorGroup;
@@ -56,7 +55,6 @@
 import org.hisp.dhis.jdbc.batchhandler.DataElementCategoryOptionBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataElementGroupBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataElementGroupSetBatchHandler;
-import org.hisp.dhis.jdbc.batchhandler.DataEntryFormBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataSetBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.GroupSetBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.IndicatorBatchHandler;
@@ -262,18 +260,6 @@
     }
     
     // -------------------------------------------------------------------------
-    // Data entry form
-    // -------------------------------------------------------------------------
-
-    public Map<Object, Integer> getDataEntryFormMapping( boolean skipMapping )
-    {
-        BatchHandler<DataEntryForm> batchHandler = batchHandlerFactory.createBatchHandler( DataEntryFormBatchHandler.class );
-        
-        return getMapping( batchHandler, NameMappingUtil.getDataEntryFormMap(), skipMapping );
-    }
-
-
-    // -------------------------------------------------------------------------
     // OrganisationUnit
     // -------------------------------------------------------------------------
 

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/ObjectMappingGenerator.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/ObjectMappingGenerator.java	2010-12-23 11:56:44 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/ObjectMappingGenerator.java	2011-02-02 17:56:01 +0000
@@ -83,6 +83,4 @@
     Map<Period, Integer> getPeriodObjectMapping( boolean skipMapping );
     
     Map<String, Integer> getPeriodTypeMapping();
-    
-    Map<Object, Integer> getDataEntryFormMapping( boolean skipMapping );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java	2011-01-17 13:40:50 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java	2011-02-02 17:56:01 +0000
@@ -51,8 +51,6 @@
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementGroupSet;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataentryform.DataEntryForm;
-import org.hisp.dhis.dataentryform.DataEntryFormService;
 import org.hisp.dhis.dataset.CompleteDataSetRegistration;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
@@ -80,7 +78,6 @@
 import org.hisp.dhis.importexport.importer.DataElementGroupImporter;
 import org.hisp.dhis.importexport.importer.DataElementGroupSetImporter;
 import org.hisp.dhis.importexport.importer.DataElementImporter;
-import org.hisp.dhis.importexport.importer.DataEntryFormImporter;
 import org.hisp.dhis.importexport.importer.DataSetImporter;
 import org.hisp.dhis.importexport.importer.DataValueImporter;
 import org.hisp.dhis.importexport.importer.GroupSetImporter;
@@ -118,7 +115,6 @@
 import org.hisp.dhis.jdbc.batchhandler.DataElementGroupMemberBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataElementGroupSetBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataElementGroupSetMemberBatchHandler;
-import org.hisp.dhis.jdbc.batchhandler.DataEntryFormBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataSetBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataSetMemberBatchHandler;
 import org.hisp.dhis.jdbc.batchhandler.DataSetSourceAssociationBatchHandler;
@@ -304,13 +300,6 @@
         this.aggregatedDataValueService = aggregatedDataValueService;
     }
 
-    private DataEntryFormService dataEntryFormService;
-
-    public void setDataEntryFormService( DataEntryFormService dataEntryFormService )
-    {
-        this.dataEntryFormService = dataEntryFormService;
-    }
-
     // -------------------------------------------------------------------------
     // ImportObjectManager implementation
     // -------------------------------------------------------------------------
@@ -750,47 +739,17 @@
     }
 
     @Transactional
-    public void importDataEntryForms()
-    {
-        BatchHandler<DataEntryForm> batchHandler = batchHandlerFactory.createBatchHandler( DataEntryFormBatchHandler.class ).init();
-        
-        Collection<ImportObject> importObjects = importObjectStore.getImportObjects( DataEntryForm.class );
-
-        Importer<DataEntryForm> importer = new DataEntryFormImporter( batchHandler, dataEntryFormService );
-
-        for ( ImportObject importObject : importObjects )
-        {
-            importer.importObject( (DataEntryForm) importObject.getObject(), params );
-        }
-
-        batchHandler.flush();
-        
-        importObjectStore.deleteImportObjects( DataEntryForm.class );
-
-        log.info( "Imported DataEntryForms" );
-    }
-
-    @Transactional
     public void importDataSets()
     {
         BatchHandler<DataSet> batchHandler = batchHandlerFactory.createBatchHandler( DataSetBatchHandler.class ).init();
 
-        Map<Object, Integer> dataEntryFormMapping = objectMappingGenerator.getDataEntryFormMapping( false );
-        
         Collection<ImportObject> importObjects = importObjectStore.getImportObjects( DataSet.class );
 
         Importer<DataSet> importer = new DataSetImporter( batchHandler, dataSetService );
 
         for ( ImportObject importObject : importObjects )
         {
-            DataSet object = (DataSet) importObject.getObject();
-            
-            if ( object.getDataEntryForm() != null )
-            {
-                object.getDataEntryForm().setId( dataEntryFormMapping.get( object.getDataEntryForm().getId() ) );
-            }
-            
-            importer.importObject( object, params );
+            importer.importObject( (DataSet) importObject.getObject(), params );
         }
 
         batchHandler.flush();

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectService.java	2010-12-23 11:56:44 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectService.java	2011-02-02 17:56:01 +0000
@@ -48,8 +48,6 @@
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementGroupSet;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataentryform.DataEntryForm;
-import org.hisp.dhis.dataentryform.DataEntryFormService;
 import org.hisp.dhis.dataset.CompleteDataSetRegistration;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
@@ -146,13 +144,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private DataEntryFormService dataEntryFormService;
-
-    public void setDataEntryFormService( DataEntryFormService dataEntryFormService )
-    {
-        this.dataEntryFormService = dataEntryFormService;
-    }
-
     private OrganisationUnitService organisationUnitService;
 
     public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
@@ -367,19 +358,12 @@
                 deleteGroupAssociations( GroupMemberType.DATADICTIONARY_DATAELEMENT, dictionary.getId() );
                 deleteGroupAssociations( GroupMemberType.DATADICTIONARY_INDICATOR, dictionary.getId() );
             }
-            else if ( importObject.getClassName().equals( DataEntryForm.class.getName() ) )
-            {
-                DataEntryForm dataEntryForm = (DataEntryForm) importObject.getObject();
-                
-                deleteGroupAssociations( GroupMemberType.DATAENTRYFORM, dataEntryForm.getId() );
-            }
             else if ( importObject.getClassName().equals( DataSet.class.getName() ) )
             {
                 DataSet dataSet = (DataSet) importObject.getObject();
 
                 deleteGroupAssociations( GroupMemberType.DATASET, dataSet.getId() );
                 deleteMemberAssociations( GroupMemberType.DATASET_SOURCE, dataSet.getId() );
-                deleteMemberAssociations( GroupMemberType.DATASET_DATAENTRYFORM, dataSet.getId() );
                 
                 deleteCompleteDataSetRegistrationsByDataSet( dataSet.getId() );
             }
@@ -433,7 +417,6 @@
             importObjectStore.deleteImportObjects( DataSet.class );
             importObjectStore.deleteImportObjects( GroupMemberType.DATASET );
             importObjectStore.deleteImportObjects( GroupMemberType.DATASET_SOURCE );
-            importObjectStore.deleteImportObjects( GroupMemberType.DATASET_DATAENTRYFORM);
             importObjectStore.deleteImportObjects( CompleteDataSetRegistration.class );
 
             importObjectStore.deleteImportObjects( Indicator.class );
@@ -482,7 +465,6 @@
         {
             importObjectStore.deleteImportObjects( GroupMemberType.DATASET );
             importObjectStore.deleteImportObjects( GroupMemberType.DATASET_SOURCE );
-            importObjectStore.deleteImportObjects( GroupMemberType.DATASET_DATAENTRYFORM );
             importObjectStore.deleteImportObjects( CompleteDataSetRegistration.class );
         }
         else if ( clazz.equals( OrganisationUnit.class ) )
@@ -636,12 +618,7 @@
             dataValue = updateDataValue( dataValue, dataValueService.getDataValue( dataValue.getSource(), dataValue
                 .getDataElement(), dataValue.getPeriod(), dataValue.getOptionCombo() ) );
         }
-        else if ( object.getClass().equals( DataEntryForm.class ) )
-        {
-            DataEntryForm dataEntryForm = (DataEntryForm) object;
-
-            dataEntryForm.setName( dataEntryFormService.getDataEntryForm( existingObjectId ).getName() );
-        }
+        
         // ---------------------------------------------------------------------
         // Sets the status of the import object to match, these objects will
         // later be ignored on import all but is needed for matching of
@@ -680,7 +657,6 @@
         importObjectManager.importDataDictionaries();
         importObjectManager.importDataDictionaryDataElements();
         importObjectManager.importDataDictionaryIndicators();
-        importObjectManager.importDataEntryForms();
         importObjectManager.importDataSets();
         importObjectManager.importDataSetMembers();
         importObjectManager.importOrganisationUnits();

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml	2010-12-26 15:38:45 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/META-INF/dhis/beans.xml	2011-02-02 17:56:01 +0000
@@ -95,7 +95,6 @@
 		<property name="chartService" ref="org.hisp.dhis.chart.ChartService"/>
 		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
 		<property name="aggregatedDataValueService" ref="org.hisp.dhis.aggregation.AggregatedDataValueService" />
-		<property name="dataEntryFormService" ref="org.hisp.dhis.dataentryform.DataEntryFormService" />
 	</bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -126,7 +125,6 @@
 		<property name="olapURLService" ref="org.hisp.dhis.olap.OlapURLService" />
 		<property name="dataValueService" ref="org.hisp.dhis.datavalue.DataValueService" />
 		<property name="cacheManager" ref="cacheManager"/>
-		<property name="dataEntryFormService" ref="org.hisp.dhis.dataentryform.DataEntryFormService"/>
 	</bean>
 
 	<bean id="internal-process-ImportPreview" class="org.hisp.dhis.importexport.ImportPreviewInternalProcess"
@@ -267,7 +265,6 @@
         <property name="converterInvoker"
                   ref="org.hisp.dhis.importexport.invoker.ConverterInvoker" />
 		<property name="cacheManager" ref="cacheManager"/>
-		<property name="dataEntryFormService" ref="org.hisp.dhis.dataentryform.DataEntryFormService"/>
     </bean>
 
     <bean id="org.hisp.dhis.importexport.ImportService"
@@ -323,7 +320,6 @@
 		<property name="completeDataSetRegistrationService"
 			ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" />
 		<property name="aggregatedDataValueService" ref="org.hisp.dhis.aggregation.AggregatedDataValueService" />
-		<property name="dataEntryFormService" ref="org.hisp.dhis.dataentryform.DataEntryFormService" />
 	</bean>
 
 	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/GetOrganisationUnitByCodeAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/GetOrganisationUnitByCodeAction.java	2010-11-30 08:54:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/GetOrganisationUnitByCodeAction.java	2011-02-02 17:56:01 +0000
@@ -89,12 +89,7 @@
     {
         log.debug( "Searching organisation unit for code: " + code );
         
-        OrganisationUnit unit = organisationUnitService.getOrganisationUnitByCode( code );
-        
-        if ( unit == null )
-        {
-            unit = organisationUnitService.getOrganisationUnitByNameIgnoreCase( code );
-        }
+        OrganisationUnit unit = organisationUnitService.getOrganisationUnitByNameIgnoreCase( code );
         
         if ( unit != null )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/MetaDataExportAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/MetaDataExportAction.java	2011-01-17 17:03:05 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/MetaDataExportAction.java	2011-02-02 17:56:01 +0000
@@ -296,7 +296,6 @@
 
         if ( dataSets || reportTables )
         {
-            params.setDataEntryForms( null );
             params.setDataSets( null );
         }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java	2011-01-21 17:22:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java	2011-02-02 17:56:01 +0000
@@ -69,14 +69,7 @@
     {
         this.name = name;
     }
-    
-    private String code;
-    
-    public void setCode( String code )
-    {
-        this.code = code;
-    }
-        
+            
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -117,18 +110,6 @@
             }
         }        
         
-        if ( code != null )
-        {
-            OrganisationUnit match = organisationUnitService.getOrganisationUnitByCode( code );
-
-            if ( match != null && (id == null || match.getId() != id) )
-            {
-                message = i18n.getString( "org_unit_code_in_use" );
-
-                return ERROR;
-            }
-        }        
-
         message = "OK";
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2011-01-20 15:03:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2011-02-02 17:56:01 +0000
@@ -3,7 +3,6 @@
 		validation( 'addOrganisationUnitForm' );	
 		
 		checkValueIsExist( "name", "validateOrganisationUnit.action");
-		checkValueIsExist( "code", "validateOrganisationUnit.action");
 		
 		datePickerValid( 'openingDate', false );			
 	});

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2010-12-16 13:29:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2011-02-02 17:56:01 +0000
@@ -6,10 +6,6 @@
 			id: $organisationUnit.id			
 		});	
 		
-		checkValueIsExist( "code", "validateOrganisationUnit.action", {
-            id: $organisationUnit.id            
-        });     	
-		
 		#if ( $numberOfChildren == 0 )
 		datePickerInRange( 'openingDate', 'closedDate', false, false );
 		#else