Saving an extra name field within the Registration Tab

Our client is Predisan and they would like us to implement a Surname field into the registration tab, I have been able to successfully get the field to show up on the screen, but it is not saving the surname value.

This is what the registration tab looks like right now. I went in and added:

  • showSurname = true; into the app.json file
  • Added a surnameLocal variable into the Person Attributes in OpenMRS
  • In patientcommon.html, I didn’t know exaclty what to format for it, so I copied the previous button and changed all of the values to match Surname *I added a field related to surname in a few locations within the registration.js file that we have. I don’t know if it is important but the group before us minified the registration.js file

Is there anywhere else that I should be looking to change these values? One of the other problems is that there is a lot of different formatting than what everyone else is using because of how they changed it last year.

We are trying to edit the registration page, and I am not great with all of this frontend stuff, so does anyone have any recommendations for figuring out this layout, because it is a confusing project

Please goto Person Attribute Management of openmrs admin section to add field that you want. then goto bahmni_config/openmrs/apps/ registration/app.json Now call and manage on this file.

So I went into the app.json file and that allowed me to change a few things, but where can I change variables related to the name. I did not see that in the file a location to change anything related to the name or age and dob fields.

So where I am confused is that this project was changed by another group before us and I haven’t been able to change much within this field.

We have been using the views .html files inside of the bahmniapps file to change the variables related to the the registration’s main page. image

Are we missing something vital that is making things more complicated, or are we just lost?

It appears Colin that your team has modified both: configuration + BahmniApps code.

Usually we suggest teams to modify the screens via json modifications as mentioned in the implementers guide.

But if your team has also made “code” changes, then we won’t know why some configuration isn’t taking effect, because the code to render it would have been changed. You might need to debug in the UI what changes are done, or ping someone from the team who did the UI code changes to guide you.

Or you can try to make the same change on a “fresh” bahmni instance, and once you get surname correctly there, you can try and duplicate the same steps in your custom instance of bahmni and see if that works.

Gotcha, we didn’t know how much we needed to edit and how much we didn’t. It’s interesting to see the different styles of coding from different places. I haven’t seen this kind of layout before, it can be helpful, but we are just going to move on and work on something else