How to replace existing database's orgunits with an updated list of HFs

Could you please advise how to perform bulk import updated list of orgunits from an existing Master Facility List stored in csv format (i.e. how to update/replace existing database’s orgunits with a new list of HFs)?

Welcome to the community @Mustafa_Masoudi! Have you checked out the documentation Import/Export App - DHIS2 Documentation?

I also should ask you is the CSV exported from a previous DHIS2 instance? It’s always recommended to use the import/export with the same DHIS2 instance; for instance, if you want to import into 2.36 from 2.33 it’s advised to upgrade the 2.33 instance and then use the import/export. :slight_smile:

Thanks a million dear @Gassim :slightly_smiling_face: . . This is really highly appreciated. By the way, I have just followed the steps as per the shared documentation (I have exported the orgunit metadata and updated the HFs names and ShortNames then tried to re-import the same metadata file. However, the updated metadata failed to be imported and the following error message appears:

Please advise what else needs to be configured.

Hi @Mustafa_Masoudi!

It looks like the exported CSV has different parameters than the expected ones in the CSV import. I suggest that you use the info from the export file but change the headers according to the documentation (OU CSV).

Here is an example:

  1. Exported CSV

  2. New Headers

    The “path” will help you to assign the “Parent” parameter, everything else you’ll just need to copy and paste.

Let us know if this solves the issue.


And to keep you up to date, @zubair shared the Jira issue for this: Log in - DHIS 2 JIRA