dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17277
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6813: CCEM work in progress
------------------------------------------------------------
revno: 6813
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-04-30 17:26:21 +0530
message:
CCEM work in progress
added:
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogComparator.java
modified:
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueService.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueStore.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogService.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataValueService.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogService.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogDataValueStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/META-INF/dhis/beans.xml
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ta.js
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/tabularAnalysisFront.vm
local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/patientRegistrationList.vm
--
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
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueService.java 2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueService.java 2012-04-30 11:56:21 +0000
@@ -6,12 +6,18 @@
{
String ID = CatalogDataValueService.class.getName();
- int addCatalogDataValue( CatalogDataValue catalogDataValue );
+ void addCatalogDataValue( CatalogDataValue catalogDataValue );
void updateCatalogDataValue( CatalogDataValue catalogDataValue );
void deleteCatalogDataValue( CatalogDataValue catalogDataValue );
Collection<CatalogDataValue> getAllCatalogDataValues();
+
+ Collection<CatalogDataValue> getAllCatalogDataValuesByCatalog( Catalog catalog );
+
+ CatalogDataValue catalogDataValue ( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute );
+
+ CatalogDataValue catalogDataValue ( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute, CatalogTypeAttributeOption catalogTypeAttributeOption );
}
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueStore.java 2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogDataValueStore.java 2012-04-30 11:56:21 +0000
@@ -6,12 +6,18 @@
{
String ID = CatalogDataValueStore.class.getName();
- int addCatalogDataValue( CatalogDataValue catalogDataValue );
+ void addCatalogDataValue( CatalogDataValue catalogDataValue );
void updateCatalogDataValue( CatalogDataValue catalogDataValue );
void deleteCatalogDataValue( CatalogDataValue catalogDataValue );
Collection<CatalogDataValue> getAllCatalogDataValues();
+
+ Collection<CatalogDataValue> getAllCatalogDataValuesByCatalog( Catalog catalog );
+
+ CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute );
+
+ CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute, CatalogTypeAttributeOption catalogTypeAttributeOption );
}
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogService.java 2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogService.java 2012-04-30 11:56:21 +0000
@@ -1,6 +1,7 @@
package org.hisp.dhis.coldchain.catalog;
import java.util.Collection;
+import java.util.List;
public interface CatalogService
{
@@ -11,7 +12,18 @@
void updateCatalog( Catalog catalog );
void deleteCatalog( Catalog catalog );
+
+ void deleteCatalogData( Catalog catalog );
Collection<Catalog> getAllCatalogs();
+
+ Catalog getCatalog( int id );
+
+ Catalog getCatalogByName( String name );
+
+ int createCatalog( Catalog catalog, List<CatalogDataValue> catalogDataValues );
+
+ void updateCatalogAndDataValue( Catalog catalog, List<CatalogDataValue> valuesForSave, List<CatalogDataValue> valuesForUpdate, Collection<CatalogDataValue> valuesForDelete );
+ void deleteCatalogAndDataValue( Catalog catalog );
}
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogStore.java 2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/CatalogStore.java 2012-04-30 11:56:21 +0000
@@ -2,7 +2,9 @@
import java.util.Collection;
-public interface CatalogStore
+import org.hisp.dhis.common.GenericStore;
+
+public interface CatalogStore extends GenericStore<Catalog>
{
String ID = CatalogStore.class.getName();
@@ -12,6 +14,10 @@
void updateCatalog( Catalog catalog );
void deleteCatalog( Catalog catalog );
+
+ Catalog getCatalog( int id );
+
+ Catalog getCatalogByName( String name );
Collection<Catalog> getAllCatalogs();
=== added file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogComparator.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogComparator.java 1970-01-01 00:00:00 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/catalog/comparator/CatalogComparator.java 2012-04-30 11:56:21 +0000
@@ -0,0 +1,13 @@
+package org.hisp.dhis.coldchain.catalog.comparator;
+
+import java.util.Comparator;
+
+import org.hisp.dhis.coldchain.catalog.Catalog;
+
+public class CatalogComparator implements Comparator<Catalog>
+{
+ public int compare( Catalog catalog0, Catalog catalog1 )
+ {
+ return catalog0.getName().compareToIgnoreCase( catalog1.getName() );
+ }
+}
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataValueService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataValueService.java 2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogDataValueService.java 2012-04-30 11:56:21 +0000
@@ -23,9 +23,10 @@
// -------------------------------------------------------------------------
@Transactional
@Override
- public int addCatalogDataValue( CatalogDataValue catalogDataValue )
+ public void addCatalogDataValue( CatalogDataValue catalogDataValue )
{
- return catalogDataValueStore.addCatalogDataValue( catalogDataValue );
+
+ catalogDataValueStore.addCatalogDataValue( catalogDataValue );
}
@Transactional
@@ -44,9 +45,30 @@
@Transactional
@Override
+ public Collection<CatalogDataValue> getAllCatalogDataValuesByCatalog( Catalog catalog )
+ {
+ return catalogDataValueStore.getAllCatalogDataValuesByCatalog( catalog );
+ }
+
+ @Transactional
+ @Override
public void updateCatalogDataValue( CatalogDataValue catalogDataValue )
{
catalogDataValueStore.updateCatalogDataValue( catalogDataValue );
}
-
+
+ @Transactional
+ @Override
+ public CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute )
+ {
+ return catalogDataValueStore.catalogDataValue( catalog, catalogTypeAttribute );
+ }
+
+ @Transactional
+ @Override
+ public CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute, CatalogTypeAttributeOption catalogTypeAttributeOption )
+ {
+ return catalogDataValueStore.catalogDataValue( catalog, catalogTypeAttribute, catalogTypeAttributeOption );
+ }
+
}
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogService.java 2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/DefaultCatalogService.java 2012-04-30 11:56:21 +0000
@@ -1,7 +1,9 @@
package org.hisp.dhis.coldchain.catalog;
import java.util.Collection;
+import java.util.List;
+import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
import org.springframework.transaction.annotation.Transactional;
public class DefaultCatalogService implements CatalogService
@@ -16,6 +18,13 @@
{
this.catalogStore = catalogStore;
}
+
+ private CatalogDataValueService catalogDataValueService;
+
+ public void setCatalogDataValueService( CatalogDataValueService catalogDataValueService )
+ {
+ this.catalogDataValueService = catalogDataValueService;
+ }
// -------------------------------------------------------------------------
// Catalog
@@ -31,6 +40,12 @@
{
catalogStore.deleteCatalog( catalog );
}
+
+ @Override
+ public void deleteCatalogData( Catalog catalog )
+ {
+ catalogStore.delete( catalog );
+ }
@Transactional
public void updateCatalog( Catalog catalog )
@@ -44,4 +59,64 @@
return catalogStore.getAllCatalogs();
}
+ @Transactional
+ @Override
+ public Catalog getCatalog( int id )
+ {
+ return catalogStore.getCatalog( id );
+ }
+
+ @Transactional
+ @Override
+ public Catalog getCatalogByName( String name )
+ {
+ return catalogStore.getCatalogByName( name );
+ }
+
+ @Override
+ public int createCatalog( Catalog catalog, List<CatalogDataValue> catalogDataValues )
+ {
+ int catalogId = addCatalog( catalog );
+
+ for ( CatalogDataValue catalogDataValue : catalogDataValues )
+ {
+ catalogDataValueService.addCatalogDataValue( catalogDataValue );
+ }
+
+ return catalogId;
+ }
+
+ @Override
+ public void updateCatalogAndDataValue( Catalog catalog, List<CatalogDataValue> valuesForSave, List<CatalogDataValue> valuesForUpdate, Collection<CatalogDataValue> valuesForDelete )
+ {
+ //catalogStore.update( catalog );
+ catalogStore.updateCatalog( catalog );
+
+ for ( CatalogDataValue catalogDataValueAdd : valuesForSave )
+ {
+ catalogDataValueService.addCatalogDataValue( catalogDataValueAdd );
+ }
+
+ for ( CatalogDataValue catalogDataValueUpdate : valuesForUpdate )
+ {
+ catalogDataValueService.updateCatalogDataValue( catalogDataValueUpdate );
+ }
+
+ for ( CatalogDataValue catalogDataValueDelete : valuesForDelete )
+ {
+ catalogDataValueService.deleteCatalogDataValue( catalogDataValueDelete );
+ }
+ }
+
+ @Override
+ public void deleteCatalogAndDataValue( Catalog catalog )
+ {
+ Collection<CatalogDataValue> valuesForDelete = catalogDataValueService.getAllCatalogDataValuesByCatalog( catalog ) ;
+ for ( CatalogDataValue catalogDataValueDelete : valuesForDelete )
+ {
+ catalogDataValueService.deleteCatalogDataValue( catalogDataValueDelete );
+ }
+
+ //catalogStore.deleteCatalog( catalog );
+ }
}
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogDataValueStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogDataValueStore.java 2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogDataValueStore.java 2012-04-30 11:56:21 +0000
@@ -2,10 +2,18 @@
import java.util.Collection;
+import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.hisp.dhis.coldchain.catalog.Catalog;
import org.hisp.dhis.coldchain.catalog.CatalogDataValue;
import org.hisp.dhis.coldchain.catalog.CatalogDataValueStore;
+import org.hisp.dhis.coldchain.catalog.CatalogType;
+import org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute;
+import org.hisp.dhis.coldchain.catalog.CatalogTypeAttributeOption;
+import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.reports.Report_in;
public class HibernateCatalogDataValueStore implements CatalogDataValueStore
{
@@ -25,11 +33,11 @@
// -------------------------------------------------------------------------
@Override
- public int addCatalogDataValue( CatalogDataValue catalogDataValue )
+ public void addCatalogDataValue( CatalogDataValue catalogDataValue )
{
Session session = sessionFactory.getCurrentSession();
- return (Integer) session.save( catalogDataValue );
+ session.save( catalogDataValue );
}
@Override
@@ -41,6 +49,7 @@
}
@Override
+ @SuppressWarnings( "unchecked" )
public Collection<CatalogDataValue> getAllCatalogDataValues()
{
Session session = sessionFactory.getCurrentSession();
@@ -49,11 +58,49 @@
}
@Override
+ @SuppressWarnings( "unchecked" )
+ public Collection<CatalogDataValue> getAllCatalogDataValuesByCatalog( Catalog catalog )
+ {
+ Session session = sessionFactory.getCurrentSession();
+
+ Criteria criteria = session.createCriteria( CatalogDataValue.class );
+
+ criteria.add( Restrictions.eq( "catalog", catalog ) );
+ return criteria.list();
+ }
+
+ @Override
public void updateCatalogDataValue( CatalogDataValue catalogDataValue )
{
Session session = sessionFactory.getCurrentSession();
session.update( catalogDataValue );
}
-
+
+ @Override
+ @SuppressWarnings( "unchecked" )
+ public CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute )
+ {
+ Session session = sessionFactory.getCurrentSession();
+
+ Criteria criteria = session.createCriteria( CatalogDataValue.class );
+ criteria.add( Restrictions.eq( "catalog", catalog ) );
+ criteria.add( Restrictions.eq( "catalogTypeAttribute", catalogTypeAttribute ) );
+
+ return (CatalogDataValue) criteria.uniqueResult();
+ }
+
+ @Override
+ @SuppressWarnings( "unchecked" )
+ public CatalogDataValue catalogDataValue( Catalog catalog ,CatalogTypeAttribute catalogTypeAttribute, CatalogTypeAttributeOption catalogTypeAttributeOption )
+ {
+ Session session = sessionFactory.getCurrentSession();
+
+ Criteria criteria = session.createCriteria( CatalogDataValue.class );
+ criteria.add( Restrictions.eq( "catalog", catalog ) );
+ criteria.add( Restrictions.eq( "catalogTypeAttribute", catalogTypeAttribute ) );
+ criteria.add( Restrictions.eq( "catalogTypeAttributeOption", catalogTypeAttributeOption ) );
+
+ return (CatalogDataValue) criteria.uniqueResult();
+ }
}
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogStore.java 2012-04-16 11:29:53 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogStore.java 2012-04-30 11:56:21 +0000
@@ -2,12 +2,15 @@
import java.util.Collection;
+import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
import org.hisp.dhis.coldchain.catalog.Catalog;
import org.hisp.dhis.coldchain.catalog.CatalogStore;
+import org.hisp.dhis.hibernate.HibernateGenericStore;
-public class HibernateCatalogStore implements CatalogStore
+public class HibernateCatalogStore extends HibernateGenericStore<Catalog> implements CatalogStore
{
// -------------------------------------------------------------------------
// Dependencies
@@ -52,5 +55,24 @@
return session.createCriteria( Catalog.class ).list();
}
-
+
+ @Override
+ public Catalog getCatalog( int id )
+ {
+ Session session = sessionFactory.getCurrentSession();
+
+ return (Catalog) session.get( Catalog.class, id );
+ }
+
+ @Override
+ public Catalog getCatalogByName( String name )
+ {
+ Session session = sessionFactory.getCurrentSession();
+
+ Criteria criteria = session.createCriteria( Catalog.class );
+ criteria.add( Restrictions.eq( "name", name ) );
+
+ return (Catalog) criteria.uniqueResult();
+ }
+
}
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeStore.java 2012-04-25 05:52:37 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/hibernate/HibernateCatalogTypeStore.java 2012-04-30 11:56:21 +0000
@@ -7,7 +7,6 @@
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.hisp.dhis.coldchain.catalog.CatalogType;
-import org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute;
import org.hisp.dhis.coldchain.catalog.CatalogTypeStore;
public class HibernateCatalogTypeStore implements CatalogTypeStore
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/META-INF/dhis/beans.xml 2012-04-30 08:30:00 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/resources/META-INF/dhis/beans.xml 2012-04-30 11:56:21 +0000
@@ -19,7 +19,8 @@
</bean>
<bean id="org.hisp.dhis.coldchain.catalog.CatalogStore"
class="org.hisp.dhis.coldchain.catalog.hibernate.HibernateCatalogStore">
- <property name="sessionFactory" ref="sessionFactory"/>
+ <property name="clazz" value="org.hisp.dhis.coldchain.catalog.Catalog" />
+ <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.coldchain.catalog.CatalogDataValueStore"
class="org.hisp.dhis.coldchain.catalog.hibernate.HibernateCatalogDataValueStore">
@@ -69,6 +70,7 @@
<bean id="org.hisp.dhis.coldchain.catalog.CatalogService"
class="org.hisp.dhis.coldchain.catalog.DefaultCatalogService">
<property name="catalogStore" ref="org.hisp.dhis.coldchain.catalog.CatalogStore"/>
+ <property name="catalogDataValueService" ref="org.hisp.dhis.coldchain.catalog.CatalogDataValueService"/>
</bean>
<bean id="org.hisp.dhis.coldchain.catalog.CatalogDataValueService"
class="org.hisp.dhis.coldchain.catalog.DefaultCatalogDataValueService">
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ta.js'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ta.js 2012-02-17 07:00:23 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ta.js 2012-04-30 11:56:21 +0000
@@ -41,9 +41,11 @@
function getOrgUnitGroups()
{
var ouLevelId = document.getElementById( "orgUnitLevelCB" );
-
+
+ $('#orgUnitLevelCB').removeAttr('disabled');
clearList( ouLevelId );
-
+ $("#orgUnitListCB").attr("disabled", "disabled");
+
for(var i=0; i < orgUnitGroupIds.length; i++)
{
var option = document.createElement("option");
@@ -52,6 +54,13 @@
option.title = orgUnitGroupNames[i];
ouLevelId.add(option, null);
}
+
+ /*
+ if( selOrgUnitId != null && selOrgUnitId != "NONE" && selOrgUnitId != "")
+ {
+ getOUDeatilsForTA( selOrgUnitId );
+ }
+ */
}
@@ -68,7 +77,7 @@
$("#orgUnitLevelCB").attr("disabled", "disabled");
$('#ViewReport').removeAttr('disabled');
}
- /*
+ /*
else
{
$('#orgUnitLevelCB').removeAttr('disabled');
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/tabularAnalysisFront.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/tabularAnalysisFront.vm 2012-02-02 09:56:51 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/tabularAnalysisFront.vm 2012-04-30 11:56:21 +0000
@@ -328,7 +328,7 @@
var availableDataElements = new Object();
#foreach ( $availableDataElement in $dataElements )
- availableDataElements['$availableDataElement.id'] = '$encoder.jsEscape( $availableDataElement.name, "'" )';
+ availableDataElements['D:'+'$availableDataElement.id'] = '$encoder.jsEscape( $availableDataElement.name, "'" )';
#end
</script>
@@ -336,7 +336,7 @@
var availableIndicators = new Object();
#foreach ( $availableIndicator in $indicators )
- availableIndicators['$availableIndicator.id'] = '$encoder.jsEscape( $availableIndicator.name, "'" )';
+ availableIndicators['I:'+'$availableIndicator.id'] = '$encoder.jsEscape( $availableIndicator.name, "'" )';
#end
</script>
\ No newline at end of file
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/patientRegistrationList.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/patientRegistrationList.vm 2012-04-04 11:58:27 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/patientRegistrationList.vm 2012-04-30 11:56:21 +0000
@@ -148,13 +148,13 @@
#if( $patient.getPrograms().size() !=0 )
<td>
- <input type="button" id='generateButton' value="$i18n.getString( 'generate' )" onclick="javascript:generatePatientReport( event, '$patient.id' )" title='$i18n.getString( "generate" )'>
+ <input type="button" id='generateButton' value="$i18n.getString( 'discharge' )" onclick="javascript:generatePatientReport( event, '$patient.id' )" title='$i18n.getString( "discharge" )'>
<!-- <a href="#" onclick="javascript:generatePatientReport( event, '$patient.id' )" title='$i18n.getString( "generate" )' target="_blank">$i18n.getString( "generate" )</a>-->
<!--<a id="exportToExcel" name="exportToExcel" href="#" onclick="javascript:generatePatientReport( event, '$patient.id' )" title='$i18n.getString( "generate" )' target="_blank"><img src="images/GenerateButton.gif" alt='$i18n.getString( "generate" )'></a>-->
</td>
#else
<td>
- <input type="button" id='generateButton' value="$i18n.getString( 'generate' )" onclick="javascript:generatePatientReport( event, '$patient.id' )" disabled="disabled" title='$i18n.getString( "generate" )'>
+ <input type="button" id='generateButton' value="$i18n.getString( 'discharge' )" onclick="javascript:generatePatientReport( event, '$patient.id' )" disabled="disabled" title='$i18n.getString( "discharge" )'>
<!--<a href="#" onclick="javascript:generatePatientReport( event, '$patient.id' )" title='$i18n.getString( "generate" )' disabled="disabled" target="_blank">$i18n.getString( "generate" )</a>-->
<!--<a id="exportToExcel" name="exportToExcel" href="#" onclick="javascript:generatePatientReport( event, '$patient.id' )" title='$i18n.getString( "generate" )' target="_blank" style='display:none'><img src="images/GenerateButton.gif" alt='$i18n.getString( "generate" )'></a>-->
</td>