Hi All,
Could you help me how to list active health facility using specific dataset please
I have all facility from sql view but I don’t know how to show only health facilities using specific dataset.
Thank you for your help.
Joelson
Hi All,
Could you help me how to list active health facility using specific dataset please
I have all facility from sql view but I don’t know how to show only health facilities using specific dataset.
Thank you for your help.
Joelson
Hi @mangamanga,
I guess you are trying to see which organization units are linked to the dataset?
Best,
James.
I can see API but I don’t know yet how to use it.
I would like to show these facilities on sql view if possible.
Thank you
I see UID code but how to list them in one table please.
Thanks
Hi @mangamanga,
Kindly allow me to link you up with @Emma_Kassy to have a look at this as we see what other members think about this.
Best,
James
It’s ok thank you in advance.
@mangamanga
Fill the dataset uid accordingly
Try using this sql below:
SELECT
ou.uid as orgunituid,
ou.name as orgunitname,
ds.name as datasetname
FROM
dataset ds,
datasetsource dss,
organisationunit ou
WHERE
ds.datasetid = dss.datasetid AND
dss.sourceid = ou.organisationunitid
AND ds.uid = ‘xxxxxxxx’;
Let us know if this helps!
Cheers,
Emma.
Thanks for this @Emma_Kassy.
Thank you.
I tryed to use this code but I have this message :
“ERROR: column “‘XXXXXXXX’” does not exist Position : 256”
But API went on.
@mangamanga
The idea is to fill in the dataset uid where “xxxxxxx” exists.
Cheers,
Emma
I changed the code into UID of dataset but still the same message.
What I do to fix it please.
Thx
Hi @mangamanga use single quotes for ds.uid as ‘XXXXXXX’
@mangamanga
Can you test if this query works on play demo too, just to make sure it works in another environment.
Also, what version of dhis2 are you running?
I tested query on 2.30
Cheers,
Emma
Hi all,
It works fine. Thank you all.
Could you help me again hot to show parent level please. Health facility is level 5 and I want to show level 4, 3, and 2.
Thanks again