On Mon, Oct 25, 2010 at 1:44 PM, bharath kumar <chbhara...@gmail.com> wrote:
> > > On Mon, Oct 25, 2010 at 5:00 PM, Abyot Gizaw <aby...@gmail.com> 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 >
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp