Certain address levels are not visible In Address Hierarchy

Application Name: Bahmni Version Number: 2.1.1 Build 725db5

Question: So, I am using Bahmni version 0.91 and it comes it OpenMRS version: 2.1.1 Build 725db5. We have a requirement where we need a lot of address fields. This is the address template that I am using: https://pastebin.com/cTDvseHg
In the Add New Address Hierarchy Level, this is what I am seeing

As you can see address7 is not being displayed and nor are any other address fields till address15. On researching , I could see that this has been solved some time ago : https://issues.openmrs.org/browse/TRUNK-4750

How can I fix this issue? Or what am I doing wrong? Thanks a lot!

Can you share the contents of the server side log at pastebin.com?

Hi @dkayiwa, actually nothing gets logged.

What is the name of the log file that you are looking at?

Its openmrs.log located in /var/log/openmrs

Can we look at the tomcat log files like catalina.out?

Where is it located?

Can you check in your tomcat installation folder?

This looks like the only Tomcat directory : /opt/openmrs/run/work/Tomcat/localhost/openmrs but its empty

Can you do some googling for the location of the tomcat logs folder for your operating system?

Looks like catalina.out file is not present in Bahmni. I searched it completely but its not there

Moved to the bahmni category.

@krishnanspace I haven’t really read through this thread but you should use AH 2.11.0 and leverage its ability to load address fields and address hierarchy configurations out of the box.

See an example here where:

  1. addressConfiguration.xml defines the address fields and levels.
  2. addresshierarchy.csv provides all address hierarchy entries in accordance to 1.

Hi @mksd, I just used AH 2.12.0 and it looks like it has these certain addresses https://github.com/openmrs/openmrs-module-addresshierarchy/blob/d1d22ddb62c10ae0a7df38f7c5473b510009ab1d/api/src/main/java/org/openmrs/module/addresshierarchy/AddressField.java#L18
Looks like I still cant use address7-address15

Oh you mean that AH’s AddressField (here) doesn’t cover a range as wide as what the Core allows with PersonAddress (here)?

You will have to make a PR on AH to make those match again I believe, @mseaton?

@mksd @krishnanspace yes, you’ll definitely need to add those new fields to the AddressField enum… I think that may be all the updates that are required, but I’m not 100% sure…

Take care, Mark

1 Like

Thanks @mogoodrich .

@krishnanspace that should be a fairly minor change, would you guys be able to look into producing such PR on AH?

Thanks a lot @mksd and @mogoodrich. I will create a PR on AH for this issue

@krishnanspace In Bahmni, OpenMRS web runs with embedded tomcat. All logs (application or server) will go to /opt/openmrs/openmrs.log

@angshuonline Got it.Thanks!