Hi Alex,

At the moment the only way to compare the data between different months in
validation rules is to use predictors -- define a predictor to pull the
data into a different data element in the current period from the past
period (like 3 months ago if you want -- use a predictor sequential sample
count of 3 and a skip count of 2.) Then use a validation rule to compare
the two data elements in the same period. For more about predictors, see
https://docs.dhis2.org/master/en/user/html/manage_predictor.html

The downsides of this are you have to define extra data elements and
predictors, and run the predictors before you do the validation, and store
extra data in the database.

For the future, we are looking at possible extensions to expressions that
would let you process past period data and current period data in the same
expression. If you would like this to apply to validation rules, please
submit a Jira issue to this effect, and preferably tell us more about the
application -- like what kind of data you have and why you want to compare
it between months. This will help us to prioritize the work if we know more
about the use case. :) Then let me know and I will link the issue to the
Jira Epic at https://jira.dhis2.org/browse/DHIS2-3187 where we are
gathering these requirements.

Thanks!

Cheers,
Jim


On Wed, Apr 11, 2018 at 1:03 PM, arungatom65 <arungato...@gmail.com> wrote:

> That is true Mr Akumba validation rules work on defined periods
>
>
>
> Sent from my Samsung Galaxy smartphone.
> -------- Original message --------
> From: Barnabas Akumba <akumbaba...@gmail.com>
> Date: 11/04/2018 19:09 (GMT+03:00)
> To: Alex Macharia <amacha...@gmail.com>
> Cc: dhis2-users@lists.launchpad.net
> Subject: Re: [Dhis2-users] VALIDATION RULES
>
> Hello Alex Macharia,
>
> The validation rule analysis page gives you the ability to select a
> range of dates (Start Date and End Date). This means if you want to
> validate data for last three months, you'll have to select the First
> date of the First Month i.e. 1st January, 2018 and Last date of March,
> i.e. 31st March, 2018.
> This will validate all the data that falls between the dates selected
> and give you the corresponding output.
>
> I don't know if this addresses your concern?
>
> Regards
>
> On 4/11/18, Alex Macharia <amacha...@gmail.com> wrote:
> > Hi,
> >
> > I there a way of creating a VALIDATION RULE that checks into other
> periods?
> >
> > I wish to validate current month in reference to data entered 3 months
> ago.
> >
> > Thanks
> >
> > --
> > ALEX MACHARIA
> >
>
>
> --
>
> Barnabas AKUMBA
>
> *Mobile:* +2348036195778
> *Skype:* barnabas.akumba
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Jim Grace
Core developer, DHIS 2
HISP US Inc.
http://www.dhis2.org <https://www.dhis2.org/>
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to