← Back to team overview

dhis2-devs team mailing list archive

Re: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1949: Added Service to get ProgramInstances by Orgunit; Changed accordingly in MultiDataEntry&SummaryRe...

 

On Mon, Oct 25, 2010 at 1:44 PM, bharath kumar <chbharathk@xxxxxxxxx> wrote:

>
>
> On Mon, Oct 25, 2010 at 5:00 PM, Abyot Gizaw <abyota@xxxxxxxxx> wrote:
>
>> Just a question Bahrath,
>>
>> Once you have a program can't you use  Collection<ProgramInstance>
>> getProgramInstances( Program program, boolean completed );
>>
>> Do you want to display status of programs per orgunit?
>>
>
> Yes.
>
>
>>
>> If so I think you can still use the existing API and do some sort of
>> mapping. Because I see you kind of hardcoding a bit ... "get
>> programInstances whose endData is null" - I think you can play around with
>> the completed attribute of programInstance.
>>
>>
> *completed *attribute is not setting some times where enddate is set, I am
> not sure exactly in which case it is happening (may be when we enroll
> ,unenroll again enroll program to a person). Actually the method name should
> be getActiveProgramInstances, but in store we are implementing GenericStore,
> thats y i have given getProgramInstances to the method.
>

Yes completed is set to true when we do program unenroll/enroll. I think, we
should also provide a menu in program maintenance to cleanup programs -
because it is very ideal that users follow a strict program enrollment and
the un-enrollment (like successful completion or termination).

What was that you wanted to display exactly ? all those active programs or
completed ones?

>
> May be in service i can use getActiveProgramInstances which will call
> getProgramInstances(program, orgunit) from store?
>
> --
>
> Regards,
> Bharath Kumar. Ch
>

Follow ups

References