← 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 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.

May be in service i can use getActiveProgramInstances which will call
getProgramInstances(program, orgunit) from store?

-- 

Regards,
Bharath Kumar. Ch

Follow ups

References