=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/inbound/HibernateIncomingSmsStore.java' --- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/inbound/HibernateIncomingSmsStore.java 2012-06-06 07:48:54 +0000 +++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/inbound/HibernateIncomingSmsStore.java 2012-06-18 10:29:46 +0000 @@ -91,11 +91,12 @@ @Override public Collection getAllSmses() { - return sessionFactory.getCurrentSession().createCriteria( IncomingSms.class ).addOrder( Order.asc( "id" ) ).list(); + return sessionFactory.getCurrentSession().createCriteria( IncomingSms.class ).addOrder( Order.desc( "id" ) ).list(); } @Override public long getSmsCount() + { Session session = sessionFactory.getCurrentSession(); Criteria criteria = session.createCriteria( IncomingSms.class ); === added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous' === added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action' === added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/GetAllAnonymousProgramAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/GetAllAnonymousProgramAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/GetAllAnonymousProgramAction.java 2012-06-18 10:29:46 +0000 @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2004-2012, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.hisp.dhis.light.anonymous.action; + +import java.util.ArrayList; +import java.util.Collection; + + + +import org.hisp.dhis.program.Program; +import org.hisp.dhis.program.ProgramService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Nguyen Kim Lai + * + * @version $ GetAnonymousProgramAction.java $ + */ + +public class GetAllAnonymousProgramAction + implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private ProgramService programService; + + public void setProgramService( ProgramService programService ) + { + this.programService = programService; + } + + // ------------------------------------------------------------------------- + // Output + // ------------------------------------------------------------------------- + + private Collection programs = new ArrayList(); + + public Collection getPrograms() + { + return programs; + } + + // ------------------------------------------------------------------------- + // Implementation Action + // ------------------------------------------------------------------------- + + @Override + public String execute() + throws Exception + { + programs = programService.getPrograms( Program.SINGLE_EVENT_WITHOUT_REGISTRATION ); + return SUCCESS; + } +} === added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/SaveAnonymousProgramAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/SaveAnonymousProgramAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/SaveAnonymousProgramAction.java 2012-06-18 10:29:46 +0000 @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2004-2012, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.hisp.dhis.light.anonymous.action; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts2.ServletActionContext; +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementService; +import org.hisp.dhis.light.utils.NamebasedUtils; +import org.hisp.dhis.patientdatavalue.PatientDataValue; +import org.hisp.dhis.patientdatavalue.PatientDataValueService; +import org.hisp.dhis.program.Program; +import org.hisp.dhis.program.ProgramInstance; +import org.hisp.dhis.program.ProgramInstanceService; +import org.hisp.dhis.program.ProgramService; +import org.hisp.dhis.program.ProgramStage; +import org.hisp.dhis.program.ProgramStageDataElement; +import org.hisp.dhis.program.ProgramStageInstance; +import org.hisp.dhis.program.ProgramStageInstanceService; +import org.hisp.dhis.util.ContextUtils; + +import com.opensymphony.xwork2.Action; +import com.opensymphony.xwork2.ActionContext; + +/** + * @author Nguyen Kim Lai + * + * @version $ SaveAnonymousProgramAction.java Jun 14, 2012 $ + */ +public class SaveAnonymousProgramAction + implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private ProgramService programService; + + public void setProgramService( ProgramService programService ) + { + this.programService = programService; + } + + private ProgramStageInstanceService programStageInstanceService; + + public void setProgramStageInstanceService( ProgramStageInstanceService programStageInstanceService ) + { + this.programStageInstanceService = programStageInstanceService; + } + + private ProgramInstanceService programInstanceService; + + public void setProgramInstanceService( ProgramInstanceService programInstanceService ) + { + this.programInstanceService = programInstanceService; + } + + private PatientDataValueService patientDataValueService; + + public void setPatientDataValueService( PatientDataValueService patientDataValueService ) + { + this.patientDataValueService = patientDataValueService; + } + + private DataElementService dataElementService; + + public void setDataElementService( DataElementService dataElementService ) + { + this.dataElementService = dataElementService; + } + + private NamebasedUtils util; + + public NamebasedUtils getUtil() + { + return util; + } + + public void setUtil( NamebasedUtils util ) + { + this.util = util; + } + + // ------------------------------------------------------------------------- + // Input Output + // ------------------------------------------------------------------------- + + private Map typeViolations = new HashMap(); + + public Map getTypeViolations() + { + return typeViolations; + } + + private Map prevDataValues = new HashMap(); + + public Map getPrevDataValues() + { + return prevDataValues; + } + + private Integer programId; + + public Integer getProgramId() + { + return programId; + } + + public void setProgramId( Integer programId ) + { + this.programId = programId; + } + + List dataElements = new ArrayList(); + + public List getDataElements() + { + return dataElements; + } + + public void setDataElements( List dataElements ) + { + this.dataElements = dataElements; + } + + private ArrayList programStageDataElements = new ArrayList(); + + public ArrayList getProgramStageDataElements() + { + return this.programStageDataElements; + } + + static final Comparator OrderBySortOrder = new Comparator() + { + public int compare( ProgramStageDataElement i1, ProgramStageDataElement i2 ) + { + return i1.getSortOrder().compareTo( i2.getSortOrder() ); + } + }; + + // ------------------------------------------------------------------------- + // Implementation Action + // ------------------------------------------------------------------------- + + @Override + public String execute() + throws Exception + { + + Program program = programService.getProgram( programId ); + + // ------------------------------------------------------------------------- + // Getting all data from UI + // ------------------------------------------------------------------------- + + ProgramStage programStage = program.getProgramStages().iterator().next(); + + programStageDataElements = new ArrayList( programStage.getProgramStageDataElements() ); + + for ( ProgramStageDataElement each : programStageDataElements ) + { + dataElements.add( each.getDataElement() ); + } + + Collections.sort( programStageDataElements, OrderBySortOrder ); + + HttpServletRequest request = (HttpServletRequest) ActionContext.getContext().get( + ServletActionContext.HTTP_REQUEST ); + + Map parameterMap = ContextUtils.getParameterMap( request ); + + typeViolations.clear(); + + prevDataValues.clear(); + + // ------------------------------------------------------------------------- + // Validation + // ------------------------------------------------------------------------- + + for ( String key : parameterMap.keySet() ) + { + if ( key.startsWith( "DE" ) ) + { + Integer dataElementId = Integer.parseInt( key.substring( 2, key.length() ) ); + + String value = parameterMap.get( key ); + + DataElement dataElement = dataElementService.getDataElement( dataElementId ); + + value = value.trim(); + + Boolean valueIsEmpty = (value == null || value.length() == 0); + + if ( !valueIsEmpty ) + { + String typeViolation = util.getTypeViolation( dataElement, value ); + + if ( typeViolation != null ) + { + typeViolations.put( key, typeViolation ); + } + prevDataValues.put( key, value ); + } + } + } + + if ( !typeViolations.isEmpty() ) + { + return ERROR; + } + + ProgramInstance programInstance = new ProgramInstance(); + + programInstance.setEnrollmentDate( new Date() ); + + programInstance.setDateOfIncident( new Date() ); + + programInstance.setProgram( program ); + + programInstance.setCompleted( false ); + + programInstanceService.addProgramInstance( programInstance ); + + ProgramStageInstance programStageInstance = new ProgramStageInstance(); + + programStageInstance.setProgramInstance( programInstance ); + + programStageInstance.setProgramStage( programStage ); + + programStageInstance.setDueDate( new Date() ); + + programStageInstance.setExecutionDate( new Date() ); + + programStageInstance.setCompleted( false ); + + programStageInstanceService.addProgramStageInstance( programStageInstance ); + + for ( ProgramStageDataElement programStageDataElement : programStageDataElements ) + { + DataElement dataElement = programStageDataElement.getDataElement(); + + PatientDataValue patientDataValue = new PatientDataValue(); + + patientDataValue.setDataElement( dataElement ); + + String id = "DE" + dataElement.getId(); + + patientDataValue.setValue( parameterMap.get( id ) ); + + patientDataValue.setProgramStageInstance( programStageInstance ); + + patientDataValue.setProvidedElsewhere( false ); + + patientDataValue.setTimestamp( new Date() ); + + patientDataValueService.savePatientDataValue( patientDataValue ); + } + + return SUCCESS; + } + +} === added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/ShowAnonymousFormAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/ShowAnonymousFormAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/ShowAnonymousFormAction.java 2012-06-18 10:29:46 +0000 @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2004-2012, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.hisp.dhis.light.anonymous.action; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Set; + +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.program.Program; +import org.hisp.dhis.program.ProgramService; +import org.hisp.dhis.program.ProgramStage; +import org.hisp.dhis.program.ProgramStageDataElement; + +import com.opensymphony.xwork2.Action; + +/** + * @author Nguyen Kim Lai + * + * @version $ ShowAnonymousFormAction.java $ + */ +public class ShowAnonymousFormAction implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private ProgramService programService; + + public void setProgramService( ProgramService programService ) + { + this.programService = programService; + } + + // ------------------------------------------------------------------------- + // Input & Output + // ------------------------------------------------------------------------- + + Integer programId; + + public void setProgramId( Integer programId ) + { + this.programId = programId; + } + + public Integer getProgramId() + { + return programId; + } + + List dataElements = new ArrayList(); + + public List getDataElements() + { + return dataElements; + } + + // ------------------------------------------------------------------------- + // Implementation Action + // ------------------------------------------------------------------------- + + @Override + public String execute() + throws Exception + { + + Program program = programService.getProgram( programId ); + + Collection programStages = program.getProgramStages(); + + Set programStageDataElement = null; + + for( ProgramStage each: programStages ) + { + programStageDataElement = each.getProgramStageDataElements(); + } + + if( programStageDataElement != null ) + { + for( ProgramStageDataElement each: programStageDataElement ) + { + dataElements.add( each.getDataElement() ); + } + } + return SUCCESS; + } + +} === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java 2012-05-24 14:51:18 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/singleevent/action/SaveSingleEventAction.java 2012-06-18 10:29:46 +0000 @@ -304,7 +304,6 @@ PatientDataValue patientDataValue = new PatientDataValue(); patientDataValue.setDataElement( dataElement ); - patientDataValue.setProgramStageInstance( programStageInstance ); patientDataValue.setValue( dynForm.get( i ).trim() ); patientDataValue.setProgramStageInstance( programStageInstance ); patientDataValueService.savePatientDataValue( patientDataValue ); === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-06-11 10:11:21 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-06-18 10:29:46 +0000 @@ -1,523 +1,462 @@ - - - - - - + + + + + - - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + + - + - - + + - - - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + + + + ref="org.hisp.dhis.dataanalysis.StdDevOutlierAnalysisService" /> + ref="org.hisp.dhis.dataanalysis.MinMaxOutlierAnalysisService" /> + ref="org.hisp.dhis.minmax.validation.MinMaxValuesGenerationService" /> - + ref="org.hisp.dhis.minmax.MinMaxDataElementService" /> + - + ref="org.hisp.dhis.validation.ValidationRuleService" /> + - + + ref="org.hisp.dhis.light.dataentry.utils.FormUtils" /> - + + class="org.hisp.dhis.light.dataentry.action.GetDataSetsAction" scope="prototype"> + ref="org.hisp.dhis.light.dataentry.utils.FormUtils" /> + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> - + + class="org.hisp.dhis.light.dataentry.action.GetPeriodsAction" scope="prototype"> + ref="org.hisp.dhis.light.dataentry.utils.FormUtils" /> - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + + ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" /> - + - - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + + + ref="org.hisp.dhis.light.dataentry.utils.FormUtils" /> - + - + class="org.hisp.dhis.light.dataentry.action.MarkComplete" scope="prototype"> + - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + - + ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" /> + - + - - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + + + ref="org.hisp.dhis.light.dataentry.utils.FormUtils" /> - + - + - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + - - + ref="org.hisp.dhis.dataelement.DataElementCategoryService" /> + + - + ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" /> + + ref="org.hisp.dhis.light.dataentry.utils.FormUtils" /> - + - + - + - + + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + ref="org.hisp.dhis.mobile.api.ActivityReportingService" /> - + - + scope="prototype" /> + + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> - + ref="org.hisp.dhis.mobile.api.ActivityReportingService" /> + - + - + + ref="org.hisp.dhis.program.ProgramStageInstanceService" /> - - - - - - - + ref="org.hisp.dhis.patientdatavalue.PatientDataValueService" /> + + + + + + + + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> - - - - - + ref="org.hisp.dhis.mobile.api.ActivityReportingService" /> + + + + + - + - + - + - + - + - + - + - - - + + + + ref="org.hisp.dhis.relationship.RelationshipService" /> - + ref="org.hisp.dhis.relationship.RelationshipTypeService" /> + - + - - + + - + - - + + - + - - + + + ref="org.hisp.dhis.program.ProgramStageInstanceService" /> - + - - - + ref="org.hisp.dhis.relationship.RelationshipTypeService" /> + + + - + ref="org.hisp.dhis.relationship.RelationshipTypeService" /> + - - - + ref="org.hisp.dhis.relationship.RelationshipService" /> + - + - + - + - + - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + - + - + - + - + - + - + - + - - - + + + - + - - + + - + - - - + + + + ref="org.hisp.dhis.program.ProgramStageInstanceService" /> + ref="org.hisp.dhis.light.dataentry.utils.FormUtils" /> - + - + - + + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> - + - + - - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + + - + - + - + - - + + - + ref="org.hisp.dhis.program.ProgramStageInstanceService" /> + + ref="org.hisp.dhis.patientdatavalue.PatientDataValueService" /> - + ref="org.hisp.dhis.organisationunit.OrganisationUnitService" /> + - + - + - - - + + + - + - + class="org.hisp.dhis.light.dashboard.action.GetReportAction" scope="prototype"> + - + - + class="org.hisp.dhis.light.dashboard.action.GetChartAction" scope="prototype"> + - + - + + ref="org.hisp.dhis.oust.manager.SelectionTreeManager" /> - + - + + class="org.hisp.dhis.light.settings.action.GetSettingsAction" scope="prototype"> - - + ref="org.hisp.dhis.i18n.resourcebundle.ResourceBundleManager" /> + + - + - - - + + + - + - + - + class="org.hisp.dhis.light.message.action.GetMessagesAction" scope="prototype"> + - + - - + class="org.hisp.dhis.light.message.action.GetMessageAction" scope="prototype"> + + - + - + class="org.hisp.dhis.light.message.action.SendReplyAction" scope="prototype"> + - + - + class="org.hisp.dhis.light.message.action.SendFeedbackAction" scope="prototype"> + + + + + + + + + + + + + + + + + - + === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2012-06-11 10:11:21 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2012-06-18 10:29:46 +0000 @@ -3,85 +3,89 @@ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> - + - - + + /dhis-web-light/main.vm /dhis-web-light/menu.vm - + - + /dhis-web-light/main.vm /dhis-web-light/selectOrganisationUnit.vm - /mobile/selectDataSet.action?organisationUnitId=${organisationUnitId} + /mobile/selectDataSet.action?organisationUnitId=${organisationUnitId} + - /mobile/selectPeriod.action?organisationUnitId=${organisationUnitId}&dataSetId=${dataSetId} + /mobile/selectPeriod.action?organisationUnitId=${organisationUnitId}&dataSetId=${dataSetId} + - + /dhis-web-light/main.vm /dhis-web-light/selectDataSet.vm - /mobile/selectPeriod.action?organisationUnitId=${organisationUnitId}&dataSetId=${dataSetId} + /mobile/selectPeriod.action?organisationUnitId=${organisationUnitId}&dataSetId=${dataSetId} + - + /dhis-web-light/main.vm /dhis-web-light/selectPeriod.vm - + /dhis-web-light/main.vm /dhis-web-light/dataEntryOverview.vm - + /dhis-web-light/main.vm /dhis-web-light/dataEntrySection.vm - + - /mobile/dataEntry.action?organisationUnitId=${organisationUnitId}&dataSetId=${dataSetId}&periodId=${periodId}&sectionId=${sectionId}&validated=${validated} + /mobile/dataEntry.action?organisationUnitId=${organisationUnitId}&dataSetId=${dataSetId}&periodId=${periodId}&sectionId=${sectionId}&validated=${validated} + /dhis-web-light/main.vm /dhis-web-light/dataEntrySection.vm F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE - + - /mobile/index.action?organisationUnitId=${organisationUnitId}&dataSetId=${dataSetId}&periodId=${periodId}&complete=true + /mobile/index.action?organisationUnitId=${organisationUnitId}&dataSetId=${dataSetId}&periodId=${periodId}&complete=true + - - - - + + + + /dhis-web-light/main.vm /dhis-web-light/trackingMenu.vm - - + @@ -89,60 +93,63 @@ /dhis-web-light/namebased/selectNamebasedOrganisationUnits.vm - + /dhis-web-light/main.vm /dhis-web-light/namebased/selectActivityType.vm - + /dhis-web-light/main.vm /dhis-web-light/beneficiaryList.vm - + /dhis-web-light/main.vm /dhis-web-light/namebased/selectActivity.vm - + /dhis-web-light/main.vm /dhis-web-light/namebased/programStageForm.vm - + /dhis-web-light/main.vm /dhis-web-light/namebased/completedProgramStageForm.vm - + - /mobile/selectBeneficiary.action?organisationUnitId=${orgUnitId}&current=${current}&validated=true + /mobile/selectBeneficiary.action?organisationUnitId=${orgUnitId}&current=${current}&validated=true + - /mobile/showPatientProgramStageList.action?patientId=${patientId}&programInstanceId=${programInstanceId}&programId=${programId}&validated=true - showRepeatableEventRegistrationForm.action?programInstanceId=${programInstanceId}&programStageId=${programStageId}&currentProgramStageInstanceId=${programStageInstanceId} + /mobile/showPatientProgramStageList.action?patientId=${patientId}&programInstanceId=${programInstanceId}&programId=${programId}&validated=true + + showRepeatableEventRegistrationForm.action?programInstanceId=${programInstanceId}&programStageId=${programStageId}&currentProgramStageInstanceId=${programStageInstanceId} + /dhis-web-light/main.vm /dhis-web-light/namebased/programStageForm.vm - + /dhis-web-light/main.vm /dhis-web-light/namebased/beneficiaryDetail.vm - + @@ -150,7 +157,7 @@ /dhis-web-light/namebased/beneficiaryDetail.vm showPatientProgramList.action?patientId=${patientId} - + @@ -158,7 +165,7 @@ /dhis-web-light/namebased/findBeneficiaryForm.vm - + @@ -166,16 +173,17 @@ /dhis-web-light/namebased/findRelatedPatientForm.vm - + - showPatientProgramList.action?patientId=${patientId} + showPatientProgramList.action?patientId=${patientId} + /dhis-web-light/main.vm /dhis-web-light/namebased/beneficiaryList.vm - + @@ -183,21 +191,23 @@ /dhis-web-light/namebased/addNewRelationshipForm.vm - + - showAddNewRelationshipForm.action?originalPatientId=${originalPatientId}&relatedPatientId=${patientId}&relationshipTypeId=${relationshipTypeId} + showAddNewRelationshipForm.action?originalPatientId=${originalPatientId}&relatedPatientId=${patientId}&relationshipTypeId=${relationshipTypeId} + /dhis-web-light/main.vm /dhis-web-light/namebased/relatedPatientList.vm - + - showPatientProgramList.action?patientId=${originalPatientId}&validated=true + showPatientProgramList.action?patientId=${originalPatientId}&validated=true + - + @@ -205,7 +215,7 @@ /dhis-web-light/namebased/beneficiaryProgramList.vm - + @@ -213,7 +223,7 @@ /dhis-web-light/namebased/beneficiaryProgramStageList.vm - + @@ -221,14 +231,15 @@ /dhis-web-light/namebased/repeatableEventRegistrationForm.vm - + - showPatientProgramStageList.action?patientId=${patientId}&programInstanceId=${programInstanceId}&programId=${programId}&validated=false + showPatientProgramStageList.action?patientId=${patientId}&programInstanceId=${programInstanceId}&programId=${programId}&validated=false + - + - + @@ -236,7 +247,7 @@ /dhis-web-light/registration/selectRegistrationOrganisationUnits.vm - + @@ -244,7 +255,7 @@ /dhis-web-light/registration/beneficiaryRegistrationForm.vm - + @@ -252,9 +263,9 @@ /dhis-web-light/registration/beneficiaryRegistrationForm.vm - + - + @@ -262,7 +273,7 @@ /dhis-web-light/enrollment/selectEnrollmentOrganisationUnits.vm - + @@ -270,111 +281,121 @@ /dhis-web-light/enrollment/beneficiarySearchingForm.vm - + /dhis-web-light/main.vm - /dhis-web-light/enrollment/beneficiarySearchResult.vm + + /dhis-web-light/enrollment/beneficiarySearchResult.vm - + /dhis-web-light/main.vm - /dhis-web-light/enrollment/enrollmentProgramList.vm + + /dhis-web-light/enrollment/enrollmentProgramList.vm - + /dhis-web-light/main.vm - /dhis-web-light/enrollment/programEnrollmentForm.vm + + /dhis-web-light/enrollment/programEnrollmentForm.vm - + - /mobile/selectEnrollmentProgram.action?patientId=${patientId}&validated=true + /mobile/selectEnrollmentProgram.action?patientId=${patientId}&validated=true + /dhis-web-light/main.vm /dhis-web-light/enrollment/programEnrollmentForm.vm - + - + /dhis-web-light/main.vm /dhis-web-light/singleevent/selectSingleEvent.vm - + /dhis-web-light/main.vm /dhis-web-light/singleevent/selectSingleEventBeneficiary.vm - + /dhis-web-light/main.vm /dhis-web-light/singleevent/singleEventForm.vm - + - /mobile/selectSingleEventBeneficiary.action?programId=${programId}&organisationUnitId=${organisationUnitId}&validated=true + /mobile/selectSingleEventBeneficiary.action?programId=${programId}&organisationUnitId=${organisationUnitId}&validated=true + /dhis-web-light/main.vm /dhis-web-light/singleevent/singleEventForm.vm - + - + /dhis-web-light/main.vm /dhis-web-light/reports.vm - + - /dhis-web-light/dashboard_page.vm + /dhis-web-light/dashboard_page.vm + /dhis-web-light/dashboard_charts.vm - + - /dhis-web-light/dashboard_page.vm + /dhis-web-light/dashboard_page.vm + /dhis-web-light/dashboard_reports.vm - + - /dhis-web-light/dashboard_page.vm + /dhis-web-light/dashboard_page.vm + /dhis-web-light/dashboard_documents.vm - + - /dhis-web-light/dashboard_page.vm + /dhis-web-light/dashboard_page.vm + /dhis-web-commons/ajax/htmlGrid.vm - + - /dhis-web-light/dashboard_page.vm + /dhis-web-light/dashboard_page.vm + /dhis-web-light/inputReportParamsForm.vm - + @@ -382,53 +403,75 @@ 800 - + - + /dhis-web-light/main.vm /dhis-web-light/settings.vm - + /mobile/index.action - + - + /dhis-web-light/main.vm /dhis-web-light/messages.vm - + /dhis-web-light/main.vm /dhis-web-light/message.vm - + /mobile/messages.action - + /dhis-web-light/main.vm /dhis-web-light/feedback.vm - + /mobile/index.action + + + + + + /dhis-web-light/main.vm + /dhis-web-light/anonymous/anonymousProgramSelection.vm + + + + + /dhis-web-light/main.vm + /dhis-web-light/anonymous/anonymousProgramForm.vm + + + + + /mobile/anonymous.action + /dhis-web-light/main.vm + /dhis-web-light/anonymous/anonymousProgramForm.vm - === added directory 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous' === added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramForm.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramForm.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramForm.vm 2012-06-18 10:29:46 +0000 @@ -0,0 +1,107 @@ + +

