dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14630
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5033: Add brackets buttons into the Aggregation Query Build Form.
------------------------------------------------------------
revno: 5033
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-10-26 10:40:58 +0700
message:
Add brackets buttons into the Aggregation Query Build Form.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.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 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java 2011-10-25 06:14:43 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java 2011-10-26 03:40:58 +0000
@@ -204,7 +204,7 @@
Period period )
{
String sql = convertCondition( aggregationCondition, orgunit, period );
-System.out.println("\n\n === \n sql : " + sql );
+
Collection<Integer> patientIds = aggregationConditionStore.executeSQL( sql );
if ( patientIds == null )
@@ -439,7 +439,7 @@
if ( operators.size() > 0 )
{
- sql = "SELECT distinct(p.patientid) FROM patient as p where p.patientid in ( " + sql + ")";
+ sql = "SELECT distinct(p.patientid) FROM patient as p where p.patientid in " + sql + ")";
}
subSQL.add( sql );
@@ -454,7 +454,7 @@
subSQL.add( sql );
}
- return getSQL( subSQL, operators ) + ")";
+ return getSQL( subSQL, operators );
}
private String createSQL( String aggregationExpression, OrganisationUnit orgunit, Period period )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2011-10-17 04:04:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2011-10-26 03:40:58 +0000
@@ -9,6 +9,7 @@
</script>
<h3>$i18n.getString( "create_new_case_aggregation_condition" )</h3>
+
<form id="addCaseAggregationForm" action="addCaseAggregation.action" method="post" >
<table>
@@ -99,7 +100,6 @@
</select>
</td>
</tr>
-
<tr>
<td>
<label for="dataelement">$i18n.getString( "dataelement" )</label>
@@ -174,6 +174,8 @@
<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "!=" );' style="cursor:pointer;"/>
<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "+" );' style="cursor:pointer;"/>
+ <img src="../images/left_parent.png" alt="$i18n.getString( 'left_parent' )" onclick='insertOperator( "(" );' style="cursor:pointer;"/>
+ <img src="../images/right_parent.png" alt="$i18n.getString( 'right_parent' )" onclick='insertOperator( ")" );' style="cursor:pointer;"/>
<img src="../images/is_null.png" alt="$i18n.getString( 'is_null' )" onclick='insertOperator( "is null" );' style="cursor:pointer;"/>
<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "is not null" );' style="cursor:pointer;"/>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2011-10-17 04:04:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2011-10-26 03:40:58 +0000
@@ -71,8 +71,7 @@
<tbody>
<tr>
-
- <td>
+ <td>
<fieldset style="border: 1px solid #3f5d8e; ">
<legend>$i18n.getString( "program_stage_de" )</legend>
@@ -176,6 +175,8 @@
<img src="../images/diff.png" alt="$i18n.getString( 'diff' )" onclick='insertOperator( "!=" );' style="cursor:pointer;">
<img src="../images/plus.png" alt="$i18n.getString( 'plus' )" onclick='insertOperator( "+" );' style="cursor:pointer;">
+ <img src="../images/left_parent.png" alt="$i18n.getString( 'left_parent' )" onclick='insertOperator( "(" );' style="cursor:pointer;"/>
+ <img src="../images/right_parent.png" alt="$i18n.getString( 'right_parent' )" onclick='insertOperator( ")" );' style="cursor:pointer;"/>
<img src="../images/is_null.png" alt="$i18n.getString( 'is_null' )" onclick='insertOperator( "is null" );' style="cursor:pointer;">
<img src="../images/not_null.png" alt="$i18n.getString( 'not_null' )" onclick='insertOperator( "is not null" );' style="cursor:pointer;">