=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java 2013-11-19 03:45:56 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java 2013-11-25 03:07:49 +0000 @@ -238,7 +238,8 @@ int getOverDueEventCount( ProgramStage programStage, Collection orgunitIds, Date startDate, Date endDate ); /** - * Get the number of program instances completed, includes all program stage instances were completed + * Get the number of program instances completed, includes all program stage + * instances were completed * * @param program Program * @param orgunitIds The ids of orgunits where the events happened @@ -336,4 +337,10 @@ ProgramStageInstance createProgramStageInstance( Patient patient, Program program, Date executionDate, OrganisationUnit organisationUnit ); + Grid searchEvents( ProgramStage programStage, List columns, + Collection organisationUnits, Date startDate, Date endDate, Boolean completed, Integer min, + Integer max, I18n i18n ); + + int searchEventsCount( ProgramStage programStage, List columns, + Collection organisationUnits, Boolean completed, Date startDate, Date endDate ); } === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java 2013-11-04 06:00:38 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java 2013-11-25 03:07:49 +0000 @@ -221,8 +221,7 @@ * LATE_VISIT_STATUS * @return A number */ - int averageNumberCompleted( Program program, Collection orgunitIds, Date after, Date before, - int status ); + int averageNumberCompleted( Program program, Collection orgunitIds, Date after, Date before, int status ); /** * Get ids of orgunits where events happened in a period @@ -246,4 +245,10 @@ * @return Grid */ Grid getCompleteness( Collection orgunitIds, Program program, String startDate, String endDate, I18n i18n ); + + Grid searchEvent( ProgramStage programStage, Collection orgUnits, List columns, + Date startDate, Date endDate, Boolean completed, Integer min, Integer max, I18n i18n ); + + int searchEventsCount( ProgramStage programStage, List columns, + Collection organisationUnits, Date startDate, Date endDate, Boolean completed ); } === added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/TabularEventColumn.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/TabularEventColumn.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/TabularEventColumn.java 2013-11-25 03:07:49 +0000 @@ -0,0 +1,171 @@ +/* + * 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.program; + +/** + * @author Chau Thu Tran + * + * @version $ TabularEventColumn.java Nov 22, 2013 1:13:39 PM $ + */ +public class TabularEventColumn +{ + public static String PREFIX_DATA_ELEMENT = "de"; + + public static String PREFIX_NUMBER_DATA_ELEMENT = "numberDe"; + + private String prefix; + + private String identifier; + + private boolean hidden; + + private String query; + + private String operator; + + private String name; + + private boolean dateType; + + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + + public TabularEventColumn() + { + } + + public TabularEventColumn( String prefix, String identifier, String name, boolean hidden, String operator, + String query ) + { + this.prefix = prefix; + this.identifier = identifier; + this.name = name; + this.hidden = hidden; + this.query = query; + this.operator = operator; + } + + // ------------------------------------------------------------------------- + // Logic + // ------------------------------------------------------------------------- + + public boolean hasQuery() + { + return (operator != null && !operator.isEmpty()) || (query != null && !query.isEmpty()); + } + + public Integer getIdentifierAsInt() + { + return identifier != null ? Integer.parseInt( identifier ) : null; + } + + public boolean isDataElement() + { + return PREFIX_DATA_ELEMENT.equals( prefix ) || PREFIX_NUMBER_DATA_ELEMENT.equals( prefix ); + } + + public boolean isNumberDataElement() + { + return PREFIX_NUMBER_DATA_ELEMENT.equals( prefix ); + } + + // ------------------------------------------------------------------------- + // Get methods + // ------------------------------------------------------------------------- + + public String getPrefix() + { + return prefix; + } + + public void setPrefix( String prefix ) + { + this.prefix = prefix; + } + + public String getIdentifier() + { + return identifier; + } + + public void setIdentifier( String identifier ) + { + this.identifier = identifier; + } + + public boolean isHidden() + { + return hidden; + } + + public void setHidden( boolean hidden ) + { + this.hidden = hidden; + } + + public String getQuery() + { + return query; + } + + public void setQuery( String query ) + { + this.query = query; + } + + public String getName() + { + return name; + } + + public void setName( String name ) + { + this.name = name; + } + + public boolean isDateType() + { + return dateType; + } + + public void setDateType( boolean dateType ) + { + this.dateType = dateType; + } + + public String getOperator() + { + return operator; + } + + public void setOperator( String operator ) + { + this.operator = operator; + } +} === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2013-11-19 03:45:56 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2013-11-25 03:07:49 +0000 @@ -528,7 +528,7 @@ { Collection messageConversations = new HashSet(); - Collection reminders = programStageInstance.getProgramStage().getPatientReminders(); + Collection reminders = programStageInstance.getProgramStage().getPatientReminders(); for ( PatientReminder rm : reminders ) { if ( rm != null @@ -670,10 +670,27 @@ programStageInstance.setOrganisationUnit( organisationUnit ); addProgramStageInstance( programStageInstance ); - + return programStageInstance; } + @Override + public Grid searchEvents( ProgramStage programStage, List columns, + Collection organisationUnits, Date startDate, Date endDate, Boolean completed, Integer min, + Integer max, I18n i18n ) + { + return programStageInstanceStore.searchEvent( programStage, organisationUnits, columns, startDate, endDate, + completed, min, max, i18n ); + } + + @Override + public int searchEventsCount( ProgramStage programStage, List columns, + Collection organisationUnits, Boolean completed, Date startDate, Date endDate ) + { + return programStageInstanceStore.searchEventsCount( programStage, columns, organisationUnits, startDate, + endDate, completed ); + } + // ------------------------------------------------------------------------- // Supportive methods // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2013-11-19 03:45:56 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2013-11-25 03:07:49 +0000 @@ -34,6 +34,7 @@ import java.util.Date; import java.util.HashSet; import java.util.List; +import java.util.Set; import org.hibernate.Criteria; import org.hibernate.criterion.Order; @@ -43,6 +44,7 @@ import org.hisp.dhis.common.GridHeader; import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore; import org.hisp.dhis.i18n.I18n; +import org.hisp.dhis.jdbc.StatementBuilder; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.patient.Patient; import org.hisp.dhis.patient.PatientReminder; @@ -54,9 +56,11 @@ import org.hisp.dhis.program.ProgramStageInstance; import org.hisp.dhis.program.ProgramStageInstanceStore; import org.hisp.dhis.program.SchedulingProgramObject; +import org.hisp.dhis.program.TabularEventColumn; import org.hisp.dhis.sms.outbound.OutboundSms; import org.hisp.dhis.system.grid.GridUtils; import org.hisp.dhis.system.grid.ListGrid; +import org.hisp.dhis.system.util.DateUtils; import org.hisp.dhis.system.util.TextUtils; import org.springframework.jdbc.support.rowset.SqlRowSet; @@ -78,6 +82,13 @@ this.programInstanceService = programInstanceService; } + private StatementBuilder statementBuilder; + + public void setStatementBuilder( StatementBuilder statementBuilder ) + { + this.statementBuilder = statementBuilder; + } + // ------------------------------------------------------------------------- // Implemented methods // ------------------------------------------------------------------------- @@ -483,8 +494,10 @@ { criteria.add( Restrictions.not( Restrictions.in( "programInstance", programInstances ) ) ); } -System.out.println("\n\n\n ............. \n programInstances : " + programInstances.iterator().next().getProgram().getName() ); -System.out.println("\n\n\n ............. \n stageInstances : " + programInstances.iterator().next().getProgramStageInstances() ); + System.out.println( "\n\n\n ............. \n programInstances : " + + programInstances.iterator().next().getProgram().getName() ); + System.out.println( "\n\n\n ............. \n stageInstances : " + + programInstances.iterator().next().getProgramStageInstances() ); Number rs = (Number) criteria.setProjection( Projections.rowCount() ).uniqueResult(); return rs != null ? rs.intValue() : 0; } @@ -500,6 +513,60 @@ return criteria.list(); } + @Override + public Grid searchEvent( ProgramStage programStage, Collection orgUnits, List columns, + Date startDate, Date endDate, Boolean completed, Integer min, Integer max, I18n i18n ) + { + // --------------------------------------------------------------------- + // Headers cols + // --------------------------------------------------------------------- + + Grid grid = new ListGrid(); + grid.setTitle( programStage.getDisplayName() ); + grid.setSubtitle( i18n.getString( "from" ) + " " + DateUtils.getMediumDateString( startDate ) + " " + + i18n.getString( "to" ) + " " + DateUtils.getMediumDateString( endDate ) ); + + grid.addHeader( new GridHeader( "id", true, true ) ); + grid.addHeader( new GridHeader( programStage.getReportDateDescription(), false, true ) ); + + Collection deKeys = new HashSet(); + for ( TabularEventColumn column : columns ) + { + String deKey = "element_" + column.getIdentifier(); + if ( !deKeys.contains( deKey ) ) + { + grid.addHeader( new GridHeader( column.getName(), column.isHidden(), true ) ); + deKeys.add( deKey ); + } + } + + grid.addHeader( new GridHeader( "Complete", true, true ) ); + grid.addHeader( new GridHeader( "PatientId", true, true ) ); + + // --------------------------------------------------------------------- + // Get SQL and build grid + // --------------------------------------------------------------------- + + String sql = getTabularReportSql( false, programStage, columns, orgUnits, startDate, endDate, completed, min, + max ); + + SqlRowSet rowSet = jdbcTemplate.queryForRowSet( sql ); + + GridUtils.addRows( grid, rowSet ); + + return grid; + } + + @Override + public int searchEventsCount( ProgramStage programStage, List columns, + Collection organisationUnits, Date startDate, Date endDate, Boolean completed ) + { + String sql = getTabularReportSql( true, programStage, columns, organisationUnits, startDate, endDate, + completed, null, null ); + + return jdbcTemplate.queryForObject( sql, Integer.class ); + } + // --------------------------------------------------------------------- // Supportive methods // --------------------------------------------------------------------- @@ -653,4 +720,101 @@ + " and ( now() - psi.duedate ) = prm.daysallowedsendmessage " + " and prm.whentosend is null " + " and prm.sendto = " + PatientReminder.SEND_TO_USER_GROUP; } + + private String getTabularReportSql( boolean count, ProgramStage programStage, List columns, + Collection orgUnits, Date startDate, Date endDate, Boolean completed, Integer min, Integer max ) + { + Set deKeys = new HashSet(); + String selector = count ? "count(*) " : "* "; + + String sql = "select " + selector + "from ( select DISTINCT psi.programstageinstanceid, psi.executiondate,"; + String where = ""; + String operator = "where "; + + for ( TabularEventColumn column : columns ) + { + if ( column.isNumberDataElement() ) + { + String deKey = "element_" + column.getIdentifier(); + if ( !deKeys.contains( deKey ) ) + { + sql += "(select cast( value as " + + statementBuilder.getDoubleColumnType() + + " ) from patientdatavalue where programstageinstanceid=psi.programstageinstanceid and dataelementid=" + + column.getIdentifier() + ") as element_" + column.getIdentifier() + ","; + deKeys.add( deKey ); + } + + if ( column.hasQuery() ) + { + where += operator + "element_" + column.getIdentifier() + " " + column.getOperator() + " " + + column.getQuery() + " "; + operator = "and "; + } + } + else if ( column.isDataElement() ) + { + String deKey = "element_" + column.getIdentifier(); + if ( !deKeys.contains( deKey ) ) + { + sql += "(select value from patientdatavalue where programstageinstanceid=psi.programstageinstanceid and dataelementid=" + + column.getIdentifier() + ") as element_" + column.getIdentifier() + ","; + deKeys.add( deKey ); + } + + if ( column.hasQuery() ) + { + if ( column.isDateType() ) + { + where += operator + "element_" + column.getIdentifier() + " " + column.getOperator() + " " + + column.getQuery() + " "; + } + else + { + where += operator + "lower(element_" + column.getIdentifier() + ") " + column.getOperator() + + " " + column.getQuery() + " "; + } + operator = "and "; + } + } + } + + sql += " psi.completed "; + + sql += "from programstageinstance psi "; + sql += "left join programinstance pi on (psi.programinstanceid=pi.programinstanceid) "; + sql += "left join patient p on (pi.patientid=p.patientid) "; + sql += "join organisationunit ou on (ou.organisationunitid=psi.organisationunitid) "; + + sql += "where psi.programstageid=" + programStage.getId() + " "; + + if ( startDate != null && endDate != null ) + { + String sDate = DateUtils.getMediumDateString( startDate ); + String eDate = DateUtils.getMediumDateString( endDate ); + + sql += "and psi.executiondate >= '" + sDate + "' "; + sql += "and psi.executiondate <= '" + eDate + "' "; + } + + if ( orgUnits != null ) + { + sql += "and ou.organisationunitid in (" + TextUtils.getCommaDelimitedString( orgUnits ) + ") "; + } + if ( completed != null ) + { + sql += "and psi.completed=" + completed + " "; + } + + sql += "order by psi.executiondate desc "; + + sql += " "; + sql += ") as tabular "; + sql += where; // filters + sql = sql.substring( 0, sql.length() - 1 ) + " "; // Remove last comma + sql += (min != null && max != null) ? statementBuilder.limitRecord( min, max ) : ""; + + return sql; + } + } \ No newline at end of file === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2013-11-04 03:13:27 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2013-11-25 03:07:49 +0000 @@ -30,6 +30,7 @@ + +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private OrganisationUnitService organisationUnitService; + + public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) + { + this.organisationUnitService = organisationUnitService; + } + + private ProgramStageService programStageService; + + public void setProgramStageService( ProgramStageService programStageService ) + { + this.programStageService = programStageService; + } + + private DataElementService dataElementService; + + public void setDataElementService( DataElementService dataElementService ) + { + this.dataElementService = dataElementService; + } + + private ProgramStageInstanceService programStageInstanceService; + + public void setProgramStageInstanceService( ProgramStageInstanceService programStageInstanceService ) + { + this.programStageInstanceService = programStageInstanceService; + } + + private CurrentUserService currentUserService; + + public void setCurrentUserService( CurrentUserService currentUserService ) + { + this.currentUserService = currentUserService; + } + + // ------------------------------------------------------------------------- + // Input/Output + // ------------------------------------------------------------------------- + + private List identifierTypes = new ArrayList(); + + public List getIdentifierTypes() + { + return identifierTypes; + } + + private List patientAttributes = new ArrayList(); + + public List getPatientAttributes() + { + return patientAttributes; + } + + private Collection orgunitIds = new HashSet(); + + public void setOrgunitIds( Collection orgunitIds ) + { + this.orgunitIds = orgunitIds; + } + + private Integer programStageId; + + public void setProgramStageId( Integer programStageId ) + { + this.programStageId = programStageId; + } + + private String startDate; + + public void setStartDate( String startDate ) + { + this.startDate = startDate; + } + + private String endDate; + + public void setEndDate( String endDate ) + { + this.endDate = endDate; + } + + private List values = new ArrayList(); + + public List getValues() + { + return values; + } + + private List filterValues = new ArrayList(); + + public void setFilterValues( List filterValues ) + { + this.filterValues = filterValues; + } + + private Boolean userOrganisationUnit; + + public void setUserOrganisationUnit( Boolean userOrganisationUnit ) + { + this.userOrganisationUnit = userOrganisationUnit; + } + + private Boolean userOrganisationUnitChildren; + + public void setUserOrganisationUnitChildren( Boolean userOrganisationUnitChildren ) + { + this.userOrganisationUnitChildren = userOrganisationUnitChildren; + } + + private Grid grid; + + public Grid getGrid() + { + return grid; + } + + private Integer total; + + public void setTotal( Integer total ) + { + this.total = total; + } + + public Integer getTotal() + { + return total; + } + + private I18n i18n; + + public void setI18n( I18n i18n ) + { + this.i18n = i18n; + } + + private I18nFormat format; + + public void setFormat( I18nFormat format ) + { + this.format = format; + } + + private Boolean useCompletedEvents; + + public void setUseCompletedEvents( Boolean useCompletedEvents ) + { + this.useCompletedEvents = useCompletedEvents; + } + + private List dataElements = new ArrayList(); + + public List getDataElements() + { + return dataElements; + } + + private String type; + + public void setType( String type ) + { + this.type = type; + } + + private String facilityLB; // All, children, current + + public void setFacilityLB( String facilityLB ) + { + this.facilityLB = facilityLB; + } + + private List valueTypes = new ArrayList(); + + public List getValueTypes() + { + return valueTypes; + } + + private Map> mapSuggestedValues = new HashMap>(); + + public Map> getMapSuggestedValues() + { + return mapSuggestedValues; + } + + private String message; + + public String getMessage() + { + return message; + } + + private Boolean useFormNameDataElement; + + public void setUseFormNameDataElement( Boolean useFormNameDataElement ) + { + this.useFormNameDataElement = useFormNameDataElement; + } + + private boolean accessPrivateInfo = false; + + // ------------------------------------------------------------------------- + // Implementation Action + // ------------------------------------------------------------------------- + + public String execute() + throws Exception + { + if ( programStageId == null ) + { + return INPUT; + } + + // --------------------------------------------------------------------- + // Get user orgunits + // --------------------------------------------------------------------- + + if ( userOrganisationUnit || userOrganisationUnitChildren ) + { + Collection userOrgunits = currentUserService.getCurrentUser().getOrganisationUnits(); + orgunitIds = new HashSet(); + + if ( userOrganisationUnit ) + { + for ( OrganisationUnit userOrgunit : userOrgunits ) + { + orgunitIds.add( userOrgunit.getId() ); + } + } + + if ( userOrganisationUnitChildren ) + { + for ( OrganisationUnit userOrgunit : userOrgunits ) + { + if ( userOrgunit.hasChild() ) + { + for ( OrganisationUnit childOrgunit : userOrgunit.getSortedChildren() ) + { + orgunitIds.add( childOrgunit.getId() ); + } + } + } + } + } + + // --------------------------------------------------------------------- + // Get orgunitIds + // --------------------------------------------------------------------- + + Set organisationUnits = new HashSet(); + + if ( facilityLB.equals( "selected" ) ) + { + organisationUnits.addAll( orgunitIds ); + } + else if ( facilityLB.equals( "childrenOnly" ) ) + { + for ( Integer orgunitId : orgunitIds ) + { + OrganisationUnit selectedOrgunit = organisationUnitService.getOrganisationUnit( orgunitId ); + organisationUnits.addAll( organisationUnitService.getOrganisationUnitHierarchy() + .getChildren( orgunitId ) ); + organisationUnits.remove( selectedOrgunit ); + } + } + else + { + for ( Integer orgunitId : orgunitIds ) + { + organisationUnits.addAll( organisationUnitService.getOrganisationUnitHierarchy() + .getChildren( orgunitId ) ); + } + } + + // --------------------------------------------------------------------- + // Get program-stage, start-date, end-date + // --------------------------------------------------------------------- + + ProgramStage programStage = programStageService.getProgramStage( programStageId ); + Date start = format.parseDate( startDate ); + Date end = format.parseDate( endDate ); + List columns = getTableColumns(); + + // --------------------------------------------------------------------- + // Generate tabular report + // --------------------------------------------------------------------- + try + { + if ( type == null ) // Tabular report + { + total = programStageInstanceService.searchEventsCount( programStage, columns, organisationUnits, + useCompletedEvents, start, end ); + this.paging = createPaging( total ); + + grid = programStageInstanceService.searchEvents( programStage, columns, organisationUnits, start, end, + useCompletedEvents, paging.getStartPos(), paging.getPageSize(), i18n ); + } + // Download as Excel + else + { + grid = programStageInstanceService.searchEvents( programStage, columns, organisationUnits, start, end, + useCompletedEvents, null, null, i18n ); + } + } + catch ( SQLGrammarException ex ) + { + message = i18n.getString( "failed_to_get_events" ); + } + + return type == null ? SUCCESS : type; + } + + // ------------------------------------------------------------------------- + // Supportive methods + // ------------------------------------------------------------------------- + + private List getTableColumns() + { + List columns = new ArrayList(); + + int index = 0; + + for ( String filterValue : filterValues ) + { + String[] values = filterValue.split( "_" ); + + if ( values != null && values.length >= 3 ) + { + String prefix = values[0]; + + TabularEventColumn column = new TabularEventColumn(); + column.setPrefix( prefix ); + column.setIdentifier( values[1] ); + column.setHidden( Boolean.parseBoolean( values[2] ) ); + + column.setOperator( values.length > 3 ? TextUtils.lower( values[3] ) : TextUtils.EMPTY ); + column.setQuery( values.length > 4 ? TextUtils.lower( values[4] ) : TextUtils.EMPTY ); + + if ( PREFIX_DATA_ELEMENT.equals( prefix ) ) + { + int objectId = Integer.parseInt( values[1] ); + DataElement dataElement = dataElementService.getDataElement( objectId ); + if ( dataElement.getType().equals( DataElement.VALUE_TYPE_INT ) ) + { + column.setPrefix( PREFIX_NUMBER_DATA_ELEMENT ); + } + dataElements.add( dataElement ); + + String valueType = dataElement.getOptionSet() != null ? VALUE_TYPE_OPTION_SET : dataElement + .getType(); + valueTypes.add( valueType ); + mapSuggestedValues.put( index, getSuggestedDataElementValues( dataElement ) ); + if ( dataElement.getType().equals( DataElement.VALUE_TYPE_DATE ) ) + { + column.setDateType( true ); + } + + if ( useFormNameDataElement != null && useFormNameDataElement ) + { + column.setName( dataElement.getFormNameFallback() ); + } + else + { + column.setName( dataElement.getDisplayName() ); + } + } + + columns.add( column ); + + index++; + } + } + + return columns; + } + + private List getSuggestedDataElementValues( DataElement dataElement ) + { + List values = new ArrayList(); + String valueType = dataElement.getType(); + + if ( valueType.equals( DataElement.VALUE_TYPE_BOOL ) ) + { + values.add( i18n.getString( "yes" ) ); + values.add( i18n.getString( "no" ) ); + } + if ( valueType.equals( DataElement.VALUE_TYPE_TRUE_ONLY ) ) + { + values.add( i18n.getString( "" ) ); + values.add( i18n.getString( "yes" ) ); + } + + return values; + } +} === 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 2013-11-04 03:49:17 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-11-25 03:07:49 +0000 @@ -781,6 +781,18 @@ + + + + + + + - - - - - - /main.vm - /dhis-web-caseentry/index.vm - /dhis-web-caseentry/menu.vm - - - - - - - /dhis-web-caseentry/responseSuccess.vm - - - /dhis-web-caseentry/responseError.vm - - - /dhis-web-caseentry/responseInput.vm - - plainTextError - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_SEARCH_PATIENT_IN_ALL_FACILITIES - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_SEARCH_PATIENT_IN_OTHER_ORGUNITS - - - - /content.vm - /dhis-web-caseentry/listPatient.vm - F_PATIENT_SEARCH - - - - /content.vm - true - /dhis-web-caseentry/listPatient.vm - F_PATIENT_LIST - - - - /content.vm - /dhis-web-caseentry/dataRecordingSelect.vm - style/style.css - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - /dhis-web-caseentry/jsonProgramStageInstances.vm - - - - - /dhis-web-caseentry/jsonProgramStageInstance.vm - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - /content.vm - /dhis-web-caseentry/dataEntryForm.vm - style/style.css - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - /dhis-web-caseentry/jsonResponseProgramCompleted.vm - - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseInput.vm - - plainTextError - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - /dhis-web-caseentry/cacheManifest.vm - - - - - /dhis-web-caseentry/jsonProgramMetaData.vm - - - - - - /main.vm - /dhis-web-caseentry/anonymousRegistration.vm - /dhis-web-caseentry/dataEntryMenu.vm - ../dhis-web-caseentry/cacheManifest.action - ../dhis-web-commons/ouwt/ouwt.js - ,javascript/commons.js - ,javascript/anonymousRegistration.js - ,javascript/entry.js - ,../dhis-web-commons/javascripts/date.js - - style/style.css - F_ANONYMOUS_DATA_ENTRY - - - - /dhis-web-caseentry/jsonSingleEventPrograms.vm - - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseInput.vm - - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - /dhis-web-caseentry/jsonProgramInstances.vm - - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseError.vm - - - - - /dhis-web-caseentry/jsonOptionSet.vm - - - - - /dhis-web-caseentry/jsonUsers.vm - - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseError.vm - - plainTextError - F_PROGRAM_STAGE_INSTANCE_DELETE - - - - /content.vm - /dhis-web-caseentry/validationResult.vm - - - - /dhis-web-caseentry/jsonOptions.vm - /dhis-web-caseentry/responseInput.vm - - - - /dhis-web-caseentry/jsonProgramStageDataElements.vm - - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - - - /dhis-web-caseentry/jsonUsernames.vm - - - - - - /dhis-web-caseentry/jsonminOrganisationUnitPaths.vm - - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - - status.vm - /dhis-web-caseentry/responseInput.vm - plainTextError - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - plainTextError - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - - status.vm - status.vm - plainTextError - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - - - /main.vm - /dhis-web-caseentry/multiDataEntrySelect.vm - /dhis-web-caseentry/dataEntryMenu.vm - style/style.css - - ../dhis-web-commons/ouwt/ouwt.js, - javascript/commons.js, - javascript/patient.js, - javascript/entry.js, - javascript/relationshipPatient.js, - javascript/multiDataEntry.js - - F_NAME_BASED_DATA_ENTRY - - - - /dhis-web-commons/ajax/jsonPrograms.vm - - - - - /dhis-web-commons/ajax/jsonPrograms.vm - - - - - /content.vm - /dhis-web-caseentry/dataentryRecords.vm - style/style.css - - - - /content.vm - /dhis-web-caseentry/reportDataEntryForm.vm - style/style.css - - - - /content.vm - /dhis-web-caseentry/dataEntryForm.vm - ../dhis-web-commons/javascripts/date.js - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - getDataRecords.action?programId=${programId} - - F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - - - /main.vm - /dhis-web-caseentry/singleEventSelect.vm - /dhis-web-caseentry/dataEntryMenu.vm - ../dhis-web-commons/ouwt/ouwt.js - ,javascript/commons.js - ,javascript/singleEvent.js - ,javascript/form.js - ,javascript/entry.js - ,../dhis-web-commons/javascripts/date.js - - style/style.css - F_SINGLE_EVENT_DATA_ENTRY - - - - /dhis-web-caseentry/jsonSingleEventPrograms.vm - - - - - /content.vm - /dhis-web-caseentry/addSingleEventRegistration.vm - style/style.css - F_PATIENT_ADD,F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - status.vm - F_PATIENT_ADD,F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE - - - - - - - /main.vm - /dhis-web-caseentry/reportSelect.vm - /dhis-web-caseentry/reportsMenu.vm - ../dhis-web-commons/ouwt/ouwt.js,javascript/report.js - style/style.css - F_GENERATE_PROGRAM_SUMMARY_REPORT - - - - /content.vm - /dhis-web-caseentry/report.vm - javascript/commons.js,javascript/report.js - F_GENERATE_PROGRAM_SUMMARY_REPORT - - - - /content.vm - /dhis-web-caseentry/reportDataEntryForm.vm - style/style.css - - - - - /main.vm - /dhis-web-caseentry/statisticalProgramReportSelect.vm - /dhis-web-caseentry/reportsMenu.vm - ../dhis-web-commons/ouwt/ouwt.js,javascript/statisticalReport.js - style/style.css - F_GENERATE_STATISTICAL_PROGRAM_REPORT - - - - /content.vm - /dhis-web-caseentry/statisticalProgramReport.vm - - F_GENERATE_STATISTICAL_PROGRAM_REPORT - - - - - - /dhis-web-caseentry/i18n.vm - - - - - - - /main.vm - /dhis-web-caseentry/caseAggregationForm.vm - /dhis-web-caseentry/caseAggregationMenu.vm - javascript/caseagg.js,javascript/caseAggregationForm.js - style/style.css - F_PATIENT_AGGREGATION - - - - - /dhis-web-caseentry/responseSuccess.vm - - - /dhis-web-caseentry/responseError.vm - - - /dhis-web-caseentry/responseInput.vm - - - - - /content.vm - /dhis-web-caseentry/caseAggregationResult.vm - /dhis-web-caseentry/caseAggregationMenu.vm - F_PATIENT_AGGREGATION - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_DATAVALUE_ADD,F_DATAVALUE_DELETE - - - - /content.vm - /dhis-web-caseentry/caseAggregationResultDetails.vm - - - - - - - /main.vm - /dhis-web-caseentry/selectPatient.vm - /dhis-web-caseentry/registrationMenu.vm - - ../dhis-web-commons/ouwt/ouwt.js - ,javascript/commons.js - ,javascript/patient.js - ,javascript/entry.js - ,javascript/relationshipPatient.js - - style/style.css - F_PATIENT_MANAGEMENT - - - - /content.vm - /dhis-web-caseentry/patientRegistrationList.vm - F_PATIENT_SEARCH - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseError.vm - - plainTextError - F_PATIENT_DELETE - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_ADD - - - - /content.vm - /dhis-web-caseentry/addPatientForm.vm - F_PATIENT_ADD - - - - /content.vm - - /dhis-web-caseentry/updatePatientForm.vm - - - ../dhis-web-commons/javascripts/jQuery/jquery-barcode.min.js - - F_PATIENT_ADD - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_ADD - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - plainTextError - - - - /content.vm - /dhis-web-caseentry/underAgeForm.vm - javascript/underage.js, - ../dhis-web-commons/javascripts/date.js - - style/style.css - F_PATIENT_ADD - - - - responsePatients.vm - - F_PATIENT_SEARCH - - - - responseRepresentative.vm - - F_PATIENT_ADD - - - - /content.vm - - - /dhis-web-caseentry/patientHistory.vm - F_PATIENT_HISTORY - - - - /content.vm - - - /dhis-web-caseentry/programInstanceHistory.vm - - - - /content.vm - /dhis-web-caseentry/patientLocation.vm - F_PATIENT_CHANGE_LOCATION - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_CHANGE_LOCATION - - - - - - /content.vm - /dhis-web-caseentry/programEnrollmentSelectForm.vm - F_PROGRAM_ENROLLMENT - - - - /content.vm - /dhis-web-caseentry/programEnrollmentForm.vm - F_PROGRAM_INSTANCE_MANAGEMENT - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseError.vm - - - /dhis-web-commons/ajax/jsonResponseInput.vm - - - - - - /dhis-web-caseentry/jsonProgramEnrollment.vm - - F_PROGRAM_ENROLLMENT - - - - - /dhis-web-caseentry/responseProgramInstance.vm - - - - - /content.vm - /dhis-web-caseentry/eventMessage.vm - F_PROGRAM_STAGE_INSTANCE_REMINDER - - - - status.vm - plainTextError - F_PROGRAM_ENROLLMENT - - - - status.vm - F_PATIENT_ADD, F_PROGRAM_ENROLLMENT - - - - status.vm - F_PROGRAM_UNENROLLMENT - - - - /content.vm - /dhis-web-caseentry/identifierAndAttributeForm.vm - F_PATIENT_ADD - - - - /content.vm - /dhis-web-caseentry/visitSchedule.vm - F_PROGRAM_ENROLLMENT - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseInput.vm - - plainTextError - - - - - - - /content.vm - /dhis-web-caseentry/detailsPartner.vm - - - - /content.vm - /dhis-web-caseentry/relationshipList.vm - - ../dhis-web-commons/javascripts/jQuery/jquery-barcode.min.js - - F_RELATIONSHIP_MANAGEMENT - - - - /content.vm - /dhis-web-caseentry/addRelationshipForm.vm - F_RELATIONSHIP_ADD - - - - - /dhis-web-commons/ajax/xmlResponseSuccess.vm - - - /dhis-web-commons/ajax/xmlResponseError.vm - - - /dhis-web-commons/ajax/xmlResponseInput.vm - - plainTextError - - - - /content.vm - /dhis-web-caseentry/relationshipPatients.vm - F_RELATIONSHIP_ADD - - - - - /dhis-web-commons/ajax/xmlResponseSuccess.vm - - - /dhis-web-commons/ajax/xmlResponseError.vm - - - /dhis-web-commons/ajax/xmlResponseInput.vm - - plainTextError - F_RELATIONSHIP_ADD - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_RELATIONSHIP_DELETE - - - - - /dhis-web-commons/ajax/xmlResponseSuccess.vm - - - /dhis-web-commons/ajax/xmlResponseError.vm - - - /dhis-web-commons/ajax/xmlResponseInput.vm - - plainTextError - F_RELATIONSHIP_ADD - - - - - /dhis-web-commons/ajax/xmlResponseSuccess.vm - - - /dhis-web-commons/ajax/xmlResponseError.vm - - - /dhis-web-commons/ajax/xmlResponseInput.vm - - plainTextError - F_RELATIONSHIP_DELETE - - - - /content.vm - /dhis-web-caseentry/addRelationshipPatientForm.vm - F_PATIENT_ADD, F_RELATIONSHIP_ADD - - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-caseentry/jsonminOrganisationUnitChildren.vm - - - - - - /dhis-web-caseentry/jsonTabularInitialize.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - /dhis-web-caseentry/jsonProgramStages.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - /dhis-web-caseentry/jsonProgramStageSections.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - /dhis-web-caseentry/responseDataElements.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - /dhis-web-caseentry/responseTabularParams.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseInput.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_TABULAR_REPORT_PUBLIC_ADD,F_PATIENT_TABULAR_REPORT_PRIVATE_ADD - - - - - /dhis-web-caseentry/jsonTabularReportList.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-caseentry/jsonTabularReport.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - - - /dhis-web-caseentry/jsonTabularReportList.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_AGGREGATE_REPORT_PUBLIC_ADD,F_PATIENT_AGGREGATE_REPORT_PRIVATE_ADD - - - - - /dhis-web-caseentry/jsonTabularReportList.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-caseentry/jsonTabularAggregateReport.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - /dhis-web-caseentry/jsonminOrganisationUnitPaths.vm - - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseInput.vm - - F_GENERATE_BENEFICIARY_TABULAR_REPORT - - - - - - - /main.vm - /dhis-web-caseentry/programTrackingSelect.vm - /dhis-web-caseentry/registrationMenu.vm - style/style.css - - ../dhis-web-commons/ouwt/ouwt.js, - javascript/commons.js, - javascript/patient.js, - javascript/relationshipPatient.js, - javascript/entry.js, - javascript/smsReminder.js - - F_PROGRAM_TRACKING_MANAGEMENT - - - - /content.vm - /dhis-web-caseentry/programTrackingRecords.vm - style/style.css - F_PROGRAM_TRACKING_SEARCH - - - - /content.vm - /dhis-web-caseentry/programTrackingList.vm - style/style.css - F_PROGRAM_TRACKING_LIST - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - /dhis-web-commons/ajax/jsonResponseInput.vm - - /dhis-web-commons/ajax/jsonResponseError.vm - - plainTextError - F_MOBILE_SENDSMS - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - /dhis-web-commons/ajax/jsonResponseError.vm - - plainTextError - F_MOBILE_SENDSMS - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - /dhis-web-commons/ajax/jsonResponseError.vm - - F_PROGRAM_ENROLLMENT - - - - /content.vm - /dhis-web-caseentry/trackingEventMessage.vm - style/style.css - - - - - - /content.vm - /dhis-web-caseentry/patientDashboard.vm - style/style.css - F_PATIENT_DASHBOARD - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - - /dhis-web-commons/ajax/jsonResponseError.vm - - F_PROGRAM_INSTANCE_DELETE - - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_COMMENT_ADD - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_COMMENT_DELETE - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_PATIENT_COMMENT_DELETE - - - - - - - /main.vm - /dhis-web-caseentry/activityPlanSelect.vm - /dhis-web-caseentry/registrationMenu.vm - style/style.css - - ../dhis-web-commons/ouwt/ouwt.js, - javascript/commons.js, - javascript/patient.js, - javascript/entry.js, - javascript/relationshipPatient.js, - javascript/activityPlan.js - - F_ACTIVITY_PLAN - - - - /content.vm - /dhis-web-caseentry/activityPlanRecords.vm - style/style.css - - - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_ACCESS_PATIENT_ATTRIBUTES - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_ALLOW_EDIT_PATIENT_PROPERTIES - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_ALLOW_EDIT_PATIENT_ATTRIBUTES - - - - /dhis-web-commons/ajax/jsonResponseSuccess.vm - - F_ALLOW_EDIT_PATIENT_IDENTIFIERS - - - - - - - - /main.vm - /dhis-web-caseentry/programStageCompletenessSelect.vm - /dhis-web-caseentry/reportsMenuWithoutOrgunit.vm - style/style.css - - javascript/commons.js, - javascript/programStageCompleteness.js - - F_PROGRAM_STAGE_COMPLETENESS - - - - /content.vm - /dhis-web-caseentry/programStageCompleteness.vm - style/style.css - - - F_PROGRAM_STAGE_COMPLETENESS - - - + + + + + + /main.vm + /dhis-web-caseentry/index.vm + /dhis-web-caseentry/menu.vm + + + + + + + /dhis-web-caseentry/responseSuccess.vm + + + /dhis-web-caseentry/responseError.vm + + + /dhis-web-caseentry/responseInput.vm + + plainTextError + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_SEARCH_PATIENT_IN_ALL_FACILITIES + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_SEARCH_PATIENT_IN_OTHER_ORGUNITS + + + + /content.vm + /dhis-web-caseentry/listPatient.vm + F_PATIENT_SEARCH + + + + /content.vm + true + /dhis-web-caseentry/listPatient.vm + F_PATIENT_LIST + + + + /content.vm + /dhis-web-caseentry/dataRecordingSelect.vm + style/style.css + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + /dhis-web-caseentry/jsonProgramStageInstances.vm + + + + + /dhis-web-caseentry/jsonProgramStageInstance.vm + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + /content.vm + /dhis-web-caseentry/dataEntryForm.vm + style/style.css + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + /dhis-web-caseentry/jsonResponseProgramCompleted.vm + + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseInput.vm + + plainTextError + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + /dhis-web-caseentry/cacheManifest.vm + + + + + /dhis-web-caseentry/jsonProgramMetaData.vm + + + + + + /main.vm + /dhis-web-caseentry/anonymousRegistration.vm + /dhis-web-caseentry/dataEntryMenu.vm + ../dhis-web-caseentry/cacheManifest.action + ../dhis-web-commons/ouwt/ouwt.js + ,javascript/commons.js + ,javascript/anonymousRegistration.js + ,javascript/entry.js + ,../dhis-web-commons/javascripts/date.js + + style/style.css + F_ANONYMOUS_DATA_ENTRY + + + + /dhis-web-caseentry/jsonSingleEventPrograms.vm + + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseInput.vm + + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + /dhis-web-caseentry/jsonProgramInstances.vm + + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseError.vm + + + + + /dhis-web-caseentry/jsonOptionSet.vm + + + + + /dhis-web-caseentry/jsonUsernames.vm + + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseError.vm + + plainTextError + F_PROGRAM_STAGE_INSTANCE_DELETE + + + + /content.vm + /dhis-web-caseentry/validationResult.vm + + + + /dhis-web-caseentry/jsonOptions.vm + + /dhis-web-caseentry/responseInput.vm + + + + + /dhis-web-caseentry/jsonProgramStageDataElements.vm + + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + + + /dhis-web-caseentry/jsonUsernames.vm + + + + + + /dhis-web-caseentry/jsonminOrganisationUnitPaths.vm + + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + + status.vm + /dhis-web-caseentry/responseInput.vm + + plainTextError + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + plainTextError + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + + status.vm + status.vm + plainTextError + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + + + /main.vm + /dhis-web-caseentry/multiDataEntrySelect.vm + /dhis-web-caseentry/dataEntryMenu.vm + style/style.css + + ../dhis-web-commons/ouwt/ouwt.js, + javascript/commons.js, + javascript/patient.js, + javascript/entry.js, + javascript/relationshipPatient.js, + javascript/multiDataEntry.js + + F_NAME_BASED_DATA_ENTRY + + + + /dhis-web-commons/ajax/jsonPrograms.vm + + + + + /dhis-web-commons/ajax/jsonPrograms.vm + + + + + /content.vm + /dhis-web-caseentry/dataentryRecords.vm + style/style.css + + + + /content.vm + /dhis-web-caseentry/reportDataEntryForm.vm + style/style.css + + + + /content.vm + /dhis-web-caseentry/dataEntryForm.vm + ../dhis-web-commons/javascripts/date.js + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + getDataRecords.action?programId=${programId} + + F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + + + /main.vm + /dhis-web-caseentry/singleEventSelect.vm + /dhis-web-caseentry/dataEntryMenu.vm + ../dhis-web-commons/ouwt/ouwt.js + ,javascript/commons.js + ,javascript/singleEvent.js + ,javascript/form.js + ,javascript/entry.js + ,../dhis-web-commons/javascripts/date.js + + style/style.css + F_SINGLE_EVENT_DATA_ENTRY + + + + /dhis-web-caseentry/jsonSingleEventPrograms.vm + + + + + /content.vm + /dhis-web-caseentry/addSingleEventRegistration.vm + style/style.css + F_PATIENT_ADD,F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + status.vm + F_PATIENT_ADD,F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE + + + + + + + /main.vm + /dhis-web-caseentry/reportSelect.vm + /dhis-web-caseentry/reportsMenu.vm + ../dhis-web-commons/ouwt/ouwt.js,javascript/report.js + style/style.css + F_GENERATE_PROGRAM_SUMMARY_REPORT + + + + /content.vm + /dhis-web-caseentry/report.vm + javascript/commons.js,javascript/report.js + F_GENERATE_PROGRAM_SUMMARY_REPORT + + + + /content.vm + /dhis-web-caseentry/reportDataEntryForm.vm + style/style.css + + + + + /main.vm + /dhis-web-caseentry/statisticalProgramReportSelect.vm + /dhis-web-caseentry/reportsMenu.vm + ../dhis-web-commons/ouwt/ouwt.js,javascript/statisticalReport.js + style/style.css + F_GENERATE_STATISTICAL_PROGRAM_REPORT + + + + /content.vm + /dhis-web-caseentry/statisticalProgramReport.vm + + F_GENERATE_STATISTICAL_PROGRAM_REPORT + + + + + + /dhis-web-caseentry/i18n.vm + + + + + + + /main.vm + /dhis-web-caseentry/caseAggregationForm.vm + /dhis-web-caseentry/caseAggregationMenu.vm + javascript/caseagg.js,javascript/caseAggregationForm.js + style/style.css + F_PATIENT_AGGREGATION + + + + + /dhis-web-caseentry/responseSuccess.vm + + + /dhis-web-caseentry/responseError.vm + + + /dhis-web-caseentry/responseInput.vm + + + + + /content.vm + /dhis-web-caseentry/caseAggregationResult.vm + /dhis-web-caseentry/caseAggregationMenu.vm + F_PATIENT_AGGREGATION + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_DATAVALUE_ADD,F_DATAVALUE_DELETE + + + + /content.vm + /dhis-web-caseentry/caseAggregationResultDetails.vm + + + + + + + /main.vm + /dhis-web-caseentry/selectPatient.vm + /dhis-web-caseentry/registrationMenu.vm + + ../dhis-web-commons/ouwt/ouwt.js + ,javascript/commons.js + ,javascript/patient.js + ,javascript/entry.js + ,javascript/relationshipPatient.js + + style/style.css + F_PATIENT_MANAGEMENT + + + + /content.vm + /dhis-web-caseentry/patientRegistrationList.vm + F_PATIENT_SEARCH + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseError.vm + + plainTextError + F_PATIENT_DELETE + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_ADD + + + + /content.vm + /dhis-web-caseentry/addPatientForm.vm + F_PATIENT_ADD + + + + /content.vm + + /dhis-web-caseentry/updatePatientForm.vm + + + ../dhis-web-commons/javascripts/jQuery/jquery-barcode.min.js + + F_PATIENT_ADD + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_ADD + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + plainTextError + + + + /content.vm + /dhis-web-caseentry/underAgeForm.vm + javascript/underage.js, + ../dhis-web-commons/javascripts/date.js + + style/style.css + F_PATIENT_ADD + + + + responsePatients.vm + + F_PATIENT_SEARCH + + + + responseRepresentative.vm + + F_PATIENT_ADD + + + + /content.vm + + + /dhis-web-caseentry/patientHistory.vm + F_PATIENT_HISTORY + + + + /content.vm + + + /dhis-web-caseentry/programInstanceHistory.vm + + + + /content.vm + /dhis-web-caseentry/patientLocation.vm + F_PATIENT_CHANGE_LOCATION + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_CHANGE_LOCATION + + + + + + /content.vm + /dhis-web-caseentry/programEnrollmentSelectForm.vm + F_PROGRAM_ENROLLMENT + + + + /content.vm + /dhis-web-caseentry/programEnrollmentForm.vm + F_PROGRAM_INSTANCE_MANAGEMENT + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseError.vm + + + /dhis-web-commons/ajax/jsonResponseInput.vm + + + + + + /dhis-web-caseentry/jsonProgramEnrollment.vm + + F_PROGRAM_ENROLLMENT + + + + + /dhis-web-caseentry/responseProgramInstance.vm + + + + + /content.vm + /dhis-web-caseentry/eventMessage.vm + F_PROGRAM_STAGE_INSTANCE_REMINDER + + + + status.vm + plainTextError + F_PROGRAM_ENROLLMENT + + + + status.vm + F_PATIENT_ADD, F_PROGRAM_ENROLLMENT + + + + status.vm + F_PROGRAM_UNENROLLMENT + + + + /content.vm + /dhis-web-caseentry/identifierAndAttributeForm.vm + F_PATIENT_ADD + + + + /content.vm + /dhis-web-caseentry/visitSchedule.vm + F_PROGRAM_ENROLLMENT + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseInput.vm + + plainTextError + + + + + + + /content.vm + /dhis-web-caseentry/detailsPartner.vm + + + + /content.vm + /dhis-web-caseentry/relationshipList.vm + + ../dhis-web-commons/javascripts/jQuery/jquery-barcode.min.js + + F_RELATIONSHIP_MANAGEMENT + + + + /content.vm + /dhis-web-caseentry/addRelationshipForm.vm + F_RELATIONSHIP_ADD + + + + + /dhis-web-commons/ajax/xmlResponseSuccess.vm + + + /dhis-web-commons/ajax/xmlResponseError.vm + + + /dhis-web-commons/ajax/xmlResponseInput.vm + + plainTextError + + + + /content.vm + /dhis-web-caseentry/relationshipPatients.vm + F_RELATIONSHIP_ADD + + + + + /dhis-web-commons/ajax/xmlResponseSuccess.vm + + + /dhis-web-commons/ajax/xmlResponseError.vm + + + /dhis-web-commons/ajax/xmlResponseInput.vm + + plainTextError + F_RELATIONSHIP_ADD + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_RELATIONSHIP_DELETE + + + + + /dhis-web-commons/ajax/xmlResponseSuccess.vm + + + /dhis-web-commons/ajax/xmlResponseError.vm + + + /dhis-web-commons/ajax/xmlResponseInput.vm + + plainTextError + F_RELATIONSHIP_ADD + + + + + /dhis-web-commons/ajax/xmlResponseSuccess.vm + + + /dhis-web-commons/ajax/xmlResponseError.vm + + + /dhis-web-commons/ajax/xmlResponseInput.vm + + plainTextError + F_RELATIONSHIP_DELETE + + + + /content.vm + /dhis-web-caseentry/addRelationshipPatientForm.vm + F_PATIENT_ADD, F_RELATIONSHIP_ADD + + + + + + /content.vm + /dhis-web-caseentry/programStageInstancesList.vm + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-caseentry/jsonminOrganisationUnitChildren.vm + + + + + + /dhis-web-caseentry/jsonTabularInitialize.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + /dhis-web-commons/ajax/jsonProgramStages.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + /dhis-web-caseentry/jsonProgramStageSections.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + /dhis-web-commons/ajax/responseDataElements.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + /dhis-web-caseentry/responseTabularParams.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseInput.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_TABULAR_REPORT_PUBLIC_ADD,F_PATIENT_TABULAR_REPORT_PRIVATE_ADD + + + + + /dhis-web-caseentry/jsonTabularReportList.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-caseentry/jsonTabularReport.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + + + /dhis-web-caseentry/jsonTabularReportList.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_AGGREGATE_REPORT_PUBLIC_ADD,F_PATIENT_AGGREGATE_REPORT_PRIVATE_ADD + + + + + /dhis-web-caseentry/jsonTabularReportList.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-caseentry/jsonTabularAggregateReport.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + /dhis-web-caseentry/jsonminOrganisationUnitPaths.vm + + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseInput.vm + + F_GENERATE_BENEFICIARY_TABULAR_REPORT + + + + + + + /main.vm + /dhis-web-caseentry/programTrackingSelect.vm + /dhis-web-caseentry/registrationMenu.vm + style/style.css + + ../dhis-web-commons/ouwt/ouwt.js, + javascript/commons.js, + javascript/patient.js, + javascript/relationshipPatient.js, + javascript/entry.js, + javascript/smsReminder.js + + F_PROGRAM_TRACKING_MANAGEMENT + + + + /content.vm + /dhis-web-caseentry/programTrackingRecords.vm + style/style.css + F_PROGRAM_TRACKING_SEARCH + + + + /content.vm + /dhis-web-caseentry/programTrackingList.vm + style/style.css + F_PROGRAM_TRACKING_LIST + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + /dhis-web-commons/ajax/jsonResponseInput.vm + + /dhis-web-commons/ajax/jsonResponseError.vm + + plainTextError + F_MOBILE_SENDSMS + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + /dhis-web-commons/ajax/jsonResponseError.vm + + plainTextError + F_MOBILE_SENDSMS + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + /dhis-web-commons/ajax/jsonResponseError.vm + + F_PROGRAM_ENROLLMENT + + + + /content.vm + /dhis-web-caseentry/trackingEventMessage.vm + style/style.css + + + + + + /content.vm + /dhis-web-caseentry/patientDashboard.vm + style/style.css + F_PATIENT_DASHBOARD + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + + /dhis-web-commons/ajax/jsonResponseError.vm + + F_PROGRAM_INSTANCE_DELETE + + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_COMMENT_ADD + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_COMMENT_DELETE + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_PATIENT_COMMENT_DELETE + + + + + + + /main.vm + /dhis-web-caseentry/activityPlanSelect.vm + /dhis-web-caseentry/registrationMenu.vm + style/style.css + + ../dhis-web-commons/ouwt/ouwt.js, + javascript/commons.js, + javascript/patient.js, + javascript/entry.js, + javascript/relationshipPatient.js, + javascript/activityPlan.js + + F_ACTIVITY_PLAN + + + + /content.vm + /dhis-web-caseentry/activityPlanRecords.vm + style/style.css + + + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_ACCESS_PATIENT_ATTRIBUTES + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_ALLOW_EDIT_PATIENT_PROPERTIES + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_ALLOW_EDIT_PATIENT_ATTRIBUTES + + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + F_ALLOW_EDIT_PATIENT_IDENTIFIERS + + + + + + + + /main.vm + /dhis-web-caseentry/programStageCompletenessSelect.vm + /dhis-web-caseentry/reportsMenuWithoutOrgunit.vm + style/style.css + + javascript/commons.js, + javascript/programStageCompleteness.js + + F_PROGRAM_STAGE_COMPLETENESS + + + + /content.vm + /dhis-web-caseentry/programStageCompleteness.vm + style/style.css + + + F_PROGRAM_STAGE_COMPLETENESS + + + === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-10-21 20:30:59 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-11-25 03:07:49 +0000 @@ -785,7 +785,7 @@ $.ajax( { type: "POST", - url: 'searchProgramStageInstances.action', + url: 'searchEvents.action', data: params, dataType: 'text', cache: false, === removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageSections.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageSections.vm 2013-06-06 03:06:52 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageSections.vm 1970-01-01 00:00:00 +0000 @@ -1,10 +0,0 @@ -#set( $size = ${sections.size()} ) -{ "sections": [ - #foreach( ${section} in $!{sections} ) - { - "id": "${section.id}", - "name": "$!encoder.jsonEncode( ${section.displayName} )" - }#if( $velocityCount < $size ),#end - #end - ] -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStages.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStages.vm 2013-01-23 10:27:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStages.vm 1970-01-01 00:00:00 +0000 @@ -1,10 +0,0 @@ -#set( $size = ${programStages.size()} ) -{ "programStages": [ - #foreach( ${programStage} in $!{programStages} ) - { - "id": "${programStage.id}", - "name": "$!encoder.jsonEncode( ${programStage.displayName} )" - }#if( $velocityCount < $size ),#end - #end - ] -} \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonUsers.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonUsers.vm 2013-04-24 06:11:42 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonUsers.vm 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -{ "usernames": [#foreach( $username in $usernames )"$!encoder.jsonEncode("$username")"#if( $velocityCount < $usernames.size() ),#end #end]} \ No newline at end of file === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStageSections.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStageSections.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStageSections.vm 2013-11-25 03:07:49 +0000 @@ -0,0 +1,10 @@ +#set( $size = ${sections.size()} ) +{ "sections": [ + #foreach( ${section} in $!{sections} ) + { + "id": "${section.id}", + "name": "$!encoder.jsonEncode( ${section.displayName} )" + }#if( $velocityCount < $size ),#end + #end + ] +} \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStages.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStages.vm 2013-04-28 14:14:30 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStages.vm 2013-11-25 03:07:49 +0000 @@ -1,10 +1,10 @@ -#set( $size = $associations.size() ) +#set( $size = $programStages.size() ) { "programStages": [ - #foreach( $association in $associations ) + #foreach( $programStage in $programStages ) { - "id": ${association.id} , - "name": "$!encoder.jsonEncode( ${association.displayName} )" + "id": ${programStages.id} , + "name": "$!encoder.jsonEncode( ${programStages.displayName} )" }#if( $velocityCount < $size ),#end #end] } \ No newline at end of file