← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7022: (patient) Removed program-attribute object.

 

------------------------------------------------------------
revno: 7022
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-05-24 02:48:53 +0700
message:
  (patient) Removed program-attribute object.
removed:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOption.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValue.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/ProgramAttributePopulator.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeOptionService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramAttributeOptionStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramAttributeStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/DefaultProgramAttributeValueService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueDeletionHandler.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/hibernate/
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/hibernate/HibernateProgramAttributeValueStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttribute.hbm.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttributeOption.hbm.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate/
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate/ProgramAttributeValue.hbm.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/RemoveEnrollmentAction.java
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramAttribute.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeOptionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramAttributeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramAttributeForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programAttribute.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramAttributeForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAttributeList.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramAttributeForm.vm
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java
  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/program/ProgramInstanceDeletionHandler.java
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetEnrollmentProgramListAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientAttributeGroupForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeGroupForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.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
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java	2012-02-27 01:07:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java	1970-01-01 00:00:00 +0000
@@ -1,181 +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.program;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.hisp.dhis.common.BaseIdentifiableObject;
-import org.hisp.dhis.common.Dxf2Namespace;
-
-/**
- * @author Chau Thu Tran
- * @version $Id ProgramAttribute.java 2010-10-30 19:30:09Z $
- */
-@XmlRootElement( name = "programAttribute", namespace = Dxf2Namespace.NAMESPACE )
-@XmlAccessorType( value = XmlAccessType.NONE )
-public class ProgramAttribute
-    extends BaseIdentifiableObject
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = 4924652651610802521L;
-
-    // -------------------------------------------------------------------------
-    // Define ValueType
-    // -------------------------------------------------------------------------
-
-    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";
-
-    // -------------------------------------------------------------------------
-    // Default Program Attributes
-    // -------------------------------------------------------------------------
-
-    public static final String DEAD_NAME = "Dead";
-
-    public static final String CLOSED_DATE = "Closed Date";
-
-    // -------------------------------------------------------------------------
-    // Properties
-    // -------------------------------------------------------------------------
-
-    private String description;
-
-    private String valueType;
-
-    private Set<ProgramAttributeOption> attributeOptions;
-
-    // -------------------------------------------------------------------------
-    // Logic
-    // -------------------------------------------------------------------------
-
-    public void addAttributeOptions( ProgramAttributeOption option )
-    {
-        if ( attributeOptions == null )
-        {
-            attributeOptions = new HashSet<ProgramAttributeOption>();
-        }
-
-        attributeOptions.add( option );
-    }
-
-    // -------------------------------------------------------------------------
-    // hashCode and equals
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((name == null) ? 0 : name.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals( Object obj )
-    {
-        if ( this == obj )
-        {
-            return true;
-        }
-
-        if ( obj == null )
-        {
-            return false;
-        }
-
-        if ( getClass() != obj.getClass() )
-        {
-            return false;
-        }
-
-        ProgramAttribute other = (ProgramAttribute) obj;
-
-        if ( name == null )
-        {
-            if ( other.name != null )
-            {
-                return false;
-            }
-        }
-        else if ( !name.equals( other.name ) )
-        {
-            return false;
-        }
-
-        return true;
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public String getValueType()
-    {
-        return valueType;
-    }
-
-    public void setValueType( String valueType )
-    {
-        this.valueType = valueType;
-    }
-
-    public String getDescription()
-    {
-        return description;
-    }
-
-    public void setDescription( String description )
-    {
-        this.description = description;
-    }
-
-    public Set<ProgramAttributeOption> getAttributeOptions()
-    {
-        return attributeOptions;
-    }
-
-    public void setAttributeOptions( Set<ProgramAttributeOption> attributeOptions )
-    {
-        this.attributeOptions = attributeOptions;
-    }
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOption.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOption.java	2012-01-06 04:56:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOption.java	1970-01-01 00:00:00 +0000
@@ -1,127 +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.program;
-
-import java.io.Serializable;
-
-
-/**
- * @author Chau Thu Tran
- * 
- * @version ProgramAttributeOption.java Nov 1, 2010 2:57:37 PM
- */
-public class ProgramAttributeOption
-    implements Serializable
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = 3822720812540068723L;
-
-    private int id;
-
-    private String name;
-
-    private ProgramAttribute programAttribute;
-
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-
-    public ProgramAttributeOption()
-    {
-    }
-
-    // -------------------------------------------------------------------------
-    // hashCode, equals and toString
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((name == null) ? 0 : name.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals( Object obj )
-    {
-        if ( this == obj )
-            return true;
-        if ( obj == null )
-            return false;
-        if ( getClass() != obj.getClass() )
-            return false;
-        ProgramAttributeOption other = (ProgramAttributeOption) obj;
-        if ( name == null )
-        {
-            if ( other.name != null )
-                return false;
-        }
-        else if ( !name.equals( other.name ) )
-            return false;
-        return true;
-    }
-
-    // -------------------------------------------------------------------------
-    // 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 ProgramAttribute getProgramAttribute()
-    {
-        return programAttribute;
-    }
-
-    public void setProgramAttribute( ProgramAttribute programAttribute )
-    {
-        this.programAttribute = programAttribute;
-    }
-
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionService.java	2012-01-06 04:56:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionService.java	1970-01-01 00:00:00 +0000
@@ -1,50 +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.program;
-
-import java.util.Collection;
-
-/**
- * @author Chau Thu Tran
- *
- * @version ProgramAttributeOptionService.java Nov 1, 2010 3:02:01 PM 
- */
-public interface ProgramAttributeOptionService
-{
-    int addProgramAttributeOption( ProgramAttributeOption option );
-
-    void updateProgramAttributeOption( ProgramAttributeOption option );
-
-    void deleteProgramAttributeOption( ProgramAttributeOption option );
-
-    ProgramAttributeOption get( ProgramAttribute programAttribute, String name );
-    
-    ProgramAttributeOption get( int id );
-    
-    Collection<ProgramAttributeOption> get( ProgramAttribute programAttribute );
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionStore.java	2012-01-06 04:56:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionStore.java	1970-01-01 00:00:00 +0000
@@ -1,46 +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.program;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericNameableObjectStore;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version ProgramAttributeOptionStore.java Nov 1, 2010 3:03:28 PM
- */
-public interface ProgramAttributeOptionStore extends GenericNameableObjectStore<ProgramAttributeOption>
-{
-    String ID = ProgramAttributeOption.class.getName();
-
-    ProgramAttributeOption get( ProgramAttribute patientAttribute, String name );
-
-    Collection<ProgramAttributeOption> get( ProgramAttribute programAttribute );
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeService.java	2012-01-06 04:56:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeService.java	1970-01-01 00:00:00 +0000
@@ -1,54 +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.program;
-
-import java.util.Collection;
-
-/**
- * @author Chau Thu Tran
- * @version $Id ProgramAttributeService.java 2010-10-30 19:50:04Z $
- */
-public interface ProgramAttributeService
-{
-    String ID = ProgramAttributeService.class.getName();
-
-    int saveProgramAttribute( ProgramAttribute programAttribute );
-
-    void deleteProgramAttribute( ProgramAttribute programAttribute );
-
-    void updateProgramAttribute( ProgramAttribute programAttribute );
-
-    ProgramAttribute getProgramAttribute( int id );
-
-    ProgramAttribute getProgramAttributeByName( String name );
-
-    Collection<ProgramAttribute> getAllProgramAttributes();
-
-    Collection<ProgramAttribute> getProgramAttributeByValueType( String valueType );
-
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeStore.java	2012-01-06 04:56:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeStore.java	1970-01-01 00:00:00 +0000
@@ -1,45 +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.program;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericNameableObjectStore;
-
-/**
- * @author Chau Thu Tran
- * @version $Id ProgramAttributeStore.java 2010-10-30 19:55:21Z $
- */
-public interface ProgramAttributeStore
-    extends GenericNameableObjectStore<ProgramAttribute>
-{
-    String ID = ProgramAttributeStore.class.getName();
-
-    Collection<ProgramAttribute> getByValueType( String valueType );
-
-}

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java	2011-12-14 10:00:44 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java	2012-05-23 19:48:53 +0000
@@ -61,8 +61,6 @@
 
     private Set<ProgramStageInstance> programStageInstances = new HashSet<ProgramStageInstance>();
 
-    private Set<ProgramAttribute> attributes = new HashSet<ProgramAttribute>();
-
     // -------------------------------------------------------------------------
     // Constructors
     // -------------------------------------------------------------------------
@@ -301,16 +299,6 @@
         this.programStageInstances = programStageInstances;
     }
 
-    public Set<ProgramAttribute> getAttributes()
-    {
-        return attributes;
-    }
-
-    public void setAttributes( Set<ProgramAttribute> attributes )
-    {
-        this.attributes = attributes;
-    }
-
     // -------------------------------------------------------------------------
     // Convenience method
     // -------------------------------------------------------------------------

=== removed directory 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue'
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValue.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValue.java	1970-01-01 00:00:00 +0000
@@ -1,150 +0,0 @@
-/*
- * 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.programattributevalue;
-
-import java.io.Serializable;
-
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramInstance;
-
-/**
- * @author Chau Thu Tran
- * @version $Id ProgramAttributeValue.java 2010-10-30 19:32:09Z $
- */
-public class ProgramAttributeValue
-    implements Serializable
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = 6942663950035085618L;
-
-    private ProgramAttribute programAttribute;
-
-    private ProgramInstance programInstance;
-
-    private String value;
-
-    private ProgramAttributeOption programAttributeOption;
-
-    // -------------------------------------------------------------------------
-    // Constructors
-    // -------------------------------------------------------------------------
-
-    public ProgramAttributeValue()
-    {
-
-    }
-
-    // -------------------------------------------------------------------------
-    // Logic
-    // -------------------------------------------------------------------------
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((programAttribute == null) ? 0 : programAttribute.hashCode());
-        result = prime * result + ((programInstance == null) ? 0 : programInstance.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals( Object obj )
-    {
-        if ( this == obj )
-            return true;
-        if ( obj == null )
-            return false;
-        if ( getClass() != obj.getClass() )
-            return false;
-        ProgramAttributeValue other = (ProgramAttributeValue) obj;
-        if ( programAttribute == null )
-        {
-            if ( other.programAttribute != null )
-                return false;
-        }
-        else if ( !programAttribute.equals( other.programAttribute ) )
-            return false;
-        if ( programInstance == null )
-        {
-            if ( other.programInstance != null )
-                return false;
-        }
-        else if ( !programInstance.equals( other.programInstance ) )
-            return false;
-        return true;
-    }
-
-    // -------------------------------------------------------------------------
-    // Getters and setters
-    // -------------------------------------------------------------------------
-
-    public ProgramAttribute getProgramAttribute()
-    {
-        return programAttribute;
-    }
-
-    public ProgramAttributeOption getProgramAttributeOption()
-    {
-        return programAttributeOption;
-    }
-
-    public void setProgramAttributeOption( ProgramAttributeOption programAttributeOption )
-    {
-        this.programAttributeOption = programAttributeOption;
-    }
-
-    public void setProgramAttribute( ProgramAttribute programAttribute )
-    {
-        this.programAttribute = programAttribute;
-    }
-
-    public ProgramInstance getProgramInstance()
-    {
-        return programInstance;
-    }
-
-    public void setProgramInstance( ProgramInstance programInstance )
-    {
-        this.programInstance = programInstance;
-    }
-
-    public String getValue()
-    {
-        return value;
-    }
-
-    public void setValue( String value )
-    {
-        this.value = value;
-    }
-
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueService.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueService.java	1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
-/*
- * 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.programattributevalue;
-
-import java.util.Collection;
-
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramInstance;
-
-/**
- * @author Chau Thu Tran
- * @version $Id ProgramAttributeValueService.java 2010-10-30 19:57:20Z $
- */
-public interface ProgramAttributeValueService
-{
-    String ID = ProgramAttributeValueService.class.getName();
-
-    void saveProgramAttributeValue( ProgramAttributeValue programAttributeValue );
-
-    void updateProgramAttributeValue( ProgramAttributeValue programAttributeValue );
-
-    void deleteProgramAttributeValue( ProgramAttributeValue programAttributeValue );
-    
-    void deleteProgramAttributeValues( ProgramAttribute programAttribute );
-    
-    void deleteProgramAttributeValues( ProgramInstance programInstance );
-    
-    ProgramAttributeValue getProgramAttributeValue( ProgramInstance programInstance, ProgramAttribute programAttribute );
-
-    Collection<ProgramAttributeValue> getAllProgramAttributeValues();
-    
-    
-    Collection<ProgramAttributeValue> getProgramAttributeValues( ProgramInstance progranInstance );
-
-    Collection<ProgramAttributeValue> getProgramAttributeValues( ProgramAttribute programAttribute );
-    
-    Collection<ProgramAttributeValue> searchProgramAttributeValues( ProgramAttribute programAttribute, String searchText );
-    
-
-    int countByProgramAttributeOption( ProgramAttributeOption attributeOption ); 
-    
-    
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueStore.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueStore.java	1970-01-01 00:00:00 +0000
@@ -1,60 +0,0 @@
-/*
- * 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.programattributevalue;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericStore;
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramInstance;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version ProgramAttributeValueStore.java Oct 30, 2010 11:06:16 PM
- */
-public interface ProgramAttributeValueStore
-    extends GenericStore<ProgramAttributeValue>
-{
-    void saveVoid( ProgramAttributeValue programAttributeValue );
-
-    int delete( ProgramAttribute programAttribute );
-    
-    int delete( ProgramInstance programInstance );
-    
-    ProgramAttributeValue get( ProgramInstance programInstance, ProgramAttribute programAttribute );
-    
-    Collection<ProgramAttributeValue> get( ProgramInstance progranInstance );
-
-    Collection<ProgramAttributeValue> get( ProgramAttribute programAttribute );
-    
-    Collection<ProgramAttributeValue> search( ProgramAttribute programAttribute, String searchText );   
-    
-    int countByProgramAttributeoption( ProgramAttributeOption attributeOption );
-}

=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/ProgramAttributePopulator.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/ProgramAttributePopulator.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/ProgramAttributePopulator.java	1970-01-01 00:00:00 +0000
@@ -1,87 +0,0 @@
-/*
- * 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.patient.startup;
-
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeService;
-import org.hisp.dhis.system.startup.AbstractStartupRoutine;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version ProgramAttributePopulator.java Nov 9, 2010 12:22:29 PM
- */
-public class ProgramAttributePopulator
-    extends AbstractStartupRoutine
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeService programAttributeService;
-
-    public void setProgramAttributeService( ProgramAttributeService programAttributeService )
-    {
-        this.programAttributeService = programAttributeService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Execute
-    // -------------------------------------------------------------------------
-
-    @Transactional
-    public void execute()
-        throws Exception
-    {
-        ProgramAttribute attribute = programAttributeService.getProgramAttributeByName( ProgramAttribute.DEAD_NAME );
-
-        if ( attribute == null )
-        {
-            attribute = new ProgramAttribute();
-            attribute.setName( ProgramAttribute.DEAD_NAME );
-            attribute.setDescription( "Date when patient unenrolls the program" );
-            attribute.setValueType( ProgramAttribute.TYPE_BOOL );
-
-            programAttributeService.saveProgramAttribute( attribute );
-        }
-
-        attribute = programAttributeService.getProgramAttributeByName( ProgramAttribute.CLOSED_DATE );
-
-        if ( attribute == null )
-        {
-            attribute = new ProgramAttribute();
-            attribute.setName( ProgramAttribute.CLOSED_DATE );
-            attribute.setDescription( "Date when patient unenrolls the program" );
-            attribute.setValueType( ProgramAttribute.TYPE_DATE );
-
-            programAttributeService.saveProgramAttribute( attribute );
-        }
-    }
-
-}

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2012-05-23 19:48:53 +0000
@@ -88,6 +88,10 @@
         executeSql( "ALTER TABLE program DROP COLUMN singleevent" );
         executeSql( "ALTER TABLE program DROP COLUMN anonymous" ); 
         executeSql( "UPDATE program SET type=1 where type is null" );
+        executeSql( "DROP TABLE programattributevalue" );
+        executeSql( "DROP TABLE programinstance_attributes");
+        executeSql( "DROP TABLE programattributeoption" );
+        executeSql( "DROP TABLE programattribute" );
     }
 
     // -------------------------------------------------------------------------

=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeOptionService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeOptionService.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeOptionService.java	1970-01-01 00:00:00 +0000
@@ -1,87 +0,0 @@
-/*
- * 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.program;
-
-import java.util.Collection;
-
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * @author Chau Thu Tran
- * @version DefaultProgramAttributeOptionService.java Nov 1, 2010 3:04:33 PM
- */
-
-@Transactional
-public class DefaultProgramAttributeOptionService
-    implements ProgramAttributeOptionService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeOptionStore programAttributeOptionStore;
-
-    public void setProgramAttributeOptionStore( ProgramAttributeOptionStore programAttributeOptionStore )
-    {
-        this.programAttributeOptionStore = programAttributeOptionStore;
-    }
-
-    // -------------------------------------------------------------------------
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    public int addProgramAttributeOption( ProgramAttributeOption option )
-    {
-        return programAttributeOptionStore.save( option );
-    }
-
-    public void deleteProgramAttributeOption( ProgramAttributeOption option )
-    {
-        programAttributeOptionStore.delete( option );
-    }
-
-    public void updateProgramAttributeOption( ProgramAttributeOption option )
-    {
-        programAttributeOptionStore.update( option );
-    }
-
-    public ProgramAttributeOption get( ProgramAttribute programAttribute, String name )
-    {
-        return programAttributeOptionStore.get( programAttribute, name );
-    }
-
-    public ProgramAttributeOption get( int id )
-    {
-        return programAttributeOptionStore.get( id );
-    }
-
-    public Collection<ProgramAttributeOption> get( ProgramAttribute programAttribute )
-    {
-        return programAttributeOptionStore.get( programAttribute );
-    }
-}

=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeService.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeService.java	1970-01-01 00:00:00 +0000
@@ -1,93 +0,0 @@
-/*
- * 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.program;
-
-import java.util.Collection;
-
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version DefaultProgramAttributeService.java Oct 30, 2010 11:18:15 PM
- */
-
-@Transactional
-public class DefaultProgramAttributeService
-    implements ProgramAttributeService
-{
-    // -------------------------------------------------------------------------
-    // Dependency
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeStore programAttributeStore;
-
-    public void setProgramAttributeStore( ProgramAttributeStore programAttributeStore )
-    {
-        this.programAttributeStore = programAttributeStore;
-    }
-
-    // -------------------------------------------------------------------------
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    public int saveProgramAttribute( ProgramAttribute programAttribute )
-    {
-        return programAttributeStore.save( programAttribute );
-    }
-
-    public void deleteProgramAttribute( ProgramAttribute programAttribute )
-    {
-        programAttributeStore.delete( programAttribute );
-    }
-
-    public void updateProgramAttribute( ProgramAttribute programAttribute )
-    {
-        programAttributeStore.update( programAttribute );
-    }
-
-    public ProgramAttribute getProgramAttribute( int id )
-    {
-        return programAttributeStore.get( id );
-    }
-
-    public ProgramAttribute getProgramAttributeByName( String name )
-    {
-        return programAttributeStore.getByName( name );
-    }
-
-    public Collection<ProgramAttribute> getAllProgramAttributes()
-    {
-        return programAttributeStore.getAll();
-    }
-
-    public Collection<ProgramAttribute> getProgramAttributeByValueType( String valueType )
-    {
-        return programAttributeStore.getByValueType( valueType );
-    }    
-}

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java	2012-05-23 19:48:53 +0000
@@ -34,8 +34,6 @@
 import org.hisp.dhis.patient.Patient;
 import org.hisp.dhis.patientdatavalue.PatientDataValue;
 import org.hisp.dhis.patientdatavalue.PatientDataValueService;
-import org.hisp.dhis.programattributevalue.ProgramAttributeValue;
-import org.hisp.dhis.programattributevalue.ProgramAttributeValueService;
 import org.hisp.dhis.system.deletion.DeletionHandler;
 
 /**
@@ -70,13 +68,6 @@
         this.programStageDEService = programStageDEService;
     }
 
-    private ProgramAttributeValueService programAttributeValueService;
-
-    public void setProgramAttributeValueService( ProgramAttributeValueService programAttributeValueService )
-    {
-        this.programAttributeValueService = programAttributeValueService;
-    }
-
     private ProgramStageInstanceService programStageInstanceService;
 
     public void setProgramStageInstanceService( ProgramStageInstanceService programStageInstanceService )
@@ -122,21 +113,6 @@
             }
 
             // ---------------------------------------------------------------------
-            // Delete Program attribute values
-            // ---------------------------------------------------------------------
-
-            for ( ProgramInstance programInstance : programInstances )
-            {
-                Collection<ProgramAttributeValue> attributeValues = programAttributeValueService
-                    .getProgramAttributeValues( programInstance );
-
-                for ( ProgramAttributeValue attributeValue : attributeValues )
-                {
-                    programAttributeValueService.deleteProgramAttributeValue( attributeValue );
-                }
-            }
-
-            // ---------------------------------------------------------------------
             // Delete Program Stage Instances
             // ---------------------------------------------------------------------
 
@@ -190,22 +166,6 @@
         }
 
         // ---------------------------------------------------------------------
-        // Delete Program attribute values
-        // ---------------------------------------------------------------------
-
-        for ( ProgramInstance programInstance : programInstances )
-        {
-            Collection<ProgramAttributeValue> attributeValues = programAttributeValueService
-                .getProgramAttributeValues( programInstance );
-
-            for ( ProgramAttributeValue attributeValue : attributeValues )
-            {
-                programAttributeValueService.deleteProgramAttributeValue( attributeValue );
-            }
-
-        }
-
-        // ---------------------------------------------------------------------
         // Delete Program Instances
         // ---------------------------------------------------------------------
 

=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramAttributeOptionStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramAttributeOptionStore.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramAttributeOptionStore.java	1970-01-01 00:00:00 +0000
@@ -1,58 +0,0 @@
-/*
- * 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.program.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramAttributeOptionStore;
-
-/**
- * @author Chau Thu Tran
- * @version HibernateProgramAttributeOptionStore.java Nov 1, 2010 3:07:17 PM
- */
-public class HibernateProgramAttributeOptionStore
-    extends HibernateGenericStore<ProgramAttributeOption>
-    implements ProgramAttributeOptionStore
-{
-    public ProgramAttributeOption get( ProgramAttribute programAttribute, String name )
-    {
-        return (ProgramAttributeOption) getCriteria( Restrictions.eq( "name", name ),
-            Restrictions.eq( "programAttribute", programAttribute ) ).uniqueResult();
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public Collection<ProgramAttributeOption> get( ProgramAttribute programAttribute )
-    {
-        return getCriteria( Restrictions.eq( "programAttribute", programAttribute ) ).list();
-    }
-
-}

=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramAttributeStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramAttributeStore.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramAttributeStore.java	1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
-/*
- * 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.program.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeStore;
-
-/**
- * @author Chau Thu Tran
- * @version HibernateProgramAttributeStore.java Oct 30, 2010 11:41:58 PM
- */
-public class HibernateProgramAttributeStore
-    extends HibernateGenericStore<ProgramAttribute>
-    implements ProgramAttributeStore
-{
-    @SuppressWarnings( "unchecked" )
-    public Collection<ProgramAttribute> getByValueType( String valueType )
-    {
-        return getCriteria( Restrictions.eq( "valueType", valueType ) ).list();
-    }
-}

=== removed directory 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue'
=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/DefaultProgramAttributeValueService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/DefaultProgramAttributeValueService.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/DefaultProgramAttributeValueService.java	1970-01-01 00:00:00 +0000
@@ -1,121 +0,0 @@
-/*
- * 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.programattributevalue;
-
-import java.util.Collection;
-
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramInstance;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * @author Chau Thu Tran
- * @version DefaultProgramAttributeValue.java Oct 31, 2010 6:09:03 PM
- */
-
-@Transactional
-public class DefaultProgramAttributeValueService
-    implements ProgramAttributeValueService
-{
-    // -------------------------------------------------------------------------
-    // Dependency
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeValueStore programAttributeValueStore;
-
-    public void setProgramAttributeValueStore( ProgramAttributeValueStore programAttributeValueStore )
-    {
-        this.programAttributeValueStore = programAttributeValueStore;
-    }
-
-    // -------------------------------------------------------------------------
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    public void saveProgramAttributeValue( ProgramAttributeValue programAttributeValue )
-    {
-        if ( programAttributeValue.getValue() != null )
-        {
-            programAttributeValueStore.saveVoid( programAttributeValue );
-        }
-    }
-
-    public void updateProgramAttributeValue( ProgramAttributeValue programAttributeValue )
-    {
-        programAttributeValueStore.update( programAttributeValue );
-    }
-
-    public void deleteProgramAttributeValue( ProgramAttributeValue programAttributeValue )
-    {
-        programAttributeValueStore.delete( programAttributeValue );
-    }
-
-    public void deleteProgramAttributeValues( ProgramAttribute programAttribute )
-    {
-        programAttributeValueStore.delete( programAttribute );
-    }
-
-    public void deleteProgramAttributeValues( ProgramInstance programInstance )
-    {
-        programAttributeValueStore.delete( programInstance );
-    }
-
-    public ProgramAttributeValue getProgramAttributeValue( ProgramInstance programInstance,
-        ProgramAttribute programAttribute )
-    {
-        return programAttributeValueStore.get( programInstance, programAttribute );
-    }
-
-    public Collection<ProgramAttributeValue> getAllProgramAttributeValues()
-    {
-        return programAttributeValueStore.getAll();
-    }
-
-    public Collection<ProgramAttributeValue> getProgramAttributeValues( ProgramInstance progranInstance )
-    {
-        return programAttributeValueStore.get( progranInstance );
-    }
-
-    public Collection<ProgramAttributeValue> getProgramAttributeValues( ProgramAttribute programAttribute )
-    {
-        return programAttributeValueStore.get( programAttribute );
-    }
-
-    public Collection<ProgramAttributeValue> searchProgramAttributeValues( ProgramAttribute programAttribute,
-        String searchText )
-    {
-        return programAttributeValueStore.search( programAttribute, searchText );
-    }
-
-    @Override
-    public int countByProgramAttributeOption( ProgramAttributeOption attributeOption )
-    {
-        return programAttributeValueStore.countByProgramAttributeoption( attributeOption );
-    }
-}

=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueDeletionHandler.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/ProgramAttributeValueDeletionHandler.java	1970-01-01 00:00:00 +0000
@@ -1,98 +0,0 @@
-/*
- * 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.programattributevalue;
-
-import java.util.Collection;
-
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramInstance;
-import org.hisp.dhis.program.ProgramInstanceService;
-import org.hisp.dhis.system.deletion.DeletionHandler;
-
-/**
- * @author Chau Thu Tran
- * @version $Id ProgramAttributeValueDeletionHandler.java 2010-11-30 14:06:12Z $
- */
-
-public class ProgramAttributeValueDeletionHandler
-    extends DeletionHandler
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeValueService programAttributeValueService;
-
-    public void setProgramAttributeValueService( ProgramAttributeValueService programAttributeValueService )
-    {
-        this.programAttributeValueService = programAttributeValueService;
-    }
-
-    private ProgramInstanceService programInstanceService;
-
-    public void setProgramInstanceService( ProgramInstanceService programInstanceService )
-    {
-        this.programInstanceService = programInstanceService;
-    }
-
-    // -------------------------------------------------------------------------
-    // DeletionHandler implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String getClassName()
-    {
-        return ProgramAttributeValue.class.getSimpleName();
-    }
-
-    @Override
-    public void deleteProgram( Program program )
-    {
-        Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( program );
-
-        for ( ProgramInstance programInstance : programInstances )
-        {
-            programAttributeValueService.deleteProgramAttributeValues( programInstance );
-        }
-    }
-
-    public void deleteProgramAttribute( ProgramAttribute programAttribute )
-    {
-        Collection<ProgramAttributeValue> attributeValues = programAttributeValueService
-            .getProgramAttributeValues( programAttribute );
-
-        if ( attributeValues != null && attributeValues.size() > 0 )
-        {
-            for ( ProgramAttributeValue attributeValue : attributeValues )
-            {
-                programAttributeValueService.deleteProgramAttributeValue( attributeValue );
-            }
-        }
-    }
-}

=== removed directory 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/hibernate/HibernateProgramAttributeValueStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/hibernate/HibernateProgramAttributeValueStore.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/hibernate/HibernateProgramAttributeValueStore.java	1970-01-01 00:00:00 +0000
@@ -1,104 +0,0 @@
-/*
- * 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.programattributevalue.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.Query;
-import org.hibernate.criterion.Projections;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramInstance;
-import org.hisp.dhis.programattributevalue.ProgramAttributeValue;
-import org.hisp.dhis.programattributevalue.ProgramAttributeValueStore;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version HibernateProgramAttributeValueStore.java Oct 31, 2010 11:20:19 PM
- */
-public class HibernateProgramAttributeValueStore
-    extends HibernateGenericStore<ProgramAttributeValue>
-    implements ProgramAttributeValueStore
-{
-    public void saveVoid( ProgramAttributeValue programAttributeValue )
-    {
-        sessionFactory.getCurrentSession().save( programAttributeValue );
-    }
-
-    public int delete( ProgramAttribute programAttribute )
-    {
-        Query query = getQuery( "delete from ProgramAttributeValue where programAttribute = :programAttribute" );
-        query.setEntity( "programAttribute", programAttribute );
-
-        return query.executeUpdate();
-    }
-
-    public int delete( ProgramInstance programInstance )
-    {
-        Query query = getQuery( "delete from ProgramAttributeValue where programInstance = :programInstance" );
-        query.setEntity( "programInstance", programInstance );
-
-        return query.executeUpdate();
-    }
-
-    public ProgramAttributeValue get( ProgramInstance programInstance, ProgramAttribute programAttribute )
-    {
-        return (ProgramAttributeValue) getCriteria( Restrictions.eq( "programInstance", programInstance ),
-            Restrictions.eq( "programAttribute", programAttribute ) ).uniqueResult();
-    }
-
-    @SuppressWarnings("unchecked")
-    public Collection<ProgramAttributeValue> get( ProgramInstance programInstance )
-    {
-        return getCriteria( Restrictions.eq( "programInstance", programInstance ) ).list();
-    }
-
-    @SuppressWarnings("unchecked")
-    public Collection<ProgramAttributeValue> get( ProgramAttribute programAttribute )
-    {
-        return getCriteria( Restrictions.eq( "programAttribute", programAttribute ) ).list();
-    }
-
-    @SuppressWarnings("unchecked")
-    public Collection<ProgramAttributeValue> search( ProgramAttribute programAttribute, String searchText )
-    {
-        return getCriteria( Restrictions.eq( "programAttribute", programAttribute ),
-            Restrictions.ilike( "value", "%" + searchText + "%" ) ).list();
-    }
-
-    @Override
-    public int countByProgramAttributeoption( ProgramAttributeOption attributeOption )
-    {
-        Number rs = (Number) getCriteria( Restrictions.eq( "programAttributeOption", attributeOption ) ).setProjection(
-            Projections.rowCount() ).uniqueResult();
-        return rs != null ? rs.intValue() : 0;
-    }
-}

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml	2012-05-15 02:36:43 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml	2012-05-23 19:48:53 +0000
@@ -119,29 +119,11 @@
      <property name="sessionFactory" ref="sessionFactory"/>
    </bean>
    
-   <bean id="org.hisp.dhis.program.ProgramAttributeStore"
-		class="org.hisp.dhis.program.hibernate.HibernateProgramAttributeStore">
-		<property name="clazz" value="org.hisp.dhis.program.ProgramAttribute" />
-		<property name="sessionFactory" ref="sessionFactory" />
-	</bean>
-
-	<bean id="org.hisp.dhis.programattributevalue.ProgramAttributeValueStore"
-		class="org.hisp.dhis.programattributevalue.hibernate.HibernateProgramAttributeValueStore">
-		<property name="clazz" value="org.hisp.dhis.programattributevalue.ProgramAttributeValue" />
-		<property name="sessionFactory" ref="sessionFactory" />
-	</bean>
-
-  	<bean id="org.hisp.dhis.program.ProgramAttributeOptionStore"
-    class="org.hisp.dhis.program.hibernate.HibernateProgramAttributeOptionStore">
-     <property name="clazz" value="org.hisp.dhis.program.ProgramAttributeOption"/>
-     <property name="sessionFactory" ref="sessionFactory"/>
-   </bean>
-   
-	<bean id="org.hisp.dhis.patientreport.PatientTabularReportStore"
+   <bean id="org.hisp.dhis.patientreport.PatientTabularReportStore"
     	class="org.hisp.dhis.patientreport.hibernate.HibernatePatientTabularReportStore">
       	<property name="clazz" value="org.hisp.dhis.patientreport.PatientTabularReport" />
     	<property name="sessionFactory" ref="sessionFactory" />
-    </bean>
+   </bean>
    
 	<!-- Service definitions -->
 	
@@ -302,23 +284,6 @@
 	  		ref="org.hisp.dhis.program.ProgramStageDataElementStore" />
   	</bean>
   
-  	<bean id="org.hisp.dhis.program.ProgramAttributeService" class="org.hisp.dhis.program.DefaultProgramAttributeService">
-		<property name="programAttributeStore" ref="org.hisp.dhis.program.ProgramAttributeStore" />
-	</bean>
-
-	<bean
-		id="org.hisp.dhis.programattributevalue.ProgramAttributeValueService"
-		class="org.hisp.dhis.programattributevalue.DefaultProgramAttributeValueService">
-		<property name="programAttributeValueStore"
-			ref="org.hisp.dhis.programattributevalue.ProgramAttributeValueStore" />
-	</bean>
-  
-    <bean id="org.hisp.dhis.program.ProgramAttributeOptionService"
-    	class="org.hisp.dhis.program.DefaultProgramAttributeOptionService">
-     	<property name="programAttributeOptionStore"
-      		ref="org.hisp.dhis.program.ProgramAttributeOptionStore"/>
-    </bean>
-	
    <bean id="org.hisp.dhis.patientreport.PatientTabularReportService"
     	class="org.hisp.dhis.patientreport.DefaultPatientTabularReportService">
     	<property name="tabularReportStore" ref="org.hisp.dhis.patientreport.PatientTabularReportStore" />
@@ -345,7 +310,6 @@
 		class="org.hisp.dhis.program.ProgramInstanceDeletionHandler">
 		<property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService"/>
 		<property name="patientDataValueService" ref="org.hisp.dhis.patientdatavalue.PatientDataValueService"/>
-		<property name="programAttributeValueService" ref="org.hisp.dhis.programattributevalue.ProgramAttributeValueService"/>
 		<property name="programStageInstanceService" ref="org.hisp.dhis.program.ProgramStageInstanceService"/>
 	</bean>
 	
@@ -365,12 +329,6 @@
 		<property name="programService" ref="org.hisp.dhis.program.ProgramService"/>
 	</bean>
 	
-	<bean id="org.hisp.dhis.programattributevalue.ProgramAttributeValueDeletionHandler" 
-		class="org.hisp.dhis.programattributevalue.ProgramAttributeValueDeletionHandler">
-		<property name="programAttributeValueService" ref="org.hisp.dhis.programattributevalue.ProgramAttributeValueService"/>
-		<property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService"/>
-	</bean>
-	
 	<bean id="org.hisp.dhis.patient.PatientDeletionHandler" 
 		class="org.hisp.dhis.patient.PatientDeletionHandler">
 		<property name="patientService" ref="org.hisp.dhis.patient.PatientService"/>
@@ -412,12 +370,6 @@
 		<property name="skipInTests" value="true" />
 	</bean>
 	
-	<bean id="org.hisp.dhis.patient.startup.ProgramAttributePopulator" class="org.hisp.dhis.patient.startup.ProgramAttributePopulator">
-		<property name="programAttributeService" ref="org.hisp.dhis.program.ProgramAttributeService" />
-		<property name="name" value="ProgramAttributePopulator" />
-		<property name="runlevel" value="5" />
-	</bean>
-	
 	<bean
 		class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
 		<property name="targetObject"
@@ -426,7 +378,6 @@
 		<property name="arguments">
 			<list>
 				<list>
-					<ref local="org.hisp.dhis.patient.startup.ProgramAttributePopulator" />
 					<ref local="org.hisp.dhis.patient.startup.TableAlteror" />
 				</list>
 			</list>
@@ -451,7 +402,6 @@
 			  <ref local="org.hisp.dhis.program.ProgramInstanceDeletionHandler"/>
 			  <ref local="org.hisp.dhis.program.ProgramStageInstanceDeletionHandler"/>
 			  <ref local="org.hisp.dhis.program.ProgramStageDataElementDeletionHandler"/>
-			  <ref local="org.hisp.dhis.programattributevalue.ProgramAttributeValueDeletionHandler"/>
 			  <ref local="org.hisp.dhis.program.ProgramValidationDeletionHandler"/>
 			  <ref local="org.hisp.dhis.program.ProgramDataEntryFormDeletionHandler"/>
 			  
@@ -495,10 +445,7 @@
 		  <aop:before 
 		      pointcut="execution( * org.hisp.dhis.program.ProgramInstanceService.delete*(..) )" 
 		      method="intercept"/>
-		  <aop:before 
-		      pointcut="execution( * org.hisp.dhis.programattributevalue.ProgramAttributeValueService.delete*(..) )" 
-		      method="intercept"/>
-		  <aop:before 
+		 <aop:before 
 		      pointcut="execution( * org.hisp.dhis.program.ProgramStageService.delete*(..) )" 
 		      method="intercept"/>
 	      <aop:before 

=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttribute.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttribute.hbm.xml	2012-02-27 01:07:19 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttribute.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,27 +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";
-  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
->
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.program.ProgramAttribute" table="programattribute">
-
-    <id name="id" column="programattributeid">
-      <generator class="native" />
-    </id>
-
-	&identifiableProperties;
-
-    <property name="description" />
-
-    <property name="valueType" not-null="true" />
-
-    <set name="attributeOptions" cascade="all" >
-      <key column="programattributeid" />
-      <one-to-many class="org.hisp.dhis.program.ProgramAttributeOption" />
-    </set>
-
-  </class>
-</hibernate-mapping>

=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttributeOption.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttributeOption.hbm.xml	2011-05-28 21:25:46 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttributeOption.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.program.ProgramAttributeOption" table="programattributeoption">
-
-    <id name="id" column="programattributeoptionid">
-      <generator class="native" />
-    </id>
-
-    <property name="name" not-null="true" length="160" />
-
-    <many-to-one name="programAttribute" column="programattributeid" class="org.hisp.dhis.program.ProgramAttribute"
-      foreign-key="fk_programattributeoption_programattributeid" lazy="false" />
-
-  </class>
-</hibernate-mapping>

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml	2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml	2012-05-23 19:48:53 +0000
@@ -29,10 +29,5 @@
       <one-to-many class="org.hisp.dhis.program.ProgramStageInstance" />
     </set>
 
-    <set name="attributes" table="programinstance_attributes">
-      <key column="programinstanceid" foreign-key="fk_programinstance_attributes_programinstanceid" />
-      <many-to-many class="org.hisp.dhis.program.ProgramAttribute" column="programattributeid" foreign-key="fk_program_programattributeid" />
-    </set>
-
   </class>
 </hibernate-mapping>

=== removed directory 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue'
=== removed directory 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate/ProgramAttributeValue.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate/ProgramAttributeValue.hbm.xml	2011-05-28 21:25:46 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate/ProgramAttributeValue.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.programattributevalue.ProgramAttributeValue" table="programattributevalue">
-
-    <composite-id>
-      <key-many-to-one name="programAttribute" class="org.hisp.dhis.program.ProgramAttribute" column="programattributeid"
-        foreign-key="fk_programattributevalue_programattributeid" />
-      <key-many-to-one name="programInstance" class="org.hisp.dhis.program.ProgramInstance" column="programinstanceid"
-        foreign-key="fk_programattributevalue_programinstanceid" />
-    </composite-id>
-
-    <property name="value" />
-
-    <many-to-one name="programAttributeOption" class="org.hisp.dhis.program.ProgramAttributeOption" column="programattributeoptionid"
-      foreign-key="fk_programAttributeValue_programAttributeOption" />
-
-  </class>
-</hibernate-mapping>

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java	2012-04-26 14:30:09 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionHandler.java	2012-05-23 19:48:53 +0000
@@ -76,7 +76,6 @@
 import org.hisp.dhis.program.ProgramStageDataElement;
 import org.hisp.dhis.program.ProgramStageInstance;
 import org.hisp.dhis.program.ProgramValidation;
-import org.hisp.dhis.programattributevalue.ProgramAttributeValue;
 import org.hisp.dhis.relationship.Relationship;
 import org.hisp.dhis.relationship.RelationshipType;
 import org.hisp.dhis.report.Report;
@@ -629,15 +628,6 @@
     {
     }
 
-    public String allowDeleteProgramAttributeValue( ProgramAttributeValue programAttributeValue )
-    {
-        return null;
-    }
-
-    public void deleteProgramAttributeValue( ProgramAttributeValue programAttributeValue )
-    {
-    }
-
     public String allowDeleteConstant( Constant constant )
     {
         return null;

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentAction.java	2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ProgramEnrollmentAction.java	2012-05-23 19:48:53 +0000
@@ -49,8 +49,6 @@
 import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
 import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
 import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeService;
 import org.hisp.dhis.program.ProgramInstance;
 import org.hisp.dhis.program.ProgramInstanceService;
 import org.hisp.dhis.program.ProgramService;
@@ -85,8 +83,6 @@
 
     private PatientAttributeValueService patientAttributeValueService;
 
-    private ProgramAttributeService programAttributeService;
-
     private SelectedStateManager selectedStateManager;
 
     // -------------------------------------------------------------------------
@@ -115,8 +111,6 @@
 
     private Map<Integer, String> patientAttributeValueMap = new HashMap<Integer, String>();
 
-    private Collection<ProgramAttribute> programAttributes;
-
     private Boolean hasDataEntry;
 
     // -------------------------------------------------------------------------
@@ -133,16 +127,6 @@
         this.patientService = patientService;
     }
 
-    public Collection<ProgramAttribute> getProgramAttributes()
-    {
-        return programAttributes;
-    }
-
-    public void setProgramAttributeService( ProgramAttributeService programAttributeService )
-    {
-        this.programAttributeService = programAttributeService;
-    }
-
     public Collection<PatientAttribute> getNoGroupAttributes()
     {
         return noGroupAttributes;
@@ -267,12 +251,6 @@
             loadIdentifierTypes();
 
             loadPatientAttributes();
-
-            // -----------------------------------------------------------------
-            // Load patient-attributes of the selected program
-            // -----------------------------------------------------------------
-
-            programAttributes = programAttributeService.getAllProgramAttributes();
         }
 
         hasDataEntry = showDataEntry( orgunit, program, programInstance );

=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/RemoveEnrollmentAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/RemoveEnrollmentAction.java	2012-03-28 07:10:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/RemoveEnrollmentAction.java	1970-01-01 00:00:00 +0000
@@ -1,279 +0,0 @@
-/*
- * Copyright (c) 2004-2009, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.hisp.dhis.caseentry.action.patient;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.math.NumberUtils;
-import org.apache.struts2.ServletActionContext;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.patient.Patient;
-import org.hisp.dhis.patient.PatientService;
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramAttributeOptionService;
-import org.hisp.dhis.program.ProgramAttributeService;
-import org.hisp.dhis.program.ProgramInstance;
-import org.hisp.dhis.program.ProgramInstanceService;
-import org.hisp.dhis.programattributevalue.ProgramAttributeValue;
-import org.hisp.dhis.programattributevalue.ProgramAttributeValueService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Abyot Asalefew Gizaw
- * @version $Id$
- */
-public class RemoveEnrollmentAction
-    implements Action
-{
-    public static final String PREFIX_ATTRIBUTE = "attr";
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private PatientService patientService;
-
-    private ProgramInstanceService programInstanceService;
-
-    private ProgramAttributeService programAttributeService;
-
-    private ProgramAttributeOptionService programAttributeOptionService;
-
-    private ProgramAttributeValueService programAttributeValueService;
-
-    private I18nFormat format;
-
-    // -------------------------------------------------------------------------
-    // Input/Output
-    // -------------------------------------------------------------------------
-
-    private Integer programInstanceId;
-
-    private Collection<Program> programs = new ArrayList<Program>();
-
-    // -------------------------------------------------------------------------
-    // Getters && Setters
-    // -------------------------------------------------------------------------
-
-    public void setPatientService( PatientService patientService )
-    {
-        this.patientService = patientService;
-    }
-
-    public void setProgramInstanceService( ProgramInstanceService programInstanceService )
-    {
-        this.programInstanceService = programInstanceService;
-    }
-
-    public void setProgramAttributeService( ProgramAttributeService programAttributeService )
-    {
-        this.programAttributeService = programAttributeService;
-    }
-
-    public void setProgramAttributeOptionService( ProgramAttributeOptionService programAttributeOptionService )
-    {
-        this.programAttributeOptionService = programAttributeOptionService;
-    }
-
-    public void setProgramAttributeValueService( ProgramAttributeValueService programAttributeValueService )
-    {
-        this.programAttributeValueService = programAttributeValueService;
-    }
-
-    public void setFormat( I18nFormat format )
-    {
-        this.format = format;
-    }
-
-    public Collection<Program> getPrograms()
-    {
-        return programs;
-    }
-
-    public void setProgramInstanceId( Integer programInstanceId )
-    {
-        this.programInstanceId = programInstanceId;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        ProgramInstance programInstance = programInstanceService.getProgramInstance( programInstanceId );
-
-        Patient patient = programInstance.getPatient();
-
-        Program program = programInstance.getProgram();
-
-        // ---------------------------------------------------------------------
-        // Save Program Attributes
-        // ---------------------------------------------------------------------
-
-        HttpServletRequest request = ServletActionContext.getRequest();
-
-        Collection<ProgramAttribute> attributes = programAttributeService.getAllProgramAttributes();
-
-        Set<ProgramAttribute> programAttributes = new HashSet<ProgramAttribute>();
-
-        // ---------------------------------------------------------------------
-        // End-user inputs attribute value for DEAD-attribute
-        // ---------------------------------------------------------------------
-
-        boolean flag = false;
-        Date closedDate = new Date();
-
-        if ( attributes != null && attributes.size() > 0 )
-        {
-            programInstance.getAttributes().clear();
-
-            // -----------------------------------------------------------------
-            // Save other attributes
-            // -----------------------------------------------------------------
-
-            for ( ProgramAttribute attribute : attributes )
-            {
-                String value = request.getParameter( RemoveEnrollmentAction.PREFIX_ATTRIBUTE + attribute.getId() );
-
-                if ( StringUtils.isNotBlank( value ) )
-                {
-                    programAttributes.add( attribute );
-
-                    ProgramAttributeValue attributeValue = programAttributeValueService.getProgramAttributeValue(
-                        programInstance, attribute );
-
-                    if ( attributeValue == null )
-                    {
-                        attributeValue = new ProgramAttributeValue();
-                        attributeValue.setProgramInstance( programInstance );
-                        attributeValue.setProgramAttribute( attribute );
-
-                        // CLOSED-DATE program-attribute
-                        if ( attribute.getName().equalsIgnoreCase( ProgramAttribute.CLOSED_DATE )
-                            && attribute.getValueType().equalsIgnoreCase( ProgramAttribute.TYPE_DATE ) && flag )
-                        {
-                            attributeValue.setValue( value.trim() );
-
-                            closedDate = format.parseDate( value.trim() );
-                            patient.setDeathDate( closedDate );
-                            flag = true;
-                        }
-                        // IS-DEAD program-attribute
-                        else if ( attribute.getName().equalsIgnoreCase( ProgramAttribute.DEAD_NAME ) )
-                        {
-                            attributeValue.setValue( value.trim() );
-
-                            patient.setIsDead( Boolean.parseBoolean( value.trim() ) );
-                            flag = true;
-                        }
-                        else if ( ProgramAttribute.TYPE_COMBO.equalsIgnoreCase( attribute.getValueType() ) )
-                        {
-                            ProgramAttributeOption option = programAttributeOptionService.get( NumberUtils.toInt(
-                                value, 0 ) );
-                            if ( option != null )
-                            {
-                                attributeValue.setProgramAttributeOption( option );
-                                attributeValue.setValue( option.getName() );
-                            }
-                        }
-                        else
-                        {
-                            attributeValue.setValue( value.trim() );
-                        }
-
-                        programAttributeValueService.saveProgramAttributeValue( attributeValue );
-                    }
-                    else
-                    {
-                        if ( ProgramAttribute.TYPE_COMBO.equalsIgnoreCase( attribute.getValueType() ) )
-                        {
-                            ProgramAttributeOption option = programAttributeOptionService.get( NumberUtils.toInt(
-                                value, 0 ) );
-                            if ( option != null )
-                            {
-                                attributeValue.setProgramAttributeOption( option );
-                                attributeValue.setValue( option.getName() );
-                            }
-                        }
-                        else
-                        {
-                            attributeValue.setValue( value.trim() );
-                        }
-                    }
-
-                    programAttributeValueService.updateProgramAttributeValue( attributeValue );
-                }
-            }
-        }
-
-        // ---------------------------------------------------------------------
-        // Update Information of programInstance
-        // ---------------------------------------------------------------------
-
-        programInstance.setEndDate( closedDate );
-        programInstance.setCompleted( true );
-//        programInstanceService.updateProgramInstance( programInstance );
-        programInstance.setAttributes( programAttributes );
-        programInstanceService.updateProgramInstance( programInstance );
-        
-        patient.getPrograms().remove( program );
-        
-        // ---------------------------------------------------------------------
-        // Set Completed status all program-instaces of Death case
-        // ---------------------------------------------------------------------
-
-        if ( flag )
-        {
-            Collection<ProgramInstance> programInstancesByPatient = programInstanceService.getProgramInstances(
-                patient, false );
-
-            for ( ProgramInstance _programInstance : programInstancesByPatient )
-            {
-                patient.getPrograms().remove( _programInstance.getProgram() );
-                _programInstance.setEndDate( closedDate );
-                _programInstance.setCompleted( true );
-                programInstanceService.updateProgramInstance( _programInstance );
-            }
-        }
-        
-        patientService.updatePatient( patient );
-
-        return SUCCESS;
-    }
-}

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml	2012-05-09 08:30:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml	2012-05-23 19:48:53 +0000
@@ -604,8 +604,6 @@
 			ref="org.hisp.dhis.patient.PatientAttributeGroupService" />
 		<property name="patientAttributeValueService"
 			ref="org.hisp.dhis.patientattributevalue.PatientAttributeValueService" />
-		<property name="programAttributeService"
-			ref="org.hisp.dhis.program.ProgramAttributeService" />
 		<property name="selectedStateManager"
 			ref="org.hisp.dhis.caseentry.state.SelectedStateManager" />
 	</bean>
@@ -634,19 +632,6 @@
 		<property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
 	</bean>
 
-	<bean id="org.hisp.dhis.caseentry.action.patient.RemoveEnrollmentAction"
-		class="org.hisp.dhis.caseentry.action.patient.RemoveEnrollmentAction"
-		scope="prototype">
-		<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
-		<property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
-		<property name="programAttributeService"
-			ref="org.hisp.dhis.program.ProgramAttributeService" />
-		<property name="programAttributeOptionService"
-			ref="org.hisp.dhis.program.ProgramAttributeOptionService" />
-		<property name="programAttributeValueService"
-			ref="org.hisp.dhis.programattributevalue.ProgramAttributeValueService" />
-	</bean>
-
 	<bean
 		id="org.hisp.dhis.caseentry.action.patient.ValidatePatientProgramEnrollmentAction"
 		class="org.hisp.dhis.caseentry.action.patient.ValidatePatientProgramEnrollmentAction"

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm	2012-03-29 08:04:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm	2012-05-23 19:48:53 +0000
@@ -5,7 +5,6 @@
 		<li><a href="#tab-1">$i18n.getString("identifier_and_attribute")</a></li>
 		<li><a href="#tab-2">$i18n.getString("modify_due_date_or_visit_date")</a></li>
 		<li><a href="#tab-3">$i18n.getString("data_entry_screen")</a></li>
-		<li><a href="#tab-4">$i18n.getString("unenrollment")</a></li>
 	</ul>
 	
 	
@@ -175,53 +174,6 @@
 		<div id='dataRecordingSelectDiv' class='hidden'></div>
 		<div id='dataEntryFormDiv' class='hidden'></div>
 	</div>
-
-	<div id="tab-4">
-		<table>
-			#foreach($attribute in $programAttributes)
-			<tr>
-				<td class='text-column'>$attribute.name</td>
-				<td class="input-column">
-					#if( $attribute.valueType == "YES/NO" )
-						<select id="attr$attribute.id" name="attr$attribute.id" > 
-							<option value="">[$i18n.getString( "please_select" )]</option>
-							<option value="true">$i18n.getString( "yes" )</option>
-							<option value="false">$i18n.getString( "no" )</option>
-						</select>                     
-					#elseif( $attribute.valueType == "DATE" )
-						<input type="text" id="attr$attribute.id" name="attr$attribute.id" class=' #validate( "default"  $attribute.mandatory )'>
-						<script type="text/javascript">
-							var attributeId = 'attr' + '$attribute.id'
-							datePickerValid( attributeId );
-						</script>                       
-					#elseif( $attribute.valueType == "COMBO" )
-						<select id="attr$attribute.id" name="attr$attribute.id" >
-							<option value="">[$i18n.getString( "please_select" )]</option>
-							#foreach ($option in $attribute.attributeOptions )
-								<option value="$option.id" >$option.name</option>
-							#end
-						</select>
-					#else 
-						<input type="text" id="attr$attribute.id" name="attr$attribute.id" >
-					#end
-					
-					#if($!programAttribute.description) <i>($!programAttribute.description)</i> #end
-				</td>		
-			</tr>
-			#end
-			
-			<tr>
-				<td></td>
-				<td></td>                            
-			</tr>
-		
-			<tr>
-				<td>
-					<input type="button" class='button' value='$i18n.getString( "unenroll" )' onclick="javascript:unenrollmentForm( getFieldValue('programInstanceId') );" >
-				</td>                                        
-			</tr>
-		</table>
-	</div>
 	
 </div>	
 
@@ -247,7 +199,7 @@
 		#if( $programInstance )
 		#else
 			$( "#tabs" ).tabs( "option", "selected", 2 );
-			$( "#tabs" ).tabs( "option", "disabled", [0,1,3] );
+			$( "#tabs" ).tabs( "option", "disabled", [0,1] );
 		#end
 		
 		#if( $hasDataEntry == 'true' )

=== removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramAttribute.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramAttribute.vm	2011-09-28 07:11:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramAttribute.vm	1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-{ "programAttribute":
-  {
-    "id": "${programAttribute.id}",
-	"name": "$!encoder.jsonEncode( ${programAttribute.name} )",
-	"description": "$!encoder.jsonEncode( ${programAttribute.description} )",
-	"valueType": "$!encoder.jsonEncode( ${programAttribute.valueType} )"
-  }
-}
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetEnrollmentProgramListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetEnrollmentProgramListAction.java	2012-04-20 02:32:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryenrollment/action/GetEnrollmentProgramListAction.java	2012-05-23 19:48:53 +0000
@@ -152,7 +152,7 @@
         patient = patientService.getPatient( Integer.parseInt( beneficiaryId ) );
         for ( Program program :  programService.getPrograms( patient.getOrganisationUnit() ) )
         {
-            if ( !program.getAnonymous() && !program.getSingleEvent() )
+            if ( program.getType() == Program.MULTIPLE_EVENTS_WITH_REGISTRATION )
             {
                 if ( programInstanceService.getProgramInstances( patient, program ).size() > 0 )
                 {

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java	2012-05-15 07:40:06 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetPatientProgramListAction.java	2012-05-23 19:48:53 +0000
@@ -31,6 +31,7 @@
 import java.util.Set;
 import org.hisp.dhis.patient.Patient;
 import org.hisp.dhis.patient.PatientService;
+import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramInstance;
 import org.hisp.dhis.program.ProgramInstanceService;
 import com.opensymphony.xwork2.Action;
@@ -95,7 +96,7 @@
     }
 
     private Patient patient;
-    
+
     public Patient getPatient()
     {
         return patient;
@@ -114,8 +115,9 @@
         patient = patientService.getPatient( patientId );
         for ( ProgramInstance programInstance : programInstanceService.getProgramInstances( patient ) )
         {
-            if (!programInstance.getProgram().getAnonymous() && !programInstance.getProgram().getSingleEvent()) {
-            programInstances.add( programInstance );
+            if ( programInstance.getProgram().getType() == Program.MULTIPLE_EVENTS_WITH_REGISTRATION )
+            {
+                programInstances.add( programInstance );
             }
         }
 

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventAction.java	2012-05-03 09:53:40 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/GetSingleEventAction.java	2012-05-23 19:48:53 +0000
@@ -105,7 +105,7 @@
 
         for ( Program program : allProgram )
         {
-            if ( program.getSingleEvent() && !program.getAnonymous() )
+            if ( program.getType() == Program.SINGLE_EVENT_WITH_REGISTRATION )
             {
                 singleEventList.add( program );
             }

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAttributeAction.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAttributeAction.java	1970-01-01 00:00:00 +0000
@@ -1,123 +0,0 @@
-/*
- * 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.patient.action.program;
-
-import java.util.List;
-
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramAttributeService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version AddProgramAttributeAction.java Oct 31, 2010 11:48:29 PM
- */
-public class AddProgramAttributeAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependency
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeService programAttributeService;
-
-    public void setProgramAttributeService( ProgramAttributeService programAttributeService )
-    {
-        this.programAttributeService = programAttributeService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/Output
-    // -------------------------------------------------------------------------
-
-    private String name;
-
-    private String description;
-
-    private String valueType;
-
-    private List<String> attrOptions;
-
-    // -------------------------------------------------------------------------
-    // Getters && Setters
-    // -------------------------------------------------------------------------
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    public void setDescription( String description )
-    {
-        this.description = description;
-    }
-
-    public void setValueType( String valueType )
-    {
-        this.valueType = valueType;
-    }
-
-    public void setAttrOptions( List<String> attrOptions )
-    {
-        this.attrOptions = attrOptions;
-    }
-
-    // -------------------------------------------------------------------------
-    // Implementation Action
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        ProgramAttribute programAttribute = new ProgramAttribute();
-
-        programAttribute.setName( name );
-        programAttribute.setDescription( description );
-        programAttribute.setValueType( valueType );
-
-        if ( ProgramAttribute.TYPE_COMBO.equalsIgnoreCase( valueType ) )
-        {
-            ProgramAttributeOption opt  = null;
-            for ( String optionName : attrOptions )
-            {
-                opt = new ProgramAttributeOption();
-                opt.setName( optionName );
-                opt.setProgramAttribute( programAttribute );
-                programAttribute.addAttributeOptions( opt );
-            }
-        }
-
-        programAttributeService.saveProgramAttribute( programAttribute );
-        
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeAction.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeAction.java	1970-01-01 00:00:00 +0000
@@ -1,88 +0,0 @@
-/*
- * 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.patient.action.program;
-
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version AddProgramAttributeAction.java Oct 31, 2010 11:48:29 PM
- */
-public class GetProgramAttributeAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependency
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeService programAttributeService;
-
-    public void setProgramAttributeService( ProgramAttributeService programAttributeService )
-    {
-        this.programAttributeService = programAttributeService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/Output
-    // -------------------------------------------------------------------------
-
-    private Integer id;
-
-    private ProgramAttribute programAttribute;
-
-    // -------------------------------------------------------------------------
-    // Getters && Setters
-    // -------------------------------------------------------------------------
-
-    public void setId( Integer id )
-    {
-        this.id = id;
-    }
-
-    public ProgramAttribute getProgramAttribute()
-    {
-        return programAttribute;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        programAttribute = programAttributeService.getProgramAttribute( id );
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramAttributeListAction.java	1970-01-01 00:00:00 +0000
@@ -1,90 +0,0 @@
-/*
- * 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.patient.action.program;
-
-import java.util.Collection;
-
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version GetProgramAttributeListAction.java Nov 1, 2010 12:06:33 AM
- */
-public class GetProgramAttributeListAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependency
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeService programAttributeService;
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private Collection<ProgramAttribute> programAttributes;
-
-    // -------------------------------------------------------------------------
-    // Getter && Setter
-    // -------------------------------------------------------------------------
-
-    public void setProgramAttributeService( ProgramAttributeService programAttributeService )
-    {
-        this.programAttributeService = programAttributeService;
-    }
-
-    public Collection<ProgramAttribute> getProgramAttributes()
-    {
-        return programAttributes;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        ProgramAttribute deadDateAttribute = programAttributeService.getProgramAttributeByName( ProgramAttribute.DEAD_NAME );
-        ProgramAttribute closedDateAttribute = programAttributeService
-            .getProgramAttributeByName( ProgramAttribute.CLOSED_DATE );
-        
-        programAttributes = programAttributeService.getAllProgramAttributes();
-        
-        programAttributes.remove( deadDateAttribute );
-        programAttributes.remove( closedDateAttribute );
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeAction.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeAction.java	1970-01-01 00:00:00 +0000
@@ -1,79 +0,0 @@
-/*
- * 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.patient.action.program;
-
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version AddProgramAttributeAction.java Oct 31, 2010 11:48:29 PM
- */
-public class RemoveProgramAttributeAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependency
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeService programAttributeService;
-
-    public void setProgramAttributeService( ProgramAttributeService programAttributeService )
-    {
-        this.programAttributeService = programAttributeService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-
-    private Integer id;
-
-    public void setId( Integer id )
-    {
-        this.id = id;
-    }
-
-    // -------------------------------------------------------------------------
-    // Implementation Action
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        ProgramAttribute programAttribute = programAttributeService.getProgramAttribute( id );
-
-        programAttributeService.deleteProgramAttribute( programAttribute );
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeOptionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeOptionAction.java	2011-07-21 09:03:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/RemoveProgramAttributeOptionAction.java	1970-01-01 00:00:00 +0000
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2004-2009, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.hisp.dhis.patient.action.program;
-
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramAttributeOptionService;
-import org.hisp.dhis.programattributevalue.ProgramAttributeValueService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ RemoveProgramAttributeOptionAction.java Jul 21, 2011 3:32:15 PM $
- * 
- */
-public class RemoveProgramAttributeOptionAction
-implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeOptionService programAttributeOptionService;
-
-    private ProgramAttributeValueService programAttributeValueService;
-
-    // -------------------------------------------------------------------------
-    // Input/Output
-    // -------------------------------------------------------------------------
-
-    private int id;
-
-    private String message;
-
-    private I18n i18n;
-
-    // -------------------------------------------------------------------------
-    // Getter && Setter
-    // -------------------------------------------------------------------------
-
-    public void setProgramAttributeOptionService( ProgramAttributeOptionService programAttributeOptionService )
-    {
-        this.programAttributeOptionService = programAttributeOptionService;
-    }
-
-    public void setProgramAttributeValueService( ProgramAttributeValueService programAttributeValueService )
-    {
-        this.programAttributeValueService = programAttributeValueService;
-    }
-    
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-
-    public String getMessage()
-    {
-        return message;
-    }
-
-    public void setI18n( I18n i18n )
-    {
-        this.i18n = i18n;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        ProgramAttributeOption attributeOption = programAttributeOptionService.get( id );
-
-        if ( attributeOption != null )
-        {
-            int count = programAttributeValueService.countByProgramAttributeOption( attributeOption );
-            if ( count > 0 )
-            {
-                message = i18n.getString( "warning_delete_rogram_attribute_option" );
-                return INPUT;
-            }
-            else
-            {
-                programAttributeOptionService.deleteProgramAttributeOption( attributeOption );
-                message = i18n.getString( "success_delete_program_attribute_option" );
-                return SUCCESS;
-            }
-        }
-        else
-        {
-            message = i18n.getString( "error_delete_program_attribute_option" );
-            return ERROR;
-        }
-    }
-    
-}
\ No newline at end of file

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java	1970-01-01 00:00:00 +0000
@@ -1,167 +0,0 @@
-/*
- * 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.patient.action.program;
-
-import java.util.Collection;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.struts2.ServletActionContext;
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeOption;
-import org.hisp.dhis.program.ProgramAttributeOptionService;
-import org.hisp.dhis.program.ProgramAttributeService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * 
- * @version AddProgramAttributeAction.java Oct 31, 2010 11:48:29 PM
- */
-public class UpdateProgramAttributeAction
-    implements Action
-{
-    public static final String PREFIX_ATTRIBUTE_OPTION = "attrOption";
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeService programAttributeService;
-
-    public void setProgramAttributeService( ProgramAttributeService programAttributeService )
-    {
-        this.programAttributeService = programAttributeService;
-    }
-
-    private ProgramAttributeOptionService programAttributeOptionService;
-
-    public void setProgramAttributeOptionService( ProgramAttributeOptionService programAttributeOptionService )
-    {
-        this.programAttributeOptionService = programAttributeOptionService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/Output
-    // -------------------------------------------------------------------------
-
-    private Integer id;
-
-    private String name;
-
-    private String description;
-
-    private String valueType;
-
-    private List<String> attrOptions;
-
-    // -------------------------------------------------------------------------
-    // Getters && Setters
-    // -------------------------------------------------------------------------
-
-    public void setId( Integer id )
-    {
-        this.id = id;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    public void setDescription( String description )
-    {
-        this.description = description;
-    }
-
-    public void setValueType( String valueType )
-    {
-        this.valueType = valueType;
-    }
-
-    public void setAttrOptions( List<String> attrOptions )
-    {
-        this.attrOptions = attrOptions;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        ProgramAttribute programAttribute = programAttributeService.getProgramAttribute( id );
-
-        programAttribute.setName( name );
-        programAttribute.setDescription( description );
-        programAttribute.setValueType( valueType );
-        
-        HttpServletRequest request = ServletActionContext.getRequest();
-        
-        Collection<ProgramAttributeOption> attributeOptions = programAttributeOptionService.get( programAttribute );
-        
-        if ( attributeOptions != null && attributeOptions.size() > 0 )
-        {
-            String value = null;
-            for( ProgramAttributeOption option : attributeOptions )
-            {
-                value = request.getParameter( PREFIX_ATTRIBUTE_OPTION + option.getId() );
-                if ( StringUtils.isNotBlank( value ) )
-                {
-                    option.setName( value.trim() );
-                    programAttributeOptionService.updateProgramAttributeOption( option );
-                }
-            }
-        }
-        
-        if( attrOptions != null )
-        {
-            ProgramAttributeOption opt  = null;
-            for( String optionName : attrOptions )
-            {
-                opt = programAttributeOptionService.get( programAttribute, optionName );
-                if( opt == null )
-                {
-                    opt = new ProgramAttributeOption();
-                    opt.setName( optionName );
-                    opt.setProgramAttribute( programAttribute );
-                    programAttribute.addAttributeOptions( opt );
-                }
-            }
-        }
-        
-        programAttributeService.updateProgramAttribute( programAttribute );
-        
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java	2011-10-03 10:34:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java	1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
-package org.hisp.dhis.patient.action.program;
-
-/*
-
- * Copyright (c) 2004-2009, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.program.ProgramAttribute;
-import org.hisp.dhis.program.ProgramAttributeService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version ValidateProgramAttributeAction.java Nov 01, 2010 11:48:29 AM
- */
-
-public class ValidateProgramAttributeAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependency
-    // -------------------------------------------------------------------------
-
-    private ProgramAttributeService programAttributeService;
-
-    public void setProgramAttributeService( ProgramAttributeService programAttributeService )
-    {
-        this.programAttributeService = programAttributeService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/Output
-    // -------------------------------------------------------------------------
-
-    private Integer id;
-
-    public void setId( Integer id )
-    {
-        this.id = id;
-    }
-
-    private String name;
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-    private String message;
-
-    public String getMessage()
-    {
-        return message;
-    }
-
-    private I18n i18n;
-
-    public void setI18n( I18n i18n )
-    {
-        this.i18n = i18n;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        name = name.trim();
-
-        ProgramAttribute match = programAttributeService.getProgramAttributeByName( name );
-
-        if ( match != null && (id == null || match.getId() != id.intValue() ) )
-        {
-            message = i18n.getString( "duplicate_names" );
-
-            return ERROR;
-        }
-
-        message = i18n.getString( "everything_is_ok" );
-
-        return SUCCESS;
-    }
-}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml	2012-04-20 05:45:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml	2012-05-23 19:48:53 +0000
@@ -233,66 +233,6 @@
 		<property name="programService" ref="org.hisp.dhis.program.ProgramService" />
 	</bean>
 
-	<!-- Program Attribute -->
-
-	<bean
-		id="org.hisp.dhis.patient.action.program.GetProgramAttributeListAction"
-		class="org.hisp.dhis.patient.action.program.GetProgramAttributeListAction"
-		scope="prototype">
-		<property name="programAttributeService"
-			ref="org.hisp.dhis.program.ProgramAttributeService" />
-	</bean>
-
-	<bean id="org.hisp.dhis.patient.action.program.GetProgramAttributeAction"
-		class="org.hisp.dhis.patient.action.program.GetProgramAttributeAction"
-		scope="prototype">
-		<property name="programAttributeService"
-			ref="org.hisp.dhis.program.ProgramAttributeService" />
-	</bean>
-
-	<bean id="org.hisp.dhis.patient.action.program.AddProgramAttributeAction"
-		class="org.hisp.dhis.patient.action.program.AddProgramAttributeAction"
-		scope="prototype">
-		<property name="programAttributeService"
-			ref="org.hisp.dhis.program.ProgramAttributeService" />
-	</bean>
-
-	<bean
-		id="org.hisp.dhis.patient.action.program.UpdateProgramAttributeAction"
-		class="org.hisp.dhis.patient.action.program.UpdateProgramAttributeAction"
-		scope="prototype">
-		<property name="programAttributeService"
-			ref="org.hisp.dhis.program.ProgramAttributeService" />
-		<property name="programAttributeOptionService"
-			ref="org.hisp.dhis.program.ProgramAttributeOptionService" />
-	</bean>
-
-	<bean
-		id="org.hisp.dhis.patient.action.program.RemoveProgramAttributeAction"
-		class="org.hisp.dhis.patient.action.program.RemoveProgramAttributeAction"
-		scope="prototype">
-		<property name="programAttributeService"
-			ref="org.hisp.dhis.program.ProgramAttributeService" />
-	</bean>
-
-	<bean
-		id="org.hisp.dhis.patient.action.program.ValidateProgramAttributeAction"
-		class="org.hisp.dhis.patient.action.program.ValidateProgramAttributeAction"
-		scope="prototype">
-		<property name="programAttributeService"
-			ref="org.hisp.dhis.program.ProgramAttributeService" />
-	</bean>
-
-	<bean
-		id="org.hisp.dhis.patient.action.program.RemoveProgramAttributeOptionAction"
-		class="org.hisp.dhis.patient.action.program.RemoveProgramAttributeOptionAction"
-		scope="prototype">
-		<property name="programAttributeOptionService"
-			ref="org.hisp.dhis.program.ProgramAttributeOptionService" />
-		<property name="programAttributeValueService"
-			ref="org.hisp.dhis.programattributevalue.ProgramAttributeValueService" />
-	</bean>
-
 	<!-- Program_OrganisationUnit Association -->
 
 	<bean

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml	2012-04-20 05:45:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml	2012-05-23 19:48:53 +0000
@@ -106,13 +106,13 @@
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
 
-		<action name="getProgramAttributeWithoutGroup"
+		<action name="getPatientAttributeWithoutGroup"
 			class="org.hisp.dhis.patient.action.patientattribute.GetPatientAttributesWithoutGroupAction">
 			<result name="success" type="velocity-json">
 				/dhis-web-commons/ajax/jsonPatientAttributes.vm</result>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
-
+		
 		<action name="removePatientAttribute"
 			class="org.hisp.dhis.patient.action.patientattribute.RemovePatientAttributeAction">
 			<result name="success" type="velocity-json">
@@ -262,95 +262,7 @@
 				/dhis-web-commons/ajax/jsonResponseInput.vm</result>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
-
-		<!-- Program Attribute -->
-
-		<action name="programAttribute"
-			class="org.hisp.dhis.patient.action.program.GetProgramAttributeListAction">
-			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">/dhis-web-maintenance-patient/programAttributeList.vm</param>
-			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
-			<param name="javascripts">javascript/programAttribute.js</param>
-		</action>
-
-		<action name="getProgramAttribute"
-			class="org.hisp.dhis.patient.action.program.GetProgramAttributeAction">
-			<result name="success" type="velocity-json">
-				/dhis-web-commons/ajax/jsonProgramAttribute.vm</result>
-			<param name="onExceptionReturn">plainTextError</param>
-		</action>
-
-		<action name="removeProgramAttribute"
-			class="org.hisp.dhis.patient.action.program.RemoveProgramAttributeAction">
-			<result name="success" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
-			<param name="requiredAuthorities">F_PROGRAM_ATTRIBUTE_DELETE</param>
-		</action>
-
-		<action name="addProgramAttribute"
-			class="org.hisp.dhis.patient.action.program.AddProgramAttributeAction">
-			<result name="success" type="redirect">programAttribute.action
-			</result>
-			<param name="requiredAuthorities">F_PROGRAM_ATTRIBUTE_ADD</param>
-		</action>
-
-		<action name="updateProgramAttribute"
-			class="org.hisp.dhis.patient.action.program.UpdateProgramAttributeAction">
-			<result name="success" type="redirect">programAttribute.action
-			</result>
-			<param name="requiredAuthorities">F_PROGRAM_ATTRIBUTE_UPDATE</param>
-		</action>
-
-		<action name="validateProgramAttribute"
-			class="org.hisp.dhis.patient.action.program.ValidateProgramAttributeAction">
-			<result name="success" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
-			<result name="error" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseError.vm</result>
-			<result name="input" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseInput.vm</result>
-			<param name="onExceptionReturn">plainTextError</param>
-		</action>
-
-		<action name="showAddProgramAttributeForm" class="org.hisp.dhis.patient.action.NoAction">
-			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">/dhis-web-maintenance-patient/addProgramAttributeForm.vm</param>
-			<param name="javascripts">javascript/programAttribute.js</param>
-			<param name="stylesheets">style/basic.css</param>
-			<param name="requiredAuthorities">F_PROGRAM_ATTRIBUTE_ADD</param>
-		</action>
-
-		<action name="showUpdateProgramAttributeForm"
-			class="org.hisp.dhis.patient.action.program.GetProgramAttributeAction">
-			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">/dhis-web-maintenance-patient/updateProgramAttributeForm.vm</param>
-			<param name="javascripts">javascript/programAttribute.js</param>
-			<param name="stylesheets">style/basic.css</param>
-			<param name="requiredAuthorities">F_PROGRAM_ATTRIBUTE_UPDATE</param>
-		</action>
-
-		<action name="validateProgramAttribute"
-			class="org.hisp.dhis.patient.action.program.ValidateProgramAttributeAction">
-			<result name="success" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
-			<result name="error" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseError.vm</result>
-			<result name="input" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseInput.vm</result>
-			<param name="onExceptionReturn">plainTextError</param>
-		</action>
-
-		<action name="removeProgramAttributeOption"
-			class="org.hisp.dhis.patient.action.program.RemoveProgramAttributeOptionAction">
-			<result name="success" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
-			<result name="error" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseError.vm</result>
-			<result name="input" type="velocity-json">
-				/dhis-web-commons/ajax/jsonResponseInput.vm</result>
-			<param name="requiredAuthorities">F_PATIENTATTRIBUTE_DELETE</param>
-		</action>
-
+	   
 		<!-- Program_OrganisationUnit Association -->
 
 		<action name="defineProgramAssociationsForm"

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramAttributeForm.vm	2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramAttributeForm.vm	1970-01-01 00:00:00 +0000
@@ -1,62 +0,0 @@
-<script type="text/javascript" src="javascript/addProgramAttributeForm.js"></script>
-																		
-<h3>$i18n.getString( "create_new_program_attribute" )</h3>
-<form id="addProgramAttributeForm" action="addProgramAttribute.action" method="post" >
-
-<table id="attrTable"> 
-	<thead>
-		<tr><th colspan="2">$i18n.getString( "program_attribute_details" )</th></tr>
-    </thead>
-	
-    <tbody>
-		<tr>
-			<td><label>$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="name" name="name" class="{validate:{required:true}}"/></td>
-			<td></td>
-		</tr>   
-		
-		<tr>
-			<td><label>$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="description" name="description" class="{validate:{required:true,minlength:2}}"/></td>
-			<td></td>
-		</tr>
-		
-		<tr>
-			<td><label for="valueType">$i18n.getString( "value_type" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td>
-				<select id="valueType" name="valueType" onchange="ATTRIBUTE_OPTION.selectValueType(this);">
-					<option value="NUMBER" selected="selected">$i18n.getString( "number" )</option>
-					<option value="TEXT">$i18n.getString( "text" )</option>
-					<option value="YES/NO">$i18n.getString( "yes_no" )</option>
-					<option value="DATE">$i18n.getString( "date" )</option>
-					<option value="COMBO">$i18n.getString( "attribute_combo_type" )</option>
-				</select>
-			</td>
-			<td></td>
-		</tr>
-		
-		<tr id="attributeComboRow"> 
-			<td><label>$i18n.getString( "attribute_options" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td ><table id="attrOptionContainer"></table><a href="#" style="text-decoration: none;margin-top: 0.5em" onclick="ATTRIBUTE_OPTION.addOption()">[ $i18n.getString( "add_more_option" ) ]</a>
-			</td>
-			<td><span id="attrMessage"  name="attrMessage" style="color:red;"></span></td>
-		</tr>
-    </tbody>
-	<tr>
-		<td></td>
-		<td>
-			<input type="submit" value="$i18n.getString( 'add' )" />
-			<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='programAttribute.action'" />
-		</td>
-	</tr>
-</table>
-
-</form>  
-
-<script>
-	var i18n_remove_option = '$encoder.jsEscape( $i18n.getString( "remove_option" ) , "'") ';
-	var i18n_field_is_required = '$encoder.jsEscape( $i18n.getString( "field_is_required" ) , "'") ';
-	var i18n_at_least_2_option = '$encoder.jsEscape( $i18n.getString( "at_least_2_option" ) , "'") ';
-
-	var isSubmit = true;
-</script> 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm	2012-03-08 07:52:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/index.vm	2012-05-23 19:48:53 +0000
@@ -14,7 +14,6 @@
     #introListImgItem( "relationshipType.action" "relationship_type" "patient" )
 	#introListImgItem( "defineOrgunitRegistrationForm.action" "patient_organisation_unit_registration" "patient" )
     #introListImgItem( "program.action" "program" "program" )
-	#introListImgItem( "programAttribute.action" "program_attribute" "program" )
     #introListImgItem( "caseAggregation.action" "beneficiary_aggregation_query_builder" "caseaggregationmapping" )
 	#introListImgItem( "validationCriteria.action" "validation_criteria" "validationcriteria" )
 </ul>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientAttributeGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientAttributeGroupForm.js	2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientAttributeGroupForm.js	2012-05-23 19:48:53 +0000
@@ -3,7 +3,7 @@
 		jQuery('name').focus();
 		
 		jQuery("#availableAttributes").dhisAjaxSelect({
-			source: 'getProgramAttributeWithoutGroup.action',
+			source: 'getPatientAttributeWithoutGroup.action',
 			iterator: 'patientAttributes',
 			connectedTo: 'selectedAttributes',
 			handler: function(item){

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramAttributeForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramAttributeForm.js	2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramAttributeForm.js	1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-jQuery(document).ready(	function(){
-		
-	validation( 'addProgramAttributeForm', function(form){
-		if( isSubmit && ATTRIBUTE_OPTION.checkOnSubmit() ) {
-			form.submit();
-		}
-	}, function(){
-		isSubmit = true;
-		jQuery.each($('#addProgramAttributeForm').serializeArray(), function(i, field) {
-			if( field.value == ""){
-				setInnerHTML("attrMessage", i18n_field_is_required);
-				isSubmit = false;
-			}
-		});
-	});
-	
-	jQuery("#attributeComboRow").hide();
-		
-	checkValueIsExist( "name", "validateProgramAttribute.action");
-});		
\ No newline at end of file

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programAttribute.js	2012-03-15 09:28:38 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programAttribute.js	1970-01-01 00:00:00 +0000
@@ -1,100 +0,0 @@
-// -----------------------------------------------------------------------------
-// View details
-// -----------------------------------------------------------------------------
-
-function showProgramAttributeDetails( programAttributeId )
-{
-	jQuery.getJSON( 'getProgramAttribute.action', { id: programAttributeId }, function ( json ) {
-		setInnerHTML( 'nameField',  json.programAttribute.name );	
-		setInnerHTML( 'descriptionField', json.programAttribute.description );
-		
-		var valueTypeMap = { 'NUMBER':i18n_number, 'BOOL':i18n_yes_no, 'TEXT':i18n_text, 'DATE':i18n_date, 'COMBO':i18n_combo };
-		var valueType =  json.programAttribute.valueType;
-		
-		setInnerHTML( 'valueTypeField', valueTypeMap[valueType] );    
-	   
-		showDetails();
-	});
-}
-
-// -----------------------------------------------------------------------------
-// Remove Program Attribute
-// -----------------------------------------------------------------------------
-
-function removeProgramAttribute( programAttributeId, name )
-{
-	removeItem( programAttributeId, name, i18n_confirm_delete, 'removeProgramAttribute.action' );	
-}
-
-ATTRIBUTE_OPTION = 
-{
-	selectValueType : function (this_)
-	{
-		if ( jQuery(this_).val() == "COMBO" )
-		{
-			jQuery("#attributeComboRow").show();
-			if( jQuery("#attrOptionContainer").find("input").length ==0 ) 
-			{
-				ATTRIBUTE_OPTION.addOption();
-				ATTRIBUTE_OPTION.addOption();
-			}
-		}else {
-			jQuery("#attributeComboRow").hide();
-		}
-	},
-	checkOnSubmit : function ()
-	{
-		if( jQuery("#valueType").val() != "COMBO" ) 
-		{
-			jQuery("#attrOptionContainer").children().remove();
-			return true;
-		}else {
-			$("input","#attrOptionContainer").each(function(){ 
-				if( !jQuery(this).val() )
-					jQuery(this).remove();
-			});
-			if( $("input","#attrOptionContainer").length < 2)
-			{
-				alert(i18n_at_least_2_option);
-				return false;
-			}else return true;
-		}
-	},
-	addOption : function ()
-	{
-		jQuery("#attrOptionContainer").append(ATTRIBUTE_OPTION.createInput());
-	},
-	remove : function (this_, optionId)
-	{
-		if( jQuery(this_).siblings("input").attr("name") != "attrOptions")
-		{
-			jQuery.getJSON("removeProgramAttributeOption.action",
-				{ 
-					id: optionId 
-				},function( json )
-				{
-					var type  = json.response;
-					
-					if( type == "success")
-					{
-						jQuery(this_).parent().parent().remove();
-						showSuccessMessage(json.message);
-					}else 
-					{
-						showWarningMessage(json.message);
-					}
-				});
-		}else
-		{
-			jQuery(this_).parent().parent().remove();
-		}
-	},
-	removeInAddForm : function(this_)
-	{
-		jQuery(this_).parent().parent().remove();
-	},
-	createInput : function ()
-	{
-		return "<tr><td><input type='text' name='attrOptions' /><a href='#' style='text-decoration: none; margin-left:0.5em;' title='"+i18n_remove_option+"'  onClick='ATTRIBUTE_OPTION.remove(this,null)'>[ - ]</a></td></tr>";
-	}
-}
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeGroupForm.js	2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeGroupForm.js	2012-05-23 19:48:53 +0000
@@ -15,7 +15,7 @@
 	checkValueIsExist( "name", "validatePatientAttributeGroup.action", {id:getFieldValue('id')});
 	
 	jQuery("#availableAttributes").dhisAjaxSelect({
-		source: 'getProgramAttributeWithoutGroup.action',
+		source: 'getPatientAttributeWithoutGroup.action',
 		iterator: 'patientAttributes',
 		connectedTo: 'selectedAttributes',
 		handler: function(item){

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramAttributeForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramAttributeForm.js	2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramAttributeForm.js	1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-jQuery(document).ready(	function(){
-			
-	validation( 'updateProgramAttributeForm', function(form){
-		if( isSubmit && ATTRIBUTE_OPTION.checkOnSubmit() ) {
-			form.submit();
-		}
-	}, function(){
-		isSubmit = true;
-		jQuery.each($('#updateProgramAttributeForm').serializeArray(), function(i, field) {
-			if( field.value == ""){
-				setInnerHTML("attrMessage", i18n_field_is_required);
-				isSubmit = false;
-			}
-		});
-	}); 
-		
-	checkValueIsExist( "name", "validateProgramAttribute.action", {id:getFieldValue('id')});
-});		
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.vm	2012-05-23 16:19:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.vm	2012-05-23 19:48:53 +0000
@@ -10,7 +10,6 @@
 <h2>$i18n.getString( "programs" )</h2>
 <ul>
 	<li><a href="program.action">$i18n.getString( "program" )</a></li>
-	<li><a href="programAttribute.action">$i18n.getString( "program_attribute" )</a></li>
 	<li><a href="caseAggregation.action">$i18n.getString( "aggregation_query_builder" )</a></li>
 	<li><a href="validationCriteria.action">$i18n.getString( "validation_criteria" )</a></li>
 </ul>

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAttributeList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAttributeList.vm	2012-01-11 07:42:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAttributeList.vm	1970-01-01 00:00:00 +0000
@@ -1,78 +0,0 @@
-<h3>$i18n.getString( "program_attribute_management" ) #openHelp( "program_attribute" )</h3>
-<table class="mainPageTable">
-	<tr>
-		<td style="vertical-align:top">
-			<table width="100%">
-			  <tr>
-				<td>
-					$i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:250px"/>
-				</td>
-				<td colspan="4" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddProgramAttributeForm.action'" style="width:70px"></td>
-			  </tr>
-			</table>
-			 <table class="listTable">
-				<col>          
-				<col width="20">
-				<col width="20">
-				<col width="20"> 
-				<thead>	
-					<tr>            
-						<th>$i18n.getString( "name" )</th>
-						<th colspan="4">$i18n.getString( "operations" )</th>
-					</tr>
-				</thead>	
-				<tbody id="list">
-				#foreach( $programAttribute in $programAttributes )
-				  <tr id="tr${programAttribute.id}">
-				  
-					<td>$programAttribute.name</td>                
-					
-					<td style="text-align:center">
-					  <a href="showUpdateProgramAttributeForm.action?id=$programAttribute.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
-					</td>
-					
-					<td style="text-align:center">
-					  <a href="javascript:removeProgramAttribute( '$programAttribute.id', '$encoder.jsEncode( $programAttribute.name )' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
-					</td>            
-					
-					<td style="text-align:center">
-					  <a href="javascript:showProgramAttributeDetails( $programAttribute.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
-					</td>
-					
-				  </tr>
-				#end
-
-			  </tbody>
-
-			</table>
-		</td>
-		<td style="width:20em; padding-left:2em; vertical-align:top">
-
-			<div id="detailsArea" style="display:none">
-				<div style="float:right">
-					<a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_details' )"></a>
-				</div>				
-				<p><label class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
-				<p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
-				<p><label class="bold">$i18n.getString( "value_type" ):</label><br><span id="valueTypeField"></span></p>
-			</div>
-
-		</td>
-  </tr>
-</table>
-
-
-<script type="text/javascript">
-	var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient_attribute" ) , "'" )';
-	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';	
-    var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
-    var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
-    var i18n_number = '$encoder.jsEscape( $i18n.getString( "number" ) , "'")';
-    var i18n_yes_no = '$encoder.jsEscape( $i18n.getString( "yes_no" ) , "'")';
-    var i18n_text = '$encoder.jsEscape( $i18n.getString( "text" ) , "'")';
-    var i18n_date = '$encoder.jsEscape( $i18n.getString( "date" ) , "'")';
-    var i18n_combo = '$encoder.jsEscape( $i18n.getString( "combo" ) , "'")';
-	var i18n_processing = '$encoder.jsEscape( $i18n.getString( "processing" ) , "'")';
-	var i18n_done = '$encoder.jsEscape( $i18n.getString( "done" ) , "'")';
-</script>
-</script>

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramAttributeForm.vm	2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramAttributeForm.vm	1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-<script type="text/javascript" src="javascript/updateProgramAttributeForm.js"></script>
-																		
-<h3>$i18n.getString( "edit_program_attribute" )</h3>
-<form id="updateProgramAttributeForm" action="updateProgramAttribute.action" method="post" >
-<input type="hidden" id="id" name='id' value='$programAttribute.id'/>
-<table id="attrTable"> 
-	<thead>
-		<tr><th colspan="2">$i18n.getString( "program_attribute_details" )</th></tr>
-    </thead>
-    <tbody>
-	
-    <tr>
-        <td><label>$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-        <td><input type="text" id="name" name="name" value='$programAttribute.name' class="{validate:{required:true}}" /></td>
-        <td></td>
-    </tr>   
-    
-    <tr>
-        <td><label>$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-        <td><input type="text" id="description" name="description" value='$programAttribute.description' class="{validate:{required:true,minlength:2}}"/></td>
-        <td></td>
-    </tr>
-    
-    <tr>
-        <td>$i18n.getString( "value_type" ) <em title="$i18n.getString( 'required' )" class="required">*</em></td>
-        <td>
-            <select id="valueType" name="valueType" onchange="ATTRIBUTE_OPTION.selectValueType(this);">
-                <option value="NUMBER" #if( $programAttribute.valueType == 'NUMBER' ) selected="selected" #end>$i18n.getString( "number" )</option>
-                <option value="TEXT" #if( $programAttribute.valueType == 'TEXT' ) selected="selected" #end>$i18n.getString( "text" )</option>
-                <option value="YES/NO" #if( $programAttribute.valueType == 'YES/NO' ) selected="selected" #end>$i18n.getString( "yes_no" )</option>
-                <option value="DATE" #if( $programAttribute.valueType == 'DATE' ) selected="selected" #end>$i18n.getString( "date" )</option>
-                <option value="COMBO" #if( $programAttribute.valueType == 'COMBO' ) selected="selected" ; #end>$i18n.getString( "attribute_combo_type" )</option>
-            </select>
-        </td>
-	</tr>
-	<tr id="attributeComboRow"> 
-		<td><label>$i18n.getString( "attribute_options" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td>
-			<table id="attrOptionContainer">
-			#foreach($option in $programAttribute.attributeOptions) 
-				<tr>
-					<td>
-						<input type='text' id='attrOption$option.id' name='attrOption$option.id' value="$option.name" /><a href='#' style='text-decoration: none; margin-left:0.5em;' title='$i18n.getString( "remove_option" )'  onClick='ATTRIBUTE_OPTION.remove(this,$option.id)'>[ - ]</a>
-					</td>
-				</tr>
-			#end
-			</table>
-			<a href="#" style="text-decoration: none;margin-top: 0.5em" onclick="ATTRIBUTE_OPTION.addOption()">[ $i18n.getString( "add_more_option" ) ]</a>
-		</td>
-	<td><span id="attrMessage"  name="attrMessage" style="color:red;"></span></td>
-	</tr>
-    </tbody>
-	<tr>
-		<td></td>
-		<td>
-			<input type="submit" value="$i18n.getString( 'update' )" />
-			<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='programAttribute.action'" />
-		</td>
-	</tr>
-</table>
-
-</form>   
-
-<script>
-	if ( jQuery("#valueType").val() == "COMBO" )
-	{
-		jQuery("#attributeComboRow").show();
-	}else{
-		jQuery("#attributeComboRow").hide();
-	}
-	
-	var i18n_remove_option = '$encoder.jsEscape( $i18n.getString( "remove_option" ) , "'") ';
-	var i18n_field_is_required = '$encoder.jsEscape( $i18n.getString( "field_is_required" ) , "'") ';
-	var i18n_at_least_2_option = '$encoder.jsEscape( $i18n.getString( "at_least_2_option" ) , "'") ';
-	var isSubmit = true;
-</script>
\ No newline at end of file