Anonymous Form

+ +#set( $typeViolationsSize = $typeViolations.size() ) +#if( $typeViolationsSize > 0 ) +
+

$i18n.getString("warnings_and_errors")

+

+ $typeViolationsSize $i18n.getString("type_violation_errors").
+

+
+#end + +
+ +
+

+ #foreach( $dataElement in $dataElements) + #if( $dataElement.shortName ) + #set( $dataElementName = $dataElement.shortName ) + #else + #set( $dataElementName = $dataElement.name ) + #end + #if (! $dataElement.getOptionSet()) + + #set( $key = "DE${dataElement.id}" ) + +
+ + #if( $typeViolations.get( $key ) ) + #set( $typeViolation = $typeViolations.get( $key ) ) +
$prevDataValues.get($key) $i18n.getString($typeViolation) + #end + + #if($dataElement.type=="bool") + + #else + + #end + + #elseif ($dataElement.getOptionSet()) + + #set( $options = $dataElement.getOptionSet().getOptions() ) + #set( $key = "DE${dataElement.id}" ) + + $dataElementName + + #if( $typeViolations.get( $key ) ) + #set( $typeViolation = $typeViolations.get( $key ) ) +
$prevDataValues.get($key) $i18n.getString($typeViolation) + #end + + + #end + #end +

