Alerts..

Hello Jim,

Let me bother you for a bit… So I copy your explanation about the validation rule set up. A few issues I have encountered… I find that data elements belonging to datasets that have been set up to be collected daily, do not come up in the validation rule setup, i.e. does this mean only data elements that are collected monthly are to be validated? And also when setting up a surveillance type rule: what do the following parameters represent? I looked through all the docs and in the online help, but couldn’t find an explanation.

Appreciate your help!

···

On Thu, May 22, 2014 at 7:24 PM, jeromeshaguy@gmail.com wrote:

Thanks Sire

Sent from my BlackBerry 10 smartphone.

From: Jim Grace

Sent: Thursday, 22 May 2014 18:59

To: Jerome Shaguy

Subject: Re: Alerts…

Hi Jerome,

Validation rules refer to data elements only, not calculated Indicators. However, you can build a validation rule with the same kind of logic that you use to build an indicator. So it can accomplish the same thing.

I’m guessing that the “Low Threshold” values may be entered less frequently than the than the stock on hand. If this is true, then you will want to use a “surveillance” type validation rule (choose the “surveillance” type when you create the rule.) With a surveillance rule, you can put the current stock level on the left-hand side, that is entered more frequently, and the baseline value you are comparing it to on the right-hand side, which could be entered less frequently.

Finally, to get alerts, create a validation rule group containing all the validation rules you want to send alerts for. In this validation rule group you can choose one or more “User groups to alert”. The validation rules are run nightly, and users in those groups will be alerted.

I hope this helps. Let me know if you have any more questions – and please copy the dhis2 user mailing list dhis2-users@lists.launchpad.net in case others may be helped from the discussion.

Cheers,

Jim

On Thu, May 22, 2014 at 12:19 PM, Jerome Shaguy jeromeshaguy@gmail.com wrote:

Hi Jim,

Would appreciate some help with this: I am trying to create an alert. I have a data element called Low Threshold… Values for low stocks will be captured into this element. I have another Calculated element called stock on hand, I need the Validation rule to check stock on hand and compare it to Stock threshold and send out an alert; where stock on hand is lower than the threshold… Any ideas anyone?

Hello Jerome,

No problem. Good questions. When you create a new validation rule, be sure to set the Period Type to “Daily” on the new validation rule screen, if you want to see elements belonging to daily data sets. Otherwise the default is Monthly.

If you create a Surveillance type rule, the left-hand side will be restricted to data elements from data set with the selected period. So if you chose a Daily period, you can only choose this type of element on the left side. However the right side of the equation may contain data elements from data sets with longer period types. So, for example, the left side can refer to a data element collected daily, while the right side can refer to a threshold value that is entered less frequently (like yearly, for example.)

The surveillance parameters you mention are described at http://www.dhis2.org/doc/snapshot/en/user/html/dhis2_user_manual_en_full.html#d5e1568. But please feel free to email again if you have further questions about these.

Cheers,

Jim

···

On Tue, May 27, 2014 at 2:33 PM, Jerome Shaguy jeromeshaguy@gmail.com wrote:

Hello Jim,

Let me bother you for a bit… So I copy your explanation about the validation rule set up. A few issues I have encountered… I find that data elements belonging to datasets that have been set up to be collected daily, do not come up in the validation rule setup, i.e. does this mean only data elements that are collected monthly are to be validated? And also when setting up a surveillance type rule: what do the following parameters represent? I looked through all the docs and in the online help, but couldn’t find an explanation.

Appreciate your help!

On Thu, May 22, 2014 at 7:24 PM, jeromeshaguy@gmail.com wrote:

Thanks Sire

Sent from my BlackBerry 10 smartphone.

From: Jim Grace

Sent: Thursday, 22 May 2014 18:59

To: Jerome Shaguy

Subject: Re: Alerts…

Hi Jerome,

Validation rules refer to data elements only, not calculated Indicators. However, you can build a validation rule with the same kind of logic that you use to build an indicator. So it can accomplish the same thing.

I’m guessing that the “Low Threshold” values may be entered less frequently than the than the stock on hand. If this is true, then you will want to use a “surveillance” type validation rule (choose the “surveillance” type when you create the rule.) With a surveillance rule, you can put the current stock level on the left-hand side, that is entered more frequently, and the baseline value you are comparing it to on the right-hand side, which could be entered less frequently.

Finally, to get alerts, create a validation rule group containing all the validation rules you want to send alerts for. In this validation rule group you can choose one or more “User groups to alert”. The validation rules are run nightly, and users in those groups will be alerted.

I hope this helps. Let me know if you have any more questions – and please copy the dhis2 user mailing list dhis2-users@lists.launchpad.net in case others may be helped from the discussion.

Cheers,

Jim

On Thu, May 22, 2014 at 12:19 PM, Jerome Shaguy jeromeshaguy@gmail.com wrote:

Hi Jim,

Would appreciate some help with this: I am trying to create an alert. I have a data element called Low Threshold… Values for low stocks will be captured into this element. I have another Calculated element called stock on hand, I need the Validation rule to check stock on hand and compare it to Stock threshold and send out an alert; where stock on hand is lower than the threshold… Any ideas anyone?