i am trying to customize Address hierarchy in registration Page in Bahmni as i understand from document ion i have Logged in Manage Address Template and edit template as below
but after logging to address hierarchy map to map this fields to their labels the fields that i identified in manage address template not appeared
<org.openmrs.layout.address.AddressTemplate>
address1
address2
countyDistrict city postalCode country
startDate endDate
</org.openmrs.layout.address.AddressTemplate>
Hi @ahmedkhalil, If you look at the OpenMRS Address Template WIKi, the address attributes needs to be picked up from the list given in the below table. Please change < property name=“city” value=“Location.city” /> to < property name=“cityVillage” value=“Location.cityVillage” / >
please check my first reply in the post you will see that i have already picked parameters from this table and change it from openmrs admin page and still not populated in List
I’m almost certain that this tag of the address template is not consumed by Bahmni. Long story short Bahmni obtains the address levels from the Address Hierarchy (AH) module. In turns AH consumes the address template to map address levels to address fields.
For the UI to impose a regex on certain address fields it would require to be handled by Bahmni Apps (as it is done with patient identifiers for example.) I am not sure if this is supported through the config for address fields.
Hi @mksd, thanks for your reply. Yes you can impose a regex on Address Hierarchy fields using bahmni_config/apps/registration/attributesConditions.js
Steps I followed:
Added an Address Hierarchy Templates where I use a field like this <property name="longitude" value="Numbers or Decimals" /> and <property name="latitude" value="Numbers o Decimals" />