=== added directory 'dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help' === added file 'dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/DefaultHelpManager.java' --- dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/DefaultHelpManager.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/DefaultHelpManager.java 2010-02-23 17:10:02 +0000 @@ -0,0 +1,70 @@ +package org.hisp.dhis.options.help; + +/* + * Copyright (c) 2004-2007, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import java.io.OutputStream; + +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import org.springframework.core.io.ClassPathResource; + +/** + * @author Lars Helge Overland + */ +public class DefaultHelpManager + implements HelpManager +{ + public void getHelpContent( OutputStream out, String id ) + { + try + { + TransformerFactory factory = TransformerFactory.newInstance(); + + Source stylesheet = new StreamSource( new ClassPathResource( "help_stylesheet.xsl" ).getInputStream() ); + + Transformer transformer = factory.newTransformer( stylesheet ); + + transformer.setParameter( "sectionId", id ); + + Source source = new StreamSource( new ClassPathResource( "help_content.xml" ).getInputStream() ); + + Result result = new StreamResult( out ); + + transformer.transform( source, result ); + } + catch ( Exception ex ) + { + throw new RuntimeException( "Failed to get help content", ex ); + } + } +} === added file 'dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/HelpManager.java' --- dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/HelpManager.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/help/HelpManager.java 2010-02-23 17:10:02 +0000 @@ -0,0 +1,40 @@ +package org.hisp.dhis.options.help; + +/* + * Copyright (c) 2004-2007, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import java.io.OutputStream; + +/** + * @author Lars Helge Overland + */ +public interface HelpManager +{ + final String ID = HelpManager.class.getName(); + + void getHelpContent( OutputStream out, String id ); +} === modified file 'dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml 2010-02-10 17:00:47 +0000 +++ dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml 2010-02-23 17:10:02 +0000 @@ -185,4 +185,7 @@ + + === added file 'dhis-2/dhis-options/src/main/resources/help_content.xml' --- dhis-2/dhis-options/src/main/resources/help_content.xml 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-options/src/main/resources/help_content.xml 2010-02-23 17:10:02 +0000 @@ -0,0 +1,40 @@ + + + Data Quality + The data quality module provides means to improve the quality of the data in the system. This can be done through validation rules and various statistical checks. +
+ Learning Objectives + After reading this module you will be able to understand: + + + What is data quality and its importance for HMIS. + + + How to do data quality check at point of data entry. + + + How to create data validation rules. + + + How to carry out data triangulation. + + + How to analyze data status. + + + This stuff is in a paragraph +
+
+ Overview of data quality check + Ensuring data quality is a key concern in building an effective HMIS. Data quality has different dimensions including: + + + Correctness: Data should be within the normal range for data collected at that facility. There should be no gross discrepancies when compared with data from related data elements. + + + Completeness: Data for all data elements for all health facilities/blocks/Taluka/districts should have been submitted. + + + This stuff is in a paragraph +
+
=== added file 'dhis-2/dhis-options/src/main/resources/help_stylesheet.xsl' --- dhis-2/dhis-options/src/main/resources/help_stylesheet.xsl 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-options/src/main/resources/help_stylesheet.xsl 2010-02-23 17:10:02 +0000 @@ -0,0 +1,34 @@ + + + +learningObjectives + + +

+
+ + +

+
+ + +
    + +
  1. +
    +
+
+ + +
    + +
  • +
    +
+
+ + + + + +
=== added directory 'dhis-2/dhis-options/src/test/java/org/hisp/dhis/options/help' === added file 'dhis-2/dhis-options/src/test/java/org/hisp/dhis/options/help/HelpManagerTest.java' --- dhis-2/dhis-options/src/test/java/org/hisp/dhis/options/help/HelpManagerTest.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-options/src/test/java/org/hisp/dhis/options/help/HelpManagerTest.java 2010-02-23 17:10:02 +0000 @@ -0,0 +1,62 @@ +package org.hisp.dhis.options.help; + +/* + * Copyright (c) 2004-2007, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import java.io.ByteArrayOutputStream; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.hisp.dhis.DhisSpringTest; +import org.junit.Test; + +/** + * @author Lars Helge Overland + */ +public class HelpManagerTest + extends DhisSpringTest +{ + private static final Log log = LogFactory.getLog( HelpManagerTest.class ); + + private HelpManager helpManager; + + @Override + public void setUpTest() + { + helpManager = (HelpManager) getBean( HelpManager.ID ); + } + + @Test + public void testGetHelpContent() + { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + + helpManager.getHelpContent( out, "overview" ); + + log.debug( out.toString() ); + } +} === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormAssociationService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormAssociationService.java 2010-02-22 15:25:35 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormAssociationService.java 2010-02-23 17:10:02 +0000 @@ -30,11 +30,6 @@ import java.util.Collection; import java.util.List; -import org.hisp.dhis.dataentryform.DataEntryForm; -import org.hisp.dhis.dataentryform.DataEntryFormAssociation; -import org.hisp.dhis.dataentryform.DataEntryFormAssociationService; -import org.hisp.dhis.dataentryform.DataEntryFormAssociationStore; -import org.hisp.dhis.dataentryform.DataEntryFormService; import org.springframework.transaction.annotation.Transactional; /** @@ -44,7 +39,6 @@ public class DefaultDataEntryFormAssociationService implements DataEntryFormAssociationService { - // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- @@ -56,13 +50,6 @@ this.dataEntryFormAssociationStore = dataEntryFormAssociationStore; } - private DataEntryFormService dataEntryFormService; - - public void setDataEntryFormService( DataEntryFormService dataEntryFormService ) - { - this.dataEntryFormService = dataEntryFormService; - } - // ------------------------------------------------------------------------- // DataEntryFormAssociationService implementation // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2010-02-23 14:38:20 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2010-02-23 17:10:02 +0000 @@ -7,6 +7,7 @@ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> + === added file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/help/action/GetHelpContentAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/help/action/GetHelpContentAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/help/action/GetHelpContentAction.java 2010-02-23 17:10:02 +0000 @@ -0,0 +1,77 @@ +package org.hisp.dhis.help.action; + +/* + * Copyright (c) 2004-2007, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import java.io.OutputStream; + +import javax.servlet.http.HttpServletResponse; + +import org.hisp.dhis.options.help.HelpManager; +import org.hisp.dhis.util.StreamActionSupport; + +/** + * @author Lars Helge Overland + */ +public class GetHelpContentAction + extends StreamActionSupport +{ + private HelpManager helpManager; + + public void setHelpManager( HelpManager helpManager ) + { + this.helpManager = helpManager; + } + + private String id; + + public void setId( String id ) + { + this.id = id; + } + + @Override + protected String execute( HttpServletResponse response, OutputStream out ) + throws Exception + { + helpManager.getHelpContent( out, id ); + + return SUCCESS; + } + + @Override + protected String getContentType() + { + return CONTENT_TYPE_HTML; + } + + @Override + protected String getFilename() + { + return "help.html"; + } +} === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2010-02-04 11:04:36 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2010-02-23 17:10:02 +0000 @@ -534,7 +534,12 @@ - + + + + + /popup.vm /dhis-web-commons/help/helpPopup.vm + + + +