← Back to team overview

dhis2-devs team mailing list archive

Re: Best possible approach to list all the data elements of a program

 

Maybe something like this:
https://play.dhis2.org/demo/api/programs/IpHINAT79UW.json?fields=programStages[programStageDataElements[:all]]

On Sun, May 15, 2016 at 6:48 PM, chathura widanage <
chathurawidanage@xxxxxxxxx> wrote:

> Dear devs,
>
> What will be the best possible approach (minimum number of API calls) to
> get all the dataElements which are relevant for a selected program.
>
> I couldn't find out a direct API call for this, so currently following the
> below flow.
>
> Program (1) -> programStages (n) -> programStageDataElements (m) ->
> dataElement (m)
>
> Assuming a Program has n programStages and, each programStage has m
> programStageDataElements, to get all the dataElements (displayName of data
> elements) it takes n x m x m API calls.
>
> Since this isn't an acceptable approach, would it be possible to minimize
> the number of API calls?
>
> Thanks
> Chathura
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org

Follow ups

References