dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #12261
Re: Requesting API information about categoryOptionComboslist against datasetid
-
To:
Morten Olav Hansen <morten@xxxxxxxxx>
-
From:
Muhammad Masud Parvez <masud.parvez@xxxxxxxxxx>
-
Date:
Thu, 19 Jan 2017 07:01:27 +0000
-
Accept-language:
en-US
-
Cc:
"dhis2-users@xxxxxxxxxxxxxxxxxxx" <dhis2-users@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CAKzUaAfQ=Pf6yYBWnCporo=6Pm7exnGv4geyDBMRyW=d__tKOQ@mail.gmail.com>
-
Thread-index:
AQHSca975W61nZyg7ESauiCPK2lIEKE/P9kQ//+pfACAAGaxMP//nQkAgABlO3D//6Z0gAAM6JWQ
-
Thread-topic:
[Dhis2-users] Requesting API information about categoryOptionComboslist against datasetid
Dear Morten,
Thanks a lot, it’s working perfectly as per my requirement.
Best Regards
Masud Parvez
CEH, MCITP, MCTS
Analyst Programmer
Health Systems and Population Studies Division
International Centre for Diarrhoeal Disease Research (icddr,b)
68, Shaheed Tajuddin Ahmed Sarani, Mohakhali,
Dhaka-1212, Bangladesh|
Phone- 02-9827001-10 , Ext: 2244.
From: Morten Olav Hansen [mailto:morten@xxxxxxxxx]
Sent: Thursday, January 19, 2017 12:51 PM
To: Muhammad Masud Parvez <masud.parvez@xxxxxxxxxx>
Cc: dhis2-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Dhis2-users] Requesting API information about categoryOptionComboslist against datasetid
Hi
For newer versions of dhis, you can use something like:
/api/dataSets/lyLU2wR22tC.json?fields=id,displayName,dataSetElements[dataElement[categoryCombo[categoryOptionCombos[id,displayName]]]]
For your version, I think this should do it:
/api/dataSets/lyLU2wR22tC.json?fields=id,displayName,dataElements[categoryCombo[categoryOptionCombos[id,displayName]]]
--
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org
On Thu, Jan 19, 2017 at 1:17 PM, Muhammad Masud Parvez <masud.parvez@xxxxxxxxxx<mailto:masud.parvez@xxxxxxxxxx>> wrote:
Dear All dhis2 ussers,
Greetings from Bangladesh.
Currently we are working on a project about developing a data warehouse from DHIS2 version 2.22 and other sources of data for DGHS under MoHFW.
So I am wondering is there any web API available where I could get categoryOptionComboslist against datasetid like I am getting data element list like below mentioned API
/api/dataElements?filter=dataSets.id:eq: iUz0yoVeeiZ
Any response on this regards are highly appreciable.
Thanks & Regards
Masud Parvez
CEH, MCITP, MCTS
Analyst Programmer
Health Systems and Population Studies Division
International Centre for Diarrhoeal Disease Research (icddr,b)
68, Shaheed Tajuddin Ahmed Sarani, Mohakhali,
Dhaka-1212, Bangladesh|
Phone- 02-9827001-10 , Ext: 2244.
From: Jason Pickering [mailto:jason.p.pickering@xxxxxxxxx<mailto:jason.p.pickering@xxxxxxxxx>]
Sent: Thursday, January 19, 2017 12:09 PM
To: Muhammad Masud Parvez <masud.parvez@xxxxxxxxxx<mailto:masud.parvez@xxxxxxxxxx>>; dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Requesting API information about categoryOptionComboslist against datasetid
Which version are you using?
In general, we would prefer that such requests for technical discussions be held via out mailing list
dhis2-users@xxxxxxxxxxxxxxxxxxx<http://lists.launchpad.net>
The mailing list you are using now is really only for contacting the DHIS2 expert group. Could you move the discussion there please?
On Thu, Jan 19, 2017 at 7:03 AM, Muhammad Masud Parvez <masud.parvez@xxxxxxxxxx<mailto:masud.parvez@xxxxxxxxxx>> wrote:
Dear Jason,
Thanks for your response.
After running the CURL
/api/dataSets/iUz0yoVeeiZ.json?fields=id,name,code,dataSetElements%5bdataElement%5bid,code,categoryCombo%5b*%5d%5d
I am getting below mentioned output.
{
"code": "Daily OPD and Emergency",
"name": "Daily OPD and Emergency Visits, Admission Data Set",
"id": "iUz0yoVeeiZ"
}
Thanks & Regards
Masud Parvez
CEH, MCITP, MCTS
Analyst Programmer
Health Systems and Population Studies Division
International Centre for Diarrhoeal Disease Research (icddr,b)
68, Shaheed Tajuddin Ahmed Sarani, Mohakhali,
Dhaka-1212, Bangladesh|
Phone- 02-9827001-10 , Ext: 2244.
From: Jason Pickering [mailto:jason.p.pickering@xxxxxxxxx<mailto:jason.p.pickering@xxxxxxxxx>]
Sent: Thursday, January 19, 2017 11:56 AM
To: Muhammad Masud Parvez <masud.parvez@xxxxxxxxxx<mailto:masud.parvez@xxxxxxxxxx>>
Cc: Lars Helge Øverland <lars@xxxxxxxxx<mailto:lars@xxxxxxxxx>>; experts@xxxxxxxxx<mailto:experts@xxxxxxxxx>
Subject: Re: Requesting API information about categoryOptionComboslist against datasetid
It seems you want the category option combo of the data elements? If so, something like this might work
https://play.dhis2.org/demo/api/dataSets/lyLU2wR22tC.json?fields=id,name,code,dataSetElements[dataElement[id,code,categoryCombo[*]]<https://play.dhis2.org/demo/api/dataSets/lyLU2wR22tC.json?fields=id,name,code,dataSetElements%5bdataElement%5bid,code,categoryCombo%5b*%5d%5d>
On Thu, Jan 19, 2017 at 6:50 AM, Muhammad Masud Parvez <masud.parvez@xxxxxxxxxx<mailto:masud.parvez@xxxxxxxxxx>> wrote:
Dear Lars,
Thanks for your response. When I am running the CURL command in postman
/api/dataSets/pEaVGTvSsQn.json?fields=id,code,name,categoryCombo%5bid,code,name,categoryOptionCombos%5bid,code,name%5d%5d
I am getting below mentioned result.
{
"name": "EPI Infant and Women Data Set (Form-1&2) new",
"id": "pEaVGTvSsQn",
"categoryCombo": {
"name": "default",
"id": "VqkJtcTQb8E",
"categoryOptionCombos": [
{
"name": "default",
"id": "dCWAvZ8hcrs"
}
]
}
}
But, in that dataset there are few categoryOptionCombos
[cid:image001.png@01D27254.38F0F320]
Any response on this regards are highly appreciable.
Thanks & Regards
Masud Parvez
CEH, MCITP, MCTS
Analyst Programmer
Health Systems and Population Studies Division
International Centre for Diarrhoeal Disease Research (icddr,b)
68, Shaheed Tajuddin Ahmed Sarani, Mohakhali,
Dhaka-1212, Bangladesh|
Phone- 02-9827001-10 , Ext: 2244.
From: Lars Helge Øverland [mailto:lars@xxxxxxxxx<mailto:lars@xxxxxxxxx>]
Sent: Wednesday, January 18, 2017 11:22 PM
To: Muhammad Masud Parvez <masud.parvez@xxxxxxxxxx<mailto:masud.parvez@xxxxxxxxxx>>
Cc: experts@xxxxxxxxx<mailto:experts@xxxxxxxxx>
Subject: Re: Requesting API information about categoryOptionComboslist against datasetid
Hi Masud,
you can try something like this:
https://play.dhis2.org/demo/api/dataSets/lyLU2wR22tC.json?fields=id,code,name,categoryCombo[id,code,name,categoryOptionCombos[id,code,name]]<https://play.dhis2.org/demo/api/dataSets/lyLU2wR22tC.json?fields=id,code,name,categoryCombo%5bid,code,name,categoryOptionCombos%5bid,code,name%5d%5d>
regards,
Lars
On Wed, Jan 18, 2017 at 5:08 PM, Muhammad Masud Parvez <masud.parvez@xxxxxxxxxx<mailto:masud.parvez@xxxxxxxxxx>> wrote:
Dear Expert,
Greetings from Bangladesh.
Currently we are working on a project about developing a data warehouse from DHIS2 and other sources of data for DGHS under MoHFW.
So I am wondering is there any web API available where I could get categoryOptionComboslist against datasetid like I am getting data element list like below mentioned API
/api/dataElements?filter=dataSets.id:eq: iUz0yoVeeiZ
Any response on this regards are highly appreciable.
Thanks & Regards
Masud Parvez
CEH, MCITP, MCTS
Analyst Programmer
Health Systems and Population Studies Division
International Centre for Diarrhoeal Disease Research (icddr,b)
68, Shaheed Tajuddin Ahmed Sarani, Mohakhali,
Dhaka-1212, Bangladesh|
Phone- 02-9827001-10 , Ext: 2244.
--
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
lars@xxxxxxxxx<mailto:lars@xxxxxxxxx>
http://www.dhis2.org<https://www.dhis2.org/>
--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx<mailto:jason.p.pickering@xxxxxxxxx>
tel:+46764147049
--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx<mailto:jason.p.pickering@xxxxxxxxx>
tel:+46764147049
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp
Follow ups
References