Error when updating the Person attributes

We are currently working on our system and I was changing the registration page app.json file and the Person Attributes in Openmrs. I was consistenly checking to make sure that they things I was typing in there wasn’t messing up the registration page. I don’t know exactly what caused the error, but it happened roughly around when I created a Person attribute that used an Attributable Date. Otherwise I looked into the opernmrs.log and that was not giving me anything related to the error.

Please provide more details.

  1. Which attribute did u create? Screenshot of AdminUI.
  2. What config changes did u make in json file?
  3. What functionality are u trying to implement?
  4. Is there any error in Browser console or backend openmrs logs?

  1. This is what I made around the time that it broke, and then I changed it back to just be a concept right after when I thought that would be the problem.

  2. In the app.json file, I was placing new configs under “patientInformation” and had been placing names of person attributes into the attributes field. I went in and tried to change the givenNameLocal to firstName and deleted the person attribute. What I think could be a problem is that there is a call for one of the removed attributes

  3. We are trying to change the layout and elements of the registration tab, I have been looking into a bunch of information and videos, but I don’t understand how to do it that well and I have been testing.

  4. openmrs.log is not giving me any information that is useful, I do not know where else to go for looking into the error messages. I just checked the Browser error log and it was telling me that I was missing a file called attributesconditions.js, which is not in the running version that we have from a little bit before it broke.

  1. I am not sure if AttributableDate is supported. I think it should be. There was a fix in Patient CSV importer to support importing dates, so then the underlying model must support it. See this JIRA ticket.

  2. Sounds like you were editing the right attribute. Even if u have a patient attribute present in OpenMRS, but u remove it from “patientInformation” node in JSON, it will be hidden from UI — so, start with that. Don’t delete it from OpenMRS UI.

  3. In general, avoid deleting an existing Patient Attribute, and instead “retire it” if needed. Although as I mentioned in point2 above, u may not need to touch that attribute in OpenMRS admin, and just remove it from JSON (since JSON is the frontend configuration file for UI).

  4. Attribite Conditions JS file is for defining JS logic for show/hide fields: See this wiki documentation. Since in default config, this file doesn’t exist, you are seeing this error. You can ignore it. I see the same error on Bahmni Demo server too. This file is only needed if you are actually adding some logic.

I hope this helps. Maybe you might need to share the list of patient attributes you have in your OpenMRS server, and the JSON configurtion you have done for them in UI config. And then the error you are seeing in Browser Dev Console.