=== 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 2014-01-07 18:28:49 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2014-01-08 15:08:21 +0000 @@ -28,6 +28,16 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.util.Calendar; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +import org.hisp.dhis.common.BaseIdentifiableObject; +import org.hisp.dhis.common.DxfNamespaces; +import org.hisp.dhis.common.view.DetailedView; +import org.hisp.dhis.common.view.WithoutOrganisationUnitsView; + import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonView; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -35,16 +45,6 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import org.hisp.dhis.common.BaseIdentifiableObject; -import org.hisp.dhis.common.DxfNamespaces; -import org.hisp.dhis.common.view.DetailedView; -import org.hisp.dhis.common.view.WithoutOrganisationUnitsView; - -import java.util.Calendar; -import java.util.Date; -import java.util.HashSet; -import java.util.Set; - /** * @author Abyot Asalefew */ @@ -97,6 +97,10 @@ private Integer sortOrderInVisitSchedule; + private Boolean displayInListNoProgram = false; + + private Integer sortOrderInListNoProgram; + // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- @@ -278,6 +282,32 @@ this.sortOrderInVisitSchedule = sortOrderInVisitSchedule; } + @JsonProperty + @JsonView( { DetailedView.class } ) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) + public Boolean getDisplayInListNoProgram() + { + return displayInListNoProgram; + } + + public void setDisplayInListNoProgram( Boolean displayInListNoProgram ) + { + this.displayInListNoProgram = displayInListNoProgram; + } + + @JsonProperty + @JsonView( { DetailedView.class } ) + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) + public Integer getSortOrderInListNoProgram() + { + return sortOrderInListNoProgram; + } + + public void setSortOrderInListNoProgram( Integer sortOrderInListNoProgram ) + { + this.sortOrderInListNoProgram = sortOrderInListNoProgram; + } + // ------------------------------------------------------------------------- // Static methods // ------------------------------------------------------------------------- @@ -301,7 +331,7 @@ { return -1; } - + Calendar birthCalendar = Calendar.getInstance(); birthCalendar.setTime( date ); === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeService.java 2014-01-07 08:22:52 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeService.java 2014-01-08 15:08:21 +0000 @@ -135,10 +135,28 @@ /** * Get patient attributes which are displayed in visit schedule * + * @param displayOnVisitSchedule True/False value + * * @return List of patient attributes */ Collection getPatientAttributesByDisplayOnVisitSchedule( boolean displayOnVisitSchedule ); - + + /** + * Get patient attributes which are displayed in visit schedule + * + * @param displayInListNoProgram True/False value + * + * @return List of patient attributes + */ Collection getPatientAttributesWithoutProgram(); + /** + * Get patient attributes which are displayed in visit schedule + * + * @param displayInListNoProgram True/False value + * + * @return List of patient attributes + */ + Collection getPatientAttributesDisplayed( boolean displayInListNoProgram ); + } === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeStore.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeStore.java 2013-11-05 09:31:47 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeStore.java 2014-01-08 15:08:21 +0000 @@ -81,9 +81,17 @@ /** * Get patient attributes which are displayed in visit schedule + * @param displayOnVisitSchedule True/False value * * @return List of patient attributes */ Collection getByDisplayOnVisitSchedule( boolean displayOnVisitSchedule ); + /** + * Get patient attributes which are displayed in visit schedule + * @param displayInListNoProgram True/False value + * + * @return List of patient attributes + */ + Collection getPatientAttributesDisplayed( boolean displayInListNoProgram ); } === added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeSortOrderInListNoProgramComparator.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeSortOrderInListNoProgramComparator.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeSortOrderInListNoProgramComparator.java 2014-01-08 15:08:21 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2004-2013, 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.PatientAttribute; + +/** + * @author Chau Thu Tran + * + * @version $ PatientAttributeSortOrderInListNoProgramComparator.java Jan 8, + * 2014 9:24:20 PM $ + */ +public class PatientAttributeSortOrderInListNoProgramComparator + implements Comparator +{ + public int compare( PatientAttribute patientAttribute0, PatientAttribute patientAttribute1 ) + { + if ( patientAttribute0.getSortOrderInListNoProgram() == null + || patientAttribute0.getSortOrderInListNoProgram() == 0 ) + { + return patientAttribute0.getName().compareTo( patientAttribute1.getName() ); + } + + if ( patientAttribute1.getSortOrderInListNoProgram() == null + || patientAttribute1.getSortOrderInListNoProgram() == 0 ) + { + return patientAttribute0.getName().compareTo( patientAttribute1.getName() ); + } + + return patientAttribute0.getSortOrderInListNoProgram() - patientAttribute1.getSortOrderInListNoProgram(); + } +} \ No newline at end of file === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAttributeService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAttributeService.java 2014-01-07 15:02:45 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientAttributeService.java 2014-01-08 15:08:21 +0000 @@ -134,4 +134,10 @@ return patientAttributes; } + + public Collection getPatientAttributesDisplayed(boolean displayInListNoProgram ) + { + return patientAttributeStore.getPatientAttributesDisplayed( displayInListNoProgram ); + } + } === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientAttributeStore.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientAttributeStore.java 2013-11-05 09:31:47 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientAttributeStore.java 2014-01-08 15:08:21 +0000 @@ -46,39 +46,46 @@ // Implementation methods // ------------------------------------------------------------------------- - @SuppressWarnings("unchecked") + @SuppressWarnings( "unchecked" ) public Collection getByValueType( String valueType ) { return getCriteria( Restrictions.eq( "valueType", valueType ) ).list(); } - @SuppressWarnings("unchecked") + @SuppressWarnings( "unchecked" ) public Collection getByMandatory( boolean mandatory ) { return getCriteria( Restrictions.eq( "mandatory", mandatory ) ).list(); } - @SuppressWarnings("unchecked") + @SuppressWarnings( "unchecked" ) public Collection getOptionalPatientAttributesWithoutGroup() { return getCriteria( Restrictions.isNull( "patientAttributeGroup" ) ) .add( Restrictions.eq( "mandatory", false ) ).list(); } - public PatientAttribute getByGroupBy( ) + public PatientAttribute getByGroupBy() { return (PatientAttribute) getCriteria( Restrictions.eq( "groupBy", true ) ).uniqueResult(); } - @SuppressWarnings("unchecked") + @SuppressWarnings( "unchecked" ) public Collection getWithoutGroup() { return getCriteria( Restrictions.isNull( "patientAttributeGroup" ) ).list(); } - @SuppressWarnings("unchecked") + @SuppressWarnings( "unchecked" ) public Collection getByDisplayOnVisitSchedule( boolean displayOnVisitSchedule ) { return getCriteria( Restrictions.eq( "displayOnVisitSchedule", displayOnVisitSchedule ) ).list(); } + + @SuppressWarnings( "unchecked" ) + public Collection getPatientAttributesDisplayed( boolean displayInListNoProgram ) + { + return getCriteria( Restrictions.eq( "displayInListNoProgram", displayInListNoProgram ) ).list(); + } + } === 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 2014-01-07 15:41:48 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2014-01-08 15:08:21 +0000 @@ -301,6 +301,8 @@ + "INNER JOIN patientidentifiertype pi ON pp.patientidentifiertypeid=pi.patientidentifiertypeid" ); executeSql( "DROP TABLE program_patientidentifiertypes" ); executeSql( "ALTER TABLE patientidentifiertype DROP COLUMN personDisplayName" ); + + executeSql( "UPDATE patientattribute SET displayInListNoProgram=false WHERE displayInListNoProgram 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 2014-01-07 08:22:52 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml 2014-01-08 15:08:21 +0000 @@ -38,6 +38,8 @@ + + === added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetAttributesByProgramAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetAttributesByProgramAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetAttributesByProgramAction.java 2014-01-08 15:08:21 +0000 @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2004-2013, 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.List; + +import org.hisp.dhis.patient.PatientAttribute; +import org.hisp.dhis.program.Program; +import org.hisp.dhis.program.ProgramPatientAttributeService; +import org.hisp.dhis.program.ProgramService; +import org.springframework.beans.factory.annotation.Autowired; + +import com.opensymphony.xwork2.Action; + +/** + * @author Chau Thu Tran + * + * @version $ GetAttributesByProgramAction.java Jan 8, 2014 4:16:30 PM $ + */ +public class GetAttributesByProgramAction + implements Action +{ + // ------------------------------------------------------------------------- + // Dependency + // ------------------------------------------------------------------------- + + @Autowired + private ProgramService programService; + + @Autowired + private ProgramPatientAttributeService programPatientAttributeService; + + // ------------------------------------------------------------------------- + // Getter && Setter + // ------------------------------------------------------------------------- + + private Integer id; + + public void setId( Integer id ) + { + this.id = id; + } + + private List attributes = new ArrayList(); + + public List getAttributes() + { + return attributes; + } + + // ------------------------------------------------------------------------- + // Implementation Action + // ------------------------------------------------------------------------- + + @Override + public String execute() + throws Exception + { + if ( id != null ) + { + Program program = programService.getProgram( id ); + attributes = new ArrayList( + programPatientAttributeService.getListPatientAttribute( program ) ); + } + else + { + + } + + return SUCCESS; + } +} === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java 2014-01-07 15:02:45 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java 2014-01-08 15:08:21 +0000 @@ -30,6 +30,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -40,7 +41,12 @@ import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager; import org.hisp.dhis.paging.ActionPagingSupport; import org.hisp.dhis.patient.Patient; +import org.hisp.dhis.patient.PatientAttribute; +import org.hisp.dhis.patient.PatientAttributeService; +import org.hisp.dhis.patient.PatientIdentifierType; +import org.hisp.dhis.patient.PatientIdentifierTypeService; import org.hisp.dhis.patient.PatientService; +import org.hisp.dhis.patient.comparator.PatientAttributeSortOrderInListNoProgramComparator; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramPatientAttributeService; import org.hisp.dhis.program.ProgramPatientIdentifierTypeService; @@ -79,6 +85,12 @@ private UserService userService; @Autowired + private PatientAttributeService patientAttributeService; + + @Autowired + private PatientIdentifierTypeService patientIdentifierTypeService; + + @Autowired private ProgramPatientAttributeService programPatientAttributeService; @Autowired @@ -204,6 +216,20 @@ return program; } + private List attributes; + + public List getAttributes() + { + return attributes; + } + + private Collection identifierTypes; + + public Collection getIdentifierTypes() + { + return identifierTypes; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -276,12 +302,18 @@ } } - if ( programId != null ) - { - program = programService.getProgram( programId ); - } - } + } + if ( programId != null ) + { + program = programService.getProgram( programId ); + } + else + { + attributes = new ArrayList( patientAttributeService.getPatientAttributesDisplayed( true ) ); + Collections.sort( attributes, new PatientAttributeSortOrderInListNoProgramComparator() ); + } + 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 2014-01-08 11:18:13 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2014-01-08 15:08:21 +0000 @@ -679,6 +679,10 @@ class="org.hisp.dhis.caseentry.action.patient.GetProgramAction" scope="prototype"> + + + === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2013-12-31 03:05:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2014-01-08 15:08:21 +0000 @@ -714,6 +714,13 @@ F_PATIENT_ADD + + + /dhis-web-caseentry/jsonProgramAttributes.vm + + + /content.vm === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js 2013-05-14 09:24:09 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js 2014-01-08 15:08:21 +0000 @@ -109,8 +109,8 @@ if( isSaveAll ) { jQuery("input[name=aggregateValues]").each(function( ){ - params += "aggregateValues=" + $(this).val() + "&"; - }); + params += "aggregateValues=" + $(this).val() + "&"; + }); } else { === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2014-01-05 14:04:13 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2014-01-08 15:08:21 +0000 @@ -383,6 +383,26 @@ else{ hideById('enrollmentSelectTR'); } + + $.postJSON( "getAttributesByProgram.action", { + id:programIdAddPatient + }, function( json ) { + jQuery('#searchObjectId').find('option').remove() + + removeAttributeOption('advSearchBox0'); + var attributeList = jQuery( '#searchObjectId'); + + jQuery('input[name=clearSearchBtn]').each(function(){ + jQuery(this).click(); + }) + + jQuery('#searchObjectId').append(''); + jQuery('#searchObjectId').append(''); + for ( var i in json.attributes ) { + jQuery('#searchObjectId').append(''); + } + addAttributeOption(); + }); } function enableRadioButton( programId ) === added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm 2014-01-08 15:08:21 +0000 @@ -0,0 +1,10 @@ +#set( $size = $program.programPatientAttributes.size() ) +{ "attributes": [ +#foreach( $programPatientAttribute in $program.programPatientAttributes ) + { + "id": ${programPatientAttribute.patientAttribute.id}, + "name": "$!encoder.jsonEncode( ${programPatientAttribute.patientAttribute.displayName} )" + }#if( $velocityCount < $size ),#end +#end +] +} === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2014-01-07 15:02:45 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2014-01-08 15:08:21 +0000 @@ -26,14 +26,20 @@ - #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) - #if($programIdentifierType.displayedInList=='true') - + #if($program) + #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) + #if($programIdentifierType.displayedInList=='true') + + #end #end - #end - #foreach( $programAttribute in $program.programPatientAttributes ) - #if($programAttribute.displayedInList=='true') + #foreach( $programAttribute in $program.programPatientAttributes ) + #if($programAttribute.displayedInList=='true') + + #end + #end + #else + #foreach( $attribute in $attributes) #end #end @@ -46,20 +52,24 @@ - - #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) - #if($programIdentifierType.displayedInList=='true') - + #if($program) + #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) + #if($programIdentifierType.displayedInList=='true') + + #end #end - #end - #foreach( $programAttribute in $program.programPatientAttributes ) - #if($programAttribute.displayedInList=='true') - + #foreach( $programAttribute in $program.programPatientAttributes ) + #if($programAttribute.displayedInList=='true') + + #end + #end + #else + #foreach( $attribute in $attributes) + #end #end - #if($mapPatientOrgunit.size()!=0) #end @@ -76,23 +86,39 @@ #set( $nr = ( ( $paging.getCurrentPage() - 1 ) * $paging.pageSize ) + $velocityCount ) $nr + #if($program) + #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) + #set($value="") + #if($programIdentifierType.displayedInList=='true') + + #end + #end - #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) - #set($value="") - #if($programIdentifierType.displayedInList=='true') - + #foreach( $programAttribute in $program.programPatientAttributes ) + #if($programAttribute.displayedInList=='true') + + #end #end - #end - - #foreach( $programAttribute in $program.programPatientAttributes ) - #if($programAttribute.displayedInList=='true') + #else + #foreach( $attribute in $attributes) + #set($value="") #end #end -
#$encoder.htmlEncode($programIdentifierType.patientIdentifierType.displayName)$encoder.htmlEncode($programIdentifierType.patientIdentifierType.displayName)$encoder.htmlEncode($programAttribute.patientAttribute.displayName)$encoder.htmlEncode($programAttribute.patientAttribute.displayName)$encoder.htmlEncode($attribute.displayName)$i18n.getString( "hierachy_orgunit" ) + #foreach( $identifier in $patient.identifiers) + #if($!identifier.identifierType.id==$programIdentifierType.patientIdentifierType.id) + #set($value=$identifier.identifier) + #end + #end + $encoder.htmlEncode($value) + - #foreach( $identifier in $patient.identifiers) - #if($!identifier.identifierType.id==$programIdentifierType.patientIdentifierType.id) - #set($value=$identifier.identifier) - #end - #end - $encoder.htmlEncode($value) - + #foreach( $attributeValue in $patient.attributeValues) + #if($!attributeValue.patientAttribute.id==$programAttribute.patientAttribute.id) + #set($value=$attributeValue.value) + #if( $programAttribute.patientAttribute.valueType == 'bool') + #set($value=$i18n.getString($attributeValue.value)) + #end + #end + #end + $encoder.htmlEncode($value) + #foreach( $attributeValue in $patient.attributeValues) #if($!attributeValue.patientAttribute.id==$programAttribute.patientAttribute.id) @@ -106,7 +132,6 @@ $i18n.getString( "patient_dashboard" ) $i18n.getString( "edit_profile" ) === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2014-01-07 15:41:48 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2014-01-08 15:08:21 +0000 @@ -34,18 +34,23 @@ - #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) - #if($programIdentifierType.displayedInList=='true') - + #if($program) + #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) + #if($programIdentifierType.displayedInList=='true') + + #end #end - #end - #foreach( $programAttribute in $program.programPatientAttributes ) - #if($programAttribute.displayedInList=='true') + #foreach( $programAttribute in $program.programPatientAttributes ) + #if($programAttribute.displayedInList=='true') + + #end + #end + #else + #foreach( $attribute in $attributes) #end #end - #if($mapPatientOrgunit.size()!=0) #end @@ -54,16 +59,21 @@ - - #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) - #if($programIdentifierType.displayedInList=='true') - + #if($program) + #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) + #if($programIdentifierType.displayedInList=='true') + + #end #end - #end - #foreach( $programAttribute in $program.programPatientAttributes ) - #if($programAttribute.displayedInList=='true') - + #foreach( $programAttribute in $program.programPatientAttributes ) + #if($programAttribute.displayedInList=='true') + + #end + #end + #else + #foreach( $attribute in $attributes) + #end #end @@ -83,40 +93,57 @@ #set( $nr = ( ( $paging.getCurrentPage() - 1 ) * $paging.pageSize ) + $velocityCount ) $nr - - #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) - #set($value="") - #if($programIdentifierType.displayedInList=='true') - - #end - #end - - #foreach( $programAttribute in $program.programPatientAttributes ) - #set($value="") - #if($programAttribute.displayedInList=='true') + #if($program) + #foreach( $programIdentifierType in $program.programPatientIdentifierTypes) + #set($value="") + #if($programIdentifierType.displayedInList=='true') + + #end + #end + + #foreach( $programAttribute in $program.programPatientAttributes ) + #set($value="") + #if($programAttribute.displayedInList=='true') + + #end + #end + #else + #foreach( $patientAttribute in $attributes) + #set($value="") #end #end - #if($mapPatientOrgunit.size()!=0) #end === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2014-01-05 14:04:13 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2014-01-08 15:08:21 +0000 @@ -172,6 +172,8 @@ var i18n_view_all = '[' + '$encoder.jsEscape( $i18n.getString( "view_all" ) , "'")' + ']'; var i18n_none_program = '[' + '$encoder.jsEscape( $i18n.getString( "none_program" ) , "'")' + ']'; var i18n_please_select = '[' + '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'")' + ']'; + var i18n_search_by_identifier = '$encoder.jsEscape( $i18n.getString( "search_by_identifier" ) , "'")'; + var i18n_enrollment_date = '$encoder.jsEscape( $i18n.getString( "enrollment_date" ) , "'")'; datePicker( 'startDueDate', true ); datePicker( 'endDueDate', true ); === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm 2013-03-08 09:15:27 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm 2014-01-08 15:08:21 +0000 @@ -5,6 +5,7 @@ "description": "$!encoder.jsonEncode( ${patientAttribute.description} )", "mandatory": "$!{patientAttribute.mandatory}", "valueType": "$!patientAttribute.valueType", + "displayInListNoProgram": "$!patientAttribute.displayInListNoProgram", "inherit": "$!patientAttribute.inherit" } } \ 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/patientattribute/AddPatientAttributeAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/AddPatientAttributeAction.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/AddPatientAttributeAction.java 2014-01-08 15:08:21 +0000 @@ -114,7 +114,14 @@ { this.expression = expression; } - + + private Boolean displayInListNoProgram; + + public void setDisplayInListNoProgram( Boolean displayInListNoProgram ) + { + this.displayInListNoProgram = displayInListNoProgram; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -130,6 +137,9 @@ patientAttribute.setExpression( expression ); patientAttribute.setDisplayOnVisitSchedule( false ); + displayInListNoProgram = (displayInListNoProgram == null) ? false : true; + patientAttribute.setDisplayInListNoProgram( displayInListNoProgram ); + mandatory = (mandatory == null) ? false : true; patientAttribute.setMandatory( mandatory ); === added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/SavePatientAttributeInListNoProgramAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/SavePatientAttributeInListNoProgramAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/SavePatientAttributeInListNoProgramAction.java 2014-01-08 15:08:21 +0000 @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2004-2013, 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.patientattribute; + +import java.util.Collection; + +import org.hisp.dhis.patient.PatientAttribute; +import org.hisp.dhis.patient.PatientAttributeService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Chau Thu Tran + * + * @version $ SavePatientAttributeInListNoProgramAction.java Jan 8, 2014 8:52:31 + * PM $ + */ +public class SavePatientAttributeInListNoProgramAction + implements Action +{ + + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private PatientAttributeService patientAttributeService; + + public void setPatientAttributeService( PatientAttributeService patientAttributeService ) + { + this.patientAttributeService = patientAttributeService; + } + + // ------------------------------------------------------------------------- + // Input/Output + // ------------------------------------------------------------------------- + + private Integer[] selectedAttributeIds; + + public void setSelectedAttributeIds( Integer[] selectedAttributeIds ) + { + this.selectedAttributeIds = selectedAttributeIds; + } + + // ------------------------------------------------------------------------- + // Action implementation + // ------------------------------------------------------------------------- + + public String execute() + throws Exception + { + Collection patientAttributes = patientAttributeService.getAllPatientAttributes(); + + int index = 1; + for ( Integer attributeId : selectedAttributeIds ) + { + PatientAttribute patientAttribute = patientAttributeService.getPatientAttribute( attributeId ); + patientAttribute.setDisplayInListNoProgram( true ); + patientAttribute.setSortOrderInListNoProgram( index ); + patientAttributeService.updatePatientAttribute( patientAttribute ); + index++; + patientAttributes.remove( patientAttribute ); + } + + // Set visitSchedule=false for other patientAttributes + for ( PatientAttribute patientAttribute : patientAttributes ) + { + patientAttribute.setDisplayInListNoProgram( false ); + patientAttribute.setSortOrderInListNoProgram( 0 ); + patientAttributeService.updatePatientAttribute( patientAttribute ); + } + + return SUCCESS; + } +} === added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowPatientAttributeInListNoProgramAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowPatientAttributeInListNoProgramAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/ShowPatientAttributeInListNoProgramAction.java 2014-01-08 15:08:21 +0000 @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2004-2013, 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.patientattribute; + +import java.util.ArrayList; +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 com.opensymphony.xwork2.Action; + +/** + * @author Chau Thu Tran + * + * @version $ ShowPatientAttributeInListNoProgramAction.java Jan 8, 2014 8:33:46 + * PM $ + */ +public class ShowPatientAttributeInListNoProgramAction + implements Action +{ + // ------------------------------------------------------------------------- + // Dependency + // ------------------------------------------------------------------------- + + private PatientAttributeService patientAttributeService; + + public void setPatientAttributeService( PatientAttributeService patientAttributeService ) + { + this.patientAttributeService = patientAttributeService; + } + + // ------------------------------------------------------------------------- + // Output + // ------------------------------------------------------------------------- + + private List availablePatientAttributes = new ArrayList(); + + public List getAvailablePatientAttributes() + { + return availablePatientAttributes; + } + + private List selectedPatientAttributes = new ArrayList(); + + public List getSelectedPatientAttributes() + { + return selectedPatientAttributes; + } + + // ------------------------------------------------------------------------- + // Action implementation + // ------------------------------------------------------------------------- + + public String execute() + throws Exception + { + availablePatientAttributes = new ArrayList( + patientAttributeService.getPatientAttributesDisplayed( false ) ); + Collections.sort( availablePatientAttributes, IdentifiableObjectNameComparator.INSTANCE ); + + selectedPatientAttributes = new ArrayList( + patientAttributeService.getPatientAttributesDisplayed( true ) ); + Collections.sort( availablePatientAttributes, IdentifiableObjectNameComparator.INSTANCE ); + + return SUCCESS; + } +} \ 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/patientattribute/UpdatePatientAttributeAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/UpdatePatientAttributeAction.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattribute/UpdatePatientAttributeAction.java 2014-01-08 15:08:21 +0000 @@ -137,6 +137,13 @@ this.expression = expression; } + private Boolean displayInListNoProgram; + + public void setDisplayInListNoProgram( Boolean displayInListNoProgram ) + { + this.displayInListNoProgram = displayInListNoProgram; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -152,6 +159,9 @@ patientAttribute.setExpression( expression ); patientAttribute.setDisplayOnVisitSchedule( false ); + displayInListNoProgram = (displayInListNoProgram == null) ? false : true; + patientAttribute.setDisplayInListNoProgram( displayInListNoProgram ); + mandatory = (mandatory == null) ? false : true; patientAttribute.setMandatory( mandatory ); === 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 2014-01-07 15:02:45 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2014-01-08 15:08:21 +0000 @@ -167,6 +167,22 @@ + + + + + + + + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2014-01-07 18:18:30 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2014-01-08 15:08:21 +0000 @@ -492,4 +492,6 @@ data_entry_method_for_option_sets=Data entry method for option sets users = Users attribute_users = Attribute users -view_template_reminder_message = View template reminder message \ No newline at end of file +view_template_reminder_message = View template reminder message +display_in_list_no_program = Display in list without program +patient_attribute_displayed_with_no_program = Person attribute displayed with no program \ No newline at end of file === 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 2014-01-06 13:23:58 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2014-01-08 15:08:21 +0000 @@ -207,7 +207,24 @@ index.action F_PATIENTATTRIBUTE_ADD + + + /main.vm + + /dhis-web-maintenance-patient/patientAttributeInListNoProgram.vm + /dhis-web-maintenance-patient/menu.vm + javascript/patientAttribute.js + style/basic.css + F_PATIENTATTRIBUTE_ADD + + + index.action + F_PATIENTATTRIBUTE_ADD + + + + + + + + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js 2013-12-17 01:29:04 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js 2014-01-08 15:08:21 +0000 @@ -81,8 +81,8 @@ jQuery.getJSON("getPatientDataElements.action", { programStageId: programStageId }, function( json ) { - jQuery('#dataElementId').append(''); - jQuery('#dataElementId').append(''); + jQuery('#dataElementId').append(''); + jQuery('#dataElementId').append(''); for( i in json.dataElements ) { var id = '[DE:' + programStageId + '.' + json.dataElements[i].id + ']'; jQuery('#dataElementId').append(''); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2014-01-06 15:31:51 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2014-01-08 15:08:21 +0000 @@ -40,6 +40,14 @@ + + + + + +
#$encoder.htmlEncode($programIdentifierType.patientIdentifierType.displayName)$encoder.htmlEncode($programIdentifierType.patientIdentifierType.displayName)$encoder.htmlEncode($programAttribute.patientAttribute.displayName)$encoder.htmlEncode($programAttribute.patientAttribute.displayName)$encoder.htmlEncode($attribute.displayName) - #foreach( $identifier in $patient.identifiers) - #if($!identifier.identifierType.id==$programIdentifierType.patientIdentifierType.id) - #set($value=$identifier.identifier) - #end - #end - $encoder.htmlEncode($value) - + #foreach( $identifier in $patient.identifiers) + #if($!identifier.identifierType.id==$programIdentifierType.patientIdentifierType.id) + #set($value=$identifier.identifier) + #end + #end + $!encoder.htmlEncode($value) + + #foreach( $attributeValue in $patient.attributeValues) + #if($!attributeValue.patientAttribute.id==$programAttribute.patientAttribute.id) + #set($value=$attributeValue.value) + #if( $programAttribute.patientAttribute.valueType == 'bool') + #set($value=$i18n.getString($attributeValue.value)) + #elseif( $programAttribute.patientAttribute.valueType == 'users') + #set($value=$mapUsers.get($attributeValue.value)) + #end + #end + #end + $!encoder.htmlEncode($value) + #foreach( $attributeValue in $patient.attributeValues) - #if($!attributeValue.patientAttribute.id==$programAttribute.patientAttribute.id) + #if($!attributeValue.patientAttribute.id==$patientAttribute.id) #set($value=$attributeValue.value) - #if( $programAttribute.patientAttribute.valueType == 'bool') + #if( $patientAttribute.valueType == 'bool') #set($value=$i18n.getString($attributeValue.value)) - #elseif( $programAttribute.patientAttribute.valueType == 'users') + #elseif( $patientAttribute.valueType == 'users') #set($value=$mapUsers.get($attributeValue.value)) #end #end #end - $encoder.htmlEncode($value) + $!encoder.htmlEncode($value) $!mapPatientOrgunit.get($patient.id)
+ +
+ +
$i18n.getString( "value_type" ) *