dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22912
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11137: Allow to sort patient-attributes which display on visit-schedule; Removed unused files.
------------------------------------------------------------
revno: 11137
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-06-05 11:17:53 +0700
message:
Allow to sort patient-attributes which display on visit-schedule; Removed unused files.
removed:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeGroupComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientIdentifierTypeComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramDisplayNameComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramIndicatorComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramNameComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageNameComparator.java
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowAddCaseAggregationConditionFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowUpdateCaseAggregationConditionFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/SavePatientAttributeVisitScheduleAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowPatientAttributeVisitScheduleFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeVisitSchedule.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 2013-05-24 09:10:42 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2013-06-05 04:17:53 +0000
@@ -80,6 +80,8 @@
private String expression;
private Boolean displayOnVisitSchedule;
+
+ private Integer sortOrderInVisitSchedule;
// -------------------------------------------------------------------------
// Constructors
@@ -250,4 +252,17 @@
this.displayOnVisitSchedule = displayOnVisitSchedule;
}
+ @JsonProperty
+ @JsonView( { DetailedView.class, ExportView.class } )
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+ public Integer getSortOrderInVisitSchedule()
+ {
+ return sortOrderInVisitSchedule;
+ }
+
+ public void setSortOrderInVisitSchedule( Integer sortOrderInVisitSchedule )
+ {
+ this.sortOrderInVisitSchedule = sortOrderInVisitSchedule;
+ }
+
}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeComparator.java 2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeComparator.java 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-package org.hisp.dhis.patient.comparator;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.Comparator;
-
-import org.hisp.dhis.patient.PatientAttribute;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-public class PatientAttributeComparator
- implements Comparator<PatientAttribute>
-{
- public int compare( PatientAttribute patientAttribute0, PatientAttribute patientAttribute1 )
- {
- return patientAttribute0.getName().compareToIgnoreCase( patientAttribute1.getName() );
- }
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeGroupComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeGroupComparator.java 2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeGroupComparator.java 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-package org.hisp.dhis.patient.comparator;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.Comparator;
-
-import org.hisp.dhis.patient.PatientAttributeGroup;
-
-/**
- * @author Chau Thu Tran
- * @version $Id$
- */
-public class PatientAttributeGroupComparator
- implements Comparator<PatientAttributeGroup>
-{
- public int compare( PatientAttributeGroup patientAttributeGroup0, PatientAttributeGroup patientAttributeGroup1 )
- {
- return patientAttributeGroup0.getName().compareToIgnoreCase( patientAttributeGroup1.getName() );
- }
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientIdentifierTypeComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientIdentifierTypeComparator.java 2010-02-22 09:19:15 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientIdentifierTypeComparator.java 1970-01-01 00:00:00 +0000
@@ -1,45 +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.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.patient.PatientIdentifierType;
-
-/**
- * @author Viet Nguyen
- *
- * @version $Id$
- */
-public class PatientIdentifierTypeComparator implements Comparator<PatientIdentifierType>
-{
- public int compare( PatientIdentifierType type0, PatientIdentifierType type1 )
- {
- return type0.getName().compareToIgnoreCase( type1.getName() );
- }
-
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramDisplayNameComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramDisplayNameComparator.java 2013-01-30 02:38:51 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramDisplayNameComparator.java 1970-01-01 00:00:00 +0000
@@ -1,46 +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.program.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.program.Program;
-
-/**
- * @author Chau Thu Tran
- *
- * @version ProgramDisplayNameComparator.java 9:28:57 AM Jan 30, 2013 $
- */
-public class ProgramDisplayNameComparator
- implements Comparator<Program>
-{
- public int compare( Program program0, Program program1 )
- {
- return program0.getDisplayName().compareTo( program1.getDisplayName() );
- }
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramIndicatorComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramIndicatorComparator.java 2013-04-17 07:58:14 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramIndicatorComparator.java 1970-01-01 00:00:00 +0000
@@ -1,45 +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.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.program.ProgramIndicator;
-
-/**
- * @author Chau Thu Tran
- * @version $ ProgramIndicatorComparator.java Apr 16, 2013 3:47:30 PM $
- */
-public class ProgramIndicatorComparator
- implements Comparator<ProgramIndicator>
-{
- public int compare( ProgramIndicator programIndicator0, ProgramIndicator programIndicator1 )
- {
- return programIndicator0.getDisplayName().compareTo( programIndicator1.getDisplayName() );
- }
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramNameComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramNameComparator.java 2012-01-06 04:56:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramNameComparator.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.comparator;
-
-import java.util.Comparator;
-
-import org.hisp.dhis.program.Program;
-
-/**
- * @author Chau Thu Tran
- *
- * @version ProgramNameComparator.java Nov 17, 2010 11:13:44 AM
- */
-public class ProgramNameComparator implements Comparator<Program>
-{
- public int compare( Program program0, Program program1 )
- {
- return program0.getName().compareTo( program1.getName() );
- }
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageNameComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageNameComparator.java 2012-01-06 04:56:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageNameComparator.java 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-package org.hisp.dhis.program.comparator;
-
-/*
- * 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.
- */
-
-import java.util.Comparator;
-
-import org.hisp.dhis.program.ProgramStage;
-
-/**
- * @author Viet Nguyen
- *
- */
-public class ProgramStageNameComparator
- implements Comparator<ProgramStage>
-{
- public int compare( ProgramStage programStage0, ProgramStage programStage1 )
- {
- return programStage0.getName().compareTo( programStage1.getName() );
- }
-}
=== 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 2013-05-24 09:10:42 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml 2013-06-05 04:17:53 +0000
@@ -36,6 +36,8 @@
<property name="expression" column="expression" />
<property name="displayOnVisitSchedule" />
+
+ <property name="sortOrderInVisitSchedule" />
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java 2013-05-28 09:04:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java 2013-06-05 04:17:53 +0000
@@ -29,12 +29,14 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.hisp.dhis.caseentry.state.SelectedStateManager;
import org.hisp.dhis.common.Grid;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.paging.ActionPagingSupport;
@@ -43,6 +45,7 @@
import org.hisp.dhis.patient.PatientAttributeService;
import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.patient.PatientService;
+import org.hisp.dhis.patient.comparator.PatientAttributeSortOrderComparator;
import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
import org.hisp.dhis.program.Program;
@@ -225,6 +228,8 @@
patientAttributes = new ArrayList<PatientAttribute>(
patientAttributeService.getPatientAttributesByDisplayOnVisitSchedule( true ) );
+ Collections.sort( patientAttributes, IdentifiableObjectNameComparator.INSTANCE);
+
total = patientService.countSearchPatients( searchTexts, orgunit, followup );
this.paging = createPaging( total );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowAddCaseAggregationConditionFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowAddCaseAggregationConditionFormAction.java 2012-03-16 07:50:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowAddCaseAggregationConditionFormAction.java 2013-06-05 04:17:53 +0000
@@ -37,10 +37,8 @@
import org.hisp.dhis.dataset.DataSetService;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeService;
-import org.hisp.dhis.patient.comparator.PatientAttributeComparator;
import org.hisp.dhis.program.Program;
import org.hisp.dhis.program.ProgramService;
-import org.hisp.dhis.program.comparator.ProgramNameComparator;
import com.opensymphony.xwork2.Action;
@@ -148,10 +146,10 @@
Collections.sort( dataSets, IdentifiableObjectNameComparator.INSTANCE );
programs = new ArrayList<Program>( programService.getAllPrograms() );
- Collections.sort( programs, new ProgramNameComparator() );
+ Collections.sort( programs, IdentifiableObjectNameComparator.INSTANCE );
patientAttributes = new ArrayList<PatientAttribute>( patientAttributeService.getAllPatientAttributes() );
- Collections.sort( patientAttributes, new PatientAttributeComparator() );
+ Collections.sort( patientAttributes, IdentifiableObjectNameComparator.INSTANCE );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowUpdateCaseAggregationConditionFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowUpdateCaseAggregationConditionFormAction.java 2013-05-30 09:42:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowUpdateCaseAggregationConditionFormAction.java 2013-06-05 04:17:53 +0000
@@ -28,7 +28,6 @@
package org.hisp.dhis.patient.action.caseaggregation;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -36,12 +35,10 @@
import org.hisp.dhis.caseaggregation.CaseAggregationConditionService;
import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dataset.DataSetService;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeService;
-import org.hisp.dhis.patient.comparator.PatientAttributeComparator;
import org.hisp.dhis.program.Program;
import org.hisp.dhis.program.ProgramService;
import org.hisp.dhis.program.comparator.ProgramNameComparator;
@@ -172,7 +169,7 @@
Collections.sort( programs, new ProgramNameComparator() );
patientAttributes = new ArrayList<PatientAttribute>( patientAttributeService.getAllPatientAttributes() );
- Collections.sort( patientAttributes, new PatientAttributeComparator() );
+ Collections.sort( patientAttributes, IdentifiableObjectNameComparator.INSTANCE );
caseAggregation = aggregationConditionService.getCaseAggregationCondition( id );
description = aggregationConditionService.getConditionDescription( caseAggregation.getAggregationExpression() );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeListAction.java 2011-10-04 07:05:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/GetPatientAttributeListAction.java 2013-06-05 04:17:53 +0000
@@ -31,9 +31,9 @@
import java.util.Collections;
import java.util.List;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeService;
-import org.hisp.dhis.patient.comparator.PatientAttributeComparator;
import com.opensymphony.xwork2.Action;
@@ -75,7 +75,7 @@
{
patientAttributes = new ArrayList<PatientAttribute>(patientAttributeService.getAllPatientAttributes());
- Collections.sort( patientAttributes, new PatientAttributeComparator() );
+ Collections.sort( patientAttributes, IdentifiableObjectNameComparator.INSTANCE );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/SavePatientAttributeVisitScheduleAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/SavePatientAttributeVisitScheduleAction.java 2013-05-24 09:10:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/SavePatientAttributeVisitScheduleAction.java 2013-06-05 04:17:53 +0000
@@ -74,12 +74,14 @@
{
Collection<PatientAttribute> patientAttributes = patientAttributeService.getAllPatientAttributes();
+ int index = 1;
for ( Integer attributeId : selectedAttributeIds )
{
PatientAttribute patientAttribute = patientAttributeService.getPatientAttribute( attributeId );
patientAttribute.setDisplayOnVisitSchedule( true );
+ patientAttribute.setSortOrderInVisitSchedule( index );
patientAttributeService.updatePatientAttribute( patientAttribute );
-
+ index ++;
patientAttributes.remove( patientAttribute );
}
@@ -87,6 +89,7 @@
for ( PatientAttribute patientAttribute : patientAttributes )
{
patientAttribute.setDisplayOnVisitSchedule( false );
+ patientAttribute.setSortOrderInVisitSchedule( 0 );
patientAttributeService.updatePatientAttribute( patientAttribute );
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowPatientAttributeVisitScheduleFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowPatientAttributeVisitScheduleFormAction.java 2013-05-24 09:10:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowPatientAttributeVisitScheduleFormAction.java 2013-06-05 04:17:53 +0000
@@ -28,13 +28,13 @@
package org.hisp.dhis.patient.action.patientattribute;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeService;
-import org.hisp.dhis.patient.comparator.PatientAttributeComparator;
+import org.hisp.dhis.patient.comparator.PatientAttributeSortOrderComparator;
import com.opensymphony.xwork2.Action;
@@ -82,16 +82,13 @@
public String execute()
throws Exception
{
- availablePatientAttributes = new ArrayList<PatientAttribute>( patientAttributeService.getAllPatientAttributes() );
-
+ availablePatientAttributes = new ArrayList<PatientAttribute>( patientAttributeService.getPatientAttributesByDisplayOnVisitSchedule(false) );
+ Collections.sort( availablePatientAttributes, IdentifiableObjectNameComparator.INSTANCE );
+
selectedPatientAttributes = new ArrayList<PatientAttribute>(
patientAttributeService.getPatientAttributesByDisplayOnVisitSchedule( true ) );
-
- availablePatientAttributes.removeAll( selectedPatientAttributes );
+ Collections.sort( availablePatientAttributes, new PatientAttributeSortOrderComparator());
- Collections.sort( availablePatientAttributes, new PatientAttributeComparator() );
- Collections.sort( selectedPatientAttributes, new PatientAttributeComparator() );
-
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupAction.java 2012-03-27 01:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupAction.java 2013-06-05 04:17:53 +0000
@@ -31,11 +31,11 @@
import java.util.Collections;
import java.util.List;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeGroup;
import org.hisp.dhis.patient.PatientAttributeGroupService;
import org.hisp.dhis.patient.PatientAttributeService;
-import org.hisp.dhis.patient.comparator.PatientAttributeComparator;
import com.opensymphony.xwork2.Action;
@@ -104,7 +104,7 @@
patientAttributes = new ArrayList<PatientAttribute>( patientAttributeService.getPatientAttributesWithoutGroup() );
- Collections.sort( patientAttributes, new PatientAttributeComparator() );
+ Collections.sort( patientAttributes, IdentifiableObjectNameComparator.INSTANCE );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeListAction.java 2011-03-31 01:42:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/GetPatientIdentifierTypeListAction.java 2013-06-05 04:17:53 +0000
@@ -31,9 +31,9 @@
import java.util.Collections;
import java.util.List;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.patient.PatientIdentifierTypeService;
-import org.hisp.dhis.patient.comparator.PatientIdentifierTypeComparator;
import com.opensymphony.xwork2.Action;
@@ -80,7 +80,7 @@
identifierTypes = new ArrayList<PatientIdentifierType>( patientIdentifierTypeService
.getAllPatientIdentifierTypes() );
- Collections.sort( identifierTypes, new PatientIdentifierTypeComparator() );
+ Collections.sort( identifierTypes, IdentifiableObjectNameComparator.INSTANCE );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeVisitSchedule.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeVisitSchedule.vm 2013-06-04 06:13:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeVisitSchedule.vm 2013-06-05 04:17:53 +0000
@@ -35,6 +35,10 @@
#end
</select>
</td>
+ <td>
+ <a href="javascript:moveUpSelectedOption( 'selectedAttributeIds')" title="$i18n.getString( 'move_up' )"><img src="../images/move_up.png" alt="$i18n.getString( 'move_up' )"/></a><br/><br/>
+ <a href="javascript:moveDownSelectedOption( 'selectedAttributeIds' )" title="$i18n.getString( 'move_down' )"><img src="../images/move_down.png" alt="$i18n.getString( 'move_up' )"/></a>
+ </td>
</tr>
<tr>
<td colspan='2'>