"Cannot find controller" error when adding person attribute type to search page

I created a coded person attribute type as mentioned here:

with the person attribute type: Org.openmrs.concept

On the Provider Management module, when I try to add this person attribute type to the advanced search page

The provider search page doesn’t open and shows this error message:

Can this be solved?

Thank you : )

(To comment, “Mother’s Name” isn’t your example of a coded concept, right? Because that’s what your screenshot shows.)

The underlying issue is that the uilibrary module (used by providermanagement) does not have a widget for choosing concepts. (The widgets that it does have are here: https://github.com/openmrs/openmrs-module-uilibrary/tree/master/omod/src/main/webapp/fragments/field .)

These modules (uilibrary and providermanagement) are not one core OpenMRS priorities right now, so I would expect that if you want to get this fixed, you need to to find a developer to work on it.

The work would probably be:

  • fix in the providermanagement module so if the PersonAttributeType is a Concept, then the foreign key needs to be passed along (i.e. which concept lists the answers)
  • add a “field” widget for org.openmrs.Concept (which should respect showing the concepts that answer a given question)

ok thanks…

Actually the ones that work are : Boolean, Character, Integer, String and location. The rest produce the same error.

@darius In the page you shared:

Could you please explain How to use this Role attribute?

Those are widgets that exist at the UI level. Presumably that one would let you pick a Role (maybe out of a dropdown). A developer would do something like:

ui.includeFragment("uilibrary", "field/org.openmrs.Role")

I don’t know if it’s possible or not to have a provider attribute whose datatype is Role. It could be that this UI widget was developed for some other reason.

1 Like