+
+ +
+

+ +

+
+ +
+ + + === added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramSelection.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramSelection.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramSelection.vm 2012-06-18 10:29:46 +0000 @@ -0,0 +1,18 @@ + +

Anonymous Menu

+

+

+

+ + \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm 2012-05-15 07:40:06 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm 2012-06-18 10:29:46 +0000 @@ -25,6 +25,7 @@
  • $i18n.getString( "messages" ) #if($unreadMessageConversationCount > 0)($unreadMessageConversationCount)#end
  • $i18n.getString( "reports" )
  • $i18n.getString( "settings" )
  • +
  • Anonymous
  • === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm 2012-06-06 07:48:54 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm 2012-06-18 10:29:46 +0000 @@ -129,6 +129,7 @@ function ( json ) { if ( json.response == "success" ) { + //window.confirm( jQuery( 'a[id=' + idText + ']' ).html() ); //jQuery( 'label[id=' + idText + '] > a' ).html( getFieldValue( idInput ) ); jQuery( 'a[id=' + idText + ']' ).html( getFieldValue( idInput ) ); showSuccessMessage( "$i18n.getString( 'update_success' )" ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/showSentSMSPage.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/showSentSMSPage.vm 2012-06-04 06:37:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/showSentSMSPage.vm 2012-06-18 10:29:46 +0000 @@ -1,6 +1,5 @@

    $i18n.getString( 'list_sent_SMS' )

    -$ListOutboundSMS.size()
    $i18n.getString( "no." )