Address Hierarchy

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. 

The CSV columns should be in the order of Bigger Geographical region to Smaller region. Otherwise the address fields would appear in reverse order on the Registration page and auto-complete won't be useful.

e.g. see below, also refer to attached address_hierarchy.csv

MaharashtraGadchiroliChamorshiGhot
MaharashtraGadchiroliChamorshiChamorshi

 

  1. Set "Delimiter (regex format):" to ',' (without quotes)
  2. Now, once you have such CSV in place, go to OpenMRS > Administration > Manage Address Hierarchy
  3. In "Upload Address Hierarchy" section, select this CSV file to upload
  4. Leave "User-Generated Id Delimiter (regex format):" as blank
  5. 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.
  6. 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 "Address Hierarchy Levels" 


  1. Click on the Edit link next to the field to specify the "Name", "Address Field" and "Required" flag.
  2. "Name" is what would be the Label displayed to the user on Registration Page.
  3. "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!!

 

To ensure that these address fields get synced to correct Labels in OpenELIS, refer  to steps in Address Mapping between OpenELIS and Bahmni / OpenMRS

 

 

 

On this page

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)