This document explain how to configure Address Hierarchies in OpenMRS, so that Bahmni UI can show correct address hierarchies.
Uploading Address Hierarchy via a CSV
Address Hierarchy needs to be configured in OpenMRS to display in Bahmni UI. It is best set up by uploading a Comma Separated Values (CSV) file of address hierarchy that represents the hierarchy you want in your implementation. If you have a hierarchy of State > District > Taluka / Block > Village / City then the CSV should have the format of State, District, Taluka , Village.
- Set "Delimiter (regex format):" to ',' (without quotes)
- Now, once you have such CSV in place, go to OpenMRS > Administration > Manage Address Hierarchy
- In "section, select this CSV file to upload
- Leave "User-Generated Id Delimiter (regex format):" as blank
- If you have an existing address hierarchy that you want to replace then mark "Overwrite Existing Hierarchy:" as Checked. This is left "unchecked" then new addresses would get appended to existing hierarchy.
- Click upload to complete the upload process.
Example file: SEARCH_address_hierarchy.csv
Map Address Fields
Once the Address CSV is successfully uploaded, you would see a list of fields in the "

- Click on the Edit link next to the field to specify the "Name", "Address Field" and "Required" flag.
- "Name" is what would be the Label displayed to the user on Registration Page.
- "Address Field" is the field in "person_address" table where this field would be stored. From DB perspective this does not matter but keeping these closest to relevant fields is a good practice.
Once this is done for all fields, your address hierarchy set up is complete! Now Registration page should start showing these fields!!