← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Program Indicator with Period as Condition

 

Hi Markus and All

thank you for your help with regards to program indicators evaluation
between period.i.e

Finding all patients that is negative and with more than 120 days since the
last service can be done in 2.26 and later with the following program
indicator:
Analytic type: Enrollment
Aggreagation operator: Count
Expression: V{tei_count}
Filter: #{DATA ELEMENT FOR DIAGNOSIS} == 'Negative' and
d2:daysBetween(V{event_date}, V{current_date}) > 120

However,how can i evaluate or add a condition of all those tested
"negative" 120 days ago but have tested "positive'' within 120 days after
the first HIV test?

Will it look like this?

Analytic type: Enrollment
Aggreagation operator: Count
Expression: V{tei_count}
Filter: (#{DATA ELEMENT FOR DIAGNOSIS} == 'Negative' and
d2:daysBetween(V{event_date}, V{current_date}) > 120) and (#{DATA ELEMENT
FOR DIAGNOSIS} == 'Positive' and d2:daysBetween(V{event_date},
V{current_date})<120)

Kindly assist

Stanley



On Fri, Jun 2, 2017 at 8:14 AM, Immaculate Ayebazibwe <ekassy29@xxxxxxxxx>
wrote:

> Thank you Markus,
> Will get back to you.
>
>
>
> Thank you and Kind Regards
> *Immarcqulate. A (Emma Kassy) *
>
> *"You miss 100% of the shots you don't take."*
>
> On Thu, Jun 1, 2017 at 1:04 PM, Markus Bekken <markus@xxxxxxxxx> wrote:
>
>> Hi there Stanley and Emma,
>> sorry for the delay.
>>
>> For Emmas Question - To count wether someone has received services or not
>> - but avoid counting them twice - you can make the following indicator:
>> Analytic type: Event
>> Aggregation operator: Count
>> Expression: V{tei_count}
>> Filter: V{program_stage_uid} == 'THE UID OF YOUR SERVICE PROGRAM STAGE'
>> (if you are using 2.25 or older, the last filter is not possible - you
>> would have to make a filter checking one of the mandatory data elements in
>> your program stage(s) used for giving services)
>>
>> For the original two issues from Stanley:
>> The interval between two events of the same stage is not currently
>> possible to calculate with the current program indicator functionality. We
>> hope to make full support for this in a coming release. To work around this
>> in the current solution, you would have to register the interval since the
>> last event as a data element in the repeating program stage. This data
>> element could be something that the data entry user calculates and enters,
>> or it could be auto assigned by a program rule. The vulnerability with
>> using a helper data element would be the fact that the interval is a part
>> of the data, and if you already have data entered these older events would
>> not have the correct value in this data element. If you change your mind or
>> there is an error in the data, it would be manual work to go through and
>> rectify them.
>>
>> Finding all patients that is negative and with more than 120 days since
>> the last service can be done in 2.26 and later with the following program
>> indicator:
>> Analytic type: Enrollment
>> Aggreagation operator: Count
>> Expression: V{tei_count}
>> Filter: #{DATA ELEMENT FOR DIAGNOSIS} == 'Negative' and
>> d2:daysBetween(V{event_date}, V{current_date}) > 120
>>
>> Hope this helps.
>>
>> Best regards
>> Markus
>>
>>
>> 1. jun. 2017 kl. 09.43 skrev Stanley Kalyati <skalyati@xxxxxxxxx>:
>>
>> Any update on this?
>>
>> Eagerly waiting for ideas.
>>
>> Stanley
>>
>> On Wed, May 31, 2017 at 2:08 PM, Stanley Kalyati <skalyati@xxxxxxxxx>
>> wrote:
>>
>>> This another good observation.Let me also benefit from this.
>>>
>>> Stanley
>>>
>>> On Wed, May 31, 2017 at 1:26 PM, Immaculate Ayebazibwe <
>>> ekassy29@xxxxxxxxx> wrote:
>>>
>>>> Hi Markus,
>>>>
>>>> Stanley, I hope I am not hijacking the conversation.
>>>>
>>>> Is it possible to just count that some one received the HTC services in
>>>> a given period and not how many times they received this service.
>>>> Like Stanley said, this is a service offered on a daily/weekly basis
>>>> and in order to avoid double counting I would just want to check if service
>>>> is provided in a given period despite the number of times.
>>>> How do I accomplish this?
>>>>
>>>>
>>>>
>>>> Thank you and Kind Regards
>>>> *Immarcqulate. A (Emma Kassy) *
>>>>
>>>> *"You miss 100% of the shots you don't take."*
>>>>
>>>> On Wed, May 31, 2017 at 12:54 PM, Stanley Kalyati <skalyati@xxxxxxxxx>
>>>> wrote:
>>>>
>>>>> Markus,
>>>>>
>>>>> You have just hit the nail on the head.All those conditions are what
>>>>> am looking for.
>>>>>
>>>>> Please guide.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Stanley
>>>>>
>>>>> On May 31, 2017 9:50 AM, "Markus Bekken" <markus@xxxxxxxxx> wrote:
>>>>>
>>>>>> Hey again,
>>>>>> Do you want to evaluate the interval _between_ the visits in the HTC
>>>>>> stage for negative patients, and classify them depending on wether it was
>>>>>> more or less than 120 days since the last visit?
>>>>>>
>>>>>> Or did you mean that you want to count patients currently negative,
>>>>>> and where the last HTC visit happened more than 120 days ago? (Patients
>>>>>> that should have come in for a repeat test)
>>>>>>
>>>>>> Best
>>>>>> Markus
>>>>>>
>>>>>>
>>>>>> 31. mai 2017 kl. 06.54 skrev Stanley Kalyati <skalyati@xxxxxxxxx>:
>>>>>>
>>>>>> Markus,
>>>>>>
>>>>>> Thanks for coming through.
>>>>>>
>>>>>> I have a program with 3 stages.HTC,ART,Viral Load.
>>>>>>
>>>>>> HTC is set for daily since clients come for testing each day.And we
>>>>>> also do analysis with regards to those that came to access HTC services per
>>>>>> week.Now those that turn negative are supposed to return for a retest every
>>>>>> 3 months.So I want the system to able to identify if one was already tested
>>>>>> like 120days ago or more than 120 days.And we call these repeat tests.
>>>>>>
>>>>>> I hope this makes sense.
>>>>>>
>>>>>> Secondly, if one tested negative,the two stages must be closed.Only
>>>>>> those positive the other stages must be enabled.
>>>>>>
>>>>>>
>>>>>> I hope this makes sense.
>>>>>>
>>>>>> Stanley
>>>>>> On May 30, 2017 10:46 PM, "Markus Bekken" <markus@xxxxxxxxx> wrote:
>>>>>>
>>>>>> Hi Stanley,
>>>>>>
>>>>>> It would be great if you can give some more specifics on your use
>>>>>> case. Which program stages do you have, and what dates/intervals are you
>>>>>> interested in within these - or within the tracked entity attributes?
>>>>>>
>>>>>> Best regards
>>>>>> Markus
>>>>>>
>>>>>> > 30. mai 2017 kl. 21.37 skrev Stanley Kalyati <skalyati@xxxxxxxxx>:
>>>>>> >
>>>>>> > How can I configure an indicator that will first look at the period
>>>>>> taken for one to access a service and then count the second visit and
>>>>>> service and second or repeat test.
>>>>>> >
>>>>>> > I.e I want to identify people that got tested for a soecif period
>>>>>> of time.And one is within this group then the system will count the service
>>>>>> as a Repeat test.
>>>>>> >
>>>>>> > Any ideas
>>>>>> >
>>>>>> > Stanley
>>>>>> > _______________________________________________
>>>>>> > Mailing list: https://launchpad.net/~dhis2-users
>>>>>> > Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>>>>>> > Unsubscribe : https://launchpad.net/~dhis2-users
>>>>>> > More help   : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~dhis2-users
>>>>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>
>>>>>
>>>>
>>>
>>
>>
>

Follow ups

References