Import org. unit CSV

Hi all,

I tried to upload org. units to DHIS2 from a CSV file. You can find attached the CSV used.

I have to respect a hierarchy in the org. units to upload so I had to set the UID, in order to use them in the PARENT_UID of the children. The UID needed were generated using the Web API: http:///api/system/id?n=x

It say all the org. Units were correctly imported. I can see my new org. units in the database, I can also see them through the web API:

But in the UI I can’t see them in my org. unit tree. The weird thing is that if I do a search on org unit and search for one of my new org. unit, I get it as a result. It’s just not in my tree…

Any idea why?

FYI, I cleared the cache of my browser, I used the new app from DHIS 2.18 that clears the cache, I restarted Tomcat,… nothing worked.

**Novel-**T Sàrl

Yoann MIRA - Solutions Engineer

W: www.novel-t.ch | @: ym@novel-t.ch

Clinic_sample.csv (659 Bytes)

Hi

Can you verify in the database that the parent is set? I’m not 100% how the CSV importer works (I’m responsible for XML/JSON), but for our “normal” importer… this should work fine.

···

On Fri, Jan 23, 2015 at 4:31 PM, Yoann Mira ym@novel-t.ch wrote:

Hi all,

I tried to upload org. units to DHIS2 from a CSV file. You can find attached the CSV used.

I have to respect a hierarchy in the org. units to upload so I had to set the UID, in order to use them in the PARENT_UID of the children. The UID needed were generated using the Web API: http:///api/system/id?n=x

It say all the org. Units were correctly imported. I can see my new org. units in the database, I can also see them through the web API:

But in the UI I can’t see them in my org. unit tree. The weird thing is that if I do a search on org unit and search for one of my new org. unit, I get it as a result. It’s just not in my tree…

Any idea why?

FYI, I cleared the cache of my browser, I used the new app from DHIS 2.18 that clears the cache, I restarted Tomcat,… nothing worked.

**Novel-**T Sàrl

Yoann MIRA - Solutions Engineer

W: www.novel-t.ch | @: ym@novel-t.ch


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Morten

The parent is correctly set for all the children.

But one of the CSV entry is a root so no parent set for this one.

I don’t know if it has an impact, but I already have a root org. unit in DHIS2, with the CSV import, I would like to add a new root, and children to it.

**Novel-**T Sàrl

Yoann MIRA - Solutions Engineer

W: www.novel-t.ch | @: ym@novel-t.ch

···

From: Morten Olav Hansen [mailto:mortenoh@gmail.com]
Sent: vendredi 23 janvier 2015 10:35
To: Yoann Mira
Cc: dhis2-users
Subject: Re: [Dhis2-users] Import org. unit CSV

Hi

Can you verify in the database that the parent is set? I’m not 100% how the CSV importer works (I’m responsible for XML/JSON), but for our “normal” importer… this should work fine.


Morten

On Fri, Jan 23, 2015 at 4:31 PM, Yoann Mira ym@novel-t.ch wrote:

Hi all,

I tried to upload org. units to DHIS2 from a CSV file. You can find attached the CSV used.

I have to respect a hierarchy in the org. units to upload so I had to set the UID, in order to use them in the PARENT_UID of the children. The UID needed were generated using the Web API: http:///api/system/id?n=x

It say all the org. Units were correctly imported. I can see my new org. units in the database, I can also see them through the web API:

But in the UI I can’t see them in my org. unit tree. The weird thing is that if I do a search on org unit and search for one of my new org. unit, I get it as a result. It’s just not in my tree…

Any idea why?

FYI, I cleared the cache of my browser, I used the new app from DHIS 2.18 that clears the cache, I restarted Tomcat,… nothing worked.

**Novel-**T Sàrl

Yoann MIRA - Solutions Engineer

W: www.novel-t.ch | @: ym@novel-t.ch


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Yes, this is probably the reason why its not working. You must also add this orgUnit to the current user to see it (or set your root orgunit as the parent of the new root orgunit).

When a user is attached to a orgUnit (even if its a root), you will only see that as the root of the tree.

···

On Fri, Jan 23, 2015 at 4:40 PM, Yoann Mira ym@novel-t.ch wrote:

The parent is correctly set for all the children.

But one of the CSV entry is a root so no parent set for this one.

I don’t know if it has an impact, but I already have a root org. unit in DHIS2, with the CSV import, I would like to add a new root, and children to it.

**Novel-**T Sàrl

Yoann MIRA - Solutions Engineer

W: www.novel-t.ch | @: ym@novel-t.ch

From: Morten Olav Hansen [mailto:mortenoh@gmail.com]
Sent: vendredi 23 janvier 2015 10:35
To: Yoann Mira
Cc: dhis2-users
Subject: Re: [Dhis2-users] Import org. unit CSV

Hi

Can you verify in the database that the parent is set? I’m not 100% how the CSV importer works (I’m responsible for XML/JSON), but for our “normal” importer… this should work fine.


Morten

On Fri, Jan 23, 2015 at 4:31 PM, Yoann Mira ym@novel-t.ch wrote:

Hi all,

I tried to upload org. units to DHIS2 from a CSV file. You can find attached the CSV used.

I have to respect a hierarchy in the org. units to upload so I had to set the UID, in order to use them in the PARENT_UID of the children. The UID needed were generated using the Web API: http:///api/system/id?n=x

It say all the org. Units were correctly imported. I can see my new org. units in the database, I can also see them through the web API:

But in the UI I can’t see them in my org. unit tree. The weird thing is that if I do a search on org unit and search for one of my new org. unit, I get it as a result. It’s just not in my tree…

Any idea why?

FYI, I cleared the cache of my browser, I used the new app from DHIS 2.18 that clears the cache, I restarted Tomcat,… nothing worked.

**Novel-**T Sàrl

Yoann MIRA - Solutions Engineer

W: www.novel-t.ch | @: ym@novel-t.ch


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp


Morten