Aggregation Query Builder doesn't count

Hi Marko=2C

It works with formula [CA:43567] =3D 'Gender'. For formulas like this [CA:4=
3567] =3D Gender (Gender didn't put between apostroph )=2C formulas didn't =
work. So if you have any formula similar to the second case=2C please put v=
alue to compare between apostroph (') . This bug will be fixed for 2.13 ver=
sion as plan.
=0A=
=0A=

Thank you=2C Marko.
Best regards=2C

···

------------------------------------------------
Ch=E2u Thu Tr=E2n =20
HISP Viet Nam
Email: tran.hispvietnam@gmail.com=0A=
=0A=
=0A=

On Tue=2C Aug 27=2C 2013 at 9:15 PM=2C Marko David Garcia Mu=F1oz <markodav= idgm@gmail.com> wrote:
=0A=
=0A=
Thank you Tran.
"Regimen" is patient attribute created by Us=2C when we try to test the con=
dition the system show the warning window.For Example if we use "Genero" =
=3D Gender=2C or if we use the dataelement parameter ('210 - Dengue') the q=
uery works fine.=0A=
=0A=

Thank you very much.

=0A=
=0A=
=0A=
=0A=
=0A=
Cordialmente=2C

Ing. Marko David Garcia Mu=F1oz=0A=
=0A=
Secretar=EDa Departamental de Salud del Cauca=0A=
=0A=
=C1rea de Sistemas Integrados de Informaci=F3n=0A=
=0A=
Skype: marko_david

=0A=
=0A=

El 26/08/2013=2C a las 23:19=2C Tran Chau <tran.hispvietnam@gmail.com> escr=
ibi=F3:
=0A=
=0A=
Dear Marko and Helder=2C

Could you please send to me the formula you created. I can try to test with=
this formula in my laptop.
Thank you.=0A=
=0A=
=0A=
=0A=
Best regards=2C
------------------------------------------------
Ch=E2u Thu Tr=E2n =20
HISP Viet Nam
Email: tran.hispvietnam@gmail.com=0A=
=0A=
=0A=
=0A=
=0A=

On Tue=2C Aug 27=2C 2013 at 5:47 AM=2C helder yesid castrillon cobo <helder= _947@hotmail.com> wrote:
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
sorry!!

SEX =3D gender
In spanish genero=2C sexo.

ING. Helder Yesid Castrillon.

From: helder_947@hotmail.com
=0A=
=0A=
=0A=
=0A=
To: markodavidgm@gmail.com=3B dhis2-users@lists.launchpad.net
Date: Tue=2C 27 Aug 2013 00:43:56 +0200
=0A=
=0A=
=0A=
=0A=
Subject: Re: [Dhis2-users] Aggregation Query Builder doesn't count

=0A=
=0A=
=0A=
Hi=2C We have reviewed in detail and we found that the problem is presented=
with aggregation query that use the attribute of patient that we have crea=
ted.=20
The postgres console print the next error.
=20
=0A=
=0A=
=0A=
=0A=
ERROR: syntax error at or near ")" at character 617
STATEMENT: SELECT '0' as dataelementid=2C '0' as categoryoptioncomboid=2C o=
u.organisationunitid as sourceid=2C '0' as periodid=2C'DHIS-SYSTEM' as comm=
ent=2C '201308' as periodIsoDate=2C'dataelementname' as dataelementname=2C =
'optioncomboid' as categoryoptioncomboname=2C ou.name as organisationunitna=
me=2C count (psi.programinstanceid ) as value FROM programstageinstance as =
psi INNER JOIN organisationunit ou on ou.organisationunitid=3Dpsi.organisat=
ionunitid WHERE EXISTS ( SELECT * FROM patientattributevalue _pav WHERE _pa=
v.patientid =3D pi.patientid and _pav.patientattributeid=3D280 AND p.organi=
sationunitid in (0) AND _pav.value )=3D'Especial' ) GROUP BY ou.organisatio=
nunitid=2C ou.name
=0A=
=0A=
=0A=
=0A=

the error is generated when we edit the aggregation query=2C but it is don'=
t generated with aggregation query that use the attibutes of patient that i=
t is by default. (Sex).

Thanks=2C=20

ING. Helder Yesid Castrillon.
=0A=
=0A=
=0A=
=0A=
Secretar=EDa departamental de salud