dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16638
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6369: (local) Add searching data elements by dataset and display them into data entry form.
------------------------------------------------------------
revno: 6369
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-03-24 08:29:01 +0700
message:
(local) Add searching data elements by dataset and display them into data entry form.
added:
local/vn/dhis-service-vn/
local/vn/dhis-service-vn/pom.xml
local/vn/dhis-service-vn/src/
local/vn/dhis-service-vn/src/main/
local/vn/dhis-service-vn/src/main/java/
local/vn/dhis-service-vn/src/main/java/org/
local/vn/dhis-service-vn/src/main/java/org/hisp/
local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/
local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/
local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/DefaultLocalDataElementService.java
local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/LocalDataElementService.java
local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/LocalDataElementStore.java
local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate/
local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateLocalDataElementStore.java
local/vn/dhis-service-vn/src/main/resources/
local/vn/dhis-service-vn/src/main/resources/META-INF/
local/vn/dhis-service-vn/src/main/resources/META-INF/dhis/
local/vn/dhis-service-vn/src/main/resources/META-INF/dhis/beans.xml
local/vn/dhis-service-vn/src/main/resources/org/
local/vn/dhis-service-vn/src/main/resources/org/hisp/
local/vn/dhis-service-vn/src/main/resources/org/hisp/dhis/
local/vn/dhis-web-dataentry-hospital/
local/vn/dhis-web-dataentry-hospital/pom.xml
local/vn/dhis-web-dataentry-hospital/src/
local/vn/dhis-web-dataentry-hospital/src/main/
local/vn/dhis-web-dataentry-hospital/src/main/java/
local/vn/dhis-web-dataentry-hospital/src/main/java/org/
local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/
local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/
local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement/
local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement/LoadFormAction.java
local/vn/dhis-web-dataentry-hospital/src/main/resources/
local/vn/dhis-web-dataentry-hospital/src/main/resources/META-INF/
local/vn/dhis-web-dataentry-hospital/src/main/resources/META-INF/dhis/
local/vn/dhis-web-dataentry-hospital/src/main/resources/META-INF/dhis/beans.xml
local/vn/dhis-web-dataentry-hospital/src/main/resources/org/
local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/
local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/
local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module.properties
local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_en_GB.properties
local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_pt_PT.properties
local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_vi_VN.properties
local/vn/dhis-web-dataentry-hospital/src/main/resources/struts.xml
local/vn/dhis-web-dataentry-hospital/src/main/webapp/
local/vn/dhis-web-dataentry-hospital/src/main/webapp/WEB-INF/
local/vn/dhis-web-dataentry-hospital/src/main/webapp/WEB-INF/lib/
local/vn/dhis-web-dataentry-hospital/src/main/webapp/WEB-INF/web.xml
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/customForm.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/defaultForm.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/history.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/entry.js
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/form.js
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/history.js
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/menu.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseDataSets.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseDataValues.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseLockStatus.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseMetaData.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responsePeriods.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseVoid.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/sectionForm.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/select.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/status.vm
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/style/
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css
local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/validationResult.vm
modified:
local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml
local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== added directory 'local/vn/dhis-service-vn'
=== added file 'local/vn/dhis-service-vn/pom.xml'
--- local/vn/dhis-service-vn/pom.xml 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-service-vn/pom.xml 2012-03-24 01:29:01 +0000
@@ -0,0 +1,33 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hisp.dhis</groupId>
+ <artifactId>dhis-services</artifactId>
+ <version>2.8-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>dhis-service-vn</artifactId>
+ <packaging>jar</packaging>
+ <name>DHIS VN Service</name>
+
+ <dependencies>
+
+ <!-- DHIS -->
+
+ <dependency>
+ <groupId>org.hisp.dhis</groupId>
+ <artifactId>dhis-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hisp.dhis</groupId>
+ <artifactId>dhis-service-core</artifactId>
+ </dependency>
+
+ </dependencies>
+ <properties>
+ <rootDir>../../</rootDir>
+ </properties>
+</project>
=== added directory 'local/vn/dhis-service-vn/src'
=== added directory 'local/vn/dhis-service-vn/src/main'
=== added directory 'local/vn/dhis-service-vn/src/main/java'
=== added directory 'local/vn/dhis-service-vn/src/main/java/org'
=== added directory 'local/vn/dhis-service-vn/src/main/java/org/hisp'
=== added directory 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis'
=== added directory 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement'
=== added file 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/DefaultLocalDataElementService.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/DefaultLocalDataElementService.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/DefaultLocalDataElementService.java 2012-03-24 01:29:01 +0000
@@ -0,0 +1,63 @@
+/*
+ * 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.dataelement;
+
+import java.util.Collection;
+
+import org.hisp.dhis.attribute.Attribute;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * @author Chau Thu Tran
+ *
+ * @version $DefaultLocalDataelementService.java Mar 23, 2012 4:07:37 PM$
+ */
+@Transactional
+public class DefaultLocalDataElementService
+ implements LocalDataElementService
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ private LocalDataElementStore dataElementStore;
+
+ public void setDataElementStore( LocalDataElementStore dataElementStore )
+ {
+ this.dataElementStore = dataElementStore;
+ }
+
+ // -------------------------------------------------------------------------
+ // Implementation methods
+ // -------------------------------------------------------------------------
+
+ public Collection<DataElement> getDataElementsByAttribute( Attribute attribute, String value )
+ {
+ return dataElementStore.getByAttributeValue( attribute, value );
+ }
+}
=== added file 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/LocalDataElementService.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/LocalDataElementService.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/LocalDataElementService.java 2012-03-24 01:29:01 +0000
@@ -0,0 +1,42 @@
+/*
+ * 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.dataelement;
+
+import java.util.Collection;
+
+import org.hisp.dhis.attribute.Attribute;
+
+/**
+ * @author Chau Thu Tran
+ *
+ * @version $LocalDataElementService.java Mar 23, 2012 4:05:32 PM$
+ */
+public interface LocalDataElementService
+{
+ Collection<DataElement> getDataElementsByAttribute( Attribute attribute, String value );
+}
=== added file 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/LocalDataElementStore.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/LocalDataElementStore.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/LocalDataElementStore.java 2012-03-24 01:29:01 +0000
@@ -0,0 +1,42 @@
+/*
+ * 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.dataelement;
+
+import java.util.Collection;
+
+import org.hisp.dhis.attribute.Attribute;
+
+/**
+ * @author Chau Thu Tran
+ *
+ * @version $LocalDataElementStore.java Mar 23, 2012 4:10:24 PM$
+ */
+public interface LocalDataElementStore
+{
+ Collection<DataElement> getByAttributeValue( Attribute attribute, String value );
+}
=== added directory 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate'
=== added file 'local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateLocalDataElementStore.java'
--- local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateLocalDataElementStore.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-service-vn/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateLocalDataElementStore.java 2012-03-24 01:29:01 +0000
@@ -0,0 +1,54 @@
+/*
+ * 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.dataelement.hibernate;
+
+import java.util.Collection;
+
+import org.hibernate.criterion.Restrictions;
+import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.LocalDataElementStore;
+
+/**
+ * @author Chau Thu Tran
+ *
+ * @version $HibernateLocalDataElementStore.java Mar 23, 2012 4:08:56 PM$
+ */
+public class HibernateLocalDataElementStore
+ extends HibernateIdentifiableObjectStore<DataElement>
+ implements LocalDataElementStore
+{
+ @SuppressWarnings( "unchecked" )
+ public Collection<DataElement> getByAttributeValue( Attribute attribute, String value )
+ {
+ return getCriteria().createAlias( "attributeValues", "attributeValue" ).add(
+ Restrictions.eq( "attributeValue.attribute", attribute ) ).add(
+ Restrictions.eq( "attributeValue.value", value ) ).list();
+ }
+}
=== added directory 'local/vn/dhis-service-vn/src/main/resources'
=== added directory 'local/vn/dhis-service-vn/src/main/resources/META-INF'
=== added directory 'local/vn/dhis-service-vn/src/main/resources/META-INF/dhis'
=== added file 'local/vn/dhis-service-vn/src/main/resources/META-INF/dhis/beans.xml'
--- local/vn/dhis-service-vn/src/main/resources/META-INF/dhis/beans.xml 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-service-vn/src/main/resources/META-INF/dhis/beans.xml 2012-03-24 01:29:01 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
+
+ <!-- LocalDataElementService -->
+
+ <bean id="org.hisp.dhis.dataelement.LocalDataElementService"
+ class="org.hisp.dhis.dataelement.DefaultLocalDataElementService">
+ <property name="dataElementStore" ref="org.hisp.dhis.dataelement.LocalDataElementStore"/>
+ </bean>
+
+ <bean id="org.hisp.dhis.dataelement.LocalDataElementStore"
+ class="org.hisp.dhis.dataelement.hibernate.HibernateLocalDataElementStore">
+ <property name="clazz" value="org.hisp.dhis.dataelement.DataElement" />
+ <property name="sessionFactory" ref="sessionFactory" />
+ </bean>
+
+</beans>
=== added directory 'local/vn/dhis-service-vn/src/main/resources/org'
=== added directory 'local/vn/dhis-service-vn/src/main/resources/org/hisp'
=== added directory 'local/vn/dhis-service-vn/src/main/resources/org/hisp/dhis'
=== added directory 'local/vn/dhis-web-dataentry-hospital'
=== added file 'local/vn/dhis-web-dataentry-hospital/pom.xml'
--- local/vn/dhis-web-dataentry-hospital/pom.xml 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/pom.xml 2012-03-24 01:29:01 +0000
@@ -0,0 +1,43 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hisp.dhis</groupId>
+ <artifactId>dhis-web</artifactId>
+ <version>2.8-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>dhis-web-dataentry-hospital</artifactId>
+ <packaging>war</packaging>
+ <name>DHIS Web Dataentry Hospital</name>
+
+ <build>
+ <finalName>dhis-web-dataentry-hospital</finalName>
+ </build>
+
+ <dependencies>
+
+ <!-- DHIS -->
+
+ <dependency>
+ <groupId>org.hisp.dhis</groupId>
+ <artifactId>dhis-web-commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hisp.dhis</groupId>
+ <artifactId>dhis-web-commons-resources</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.hisp.dhis</groupId>
+ <artifactId>dhis-service-vn</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <properties>
+ <rootDir>../../</rootDir>
+ </properties>
+</project>
=== added directory 'local/vn/dhis-web-dataentry-hospital/src'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/java'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/java/org'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement'
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement/LoadFormAction.java'
--- local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement/LoadFormAction.java 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/java/org/hisp/dhis/dataelement/LoadFormAction.java 2012-03-24 01:29:01 +0000
@@ -0,0 +1,384 @@
+/*
+ * 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.dataelement;
+
+/**
+ * @author Chau Thu Tran
+ *
+ * @version $LoadFormAction.java Mar 23, 2012 04:10:41 PM$
+ */
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.attribute.AttributeService;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
+import org.hisp.dhis.dataentryform.DataEntryForm;
+import org.hisp.dhis.dataentryform.DataEntryFormService;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.dataset.Section;
+import org.hisp.dhis.dataset.comparator.SectionOrderComparator;
+import org.hisp.dhis.i18n.I18n;
+
+import com.opensymphony.xwork2.Action;
+
+public class LoadFormAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private DataEntryFormService dataEntryFormService;
+
+ public void setDataEntryFormService( DataEntryFormService dataEntryFormService )
+ {
+ this.dataEntryFormService = dataEntryFormService;
+ }
+
+ private DataElementService dataElementService;
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ private DataSetService dataSetService;
+
+ public void setDataSetService( DataSetService dataSetService )
+ {
+ this.dataSetService = dataSetService;
+ }
+
+ private AttributeService attributeService;
+
+ private LocalDataElementService localDataElementService;
+
+ public void setAttributeService( AttributeService attributeService )
+ {
+ this.attributeService = attributeService;
+ }
+
+ public void setLocalDataElementService( LocalDataElementService localDataElementService )
+ {
+ this.localDataElementService = localDataElementService;
+ }
+
+ public void setAttributeId( int attributeId )
+ {
+ this.attributeId = attributeId;
+ }
+
+ public void setValue( String value )
+ {
+ this.value = value;
+ }
+
+ private I18n i18n;
+
+ public void setI18n( I18n i18n )
+ {
+ this.i18n = i18n;
+ }
+
+ // -------------------------------------------------------------------------
+ // Comparator
+ // -------------------------------------------------------------------------
+
+ private Comparator<DataElement> dataElementComparator;
+
+ public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
+ {
+ this.dataElementComparator = dataElementComparator;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input
+ // -------------------------------------------------------------------------
+
+ private Integer dataSetId;
+
+ public void setDataSetId( Integer dataSetId )
+ {
+ this.dataSetId = dataSetId;
+ }
+
+ // -------------------------------------------------------------------------
+ // Output
+ // -------------------------------------------------------------------------
+
+ private Map<DataElementCategoryCombo, List<DataElement>> orderedDataElements = new HashMap<DataElementCategoryCombo, List<DataElement>>();
+
+ public Map<DataElementCategoryCombo, List<DataElement>> getOrderedDataElements()
+ {
+ return orderedDataElements;
+ }
+
+ private String customDataEntryFormCode;
+
+ public String getCustomDataEntryFormCode()
+ {
+ return this.customDataEntryFormCode;
+ }
+
+ private List<Section> sections;
+
+ public List<Section> getSections()
+ {
+ return sections;
+ }
+
+ private Map<Integer, Map<Integer, Collection<DataElementCategoryOption>>> orderedOptionsMap = new HashMap<Integer, Map<Integer, Collection<DataElementCategoryOption>>>();
+
+ public Map<Integer, Map<Integer, Collection<DataElementCategoryOption>>> getOrderedOptionsMap()
+ {
+ return orderedOptionsMap;
+ }
+
+ private Map<Integer, Collection<DataElementCategory>> orderedCategories = new HashMap<Integer, Collection<DataElementCategory>>();
+
+ public Map<Integer, Collection<DataElementCategory>> getOrderedCategories()
+ {
+ return orderedCategories;
+ }
+
+ private Map<Integer, Integer> numberOfTotalColumns = new HashMap<Integer, Integer>();
+
+ public Map<Integer, Integer> getNumberOfTotalColumns()
+ {
+ return numberOfTotalColumns;
+ }
+
+ private Map<Integer, Map<Integer, Collection<Integer>>> catColRepeat = new HashMap<Integer, Map<Integer, Collection<Integer>>>();
+
+ public Map<Integer, Map<Integer, Collection<Integer>>> getCatColRepeat()
+ {
+ return catColRepeat;
+ }
+
+ private Map<Integer, Collection<DataElementCategoryOptionCombo>> orderdCategoryOptionCombos = new HashMap<Integer, Collection<DataElementCategoryOptionCombo>>();
+
+ public Map<Integer, Collection<DataElementCategoryOptionCombo>> getOrderdCategoryOptionCombos()
+ {
+ return orderdCategoryOptionCombos;
+ }
+
+ private List<DataElementCategoryCombo> orderedCategoryCombos = new ArrayList<DataElementCategoryCombo>();
+
+ public List<DataElementCategoryCombo> getOrderedCategoryCombos()
+ {
+ return orderedCategoryCombos;
+ }
+
+ private Map<Integer, Integer> sectionCombos = new HashMap<Integer, Integer>();
+
+ public Map<Integer, Integer> getSectionCombos()
+ {
+ return sectionCombos;
+ }
+
+ private Map<String, Boolean> greyedFields = new HashMap<String, Boolean>();
+
+ public Map<String, Boolean> getGreyedFields()
+ {
+ return greyedFields;
+ }
+
+ private Integer attributeId;
+
+ private String value;
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {System.out.println("\n\n\n dataSetService : " + dataSetService );
+ System.out.println("\n\n\n dataSetId : " + dataSetId );
+ DataSet dataSet = dataSetService.getDataSet( dataSetId, true, false, false );
+
+ List<DataElement> dataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
+
+ if ( dataElements.isEmpty() )
+ {
+ return INPUT;
+ }
+
+ if ( attributeId != null )
+ {
+ Attribute attribute = attributeService.getAttribute( attributeId );
+
+ Collection<DataElement> dataElementsByAttr = localDataElementService.getDataElementsByAttribute( attribute,
+ value );
+
+ dataElements.retainAll( dataElementsByAttr );
+ }
+
+ Collections.sort( dataElements, dataElementComparator );
+
+ orderedDataElements = dataElementService.getGroupedDataElementsByCategoryCombo( dataElements );
+
+ orderedCategoryCombos = dataElementService.getDataElementCategoryCombos( dataElements );
+
+ for ( DataElementCategoryCombo categoryCombo : orderedCategoryCombos )
+ {
+ List<DataElementCategoryOptionCombo> optionCombos = categoryCombo.getSortedOptionCombos();
+
+ orderdCategoryOptionCombos.put( categoryCombo.getId(), optionCombos );
+
+ // -----------------------------------------------------------------
+ // Perform ordering of categories and their options so that they
+ // could be displayed as in the paper form. Note that the total
+ // number of entry cells to be generated are the multiple of options
+ // from each category.
+ // -----------------------------------------------------------------
+
+ numberOfTotalColumns.put( categoryCombo.getId(), optionCombos.size() );
+
+ orderedCategories.put( categoryCombo.getId(), categoryCombo.getCategories() );
+
+ Map<Integer, Collection<DataElementCategoryOption>> optionsMap = new HashMap<Integer, Collection<DataElementCategoryOption>>();
+
+ for ( DataElementCategory dec : categoryCombo.getCategories() )
+ {
+ optionsMap.put( dec.getId(), dec.getCategoryOptions() );
+ }
+
+ orderedOptionsMap.put( categoryCombo.getId(), optionsMap );
+
+ // -----------------------------------------------------------------
+ // Calculating the number of times each category should be repeated
+ // -----------------------------------------------------------------
+
+ Map<Integer, Integer> catRepeat = new HashMap<Integer, Integer>();
+
+ Map<Integer, Collection<Integer>> colRepeat = new HashMap<Integer, Collection<Integer>>();
+
+ int catColSpan = optionCombos.size();
+
+ for ( DataElementCategory cat : categoryCombo.getCategories() )
+ {
+ int categoryOptionSize = cat.getCategoryOptions().size();
+
+ if ( catColSpan > 0 && categoryOptionSize > 0 )
+ {
+ catColSpan = catColSpan / categoryOptionSize;
+ int total = optionCombos.size() / (catColSpan * categoryOptionSize);
+ Collection<Integer> cols = new ArrayList<Integer>( total );
+
+ for ( int i = 0; i < total; i++ )
+ {
+ cols.add( i );
+ }
+
+ colRepeat.put( cat.getId(), cols );
+
+ catRepeat.put( cat.getId(), catColSpan );
+ }
+ }
+
+ catColRepeat.put( categoryCombo.getId(), colRepeat );
+ }
+
+ // ---------------------------------------------------------------------
+ // Get data entry form
+ // ---------------------------------------------------------------------
+
+ String displayMode = dataSet.getDataSetType();
+
+ if ( displayMode.equals( DataSet.TYPE_SECTION ) )
+ {
+ getSectionForm( dataElements, dataSet );
+ }
+ else
+ {
+ getOtherDataEntryForm( dataElements, dataSet );
+ }
+
+ return displayMode;
+ }
+
+ // -------------------------------------------------------------------------
+ // Supportive methods
+ // -------------------------------------------------------------------------
+
+ private void getSectionForm( Collection<DataElement> dataElements, DataSet dataSet )
+ {
+ sections = new ArrayList<Section>( dataSet.getSections() );
+
+ Collections.sort( sections, new SectionOrderComparator() );
+
+ for ( Section section : sections )
+ {
+ DataElementCategoryCombo sectionCategoryCombo = section.getCategoryCombo();
+
+ if ( sectionCategoryCombo != null )
+ {
+ orderedCategoryCombos.add( sectionCategoryCombo );
+
+ sectionCombos.put( section.getId(), sectionCategoryCombo.getId() );
+ }
+
+ for ( DataElementOperand operand : section.getGreyedFields() )
+ {
+ greyedFields.put( operand.getDataElement().getId() + ":" + operand.getCategoryOptionCombo().getId(),
+ true );
+ }
+ }
+ }
+
+ private void getOtherDataEntryForm( List<DataElement> dataElements, DataSet dataSet )
+ {
+ DataEntryForm dataEntryForm = dataSet.getDataEntryForm();
+
+ if ( dataEntryForm != null )
+ {
+ customDataEntryFormCode = dataEntryFormService.prepareDataEntryFormForEntry( dataEntryForm.getHtmlCode(),
+ i18n, dataSet );
+ }
+
+ List<DataElement> des = new ArrayList<DataElement>();
+
+ for ( DataElementCategoryCombo categoryCombo : orderedCategoryCombos )
+ {
+ des = (List<DataElement>) orderedDataElements.get( categoryCombo );
+
+ Collections.sort( des, IdentifiableObjectNameComparator.INSTANCE );
+
+ orderedDataElements.put( categoryCombo, des );
+ }
+ }
+}
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/resources'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/resources/META-INF'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/resources/META-INF/dhis'
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/resources/META-INF/dhis/beans.xml'
--- local/vn/dhis-web-dataentry-hospital/src/main/resources/META-INF/dhis/beans.xml 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/resources/META-INF/dhis/beans.xml 2012-03-24 01:29:01 +0000
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
+
+ <bean id="org.hisp.dhis.dataelement.LoadFormAction" class="org.hisp.dhis.dataelement.LoadFormAction" scope="prototype">
+ <property name="dataEntryFormService" ref="org.hisp.dhis.dataentryform.DataEntryFormService" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
+ <property name="localDataElementService" ref="org.hisp.dhis.dataelement.LocalDataElementService" />
+ </bean>
+
+
+</beans>
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/resources/org'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis'
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module.properties'
--- local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module.properties 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module.properties 2012-03-24 01:29:01 +0000
@@ -0,0 +1,3 @@
+please_select_attribute = Please select attribute
+attribute = Attribute
+load_entry_form = Load entry form
\ No newline at end of file
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_en_GB.properties'
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_pt_PT.properties'
--- local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_pt_PT.properties 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_pt_PT.properties 2012-03-24 01:29:01 +0000
@@ -0,0 +1,304 @@
+reports=List of report
+row=Row
+column=Column
+export_report_type=Export report type
+import_report_type=Import report type
+PERIOD_COLUMN_LISTING=Period Column Listing
+NORMAL=Normal
+CATEGORY=Category
+export_items=Export Items
+period_postion_column=Period Position Column
+organisation_position_column=Organisation Position Column
+excel_is_null=Please enter excel template !
+name_ready_exist=Name Ready Exist !
+confirm_delete=Are you sure you want to delete this?
+period_type=Period type
+export_report=Export Report
+quaterly=Quarterly
+6_month=Six monthly
+yealy=Yearly
+last_3_month=Last 3 Month
+so_far_this_year=So Far This year
+element_optioncombo=Element with OptionCombo
+expression=Expression
+extra_expression=Extra expression
+indicator=Indicator
+expression_is_null=Please enter expression !
+row_is_null=Please enter row number !
+column_is_null=Please enter column number !
+listing=Listing
+period=Period
+organisation=Organisation
+generate_report=Generate Report
+please_wait=Please waiting for process !
+organisationunit_is_null=Please select organisation unit !
+period_is_null=Please select period !
+report_is_null=Please select report !
+formula=Formula
+left_brackets=Left Brackets
+divide=Divide
+plus=Plus
+clean_up=Clean temporary directory
+org_unit_group_management=Organisation unit group management
+available_groups=Available groups
+sheet_no=Sheet No
+filter_by_sheet=Filter by sheet
+configuration=Configuration
+excel_file_directory=Excel template directory
+copy_import_item_to_exportreport=Copy import items to Export report
+select_excel_file=Select excel file
+upload_file=Upload
+dataset_completed_report=Data Set completed reports
+dataset=Dataset
+selected_period=Selected Period
+selected_dataset=Selected Dataset
+view=View Report
+number_datavalue=Number of Data Value
+view_data_status=View Data Entry Status
+data_status=Data Entry Status
+data_status_management=Data Entry Status Management\t
+make_default=Make as default
+completed=Completed
+entried=Entried
+group=Group
+periodlisting=Period Listing
+report_roles=Report and User Roles
+formulaexcel=Excel Formula
+import=Import data
+dhis-web-chr-form=Child Health Records
+remove_all=Un-Select All
+import_excel_file=Import Data Form Report Excel
+dataelement_groups=Data Element Groups
+temp_place=Temp Place
+update_sorted_dataelement=Update Sorted Data Element
+dataelement_name=Data Element Name
+dataelement_code=Data Element Code
+available_dataelementgroups=Available Data Element Groups
+selected_dataelementgroups=Selected Data Element Groups
+preview=Preview
+select=[Select]
+sheet_of_excel_file=Sheet of Excel file
+generate_report_by_orgunit_group=Generate report by orgunit group
+cleanup_success=Clean up successful
+individual_report=Individual reports
+available_data_elements=Available dataelement
+selected_data_elements=Selected dataelement
+category_option_combo=Category option combo list
+selected_periods=Selected periods
+generate=Generate report
+bookmark=Bookmark
+generate_advanced_report=Generate advanced report
+choose_orgunit_group=Organisation group
+report_ready_exist=Report ready exist
+please_enter_sheet_no=Please enter 'Sheet No'
+please_enter_group_name=Please enter group name
+import_items=Excel items
+choose_import_item=Please choose import items
+copy_items_duplicated=Warning! Cannot copy the duplicated item(s)
+import_report=Import Report
+copy_items=Copy items
+import_data=Import data
+startdate_null=Please enter start date
+enddate_null=Please enter end date
+not_null=not null
+choose_org_unit=Not choose organisation yet
+choose_period=Not choose period yet
+choose_export_report=Not choose export report yet
+warning_upload_is_null=Please choose your excel file to upload !
+list_of_import_items=List of import items
+selected_dataelements=Selected Data Elements
+no_item=Don't have any items chosen
+upload_successful=Uploading is success !
+override_successful=Overriding is success !
+cannot_write_file_being_used=Unable to write to this file as being used by another program
+filename_wellformed=How to get a well-formed name of file?
+length_filename_min5_max30=Length of file's name is at least 5 and at most 30
+use_only_letters_numbers_dot_only=Please enter Letters, Numbers for file's name and Dot for extension only
+file_used_system=This file is being used in the system
+confirm_rename=Do you really want to rename it?
+rename_successful=File name changed
+template_status=Template status
+cell_exist=Exist one cell same sheet, row and column with this.
+download=Download
+file_type_not_supported=File type not supported
+association_roles=Association roles
+override_confirm=File is exist. Do you want to override ?
+ready_in_use=File is ready in use. Can not delete !
+intro_configuration=Set the path to the directory only store excel template files on server.
+Notes:This is a relative path.
+For example: \templatefiles for Windows or /templatefiles for Linux.
+intro_clean_up=This feature allows users to delete the temporary files generated during the generating report or previewing report.
+intro_excel_template_management=Upload, rename, search, download and delete the file extension .xls or .xlsx. Users can identify which files are used and unused files to. Automatically, allowing to update excel reporting system when file names which are used to be changed.
+translation_translate=Translate
+basic=Basic
+advanced=Advanced
+assign_exportreport_userrole=Assign user role for export report
+print=Print draft...
+chart=Chart
+de_in_chart=Data Element/Indicator Chart
+select_chart_type=Selection Chart Type
+pie_char=Pie Chart
+line_chart=Line Chart
+view_chart=View Chart
+indicator_groups=Indicator Groups
+period_chart=Period Chart
+organisation_chart=Organisation Unit Chart
+bookmark_chart=Bookmarked Charts
+bookmark_success=Bookmarked
+description_is_null=Please enter description !
+specify_report=Please specify a report
+specify_template_directory=Please specify template directory
+choose_orgunit_has_children=Please choose an orgaisation unit has children
+choose_orgunit=Please choose an orgaisation unit
+select_period_type=[Select period type]
+report_import_item=Report Excel Item
+add_import_item=Add Import Item
+add_export_item=Add Export Item
+update_import_item=Update Import Item
+import_type=Import type
+excel_importing=Excel Importing
+import_item=Import Item
+intro_chart=Create, Edit, View & Delete Hight Chart.
+selected_indicators=Selected Indicators
+available_indicators=Available Indicators
+color_selection=Color Selection
+LOAD_PERIOD_AUTO=Load period automatic up to now
+LOAD_PERIOD_SELECTED=Load period from your selection
+load_period_by=Load period by
+title=Title
+subtitle=Subtitle
+legend=Legend
+enable=Enable
+layout=Layout
+right=Right
+top=Top
+bottom=Bottom
+vertical=Vertical
+color=Color
+series=Series
+select_organisation=Please select organisation unit
+category=Category
+incompleted=Imcompleted
+import_import_items_cannot_be_empty=Excel items for importing cannot be empty
+access_denied_to_folder=Access denied to folder on server
+template_folder_is_null=Warning! The template folder configuration is not created yet.
+template_folder_is_not_empty=Warning! The old template directory of system is not empty.
+Would you like to move its children to the new one before it deleted ?
+template_file_is_not_exist=Warning! The corresponding file is not exist.
+export_reports=Export Reports
+generate_export_report=Generate export report
+set_organisationunit_group_level=Set up Organisation unit group level
+import_unsuccessfully=Import unsuccessfully
+import_successfully=Import successfully
+period_listing_importing_not_support=Sorry! Period Listing Importing is not supported.
+missing_template=Warning! Missing template.
+the_specified_report_is_not_exist=Warning! The specified report is not available/non-existance.
+select_sheet_for_filter=Select sheet for filter
+remove_item=Remove item
+number_of_members=Number of members
+edit_excel_template=Edit name of excel template
+has_no_element=has no element
+indicator_with_id=Indicator with id
+does_not_exist=does not exist
+period_columns=Period columns
+i18n_date_format=yy-mm-dd
+excel_template=Excel Template
+ORGANIZATION_GROUP_LISTING=Organization Unit Listing
+period_postion_row=Period Position Row
+organisation_position_row=Organisation Position Row
+name_is_null=Please enter name !
+item_type=Item type
+update=Update
+report_design=Report Design
+export_item=Export Item
+daily=Daily
+so_far_this_month=So far this month
+so_far_this_quarter=So far this quarter
+last_6_month=Last 6 month
+selected_month=Selected Month
+calculation=Calculation
+normal=Normal
+preview_report=Preview Report
+right_brackets=Right Brackets
+multiply=Multiply
+minus=Minus
+selected_groups=Selected groups
+organisation_unit_group=Organisation unit group
+copy_export_item_to_exportreport=Copy export items to Export report
+copy_export_item_to_importreport=Copy export items to Import report
+copy_import_item_to_importreport=Copy import items to Import report
+import_excel_file_manager=Import excel files
+available_user_roles=Available user roles
+selected_user_roles=Selected user roles
+administration=Administration
+select_report=[Select report]
+grouplisting=Group Organization
+formula_is_invalid=Formula is invalid !
+icd_code=ICD codes
+serial=Serial
+template_excel_file=Template excel file
+define_associations=Report Associations
+update_sort_dataelement_success=Update Sorted Data Element Success
+sort_dataelement=Sort Data Element
+dataelements=Data Elements
+view_by=View by
+update_order=Update Order Sorted
+sort_order_help=Use mouse drap emlement that you want set order and click on Update Order Sorted
+working_in_progress=Working in progress...
+available_periods=Available periods
+upload_file_first=Upload file first !
+associations=Associations
+sheetNo=Sheet
+copy_successful=Copy successful !
+filter_by_name=Filter by name
+choose_dataelement=Not choose dataelement yet
+i18n_name_is_null=Please enter name!
+input_sheet_no=Not input sheet yet
+choose_import_report=Not choose import report yet
+available_dataelements=Available Data Elements
+value_rounded=This value maybe have been rounded
+level_and_orgunit_group=Level and Organisation Unit Group
+levels=Level
+excel_template_management=Excel Template Management
+file_exists=File is existing
+confirm_override=Do you sure want to override this file?
+confirm_update_system=Would you like to update reporting system?
+rename_failed=Rename failed
+update_successful=Update success !
+upload_file_null=Upload file null
+intro_export_reports=Create, update, view and delete the excel report. A report excel containing many report items. Excel report can in a variety of different reports. Excel report for assignment to one or more units or group units and options list.
+intro_data_status_management=This function is used to view the status input of data (Data is entered or not done or any missing one, etc...).
+intro_import_reports=Create, update, delete and view the elements for importing data from excel files. This import items closer to export items.
+template_using=File is using
+template_pending=File is pending
+expression_not_well_formed=Expression is not well formed
+axis_x=Axis X
+axis_y=Axis Y
+column_chart=Column Chart
+full_style_chart=Full Style Chart
+dataset_is_null=Please selecte dataset !
+description=Description
+name_ready_exist_in_sheet=This report item name was exits in this sheet
+please_enter_row_and_column_first=Please enter row and column first
+update_export_item=Update Export Item
+report_excel=Report Excel
+show_legend=Show Legend
+left=Left
+center=Center
+middle=Middle
+horizontal=Horizontal
+position=Postion
+line=Line
+pie=Pie
+bar=Bar
+select_paramater_to_draw_chart=Select parameters to draw a chart
+draw_chart=Draw Chart
+access_denied_to_file=Access denied to file on server
+config_path_invalid=Invalid configuration! Only Alphabetic, Numbers, Undercore, Middlecore and Space alow.
+there_is_no_import_report=There is no Import Report/Import Item in system
+import_reports=Import Reports
+file_format_structure_broken=Warning! File format structure is broken.
+no_group_order_created_for_category=No group order created for this category report
+group_order=Data element group order
+dataelement_with_id=Dataelement with id
+cate_option_combo_with_id=Option combo with id
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_vi_VN.properties'
--- local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_vi_VN.properties 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/resources/org/hisp/dhis/i18n_module_vi_VN.properties 2012-03-24 01:29:01 +0000
@@ -0,0 +1,343 @@
+#Resource generated by I18n Resource Editor
+#Tue Nov 01 14:58:20 ICT 2011
+import_data=T\u00edch h\u1ee3p d\u1eef li\u1ec7u
+template_folder_is_not_empty=C\u1ea3nh b\u00e1o! Th\u01b0 m\u1ee5c c\u0169 c\u1ee7a h\u1ec7 th\u1ed1ng hi\u1ec7n \u0111ang ch\u1ee9a c\u00e1c t\u1eadp tin b\u1ea3ng m\u1eabu.\nB\u1ea1n c\u00f3 mu\u1ed1n di chuy\u1ec3n ch\u00fang qua th\u01b0 m\u1ee5c m\u1edbi tr\u01b0\u1edbc khi n\u00f3 b\u1ecb x\u00f3a?
+template_file_is_not_exist=C\u1ea3nh b\u00e1o! T\u1eadp tin li\u00ean quan kh\u00f4ng t\u1ed3n t\u1ea1i
+so_far_this_year=t\u1eeb \u0111\u1ea7u n\u0103m \u0111\u1ebfn nay
+description=M\u00f4 t\u1ea3
+period_postion_=\u0111\u1ecbnh v\u1ecb th\u1eddi gian
+top=Tr\u00ean
+ORGANIZATION_GROUP_LISTING=Li\u1ec7t k\u00ea \u0111\u01a1n v\u1ecb
+category_option_combo=Danh s\u00e1ch t\u1eadp ph\u00e2n lo\u1ea1i
+period_=theo th\u1eddi gian
+6_month=H\u1eb1ng 6 th\u00e1ng
+dataelement_name=T\u00ean ph\u1ea7n t\u1eed d\u1eef li\u1ec7u
+report_excel=B\u00e1o c\u00e1o excel
+line=\u0110\u01b0\u1eddng
+export_report_type=Ki\u1ec3u b\u00e1o c\u00e1o
+export_report=B\u00e1o c\u00e1o xu\u1ea5t
+copy_export_item_to_importreport=Sao ch\u00e9p ph\u1ea7n t\u1eed Xu\u1ea5t t\u1edbi b\u00e1o c\u00e1o Nh\u1eadp
+right_brackets=\u0110\u00f3ng ngo\u1eb7c
+update_order=C\u1eadp nh\u1eadt th\u1ee9 t\u1ef1
+line_chart=Bi\u1ec3u \u0111\u1ed3 \u0111\u01b0\u1eddng
+group=Nh\u00f3m
+move_selected=B\u1ecf v\u00e0o
+intro_clean_up=Ch\u1ee9c n\u0103ng n\u00e0y cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng x\u00f3a c\u00e1c t\u1eadp tin t\u1ea1m sinh ra trong qu\u00e1 tr\u00ecnh sinh b\u00e1o c\u00e1o ho\u1eb7c xem tr\u01b0\u1edbc b\u00e1o c\u00e1o.
+not_null=kh\u00f4ng r\u1ed7ng
+upload_file=T\u1ea3i l\u00ean
+add_export_item=Th\u00eam ph\u1ea7n t\u1eed
+choose_orgunit=H\u00e3y ch\u1ecdn m\u1ed9t \u0111\u01a1n v\u1ecb
+organisation_position_column=V\u1ecb tr\u00ed \u00f4 \u0111\u01a1n v\u1ecb (c\u1ed9t)
+report_is_null=Vui l\u00f2ng ch\u1ecdn b\u00e1o c\u00e1o!
+period_is_null=Vui l\u00f2ng ch\u1ecdn th\u1eddi \u0111i\u1ec3m!
+de_in_=theo ph\u1ea7n t\u1eed d\u1eef li\u1ec7u/ch\u1ec9 s\u1ed1
+import_report_type=Lo\u1ea1i b\u00e1o c\u00e1o t\u00edch h\u1ee3p
+column_chart=Bi\u1ec3u \u0111\u1ed3 c\u1ed9t
+list_of_import_items=Danh s\u00e1ch c\u00e1c ph\u1ea7n t\u1eed t\u00edch h\u1ee3p
+override_successful=T\u1eadp tin n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c ghi \u0111\u00e8!
+rename_successful=T\u00ean t\u1eadp tin \u0111\u00e3 \u0111\u1ed5i
+i18n_name_is_null=H\u00e3y nh\u1eadp t\u00ean!
+no_item=Kh\u00f4ng c\u00f3 ph\u1ea7n t\u1eed \u0111\u01b0\u1ee3c ch\u1ecdn
+dataelement_code=M\u00e3 ph\u1ea7n t\u1eed d\u1eef li\u1ec7u
+selected_dataelementgroups=Nh\u00f3m d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c ch\u1ecdn
+cannot_write_file_being_used=Kh\u00f4ng th\u1ec3 ghi l\u00ean t\u1eadp tin n\u00e0y v\u00ec \u0111ang \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng b\u1edfi m\u1ed9t ch\u01b0\u01a1ng tr\u00ecnh kh\u00e1c
+position=V\u1ecb tr\u00ed
+select_sheet_for_filter=Ch\u1ecdn b\u1ea3ng \u0111\u1ec3 l\u1ecdc
+add_import_item=Th\u00eam ph\u1ea7n t\u1eed Nh\u1eadp
+sort_order_help=D\u00f9ng chu\u1ed9t k\u00e9o m\u1ee5c mu\u1ed1n s\u1eafp x\u1ebfp t\u1edbi v\u1ecb tr\u00ed c\u1ea7n thi\u1ebft, sau \u0111\u00f3 ch\u1ecdn C\u1eadp nh\u1eadt th\u1ee9 t\u1ef1
+bar=Thanh
+template_using=\u0110ANG s\u1eed d\u1ee5ng t\u1eadp tin n\u00e0y
+upload_file_null=T\u1ea3i l\u00ean t\u1eadp tin r\u1ed7ng
+choose_import_report=Ch\u01b0a ch\u1ecdn b\u00e1o c\u00e1o t\u00edch h\u1ee3p
+report_design=Thi\u1ebft k\u1ebf b\u00e1o c\u00e1o
+select_excel_file=Ch\u1ecdn t\u1eadp tin b\u1ea3ng
+view_by=Bi\u1ec3u di\u1ec5n theo
+available_groups=Nh\u00f3m c\u00f3 s\u1eb5n
+input_sheet_no=Ch\u01b0a nh\u1eadp s\u1ed1 b\u1ea3ng
+please_enter_row_and_column_first=Vui l\u00f2ng nh\u1eadp d\u00f2ng v\u00e0 c\u1ed9t tr\u01b0\u1edbc
+import_excel_items_cannot_be_empty=Vui l\u00f2ng t\u1ea1o ph\u1ea7n t\u1eed excel cho import d\u1eef li\u1ec7u
+full_style_chart=C\u1ed9t/\u0110\u01b0\u1eddng
+template_pending=CH\u01afA s\u1eed d\u1ee5ng t\u1eadp tin n\u00e0y
+center=Gi\u1eefa
+periodlisting=Li\u1ec7t k\u00ea theo th\u1eddi gian
+expression=Bi\u1ec3u th\u1ee9c
+extra_expression=Bi\u1ec3u th\u1ee9c ph\u1ee5
+reports=Danh s\u00e1ch b\u00e1o c\u00e1o
+bottom=D\u01b0\u1edbi
+choose_period=Ch\u01b0a ch\u1ecdn th\u1eddi \u0111i\u1ec3m
+missing_template=C\u1ea3nh b\u00e1o! T\u1eadp tin b\u1ea3ng b\u1ecb thi\u1ebfu.
+no_group_order_created_for_category=Kh\u00f4ng c\u00f3 nh\u00f3m ph\u1ea7n t\u1eed th\u1ee9 t\u1ef1 \u0111\u01b0\u1ee3c t\u1ea1o cho lo\u1ea1i b\u00e1o c\u00e1o n\u00e0y
+dataelements=Ph\u1ea7n t\u1eed d\u1eef li\u1ec7u
+so_far_this_month=D\u1eef li\u1ec7u t\u1eeb \u0111\u1ea7u th\u00e1ng \u0111\u1ebfn ng\u00e0y \u0111\u01b0\u1ee3c ch\u1ecdn
+basic=C\u01a1 b\u1ea3n
+yearly=H\u00e0ng n\u0103m
+confirm_rename=B\u1ea1n c\u00f3 mu\u1ed1n \u0111\u1ed5i t\u00ean n\u00f3 kh\u00f4ng?
+line_=\u0111\u01b0\u1eddng
+specify_template_directory=H\u00e3y x\u00e1c \u0111\u1ecbnh th\u01b0 m\u1ee5c m\u1eabu
+individual_report=B\u00e1o c\u00e1o \u0111\u01a1n l\u1ebb
+jumping_step=D\u00f2ng tr\u1ed1ng
+data_status_management=Qu\u1ea3n l\u00fd t\u00ecnh tr\u1ea1ng nh\u1eadp li\u1ec7u
+legend=Ch\u00fa th\u00edch
+select_paramater_to_draw_chart=Ch\u1ecdn tham s\u1ed1 \u0111\u1ec3 v\u1ebd bi\u1ec3u \u0111\u1ed3
+print=In nh\u00e1p...
+enddate_null=H\u00e3y nh\u1eadp ng\u00e0y cu\u1ed1i
+download=T\u1ea3i v\u1ec1
+organisation_=theo \u0111\u01a1n v\u1ecb
+formula=C\u00f4ng th\u1ee9c
+update_report=C\u1eadp nh\u1eadt b\u00e1o c\u00e1o
+view_data_status=Xem b\u00e1o c\u00e1o t\u00ecnh tr\u1ea1ng nh\u1eadp li\u1ec7u
+completed=\u0110\u00e3 ho\u00e0n ch\u1ec9nh
+access_denied_to_file=Truy c\u1eadp b\u1ecb t\u1eeb ch\u1ed1i \u0111\u00ea\u0301n t\u1eadp tin tr\u00ean m\u00e1y ch\u1ee7
+organisation_unit_group=Nh\u00f3m \u0111\u01a1n v\u1ecb
+dataelement_use_for_categoryreport=Ph\u1ea7n t\u1eed d\u1eef li\u1ec7u s\u1eed d\u1ee5ng cho B\u00e1o c\u00e1o \u0111a chi\u1ec1u
+org_unit_group_management=Qu\u1ea3n l\u00fd nh\u00f3m \u0111\u01a1n v\u1ecb
+remove_item=X\u00f3a ph\u1ea7n t\u1eed
+edit_excel_template=Ch\u1ec9nh s\u1eeda t\u00ean t\u1eadp tin
+data_status=T\u00ecnh tr\u1ea1ng nh\u1eadp li\u1ec7u
+sheet_of_excel_file=B\u1ea3ng t\u00ednh c\u1ee7a t\u1eadp tin
+import_report=Ph\u1ea7n t\u1eed b\u00e1o c\u00e1o
+specify_report=H\u00e3y x\u00e1c \u0111\u1ecbnh m\u1ed9t b\u00e1o c\u00e1o
+file_used_system=T\u1eadp tin n\u00e0y \u0111ang \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng
+please_enter_group_name=Vui l\u00f2ng nh\u1eadp t\u00ean nh\u00f3m
+icd_code=M\u00e3 ICD
+pie=Tr\u00f2n
+template_folder_is_null=C\u1ea3nh b\u00e1o! C\u1ea5u h\u00ecnh th\u01b0 m\u1ee5c ch\u1ee9a t\u1eadp tin m\u1eabu ch\u01b0a \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp.
+import_items=Danh s\u00e1ch ph\u1ea7n t\u1eed Nh\u1eadp
+excel_template_management=Qu\u1ea3n l\u00fd c\u00e1c b\u1ea3ng m\u1eabu
+formulaexcel=C\u00f4ng th\u1ee9c b\u1ea3ng t\u00ednh
+selected_periods=Th\u1eddi \u0111i\u1ec3m \u0111\u01b0\u1ee3c ch\u1ecdn
+color_selection=Ch\u1ecdn m\u00e0u
+series=\u0110\u01b0\u1eddng bi\u1ec3u di\u1ec5n
+multiply=Ph\u00e9p nh\u00e2n
+available=Hi\u1ec7n c\u00f3
+generate_report_by_orgunit_group=Xu\u1ea5t b\u00e1o c\u00e1o theo nh\u00f3m \u0111\u01a1n v\u1ecb
+import_import_items_cannot_be_empty=Ph\u1ea7n t\u1eed \u0111\u1ec3 t\u00edch h\u1ee3p kh\u00f4ng \u0111\u01b0\u1ee3c r\u1ed7ng
+i18n_date_format=dd-mm-yy
+period_postion_column=V\u1ecb tr\u00ed \u00f4 th\u1eddi \u0111i\u1ec3m (c\u1ed9t)
+available_user_roles=C\u00e1c quy\u1ec1n c\u00f3 s\u1eb5n
+embed=M\u00e3 HTML \u0111\u1ec3 nh\u00fang v\u00e0o trang web
+left=Tr\u00e1i
+period=Th\u1eddi \u0111i\u1ec3m
+temp_place=V\u00f9ng L\u01b0u T\u1ea1m
+number_of_members=S\u1ed1 ph\u1ea7n t\u1eed trong nh\u00f3m
+left_brackets=M\u1edf ngo\u1eb7c
+select_chart_type=Ch\u1ecdn ki\u1ec3u bi\u1ec3u \u0111\u1ed3
+selected_indicators=Ch\u1ec9 s\u1ed1 \u0111\u01b0\u1ee3c ch\u1ecdn
+bookmark_success=\u0110\u00e3 \u0111\u00e1nh d\u1ea5u
+export_items=Danh s\u00e1ch ph\u1ea7n t\u1eed b\u00e1o c\u00e1o
+dhis-web-chr-form=Phi\u1ebfu s\u1ee9c kh\u1ecfe tr\u1ebb em
+selected_month=th\u00e1ng \u0111\u01b0\u1ee3c ch\u1ecdn
+show_legend=Hi\u1ec3n th\u1ecb ch\u00fa th\u00edch
+selected_=\u0111\u01b0\u1ee3c ch\u1ecdn
+update_report_import_item=Ch\u1ec9nh s\u1eeda ph\u1ea7n t\u1eed b\u00e1o c\u00e1o
+create_date=Ng\u00e0y gi\u1edd t\u1ea1o
+available_periods=Th\u1eddi \u0111i\u1ec3m hi\u1ec7n c\u00f3
+filter_by_name=L\u1ecdc theo t\u00ean
+selected_groups=C\u00e1c nh\u00f3m \u0111\u00e3 ch\u1ecdn
+excel_template=M\u1eabu b\u00e1o c\u00e1o b\u1ea3ng
+chart=Bi\u1ec3u \u0111\u1ed3
+filters=B\u1ed9 l\u1ecdc
+set_organisationunit_group_level=Thi\u1ebft l\u1eadp c\u1ea5p cho nh\u00f3m \u0111\u01a1n v\u1ecb
+loading=\u0110ang t\u1ea3i d\u1eef li\u1ec7u
+right=Ph\u1ea3i
+filter_by_sheet=L\u1ecdc theo b\u1ea3ng t\u00ednh
+improt_report=B\u00e1o c\u00e1o Nh\u1eadp
+report_roles=B\u00e1o c\u00e1o v\u00e0 ph\u00e2n quy\u1ec1n
+so_far_this_quarter=D\u1eef li\u1ec7u t\u1eeb \u0111\u1ea7u qu\u00fd \u0111\u1ebfn ng\u00e0y \u0111\u01b0\u1ee3c ch\u1ecdn
+pie_char=Bi\u1ec3u \u0111\u1ed3 tr\u00f2n
+number_datavalue=S\u1ed1 d\u1eef li\u1ec7u
+daily=H\u00e0ng ng\u00e0y
+copy_export_item_to_exportreport=Sao ch\u00e9p ph\u1ea7n t\u1eed Xu\u1ea5t t\u1edbi b\u00e1o c\u00e1o Xu\u1ea5t
+selected_dataelements=Ph\u1ea7n t\u1eed c\u00f3 s\u1eb5n
+LOAD_PERIOD_SELECTED=T\u1ea3i th\u1eddi \u0111i\u1ec3m t\u1eeb ch\u1ecdn l\u1ef1a
+copy_items_duplicated=Ph\u1ea7n t\u1eed b\u1ecb tr\u00f9ng l\u1eb7p, kh\u00f4ng th\u1ec3 sao ch\u00e9p !
+select=[Ch\u1ecdn]
+access_denied_to_folder=Ba\u0323n kh\u00f4ng \u0111u\u0309 quy\u00ea\u0300n truy c\u00e2\u0323p va\u0300o th\u01b0 mu\u0323c tr\u00ean ma\u0301y chu\u0309
+dataset=T\u1eadp d\u1eef li\u1ec7u
+choose_org_unit=Ch\u01b0a ch\u1ecdn \u0111\u01a1n v\u1ecb
+minus=Ph\u00e9p tr\u1eeb
+assign_exportreport_userrole=G\u00e1n quy\u1ec1n cho b\u00e1o c\u00e1o xu\u1ea5t
+generate_report=Xu\u1ea5t b\u00e1o c\u00e1o
+association_roles=Li\u00ean k\u1ebft vai tr\u00f2
+report_excel_item=Ph\u1ea7n t\u1eed b\u00e1o c\u00e1o
+name_ready_exist_in_sheet=Ph\u1ea7n t\u1eed tr\u00f9ng v\u1edbi ph\u1ea7n t\u1eed \u0111\u00e3 t\u1ed3n t\u1ea1i trong b\u1ea3ng n\u00e0y
+update=C\u1eadp nh\u1eadt
+element_optioncombo=Ph\u1ea7n t\u1eed v\u1edbi t\u00f9y ch\u1ecdn
+available_data_elements=D\u1eef li\u1ec7u hi\u1ec7n c\u00f3
+enable=K\u00edch ho\u1ea1t
+serial=S\u1ed1 th\u1ee9 t\u1ef1
+filename_wellformed=L\u00e0m c\u00e1ch n\u00e0o \u0111\u1ec3 c\u00f3 t\u00ean t\u1eadp tin h\u1ee3p l\u1ec7?
+sort_dataelement=S\u1eafp x\u1ebfp d\u1eef li\u1ec7u
+normal=B\u00ecnh th\u01b0\u1eddng
+generate=Xu\u1ea5t b\u00e1o c\u00e1o
+copy_items=Sao ch\u00e9p ph\u1ea7n t\u1eed
+calculation=S\u1ef1 t\u00ednh to\u00e1n
+please_wait=Vui l\u00f2ng ch\u1edd \u0111\u1ee3i trong gi\u00e2y l\u00e1t!
+row=D\u00f2ng
+preview_report=Xem tr\u01b0\u1edbc b\u00e1o c\u00e1o
+intro_configuration=Thi\u1ebft l\u1eadp \u0111\u01b0\u1eddng d\u1eabn tr\u1ecf t\u1edbi th\u01b0 m\u1ee5c l\u01b0u tr\u1eef c\u00e1c t\u1eadp tin m\u1eabu tr\u00ean m\u00e1y ch\u1ee7.\nCh\u00fa \u00fd: \u0110\u00e2y l\u00e0 \u0111\u01b0\u1eddng d\u1eabn t\u01b0\u01a1ng \u0111\u1ed1i.\nV\u00ed d\u1ee5: \\templatefiles d\u00e0nh cho Windows ho\u1eb7c /templatefiles cho Linux.
+warning_upload_is_null=Xin vui l\u00f2ng ch\u1ecdn t\u1eadp tin b\u1ea3ng c\u1ea7n t\u1ea3i l\u00ean!
+excel_file_directory=Th\u01b0 m\u1ee5c ch\u1ee9a m\u1eabu b\u00e1o c\u00e1o
+incompleted=Ch\u01b0a ho\u00e0n ch\u1ec9nh
+choose_orgunit_has_children=H\u00e3y ch\u1ecdn m\u1ed9t \u0111\u01a1n v\u1ecb cha
+layout=S\u1eafp x\u1ebfp
+last_3_month=3 th\u00e1ng g\u1ea7n nh\u1ea5t
+generate_export_report=Xu\u1ea5t b\u00e1o c\u00e1o
+vertical=H\u00e0ng d\u1ecdc
+organisation=\u0110\u01a1n v\u1ecb
+sheetNo=B\u1ea3ng s\u1ed1
+copy_successful=Sao ch\u00e9p th\u00e0nh c\u00f4ng!
+listing=Danh s\u00e1ch
+available_dataelementgroups=Nh\u00f3m d\u1eef li\u1ec7u c\u00f3 s\u1eb5n
+please_enter_sheet_no=Vui l\u00f2ng nh\u1eadp 's\u1ed1 b\u1ea3ng'
+configuration=C\u1ea5u h\u00ecnh
+level_and_orgunit_group=C\u1ea5p v\u00e0 nh\u00f3m \u0111\u01a1n v\u1ecb
+startdate_null=H\u00e3y nh\u1eadp v\u00e0o m\u1ed9t ng\u00e0y b\u1eaft \u0111\u1ea7u
+period_type=Period type
+confirm_delete=C\u00f3 ch\u1eafc l\u00e0 b\u1ea1n mu\u1ed1n x\u00f3a kh\u00f4ng?
+choose_category_combo=Ch\u1ecdn Lo\u1ea1i t\u1eadp h\u1ee3p k\u1ebft h\u1ee3p
+view_data=Xem d\u1eef li\u1ec7u
+import_item=Ph\u1ea7n t\u1eed t\u00edch h\u1ee3p
+intro_excel_template_management=T\u1ea3i l\u00ean, \u0111\u1ed5i t\u00ean, t\u00ecm ki\u1ebfm, t\u1ea3i v\u1ec1 v\u00e0 x\u00f3a c\u00e1c t\u1eadp tin c\u00f3 \u0111u\u00f4i m\u1edf r\u1ed9ng .xls ho\u1eb7c .xlsx. Ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 nh\u1eadn bi\u1ebft t\u1eadp tin n\u00e0o \u0111ang \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng v\u00e0 t\u1eadp tin n\u00e0o ch\u01b0a d\u00f9ng \u0111\u1ebfn. Cho ph\u00e9p t\u1ef1 \u0111\u1ed9ng c\u1eadp nh\u1eadt l\u1ea1i h\u1ec7 th\u1ed1ng b\u00e1o c\u00e1o b\u1ea3ngl khi t\u00ean t\u1eadp tin \u0111ang s\u1eed d\u1ee5ng thay \u0111\u1ed5i.
+full_style_=\u0111\u1ea7y \u0111\u1ee7
+category=Ph\u00e2n lo\u1ea1i
+update_successful=C\u1eadp nh\u1eadt th\u00e0nh c\u00f4ng!
+row_is_null=Vui l\u00f2ng nh\u1eadp v\u1ecb tr\u00ed d\u00f2ng!
+bookmark_chart=Bi\u1ec3u \u0111\u1ed3 \u0111\u01b0\u1ee3c \u0111\u00e1nh d\u1ea5u
+view_chart=Xem bi\u1ec3u \u0111\u1ed3
+selected_period=th\u1eddi \u0111i\u1ec3m \u0111\u01b0\u1ee3c ch\u1ecdn
+preview=Xem tr\u01b0\u1edbc
+column=C\u1ed9t
+NORMAL=B\u00ecnh th\u01b0\u1eddng
+name_is_null=Vui l\u00f2ng nh\u1eadp t\u00ean!
+file_exists=T\u1eadp tin b\u1ea3ng n\u00e0y \u0111ang t\u1ed3n t\u1ea1i!
+choose_dataelement=Ch\u01b0a ch\u1ecdn ph\u1ea7n t\u1eed d\u1eef li\u1ec7u
+select_categorycombo=Ch\u1ecdn Lo\u1ea1i t\u1eadp h\u1ee3p k\u1ebft h\u1ee3p
+plus=Ph\u00e9p c\u1ed9ng
+column_is_null=Vui l\u00f2ng nh\u1eadp s\u1ed1 c\u1ed9t!
+update_sorted_dataelement=C\u1eadp nh\u1eadt th\u1ee9 t\u1ef1 d\u1eef li\u1ec7u
+last_6_month=6 th\u00e1ng g\u1ea7n nh\u1ea5t
+organisation_chart=Bi\u1ec3u \u0111\u1ed3 \u0111\u01a1n v\u1ecb
+intro_export_reports=T\u1ea1o m\u1edbi, c\u1eadp nh\u1eadt, xem v\u00e0 x\u00f3a c\u00e1c b\u00e1o c\u00e1o b\u1ea3ngl. M\u1ed9t b\u00e1o c\u00e1o b\u1ea3ngl ch\u1ee9a nhi\u1ec1u ph\u1ea7n t\u1eed. B\u00e1o c\u00e1o b\u1ea3ng c\u00f3 th\u1ec3 thu\u1ed9c nhi\u1ec1u lo\u1ea1i b\u00e1o c\u00e1o kh\u00e1c nhau. Cho ph\u00e9p g\u00e1n b\u00e1o c\u00e1o cho m\u1ed9t hay nhi\u1ec1u \u0111\u01a1n v\u1ecb ho\u1eb7c nh\u00f3m \u0111\u01a1n v\u1ecb v\u00e0 m\u1ed9t s\u1ed1 t\u00f9y ch\u1ecdn kh\u00e1c.
+subtitle=Ph\u1ee5 \u0111\u1ec1
+import_type=Lo\u1ea1i t\u00edch h\u1ee3p
+expression_not_well_formed=Bi\u1ec3u th\u1ee9c sai \u0111\u1ecbnh d\u1ea1ng
+advanced=N\u00e2ng cao
+file_type_not_supported=Lo\u1ea1i t\u1eadp tin n\u00e0y kh\u00f4ng \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3
+confirm_update_system=B\u1ea1n c\u00f3 mu\u1ed1n c\u1eadp nh\u1eadt l\u1ea1i H\u1ec7 th\u1ed1ng b\u00e1o c\u00e1o?
+CATEGORY=Ph\u00e2n lo\u1ea1i
+the_specified_report_is_not_exist=C\u1ea3nh b\u00e1o! B\u00e1o c\u00e1o n\u00e0y hi\u1ec7n t\u1ea1i kh\u00f4ng c\u00f2n hi\u1ec7u l\u1ef1c/t\u1ed3n t\u1ea1i.
+yealy=H\u1eb1ng n\u0103m
+export_reports=B\u00e1o c\u00e1o Xu\u1ea5t
+excel_importing=\u0110ang t\u00edch h\u1ee3p b\u1ea3ng
+organisationunit_is_null=Vui l\u00f2ng ch\u1ecdn \u0111\u01a1n v\u1ecb!
+intro_chart=T\u1ea1o m\u1edbi, thay \u0111\u1ed5i, x\u00f3a, v\u00e0 xem bi\u1ec3u \u0111\u1ed3
+cleanup_success=\u0110\u00e3 x\u00f3a th\u01b0 m\u1ee5c t\u1ea1m
+LOAD_PERIOD_AUTO=T\u1ea3i th\u1eddi \u0111i\u1ec3m t\u1ef1 \u0111\u1ed9ng t\u00ednh \u0111\u1ebfn nay
+sheet_no=S\u1ed1 b\u1ea3ng
+intro_import_reports=T\u1ea1o m\u1edbi, c\u1eadp nh\u1eadt, x\u00f3a v\u00e0 xem c\u00e1c ph\u1ea7n t\u1eed \u0111\u1ec3 t\u00edch h\u1ee3p d\u1eef li\u1ec7u t\u1eeb c\u00e1c t\u1eadp tin b\u1ea3ng. C\u00e1c ph\u1ea7n t\u1eed n\u00e0y t\u01b0\u01a1ng \u0111\u01b0\u01a1ng v\u1edbi c\u00e1c ph\u1ea7n t\u1eed b\u00e1o c\u00e1o.
+filter_by_group=L\u1ecdc theo Nh\u00f3m ph\u1ea7n t\u1eed d\u1eef li\u1ec7u
+size=K\u00edch th\u01b0\u1edbc
+middle=Gi\u1eefa
+period_chart=Bi\u1ec3u \u0111\u1ed3 th\u1eddi gian
+select_report=[Select report]
+levels=C\u1ea5p
+move_all=Ch\u1ecdn t\u1ea5t c\u1ea3
+import_reports=B\u00e1o c\u00e1o Nh\u1eadp
+intro_data_status=Ch\u1ee9c n\u0103ng n\u00e0y d\u00f9ng \u0111\u1ec3 xem tr\u1ea1ng th\u00e1i nh\u1eadp d\u1eef li\u1ec7u (D\u1eef li\u1ec7u \u0111\u01b0\u1ee3c nh\u1eadp xong hay ch\u01b0a ho\u1eb7c s\u1ed1 li\u1ec7u n\u00e0o c\u00f2n thi\u1ebfu v.v...).
+remove_all=B\u1ecf t\u1ea5t c\u1ea3
+update_import_item=Ch\u1ec9nh s\u1eeda ph\u1ea7n t\u1eed b\u00e1o c\u00e1o Nh\u1eadp
+name_ready_exist=T\u00ean n\u00e0y \u0111\u00e3 t\u1ed3n t\u1ea1i!
+length_filename_min5_max30=\u0110\u1ed9 d\u00e0i c\u1ee7a t\u00ean t\u1eadp tin t\u1ed1i thi\u1ec3u l\u00e0 5 v\u00e0 t\u1ed1i \u0111a l\u00e0 30
+category_list=Danh s\u00e1ch c\u00e1c Lo\u1ea1i t\u1eadp h\u1ee3p
+indicator=Ch\u1ec9 s\u1ed1
+clean=X\u00f3a t\u1ea5t c\u1ea3
+period_listing_importing_not_support=R\u1ea5t ti\u1ebfc, hi\u00ean t\u1ea1i lo\u1ea1i th\u1eddi \u0111i\u1ec3m t\u00edch h\u1ee3p n\u00e0y ch\u01b0a \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3.
+available_dataelements=Ph\u1ea7n t\u1eed \u0111\u01b0\u1ee3c ch\u1ecdn
+choose_import_item=Ch\u1ecdn ph\u1ea7n t\u1eed c\u1ea7n t\u00edch h\u1ee3p
+import_excel_file_manager=T\u00edch h\u1ee3p t\u1eadp tin b\u1ea3ng
+template_excel_file=T\u1eadp tin b\u1ea3ng m\u1eabu
+define_associations=G\u00e1n b\u00e1o c\u00e1o v\u1edbi \u0111\u01a1n v\u1ecb
+description_is_null=H\u00e3y nh\u1eadp v\u00e0o m\u00f4 t\u1ea3!
+choose_orgunit_group=Nh\u00f3m \u0111\u01a1n v\u1ecb
+temp_folder_is_empty=\u0110\u00e3 d\u1ecdn s\u1ea1ch r\u00e1c
+entried=\u0110\u00e3 nh\u1eadp
+select_period_type=[Ch\u1ecdn th\u1eddi \u0111i\u1ec3m]
+value_rounded=Gi\u00e1 tr\u1ecb n\u00e0y c\u00f3 th\u1ec3 \u0111\u00e3 \u0111\u01b0\u1ee3c l\u00e0m tr\u00f2n
+selected_dataset=T\u1eadp d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c ch\u1ecdn
+clean_up=Clean temporary directory
+column_=c\u1ed9t
+ready_in_use=T\u1eadp tin s\u1eb5n s\u00e0ng \u0111\u1ec3 s\u1eed d\u1ee5ng. Kh\u00f4ng \u0111\u01b0\u1ee3c x\u00f3a!
+selected_user_roles=Ph\u00e2n quy\u1ec1n \u0111\u01b0\u1ee3c ch\u1ecdn
+generate_advanced_report=Xu\u1ea5t b\u00e1o c\u00e1o m\u1edf r\u1ed9ng
+dataelement_groups=Nh\u00f3m ph\u1ea7n t\u1eed d\u1eef li\u1ec7u
+expression_is_null=Vui l\u00f2ng nh\u1eadp bi\u1ec3u th\u1ee9c!
+export_item=Ph\u1ea7n t\u1eed b\u00e1o c\u00e1o
+administration=Qu\u1ea3n tr\u1ecb
+_excel_item=Th\u00eam ph\u1ea7n t\u1eed b\u00e1o c\u00e1o
+import=T\u00edch h\u1ee3p d\u1eef li\u1ec7u
+copy_import_item_to_importreport=Sao ch\u00e9p ph\u1ea7n t\u1eed Nh\u1eadp t\u1edbi b\u00e1o c\u00e1o Nh\u1eadp
+import_excel_file=T\u00edch h\u1ee3p d\u1eef li\u1ec7u t\u1eeb b\u00e1o c\u00e1o b\u1ea3ng
+select_organisation=Vui l\u00f2ng ch\u1ecdn \u0111\u01a1n v\u1ecb
+import_unsuccessfully=T\u00edch h\u1ee3p kh\u00f4ng th\u00e0nh c\u00f4ng
+translation_translate=D\u1ecbch
+update_sort_dataelement_success=S\u1eafp x\u1ebfp th\u1ee9 t\u1ef1 ph\u1ea7n t\u1eed th\u00e0nh c\u00f4ng
+axis_y=Tr\u1ee5c tung (y)
+axis_x=Tr\u1ee5c ho\u00e0nh (x)
+associations=Li\u00ean k\u1ebft
+selected_data_elements=D\u1eef li\u1ec7u \u0111\u01b0\u1ee3c ch\u1ecdn
+title=Ti\u00eau \u0111\u1ec1
+intro_data_status_management=\u0110\u00e2y l\u00e0 ch\u1ee9c n\u0103ng xem t\u00ecnh tr\u1ea1ng d\u1eef li\u1ec7u nh\u1eadp (D\u1eef li\u1ec7u \u0111\u01b0\u1ee3c nh\u1eadp v\u00e0o, ho\u00e0n th\u00e0nh hay thi\u1ebfu s\u00f3t, v.v.).
+use_only_letters_numbers_dot_only=Ch\u1ec9 nh\u1eadp K\u00fd t\u1ef1 v\u00e0 S\u1ed1 cho t\u00ean t\u1eadp tin v\u00e0 D\u1ea5u ch\u1ea5m(.) cho ph\u1ea7n \u0111u\u00f4i m\u1edf r\u1ed9ng
+report_import_item=Ph\u1ea7n t\u1eed b\u00e1o c\u00e1o
+period_postion_row=H\u00e0ng \u0111\u1ecbnh v\u1ecb th\u1eddi gian
+file_format_structure_broken=C\u1ea3nh b\u00e1o! C\u1ea5u tr\u00fac \u0111\u1ecbnh d\u1ea1ng t\u1eadp tin kh\u00f4ng b\u1ecb ph\u00e1 v\u1ee1.
+color=M\u00e0u s\u1eafc
+remove_available=Tr\u1ea3 v\u1ec1
+template_status=Tr\u1ea1ng th\u00e1i t\u1eadp tin
+bookmark=\u0110\u00e1nh d\u1ea5u
+divide=Ph\u00e9p chia
+de_in_chart=Bi\u1ec3u \u0111\u1ed3 d\u1eef li\u1ec7u/ch\u1ec9 s\u1ed1
+load_period_by=Th\u1eddi \u0111i\u1ec3m theo
+grouplisting=Danh s\u00e1ch nh\u00f3m
+config_path_invalid=C\u1ea5u h\u00ecnh kh\u00f4ng h\u1ee3p l\u1ec7! Ch\u1ec9 cho ph\u00e9p nh\u1eadp ch\u1eef c\u00e1i, ch\u1eef s\u1ed1, k\u00fd t\u1ef1 g\u1ea1ch d\u01b0\u1edbi, g\u1ea1ch ngang v\u00e0 kho\u1ea3ng tr\u1eafng.
+quaterly=H\u1eb1ng qu\u00fd
+confirm_override=B\u1ea1n c\u00f3 mu\u1ed1n ghi \u0111\u00e8 l\u00ean t\u1eadp tin \u0111\u00e3 c\u00f3?
+dataset_is_null=H\u00e3y ch\u1ecdn t\u1eadp d\u1eef li\u1ec7u!
+there_is_no_import_report=Kh\u00f4ng c\u00f3 ph\u1ea7n t\u1eed t\u00edch h\u1ee3p/b\u00e1o c\u00e1o n\u00e0o trong h\u1ec7 th\u1ed1ng
+upload_file_first=T\u1ea3i l\u00ean t\u1eadp tin tr\u01b0\u1edbc!
+copy_import_item_to_exportreport=Sao ch\u00e9p ph\u1ea7n t\u1eed Nh\u1eadp t\u1edbi b\u00e1o c\u00e1o Xu\u1ea5t
+make_default=Ch\u1ecdn l\u00e0m m\u1eb7c \u0111\u1ecbnh
+report_ready_exist=B\u00e1o c\u00e1o \u0111\u00e3 t\u1ed3n t\u1ea1i
+choose_export_report=Ch\u01b0a ch\u1ecdn b\u00e1o c\u00e1o xu\u1ea5t
+update_export_item=Ch\u1ec9nh s\u1eeda ph\u1ea7n t\u1eed b\u00e1o c\u00e1o Xu\u1ea5t
+indicator_groups=Nh\u00f3m ch\u1ec9 s\u1ed1
+import_successfully=T\u00edch h\u1ee3p th\u00e0nh c\u00f4ng
+excel_is_null=Vui l\u00f2ng nh\u1eadp \u0111\u01b0\u1eddng d\u1eabn m\u1eabu b\u00e1o c\u00e1o!
+intro_import_report=T\u1ea1o m\u1edbi, c\u1eadp nh\u1eadt, xem v\u00e0o x\u00f3a c\u00e1c ph\u1ea7n t\u1eed excel cho qu\u00e1 tr\u00ecnh import d\u1eef li\u1ec7u t\u1eeb t\u1eadp tin excel. Ph\u1ea7n t\u1eed import excel n\u00e0y c\u00f3 ch\u1ee9c n\u0103ng g\u1ea7n gi\u1ed1ng v\u1edbi ph\u1ea7n t\u1eed export excel.
+horizontal=H\u00e0ng ngang
+item_type=Ki\u1ec3u ph\u1ea7n t\u1eed
+draw_chart=V\u1ebd bi\u1ec3u \u0111\u1ed3
+available_indicators=Ch\u1ec9 s\u1ed1 c\u00f3 s\u1eb5n
+dataset_completed_report=Xem t\u00ecnh h\u00ecnh nh\u1eadp b\u00e1o c\u00e1o
+selected=\u0110\u01b0\u1ee3c ch\u1ecdn
+working_in_progress=\u0110ang x\u1eed l\u00fd ...
+organisation_position_=\u0111\u1ecbnh v\u1ecb \u0111\u01a1n v\u1ecb
+organisation_position_row=C\u1ed9t \u0111\u1ecbnh v\u1ecb d\u00f2ng
+cell_exist=\u0110\u00e3 t\u1ed3n t\u1ea1i ph\u1ea7n t\u1eed c\u00f3 c\u00f9ng d\u00f2ng, c\u1ed9t v\u00e0 b\u1ea3ng.
+rename_failed=\u0110\u1ed5i t\u00ean kh\u00f4ng th\u00e0nh c\u00f4ng
+formula_is_invalid=Bi\u1ec3u th\u1ee9c kh\u00f4ng h\u1ee3p l\u1ec7 !
+view=Xem b\u00e1o c\u00e1o
+deleted_file=C\u00e1c t\u1eadp tin \u0111\u00e3 x\u00f3a
+PERIOD_COLUMN_LISTING=Li\u1ec7t k\u00ea th\u1eddi \u0111i\u1ec3m theo c\u1ed9t
+upload_successful=T\u1ea3i t\u1eadp tin th\u00e0nh c\u00f4ng !
+override_confirm=B\u1ea3ng m\u1eabu \u0111\u00e3 t\u1ed3n t\u1ea1i. B\u1ea1n c\u00f3 mu\u1ed1n ghi \u0111\u00e8 hay kh\u00f4ng ?
+no_group_order_created_for_category=Kh\u00f4ng c\u00f3 nh\u00f3m s\u1eafp x\u1ebfp \u0111\u01b0\u1ee3c t\u1ea1o cho b\u00e1o c\u00e1o ph\u00e2n lo\u1ea1i n\u00e0y
+group_order=Nh\u00f3m ph\u1ea7n t\u1eed d\u1eef li\u1ec7u s\u1eafp x\u1ebfp (Category)
+has_no_element=kh\u00f4ng c\u00f3 t\u1eadp con
+indicator_with_id=Ch\u1ec9 s\u1ed1 c\u00f3 m\u00e3
+dataelement_with_id=Ph\u1ea7n t\u1eed d\u1eef li\u1ec7u c\u00f3 m\u00e3
+cate_option_combo_with_id=T\u1eadp m\u1ee5c ch\u1ecdn ph\u00e2n lo\u1ea1i c\u00f3 m\u00e3
+does_not_exist=kh\u00f4ng t\u1ed3n t\u1ea1i
+Period_columns=C\u1ed9t th\u1eddi \u0111i\u1ec3m
+period_columns=Period columns
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/resources/struts.xml'
--- local/vn/dhis-web-dataentry-hospital/src/main/resources/struts.xml 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/resources/struts.xml 2012-03-24 01:29:01 +0000
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE struts PUBLIC
+"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+"http://struts.apache.org/dtds/struts-2.0.dtd">
+<struts>
+
+ <include file="dhis-web-commons.xml" />
+
+ <package name="dhis-web-dataentry-hospital" extends="dhis-web-commons"
+ namespace="/dhis-web-dataentry-hospital">
+
+ <action name="index" class="org.hisp.dhis.dataelement.LoadFormAction">
+ <result name="success" type="redirect">loadForm.action
+ </result>
+ </action>
+
+ <!-- data entry form -->
+
+ <action name="loadForm" class="org.hisp.dhis.dataelement.LoadFormAction">
+ <result name="custom" type="velocity">/dhis-web-dataentry/customForm.vm</result>
+ <result name="section" type="velocity">/dhis-web-dataentry/sectionForm.vm</result>
+ <result name="default" type="velocity">/dhis-web-dataentry/defaultForm.vm</result>
+ <result name="input" type="velocity">/dhis-web-dataentry/responseVoid.vm</result>
+ </action>
+
+ </package>
+</struts>
\ No newline at end of file
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/webapp'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/WEB-INF'
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/WEB-INF/lib'
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/WEB-INF/web.xml'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/WEB-INF/web.xml 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/WEB-INF/web.xml 2012-03-24 01:29:01 +0000
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <display-name>DHIS Web Spreadsheet Reporting</display-name>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath*:/META-INF/dhis/beans.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>automaticAccessType</param-name>
+ <param-value>ghostAdmin</param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>RedirectFilter</filter-name>
+ <filter-class>org.hisp.dhis.servlet.filter.HttpRedirectFilter</filter-class>
+ <init-param>
+ <param-name>redirectPath</param-name>
+ <param-value>dhis-web-dataentry-hospital/index.action</param-value>
+ </init-param>
+ </filter>
+ <filter>
+ <filter-name>OpenSessionInViewFilter</filter-name>
+ <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
+ </filter>
+ <filter>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+ </filter>
+ <filter>
+ <filter-name>Struts</filter-name>
+ <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>RedirectFilter</filter-name>
+ <url-pattern>/</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>OpenSessionInViewFilter</filter-name>
+ <url-pattern>*.action</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>Struts</filter-name>
+ <url-pattern>*.action</url-pattern>
+ </filter-mapping>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.hisp.dhis.system.startup.StartupListener</listener-class>
+ </listener>
+</web-app>
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry'
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/customForm.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/customForm.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/customForm.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,1 @@
+$customDataEntryFormCode
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/defaultForm.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/defaultForm.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/defaultForm.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,60 @@
+#set( $tabIndex = 1 )
+#set( $hasAccess = $auth.hasAccess( "dhis-web-dataentry", "saveValue" ) )
+
+#foreach( $categoryCombo in $orderedCategoryCombos )
+<table class="formSection" cellspacing="0">
+ #set( $colCount = $numberOfTotalColumns.get( $categoryCombo.id ) )
+ #set( $categories = $orderedCategories.get( $categoryCombo.id ) )
+ #set( $optionsMap = $orderedOptionsMap.get( $categoryCombo.id ) )
+ #set( $colRepeat = $catColRepeat.get( $categoryCombo.id ) )
+
+ #foreach( $category in $categories )
+ #set( $categoryOptions = $optionsMap.get( $category.id ) )
+ #set( $colCount = $colCount / $categoryOptions.size() )
+ <tr colspan="$colCount">
+ <td></td>
+ #set( $cols = $colRepeat.get( $category.id ) )
+ #foreach( $col in $cols )
+ #foreach( $categoryOption in $categoryOptions )
+ <th colspan="$colCount"><span align="center">#if( $categoryOption.isDefault() )${i18n.getString( "value" )}#else ${encoder.htmlEncode( $categoryOption.name )}#end</span></th>
+ #end
+ #end
+ </tr>
+ #end
+
+ #set( $count = 0 )
+ #set( $dataElements = $orderedDataElements.get( $categoryCombo ) )
+ #set( $optionCombos = $orderdCategoryOptionCombos.get( $categoryCombo.id ) )
+ #set( $mark = 0 )
+ #foreach( $optionCombo in $optionCombos )<span id="${optionCombo.id}-optioncombo" class="hidden">${encoder.htmlEncode( $optionCombo.name )}</span>
+ #end
+ #foreach( $dataElement in $dataElements )
+ #if( $mark == 1 )
+ #set( $mark = 0 )
+ #else
+ #set( $mark = 1 )
+ #end
+ #set( $count = $count + 1 )
+ <tr>
+ <td id="${dataElement.id}-cell" #if( $mark == 1 )class="alt"#else class="reg"#end><span id="${dataElement.id}-dataelement">${encoder.htmlEncode( $dataElement.getFormNameFallback() )}</span></td>
+ #foreach( $optionCombo in $optionCombos )
+ #set( $dataEntryId = "${dataElement.id}-${optionCombo.id}-val" )
+ <td>
+ #if( $dataElement.type == "bool" )
+ <select name="entryselect" id="$dataEntryId"#if( !$hasAccess ) disabled="disabled"#end tabindex="$tabIndex">
+ <option value="">[$i18n.getString( "no_value" )]</option>
+ <option value="true">$i18n.getString( "yes" )</option>
+ <option value="false">$i18n.getString( "no" )</option>
+ </select>
+ #else
+ <input name="entryfield" id="$dataEntryId" type="text"#if( !$hasAccess ) disabled="disabled"#end tabindex="$tabIndex">
+ #end
+ </td>
+ #set( $tabIndex = $tabIndex + 1 )
+ #end
+ </tr>
+ #end
+</table>
+<br>
+<br>
+#end
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/history.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/history.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/history.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,97 @@
+<script type="text/javascript">
+var currentDataElementId = $!{dataElementHistory.dataElement.id};
+var currentOptionComboId = $!{dataElementHistory.optionCombo.id};
+</script>
+
+#set( $width = 40 * $dataElementHistory.historyLength )
+#set( $lastIndex = $dataElementHistory.historyLength - 1 )
+#set( $average = $dataElementHistory.historyPoints.get( $lastIndex ).average )
+#set( $dataValueAuditSize = $dataValueAudits.size() )
+<table>
+ <tr>
+ <!-- Comment -->
+ <td valign="top">
+ <h4>$i18n.getString( "dataelement_comment" )
+
+ #if ( $dataValue && $dataValue.isFollowup() )
+ <img id="followup" src="../images/marked.png" alt="$i18n.getString( 'mark_value_for_followup' )" onclick="markValueForFollowup()" style="cursor:pointer"/>
+ #elseif ( $dataValue )
+ <img id="followup" src="../images/unmarked.png" alt="$i18n.getString( 'unmark_value_for_followup' )" onclick="markValueForFollowup()" style="cursor:pointer"/>
+ #else
+ <img id="followup" src="../images/unmarked.png"/>
+ #end
+ </h4>
+ <textarea id="commentTextArea" style="height:130px;width:240px">$!encoder.htmlEncode( $dataValue.comment )</textarea><br>
+ <input type="button" value="$i18n.getString( 'save_comment' )" style="width:130px" onclick="saveComment()">
+ </td>
+
+ <!-- Min-max -->
+ <td valign="top">
+ <h4>$encoder.htmlEncode( $i18n.getString( "min_max_limits" ) )</h4>
+ <table>
+ <tr>
+ <td style="background-color:#d54a4a; height:26px;"> </td>
+ <td>$encoder.htmlEncode( $i18n.getString( "min_limit" ) ) </td>
+ <td><input type="text" id="minLimit" style="width:10em" value="$!{dataElementHistory.minLimit}" class="{validate:{digits:true}}"
+ #if( !$auth.hasAccess( "dhis-web-dataentry", "saveMinMaxLimits" ) ) disabled="disabled"#end />
+ <i><span id="minSpan" style="color:red"></span></i>
+ </td>
+ </tr>
+ <tr>
+ <td style="background-color:#2e4e83; height:26px;"> </td>
+ <td>$encoder.htmlEncode( $i18n.getString( "max_limit" ) ) </td>
+ <td><input type="text" id="maxLimit" style="width:10em" value="$!{dataElementHistory.maxLimit}" class="{validate:{digits:true}}"
+ #if( !$auth.hasAccess( "dhis-web-dataentry", "saveMinMaxLimits" ) ) disabled="disabled"#end />
+ <i><span id="maxSpan" style="color:red"></span></i>
+ </td>
+ </tr>
+ <tr>
+ <td style="background-color:#f4f256; height:26px;"> </td>
+ <td>$encoder.htmlEncode( $i18n.getString( "average" ) ) </td>
+ <td>$!{average}</td>
+ </tr>
+ <tr>
+ <td colspan="3"><input type="button" value="$i18n.getString( 'save' )" onclick="saveMinMaxLimit()" style="width:100px">
+ <input type="button" value="$i18n.getString( 'remove' )" onclick="removeMinMaxLimit()" style="width:100px"></td>
+ </tr>
+ <tr>
+ <td colspan="3" style="height:15px"></td>
+ </tr>
+ <tr>
+ <td colspan="2" style="background-color: #e0e0e0; height:26px;">$i18n.getString( "stored_by" )</td>
+ <td>$!encoder.htmlEncode( $storedBy )</td>
+ </tr>
+ <tr>
+ <td colspan="2" style="background-color: #e0e0e0; height:26px;">$i18n.getString( "stored_date" )</td>
+ <td>$!format.formatDate( $dataValue.timestamp )</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <!-- History chart -->
+ <td colspan="2">
+ #if( $historyInvalid )
+ <h4>$encoder.htmlEncode( $i18n.getString( "history_not_valid" ) )</h4>
+ #else
+ <h4>$encoder.htmlEncode( $i18n.getString( "dataelement_history" ) )</h4>
+ <img id="historyChart" src="getHistoryChart.action?dataElementId=${dataElementHistory.dataElement.id}&categoryOptionComboId=${dataElementHistory.optionCombo.id}&organisationUnitId=${dataElementHistory.organisationUnit.id}&periodId=${periodId}"/>
+ #end
+ </td>
+ </tr>
+ #if( $dataValueAuditSize > 0 )
+ <tr>
+ <!-- Data Value History -->
+ <td colspan="2">
+ <h4>$encoder.htmlEncode( $i18n.getString( "datavalue_history" ) )</h4>
+ #foreach( $eachDataValueAudit in $dataValueAudits )
+ <p>
+ $encoder.htmlEncode( $i18n.getString( "on" ) ) $eachDataValueAudit.timeStamp,
+ $eachDataValueAudit.storedBy
+ $encoder.htmlEncode( $i18n.getString( "change_from" ) ) $eachDataValueAudit.value
+ </p>
+ #end
+ </td>
+ </tr>
+ #end
+</table>
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript'
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/entry.js 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2012-03-24 01:29:01 +0000
@@ -0,0 +1,294 @@
+/**
+ * This file depends on form.js.
+ *
+ * Format for the span/input identifiers for selectors:
+ *
+ * {dataelementid}-{optioncomboid}-val // data value
+ * {dataelementid}-dataelement name of data element
+ * {optioncomboid}-optioncombo // name of category option combo
+ * {dataelementid}-cell // table cell for data element name
+ * {dataelementid}-{optioncomboid}-min // min value for data value
+ * {dataelementid}-{optioncomboid}-max // max value for data value
+ */
+
+// -----------------------------------------------------------------------------
+// Save
+// -----------------------------------------------------------------------------
+
+var FORMULA_PATTERN = /\[.+?\]/g;
+var SEPARATOR = '.';
+
+function updateDataElementTotals()
+{
+ var currentTotals = [];
+
+ $( 'input[name="total"]' ).each( function( index )
+ {
+ var targetId = $( this ).attr( 'dataelementid' );
+
+ var totalValue = new Number();
+
+ $( 'input[name="entryfield"]' ).each( function( index )
+ {
+ var key = $( this ).attr( 'id' );
+ var entryFieldId = key.substring( 0, key.indexOf( '-' ) );
+
+ if ( targetId && $( this ).attr( 'value' ) && targetId == entryFieldId )
+ {
+ totalValue += new Number( $( this ).attr( 'value' ) );
+ }
+ } );
+
+ $( this ).attr( 'value', totalValue );
+ } );
+}
+
+/**
+ * Updates all indicator input fields with the calculated value based on the
+ * values in the input entry fields in the form.
+ */
+function updateIndicators()
+{
+ $( 'input[name="indicator"]' ).each( function( index )
+ {
+ var indicatorId = $( this ).attr( 'indicatorid' );
+
+ var formula = indicatorFormulas[indicatorId];
+
+ var expression = generateExpression( formula );
+
+ if ( expression )
+ {
+ var value = eval( expression );
+
+ value = isNaN( value ) ? '-' : roundTo( value, 1 );
+
+ $( this ).attr( 'value', value );
+ }
+ } );
+}
+
+/**
+ * Parses the expression and substitues the operand identifiers with the value
+ * of the corresponding input entry field.
+ */
+function generateExpression( expression )
+{
+ var matcher = expression.match( FORMULA_PATTERN );
+
+ for ( k in matcher )
+ {
+ var match = matcher[k];
+
+ // Remove brackets from expression to simplify extraction of identifiers
+
+ var operand = match.replace( /[\[\]]/g, '' );
+
+ var dataElementId = operand.substring( 0, operand.indexOf( SEPARATOR ) );
+ var categoryOptionComboId = operand.substring( operand.indexOf( SEPARATOR ) + 1, operand.length );
+
+ var fieldId = '#' + dataElementId + '-' + categoryOptionComboId + '-val';
+
+ if ( $( fieldId ).length )
+ {
+ var value = $( fieldId ).val() ? $( fieldId ).val() : '0';
+
+ expression = expression.replace( match, value );
+ }
+ else // Return null if data element / category option combo not in form
+ {
+ return null;
+ }
+
+ // TODO signed numbers
+ }
+
+ return expression;
+}
+
+/**
+ * /* Used by default and section forms.
+ */
+function saveVal( dataElementId, optionComboId )
+{
+ dataElementId = parseInt( dataElementId );
+ optionComboId = parseInt( optionComboId );
+
+ var dataElementName = getDataElementName( dataElementId );
+ var fieldId = '#' + dataElementId + '-' + optionComboId + '-val';
+ var value = $( fieldId ).val();
+ var type = getDataElementType( dataElementId );
+
+ $( fieldId ).css( 'background-color', COLOR_YELLOW );
+
+ var periodId = $( '#selectedPeriodId' ).val();
+
+ if ( value == null )
+ {
+ value = '';
+ }
+
+ if ( value != '' )
+ {
+ if ( type == 'int' || type == 'number' || type == 'positiveNumber' || type == 'negativeNumber' )
+ {
+ if ( value.length > 255 )
+ {
+ return alertField( fieldId, i18n_value_too_long + ': ' + dataElementName );
+ }
+ if ( type == 'int' && !isInt( value ) )
+ {
+ return alertField( fieldId, i18n_value_must_integer + ': ' + dataElementName );
+ }
+ if ( type == 'number' && !isRealNumber( value ) )
+ {
+ return alertField( fieldId, i18n_value_must_number + ': ' + dataElementName );
+ }
+ if ( type == 'positiveNumber' && !isPositiveInt( value ) )
+ {
+ return alertField( fieldId, i18n_value_must_positive_integer + ': ' + dataElementName );
+ }
+ if ( type == 'negativeNumber' && !isNegativeInt( value ) )
+ {
+ return alertField( fieldId, i18n_value_must_negative_integer + ': ' + dataElementName );
+ }
+ if ( isValidZeroNumber( value ) )
+ {
+ // If value = 0 and zero not significant for data element, skip
+
+ if ( significantZeros.indexOf( dataElementId ) == -1 )
+ {
+ $( fieldId ).css( 'background-color', COLOR_GREEN );
+ return false;
+ }
+ }
+
+ var minString = currentMinMaxValueMap[dataElementId + '-' + optionComboId + '-min'];
+ var maxString = currentMinMaxValueMap[dataElementId + '-' + optionComboId + '-max'];
+
+ if ( minString && maxString ) // TODO if only one exists?
+ {
+ var valueNo = new Number( value );
+ var min = new Number( minString );
+ var max = new Number( maxString );
+
+ if ( valueNo < min )
+ {
+ var valueSaver = new ValueSaver( dataElementId, optionComboId, currentOrganisationUnitId, periodId,
+ value, COLOR_ORANGE );
+ valueSaver.save();
+
+ window.alert( i18n_value_of_data_element_less + ': ' + min + '\n\n' + dataElementName );
+ return;
+ }
+
+ if ( valueNo > max )
+ {
+ var valueSaver = new ValueSaver( dataElementId, optionComboId, currentOrganisationUnitId, periodId,
+ value, COLOR_ORANGE );
+ valueSaver.save();
+
+ window.alert( i18n_value_of_data_element_greater + ': ' + max + '\n\n' + dataElementName );
+ return;
+ }
+ }
+ }
+ }
+
+ var valueSaver = new ValueSaver( dataElementId, optionComboId,
+ currentOrganisationUnitId, periodId, value, COLOR_GREEN );
+ valueSaver.save();
+
+ updateIndicators(); // Update indicators for custom form
+ updateDataElementTotals(); // Update data element totals for custom forms
+}
+
+function saveBoolean( dataElementId, optionComboId )
+{
+ var fieldId = '#' + dataElementId + '-' + optionComboId + '-val';
+ var value = $( fieldId + ' option:selected' ).val();
+
+ $( fieldId ).css( 'background-color', COLOR_YELLOW );
+
+ var periodId = $( '#selectedPeriodId' ).val();
+
+ var valueSaver = new ValueSaver( dataElementId, optionComboId,
+ currentOrganisationUnitId, periodId, value, COLOR_GREEN );
+ valueSaver.save();
+}
+
+/**
+ * Supportive method.
+ */
+function alertField( fieldId, alertMessage )
+{
+ $( fieldId ).css( 'background-color', COLOR_YELLOW );
+ $( fieldId ).select();
+ $( fieldId ).focus();
+ window.alert( alertMessage );
+
+ return false;
+}
+
+// -----------------------------------------------------------------------------
+// Saver objects
+// -----------------------------------------------------------------------------
+
+function ValueSaver( dataElementId_, optionComboId_, organisationUnitId_, periodId_, value_, resultColor_ )
+{
+ var dataValue = {
+ 'dataElementId' : dataElementId_,
+ 'optionComboId' : optionComboId_,
+ 'organisationUnitId' : organisationUnitId_,
+ 'periodId' : periodId_,
+ 'value' : value_,
+ };
+
+ var resultColor = resultColor_;
+
+ this.save = function()
+ {
+ storageManager.saveDataValue( dataValue );
+
+ $.ajax( {
+ url: 'saveValue.action',
+ data: dataValue,
+ dataType: 'json',
+ cache: false,
+ success: handleSuccess,
+ error: handleError
+ } );
+ };
+
+ function handleSuccess( json )
+ {
+ var code = json.c;
+
+ if ( code == 0 ) // Value successfully saved on server
+ {
+ storageManager.clearDataValueJSON( dataValue );
+ markValue( resultColor );
+ }
+ else if(code == 2)
+ {
+ markValue( COLOR_RED );
+ window.alert( i18n_saving_value_failed_dataset_is_locked );
+ }
+ else // Server error during save
+ {
+ markValue( COLOR_RED );
+ window.alert( i18n_saving_value_failed_status_code + '\n\n' + code );
+ }
+ }
+
+ function handleError( jqXHR, textStatus, errorThrown )
+ {
+ setHeaderMessage( i18n_offline_notification );
+ markValue( resultColor );
+ }
+
+ function markValue( color )
+ {
+ $( '#' + dataValue.dataElementId + '-' + dataValue.optionComboId + '-val' ).css( 'background-color', color );
+ }
+}
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/form.js 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/form.js 2012-03-24 01:29:01 +0000
@@ -0,0 +1,1643 @@
+// Identifiers for which zero values are insignificant, also used in entry.js
+var significantZeros = [];
+
+// Array with associative arrays for each data element, populated in select.vm
+var dataElements = [];
+
+// Associative array with [indicator id, expression] for indicators in form,
+// also used in entry.js
+var indicatorFormulas = [];
+
+// Array with associative arrays for each data set, populated in select.vm
+var dataSets = [];
+
+// Associative array with identifier and array of assigned data sets
+var dataSetAssociationSets = [];
+
+// Associate array with mapping between organisation unit identifier and data
+// set association set identifier
+var organisationUnitAssociationSetMap = [];
+
+// Array with keys on form {dataelementid}-{optioncomboid}-min/max with min/max
+// values
+var currentMinMaxValueMap = [];
+
+// Indicates whether any data entry form has been loaded
+var dataEntryFormIsLoaded = false;
+
+// Indicates whether meta data is loaded
+var metaDataIsLoaded = false;
+
+// Currently selected organisation unit identifier
+var currentOrganisationUnitId = null;
+
+// Currently selected data set identifier
+var currentDataSetId = null;
+
+// Current offset, next or previous corresponding to increasing or decreasing
+// value with one
+var currentPeriodOffset = 0;
+
+// Username of user who marked the current data set as complete if any
+var currentCompletedByUser = null;
+
+// Period type object
+var periodTypeFactory = new PeriodType();
+
+// Instance of the StorageManager
+var storageManager = new StorageManager();
+
+var COLOR_GREEN = '#b9ffb9';
+var COLOR_YELLOW = '#fffe8c';
+var COLOR_RED = '#ff8a8a';
+var COLOR_ORANGE = '#ff6600';
+var COLOR_WHITE = '#ffffff';
+var COLOR_GREY = '#cccccc';
+
+var DEFAULT_TYPE = 'int';
+var DEFAULT_NAME = '[unknown]';
+
+var FORMTYPE_CUSTOM = 'custom';
+var FORMTYPE_SECTION = 'section';
+var FORMTYPE_DEFAULT = 'default';
+
+/**
+ * Page init. The order of events is:
+ *
+ * 1. Load ouwt 2. Load meta-data (and notify ouwt) 3. Check and potentially
+ * download updated forms from server
+ */
+$( document ).ready( function()
+{
+ $.ajaxSetup( {
+ type: 'POST'
+ } );
+
+ selection.setListenerFunction( organisationUnitSelected );
+ $( '#loaderSpan' ).show();
+
+ $( '#orgUnitTree' ).one( 'ouwtLoaded', function()
+ {
+ log( 'Ouwt loaded' );
+ loadMetaData();
+ } );
+
+ $( document ).bind( 'dhis2.online', function( event, loggedIn )
+ {
+ if ( loggedIn )
+ {
+ if ( storageManager.hasLocalData() )
+ {
+ var message = i18n_need_to_sync_notification
+ + ' <button id="sync_button" type="button">' + i18n_sync_now
+ + '</button>';
+
+ setHeaderMessage( message );
+
+ $( '#sync_button' ).bind( 'click', uploadLocalData );
+ }
+ else
+ {
+ setHeaderDelayMessage( i18n_online_notification );
+ }
+ }
+ else
+ {
+ setHeaderMessage( '<form style="display:inline;"><label for="username">Username</label><input name="username" id="username" type="text" size="10"/><label for="password">Password</label><input name="password" id="password" type="password" size="10"/><button id="login_button" type="button">Login</button></form>' );
+ ajax_login();
+ }
+ } );
+
+ $( document ).bind( 'dhis2.offline', function()
+ {
+ setHeaderMessage( i18n_offline_notification );
+ } );
+
+ dhis2.availability.startAvailabilityCheck();
+} );
+
+function ajax_login()
+{
+ $( '#login_button' ).bind( 'click', function()
+ {
+ var username = $( '#username' ).val();
+ var password = $( '#password' ).val();
+
+ $.post( '../dhis-web-commons-security/login.action', {
+ 'j_username' : username,
+ 'j_password' : password
+ } ).success( function()
+ {
+ var ret = dhis2.availability.syncCheckAvailability();
+
+ if ( !ret )
+ {
+ alert( i18n_ajax_login_failed );
+ }
+ } );
+ } );
+}
+
+function loadMetaData()
+{
+ var KEY_METADATA = 'metadata';
+
+ $.ajax( {
+ url: 'getMetaData.action',
+ cache: false,
+ dataType: 'json',
+ success: function( json )
+ {
+ sessionStorage[KEY_METADATA] = JSON.stringify( json.metaData );
+ },
+ complete: function()
+ {
+ var metaData = JSON.parse( sessionStorage[KEY_METADATA] );
+
+ significantZeros = metaData.significantZeros;
+ dataElements = metaData.dataElements;
+ indicatorFormulas = metaData.indicatorFormulas;
+ dataSets = metaData.dataSets;
+ dataSetAssociationSets = metaData.dataSetAssociationSets;
+ organisationUnitAssociationSetMap = metaData.organisationUnitAssociationSetMap;
+
+ metaDataIsLoaded = true;
+ selection.responseReceived(); // Notify that meta data is loaded
+ $( '#loaderSpan' ).hide();
+ log( 'Meta-data loaded' );
+
+ updateForms();
+ }
+ } );
+}
+
+function uploadLocalData()
+{
+ if ( !storageManager.hasLocalData() )
+ {
+ return;
+ }
+
+ var dataValues = storageManager.getAllDataValues();
+ var completeDataSets = storageManager.getCompleteDataSets();
+
+ setHeaderWaitMessage( i18n_uploading_data_notification );
+
+ var dataValuesArray = dataValues ? Object.keys( dataValues ) : [];
+ var completeDataSetsArray = completeDataSets ? Object.keys( completeDataSets ) : [];
+
+ function pushCompleteDataSets( array )
+ {
+ if ( array.length < 1 )
+ {
+ return;
+ }
+
+ var key = array[0];
+ var value = completeDataSets[key];
+
+ log( 'Uploaded complete data set: ' + key + ', with value: ' + value );
+
+ $.ajax( {
+ url: 'registerCompleteDataSet.action',
+ data: value,
+ dataType: 'json',
+ cache: false,
+ success: function( data, textStatus, jqXHR )
+ {
+ if ( data.status == 2 )
+ {
+ log( 'DataSet is locked' );
+ setHeaderMessage( i18n_register_complete_failed_dataset_is_locked );
+ }
+ else
+ {
+ log( 'Successfully saved complete dataset with value: ' + value );
+ storageManager.clearCompleteDataSet( value );
+ ( array = array.slice( 1 ) ).length && pushCompleteDataSets( array );
+
+ if ( array.length < 1 )
+ {
+ setHeaderDelayMessage( i18n_sync_success );
+ }
+ }
+ },
+ error: function( jqXHR, textStatus, errorThrown )
+ {
+ var message = i18n_sync_failed
+ + ' <button id="sync_button" type="button">' + i18n_sync_now
+ + '</button>';
+
+ setHeaderMessage( message );
+
+ $( '#sync_button' ).bind( 'click', uploadLocalData );
+ }
+ } );
+ };
+
+ ( function pushDataValues( array )
+ {
+ if ( array.length < 1 )
+ {
+ setHeaderDelayMessage( i18n_online_notification );
+
+ pushCompleteDataSets( completeDataSetsArray );
+
+ return;
+ }
+
+ var key = array[0];
+ var value = dataValues[key];
+
+ log( 'Uploaded data value: ' + key + ', with value: ' + value );
+
+ $.ajax( {
+ url: 'saveValue.action',
+ data: value,
+ dataType: 'json',
+ cache: false,
+ success: function( data, textStatus, jqXHR )
+ {
+ if ( data.c == 2 ) {
+ log( 'DataSet is locked' );
+ setHeaderMessage( i18n_saving_value_failed_dataset_is_locked );
+ }
+ else
+ {
+ storageManager.clearDataValueJSON( value );
+ log( 'Successfully saved data value with value: ' + value );
+ ( array = array.slice( 1 ) ).length && pushDataValues( array );
+
+ if ( array.length < 1 && completeDataSetsArray.length > 0 )
+ {
+ pushCompleteDataSets( completeDataSetsArray );
+ }
+ else
+ {
+ setHeaderDelayMessage( i18n_sync_success );
+ }
+ }
+ },
+ error: function( jqXHR, textStatus, errorThrown )
+ {
+ var message = i18n_sync_failed
+ + ' <button id="sync_button" type="button">' + i18n_sync_now
+ + '</button>';
+
+ setHeaderMessage( message );
+
+ $( '#sync_button' ).bind( 'click', uploadLocalData );
+ }
+ } );
+ } )( dataValuesArray );
+}
+
+function addEventListeners()
+{
+ var dataSetId = $( '#selectedDataSetId' ).val();
+ var formType = dataSets[dataSetId].type;
+
+ $( '[name="entryfield"]' ).each( function( i )
+ {
+ var id = $( this ).attr( 'id' );
+ var dataElementId = id.split( '-' )[0];
+ var optionComboId = id.split( '-' )[1];
+ var type = getDataElementType( dataElementId );
+
+ $( this ).unbind( 'focus' );
+ $( this ).unbind( 'blur' );
+ $( this ).unbind( 'change' );
+ $( this ).unbind( 'dblclick' );
+ $( this ).unbind( 'keyup' );
+
+ $( this ).focus( valueFocus );
+
+ $( this ).blur( valueBlur );
+
+ $( this ).change( function()
+ {
+ saveVal( dataElementId, optionComboId );
+ } );
+
+ $( this ).dblclick( function()
+ {
+ viewHist( dataElementId, optionComboId );
+ } );
+
+ $( this ).keyup( function(event)
+ {
+ keyPress( event, this );
+ } );
+
+ if ( formType != FORMTYPE_CUSTOM )
+ {
+ $( this ).css( 'width', '100%' );
+ $( this ).css( 'text-align', 'center' );
+ }
+
+ if ( type == 'date' )
+ {
+ $( this ).css( 'width', '80%' );
+ datePicker( id );
+ }
+ } );
+
+ $( '[name="entryselect"]' ).each( function( i )
+ {
+ var id = $( this ).attr( 'id' );
+ var dataElementId = id.split( '-' )[0];
+ var optionComboId = id.split( '-' )[1];
+
+ $( this ).unbind( 'focus' );
+ $( this ).unbind( 'change' );
+
+ $( this ).focus( valueFocus );
+
+ $( this ).blur( valueBlur );
+
+ $( this ).change( function()
+ {
+ saveBoolean( dataElementId, optionComboId );
+ } );
+
+ $( this ).css( 'width', '100%' );
+ } );
+}
+
+function clearPeriod()
+{
+ clearListById( 'selectedPeriodId' );
+ clearEntryForm();
+}
+
+function clearEntryForm()
+{
+ $( '#contentDiv' ).html( '' );
+
+ currentPeriodOffset = 0;
+
+ dataEntryFormIsLoaded = false;
+
+ $( '#completenessDiv' ).css( 'display', 'none' );
+}
+
+function loadForm( dataSetId )
+{
+ /* if ( storageManager.formExists( dataSetId ) )
+ {
+ log( 'Loading form locally: ' + dataSetId );
+
+ var html = storageManager.getForm( dataSetId );
+
+ $( '#contentDiv' ).html( html );
+
+ loadDataValues();
+ }
+ else
+ {*/
+ log( 'Loading form remotely: ' + dataSetId );
+
+ $( '#contentDiv' ).load( '../dhis-web-dataentry-hospital/loadForm.action', {
+ dataSetId : dataSetId,
+ attributeId: getFieldValue( 'attributeId' ),
+ value: getFieldValue( 'value' )
+ }, loadDataValues );
+ //}
+}
+
+function getDataElementType( dataElementId )
+{
+ if ( dataElements[dataElementId] != null )
+ {
+ return dataElements[dataElementId];
+ }
+
+ log( 'Data element not present in data set, falling back to default type: ' + dataElementId );
+ return DEFAULT_TYPE;
+}
+
+function getDataElementName( dataElementId )
+{
+ var span = $( '#' + dataElementId + '-dataelement' );
+
+ if ( span != null )
+ {
+ return span.text();
+ }
+
+ log( 'Data element not present in form, falling back to default name: ' + dataElementId );
+ return DEFAULT_NAME;
+}
+
+function getOptionComboName( optionComboId )
+{
+ var span = $( '#' + optionComboId + '-optioncombo' );
+
+ if ( span != null )
+ {
+ return span.text();
+ }
+
+ log( 'Category option combo not present in form, falling back to default name: ' + optionComboId );
+ return DEFAULT_NAME;
+}
+
+// ----------------------------------------------------------------------------
+// OrganisationUnit Selection
+// -----------------------------------------------------------------------------
+
+/**
+ * Returns an array containing associative array elements with id and name
+ * properties. The array is sorted on the element name property.
+ */
+function getSortedDataSetList()
+{
+ var associationSet = organisationUnitAssociationSetMap[currentOrganisationUnitId];
+ var orgUnitDataSets = dataSetAssociationSets[associationSet];
+
+ var dataSetList = [];
+
+ for ( i in orgUnitDataSets )
+ {
+ var dataSetId = orgUnitDataSets[i];
+ var dataSetName = dataSets[dataSetId].name;
+
+ var row = [];
+ row['id'] = dataSetId;
+ row['name'] = dataSetName;
+ dataSetList[i] = row;
+ }
+
+ dataSetList.sort( function( a, b )
+ {
+ return a.name > b.name ? 1 : a.name < b.name ? -1 : 0;
+ } );
+
+ return dataSetList;
+}
+
+function organisationUnitSelected( orgUnits, orgUnitNames )
+{
+ if ( metaDataIsLoaded == false )
+ {
+ return false;
+ }
+
+ currentOrganisationUnitId = orgUnits[0];
+ var organisationUnitName = orgUnitNames[0];
+
+ $( '#selectedOrganisationUnit' ).val( organisationUnitName );
+ $( '#currentOrganisationUnit' ).html( organisationUnitName );
+
+ var dataSetList = getSortedDataSetList();
+
+ $( '#selectedDataSetId' ).removeAttr( 'disabled' );
+
+ var dataSetId = $( '#selectedDataSetId' ).val();
+ var periodId = $( '#selectedPeriodId' ).val();
+
+ clearListById( 'selectedDataSetId' );
+ addOptionById( 'selectedDataSetId', '-1', '[ ' + i18n_select_data_set + ' ]' );
+
+ var dataSetValid = false;
+
+ for ( i in dataSetList )
+ {
+ addOptionById( 'selectedDataSetId', dataSetList[i].id, dataSetList[i].name );
+
+ if ( dataSetId == dataSetList[i].id )
+ {
+ dataSetValid = true;
+ }
+ }
+
+ if ( dataSetValid && dataSetId != null )
+ {
+ $( '#selectedDataSetId' ).val( dataSetId );
+
+ if ( periodId && periodId != -1 && dataEntryFormIsLoaded )
+ {
+ showLoader();
+ loadForm( getFieldValue('dataSetId') );
+ //loadDataValues();
+ }
+ }
+ else
+ {
+ clearPeriod();
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Next/Previous Periods Selection
+// -----------------------------------------------------------------------------
+
+function nextPeriodsSelected()
+{
+ if ( currentPeriodOffset < 0 ) // Cannot display future periods
+ {
+ currentPeriodOffset++;
+ displayPeriodsInternal();
+ }
+}
+
+function previousPeriodsSelected()
+{
+ currentPeriodOffset--;
+ displayPeriodsInternal();
+}
+
+function displayPeriodsInternal()
+{
+ var dataSetId = $( '#selectedDataSetId' ).val();
+ var periodType = dataSets[dataSetId].periodType;
+ var periods = periodTypeFactory.get( periodType ).generatePeriods( currentPeriodOffset );
+ periods = periodTypeFactory.filterFuturePeriods( periods );
+
+ clearListById( 'selectedPeriodId' );
+
+ addOptionById( 'selectedPeriodId', '-1', '[ ' + i18n_select_period + ' ]' );
+
+ for ( i in periods )
+ {
+ addOptionById( 'selectedPeriodId', periods[i].id, periods[i].name );
+ }
+}
+
+// -----------------------------------------------------------------------------
+// DataSet Selection
+// -----------------------------------------------------------------------------
+
+function dataSetSelected()
+{
+ $( '#selectedPeriodId' ).removeAttr( 'disabled' );
+ $( '#prevButton' ).removeAttr( 'disabled' );
+ $( '#nextButton' ).removeAttr( 'disabled' );
+
+ var dataSetId = $( '#selectedDataSetId' ).val();
+ var periodId = $( '#selectedPeriodId' ).val();
+ var periodType = dataSets[dataSetId].periodType;
+ var periods = periodTypeFactory.get( periodType ).generatePeriods( currentPeriodOffset );
+ periods = periodTypeFactory.filterFuturePeriods( periods );
+
+ if ( dataSetId && dataSetId != -1 )
+ {
+ clearListById( 'selectedPeriodId' );
+
+ addOptionById( 'selectedPeriodId', '-1', '[ ' + i18n_select_period + ' ]' );
+
+ for ( i in periods )
+ {
+ addOptionById( 'selectedPeriodId', periods[i].id, periods[i].name );
+ }
+
+ var previousPeriodType = currentDataSetId ? dataSets[currentDataSetId].periodType : null;
+
+ if ( periodId && periodId != -1 && previousPeriodType && previousPeriodType == periodType )
+ {
+ showLoader();
+ $( '#selectedPeriodId' ).val( periodId );
+ loadForm( dataSetId );
+ }
+ else
+ {
+ clearEntryForm();
+ }
+
+ currentDataSetId = dataSetId;
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Period Selection
+// -----------------------------------------------------------------------------
+
+function periodSelected()
+{
+ var periodName = $( '#selectedPeriodId :selected' ).text();
+ var dataSetId = $( '#selectedDataSetId' ).val();
+
+ $( '#currentPeriod' ).html( periodName );
+
+ var periodId = $( '#selectedPeriodId' ).val();
+
+ if ( periodId && periodId != -1 )
+ {
+ showLoader();
+
+ //if ( dataEntryFormIsLoaded )
+ //{
+ // loadDataValues();
+ //}
+ //else
+ //{
+ loadForm( dataSetId );
+ //}
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Form
+// -----------------------------------------------------------------------------
+
+function loadDataValues()
+{
+ $( '#completeButton' ).removeAttr( 'disabled' );
+ $( '#undoButton' ).attr( 'disabled', 'disabled' );
+ $( '#infoDiv' ).css( 'display', 'none' );
+
+ insertDataValues();
+ displayEntryFormCompleted();
+}
+
+function insertDataValues()
+{
+ var dataValueMap = [];
+ currentMinMaxValueMap = []; // Reset
+
+ var periodId = $( '#selectedPeriodId' ).val();
+ var dataSetId = $( '#selectedDataSetId' ).val();
+
+ // Clear existing values and colors, grey disabled fields
+
+ $( '[name="entryfield"]' ).val( '' );
+ $( '[name="entryselect"]' ).val( '' );
+
+ $( '[name="entryfield"]' ).css( 'background-color', COLOR_WHITE );
+ $( '[name="entryselect"]' ).css( 'background-color', COLOR_WHITE );
+
+ $( '[name="min"]' ).html( '' );
+ $( '[name="max"]' ).html( '' );
+
+ $( '[name="entryfield"]' ).filter( ':disabled' ).css( 'background-color', COLOR_GREY );
+
+ $.ajax( {
+ url: 'getDataValues.action',
+ data:
+ {
+ periodId : periodId,
+ dataSetId : dataSetId,
+ organisationUnitId : currentOrganisationUnitId
+ },
+ cache: false,
+ dataType: 'json',
+ success: function( json )
+ {
+ if ( json.locked )
+ {
+ $( '#contentDiv' ).hide();
+ $( '#completenessDiv' ).hide();
+ setHeaderDelayMessage( i18n_dataset_is_locked );
+ return;
+ }
+ else
+ {
+ $( '#contentDiv' ).show();
+ $( '#completenessDiv' ).show();
+ }
+
+ // Set data values, works for select lists too as data
+ // value = select value
+
+ $.each( json.dataValues, function( i, value )
+ {
+ var fieldId = '#' + value.id + '-val';
+
+ if ( $( fieldId ) )
+ {
+ $( fieldId ).val( value.val );
+ }
+
+ dataValueMap[value.id] = value.val;
+ } );
+
+ // Set min-max values and colorize violation fields
+
+ $.each( json.minMaxDataElements, function( i, value )
+ {
+ var minId = value.id + '-min';
+ var maxId = value.id + '-max';
+
+ var valFieldId = '#' + value.id + '-val';
+
+ var dataValue = dataValueMap[value.id];
+
+ if ( dataValue && ( ( value.min && new Number( dataValue ) < new Number(
+ value.min ) ) || ( value.max && new Number( dataValue ) > new Number( value.max ) ) ) )
+ {
+ $( valFieldId ).css( 'background-color', COLOR_ORANGE );
+ }
+
+ currentMinMaxValueMap[minId] = value.min;
+ currentMinMaxValueMap[maxId] = value.max;
+ } );
+
+ // Update indicator values in form
+
+ updateIndicators();
+ updateDataElementTotals();
+
+ // Set completeness button
+
+ if ( json.complete )
+ {
+ $( '#completeButton' ).attr( 'disabled', 'disabled' );
+ $( '#undoButton' ).removeAttr( 'disabled' );
+
+ if ( json.storedBy )
+ {
+ $( '#infoDiv' ).css( 'display', 'block' );
+ $( '#completedBy' ).html( json.storedBy );
+ $( '#completedDate' ).html( json.date );
+
+ currentCompletedByUser = json.storedBy;
+ }
+ }
+ else
+ {
+ $( '#completeButton' ).removeAttr( 'disabled' );
+ $( '#undoButton' ).attr( 'disabled', 'disabled' );
+ $( '#infoDiv' ).css( 'display', 'none' );
+ }
+ }
+ } );
+}
+
+function displayEntryFormCompleted()
+{
+ addEventListeners();
+
+ $( '#validationButton' ).removeAttr( 'disabled' );
+
+ dataEntryFormIsLoaded = true;
+ hideLoader();
+}
+
+function valueFocus( e )
+{
+ var id = e.target.id;
+
+ var dataElementId = id.split( '-' )[0];
+ var optionComboId = id.split( '-' )[1];
+
+ var dataElementName = getDataElementName( dataElementId );
+ var optionComboName = getOptionComboName( optionComboId );
+
+ $( '#currentDataElement' ).html( dataElementName + ' ' + optionComboName );
+
+ $( '#' + dataElementId + '-cell' ).addClass( 'currentRow' );
+}
+
+function valueBlur( e )
+{
+ var id = e.target.id;
+
+ var dataElementId = id.split( '-' )[0];
+
+ $( '#' + dataElementId + '-cell' ).removeClass( 'currentRow' );
+}
+
+function keyPress( event, field )
+{
+ var key = event.keyCode || event.charCode || event.which;
+
+ var focusField = ( key == 13 || key == 40 ) ? getNextEntryField( field )
+ : ( key == 38 ) ? getPreviousEntryField( field ) : false;
+
+ if ( focusField )
+ {
+ focusField.focus();
+ }
+}
+
+function getNextEntryField( field )
+{
+ var index = field.getAttribute( 'tabindex' );
+
+ field = $( 'input[name="entryfield"][tabindex="' + ( ++index ) + '"]' );
+
+ while ( field )
+ {
+ if ( field.is( ':disabled' ) || field.is( ':hidden' ) )
+ {
+ field = $( 'input[name="entryfield"][tabindex="' + ( ++index ) + '"]' );
+ }
+ else
+ {
+ return field;
+ }
+ }
+}
+
+function getPreviousEntryField( field )
+{
+ var index = field.getAttribute( 'tabindex' );
+
+ field = $( 'input[name="entryfield"][tabindex="' + ( --index ) + '"]' );
+
+ while ( field )
+ {
+ if ( field.is( ':disabled' ) || field.is( ':hidden' ) )
+ {
+ field = $( 'input[name="entryfield"][tabindex="' + ( --index ) + '"]' );
+ }
+ else
+ {
+ return field;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Data completeness
+// -----------------------------------------------------------------------------
+
+function validateCompleteDataSet()
+{
+ var confirmed = confirm( i18n_confirm_complete );
+
+ if ( confirmed )
+ {
+ var params = storageManager.getCurrentCompleteDataSetParams();
+
+ $.ajax( { url: 'getValidationViolations.action',
+ data: params,
+ cache: false,
+ dataType: 'json',
+ success: function( data )
+ {
+ registerCompleteDataSet( data );
+ },
+ error: function()
+ {
+ // no response from server, fake a positive result and save it
+ registerCompleteDataSet( { 'response' : 'success' } );
+ }
+ } );
+ }
+}
+
+function registerCompleteDataSet( json )
+{
+ var params = storageManager.getCurrentCompleteDataSetParams();
+
+ storageManager.saveCompleteDataSet( params );
+
+ $.ajax( {
+ url: 'registerCompleteDataSet.action',
+ data: params,
+ cache: false,
+ dataType: 'json',
+ success: function(data)
+ {
+ if( data.status == 2 )
+ {
+ log( 'DataSet is locked' );
+ setHeaderMessage( i18n_register_complete_failed_dataset_is_locked );
+ }
+ else
+ {
+ disableCompleteButton();
+
+ storageManager.clearCompleteDataSet( params );
+
+ if ( json.response == 'input' )
+ {
+ validate();
+ }
+ }
+ },
+ error: function()
+ {
+ disableCompleteButton();
+ }
+ } );
+}
+
+function undoCompleteDataSet()
+{
+ var confirmed = confirm( i18n_confirm_undo );
+ var params = storageManager.getCurrentCompleteDataSetParams();
+
+ if ( confirmed )
+ {
+ $.ajax( {
+ url: 'undoCompleteDataSet.action',
+ data: params,
+ cache: false,
+ dataType: 'json',
+ success: function(data)
+ {
+ if( data.status == 2 )
+ {
+ log( 'DataSet is locked' );
+ setHeaderMessage( i18n_unregister_complete_failed_dataset_is_locked );
+ }
+ else
+ {
+ disableUndoButton();
+ storageManager.clearCompleteDataSet( params );
+ }
+
+ },
+ error: function()
+ {
+ storageManager.clearCompleteDataSet( params );
+ }
+ } );
+ }
+}
+
+function disableUndoButton()
+{
+ $( '#completeButton' ).removeAttr( 'disabled' );
+ $( '#undoButton' ).attr( 'disabled', 'disabled' );
+}
+
+function disableCompleteButton()
+{
+ $( '#completeButton' ).attr( 'disabled', 'disabled' );
+ $( '#undoButton' ).removeAttr( 'disabled' );
+}
+
+function displayUserDetails()
+{
+ if ( currentCompletedByUser )
+ {
+ var url = '../dhis-web-commons-ajax-json/getUser.action';
+
+ $.getJSON( url, { username:currentCompletedByUser }, function( json ) {
+ $( '#userFullName' ).html( json.user.firstName + ' ' + json.user.surname );
+ $( '#userUsername' ).html( json.user.username );
+ $( '#userEmail' ).html( json.user.email );
+ $( '#userPhoneNumber' ).html( json.user.phoneNumber );
+ $( '#userOrganisationUnits' ).html( joinNameableObjects( json.user.organisationUnits ) );
+ $( '#userUserRoles' ).html( joinNameableObjects( json.user.roles ) );
+
+ $( '#completedByDiv' ).dialog( {
+ modal : true,
+ width : 350,
+ height : 350,
+ title : 'User'
+ } );
+ } );
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Validation
+// -----------------------------------------------------------------------------
+
+function displayValidationDialog()
+{
+ $( '#validationDiv' ).dialog( {
+ modal : true,
+ title : 'Validation',
+ width : 800,
+ height : 400
+ } );
+}
+
+function validate()
+{
+ var periodId = $( '#selectedPeriodId' ).val();
+ var dataSetId = $( '#selectedDataSetId' ).val();
+
+ $( '#validationDiv' ).load( 'validate.action', {
+ periodId : periodId,
+ dataSetId : dataSetId,
+ organisationUnitId : currentOrganisationUnitId
+ }, function( response, status, xhr )
+ {
+ if ( status == 'error' )
+ {
+ window.alert( i18n_operation_not_available_offline );
+ }
+ else
+ {
+ displayValidationDialog();
+ }
+ } );
+}
+
+// -----------------------------------------------------------------------------
+// History
+// -----------------------------------------------------------------------------
+
+function displayHistoryDialog( operandName )
+{
+ $( '#historyDiv' ).dialog( {
+ modal : true,
+ title : operandName,
+ width : 580,
+ height : 710
+ } );
+}
+
+function viewHist( dataElementId, optionComboId )
+{
+ var periodId = $( '#selectedPeriodId' ).val();
+
+ var dataElementName = getDataElementName( dataElementId );
+ var optionComboName = getOptionComboName( optionComboId );
+ var operandName = dataElementName + ' ' + optionComboName;
+
+ $( '#historyDiv' ).load( 'viewHistory.action', {
+ dataElementId : dataElementId,
+ optionComboId : optionComboId,
+ periodId : periodId,
+ organisationUnitId : currentOrganisationUnitId
+ }, function( response, status, xhr )
+ {
+ if ( status == 'error' )
+ {
+ window.alert( i18n_operation_not_available_offline );
+ }
+ else
+ {
+ displayHistoryDialog( operandName );
+ }
+ } );
+}
+
+function closeCurrentSelection()
+{
+ $( '#currentSelection' ).fadeOut();
+}
+
+// -----------------------------------------------------------------------------
+// Local storage of forms
+// -----------------------------------------------------------------------------
+
+function updateForms()
+{
+ purgeLocalForms();
+ updateExistingLocalForms();
+ downloadRemoteForms();
+}
+
+function purgeLocalForms()
+{
+ var formIds = storageManager.getAllForms();
+
+ for ( i in formIds )
+ {
+ var localId = formIds[i];
+
+ if ( dataSets[localId] == null )
+ {
+ storageManager.deleteForm( localId );
+ storageManager.deleteFormVersion( localId );
+ log( 'Deleted locally stored form: ' + localId );
+ }
+ }
+
+ log( 'Purged local forms' );
+}
+
+function updateExistingLocalForms()
+{
+ var formIds = storageManager.getAllForms();
+ var formVersions = storageManager.getAllFormVersions();
+
+ for ( i in formIds )
+ {
+ var localId = formIds[i];
+
+ var remoteVersion = dataSets[localId].version;
+ var localVersion = formVersions[localId];
+
+ if ( remoteVersion == null || localVersion == null || remoteVersion != localVersion )
+ {
+ storageManager.downloadForm( localId, remoteVersion );
+ }
+ }
+}
+
+function downloadRemoteForms()
+{
+ for ( dataSetId in dataSets )
+ {
+ var remoteVersion = dataSets[dataSetId].version;
+
+ if ( !storageManager.formExists( dataSetId ) )
+ {
+ storageManager.downloadForm( dataSetId, remoteVersion );
+ }
+ }
+}
+
+// TODO break if local storage is full
+
+// -----------------------------------------------------------------------------
+// StorageManager
+// -----------------------------------------------------------------------------
+
+/**
+ * This object provides utility methods for localStorage and manages data entry
+ * forms and data values.
+ */
+function StorageManager()
+{
+ var MAX_SIZE = new Number( 2600000 );
+ var MAX_SIZE_FORMS = new Number( 1600000 );
+
+ var KEY_FORM_PREFIX = 'form-';
+ var KEY_FORM_VERSIONS = 'formversions';
+ var KEY_DATAVALUES = 'datavalues';
+ var KEY_COMPLETEDATASETS = 'completedatasets';
+
+ /**
+ * Returns the total number of characters currently in the local storage.
+ *
+ * @return number of characters.
+ */
+ this.totalSize = function()
+ {
+ var totalSize = new Number();
+
+ for ( var i = 0; i < localStorage.length; i++ )
+ {
+ var value = localStorage.key( i );
+
+ if ( value )
+ {
+ totalSize += value.length;
+ }
+ }
+
+ return totalSize;
+ };
+
+ /**
+ * Returns the total numbers of characters in stored forms currently in the
+ * local storage.
+ *
+ * @return number of characters.
+ */
+ this.totalFormSize = function()
+ {
+ var totalSize = new Number();
+
+ for ( var i = 0; i < localStorage.length; i++ )
+ {
+ if ( localStorage.key( i ).substring( 0, KEY_FORM_PREFIX.length ) == KEY_FORM_PREFIX )
+ {
+ var value = localStorage.key( i );
+
+ if ( value )
+ {
+ totalSize += value.length;
+ }
+ }
+ }
+
+ return totalSize;
+ };
+
+ /**
+ * Return the remaining capacity of the local storage in characters, ie. the
+ * maximum size minus the current size.
+ */
+ this.remainingStorage = function()
+ {
+ return MAX_SIZE - this.totalSize();
+ };
+
+ /**
+ * Saves the content of a data entry form.
+ *
+ * @param dataSetId the identifier of the data set of the form.
+ * @param html the form HTML content.
+ * @return true if the form saved successfully, false otherwise.
+ */
+ this.saveForm = function( dataSetId, html )
+ {
+ var id = KEY_FORM_PREFIX + dataSetId;
+
+ try
+ {
+ localStorage[id] = html;
+
+ log( 'Successfully stored form: ' + dataSetId );
+ } catch ( e )
+ {
+ log( 'Max local storage quota reached, ignored form: ' + dataSetId );
+ return false;
+ }
+
+ if ( MAX_SIZE_FORMS < this.totalFormSize() )
+ {
+ this.deleteForm( dataSetId );
+
+ log( 'Max local storage quota for forms reached, ignored form: ' + dataSetId );
+ return false;
+ }
+
+ return true;
+ };
+
+ /**
+ * Gets the content of a data entry form.
+ *
+ * @param dataSetId the identifier of the data set of the form.
+ * @return the content of a data entry form.
+ */
+ this.getForm = function( dataSetId )
+ {
+ var id = KEY_FORM_PREFIX + dataSetId;
+
+ return localStorage[id];
+ };
+
+ /**
+ * Removes a form.
+ *
+ * @param dataSetId the identifier of the data set of the form.
+ */
+ this.deleteForm = function( dataSetId )
+ {
+ var id = KEY_FORM_PREFIX + dataSetId;
+
+ localStorage.removeItem( id );
+ };
+
+ /**
+ * Returns an array of the identifiers of all forms.
+ *
+ * @return array with form identifiers.
+ */
+ this.getAllForms = function()
+ {
+ var formIds = [];
+
+ var formIndex = 0;
+
+ for ( var i = 0; i < localStorage.length; i++ )
+ {
+ var key = localStorage.key( i );
+
+ if ( key.substring( 0, KEY_FORM_PREFIX.length ) == KEY_FORM_PREFIX )
+ {
+ var id = key.split( '-' )[1];
+
+ formIds[formIndex++] = id;
+ }
+ }
+
+ return formIds;
+ };
+
+ /**
+ * Indicates whether a form exists.
+ *
+ * @param dataSetId the identifier of the data set of the form.
+ * @return true if a form exists, false otherwise.
+ */
+ this.formExists = function( dataSetId )
+ {
+ var id = KEY_FORM_PREFIX + dataSetId;
+
+ return localStorage[id] != null;
+ };
+
+ /**
+ * Downloads the form for the data set with the given identifier from the
+ * remote server and saves the form locally. Potential existing forms with
+ * the same identifier will be overwritten. Updates the form version.
+ *
+ * @param dataSetId the identifier of the data set of the form.
+ * @param formVersion the version of the form of the remote data set.
+ */
+ this.downloadForm = function( dataSetId, formVersion )
+ {
+ $.ajax( {
+ url: '../dhis-web-dataentry-hospital/loadForm.action',
+ data:
+ {
+ dataSetId : dataSetId
+ },
+ dataSetId: dataSetId,
+ formVersion: formVersion,
+ cache: false,
+ dataType: 'text',
+ success: function( data, textStatus, jqXHR )
+ {
+ storageManager.saveForm( this.dataSetId, data );
+ storageManager.saveFormVersion( this.dataSetId, this.formVersion );
+ }
+ } );
+ };
+
+ /**
+ * Saves a version for a form.
+ *
+ * @param the identifier of the data set of the form.
+ * @param formVersion the version of the form.
+ */
+ this.saveFormVersion = function( dataSetId, formVersion )
+ {
+ var formVersions = {};
+
+ if ( localStorage[KEY_FORM_VERSIONS] != null )
+ {
+ formVersions = JSON.parse( localStorage[KEY_FORM_VERSIONS] );
+ }
+
+ formVersions[dataSetId] = formVersion;
+
+ try
+ {
+ localStorage[KEY_FORM_VERSIONS] = JSON.stringify( formVersions );
+
+ log( 'Successfully stored form version: ' + dataSetId );
+ } catch ( e )
+ {
+ log( 'Max local storage quota reached, ignored form version: ' + dataSetId );
+ }
+ };
+
+ /**
+ * Returns the version of the form of the data set with the given
+ * identifier.
+ *
+ * @param dataSetId the identifier of the data set of the form.
+ * @return the form version.
+ */
+ this.getFormVersion = function( dataSetId )
+ {
+ if ( localStorage[KEY_FORM_VERSIONS] != null )
+ {
+ var formVersions = JSON.parse( localStorage[KEY_FORM_VERSIONS] );
+
+ return formVersions[dataSetId];
+ }
+
+ return null;
+ };
+
+ /**
+ * Deletes the form version of the data set with the given identifier.
+ *
+ * @param dataSetId the identifier of the data set of the form.
+ */
+ this.deleteFormVersion = function( dataSetId )
+ {
+ if ( localStorage[KEY_FORM_VERSIONS] != null )
+ {
+ var formVersions = JSON.parse( localStorage[KEY_FORM_VERSIONS] );
+
+ if ( formVersions[dataSetId] != null )
+ {
+ delete formVersions[dataSetId];
+ localStorage[KEY_FORM_VERSIONS] = JSON.stringify( formVersions );
+ }
+ }
+ }
+
+ this.getAllFormVersions = function()
+ {
+ return localStorage[KEY_FORM_VERSIONS] != null ? JSON.parse( localStorage[KEY_FORM_VERSIONS] ) : null;
+ };
+
+ /**
+ * Saves a data value.
+ *
+ * @param dataValue The datavalue and identifiers in json format.
+ */
+ this.saveDataValue = function( dataValue )
+ {
+ var id = this.getDataValueIdentifier( dataValue.dataElementId, dataValue.optionComboId, dataValue.periodId,
+ dataValue.organisationUnitId );
+
+ var dataValues = {};
+
+ if ( localStorage[KEY_DATAVALUES] != null )
+ {
+ dataValues = JSON.parse( localStorage[KEY_DATAVALUES] );
+ }
+
+ dataValues[id] = dataValue;
+
+ try
+ {
+ localStorage[KEY_DATAVALUES] = JSON.stringify( dataValues );
+
+ log( 'Successfully stored data value' );
+ } catch ( e )
+ {
+ log( 'Max local storage quota reached, ignored data value' );
+ }
+ };
+
+ /**
+ * Gets the value for the data value with the given arguments, or null if it
+ * does not exist.
+ *
+ * @param dataElementId the data element identifier.
+ * @param categoryOptionComboId the category option combo identifier.
+ * @param periodId the period identifier.
+ * @param organisationUnitId the organisation unit identifier.
+ * @return the value for the data value with the given arguments, null if
+ * non-existing.
+ */
+ this.getDataValue = function( dataElementId, categoryOptionComboId, periodId, organisationUnitId )
+ {
+ var id = this.getDataValueIdentifier( dataElementId, categoryOptionComboId, periodId, organisationUnitId );
+
+ if ( localStorage[KEY_DATAVALUES] != null )
+ {
+ var dataValues = JSON.parse( localStorage[KEY_DATAVALUES] );
+
+ return dataValues[id];
+ }
+
+ return null;
+ };
+
+ /**
+ * Removes the given dataValue from localStorage.
+ *
+ * @param dataValue The datavalue and identifiers in json format.
+ */
+ this.clearDataValueJSON = function( dataValue )
+ {
+ this.clearDataValue( dataValue.dataElementId, dataValue.optionComboId, dataValue.periodId,
+ dataValue.organisationUnitId );
+ };
+
+ /**
+ * Removes the given dataValue from localStorage.
+ *
+ * @param dataElementId the data element identifier.
+ * @param categoryOptionComboId the category option combo identifier.
+ * @param periodId the period identifier.
+ * @param organisationUnitId the organisation unit identifier.
+ */
+ this.clearDataValue = function( dataElementId, categoryOptionComboId, periodId, organisationUnitId )
+ {
+ var id = this.getDataValueIdentifier( dataElementId, categoryOptionComboId, periodId, organisationUnitId );
+ var dataValues = this.getAllDataValues();
+
+ if ( dataValues[id] != null )
+ {
+ delete dataValues[id];
+ localStorage[KEY_DATAVALUES] = JSON.stringify( dataValues );
+ }
+ };
+
+ /**
+ * Returns a JSON associative array where the keys are on the form <data
+ * element id>-<category option combo id>-<period id>-<organisation unit
+ * id> and the data values are the values.
+ *
+ * @return a JSON associative array.
+ */
+ this.getAllDataValues = function()
+ {
+ return localStorage[KEY_DATAVALUES] != null ? JSON.parse( localStorage[KEY_DATAVALUES] ) : null;
+ };
+
+ /**
+ * Supportive method.
+ */
+ this.getDataValueIdentifier = function( dataElementId, categoryOptionComboId, periodId, organisationUnitId )
+ {
+ return dataElementId + '-' + categoryOptionComboId + '-' + periodId + '-' + organisationUnitId;
+ };
+
+ /**
+ * Supportive method.
+ */
+ this.getCompleteDataSetId = function( json )
+ {
+ return json.periodId + '-' + json.dataSetId + '-' + json.organisationUnitId;
+ };
+
+ /**
+ * Returns current state in data entry form as associative array.
+ *
+ * @return an associative array.
+ */
+ this.getCurrentCompleteDataSetParams = function()
+ {
+ var params = {
+ 'periodId' : $( '#selectedPeriodId' ).val(),
+ 'dataSetId' : $( '#selectedDataSetId' ).val(),
+ 'organisationUnitId' : currentOrganisationUnitId
+ };
+
+ return params;
+ };
+
+ /**
+ * Gets all complete data set registrations as JSON.
+ *
+ * @return all complete data set registrations as JSON.
+ */
+ this.getCompleteDataSets = function()
+ {
+ if ( localStorage[KEY_COMPLETEDATASETS] != null )
+ {
+ return JSON.parse( localStorage[KEY_COMPLETEDATASETS] );
+ }
+
+ return null;
+ };
+
+ /**
+ * Saves a complete data set registration.
+ *
+ * @param json the complete data set registration as JSON.
+ */
+ this.saveCompleteDataSet = function( json )
+ {
+ var completeDataSets = this.getCompleteDataSets();
+ var completeDataSetId = this.getCompleteDataSetId( json );
+
+ if ( completeDataSets != null )
+ {
+ completeDataSets[completeDataSetId] = json;
+ }
+ else
+ {
+ completeDataSets = {};
+ completeDataSets[completeDataSetId] = json;
+ }
+
+ localStorage[KEY_COMPLETEDATASETS] = JSON.stringify( completeDataSets );
+ };
+
+ /**
+ * Removes the given complete data set registration.
+ *
+ * @param the complete data set registration as JSON.
+ */
+ this.clearCompleteDataSet = function( json )
+ {
+ var completeDataSets = this.getCompleteDataSets();
+ var completeDataSetId = this.getCompleteDataSetId( json );
+
+ if ( completeDataSets != null )
+ {
+ delete completeDataSets[completeDataSetId];
+
+ if ( completeDataSets.length > 0 )
+ {
+ localStorage.remoteItem( KEY_COMPLETEDATASETS );
+ }
+ else
+ {
+ localStorage[KEY_COMPLETEDATASETS] = JSON.stringify( completeDataSets );
+ }
+ }
+ };
+
+ /**
+ * Indicates whether there exists data values or complete data set
+ * registrations in the local storage.
+ *
+ * @return true if local data exists, false otherwise.
+ */
+ this.hasLocalData = function()
+ {
+ var dataValues = this.getAllDataValues();
+ var completeDataSets = this.getCompleteDataSets();
+
+ if ( dataValues == null && completeDataSets == null )
+ {
+ return false;
+ }
+ else if ( dataValues != null )
+ {
+ if ( Object.keys( dataValues ).length < 1 )
+ {
+ return false;
+ }
+ }
+ else if ( completeDataSets != null )
+ {
+ if ( Object.keys( completeDataSets ).length < 1 )
+ {
+ return false;
+ }
+ }
+
+ return true;
+ };
+}
+
+function getAttributes()
+{
+ clearListById( 'attributeId' );
+ $.getJSON( '../dhis-web-commons-ajax-json/getAttributes.action',{}
+ , function( json )
+ {
+ addOptionById( 'attributeId', '', i18n_please_select_attribute );
+
+ for ( i in json.attributes )
+ {
+ $('#attributeId').append('<option value=' + json.attributes[i].id + '>' + json.attributes[i].name + '</option>');
+ }
+ } );
+}
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/history.js'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/history.js 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/javascript/history.js 2012-03-24 01:29:01 +0000
@@ -0,0 +1,207 @@
+// -----------------------------------------------------------------------------
+// Comments
+// -----------------------------------------------------------------------------
+
+function saveComment()
+{
+ var commentValue = $( '#commentTextArea' ).val();
+ var periodId = $( '#selectedPeriodId' ).val();
+
+ var commentSaver = new CommentSaver( currentDataElementId, currentOptionComboId, currentOrganisationUnitId,
+ periodId, commentValue );
+
+ commentSaver.save();
+}
+
+function CommentSaver( dataElementId_, optionComboId_, organisationUnitId_, periodId_, commentValue_ )
+{
+ var dataElementId = dataElementId_;
+ var optionComboId = optionComboId_;
+ var organisationUnitId = organisationUnitId_;
+ var periodId = periodId_;
+ var commentValue = commentValue_;
+
+ this.save = function()
+ {
+ markComment( COLOR_YELLOW );
+
+ $.ajax( {
+ url: 'saveComment.action',
+ data:
+ {
+ organisationUnitId: organisationUnitId,
+ dataElementId: dataElementId,
+ optionComboId: optionComboId,
+ periodId: periodId,
+ commentValue: commentValue
+ },
+ dataType: 'json',
+ cache: false,
+ success: handleResponse,
+ error: handleError
+ } );
+ };
+
+ function handleResponse( json )
+ {
+ var code = json.c;
+
+ if ( code == 0 )
+ {
+ markComment( COLOR_GREEN );
+ }
+ else
+ {
+ markComment( COLOR_RED );
+ window.alert( i18n_saving_comment_failed_status_code + '\n\n' + code );
+ }
+ }
+
+ function handleError( jqXHR, textStatus, errorThrown )
+ {
+ markComment( COLOR_RED );
+ window.alert( i18n_saving_comment_failed_error_code + '\n\n' + textStatus );
+ }
+
+ function markComment( color )
+ {
+ $( '#commentTextArea' ).css( 'background-color', color );
+ }
+}
+
+function removeMinMaxLimit()
+{
+ $( '#minLimit' ).val( '' );
+ $( '#maxLimit' ).val( '' );
+
+ $.ajax( {
+ url: 'removeMinMaxLimits.action',
+ data:
+ {
+ dataElementId: currentDataElementId,
+ categoryOptionComboId: currentOptionComboId,
+ organisationUnitId: currentOrganisationUnitId
+ },
+ success: function() {
+ $( '#minLimit' ).css( 'background-color', COLOR_WHITE );
+ $( '#maxLimit' ).css( 'background-color', COLOR_WHITE );
+
+ refreshChart()
+ },
+ cache: false
+ } );
+}
+
+function saveMinMaxLimit()
+{
+ var minValue = $( '#minLimit' ).val();
+ var maxValue = $( '#maxLimit' ).val();
+
+ if ( !minValue || minValue == '' )
+ {
+ return;
+ }
+ else if ( !isInt( minValue ) )
+ {
+ $( '#minSpan' ).html( i18n_enter_digits );
+ return;
+ }
+ else
+ {
+ $( '#minSpan' ).html( '' );
+ }
+
+ if ( !maxValue || maxValue == '' )
+ {
+ return;
+ }
+ else if ( !isInt( maxValue ) )
+ {
+ $( '#maxSpan' ).html( i18n_enter_digits );
+ return;
+ }
+ else
+ {
+ $( '#maxSpan' ).html( '' );
+ }
+
+ if ( new Number( minValue ) > new Number( maxValue ) )
+ {
+ $( '#maxSpan' ).html( i18n_max_must_be_greater_than_min );
+ return;
+ }
+ else
+ {
+ $( '#maxSpan' ).html( '' );
+ }
+
+ var minId = currentDataElementId + '-' + currentOptionComboId + '-min';
+ var maxId = currentDataElementId + '-' + currentOptionComboId + '-max';
+
+ currentMinMaxValueMap[minId] = minValue;
+ currentMinMaxValueMap[maxId] = maxValue;
+
+ $.ajax( {
+ url: 'saveMinMaxLimits.action',
+ data:
+ {
+ organisationUnitId: currentOrganisationUnitId,
+ dataElementId: currentDataElementId,
+ categoryOptionComboId: currentOptionComboId,
+ minLimit: minValue,
+ maxLimit: maxValue
+ },
+ dataType: 'json',
+ cache: false,
+ success: function() {
+ $( '#minLimit' ).css( 'background-color', COLOR_GREEN );
+ $( '#maxLimit' ).css( 'background-color', COLOR_GREEN );
+ refreshChart();
+ },
+ error: function() {
+
+ $( '#minLimit' ).css( 'background-color', COLOR_RED );
+ $( '#maxLimit' ).css( 'background-color', COLOR_RED );
+ }
+ } );
+}
+
+function refreshChart()
+{
+ var periodId = $( '#selectedPeriodId' ).val();
+
+ var source = 'getHistoryChart.action?dataElementId=' + currentDataElementId + '&categoryOptionComboId='
+ + currentOptionComboId + '&periodId=' + periodId + '&organisationUnitId=' + currentOrganisationUnitId + '&r=' + Math.random();
+
+ $( '#historyChart' ).attr( 'src', source );
+}
+
+function markValueForFollowup()
+{
+ var periodId = $( '#selectedPeriodId' ).val();
+
+ $.ajax( { url: 'markValueForFollowup.action',
+ data:
+ {
+ dataElementId: currentDataElementId,
+ categoryOptionComboId: currentOptionComboId,
+ periodId: periodId,
+ organisationUnitId: currentOrganisationUnitId
+ },
+ cache: false,
+ dataType: 'json',
+ success: function( json )
+ {
+ if ( json.message == 'marked' )
+ {
+ $( '#followup' ).attr( 'src', '../images/marked.png' );
+ $( '#followup' ).attr( 'alt', i18n_unmark_value_for_followup );
+ }
+ else if ( json.message == 'unmarked' )
+ {
+ $( '#followup' ).attr( 'src', '../images/unmarked.png' );
+ $( '#followup' ).attr( 'alt', i18n_mark_value_for_followup );
+ }
+ }
+ } );
+}
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/menu.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/menu.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/menu.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,14 @@
+<script type="text/javascript">
+jQuery(document).ready(function() {
+ selection.setListenerFunction( organisationUnitSelected );
+});
+</script>
+
+<style type="text/css">
+#leftBarContents div#orgUnitTree {
+ height: 430px;
+}
+</style>
+
+<br>
+#parse( "/dhis-web-commons/ouwt/orgunittreesearch.vm" )
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseDataSets.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseDataSets.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseDataSets.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,10 @@
+#set( $size = $dataSets.size() )
+{ "dataSets": [
+#foreach( $dataSet in $dataSets )
+ {
+ "id": $!{dataSet.id},
+ "name": "$!encoder.jsonEncode( ${dataSet.name} )"
+ }#if( $velocityCount < $size ),#end
+#end ],
+ "dataSetValid": ${dataSetValid}
+}
\ No newline at end of file
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseDataValues.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseDataValues.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseDataValues.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,22 @@
+#set( $size1 = $dataValues.size() )
+#set( $size2 = $minMaxDataElements.size() )
+{ "dataValues": [
+ #foreach( $value in $dataValues )
+ {
+ "id":"${value.dataElement.id}-${value.optionCombo.id}",
+ "val":"$!{value.value}"
+ }#if( $velocityCount < $size1 ),#end
+ #end ],
+ "minMaxDataElements": [
+ #foreach( $element in $minMaxDataElements )
+ {
+ "id":"${element.dataElement.id}-${element.optionCombo.id}",
+ "min":"${element.min}",
+ "max":"${element.max}"
+ }#if( $velocityCount < $size2 ),#end
+ #end ],
+ "locked":${locked},
+ "complete":${complete},
+ "date":"$!format.formatDate( $date )",
+ "storedBy":"$!{storedBy}"
+ }
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseLockStatus.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseLockStatus.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseLockStatus.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,1 @@
+{"locked":$locked}
\ No newline at end of file
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseMetaData.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseMetaData.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseMetaData.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,48 @@
+{ "metaData": {
+
+"significantZeros": [
+#set( $size = $significantZeros.size() )
+#foreach( $dataElement in $significantZeros )
+${dataElement.id}#if( $velocityCount < $size ),#end
+#end ],
+
+"dataElements": {
+#set( $size = $dataElements.size() )
+#foreach( $dataElement in $dataElements )
+"${dataElement.id}":"$encoder.jsonEncode( ${dataElement.getDetailedNumberType()} )"
+#if( $velocityCount < $size ),#end
+#end },
+
+"indicatorFormulas": {
+#set( $size = $indicators.size() )
+#foreach( $indicator in $indicators )
+"${indicator.id}":"($!{indicator.explodedNumerator})/($!{indicator.explodedDenominator})*($!{indicator.indicatorType.factor})"
+#if( $velocityCount < $size ),#end
+#end },
+
+"dataSets": {
+#set( $size = $dataSets.size() )
+#foreach( $dataSet in $dataSets )
+"${dataSet.id}":{"name":"$encoder.jsonEncode( ${dataSet.displayName} )","periodType":"$encoder.jsonEncode( ${dataSet.periodType.name} )",
+"version":"${dataSet.version}","type":"${dataSet.getDataSetType()}","expiryDays":"${dataSet.expiryDays}"
+}#if( $velocityCount < $size ),#end
+#end },
+
+"dataSetAssociationSets": {
+#set( $size1 = $dataSetAssociationSets.size() )
+#set( $index = 0 )
+#foreach( $associationSet in $dataSetAssociationSets )
+"${index}": [
+#set( $index = $index + 1 )
+#set( $size2 = $associationSet.size() )
+#foreach( $id in $associationSet )
+${id}#if( $velocityCount < $size2 ),#end
+#end ]#if( $velocityCount < $size1 ),#end
+#end },
+
+"organisationUnitAssociationSetMap": {
+#set( $size = $organisationUnitAssociationSetMap.size() )
+#foreach( $orgUnit in $organisationUnitAssociationSetMap.keySet() )
+"${orgUnit}":"$organisationUnitAssociationSetMap.get( ${orgUnit} )"#if( $velocityCount < $size ),#end
+#end }
+} }
\ No newline at end of file
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responsePeriods.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responsePeriods.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responsePeriods.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,9 @@
+#set( $size1 = $periods.size() )
+{ "periods": [
+#foreach( $period in $periods )
+ {
+ "name": "$!format.formatPeriod( ${period} )"
+ }#if( $velocityCount < $size1 ),#end
+#end ],
+ "periodValid": ${periodValid}
+}
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/responseVoid.vm'
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/sectionForm.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/sectionForm.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,81 @@
+#set( $marker = 0 )
+#set( $tabIndex = 1 )
+#set( $hasAccess = $auth.hasAccess( "dhis-web-dataentry", "saveValue" ) )
+
+#foreach( $section in $sections )
+
+#if( $marker == 1 )
+ #set( $marker = 0 )
+#else
+ #set( $marker = 1 )
+#end
+
+<table class="formSection">
+<tr>
+ <td>
+ <div class="cent"><h3>$encoder.htmlEncode( $section.name )</h3></div>
+ </td>
+</tr>
+<tr>
+ <td>
+ <div>
+ <table cellspacing="0">
+ #set( $categoryComboId = $sectionCombos.get( $section.id ) )
+ #set( $colCount = $numberOfTotalColumns.get( $categoryComboId ) )
+ #set( $categories = $orderedCategories.get( $categoryComboId ) )
+ #set( $optionsMap = $orderedOptionsMap.get( $categoryComboId ) )
+ #set( $colRepeat = $catColRepeat.get( $categoryComboId ) )
+
+ #foreach( $category in $categories )
+ #set( $categoryOptions = $optionsMap.get( $category.id ) )
+ #set( $colCount = $colCount / $categoryOptions.size() )
+ <tr colspan="$colCount">
+ <td></td>
+ #set( $cols = $colRepeat.get( $category.id ) )
+ #foreach( $col in $cols )
+ #foreach( $categoryOption in $categoryOptions )
+ <th colspan="$colCount"><span align="center">#if( $categoryOption.isDefault() )${i18n.getString( "value" )}#else ${encoder.htmlEncode( $categoryOption.name )}#end</span></th>
+ #end
+ #end
+ </tr>
+ #end
+
+ #set( $count = 0 )
+ #set( $mark = 0 )
+ #set( $optionCombos = $orderdCategoryOptionCombos.get( $categoryComboId ) )
+ #foreach( $optionCombo in $optionCombos )<span id="${optionCombo.id}-optioncombo" class="hidden">${encoder.htmlEncode( $optionCombo.name )}</span>
+ #end
+ #foreach( $dataElement in $section.dataElements )
+ #if( $mark == 1 )
+ #set( $mark = 0 )
+ #else
+ #set( $mark = 1 )
+ #end
+ #set( $count = $count + 1 )
+ <tr>
+ <td id="${dataElement.id}-cell" #if( $mark == 1 )class="alt"#else class="reg"#end><span id="${dataElement.id}-dataelement">${encoder.htmlEncode( $dataElement.getFormNameFallback() )}</span></td>
+ #foreach( $optionCombo in $optionCombos )
+ #set( $dataEntryId = "${dataElement.id}-${optionCombo.id}-val" )
+ #set( $greyedField = false )
+ #set( $greyedField = $greyedFields.get( "$dataElement.id:$optionCombo.id" ) )
+ #if( $dataElement.type == "bool" )
+ <td><select name="entryselect" id="$dataEntryId" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end>
+ <option value="">[$i18n.getString( "no_value" )]</option>
+ <option value="true">$i18n.getString( "yes" )</option>
+ <option value="false">$i18n.getString( "no" )</option>
+ </select></td>
+ #else
+ <td><input name="entryfield" id="$dataEntryId" type="text" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>
+ #end
+ </td>
+ #set( $tabIndex = $tabIndex + 1 )
+ #end
+ </tr>
+ #end
+ </table>
+ </div>
+ </td>
+ </tr>
+</table>
+<br>
+#end
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/select.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/select.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/select.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,140 @@
+<script type="text/javascript">
+var i18n_select_data_set = '$encoder.jsEscape( $i18n.getString( "select_data_set" ) , "'")';
+var i18n_select_period = '$encoder.jsEscape( $i18n.getString( "select_period" ) , "'")';
+var i18n_please_select_attribute = "[ " + '$encoder.jsEscape( $i18n.getString( "please_select_attribute" ) , "'")' + " ]";
+var i18n_register_complete_dataset_success = '$encoder.jsEscape( $i18n.getString( "register_complete_dataset_success" ) , "'")';
+var i18n_register_complete_dataset_failed = '$encoder.jsEscape( $i18n.getString( "register_complete_dataset_failed" ) , "'")';
+var i18n_undo_register_complete_dataset_success = '$encoder.jsEscape( $i18n.getString( "undo_register_complete_dataset_success" ) , "'")';
+var i18n_value_of_data_element_less = '$encoder.jsEscape( $i18n.getString( "value_of_data_element_less" ) , "'")';
+var i18n_value_of_data_element_greater = '$encoder.jsEscape( $i18n.getString( "value_of_data_element_greater" ) , "'")';
+var i18n_value_too_long = '$encoder.jsEscape( $i18n.getString( "value_is_too_long" ) , "'")';
+var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
+var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
+var i18n_value_must_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_positive_integer" ) , "'")';
+var i18n_value_must_negative_integer = '$encoder.jsEscape( $i18n.getString( "value_must_negative_integer" ) , "'")';
+var i18n_field_unallowed_save_zero = '$encoder.jsEscape( $i18n.getString( "field_unallowed_save_zero" ) , "'")';
+var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';
+var i18n_saving_value_failed_dataset_is_locked = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_dataset_is_locked" ) , "'")';
+var i18n_saving_comment_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_comment_failed_status_code" ) , "'")';
+var i18n_saving_minmax_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_minmax_failed_error_code" ) , "'")';
+var i18n_confirm_complete = '$encoder.jsEscape( $i18n.getString( "confirm_complete" ) , "'")';
+var i18n_confirm_undo = '$encoder.jsEscape( $i18n.getString( "confirm_undo" ) , "'")';
+var i18n_no_response_from_server = '$encoder.jsEscape( $i18n.getString( "no_response_from_server" ) , "'")';
+var i18n_enter_digits = '$encoder.jsEscape( $i18n.getString( "enter_digits" ) , "'")';
+var i18n_max_must_be_greater_than_min = '$encoder.jsEscape( $i18n.getString( "max_must_be_greater_than_min" ) , "'")';
+var i18n_mark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "mark_value_for_followup" ) , "'")';
+var i18n_unmark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "unmark_value_for_followup" ) , "'")';
+var i18n_operation_not_available_offline = '$encoder.jsEscape( $i18n.getString( "operation_not_available_offline" ) , "'")';
+var i18n_online_notification = '$encoder.jsEscape( $i18n.getString( "online_notification" ) , "'")';
+var i18n_offline_notification = '$encoder.jsEscape( $i18n.getString( "offline_notification" ) , "'")';
+var i18n_need_to_sync_notification = '$encoder.jsEscape( $i18n.getString( "need_to_sync_notification" ) , "'")';
+var i18n_sync_now = '$encoder.jsEscape( $i18n.getString( "sync_now" ) , "'")';
+var i18n_sync_success = '$encoder.jsEscape( $i18n.getString( "sync_success" ) , "'")';
+var i18n_sync_failed = '$encoder.jsEscape( $i18n.getString( "sync_failed" ) , "'")';
+var i18n_uploading_data_notification = '$encoder.jsEscape( $i18n.getString( "uploading_data_notification" ) , "'")';
+var i18n_ajax_login_failed = '$encoder.jsEscape( $i18n.getString( "ajax_login_failed" ) , "'")';
+var i18n_no_dataelement_selected = '$encoder.jsEscape( $i18n.getString( "no_dataelement_selected" ) , "'")';
+var i18n_dataset_is_locked = '$encoder.jsEscape( $i18n.getString( "dataset_is_locked" ) , "'")';
+var i18n_register_complete_failed_dataset_is_locked = '$encoder.jsEscape( $i18n.getString( "register_complete_failed_dataset_is_locked" ) , "'")';
+var i18n_unregister_complete_failed_dataset_is_locked = '$encoder.jsEscape( $i18n.getString( "unregister_complete_failed_dataset_is_locked" ) , "'")';
+
+jQuery(document).ready( function(){
+ getAttributes();
+});
+</script>
+
+<h3>$i18n.getString( "data_entry" ) #openHelp( "dataEntry" )</h3>
+
+<div id="currentSelection">
+ <span style="float:left;cursor:pointer;margin-right:5px;"><img src="../images/hide.png" title="$i18n.getString( 'close' )" onclick="closeCurrentSelection()"></span>
+ <span id="currentOrganisationUnit">$i18n.getString( "no_organisationunit_selected" )</span> - <span id="currentPeriod">$i18n.getString( "no_period_selected" )</span/><br>
+ <span id="currentDataElement">$i18n.getString( "no_dataelement_selected" )</span>
+</div>
+
+<div id="actions">
+ <input type="button" value="$i18n.getString( 'run_validation' )" onclick="validate()" id="validationButton" style="width:150px;" disabled="disabled"/>
+</div>
+
+<div class="inputCriteria" style="width:504px;height:140px;">
+<table>
+ <tr>
+ <td><label for="selectedOrganisationUnit">$i18n.getString( "organisation_unit" )</label></td>
+ <td><input type="text" id="selectedOrganisationUnit" readonly="readonly" value="[ $i18n.getString( 'select_from_tree' ) ]" style="width:367px"></td>
+ </tr>
+ <tr>
+ <td><label for="selectedDataSetId">$i18n.getString( "data_set" )</label></td>
+ <td><select id="selectedDataSetId" name="selectedDataSetId" style="width:371px" onchange="dataSetSelected()" disabled="disabled"></select>
+ <span id="loaderSpan" style="display:none"><img src='../images/ajax-loader-bar.gif'></span></td>
+ </tr>
+ <tr>
+ <td><label for="selectedPeriodId">$i18n.getString( "period" )</label></td>
+ <td><select id="selectedPeriodId" name="selectedPeriodId" style="width:215px" disabled="disabled"></select>
+ <input type="button" id="prevButton" style="width:75px" value="$i18n.getString( 'prev_year' )" title="$i18n.getString('earlier_periods')" onclick="previousPeriodsSelected()" disabled="disabled">
+ <input type="button" id="nextButton" style="width:75px" value="$i18n.getString( 'next_year' )" title="$i18n.getString('later_periods')" onclick="nextPeriodsSelected()" disabled="disabled">
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="attributeId">$i18n.getString( "attribute" )</label></td>
+ <td>
+ <select id="attributeId" name="attributeId" style="width:215px" >
+ </select>
+ <input id='value' name='value' />
+ </td>
+ </tr>
+
+ <tr>
+ <td><p></p></td>
+ <td>
+ <input type='button' value='$i18n.getString("load_entry_form")' onclick='periodSelected();'>
+ </td>
+ </tr>
+</table>
+</div>
+
+#parse( "dhis-web-commons/loader/loader.vm" )
+
+<div id="contentDiv" class="page" style="margin-left:2px;margin-bottom:8px;"></div>
+
+<div id="historyDiv" class="page"></div>
+
+<div id="validationDiv" class="page"></div>
+
+<div id="completenessDiv" class="page inputCriteria" style="display:none;width:386px;height:29px;">
+<input type="button" id="completeButton" name="completeButton" value="$i18n.getString( 'complete' )" onclick="validateCompleteDataSet()" style="width:120px">
+<input type="button" id="undoButton" name="undoButton" value="$i18n.getString( 'incomplete' )" onclick="undoCompleteDataSet()" style="width:120px">
+<input type="button" value="$i18n.getString( 'run_validation' )" onclick="validate()" style="width:120px">
+</div>
+
+<div id="infoDiv" class="page inputCriteria" style="display:none;width:386px;height:20px;">
+<span style="color:#505050">$i18n.getString( "completed_by" ): </span><span id="completedBy"></span>
+<span style="color:#505050"> $i18n.getString( "at" ): </span><span id="completedDate"></span>
+<a href="javascript:displayUserDetails()">$i18n.getString( "see_details" )</a>
+</div>
+
+
+<div id="completedByDiv" style="display:none" class="page">
+<h3><span id="userFullName"></span></h3>
+<table>
+ <tr>
+ <td><label>$i18n.getString( "username" ):</label></td>
+ <td><span id="userUsername"></span></td>
+ </tr>
+ <tr>
+ <td><label>$i18n.getString( "email" ):</label></td>
+ <td><span id="userEmail"></span></td>
+ </tr>
+ <tr>
+ <td><label>$i18n.getString( "phone_number" ):</label></td>
+ <td><span id="userPhoneNumber"></span></td>
+ </tr>
+ <tr>
+ <td><label>$i18n.getString( "organisation_units" ):</label></td>
+ <td><span id="userOrganisationUnits"></span></td>
+ </tr>
+ <tr>
+ <td><label>$i18n.getString( "user_roles" ):</label></td>
+ <td><span id="userUserRoles"></span></td>
+ </tr>
+</table>
+</div>
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/status.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/status.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/status.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,1 @@
+{"c":"${statusCode}"}
\ No newline at end of file
=== added directory 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/style'
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css 2012-03-24 01:29:01 +0000
@@ -0,0 +1,33 @@
+
+#currentSelection
+{
+ padding: 6px;
+ background-color: #e0e0e0;
+ border: 1px solid #a0a0a0;
+ font-size: 14px;
+ text-align: right;
+ position: fixed;
+ top: 55px;
+ right: 10px;
+ filter: alpha(opacity=85);
+ opacity: 0.85;
+ border-radius: 3px;
+}
+
+.currentRow
+{
+ background-color: #d5ffc5;
+ padding-right: 50px;
+}
+
+#actions
+{
+ float: right;
+ width: 160px;
+ text-align: right;
+}
+
+.hidden
+{
+ display: none;
+}
=== added file 'local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/validationResult.vm'
--- local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/validationResult.vm 1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-dataentry-hospital/src/main/webapp/dhis-web-dataentry/validationResult.vm 2012-03-24 01:29:01 +0000
@@ -0,0 +1,68 @@
+<h3>$encoder.htmlEncode( $i18n.getString( "validation_result" ) )</h3>
+
+#if( $results.size() == 0 && $dataValues.size() == 0 )
+ <p class="bold">$encoder.htmlEncode( $i18n.getString( "successful_validation" ) )</p>
+#else
+ <p class="bold">$encoder.htmlEncode( $i18n.getString( "unsuccessful_validation" ) )</p>
+#end
+
+#if( $results.size() > 0)
+ <p class="bold">$encoder.htmlEncode( $i18n.getString( "the_following_values_violate_rules" ) )</p>
+ <table class="listTable" width="100%">
+ <tr>
+ <th style="width:110px">$encoder.htmlEncode( $i18n.getString( "validation_rule" ) )</th>
+ <th>$encoder.htmlEncode( $i18n.getString( "expression" ) )</th>
+ <th>$encoder.htmlEncode( $i18n.getString( "description" ) )</th>
+ <th>$encoder.htmlEncode( $i18n.getString( "value" ) )</th>
+ <th>$encoder.htmlEncode( $i18n.getString( "operator" ) )</th>
+ <th>$encoder.htmlEncode( $i18n.getString( "value" ) )</th>
+ <th>$encoder.htmlEncode( $i18n.getString( "description" ) )</th>
+ </tr>
+ #set( $mark = false )
+ #foreach( $result in $results )
+ #set ( $id = $result.validationRule.id )
+ #set ( $leftFormula = $leftsideFormulaMap.get( $id ) )
+ #set ( $rightFormula = $rightsideFormulaMap.get( $id ) )
+ <tr>
+ <td style="height:32px"#alternate( $mark )>$encoder.htmlEncode( $result.validationRule.name )</td>
+ <td#alternate( $mark )>$!encoder.htmlEncode( $leftFormula ) $encoder.htmlEncode( $i18n.getString( $result.validationRule.operator.mathematicalOperator ) ) $!encoder.htmlEncode( $rightFormula )</td>
+ <td#alternate( $mark )>$!encoder.htmlEncode( $result.validationRule.leftSide.description )</td>
+ <td#alternate( $mark )>$result.leftsideValue</td>
+ <td#alternate( $mark )>$encoder.htmlEncode( $i18n.getString( $result.validationRule.operator.mathematicalOperator ) )</td>
+ <td#alternate( $mark )>$result.rightsideValue</td>
+ <td#alternate( $mark )>$!encoder.htmlEncode( $result.validationRule.rightSide.description )</td>
+ </tr>
+ #if( $mark )
+ #set( $mark = false )
+ #else
+ #set( $mark = true )
+ #end
+ #end
+ </table><br>
+#end
+
+#if( $dataValues.size() > 0 )
+ <p class="bold">$encoder.htmlEncode( $i18n.getString( "the_following_values_are_outliers" ) )</p>
+ <table class="listTable" style="width:100%">
+ <tr>
+ <th>$i18n.getString( "data_element" )</th>
+ <th style="text-align:center">$i18n.getString( "min" )</th>
+ <th style="width: 100px; text-align:center">$i18n.getString( "value" )</th>
+ <th style="text-align:center">$i18n.getString( "max" )</th>
+ </tr>
+ #set( $mark = false )
+ #foreach( $value in $dataValues )
+ <tr>
+ <td style="height:32px"#alternate( $mark )>$value.dataElementName $value.categoryOptionComboNameParsed</td>
+ <td style="text-align:center"#alternate( $mark )>$value.min</td>
+ <td style="text-align:center;width:100px"#alternate( $mark )>$value.value</td>
+ <td style="text-align:center"#alternate( $mark )>$value.max</td>
+ </tr>
+ #if( $mark )
+ #set( $mark = false )
+ #else
+ #set( $mark = true )
+ #end
+ #end
+ </table>
+#end
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml 2012-03-12 07:07:30 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml 2012-03-24 01:29:01 +0000
@@ -1490,5 +1490,5 @@
scope="prototype">
<property name="jchartDataService" ref="org.hisp.dhis.jchart.data.JChartDataService" />
</bean>
-
+
</beans>
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml 2012-03-06 08:33:14 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml 2012-03-24 01:29:01 +0000
@@ -1350,6 +1350,6 @@
/dhis-web-spreadsheet-reporting/jsonBookmarks.vm
</result>
</action>
-
+
</package>
</struts>
\ No newline at end of file