dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16220
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6115: (patient) Extension of patient objects by using BaseIdentifiableObject.
------------------------------------------------------------
revno: 6115
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-02-27 08:07:19 +0700
message:
(patient) Extension of patient objects by using BaseIdentifiableObject.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipType.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/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
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/ProgramStage.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/RelationshipType.hbm.xml
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonRelationshipType.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipTypeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/UpdateRelationshipTypeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipTypeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipType.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateRelationshipTypeForm.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2011-09-02 10:40:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2012-02-27 01:07:19 +0000
@@ -26,16 +26,24 @@
*/
package org.hisp.dhis.patient;
-import java.io.Serializable;
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 Abyot Asalefew
* @version $Id$
*/
+@XmlRootElement( name = "patientAttribute", namespace = Dxf2Namespace.NAMESPACE )
+@XmlAccessorType( value = XmlAccessType.NONE )
public class PatientAttribute
- implements Serializable
+ extends BaseIdentifiableObject
{
/**
* Determines if a de-serialized file is compatible with this class.
@@ -52,10 +60,6 @@
public static final String TYPE_COMBO = "COMBO";
- private int id;
-
- private String name;
-
private String description;
private String valueType;
@@ -63,7 +67,7 @@
private boolean mandatory;
private boolean inheritable;
-
+
private Integer noChars;
private Boolean groupBy;
@@ -165,16 +169,6 @@
return groupBy;
}
- public int getId()
- {
- return id;
- }
-
- public void setId( int id )
- {
- this.id = id;
- }
-
public boolean isMandatory()
{
return mandatory;
@@ -185,16 +179,6 @@
this.mandatory = mandatory;
}
- public String getName()
- {
- return name;
- }
-
- public void setName( String name )
- {
- this.name = name;
- }
-
public String getDescription()
{
return description;
@@ -235,5 +219,4 @@
this.inheritable = inheritable;
}
-
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java 2011-07-05 05:23:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java 2012-02-27 01:07:19 +0000
@@ -26,30 +26,34 @@
*/
package org.hisp.dhis.patient;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
+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$
*/
+@XmlRootElement( name = "patientAttributeGroup", namespace = Dxf2Namespace.NAMESPACE )
+@XmlAccessorType( value = XmlAccessType.NONE )
public class PatientAttributeGroup
- implements Serializable
+ extends BaseIdentifiableObject
{
/**
* Determines if a de-serialized file is compatible with this class.
*/
private static final long serialVersionUID = -7084277284999239111L;
- private int id;
-
- private String name;
-
private String description;
private Integer sortOrder;
-
+
private List<PatientAttribute> attributes = new ArrayList<PatientAttribute>();
// -------------------------------------------------------------------------
@@ -103,26 +107,6 @@
// Getters and setters
// -------------------------------------------------------------------------
- public int getId()
- {
- return id;
- }
-
- public void setId( int id )
- {
- this.id = id;
- }
-
- public String getName()
- {
- return name;
- }
-
- public void setName( String name )
- {
- this.name = name;
- }
-
public String getDescription()
{
return description;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java 2011-05-25 06:27:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java 2012-02-27 01:07:19 +0000
@@ -27,10 +27,17 @@
package org.hisp.dhis.patient;
-import java.io.Serializable;
-
+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;
+
+@XmlRootElement( name = "patientIdentifierType", namespace = Dxf2Namespace.NAMESPACE )
+@XmlAccessorType( value = XmlAccessType.NONE )
public class PatientIdentifierType
- implements Serializable
+ extends BaseIdentifiableObject
{
/**
* Determines if a de-serialized file is compatible with this class.
@@ -45,11 +52,6 @@
public static final String VALUE_TYPE_LETTER = "letter";
-
- private int id;
-
- private String name;
-
private String description;
private boolean mandatory;
@@ -180,5 +182,5 @@
{
this.type = type;
}
-
+
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2012-02-13 02:41:24 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2012-02-27 01:07:19 +0000
@@ -27,11 +27,11 @@
package org.hisp.dhis.program;
-import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
+import org.hisp.dhis.common.BaseIdentifiableObject;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.validation.ValidationCriteria;
@@ -40,17 +40,13 @@
* @author Abyot Asalefew
*/
public class Program
- implements Serializable
+ extends BaseIdentifiableObject
{
/**
* Determines if a de-serialized file is compatible with this class.
*/
private static final long serialVersionUID = -2581751965520009382L;
- private int id;
-
- private String name;
-
private String description;
private Integer version;
@@ -80,7 +76,7 @@
private Boolean singleEvent;
private Boolean anonymous;
-
+
private Boolean displayProvidedOtherFacility;
// -------------------------------------------------------------------------
@@ -134,16 +130,6 @@
// Getters and setters
// -------------------------------------------------------------------------
- public int getId()
- {
- return id;
- }
-
- public void setId( int id )
- {
- this.id = id;
- }
-
public Boolean getDisplayProvidedOtherFacility()
{
return displayProvidedOtherFacility;
@@ -153,17 +139,7 @@
{
this.displayProvidedOtherFacility = displayProvidedOtherFacility;
}
-
- public String getName()
- {
- return name;
- }
-
- public void setName( String name )
- {
- this.name = name;
- }
-
+
public String getDescription()
{
return description;
=== modified 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-01-06 04:56:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java 2012-02-27 01:07:19 +0000
@@ -27,16 +27,24 @@
package org.hisp.dhis.program;
-import java.io.Serializable;
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
- implements Serializable
+ extends BaseIdentifiableObject
{
/**
* Determines if a de-serialized file is compatible with this class.
@@ -46,7 +54,7 @@
// -------------------------------------------------------------------------
// Define ValueType
// -------------------------------------------------------------------------
-
+
public static final String TYPE_DATE = "DATE";
public static final String TYPE_STRING = "TEXT";
@@ -69,10 +77,6 @@
// Properties
// -------------------------------------------------------------------------
- private Integer id;
-
- private String name;
-
private String description;
private String valueType;
@@ -89,7 +93,7 @@
{
attributeOptions = new HashSet<ProgramAttributeOption>();
}
-
+
attributeOptions.add( option );
}
@@ -113,19 +117,19 @@
{
return true;
}
-
+
if ( obj == null )
{
return false;
}
-
+
if ( getClass() != obj.getClass() )
{
return false;
}
-
+
ProgramAttribute other = (ProgramAttribute) obj;
-
+
if ( name == null )
{
if ( other.name != null )
@@ -137,7 +141,7 @@
{
return false;
}
-
+
return true;
}
@@ -145,16 +149,6 @@
// Getters and setters
// -------------------------------------------------------------------------
- public Integer getId()
- {
- return id;
- }
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
public String getValueType()
{
return valueType;
@@ -165,16 +159,6 @@
this.valueType = valueType;
}
- public String getName()
- {
- return name;
- }
-
- public void setName( String name )
- {
- this.name = name;
- }
-
public String getDescription()
{
return description;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java 2011-10-27 03:12:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java 2012-02-27 01:07:19 +0000
@@ -26,41 +26,37 @@
*/
package org.hisp.dhis.program;
-import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
+import org.hisp.dhis.common.BaseIdentifiableObject;
import org.hisp.dhis.dataentryform.DataEntryForm;
/**
* @author Abyot Asalefew
*/
public class ProgramStage
- implements Serializable
+ extends BaseIdentifiableObject
{
/**
* Determines if a de-serialized file is compatible with this class.
*/
private static final long serialVersionUID = 6876401001559656214L;
- private int id;
-
- private String name;
-
private String description;
private int stageInProgram;
- private int minDaysFromStart;
-
+ private int minDaysFromStart;
+
private Boolean irregular;
-
+
private Program program;
private Set<ProgramStageDataElement> programStageDataElements = new HashSet<ProgramStageDataElement>();
private DataEntryForm dataEntryForm;
-
+
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
@@ -118,23 +114,7 @@
// -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
-
- /**
- * @return the id
- */
- public int getId()
- {
- return id;
- }
-
- /**
- * @param id the id to set
- */
- public void setId( int id )
- {
- this.id = id;
- }
-
+
public DataEntryForm getDataEntryForm()
{
return dataEntryForm;
@@ -145,33 +125,11 @@
this.dataEntryForm = dataEntryForm;
}
- /**
- * @return the name
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * @param name the name to set
- */
- public void setName( String name )
- {
- this.name = name;
- }
-
- /**
- * @return the description
- */
public String getDescription()
{
return description;
}
- /**
- * @param description the description to set
- */
public void setDescription( String description )
{
this.description = description;
@@ -187,54 +145,36 @@
this.irregular = irregular;
}
- /**
- * @return the stageInProgram
- */
public int getStageInProgram()
{
return stageInProgram;
}
- /**
- * @param stageInProgram the stageInProgram to set
- */
public void setStageInProgram( int stageInProgram )
{
this.stageInProgram = stageInProgram;
}
-
- /**
- * @return the minDaysFromStart
- */
+
public int getMinDaysFromStart()
{
return minDaysFromStart;
}
- /**
- * @param minDaysFromStart the minDaysFromStart to set
- */
public void setMinDaysFromStart( int minDaysFromStart )
{
this.minDaysFromStart = minDaysFromStart;
- }
+ }
- /**
- * @param program the program to set
- */
public void setProgram( Program program )
{
this.program = program;
}
- /**
- * @return the program
- */
public Program getProgram()
{
return program;
}
-
+
public Set<ProgramStageDataElement> getProgramStageDataElements()
{
return programStageDataElements;
@@ -244,6 +184,5 @@
{
this.programStageDataElements = programStageDataElements;
}
-
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipType.java 2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipType.java 2012-02-27 01:07:19 +0000
@@ -26,27 +26,30 @@
*/
package org.hisp.dhis.relationship;
-import java.io.Serializable;
+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 Abyot Asalefew
* @version $Id$
*/
+@XmlRootElement( name = "relationshipType", namespace = Dxf2Namespace.NAMESPACE )
+@XmlAccessorType( value = XmlAccessType.NONE )
public class RelationshipType
- implements Serializable
+ extends BaseIdentifiableObject
{
/**
* Determines if a de-serialized file is compatible with this class.
*/
private static final long serialVersionUID = -8788979454816878770L;
- private int id;
-
private String aIsToB;
private String bIsToA;
-
- private String description;
// -------------------------------------------------------------------------
// Constructors
@@ -106,68 +109,23 @@
// Getters and setters
// -------------------------------------------------------------------------
- /**
- * @return the id
- */
- public int getId()
- {
- return id;
- }
-
- /**
- * @param id the id to set
- */
- public void setId( int id )
- {
- this.id = id;
- }
-
- /**
- * @return the aIsToB
- */
public String getaIsToB()
{
return aIsToB;
}
- /**
- * @param aIsToB the aIsToB to set
- */
public void setaIsToB( String aIsToB )
{
this.aIsToB = aIsToB;
}
- /**
- * @return the bIsToA
- */
public String getbIsToA()
{
return bIsToA;
}
- /**
- * @param bIsToA the bIsToA to set
- */
public void setbIsToA( String bIsToA )
{
this.bIsToA = bIsToA;
}
-
- /**
- * @param description the description to set
- */
- public void setDescription( String description )
- {
- this.description = description;
- }
-
- /**
- * @return the description
- */
- public String getDescription()
- {
- return description;
- }
-
}
=== 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-02-13 02:41:24 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2012-02-27 01:07:19 +0000
@@ -150,7 +150,7 @@
upgradeProgramValidationFormula();
- executeSql( "UPDATE program SET displayProvidedOtherFacility = false WHERE displayProvidedOtherFacility is null" );
+ executeSql( "UPDATE program SET displayProvidedOtherFacility = false WHERE displayProvidedOtherFacility is null" );
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml 2011-09-02 10:40:22 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml 2012-02-27 01:07:19 +0000
@@ -1,7 +1,9 @@
<?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">
+ "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.patient.PatientAttribute" table="patientattribute">
@@ -9,9 +11,9 @@
<id name="id" column="patientattributeid">
<generator class="native" />
</id>
-
- <property name="name" not-null="true" unique="true" length="160" />
-
+
+ &identifiableProperties;
+
<property name="description" />
<property name="valueType" column="valuetype" not-null="true" />
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml 2011-07-05 05:23:57 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml 2012-02-27 01:07:19 +0000
@@ -1,7 +1,9 @@
<?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">
+ "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.patient.PatientAttributeGroup" table="patientattributegroup">
@@ -10,7 +12,7 @@
<generator class="native" />
</id>
- <property name="name" not-null="true" unique="true" length="160" />
+ &identifiableProperties;
<property name="description" />
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml 2011-05-28 21:25:46 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml 2012-02-27 01:07:19 +0000
@@ -1,7 +1,9 @@
<?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">
+ "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.patient.PatientIdentifierType" table="patientidentifiertype">
@@ -10,10 +12,8 @@
<generator class="native" />
</id>
- <property name="name" not-null="true" unique="true" length="160" />
-
- <property name="description" />
-
+ &identifiableProperties;
+
<property name="mandatory" not-null="true" />
<property name="related" not-null="true" />
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2012-02-13 02:41:24 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2012-02-27 01:07:19 +0000
@@ -1,7 +1,9 @@
<?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">
+ "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.Program" table="program">
@@ -10,7 +12,7 @@
<generator class="native" />
</id>
- <property name="name" not-null="true" unique="true" length="160" />
+ &identifiableProperties;
<property name="description" type="text" />
=== modified 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 2011-05-29 11:10:20 +0000
+++ 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
@@ -1,7 +1,9 @@
<?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">
+ "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">
@@ -10,7 +12,7 @@
<generator class="native" />
</id>
- <property name="name" not-null="true" unique="true" />
+ &identifiableProperties;
<property name="description" />
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml 2011-10-27 03:12:50 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml 2012-02-27 01:07:19 +0000
@@ -1,7 +1,9 @@
<?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">
+ "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.ProgramStage" table="programstage">
@@ -10,7 +12,7 @@
<generator class="native" />
</id>
- <property name="name" not-null="true" unique="true" length="160" />
+ &identifiableProperties;
<property name="description" />
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/RelationshipType.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/RelationshipType.hbm.xml 2011-05-28 21:25:46 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/RelationshipType.hbm.xml 2012-02-27 01:07:19 +0000
@@ -1,7 +1,9 @@
<?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">
+ "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.relationship.RelationshipType" table="relationshiptype">
@@ -9,12 +11,12 @@
<id name="id" column="relationshiptypeid">
<generator class="native" />
</id>
+
+ &identifiableProperties;
<property name="aIsToB" column="a_is_to_b" not-null="true" />
<property name="bIsToA" column="b_is_to_a" not-null="true" />
-
- <property name="description" type="text" />
-
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonRelationshipType.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonRelationshipType.vm 2011-09-28 07:11:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonRelationshipType.vm 2012-02-27 01:07:19 +0000
@@ -3,6 +3,6 @@
"id": "${relationshipType.id}",
"aIsToB": "$!encoder.jsonEncode( ${relationshipType.aIsToB} )",
"bIsToA": "$!encoder.jsonEncode( ${relationshipType.bIsToA} )",
- "description": "$!encoder.jsonEncode( ${relationshipType.description} )"
+ "description": "$!encoder.jsonEncode( ${relationshipType.name} )"
}
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java 2011-05-25 06:27:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java 2012-02-27 01:07:19 +0000
@@ -109,6 +109,7 @@
{
PatientIdentifierType patientIdentifierType = new PatientIdentifierType();
patientIdentifierType.setName( name );
+ System.out.println("\n\n ==== \n description : " + description );
patientIdentifierType.setDescription( description );
patientIdentifierType.setRelated( related.booleanValue() );
patientIdentifierType.setMandatory( mandatory.booleanValue() );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipTypeAction.java 2010-06-01 04:26:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipTypeAction.java 2012-02-27 01:07:19 +0000
@@ -67,13 +67,13 @@
{
this.bIsToA = bIsToA;
}
-
- private String description;
-
- public void setDescription( String description )
+
+ private String name;
+
+ public void setName( String name )
{
- this.description = description;
- }
+ this.name = name;
+ }
// -------------------------------------------------------------------------
// Action implementation
@@ -84,11 +84,11 @@
{
RelationshipType relationshipType = new RelationshipType();
-
+
relationshipType.setaIsToB( aIsToB );
relationshipType.setbIsToA( bIsToA );
- relationshipType.setDescription( description );
-
+ relationshipType.setName( name );
+
relationshipTypeService.saveRelationshipType( relationshipType );
return SUCCESS;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/UpdateRelationshipTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/UpdateRelationshipTypeAction.java 2010-06-01 04:26:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/UpdateRelationshipTypeAction.java 2012-02-27 01:07:19 +0000
@@ -74,12 +74,12 @@
{
this.bIsToA = bIsToA;
}
-
- private String description;
-
- public void setDescription( String description )
+
+ private String name;
+
+ public void setName( String name )
{
- this.description = description;
+ this.name = name;
}
// -------------------------------------------------------------------------
@@ -92,8 +92,8 @@
RelationshipType relationshipType = relationshipTypeService.getRelationshipType( id );
relationshipType.setaIsToB( aIsToB );
- relationshipType.setbIsToA( bIsToA );
- relationshipType.setDescription( description );
+ relationshipType.setbIsToA( bIsToA );
+ relationshipType.setName( name );
relationshipTypeService.updateRelationshipType( relationshipType );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipTypeForm.vm 2011-09-29 04:17:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipTypeForm.vm 2012-02-27 01:07:19 +0000
@@ -33,7 +33,7 @@
<tr>
<td><label>$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td><input type="text" id="description" name="description" style="width:30em" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+ <td><input type="text" id="name" name="name" style="width:30em" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
</tr>
</tbody>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipType.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/relationshipType.vm 2012-02-27 01:07:19 +0000
@@ -18,7 +18,7 @@
</tr>
<tr>
<th>$i18n.getString( "relationship_type" )</th>
- <th>$i18n.getString( "description" )</th>
+ <th>$i18n.getString( "name" )</th>
<th colspan="3">$i18n.getString( "operations" )</th>
</tr>
@@ -28,7 +28,7 @@
<td>$encoder.htmlEncode( $relationshipType.aIsToB )/$encoder.htmlEncode( $relationshipType.bIsToA )</td>
- <td>$encoder.htmlEncode( $relationshipType.description )</td>
+ <td>$encoder.htmlEncode( $relationshipType.name )</td>
<td style="text-align:center"#alternate( $mark )>
<a href="showUpdateRelationshipTypeForm.action?id=$relationshipType.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateRelationshipTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateRelationshipTypeForm.vm 2011-09-29 04:17:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateRelationshipTypeForm.vm 2012-02-27 01:07:19 +0000
@@ -34,7 +34,7 @@
</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="$encoder.htmlEncode( $relationshipType.description )" style="width:30em" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+ <td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $relationshipType.name )" style="width:30em" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
</tr>
<tr>
<td colspan="2" style="height:15px"></td>