I am trying to figure out the best method to use age-type attributes in program indicator calculations. As a simple example, let us say I want a program indicator which displays the age in years of a person. >From what I can see, the age-type attribute stores its value as a date, according to the date of birth either selected or estimated based on what is entered in the years, weeks and months fields respectively during registration. If I want to use this date in a program indicator however it seems to not work correctly.
ie d2:yearsBetween(age, event_date) when used as an expressions as an example would not give me the correct age in years. Is there another way in which to make these types of program indicators work with the age-type attribute?
Hi Nick
I have also notice the same problem. Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.
It works!
Regards,
Nayeem Al Mifthah
Consultant for HSS, HMIS, M&E, GIS and Surveillance
I am trying to figure out the best method to use age-type attributes in program indicator calculations. As a simple example, let us say I want a program indicator which displays the age in years of a person. From what I can see, the age-type attribute stores its value as a date, according to the date of birth either selected or estimated based on what is entered in the years, weeks and months fields respectively during registration. If I want to use this date in a program indicator however it seems to not work correctly.
ie d2:yearsBetween(age, event_date) when used as an expressions as an example would not give me the correct age in years. Is there another way in which to make these types of program indicators work with the age-type attribute?
Hi Nick
I have also notice the same problem. Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.
It works!
Regards,
Nayeem Al Mifthah
Consultant for HSS, HMIS, M&E, GIS and Surveillance
I am trying to figure out the best method to use age-type attributes in program indicator calculations. As a simple example, let us say I want a program indicator which displays the age in years of a person. From what I can see, the age-type attribute stores its value as a date, according to the date of birth either selected or estimated based on what is entered in the years, weeks and months fields respectively during registration. If I want to use this date in a program indicator however it seems to not work correctly.
ie d2:yearsBetween(age, event_date) when used as an expressions as an example would not give me the correct age in years. Is there another way in which to make these types of program indicators work with the age-type attribute?
I think the issue is already created on JIRA since last year. May be we should push for it because this is stopping community from benefiting with this useful feature. The Jira link to the link is
Hi Nick
I have also notice the same problem. Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.
It works!
Regards,
Nayeem Al Mifthah
Consultant for HSS, HMIS, M&E, GIS and Surveillance
I am trying to figure out the best method to use age-type attributes in program indicator calculations. As a simple example, let us say I want a program indicator which displays the age in years of a person. From what I can see, the age-type attribute stores its value as a date, according to the date of birth either selected or estimated based on what is entered in the years, weeks and months fields respectively during registration. If I want to use this date in a program indicator however it seems to not work correctly.
ie d2:yearsBetween(age, event_date) when used as an expressions as an example would not give me the correct age in years. Is there another way in which to make these types of program indicators work with the age-type attribute?
Hi Nayeem, this is very useful but the statement below was not very clear at least for me.
“Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.”
Do you mind to elaborate a bit more, and which version of DHIS2 are referring to?
Thanks in advance
Regards
Sele
Hi Nick
I have also notice the same problem. Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.
It works!
Regards,
Nayeem Al Mifthah
Consultant for HSS, HMIS, M&E, GIS and Surveillance
Kindly ignore typos.
···
On Tuesday, April 3, 2018, 4:42:08 AM GMT+3, Nayeem Al Mifthah n.mifthah@gmail.com wrote:
I am trying to figure out the best method to use age-type attributes in program indicator calculations. As a simple example, let us say I want a program indicator which displays the age in years of a person. From what I can see, the age-type attribute stores its value as a date, according to the date of birth either selected or estimated based on what is entered in the years, weeks and months fields respectively during registration. If I want to use this date in a program indicator however it seems to not work correctly.
ie d2:yearsBetween(age, event_date) when used as an expressions as an example would not give me the correct age in years. Is there another way in which to make these types of program indicators work with the age-type attribute?
Hey Seleman,
The issue you are referring to here asks for a change in how the Age data type functions. I think the behavior you want should already be supported, but with the syntax that Nick provided below.
One strength of calculating the age using the d2:yearsBetween() is that you would explicitly state the point in time where you want the calculation to be based on. If you look at an Age data element in the user interface, the calculation is done based on the current date - but this is not always what you want when writing program indicators. Nicks example below was calculating based on event date for example.
I think the issue is already created on JIRA since last year. May be we should push for it because this is stopping community from benefiting with this useful feature. The Jira link to the link is
Hi Nick
I have also notice the same problem. Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.
It works!
Regards,
Nayeem Al Mifthah
Consultant for HSS, HMIS, M&E, GIS and Surveillance
I am trying to figure out the best method to use age-type attributes in program indicator calculations. As a simple example, let us say I want a program indicator which displays the age in years of a person. From what I can see, the age-type attribute stores its value as a date, according to the date of birth either selected or estimated based on what is entered in the years, weeks and months fields respectively during registration. If I want to use this date in a program indicator however it seems to not work correctly.
ie d2:yearsBetween(age, event_date) when used as an expressions as an example would not give me the correct age in years. Is there another way in which to make these types of program indicators work with the age-type attribute?
Hi Nayeem, this is very useful but the statement below was not very clear at least for me.
“Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.”
Do you mind to elaborate a bit more, and which version of DHIS2 are referring to?
Thanks in advance
Regards
Sele
On Tuesday, April 3, 2018, 4:42:08 AM GMT+3, Nayeem Al Mifthah n.mifthah@gmail.com wrote:
Hi Nick
I have also notice the same problem. Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.
It works!
Regards,
Nayeem Al Mifthah
Consultant for HSS, HMIS, M&E, GIS and Surveillance
I am trying to figure out the best method to use age-type attributes in program indicator calculations. As a simple example, let us say I want a program indicator which displays the age in years of a person. From what I can see, the age-type attribute stores its value as a date, according to the date of birth either selected or estimated based on what is entered in the years, weeks and months fields respectively during registration. If I want to use this date in a program indicator however it seems to not work correctly.
ie d2:yearsBetween(age, event_date) when used as an expressions as an example would not give me the correct age in years. Is there another way in which to make these types of program indicators work with the age-type attribute?
Hi Nayeem, this is very useful but the statement below was not very clear at least for me.
“Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.”
Do you mind to elaborate a bit more, and which version of DHIS2 are referring to?
Thanks in advance
Regards
Sele
On Tuesday, April 3, 2018, 4:42:08 AM GMT+3, Nayeem Al Mifthah n.mifthah@gmail.com wrote:
Hi Nick
I have also notice the same problem. Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.
It works!
Regards,
Nayeem Al Mifthah
Consultant for HSS, HMIS, M&E, GIS and Surveillance
I am trying to figure out the best method to use age-type attributes in program indicator calculations. As a simple example, let us say I want a program indicator which displays the age in years of a person. From what I can see, the age-type attribute stores its value as a date, according to the date of birth either selected or estimated based on what is entered in the years, weeks and months fields respectively during registration. If I want to use this date in a program indicator however it seems to not work correctly.
ie d2:yearsBetween(age, event_date) when used as an expressions as an example would not give me the correct age in years. Is there another way in which to make these types of program indicators work with the age-type attribute?
Hi Nick
I have also notice the same problem. Later created a data element in program stage and assign age in year as a calculative value from program attribute ‘age’.
It works!
Regards,
Nayeem Al Mifthah
Consultant for HSS, HMIS, M&E, GIS and Surveillance
I am trying to figure out the best method to use age-type attributes in program indicator calculations. As a simple example, let us say I want a program indicator which displays the age in years of a person. From what I can see, the age-type attribute stores its value as a date, according to the date of birth either selected or estimated based on what is entered in the years, weeks and months fields respectively during registration. If I want to use this date in a program indicator however it seems to not work correctly.
ie d2:yearsBetween(age, event_date) when used as an expressions as an example would not give me the correct age in years. Is there another way in which to make these types of program indicators work with the age-type attribute?